graphscope-flex 0.27.0__4-py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graphscope/flex/rest/__init__.py +97 -0
- graphscope/flex/rest/api/__init__.py +12 -0
- graphscope/flex/rest/api/alert_api.py +2780 -0
- graphscope/flex/rest/api/data_source_api.py +1173 -0
- graphscope/flex/rest/api/deployment_api.py +528 -0
- graphscope/flex/rest/api/graph_api.py +2803 -0
- graphscope/flex/rest/api/job_api.py +1356 -0
- graphscope/flex/rest/api/service_api.py +1311 -0
- graphscope/flex/rest/api/stored_procedure_api.py +1449 -0
- graphscope/flex/rest/api/utils_api.py +309 -0
- graphscope/flex/rest/api_client.py +759 -0
- graphscope/flex/rest/api_response.py +21 -0
- graphscope/flex/rest/configuration.py +437 -0
- graphscope/flex/rest/exceptions.py +200 -0
- graphscope/flex/rest/models/__init__.py +73 -0
- graphscope/flex/rest/models/base_edge_type.py +102 -0
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +105 -0
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py +98 -0
- graphscope/flex/rest/models/base_property_meta.py +105 -0
- graphscope/flex/rest/models/base_vertex_type.py +96 -0
- graphscope/flex/rest/models/base_vertex_type_x_csr_params.py +88 -0
- graphscope/flex/rest/models/column_mapping.py +94 -0
- graphscope/flex/rest/models/column_mapping_column.py +90 -0
- graphscope/flex/rest/models/create_alert_receiver_request.py +103 -0
- graphscope/flex/rest/models/create_alert_rule_request.py +112 -0
- graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
- graphscope/flex/rest/models/create_edge_type.py +114 -0
- graphscope/flex/rest/models/create_graph_request.py +106 -0
- graphscope/flex/rest/models/create_graph_response.py +88 -0
- graphscope/flex/rest/models/create_graph_schema_request.py +106 -0
- graphscope/flex/rest/models/create_property_meta.py +100 -0
- graphscope/flex/rest/models/create_stored_proc_request.py +101 -0
- graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
- graphscope/flex/rest/models/create_vertex_type.py +108 -0
- graphscope/flex/rest/models/dataloading_job_config.py +136 -0
- graphscope/flex/rest/models/dataloading_job_config_edges_inner.py +92 -0
- graphscope/flex/rest/models/dataloading_job_config_loading_config.py +104 -0
- graphscope/flex/rest/models/dataloading_job_config_loading_config_format.py +90 -0
- graphscope/flex/rest/models/dataloading_job_config_vertices_inner.py +88 -0
- graphscope/flex/rest/models/edge_mapping.py +122 -0
- graphscope/flex/rest/models/edge_mapping_type_triplet.py +92 -0
- graphscope/flex/rest/models/error.py +90 -0
- graphscope/flex/rest/models/get_alert_message_response.py +123 -0
- graphscope/flex/rest/models/get_alert_receiver_response.py +107 -0
- graphscope/flex/rest/models/get_alert_rule_response.py +114 -0
- graphscope/flex/rest/models/get_edge_type.py +116 -0
- graphscope/flex/rest/models/get_graph_response.py +126 -0
- graphscope/flex/rest/models/get_graph_schema_response.py +106 -0
- graphscope/flex/rest/models/get_property_meta.py +102 -0
- graphscope/flex/rest/models/get_stored_proc_response.py +128 -0
- graphscope/flex/rest/models/get_vertex_type.py +110 -0
- graphscope/flex/rest/models/gs_data_type.py +138 -0
- graphscope/flex/rest/models/job_status.py +107 -0
- graphscope/flex/rest/models/long_text.py +93 -0
- graphscope/flex/rest/models/node_status.py +94 -0
- graphscope/flex/rest/models/parameter.py +94 -0
- graphscope/flex/rest/models/primitive_type.py +95 -0
- graphscope/flex/rest/models/running_deployment_info.py +128 -0
- graphscope/flex/rest/models/running_deployment_status.py +105 -0
- graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +124 -0
- graphscope/flex/rest/models/schema_mapping.py +106 -0
- graphscope/flex/rest/models/service_status.py +105 -0
- graphscope/flex/rest/models/service_status_sdk_endpoints.py +94 -0
- graphscope/flex/rest/models/start_service_request.py +88 -0
- graphscope/flex/rest/models/stored_procedure_meta.py +124 -0
- graphscope/flex/rest/models/string_type.py +92 -0
- graphscope/flex/rest/models/string_type_string.py +124 -0
- graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
- graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
- graphscope/flex/rest/models/upload_file_response.py +88 -0
- graphscope/flex/rest/models/vertex_mapping.py +100 -0
- graphscope/flex/rest/py.typed +0 -0
- graphscope/flex/rest/rest.py +256 -0
- graphscope_flex-0.27.0.dist-info/METADATA +17 -0
- graphscope_flex-0.27.0.dist-info/RECORD +77 -0
- graphscope_flex-0.27.0.dist-info/WHEEL +6 -0
- graphscope_flex-0.27.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1173 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
GraphScope FLEX HTTP SERVICE API
|
5
|
+
|
6
|
+
This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: graphscope@alibaba-inc.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
import warnings
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
18
|
+
from typing_extensions import Annotated
|
19
|
+
|
20
|
+
from pydantic import StrictStr
|
21
|
+
from graphscope.flex.rest.models.schema_mapping import SchemaMapping
|
22
|
+
|
23
|
+
from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
|
24
|
+
from graphscope.flex.rest.api_response import ApiResponse
|
25
|
+
from graphscope.flex.rest.rest import RESTResponseType
|
26
|
+
|
27
|
+
|
28
|
+
class DataSourceApi:
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
+
Ref: https://openapi-generator.tech
|
31
|
+
|
32
|
+
Do not edit the class manually.
|
33
|
+
"""
|
34
|
+
|
35
|
+
def __init__(self, api_client=None) -> None:
|
36
|
+
if api_client is None:
|
37
|
+
api_client = ApiClient.get_default()
|
38
|
+
self.api_client = api_client
|
39
|
+
|
40
|
+
|
41
|
+
@validate_call
|
42
|
+
def bind_datasource_in_batch(
|
43
|
+
self,
|
44
|
+
graph_id: StrictStr,
|
45
|
+
schema_mapping: SchemaMapping,
|
46
|
+
_request_timeout: Union[
|
47
|
+
None,
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
49
|
+
Tuple[
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
52
|
+
]
|
53
|
+
] = None,
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
58
|
+
) -> str:
|
59
|
+
"""bind_datasource_in_batch
|
60
|
+
|
61
|
+
Bind data sources in batches
|
62
|
+
|
63
|
+
:param graph_id: (required)
|
64
|
+
:type graph_id: str
|
65
|
+
:param schema_mapping: (required)
|
66
|
+
:type schema_mapping: SchemaMapping
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
68
|
+
number provided, it will be total request
|
69
|
+
timeout. It can also be a pair (tuple) of
|
70
|
+
(connection, read) timeouts.
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
73
|
+
request; this effectively ignores the
|
74
|
+
authentication in the spec for a single request.
|
75
|
+
:type _request_auth: dict, optional
|
76
|
+
:param _content_type: force content-type for the request.
|
77
|
+
:type _content_type: str, Optional
|
78
|
+
:param _headers: set to override the headers for a single
|
79
|
+
request; this effectively ignores the headers
|
80
|
+
in the spec for a single request.
|
81
|
+
:type _headers: dict, optional
|
82
|
+
:param _host_index: set to override the host_index for a single
|
83
|
+
request; this effectively ignores the host_index
|
84
|
+
in the spec for a single request.
|
85
|
+
:type _host_index: int, optional
|
86
|
+
:return: Returns the result object.
|
87
|
+
""" # noqa: E501
|
88
|
+
|
89
|
+
_param = self._bind_datasource_in_batch_serialize(
|
90
|
+
graph_id=graph_id,
|
91
|
+
schema_mapping=schema_mapping,
|
92
|
+
_request_auth=_request_auth,
|
93
|
+
_content_type=_content_type,
|
94
|
+
_headers=_headers,
|
95
|
+
_host_index=_host_index
|
96
|
+
)
|
97
|
+
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
99
|
+
'200': "str",
|
100
|
+
'400': "Error",
|
101
|
+
'500': "Error",
|
102
|
+
}
|
103
|
+
response_data = self.api_client.call_api(
|
104
|
+
*_param,
|
105
|
+
_request_timeout=_request_timeout
|
106
|
+
)
|
107
|
+
response_data.read()
|
108
|
+
return self.api_client.response_deserialize(
|
109
|
+
response_data=response_data,
|
110
|
+
response_types_map=_response_types_map,
|
111
|
+
).data
|
112
|
+
|
113
|
+
|
114
|
+
@validate_call
|
115
|
+
def bind_datasource_in_batch_with_http_info(
|
116
|
+
self,
|
117
|
+
graph_id: StrictStr,
|
118
|
+
schema_mapping: SchemaMapping,
|
119
|
+
_request_timeout: Union[
|
120
|
+
None,
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
122
|
+
Tuple[
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
125
|
+
]
|
126
|
+
] = None,
|
127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
128
|
+
_content_type: Optional[StrictStr] = None,
|
129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
131
|
+
) -> ApiResponse[str]:
|
132
|
+
"""bind_datasource_in_batch
|
133
|
+
|
134
|
+
Bind data sources in batches
|
135
|
+
|
136
|
+
:param graph_id: (required)
|
137
|
+
:type graph_id: str
|
138
|
+
:param schema_mapping: (required)
|
139
|
+
:type schema_mapping: SchemaMapping
|
140
|
+
:param _request_timeout: timeout setting for this request. If one
|
141
|
+
number provided, it will be total request
|
142
|
+
timeout. It can also be a pair (tuple) of
|
143
|
+
(connection, read) timeouts.
|
144
|
+
:type _request_timeout: int, tuple(int, int), optional
|
145
|
+
:param _request_auth: set to override the auth_settings for an a single
|
146
|
+
request; this effectively ignores the
|
147
|
+
authentication in the spec for a single request.
|
148
|
+
:type _request_auth: dict, optional
|
149
|
+
:param _content_type: force content-type for the request.
|
150
|
+
:type _content_type: str, Optional
|
151
|
+
:param _headers: set to override the headers for a single
|
152
|
+
request; this effectively ignores the headers
|
153
|
+
in the spec for a single request.
|
154
|
+
:type _headers: dict, optional
|
155
|
+
:param _host_index: set to override the host_index for a single
|
156
|
+
request; this effectively ignores the host_index
|
157
|
+
in the spec for a single request.
|
158
|
+
:type _host_index: int, optional
|
159
|
+
:return: Returns the result object.
|
160
|
+
""" # noqa: E501
|
161
|
+
|
162
|
+
_param = self._bind_datasource_in_batch_serialize(
|
163
|
+
graph_id=graph_id,
|
164
|
+
schema_mapping=schema_mapping,
|
165
|
+
_request_auth=_request_auth,
|
166
|
+
_content_type=_content_type,
|
167
|
+
_headers=_headers,
|
168
|
+
_host_index=_host_index
|
169
|
+
)
|
170
|
+
|
171
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
172
|
+
'200': "str",
|
173
|
+
'400': "Error",
|
174
|
+
'500': "Error",
|
175
|
+
}
|
176
|
+
response_data = self.api_client.call_api(
|
177
|
+
*_param,
|
178
|
+
_request_timeout=_request_timeout
|
179
|
+
)
|
180
|
+
response_data.read()
|
181
|
+
return self.api_client.response_deserialize(
|
182
|
+
response_data=response_data,
|
183
|
+
response_types_map=_response_types_map,
|
184
|
+
)
|
185
|
+
|
186
|
+
|
187
|
+
@validate_call
|
188
|
+
def bind_datasource_in_batch_without_preload_content(
|
189
|
+
self,
|
190
|
+
graph_id: StrictStr,
|
191
|
+
schema_mapping: SchemaMapping,
|
192
|
+
_request_timeout: Union[
|
193
|
+
None,
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
195
|
+
Tuple[
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
198
|
+
]
|
199
|
+
] = None,
|
200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
201
|
+
_content_type: Optional[StrictStr] = None,
|
202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
204
|
+
) -> RESTResponseType:
|
205
|
+
"""bind_datasource_in_batch
|
206
|
+
|
207
|
+
Bind data sources in batches
|
208
|
+
|
209
|
+
:param graph_id: (required)
|
210
|
+
:type graph_id: str
|
211
|
+
:param schema_mapping: (required)
|
212
|
+
:type schema_mapping: SchemaMapping
|
213
|
+
:param _request_timeout: timeout setting for this request. If one
|
214
|
+
number provided, it will be total request
|
215
|
+
timeout. It can also be a pair (tuple) of
|
216
|
+
(connection, read) timeouts.
|
217
|
+
:type _request_timeout: int, tuple(int, int), optional
|
218
|
+
:param _request_auth: set to override the auth_settings for an a single
|
219
|
+
request; this effectively ignores the
|
220
|
+
authentication in the spec for a single request.
|
221
|
+
:type _request_auth: dict, optional
|
222
|
+
:param _content_type: force content-type for the request.
|
223
|
+
:type _content_type: str, Optional
|
224
|
+
:param _headers: set to override the headers for a single
|
225
|
+
request; this effectively ignores the headers
|
226
|
+
in the spec for a single request.
|
227
|
+
:type _headers: dict, optional
|
228
|
+
:param _host_index: set to override the host_index for a single
|
229
|
+
request; this effectively ignores the host_index
|
230
|
+
in the spec for a single request.
|
231
|
+
:type _host_index: int, optional
|
232
|
+
:return: Returns the result object.
|
233
|
+
""" # noqa: E501
|
234
|
+
|
235
|
+
_param = self._bind_datasource_in_batch_serialize(
|
236
|
+
graph_id=graph_id,
|
237
|
+
schema_mapping=schema_mapping,
|
238
|
+
_request_auth=_request_auth,
|
239
|
+
_content_type=_content_type,
|
240
|
+
_headers=_headers,
|
241
|
+
_host_index=_host_index
|
242
|
+
)
|
243
|
+
|
244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
245
|
+
'200': "str",
|
246
|
+
'400': "Error",
|
247
|
+
'500': "Error",
|
248
|
+
}
|
249
|
+
response_data = self.api_client.call_api(
|
250
|
+
*_param,
|
251
|
+
_request_timeout=_request_timeout
|
252
|
+
)
|
253
|
+
return response_data.response
|
254
|
+
|
255
|
+
|
256
|
+
def _bind_datasource_in_batch_serialize(
|
257
|
+
self,
|
258
|
+
graph_id,
|
259
|
+
schema_mapping,
|
260
|
+
_request_auth,
|
261
|
+
_content_type,
|
262
|
+
_headers,
|
263
|
+
_host_index,
|
264
|
+
) -> RequestSerialized:
|
265
|
+
|
266
|
+
_host = None
|
267
|
+
|
268
|
+
_collection_formats: Dict[str, str] = {
|
269
|
+
}
|
270
|
+
|
271
|
+
_path_params: Dict[str, str] = {}
|
272
|
+
_query_params: List[Tuple[str, str]] = []
|
273
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
274
|
+
_form_params: List[Tuple[str, str]] = []
|
275
|
+
_files: Dict[str, str] = {}
|
276
|
+
_body_params: Optional[bytes] = None
|
277
|
+
|
278
|
+
# process the path parameters
|
279
|
+
if graph_id is not None:
|
280
|
+
_path_params['graph_id'] = graph_id
|
281
|
+
# process the query parameters
|
282
|
+
# process the header parameters
|
283
|
+
# process the form parameters
|
284
|
+
# process the body parameter
|
285
|
+
if schema_mapping is not None:
|
286
|
+
_body_params = schema_mapping
|
287
|
+
|
288
|
+
|
289
|
+
# set the HTTP header `Accept`
|
290
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
291
|
+
[
|
292
|
+
'application/json'
|
293
|
+
]
|
294
|
+
)
|
295
|
+
|
296
|
+
# set the HTTP header `Content-Type`
|
297
|
+
if _content_type:
|
298
|
+
_header_params['Content-Type'] = _content_type
|
299
|
+
else:
|
300
|
+
_default_content_type = (
|
301
|
+
self.api_client.select_header_content_type(
|
302
|
+
[
|
303
|
+
'application/json'
|
304
|
+
]
|
305
|
+
)
|
306
|
+
)
|
307
|
+
if _default_content_type is not None:
|
308
|
+
_header_params['Content-Type'] = _default_content_type
|
309
|
+
|
310
|
+
# authentication setting
|
311
|
+
_auth_settings: List[str] = [
|
312
|
+
]
|
313
|
+
|
314
|
+
return self.api_client.param_serialize(
|
315
|
+
method='POST',
|
316
|
+
resource_path='/api/v1/graph/{graph_id}/datasource',
|
317
|
+
path_params=_path_params,
|
318
|
+
query_params=_query_params,
|
319
|
+
header_params=_header_params,
|
320
|
+
body=_body_params,
|
321
|
+
post_params=_form_params,
|
322
|
+
files=_files,
|
323
|
+
auth_settings=_auth_settings,
|
324
|
+
collection_formats=_collection_formats,
|
325
|
+
_host=_host,
|
326
|
+
_request_auth=_request_auth
|
327
|
+
)
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
@validate_call
|
333
|
+
def get_datasource_by_id(
|
334
|
+
self,
|
335
|
+
graph_id: StrictStr,
|
336
|
+
_request_timeout: Union[
|
337
|
+
None,
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
339
|
+
Tuple[
|
340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
342
|
+
]
|
343
|
+
] = None,
|
344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
345
|
+
_content_type: Optional[StrictStr] = None,
|
346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
348
|
+
) -> SchemaMapping:
|
349
|
+
"""get_datasource_by_id
|
350
|
+
|
351
|
+
Get data source by ID
|
352
|
+
|
353
|
+
:param graph_id: (required)
|
354
|
+
:type graph_id: str
|
355
|
+
:param _request_timeout: timeout setting for this request. If one
|
356
|
+
number provided, it will be total request
|
357
|
+
timeout. It can also be a pair (tuple) of
|
358
|
+
(connection, read) timeouts.
|
359
|
+
:type _request_timeout: int, tuple(int, int), optional
|
360
|
+
:param _request_auth: set to override the auth_settings for an a single
|
361
|
+
request; this effectively ignores the
|
362
|
+
authentication in the spec for a single request.
|
363
|
+
:type _request_auth: dict, optional
|
364
|
+
:param _content_type: force content-type for the request.
|
365
|
+
:type _content_type: str, Optional
|
366
|
+
:param _headers: set to override the headers for a single
|
367
|
+
request; this effectively ignores the headers
|
368
|
+
in the spec for a single request.
|
369
|
+
:type _headers: dict, optional
|
370
|
+
:param _host_index: set to override the host_index for a single
|
371
|
+
request; this effectively ignores the host_index
|
372
|
+
in the spec for a single request.
|
373
|
+
:type _host_index: int, optional
|
374
|
+
:return: Returns the result object.
|
375
|
+
""" # noqa: E501
|
376
|
+
|
377
|
+
_param = self._get_datasource_by_id_serialize(
|
378
|
+
graph_id=graph_id,
|
379
|
+
_request_auth=_request_auth,
|
380
|
+
_content_type=_content_type,
|
381
|
+
_headers=_headers,
|
382
|
+
_host_index=_host_index
|
383
|
+
)
|
384
|
+
|
385
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
386
|
+
'200': "SchemaMapping",
|
387
|
+
'500': "Error",
|
388
|
+
}
|
389
|
+
response_data = self.api_client.call_api(
|
390
|
+
*_param,
|
391
|
+
_request_timeout=_request_timeout
|
392
|
+
)
|
393
|
+
response_data.read()
|
394
|
+
return self.api_client.response_deserialize(
|
395
|
+
response_data=response_data,
|
396
|
+
response_types_map=_response_types_map,
|
397
|
+
).data
|
398
|
+
|
399
|
+
|
400
|
+
@validate_call
|
401
|
+
def get_datasource_by_id_with_http_info(
|
402
|
+
self,
|
403
|
+
graph_id: StrictStr,
|
404
|
+
_request_timeout: Union[
|
405
|
+
None,
|
406
|
+
Annotated[StrictFloat, Field(gt=0)],
|
407
|
+
Tuple[
|
408
|
+
Annotated[StrictFloat, Field(gt=0)],
|
409
|
+
Annotated[StrictFloat, Field(gt=0)]
|
410
|
+
]
|
411
|
+
] = None,
|
412
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
413
|
+
_content_type: Optional[StrictStr] = None,
|
414
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
415
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
416
|
+
) -> ApiResponse[SchemaMapping]:
|
417
|
+
"""get_datasource_by_id
|
418
|
+
|
419
|
+
Get data source by ID
|
420
|
+
|
421
|
+
:param graph_id: (required)
|
422
|
+
:type graph_id: str
|
423
|
+
:param _request_timeout: timeout setting for this request. If one
|
424
|
+
number provided, it will be total request
|
425
|
+
timeout. It can also be a pair (tuple) of
|
426
|
+
(connection, read) timeouts.
|
427
|
+
:type _request_timeout: int, tuple(int, int), optional
|
428
|
+
:param _request_auth: set to override the auth_settings for an a single
|
429
|
+
request; this effectively ignores the
|
430
|
+
authentication in the spec for a single request.
|
431
|
+
:type _request_auth: dict, optional
|
432
|
+
:param _content_type: force content-type for the request.
|
433
|
+
:type _content_type: str, Optional
|
434
|
+
:param _headers: set to override the headers for a single
|
435
|
+
request; this effectively ignores the headers
|
436
|
+
in the spec for a single request.
|
437
|
+
:type _headers: dict, optional
|
438
|
+
:param _host_index: set to override the host_index for a single
|
439
|
+
request; this effectively ignores the host_index
|
440
|
+
in the spec for a single request.
|
441
|
+
:type _host_index: int, optional
|
442
|
+
:return: Returns the result object.
|
443
|
+
""" # noqa: E501
|
444
|
+
|
445
|
+
_param = self._get_datasource_by_id_serialize(
|
446
|
+
graph_id=graph_id,
|
447
|
+
_request_auth=_request_auth,
|
448
|
+
_content_type=_content_type,
|
449
|
+
_headers=_headers,
|
450
|
+
_host_index=_host_index
|
451
|
+
)
|
452
|
+
|
453
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
454
|
+
'200': "SchemaMapping",
|
455
|
+
'500': "Error",
|
456
|
+
}
|
457
|
+
response_data = self.api_client.call_api(
|
458
|
+
*_param,
|
459
|
+
_request_timeout=_request_timeout
|
460
|
+
)
|
461
|
+
response_data.read()
|
462
|
+
return self.api_client.response_deserialize(
|
463
|
+
response_data=response_data,
|
464
|
+
response_types_map=_response_types_map,
|
465
|
+
)
|
466
|
+
|
467
|
+
|
468
|
+
@validate_call
|
469
|
+
def get_datasource_by_id_without_preload_content(
|
470
|
+
self,
|
471
|
+
graph_id: StrictStr,
|
472
|
+
_request_timeout: Union[
|
473
|
+
None,
|
474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
475
|
+
Tuple[
|
476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
478
|
+
]
|
479
|
+
] = None,
|
480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
481
|
+
_content_type: Optional[StrictStr] = None,
|
482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
484
|
+
) -> RESTResponseType:
|
485
|
+
"""get_datasource_by_id
|
486
|
+
|
487
|
+
Get data source by ID
|
488
|
+
|
489
|
+
:param graph_id: (required)
|
490
|
+
:type graph_id: str
|
491
|
+
:param _request_timeout: timeout setting for this request. If one
|
492
|
+
number provided, it will be total request
|
493
|
+
timeout. It can also be a pair (tuple) of
|
494
|
+
(connection, read) timeouts.
|
495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
496
|
+
:param _request_auth: set to override the auth_settings for an a single
|
497
|
+
request; this effectively ignores the
|
498
|
+
authentication in the spec for a single request.
|
499
|
+
:type _request_auth: dict, optional
|
500
|
+
:param _content_type: force content-type for the request.
|
501
|
+
:type _content_type: str, Optional
|
502
|
+
:param _headers: set to override the headers for a single
|
503
|
+
request; this effectively ignores the headers
|
504
|
+
in the spec for a single request.
|
505
|
+
:type _headers: dict, optional
|
506
|
+
:param _host_index: set to override the host_index for a single
|
507
|
+
request; this effectively ignores the host_index
|
508
|
+
in the spec for a single request.
|
509
|
+
:type _host_index: int, optional
|
510
|
+
:return: Returns the result object.
|
511
|
+
""" # noqa: E501
|
512
|
+
|
513
|
+
_param = self._get_datasource_by_id_serialize(
|
514
|
+
graph_id=graph_id,
|
515
|
+
_request_auth=_request_auth,
|
516
|
+
_content_type=_content_type,
|
517
|
+
_headers=_headers,
|
518
|
+
_host_index=_host_index
|
519
|
+
)
|
520
|
+
|
521
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
522
|
+
'200': "SchemaMapping",
|
523
|
+
'500': "Error",
|
524
|
+
}
|
525
|
+
response_data = self.api_client.call_api(
|
526
|
+
*_param,
|
527
|
+
_request_timeout=_request_timeout
|
528
|
+
)
|
529
|
+
return response_data.response
|
530
|
+
|
531
|
+
|
532
|
+
def _get_datasource_by_id_serialize(
|
533
|
+
self,
|
534
|
+
graph_id,
|
535
|
+
_request_auth,
|
536
|
+
_content_type,
|
537
|
+
_headers,
|
538
|
+
_host_index,
|
539
|
+
) -> RequestSerialized:
|
540
|
+
|
541
|
+
_host = None
|
542
|
+
|
543
|
+
_collection_formats: Dict[str, str] = {
|
544
|
+
}
|
545
|
+
|
546
|
+
_path_params: Dict[str, str] = {}
|
547
|
+
_query_params: List[Tuple[str, str]] = []
|
548
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
549
|
+
_form_params: List[Tuple[str, str]] = []
|
550
|
+
_files: Dict[str, str] = {}
|
551
|
+
_body_params: Optional[bytes] = None
|
552
|
+
|
553
|
+
# process the path parameters
|
554
|
+
if graph_id is not None:
|
555
|
+
_path_params['graph_id'] = graph_id
|
556
|
+
# process the query parameters
|
557
|
+
# process the header parameters
|
558
|
+
# process the form parameters
|
559
|
+
# process the body parameter
|
560
|
+
|
561
|
+
|
562
|
+
# set the HTTP header `Accept`
|
563
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
564
|
+
[
|
565
|
+
'application/json'
|
566
|
+
]
|
567
|
+
)
|
568
|
+
|
569
|
+
|
570
|
+
# authentication setting
|
571
|
+
_auth_settings: List[str] = [
|
572
|
+
]
|
573
|
+
|
574
|
+
return self.api_client.param_serialize(
|
575
|
+
method='GET',
|
576
|
+
resource_path='/api/v1/graph/{graph_id}/datasource',
|
577
|
+
path_params=_path_params,
|
578
|
+
query_params=_query_params,
|
579
|
+
header_params=_header_params,
|
580
|
+
body=_body_params,
|
581
|
+
post_params=_form_params,
|
582
|
+
files=_files,
|
583
|
+
auth_settings=_auth_settings,
|
584
|
+
collection_formats=_collection_formats,
|
585
|
+
_host=_host,
|
586
|
+
_request_auth=_request_auth
|
587
|
+
)
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
@validate_call
|
593
|
+
def unbind_edge_datasource(
|
594
|
+
self,
|
595
|
+
graph_id: StrictStr,
|
596
|
+
type_name: StrictStr,
|
597
|
+
source_vertex_type: StrictStr,
|
598
|
+
destination_vertex_type: StrictStr,
|
599
|
+
_request_timeout: Union[
|
600
|
+
None,
|
601
|
+
Annotated[StrictFloat, Field(gt=0)],
|
602
|
+
Tuple[
|
603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
604
|
+
Annotated[StrictFloat, Field(gt=0)]
|
605
|
+
]
|
606
|
+
] = None,
|
607
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
608
|
+
_content_type: Optional[StrictStr] = None,
|
609
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
610
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
611
|
+
) -> str:
|
612
|
+
"""unbind_edge_datasource
|
613
|
+
|
614
|
+
Unbind datas ource on an edge type
|
615
|
+
|
616
|
+
:param graph_id: (required)
|
617
|
+
:type graph_id: str
|
618
|
+
:param type_name: (required)
|
619
|
+
:type type_name: str
|
620
|
+
:param source_vertex_type: (required)
|
621
|
+
:type source_vertex_type: str
|
622
|
+
:param destination_vertex_type: (required)
|
623
|
+
:type destination_vertex_type: str
|
624
|
+
:param _request_timeout: timeout setting for this request. If one
|
625
|
+
number provided, it will be total request
|
626
|
+
timeout. It can also be a pair (tuple) of
|
627
|
+
(connection, read) timeouts.
|
628
|
+
:type _request_timeout: int, tuple(int, int), optional
|
629
|
+
:param _request_auth: set to override the auth_settings for an a single
|
630
|
+
request; this effectively ignores the
|
631
|
+
authentication in the spec for a single request.
|
632
|
+
:type _request_auth: dict, optional
|
633
|
+
:param _content_type: force content-type for the request.
|
634
|
+
:type _content_type: str, Optional
|
635
|
+
:param _headers: set to override the headers for a single
|
636
|
+
request; this effectively ignores the headers
|
637
|
+
in the spec for a single request.
|
638
|
+
:type _headers: dict, optional
|
639
|
+
:param _host_index: set to override the host_index for a single
|
640
|
+
request; this effectively ignores the host_index
|
641
|
+
in the spec for a single request.
|
642
|
+
:type _host_index: int, optional
|
643
|
+
:return: Returns the result object.
|
644
|
+
""" # noqa: E501
|
645
|
+
|
646
|
+
_param = self._unbind_edge_datasource_serialize(
|
647
|
+
graph_id=graph_id,
|
648
|
+
type_name=type_name,
|
649
|
+
source_vertex_type=source_vertex_type,
|
650
|
+
destination_vertex_type=destination_vertex_type,
|
651
|
+
_request_auth=_request_auth,
|
652
|
+
_content_type=_content_type,
|
653
|
+
_headers=_headers,
|
654
|
+
_host_index=_host_index
|
655
|
+
)
|
656
|
+
|
657
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
658
|
+
'200': "str",
|
659
|
+
'500': "Error",
|
660
|
+
}
|
661
|
+
response_data = self.api_client.call_api(
|
662
|
+
*_param,
|
663
|
+
_request_timeout=_request_timeout
|
664
|
+
)
|
665
|
+
response_data.read()
|
666
|
+
return self.api_client.response_deserialize(
|
667
|
+
response_data=response_data,
|
668
|
+
response_types_map=_response_types_map,
|
669
|
+
).data
|
670
|
+
|
671
|
+
|
672
|
+
@validate_call
|
673
|
+
def unbind_edge_datasource_with_http_info(
|
674
|
+
self,
|
675
|
+
graph_id: StrictStr,
|
676
|
+
type_name: StrictStr,
|
677
|
+
source_vertex_type: StrictStr,
|
678
|
+
destination_vertex_type: StrictStr,
|
679
|
+
_request_timeout: Union[
|
680
|
+
None,
|
681
|
+
Annotated[StrictFloat, Field(gt=0)],
|
682
|
+
Tuple[
|
683
|
+
Annotated[StrictFloat, Field(gt=0)],
|
684
|
+
Annotated[StrictFloat, Field(gt=0)]
|
685
|
+
]
|
686
|
+
] = None,
|
687
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
688
|
+
_content_type: Optional[StrictStr] = None,
|
689
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
690
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
691
|
+
) -> ApiResponse[str]:
|
692
|
+
"""unbind_edge_datasource
|
693
|
+
|
694
|
+
Unbind datas ource on an edge type
|
695
|
+
|
696
|
+
:param graph_id: (required)
|
697
|
+
:type graph_id: str
|
698
|
+
:param type_name: (required)
|
699
|
+
:type type_name: str
|
700
|
+
:param source_vertex_type: (required)
|
701
|
+
:type source_vertex_type: str
|
702
|
+
:param destination_vertex_type: (required)
|
703
|
+
:type destination_vertex_type: str
|
704
|
+
:param _request_timeout: timeout setting for this request. If one
|
705
|
+
number provided, it will be total request
|
706
|
+
timeout. It can also be a pair (tuple) of
|
707
|
+
(connection, read) timeouts.
|
708
|
+
:type _request_timeout: int, tuple(int, int), optional
|
709
|
+
:param _request_auth: set to override the auth_settings for an a single
|
710
|
+
request; this effectively ignores the
|
711
|
+
authentication in the spec for a single request.
|
712
|
+
:type _request_auth: dict, optional
|
713
|
+
:param _content_type: force content-type for the request.
|
714
|
+
:type _content_type: str, Optional
|
715
|
+
:param _headers: set to override the headers for a single
|
716
|
+
request; this effectively ignores the headers
|
717
|
+
in the spec for a single request.
|
718
|
+
:type _headers: dict, optional
|
719
|
+
:param _host_index: set to override the host_index for a single
|
720
|
+
request; this effectively ignores the host_index
|
721
|
+
in the spec for a single request.
|
722
|
+
:type _host_index: int, optional
|
723
|
+
:return: Returns the result object.
|
724
|
+
""" # noqa: E501
|
725
|
+
|
726
|
+
_param = self._unbind_edge_datasource_serialize(
|
727
|
+
graph_id=graph_id,
|
728
|
+
type_name=type_name,
|
729
|
+
source_vertex_type=source_vertex_type,
|
730
|
+
destination_vertex_type=destination_vertex_type,
|
731
|
+
_request_auth=_request_auth,
|
732
|
+
_content_type=_content_type,
|
733
|
+
_headers=_headers,
|
734
|
+
_host_index=_host_index
|
735
|
+
)
|
736
|
+
|
737
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
738
|
+
'200': "str",
|
739
|
+
'500': "Error",
|
740
|
+
}
|
741
|
+
response_data = self.api_client.call_api(
|
742
|
+
*_param,
|
743
|
+
_request_timeout=_request_timeout
|
744
|
+
)
|
745
|
+
response_data.read()
|
746
|
+
return self.api_client.response_deserialize(
|
747
|
+
response_data=response_data,
|
748
|
+
response_types_map=_response_types_map,
|
749
|
+
)
|
750
|
+
|
751
|
+
|
752
|
+
@validate_call
|
753
|
+
def unbind_edge_datasource_without_preload_content(
|
754
|
+
self,
|
755
|
+
graph_id: StrictStr,
|
756
|
+
type_name: StrictStr,
|
757
|
+
source_vertex_type: StrictStr,
|
758
|
+
destination_vertex_type: StrictStr,
|
759
|
+
_request_timeout: Union[
|
760
|
+
None,
|
761
|
+
Annotated[StrictFloat, Field(gt=0)],
|
762
|
+
Tuple[
|
763
|
+
Annotated[StrictFloat, Field(gt=0)],
|
764
|
+
Annotated[StrictFloat, Field(gt=0)]
|
765
|
+
]
|
766
|
+
] = None,
|
767
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
768
|
+
_content_type: Optional[StrictStr] = None,
|
769
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
770
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
771
|
+
) -> RESTResponseType:
|
772
|
+
"""unbind_edge_datasource
|
773
|
+
|
774
|
+
Unbind datas ource on an edge type
|
775
|
+
|
776
|
+
:param graph_id: (required)
|
777
|
+
:type graph_id: str
|
778
|
+
:param type_name: (required)
|
779
|
+
:type type_name: str
|
780
|
+
:param source_vertex_type: (required)
|
781
|
+
:type source_vertex_type: str
|
782
|
+
:param destination_vertex_type: (required)
|
783
|
+
:type destination_vertex_type: str
|
784
|
+
:param _request_timeout: timeout setting for this request. If one
|
785
|
+
number provided, it will be total request
|
786
|
+
timeout. It can also be a pair (tuple) of
|
787
|
+
(connection, read) timeouts.
|
788
|
+
:type _request_timeout: int, tuple(int, int), optional
|
789
|
+
:param _request_auth: set to override the auth_settings for an a single
|
790
|
+
request; this effectively ignores the
|
791
|
+
authentication in the spec for a single request.
|
792
|
+
:type _request_auth: dict, optional
|
793
|
+
:param _content_type: force content-type for the request.
|
794
|
+
:type _content_type: str, Optional
|
795
|
+
:param _headers: set to override the headers for a single
|
796
|
+
request; this effectively ignores the headers
|
797
|
+
in the spec for a single request.
|
798
|
+
:type _headers: dict, optional
|
799
|
+
:param _host_index: set to override the host_index for a single
|
800
|
+
request; this effectively ignores the host_index
|
801
|
+
in the spec for a single request.
|
802
|
+
:type _host_index: int, optional
|
803
|
+
:return: Returns the result object.
|
804
|
+
""" # noqa: E501
|
805
|
+
|
806
|
+
_param = self._unbind_edge_datasource_serialize(
|
807
|
+
graph_id=graph_id,
|
808
|
+
type_name=type_name,
|
809
|
+
source_vertex_type=source_vertex_type,
|
810
|
+
destination_vertex_type=destination_vertex_type,
|
811
|
+
_request_auth=_request_auth,
|
812
|
+
_content_type=_content_type,
|
813
|
+
_headers=_headers,
|
814
|
+
_host_index=_host_index
|
815
|
+
)
|
816
|
+
|
817
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
818
|
+
'200': "str",
|
819
|
+
'500': "Error",
|
820
|
+
}
|
821
|
+
response_data = self.api_client.call_api(
|
822
|
+
*_param,
|
823
|
+
_request_timeout=_request_timeout
|
824
|
+
)
|
825
|
+
return response_data.response
|
826
|
+
|
827
|
+
|
828
|
+
def _unbind_edge_datasource_serialize(
|
829
|
+
self,
|
830
|
+
graph_id,
|
831
|
+
type_name,
|
832
|
+
source_vertex_type,
|
833
|
+
destination_vertex_type,
|
834
|
+
_request_auth,
|
835
|
+
_content_type,
|
836
|
+
_headers,
|
837
|
+
_host_index,
|
838
|
+
) -> RequestSerialized:
|
839
|
+
|
840
|
+
_host = None
|
841
|
+
|
842
|
+
_collection_formats: Dict[str, str] = {
|
843
|
+
}
|
844
|
+
|
845
|
+
_path_params: Dict[str, str] = {}
|
846
|
+
_query_params: List[Tuple[str, str]] = []
|
847
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
848
|
+
_form_params: List[Tuple[str, str]] = []
|
849
|
+
_files: Dict[str, str] = {}
|
850
|
+
_body_params: Optional[bytes] = None
|
851
|
+
|
852
|
+
# process the path parameters
|
853
|
+
if graph_id is not None:
|
854
|
+
_path_params['graph_id'] = graph_id
|
855
|
+
if type_name is not None:
|
856
|
+
_path_params['type_name'] = type_name
|
857
|
+
# process the query parameters
|
858
|
+
if source_vertex_type is not None:
|
859
|
+
|
860
|
+
_query_params.append(('source_vertex_type', source_vertex_type))
|
861
|
+
|
862
|
+
if destination_vertex_type is not None:
|
863
|
+
|
864
|
+
_query_params.append(('destination_vertex_type', destination_vertex_type))
|
865
|
+
|
866
|
+
# process the header parameters
|
867
|
+
# process the form parameters
|
868
|
+
# process the body parameter
|
869
|
+
|
870
|
+
|
871
|
+
# set the HTTP header `Accept`
|
872
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
873
|
+
[
|
874
|
+
'application/json'
|
875
|
+
]
|
876
|
+
)
|
877
|
+
|
878
|
+
|
879
|
+
# authentication setting
|
880
|
+
_auth_settings: List[str] = [
|
881
|
+
]
|
882
|
+
|
883
|
+
return self.api_client.param_serialize(
|
884
|
+
method='DELETE',
|
885
|
+
resource_path='/api/v1/graph/{graph_id}/datasource/edge/{type_name}',
|
886
|
+
path_params=_path_params,
|
887
|
+
query_params=_query_params,
|
888
|
+
header_params=_header_params,
|
889
|
+
body=_body_params,
|
890
|
+
post_params=_form_params,
|
891
|
+
files=_files,
|
892
|
+
auth_settings=_auth_settings,
|
893
|
+
collection_formats=_collection_formats,
|
894
|
+
_host=_host,
|
895
|
+
_request_auth=_request_auth
|
896
|
+
)
|
897
|
+
|
898
|
+
|
899
|
+
|
900
|
+
|
901
|
+
@validate_call
|
902
|
+
def unbind_vertex_datasource(
|
903
|
+
self,
|
904
|
+
graph_id: StrictStr,
|
905
|
+
type_name: StrictStr,
|
906
|
+
_request_timeout: Union[
|
907
|
+
None,
|
908
|
+
Annotated[StrictFloat, Field(gt=0)],
|
909
|
+
Tuple[
|
910
|
+
Annotated[StrictFloat, Field(gt=0)],
|
911
|
+
Annotated[StrictFloat, Field(gt=0)]
|
912
|
+
]
|
913
|
+
] = None,
|
914
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
915
|
+
_content_type: Optional[StrictStr] = None,
|
916
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
917
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
918
|
+
) -> str:
|
919
|
+
"""unbind_vertex_datasource
|
920
|
+
|
921
|
+
Unbind data source on a vertex type
|
922
|
+
|
923
|
+
:param graph_id: (required)
|
924
|
+
:type graph_id: str
|
925
|
+
:param type_name: (required)
|
926
|
+
:type type_name: str
|
927
|
+
:param _request_timeout: timeout setting for this request. If one
|
928
|
+
number provided, it will be total request
|
929
|
+
timeout. It can also be a pair (tuple) of
|
930
|
+
(connection, read) timeouts.
|
931
|
+
:type _request_timeout: int, tuple(int, int), optional
|
932
|
+
:param _request_auth: set to override the auth_settings for an a single
|
933
|
+
request; this effectively ignores the
|
934
|
+
authentication in the spec for a single request.
|
935
|
+
:type _request_auth: dict, optional
|
936
|
+
:param _content_type: force content-type for the request.
|
937
|
+
:type _content_type: str, Optional
|
938
|
+
:param _headers: set to override the headers for a single
|
939
|
+
request; this effectively ignores the headers
|
940
|
+
in the spec for a single request.
|
941
|
+
:type _headers: dict, optional
|
942
|
+
:param _host_index: set to override the host_index for a single
|
943
|
+
request; this effectively ignores the host_index
|
944
|
+
in the spec for a single request.
|
945
|
+
:type _host_index: int, optional
|
946
|
+
:return: Returns the result object.
|
947
|
+
""" # noqa: E501
|
948
|
+
|
949
|
+
_param = self._unbind_vertex_datasource_serialize(
|
950
|
+
graph_id=graph_id,
|
951
|
+
type_name=type_name,
|
952
|
+
_request_auth=_request_auth,
|
953
|
+
_content_type=_content_type,
|
954
|
+
_headers=_headers,
|
955
|
+
_host_index=_host_index
|
956
|
+
)
|
957
|
+
|
958
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
959
|
+
'200': "str",
|
960
|
+
'500': "Error",
|
961
|
+
}
|
962
|
+
response_data = self.api_client.call_api(
|
963
|
+
*_param,
|
964
|
+
_request_timeout=_request_timeout
|
965
|
+
)
|
966
|
+
response_data.read()
|
967
|
+
return self.api_client.response_deserialize(
|
968
|
+
response_data=response_data,
|
969
|
+
response_types_map=_response_types_map,
|
970
|
+
).data
|
971
|
+
|
972
|
+
|
973
|
+
@validate_call
|
974
|
+
def unbind_vertex_datasource_with_http_info(
|
975
|
+
self,
|
976
|
+
graph_id: StrictStr,
|
977
|
+
type_name: StrictStr,
|
978
|
+
_request_timeout: Union[
|
979
|
+
None,
|
980
|
+
Annotated[StrictFloat, Field(gt=0)],
|
981
|
+
Tuple[
|
982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
983
|
+
Annotated[StrictFloat, Field(gt=0)]
|
984
|
+
]
|
985
|
+
] = None,
|
986
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
987
|
+
_content_type: Optional[StrictStr] = None,
|
988
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
989
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
990
|
+
) -> ApiResponse[str]:
|
991
|
+
"""unbind_vertex_datasource
|
992
|
+
|
993
|
+
Unbind data source on a vertex type
|
994
|
+
|
995
|
+
:param graph_id: (required)
|
996
|
+
:type graph_id: str
|
997
|
+
:param type_name: (required)
|
998
|
+
:type type_name: str
|
999
|
+
:param _request_timeout: timeout setting for this request. If one
|
1000
|
+
number provided, it will be total request
|
1001
|
+
timeout. It can also be a pair (tuple) of
|
1002
|
+
(connection, read) timeouts.
|
1003
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1004
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1005
|
+
request; this effectively ignores the
|
1006
|
+
authentication in the spec for a single request.
|
1007
|
+
:type _request_auth: dict, optional
|
1008
|
+
:param _content_type: force content-type for the request.
|
1009
|
+
:type _content_type: str, Optional
|
1010
|
+
:param _headers: set to override the headers for a single
|
1011
|
+
request; this effectively ignores the headers
|
1012
|
+
in the spec for a single request.
|
1013
|
+
:type _headers: dict, optional
|
1014
|
+
:param _host_index: set to override the host_index for a single
|
1015
|
+
request; this effectively ignores the host_index
|
1016
|
+
in the spec for a single request.
|
1017
|
+
:type _host_index: int, optional
|
1018
|
+
:return: Returns the result object.
|
1019
|
+
""" # noqa: E501
|
1020
|
+
|
1021
|
+
_param = self._unbind_vertex_datasource_serialize(
|
1022
|
+
graph_id=graph_id,
|
1023
|
+
type_name=type_name,
|
1024
|
+
_request_auth=_request_auth,
|
1025
|
+
_content_type=_content_type,
|
1026
|
+
_headers=_headers,
|
1027
|
+
_host_index=_host_index
|
1028
|
+
)
|
1029
|
+
|
1030
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1031
|
+
'200': "str",
|
1032
|
+
'500': "Error",
|
1033
|
+
}
|
1034
|
+
response_data = self.api_client.call_api(
|
1035
|
+
*_param,
|
1036
|
+
_request_timeout=_request_timeout
|
1037
|
+
)
|
1038
|
+
response_data.read()
|
1039
|
+
return self.api_client.response_deserialize(
|
1040
|
+
response_data=response_data,
|
1041
|
+
response_types_map=_response_types_map,
|
1042
|
+
)
|
1043
|
+
|
1044
|
+
|
1045
|
+
@validate_call
|
1046
|
+
def unbind_vertex_datasource_without_preload_content(
|
1047
|
+
self,
|
1048
|
+
graph_id: StrictStr,
|
1049
|
+
type_name: StrictStr,
|
1050
|
+
_request_timeout: Union[
|
1051
|
+
None,
|
1052
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1053
|
+
Tuple[
|
1054
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1055
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1056
|
+
]
|
1057
|
+
] = None,
|
1058
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1059
|
+
_content_type: Optional[StrictStr] = None,
|
1060
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1061
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1062
|
+
) -> RESTResponseType:
|
1063
|
+
"""unbind_vertex_datasource
|
1064
|
+
|
1065
|
+
Unbind data source on a vertex type
|
1066
|
+
|
1067
|
+
:param graph_id: (required)
|
1068
|
+
:type graph_id: str
|
1069
|
+
:param type_name: (required)
|
1070
|
+
:type type_name: str
|
1071
|
+
:param _request_timeout: timeout setting for this request. If one
|
1072
|
+
number provided, it will be total request
|
1073
|
+
timeout. It can also be a pair (tuple) of
|
1074
|
+
(connection, read) timeouts.
|
1075
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1076
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1077
|
+
request; this effectively ignores the
|
1078
|
+
authentication in the spec for a single request.
|
1079
|
+
:type _request_auth: dict, optional
|
1080
|
+
:param _content_type: force content-type for the request.
|
1081
|
+
:type _content_type: str, Optional
|
1082
|
+
:param _headers: set to override the headers for a single
|
1083
|
+
request; this effectively ignores the headers
|
1084
|
+
in the spec for a single request.
|
1085
|
+
:type _headers: dict, optional
|
1086
|
+
:param _host_index: set to override the host_index for a single
|
1087
|
+
request; this effectively ignores the host_index
|
1088
|
+
in the spec for a single request.
|
1089
|
+
:type _host_index: int, optional
|
1090
|
+
:return: Returns the result object.
|
1091
|
+
""" # noqa: E501
|
1092
|
+
|
1093
|
+
_param = self._unbind_vertex_datasource_serialize(
|
1094
|
+
graph_id=graph_id,
|
1095
|
+
type_name=type_name,
|
1096
|
+
_request_auth=_request_auth,
|
1097
|
+
_content_type=_content_type,
|
1098
|
+
_headers=_headers,
|
1099
|
+
_host_index=_host_index
|
1100
|
+
)
|
1101
|
+
|
1102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1103
|
+
'200': "str",
|
1104
|
+
'500': "Error",
|
1105
|
+
}
|
1106
|
+
response_data = self.api_client.call_api(
|
1107
|
+
*_param,
|
1108
|
+
_request_timeout=_request_timeout
|
1109
|
+
)
|
1110
|
+
return response_data.response
|
1111
|
+
|
1112
|
+
|
1113
|
+
def _unbind_vertex_datasource_serialize(
|
1114
|
+
self,
|
1115
|
+
graph_id,
|
1116
|
+
type_name,
|
1117
|
+
_request_auth,
|
1118
|
+
_content_type,
|
1119
|
+
_headers,
|
1120
|
+
_host_index,
|
1121
|
+
) -> RequestSerialized:
|
1122
|
+
|
1123
|
+
_host = None
|
1124
|
+
|
1125
|
+
_collection_formats: Dict[str, str] = {
|
1126
|
+
}
|
1127
|
+
|
1128
|
+
_path_params: Dict[str, str] = {}
|
1129
|
+
_query_params: List[Tuple[str, str]] = []
|
1130
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1131
|
+
_form_params: List[Tuple[str, str]] = []
|
1132
|
+
_files: Dict[str, str] = {}
|
1133
|
+
_body_params: Optional[bytes] = None
|
1134
|
+
|
1135
|
+
# process the path parameters
|
1136
|
+
if graph_id is not None:
|
1137
|
+
_path_params['graph_id'] = graph_id
|
1138
|
+
if type_name is not None:
|
1139
|
+
_path_params['type_name'] = type_name
|
1140
|
+
# process the query parameters
|
1141
|
+
# process the header parameters
|
1142
|
+
# process the form parameters
|
1143
|
+
# process the body parameter
|
1144
|
+
|
1145
|
+
|
1146
|
+
# set the HTTP header `Accept`
|
1147
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1148
|
+
[
|
1149
|
+
'application/json'
|
1150
|
+
]
|
1151
|
+
)
|
1152
|
+
|
1153
|
+
|
1154
|
+
# authentication setting
|
1155
|
+
_auth_settings: List[str] = [
|
1156
|
+
]
|
1157
|
+
|
1158
|
+
return self.api_client.param_serialize(
|
1159
|
+
method='DELETE',
|
1160
|
+
resource_path='/api/v1/graph/{graph_id}/datasource/vertex/{type_name}',
|
1161
|
+
path_params=_path_params,
|
1162
|
+
query_params=_query_params,
|
1163
|
+
header_params=_header_params,
|
1164
|
+
body=_body_params,
|
1165
|
+
post_params=_form_params,
|
1166
|
+
files=_files,
|
1167
|
+
auth_settings=_auth_settings,
|
1168
|
+
collection_formats=_collection_formats,
|
1169
|
+
_host=_host,
|
1170
|
+
_request_auth=_request_auth
|
1171
|
+
)
|
1172
|
+
|
1173
|
+
|