gsctl 0.29.0a20250114__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- graphscope/flex/rest/__init__.py +106 -0
- graphscope/flex/rest/api/__init__.py +12 -0
- graphscope/flex/rest/api/alert_api.py +2790 -0
- graphscope/flex/rest/api/data_source_api.py +1177 -0
- graphscope/flex/rest/api/deployment_api.py +1323 -0
- graphscope/flex/rest/api/graph_api.py +2813 -0
- graphscope/flex/rest/api/job_api.py +1408 -0
- graphscope/flex/rest/api/service_api.py +1316 -0
- graphscope/flex/rest/api/stored_procedure_api.py +1454 -0
- graphscope/flex/rest/api/utils_api.py +310 -0
- graphscope/flex/rest/api_client.py +789 -0
- graphscope/flex/rest/api_response.py +21 -0
- graphscope/flex/rest/configuration.py +451 -0
- graphscope/flex/rest/exceptions.py +200 -0
- graphscope/flex/rest/models/__init__.py +82 -0
- graphscope/flex/rest/models/base_edge_type.py +102 -0
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +108 -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 +105 -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/dataloading_mr_job_config.py +88 -0
- graphscope/flex/rest/models/date_type.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 +139 -0
- graphscope/flex/rest/models/get_graph_schema_response.py +106 -0
- graphscope/flex/rest/models/get_pod_log_response.py +88 -0
- graphscope/flex/rest/models/get_property_meta.py +107 -0
- graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
- graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
- graphscope/flex/rest/models/get_stored_proc_response.py +130 -0
- graphscope/flex/rest/models/get_vertex_type.py +110 -0
- graphscope/flex/rest/models/gs_data_type.py +152 -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 +96 -0
- graphscope/flex/rest/models/pod_status.py +108 -0
- graphscope/flex/rest/models/primitive_type.py +95 -0
- graphscope/flex/rest/models/resource_usage.py +92 -0
- graphscope/flex/rest/models/running_deployment_info.py +128 -0
- graphscope/flex/rest/models/running_deployment_status.py +124 -0
- graphscope/flex/rest/models/schema_mapping.py +106 -0
- graphscope/flex/rest/models/service_status.py +112 -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 +126 -0
- graphscope/flex/rest/models/string_type.py +92 -0
- graphscope/flex/rest/models/string_type_string.py +124 -0
- graphscope/flex/rest/models/temporal_type.py +92 -0
- graphscope/flex/rest/models/temporal_type_temporal.py +138 -0
- graphscope/flex/rest/models/time_stamp_type.py +88 -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 +90 -0
- graphscope/flex/rest/models/vertex_mapping.py +100 -0
- graphscope/flex/rest/py.typed +0 -0
- graphscope/flex/rest/rest.py +258 -0
- graphscope/gsctl/V6D_VERSION +1 -0
- graphscope/gsctl/VERSION +1 -0
- graphscope/gsctl/__init__.py +22 -0
- graphscope/gsctl/commands/__init__.py +148 -0
- graphscope/gsctl/commands/common.py +200 -0
- graphscope/gsctl/commands/dev.py +448 -0
- graphscope/gsctl/commands/insight/__init__.py +17 -0
- graphscope/gsctl/commands/insight/glob.py +234 -0
- graphscope/gsctl/commands/insight/graph.py +205 -0
- graphscope/gsctl/commands/interactive/__init__.py +17 -0
- graphscope/gsctl/commands/interactive/glob.py +280 -0
- graphscope/gsctl/commands/interactive/graph.py +259 -0
- graphscope/gsctl/config.py +221 -0
- graphscope/gsctl/gsctl.py +51 -0
- graphscope/gsctl/impl/__init__.py +64 -0
- graphscope/gsctl/impl/alert.py +135 -0
- graphscope/gsctl/impl/common.py +53 -0
- graphscope/gsctl/impl/datasource.py +80 -0
- graphscope/gsctl/impl/deployment.py +62 -0
- graphscope/gsctl/impl/graph.py +150 -0
- graphscope/gsctl/impl/job.py +63 -0
- graphscope/gsctl/impl/service.py +62 -0
- graphscope/gsctl/impl/stored_procedure.py +92 -0
- graphscope/gsctl/impl/utils.py +38 -0
- graphscope/gsctl/scripts/install_deps.sh +969 -0
- graphscope/gsctl/tests/__init__.py +17 -0
- graphscope/gsctl/tests/test_graphscope_insight.py +401 -0
- graphscope/gsctl/tests/test_interactive.py +516 -0
- graphscope/gsctl/utils.py +337 -0
- graphscope/gsctl/version.py +31 -0
- gsctl-0.29.0a20250114.dist-info/METADATA +20 -0
- gsctl-0.29.0a20250114.dist-info/RECORD +117 -0
- gsctl-0.29.0a20250114.dist-info/WHEEL +6 -0
- gsctl-0.29.0a20250114.dist-info/entry_points.txt +3 -0
- gsctl-0.29.0a20250114.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1177 @@
|
|
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/).
|
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, Union[str, bytes]] = {}
|
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
|
+
if 'Accept' not in _header_params:
|
291
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
292
|
+
[
|
293
|
+
'application/json'
|
294
|
+
]
|
295
|
+
)
|
296
|
+
|
297
|
+
# set the HTTP header `Content-Type`
|
298
|
+
if _content_type:
|
299
|
+
_header_params['Content-Type'] = _content_type
|
300
|
+
else:
|
301
|
+
_default_content_type = (
|
302
|
+
self.api_client.select_header_content_type(
|
303
|
+
[
|
304
|
+
'application/json'
|
305
|
+
]
|
306
|
+
)
|
307
|
+
)
|
308
|
+
if _default_content_type is not None:
|
309
|
+
_header_params['Content-Type'] = _default_content_type
|
310
|
+
|
311
|
+
# authentication setting
|
312
|
+
_auth_settings: List[str] = [
|
313
|
+
]
|
314
|
+
|
315
|
+
return self.api_client.param_serialize(
|
316
|
+
method='POST',
|
317
|
+
resource_path='/api/v1/graph/{graph_id}/datasource',
|
318
|
+
path_params=_path_params,
|
319
|
+
query_params=_query_params,
|
320
|
+
header_params=_header_params,
|
321
|
+
body=_body_params,
|
322
|
+
post_params=_form_params,
|
323
|
+
files=_files,
|
324
|
+
auth_settings=_auth_settings,
|
325
|
+
collection_formats=_collection_formats,
|
326
|
+
_host=_host,
|
327
|
+
_request_auth=_request_auth
|
328
|
+
)
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
@validate_call
|
334
|
+
def get_datasource_by_id(
|
335
|
+
self,
|
336
|
+
graph_id: StrictStr,
|
337
|
+
_request_timeout: Union[
|
338
|
+
None,
|
339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
340
|
+
Tuple[
|
341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
342
|
+
Annotated[StrictFloat, Field(gt=0)]
|
343
|
+
]
|
344
|
+
] = None,
|
345
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
346
|
+
_content_type: Optional[StrictStr] = None,
|
347
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
348
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
349
|
+
) -> SchemaMapping:
|
350
|
+
"""get_datasource_by_id
|
351
|
+
|
352
|
+
Get data source by ID
|
353
|
+
|
354
|
+
:param graph_id: (required)
|
355
|
+
:type graph_id: str
|
356
|
+
:param _request_timeout: timeout setting for this request. If one
|
357
|
+
number provided, it will be total request
|
358
|
+
timeout. It can also be a pair (tuple) of
|
359
|
+
(connection, read) timeouts.
|
360
|
+
:type _request_timeout: int, tuple(int, int), optional
|
361
|
+
:param _request_auth: set to override the auth_settings for an a single
|
362
|
+
request; this effectively ignores the
|
363
|
+
authentication in the spec for a single request.
|
364
|
+
:type _request_auth: dict, optional
|
365
|
+
:param _content_type: force content-type for the request.
|
366
|
+
:type _content_type: str, Optional
|
367
|
+
:param _headers: set to override the headers for a single
|
368
|
+
request; this effectively ignores the headers
|
369
|
+
in the spec for a single request.
|
370
|
+
:type _headers: dict, optional
|
371
|
+
:param _host_index: set to override the host_index for a single
|
372
|
+
request; this effectively ignores the host_index
|
373
|
+
in the spec for a single request.
|
374
|
+
:type _host_index: int, optional
|
375
|
+
:return: Returns the result object.
|
376
|
+
""" # noqa: E501
|
377
|
+
|
378
|
+
_param = self._get_datasource_by_id_serialize(
|
379
|
+
graph_id=graph_id,
|
380
|
+
_request_auth=_request_auth,
|
381
|
+
_content_type=_content_type,
|
382
|
+
_headers=_headers,
|
383
|
+
_host_index=_host_index
|
384
|
+
)
|
385
|
+
|
386
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
387
|
+
'200': "SchemaMapping",
|
388
|
+
'500': "Error",
|
389
|
+
}
|
390
|
+
response_data = self.api_client.call_api(
|
391
|
+
*_param,
|
392
|
+
_request_timeout=_request_timeout
|
393
|
+
)
|
394
|
+
response_data.read()
|
395
|
+
return self.api_client.response_deserialize(
|
396
|
+
response_data=response_data,
|
397
|
+
response_types_map=_response_types_map,
|
398
|
+
).data
|
399
|
+
|
400
|
+
|
401
|
+
@validate_call
|
402
|
+
def get_datasource_by_id_with_http_info(
|
403
|
+
self,
|
404
|
+
graph_id: StrictStr,
|
405
|
+
_request_timeout: Union[
|
406
|
+
None,
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
408
|
+
Tuple[
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
410
|
+
Annotated[StrictFloat, Field(gt=0)]
|
411
|
+
]
|
412
|
+
] = None,
|
413
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
414
|
+
_content_type: Optional[StrictStr] = None,
|
415
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
416
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
417
|
+
) -> ApiResponse[SchemaMapping]:
|
418
|
+
"""get_datasource_by_id
|
419
|
+
|
420
|
+
Get data source by ID
|
421
|
+
|
422
|
+
:param graph_id: (required)
|
423
|
+
:type graph_id: str
|
424
|
+
:param _request_timeout: timeout setting for this request. If one
|
425
|
+
number provided, it will be total request
|
426
|
+
timeout. It can also be a pair (tuple) of
|
427
|
+
(connection, read) timeouts.
|
428
|
+
:type _request_timeout: int, tuple(int, int), optional
|
429
|
+
:param _request_auth: set to override the auth_settings for an a single
|
430
|
+
request; this effectively ignores the
|
431
|
+
authentication in the spec for a single request.
|
432
|
+
:type _request_auth: dict, optional
|
433
|
+
:param _content_type: force content-type for the request.
|
434
|
+
:type _content_type: str, Optional
|
435
|
+
:param _headers: set to override the headers for a single
|
436
|
+
request; this effectively ignores the headers
|
437
|
+
in the spec for a single request.
|
438
|
+
:type _headers: dict, optional
|
439
|
+
:param _host_index: set to override the host_index for a single
|
440
|
+
request; this effectively ignores the host_index
|
441
|
+
in the spec for a single request.
|
442
|
+
:type _host_index: int, optional
|
443
|
+
:return: Returns the result object.
|
444
|
+
""" # noqa: E501
|
445
|
+
|
446
|
+
_param = self._get_datasource_by_id_serialize(
|
447
|
+
graph_id=graph_id,
|
448
|
+
_request_auth=_request_auth,
|
449
|
+
_content_type=_content_type,
|
450
|
+
_headers=_headers,
|
451
|
+
_host_index=_host_index
|
452
|
+
)
|
453
|
+
|
454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
455
|
+
'200': "SchemaMapping",
|
456
|
+
'500': "Error",
|
457
|
+
}
|
458
|
+
response_data = self.api_client.call_api(
|
459
|
+
*_param,
|
460
|
+
_request_timeout=_request_timeout
|
461
|
+
)
|
462
|
+
response_data.read()
|
463
|
+
return self.api_client.response_deserialize(
|
464
|
+
response_data=response_data,
|
465
|
+
response_types_map=_response_types_map,
|
466
|
+
)
|
467
|
+
|
468
|
+
|
469
|
+
@validate_call
|
470
|
+
def get_datasource_by_id_without_preload_content(
|
471
|
+
self,
|
472
|
+
graph_id: StrictStr,
|
473
|
+
_request_timeout: Union[
|
474
|
+
None,
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
476
|
+
Tuple[
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
478
|
+
Annotated[StrictFloat, Field(gt=0)]
|
479
|
+
]
|
480
|
+
] = None,
|
481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
482
|
+
_content_type: Optional[StrictStr] = None,
|
483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
485
|
+
) -> RESTResponseType:
|
486
|
+
"""get_datasource_by_id
|
487
|
+
|
488
|
+
Get data source by ID
|
489
|
+
|
490
|
+
:param graph_id: (required)
|
491
|
+
:type graph_id: str
|
492
|
+
:param _request_timeout: timeout setting for this request. If one
|
493
|
+
number provided, it will be total request
|
494
|
+
timeout. It can also be a pair (tuple) of
|
495
|
+
(connection, read) timeouts.
|
496
|
+
:type _request_timeout: int, tuple(int, int), optional
|
497
|
+
:param _request_auth: set to override the auth_settings for an a single
|
498
|
+
request; this effectively ignores the
|
499
|
+
authentication in the spec for a single request.
|
500
|
+
:type _request_auth: dict, optional
|
501
|
+
:param _content_type: force content-type for the request.
|
502
|
+
:type _content_type: str, Optional
|
503
|
+
:param _headers: set to override the headers for a single
|
504
|
+
request; this effectively ignores the headers
|
505
|
+
in the spec for a single request.
|
506
|
+
:type _headers: dict, optional
|
507
|
+
:param _host_index: set to override the host_index for a single
|
508
|
+
request; this effectively ignores the host_index
|
509
|
+
in the spec for a single request.
|
510
|
+
:type _host_index: int, optional
|
511
|
+
:return: Returns the result object.
|
512
|
+
""" # noqa: E501
|
513
|
+
|
514
|
+
_param = self._get_datasource_by_id_serialize(
|
515
|
+
graph_id=graph_id,
|
516
|
+
_request_auth=_request_auth,
|
517
|
+
_content_type=_content_type,
|
518
|
+
_headers=_headers,
|
519
|
+
_host_index=_host_index
|
520
|
+
)
|
521
|
+
|
522
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
523
|
+
'200': "SchemaMapping",
|
524
|
+
'500': "Error",
|
525
|
+
}
|
526
|
+
response_data = self.api_client.call_api(
|
527
|
+
*_param,
|
528
|
+
_request_timeout=_request_timeout
|
529
|
+
)
|
530
|
+
return response_data.response
|
531
|
+
|
532
|
+
|
533
|
+
def _get_datasource_by_id_serialize(
|
534
|
+
self,
|
535
|
+
graph_id,
|
536
|
+
_request_auth,
|
537
|
+
_content_type,
|
538
|
+
_headers,
|
539
|
+
_host_index,
|
540
|
+
) -> RequestSerialized:
|
541
|
+
|
542
|
+
_host = None
|
543
|
+
|
544
|
+
_collection_formats: Dict[str, str] = {
|
545
|
+
}
|
546
|
+
|
547
|
+
_path_params: Dict[str, str] = {}
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
551
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
552
|
+
_body_params: Optional[bytes] = None
|
553
|
+
|
554
|
+
# process the path parameters
|
555
|
+
if graph_id is not None:
|
556
|
+
_path_params['graph_id'] = graph_id
|
557
|
+
# process the query parameters
|
558
|
+
# process the header parameters
|
559
|
+
# process the form parameters
|
560
|
+
# process the body parameter
|
561
|
+
|
562
|
+
|
563
|
+
# set the HTTP header `Accept`
|
564
|
+
if 'Accept' not in _header_params:
|
565
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
566
|
+
[
|
567
|
+
'application/json'
|
568
|
+
]
|
569
|
+
)
|
570
|
+
|
571
|
+
|
572
|
+
# authentication setting
|
573
|
+
_auth_settings: List[str] = [
|
574
|
+
]
|
575
|
+
|
576
|
+
return self.api_client.param_serialize(
|
577
|
+
method='GET',
|
578
|
+
resource_path='/api/v1/graph/{graph_id}/datasource',
|
579
|
+
path_params=_path_params,
|
580
|
+
query_params=_query_params,
|
581
|
+
header_params=_header_params,
|
582
|
+
body=_body_params,
|
583
|
+
post_params=_form_params,
|
584
|
+
files=_files,
|
585
|
+
auth_settings=_auth_settings,
|
586
|
+
collection_formats=_collection_formats,
|
587
|
+
_host=_host,
|
588
|
+
_request_auth=_request_auth
|
589
|
+
)
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
@validate_call
|
595
|
+
def unbind_edge_datasource(
|
596
|
+
self,
|
597
|
+
graph_id: StrictStr,
|
598
|
+
type_name: StrictStr,
|
599
|
+
source_vertex_type: StrictStr,
|
600
|
+
destination_vertex_type: StrictStr,
|
601
|
+
_request_timeout: Union[
|
602
|
+
None,
|
603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
604
|
+
Tuple[
|
605
|
+
Annotated[StrictFloat, Field(gt=0)],
|
606
|
+
Annotated[StrictFloat, Field(gt=0)]
|
607
|
+
]
|
608
|
+
] = None,
|
609
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
610
|
+
_content_type: Optional[StrictStr] = None,
|
611
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
612
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
613
|
+
) -> str:
|
614
|
+
"""unbind_edge_datasource
|
615
|
+
|
616
|
+
Unbind datas ource on an edge type
|
617
|
+
|
618
|
+
:param graph_id: (required)
|
619
|
+
:type graph_id: str
|
620
|
+
:param type_name: (required)
|
621
|
+
:type type_name: str
|
622
|
+
:param source_vertex_type: (required)
|
623
|
+
:type source_vertex_type: str
|
624
|
+
:param destination_vertex_type: (required)
|
625
|
+
:type destination_vertex_type: str
|
626
|
+
:param _request_timeout: timeout setting for this request. If one
|
627
|
+
number provided, it will be total request
|
628
|
+
timeout. It can also be a pair (tuple) of
|
629
|
+
(connection, read) timeouts.
|
630
|
+
:type _request_timeout: int, tuple(int, int), optional
|
631
|
+
:param _request_auth: set to override the auth_settings for an a single
|
632
|
+
request; this effectively ignores the
|
633
|
+
authentication in the spec for a single request.
|
634
|
+
:type _request_auth: dict, optional
|
635
|
+
:param _content_type: force content-type for the request.
|
636
|
+
:type _content_type: str, Optional
|
637
|
+
:param _headers: set to override the headers for a single
|
638
|
+
request; this effectively ignores the headers
|
639
|
+
in the spec for a single request.
|
640
|
+
:type _headers: dict, optional
|
641
|
+
:param _host_index: set to override the host_index for a single
|
642
|
+
request; this effectively ignores the host_index
|
643
|
+
in the spec for a single request.
|
644
|
+
:type _host_index: int, optional
|
645
|
+
:return: Returns the result object.
|
646
|
+
""" # noqa: E501
|
647
|
+
|
648
|
+
_param = self._unbind_edge_datasource_serialize(
|
649
|
+
graph_id=graph_id,
|
650
|
+
type_name=type_name,
|
651
|
+
source_vertex_type=source_vertex_type,
|
652
|
+
destination_vertex_type=destination_vertex_type,
|
653
|
+
_request_auth=_request_auth,
|
654
|
+
_content_type=_content_type,
|
655
|
+
_headers=_headers,
|
656
|
+
_host_index=_host_index
|
657
|
+
)
|
658
|
+
|
659
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
660
|
+
'200': "str",
|
661
|
+
'500': "Error",
|
662
|
+
}
|
663
|
+
response_data = self.api_client.call_api(
|
664
|
+
*_param,
|
665
|
+
_request_timeout=_request_timeout
|
666
|
+
)
|
667
|
+
response_data.read()
|
668
|
+
return self.api_client.response_deserialize(
|
669
|
+
response_data=response_data,
|
670
|
+
response_types_map=_response_types_map,
|
671
|
+
).data
|
672
|
+
|
673
|
+
|
674
|
+
@validate_call
|
675
|
+
def unbind_edge_datasource_with_http_info(
|
676
|
+
self,
|
677
|
+
graph_id: StrictStr,
|
678
|
+
type_name: StrictStr,
|
679
|
+
source_vertex_type: StrictStr,
|
680
|
+
destination_vertex_type: StrictStr,
|
681
|
+
_request_timeout: Union[
|
682
|
+
None,
|
683
|
+
Annotated[StrictFloat, Field(gt=0)],
|
684
|
+
Tuple[
|
685
|
+
Annotated[StrictFloat, Field(gt=0)],
|
686
|
+
Annotated[StrictFloat, Field(gt=0)]
|
687
|
+
]
|
688
|
+
] = None,
|
689
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
690
|
+
_content_type: Optional[StrictStr] = None,
|
691
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
692
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
693
|
+
) -> ApiResponse[str]:
|
694
|
+
"""unbind_edge_datasource
|
695
|
+
|
696
|
+
Unbind datas ource on an edge type
|
697
|
+
|
698
|
+
:param graph_id: (required)
|
699
|
+
:type graph_id: str
|
700
|
+
:param type_name: (required)
|
701
|
+
:type type_name: str
|
702
|
+
:param source_vertex_type: (required)
|
703
|
+
:type source_vertex_type: str
|
704
|
+
:param destination_vertex_type: (required)
|
705
|
+
:type destination_vertex_type: str
|
706
|
+
:param _request_timeout: timeout setting for this request. If one
|
707
|
+
number provided, it will be total request
|
708
|
+
timeout. It can also be a pair (tuple) of
|
709
|
+
(connection, read) timeouts.
|
710
|
+
:type _request_timeout: int, tuple(int, int), optional
|
711
|
+
:param _request_auth: set to override the auth_settings for an a single
|
712
|
+
request; this effectively ignores the
|
713
|
+
authentication in the spec for a single request.
|
714
|
+
:type _request_auth: dict, optional
|
715
|
+
:param _content_type: force content-type for the request.
|
716
|
+
:type _content_type: str, Optional
|
717
|
+
:param _headers: set to override the headers for a single
|
718
|
+
request; this effectively ignores the headers
|
719
|
+
in the spec for a single request.
|
720
|
+
:type _headers: dict, optional
|
721
|
+
:param _host_index: set to override the host_index for a single
|
722
|
+
request; this effectively ignores the host_index
|
723
|
+
in the spec for a single request.
|
724
|
+
:type _host_index: int, optional
|
725
|
+
:return: Returns the result object.
|
726
|
+
""" # noqa: E501
|
727
|
+
|
728
|
+
_param = self._unbind_edge_datasource_serialize(
|
729
|
+
graph_id=graph_id,
|
730
|
+
type_name=type_name,
|
731
|
+
source_vertex_type=source_vertex_type,
|
732
|
+
destination_vertex_type=destination_vertex_type,
|
733
|
+
_request_auth=_request_auth,
|
734
|
+
_content_type=_content_type,
|
735
|
+
_headers=_headers,
|
736
|
+
_host_index=_host_index
|
737
|
+
)
|
738
|
+
|
739
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
740
|
+
'200': "str",
|
741
|
+
'500': "Error",
|
742
|
+
}
|
743
|
+
response_data = self.api_client.call_api(
|
744
|
+
*_param,
|
745
|
+
_request_timeout=_request_timeout
|
746
|
+
)
|
747
|
+
response_data.read()
|
748
|
+
return self.api_client.response_deserialize(
|
749
|
+
response_data=response_data,
|
750
|
+
response_types_map=_response_types_map,
|
751
|
+
)
|
752
|
+
|
753
|
+
|
754
|
+
@validate_call
|
755
|
+
def unbind_edge_datasource_without_preload_content(
|
756
|
+
self,
|
757
|
+
graph_id: StrictStr,
|
758
|
+
type_name: StrictStr,
|
759
|
+
source_vertex_type: StrictStr,
|
760
|
+
destination_vertex_type: StrictStr,
|
761
|
+
_request_timeout: Union[
|
762
|
+
None,
|
763
|
+
Annotated[StrictFloat, Field(gt=0)],
|
764
|
+
Tuple[
|
765
|
+
Annotated[StrictFloat, Field(gt=0)],
|
766
|
+
Annotated[StrictFloat, Field(gt=0)]
|
767
|
+
]
|
768
|
+
] = None,
|
769
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
770
|
+
_content_type: Optional[StrictStr] = None,
|
771
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
772
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
773
|
+
) -> RESTResponseType:
|
774
|
+
"""unbind_edge_datasource
|
775
|
+
|
776
|
+
Unbind datas ource on an edge type
|
777
|
+
|
778
|
+
:param graph_id: (required)
|
779
|
+
:type graph_id: str
|
780
|
+
:param type_name: (required)
|
781
|
+
:type type_name: str
|
782
|
+
:param source_vertex_type: (required)
|
783
|
+
:type source_vertex_type: str
|
784
|
+
:param destination_vertex_type: (required)
|
785
|
+
:type destination_vertex_type: str
|
786
|
+
:param _request_timeout: timeout setting for this request. If one
|
787
|
+
number provided, it will be total request
|
788
|
+
timeout. It can also be a pair (tuple) of
|
789
|
+
(connection, read) timeouts.
|
790
|
+
:type _request_timeout: int, tuple(int, int), optional
|
791
|
+
:param _request_auth: set to override the auth_settings for an a single
|
792
|
+
request; this effectively ignores the
|
793
|
+
authentication in the spec for a single request.
|
794
|
+
:type _request_auth: dict, optional
|
795
|
+
:param _content_type: force content-type for the request.
|
796
|
+
:type _content_type: str, Optional
|
797
|
+
:param _headers: set to override the headers for a single
|
798
|
+
request; this effectively ignores the headers
|
799
|
+
in the spec for a single request.
|
800
|
+
:type _headers: dict, optional
|
801
|
+
:param _host_index: set to override the host_index for a single
|
802
|
+
request; this effectively ignores the host_index
|
803
|
+
in the spec for a single request.
|
804
|
+
:type _host_index: int, optional
|
805
|
+
:return: Returns the result object.
|
806
|
+
""" # noqa: E501
|
807
|
+
|
808
|
+
_param = self._unbind_edge_datasource_serialize(
|
809
|
+
graph_id=graph_id,
|
810
|
+
type_name=type_name,
|
811
|
+
source_vertex_type=source_vertex_type,
|
812
|
+
destination_vertex_type=destination_vertex_type,
|
813
|
+
_request_auth=_request_auth,
|
814
|
+
_content_type=_content_type,
|
815
|
+
_headers=_headers,
|
816
|
+
_host_index=_host_index
|
817
|
+
)
|
818
|
+
|
819
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
820
|
+
'200': "str",
|
821
|
+
'500': "Error",
|
822
|
+
}
|
823
|
+
response_data = self.api_client.call_api(
|
824
|
+
*_param,
|
825
|
+
_request_timeout=_request_timeout
|
826
|
+
)
|
827
|
+
return response_data.response
|
828
|
+
|
829
|
+
|
830
|
+
def _unbind_edge_datasource_serialize(
|
831
|
+
self,
|
832
|
+
graph_id,
|
833
|
+
type_name,
|
834
|
+
source_vertex_type,
|
835
|
+
destination_vertex_type,
|
836
|
+
_request_auth,
|
837
|
+
_content_type,
|
838
|
+
_headers,
|
839
|
+
_host_index,
|
840
|
+
) -> RequestSerialized:
|
841
|
+
|
842
|
+
_host = None
|
843
|
+
|
844
|
+
_collection_formats: Dict[str, str] = {
|
845
|
+
}
|
846
|
+
|
847
|
+
_path_params: Dict[str, str] = {}
|
848
|
+
_query_params: List[Tuple[str, str]] = []
|
849
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
850
|
+
_form_params: List[Tuple[str, str]] = []
|
851
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
852
|
+
_body_params: Optional[bytes] = None
|
853
|
+
|
854
|
+
# process the path parameters
|
855
|
+
if graph_id is not None:
|
856
|
+
_path_params['graph_id'] = graph_id
|
857
|
+
if type_name is not None:
|
858
|
+
_path_params['type_name'] = type_name
|
859
|
+
# process the query parameters
|
860
|
+
if source_vertex_type is not None:
|
861
|
+
|
862
|
+
_query_params.append(('source_vertex_type', source_vertex_type))
|
863
|
+
|
864
|
+
if destination_vertex_type is not None:
|
865
|
+
|
866
|
+
_query_params.append(('destination_vertex_type', destination_vertex_type))
|
867
|
+
|
868
|
+
# process the header parameters
|
869
|
+
# process the form parameters
|
870
|
+
# process the body parameter
|
871
|
+
|
872
|
+
|
873
|
+
# set the HTTP header `Accept`
|
874
|
+
if 'Accept' not in _header_params:
|
875
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
876
|
+
[
|
877
|
+
'application/json'
|
878
|
+
]
|
879
|
+
)
|
880
|
+
|
881
|
+
|
882
|
+
# authentication setting
|
883
|
+
_auth_settings: List[str] = [
|
884
|
+
]
|
885
|
+
|
886
|
+
return self.api_client.param_serialize(
|
887
|
+
method='DELETE',
|
888
|
+
resource_path='/api/v1/graph/{graph_id}/datasource/edge/{type_name}',
|
889
|
+
path_params=_path_params,
|
890
|
+
query_params=_query_params,
|
891
|
+
header_params=_header_params,
|
892
|
+
body=_body_params,
|
893
|
+
post_params=_form_params,
|
894
|
+
files=_files,
|
895
|
+
auth_settings=_auth_settings,
|
896
|
+
collection_formats=_collection_formats,
|
897
|
+
_host=_host,
|
898
|
+
_request_auth=_request_auth
|
899
|
+
)
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
|
904
|
+
@validate_call
|
905
|
+
def unbind_vertex_datasource(
|
906
|
+
self,
|
907
|
+
graph_id: StrictStr,
|
908
|
+
type_name: StrictStr,
|
909
|
+
_request_timeout: Union[
|
910
|
+
None,
|
911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
912
|
+
Tuple[
|
913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
914
|
+
Annotated[StrictFloat, Field(gt=0)]
|
915
|
+
]
|
916
|
+
] = None,
|
917
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
918
|
+
_content_type: Optional[StrictStr] = None,
|
919
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
920
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
921
|
+
) -> str:
|
922
|
+
"""unbind_vertex_datasource
|
923
|
+
|
924
|
+
Unbind data source on a vertex type
|
925
|
+
|
926
|
+
:param graph_id: (required)
|
927
|
+
:type graph_id: str
|
928
|
+
:param type_name: (required)
|
929
|
+
:type type_name: str
|
930
|
+
:param _request_timeout: timeout setting for this request. If one
|
931
|
+
number provided, it will be total request
|
932
|
+
timeout. It can also be a pair (tuple) of
|
933
|
+
(connection, read) timeouts.
|
934
|
+
:type _request_timeout: int, tuple(int, int), optional
|
935
|
+
:param _request_auth: set to override the auth_settings for an a single
|
936
|
+
request; this effectively ignores the
|
937
|
+
authentication in the spec for a single request.
|
938
|
+
:type _request_auth: dict, optional
|
939
|
+
:param _content_type: force content-type for the request.
|
940
|
+
:type _content_type: str, Optional
|
941
|
+
:param _headers: set to override the headers for a single
|
942
|
+
request; this effectively ignores the headers
|
943
|
+
in the spec for a single request.
|
944
|
+
:type _headers: dict, optional
|
945
|
+
:param _host_index: set to override the host_index for a single
|
946
|
+
request; this effectively ignores the host_index
|
947
|
+
in the spec for a single request.
|
948
|
+
:type _host_index: int, optional
|
949
|
+
:return: Returns the result object.
|
950
|
+
""" # noqa: E501
|
951
|
+
|
952
|
+
_param = self._unbind_vertex_datasource_serialize(
|
953
|
+
graph_id=graph_id,
|
954
|
+
type_name=type_name,
|
955
|
+
_request_auth=_request_auth,
|
956
|
+
_content_type=_content_type,
|
957
|
+
_headers=_headers,
|
958
|
+
_host_index=_host_index
|
959
|
+
)
|
960
|
+
|
961
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
962
|
+
'200': "str",
|
963
|
+
'500': "Error",
|
964
|
+
}
|
965
|
+
response_data = self.api_client.call_api(
|
966
|
+
*_param,
|
967
|
+
_request_timeout=_request_timeout
|
968
|
+
)
|
969
|
+
response_data.read()
|
970
|
+
return self.api_client.response_deserialize(
|
971
|
+
response_data=response_data,
|
972
|
+
response_types_map=_response_types_map,
|
973
|
+
).data
|
974
|
+
|
975
|
+
|
976
|
+
@validate_call
|
977
|
+
def unbind_vertex_datasource_with_http_info(
|
978
|
+
self,
|
979
|
+
graph_id: StrictStr,
|
980
|
+
type_name: StrictStr,
|
981
|
+
_request_timeout: Union[
|
982
|
+
None,
|
983
|
+
Annotated[StrictFloat, Field(gt=0)],
|
984
|
+
Tuple[
|
985
|
+
Annotated[StrictFloat, Field(gt=0)],
|
986
|
+
Annotated[StrictFloat, Field(gt=0)]
|
987
|
+
]
|
988
|
+
] = None,
|
989
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
990
|
+
_content_type: Optional[StrictStr] = None,
|
991
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
992
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
993
|
+
) -> ApiResponse[str]:
|
994
|
+
"""unbind_vertex_datasource
|
995
|
+
|
996
|
+
Unbind data source on a vertex type
|
997
|
+
|
998
|
+
:param graph_id: (required)
|
999
|
+
:type graph_id: str
|
1000
|
+
:param type_name: (required)
|
1001
|
+
:type type_name: str
|
1002
|
+
:param _request_timeout: timeout setting for this request. If one
|
1003
|
+
number provided, it will be total request
|
1004
|
+
timeout. It can also be a pair (tuple) of
|
1005
|
+
(connection, read) timeouts.
|
1006
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1007
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1008
|
+
request; this effectively ignores the
|
1009
|
+
authentication in the spec for a single request.
|
1010
|
+
:type _request_auth: dict, optional
|
1011
|
+
:param _content_type: force content-type for the request.
|
1012
|
+
:type _content_type: str, Optional
|
1013
|
+
:param _headers: set to override the headers for a single
|
1014
|
+
request; this effectively ignores the headers
|
1015
|
+
in the spec for a single request.
|
1016
|
+
:type _headers: dict, optional
|
1017
|
+
:param _host_index: set to override the host_index for a single
|
1018
|
+
request; this effectively ignores the host_index
|
1019
|
+
in the spec for a single request.
|
1020
|
+
:type _host_index: int, optional
|
1021
|
+
:return: Returns the result object.
|
1022
|
+
""" # noqa: E501
|
1023
|
+
|
1024
|
+
_param = self._unbind_vertex_datasource_serialize(
|
1025
|
+
graph_id=graph_id,
|
1026
|
+
type_name=type_name,
|
1027
|
+
_request_auth=_request_auth,
|
1028
|
+
_content_type=_content_type,
|
1029
|
+
_headers=_headers,
|
1030
|
+
_host_index=_host_index
|
1031
|
+
)
|
1032
|
+
|
1033
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1034
|
+
'200': "str",
|
1035
|
+
'500': "Error",
|
1036
|
+
}
|
1037
|
+
response_data = self.api_client.call_api(
|
1038
|
+
*_param,
|
1039
|
+
_request_timeout=_request_timeout
|
1040
|
+
)
|
1041
|
+
response_data.read()
|
1042
|
+
return self.api_client.response_deserialize(
|
1043
|
+
response_data=response_data,
|
1044
|
+
response_types_map=_response_types_map,
|
1045
|
+
)
|
1046
|
+
|
1047
|
+
|
1048
|
+
@validate_call
|
1049
|
+
def unbind_vertex_datasource_without_preload_content(
|
1050
|
+
self,
|
1051
|
+
graph_id: StrictStr,
|
1052
|
+
type_name: StrictStr,
|
1053
|
+
_request_timeout: Union[
|
1054
|
+
None,
|
1055
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1056
|
+
Tuple[
|
1057
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1058
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1059
|
+
]
|
1060
|
+
] = None,
|
1061
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1062
|
+
_content_type: Optional[StrictStr] = None,
|
1063
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1064
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1065
|
+
) -> RESTResponseType:
|
1066
|
+
"""unbind_vertex_datasource
|
1067
|
+
|
1068
|
+
Unbind data source on a vertex type
|
1069
|
+
|
1070
|
+
:param graph_id: (required)
|
1071
|
+
:type graph_id: str
|
1072
|
+
:param type_name: (required)
|
1073
|
+
:type type_name: str
|
1074
|
+
:param _request_timeout: timeout setting for this request. If one
|
1075
|
+
number provided, it will be total request
|
1076
|
+
timeout. It can also be a pair (tuple) of
|
1077
|
+
(connection, read) timeouts.
|
1078
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1079
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1080
|
+
request; this effectively ignores the
|
1081
|
+
authentication in the spec for a single request.
|
1082
|
+
:type _request_auth: dict, optional
|
1083
|
+
:param _content_type: force content-type for the request.
|
1084
|
+
:type _content_type: str, Optional
|
1085
|
+
:param _headers: set to override the headers for a single
|
1086
|
+
request; this effectively ignores the headers
|
1087
|
+
in the spec for a single request.
|
1088
|
+
:type _headers: dict, optional
|
1089
|
+
:param _host_index: set to override the host_index for a single
|
1090
|
+
request; this effectively ignores the host_index
|
1091
|
+
in the spec for a single request.
|
1092
|
+
:type _host_index: int, optional
|
1093
|
+
:return: Returns the result object.
|
1094
|
+
""" # noqa: E501
|
1095
|
+
|
1096
|
+
_param = self._unbind_vertex_datasource_serialize(
|
1097
|
+
graph_id=graph_id,
|
1098
|
+
type_name=type_name,
|
1099
|
+
_request_auth=_request_auth,
|
1100
|
+
_content_type=_content_type,
|
1101
|
+
_headers=_headers,
|
1102
|
+
_host_index=_host_index
|
1103
|
+
)
|
1104
|
+
|
1105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1106
|
+
'200': "str",
|
1107
|
+
'500': "Error",
|
1108
|
+
}
|
1109
|
+
response_data = self.api_client.call_api(
|
1110
|
+
*_param,
|
1111
|
+
_request_timeout=_request_timeout
|
1112
|
+
)
|
1113
|
+
return response_data.response
|
1114
|
+
|
1115
|
+
|
1116
|
+
def _unbind_vertex_datasource_serialize(
|
1117
|
+
self,
|
1118
|
+
graph_id,
|
1119
|
+
type_name,
|
1120
|
+
_request_auth,
|
1121
|
+
_content_type,
|
1122
|
+
_headers,
|
1123
|
+
_host_index,
|
1124
|
+
) -> RequestSerialized:
|
1125
|
+
|
1126
|
+
_host = None
|
1127
|
+
|
1128
|
+
_collection_formats: Dict[str, str] = {
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
_path_params: Dict[str, str] = {}
|
1132
|
+
_query_params: List[Tuple[str, str]] = []
|
1133
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1134
|
+
_form_params: List[Tuple[str, str]] = []
|
1135
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1136
|
+
_body_params: Optional[bytes] = None
|
1137
|
+
|
1138
|
+
# process the path parameters
|
1139
|
+
if graph_id is not None:
|
1140
|
+
_path_params['graph_id'] = graph_id
|
1141
|
+
if type_name is not None:
|
1142
|
+
_path_params['type_name'] = type_name
|
1143
|
+
# process the query parameters
|
1144
|
+
# process the header parameters
|
1145
|
+
# process the form parameters
|
1146
|
+
# process the body parameter
|
1147
|
+
|
1148
|
+
|
1149
|
+
# set the HTTP header `Accept`
|
1150
|
+
if 'Accept' not in _header_params:
|
1151
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1152
|
+
[
|
1153
|
+
'application/json'
|
1154
|
+
]
|
1155
|
+
)
|
1156
|
+
|
1157
|
+
|
1158
|
+
# authentication setting
|
1159
|
+
_auth_settings: List[str] = [
|
1160
|
+
]
|
1161
|
+
|
1162
|
+
return self.api_client.param_serialize(
|
1163
|
+
method='DELETE',
|
1164
|
+
resource_path='/api/v1/graph/{graph_id}/datasource/vertex/{type_name}',
|
1165
|
+
path_params=_path_params,
|
1166
|
+
query_params=_query_params,
|
1167
|
+
header_params=_header_params,
|
1168
|
+
body=_body_params,
|
1169
|
+
post_params=_form_params,
|
1170
|
+
files=_files,
|
1171
|
+
auth_settings=_auth_settings,
|
1172
|
+
collection_formats=_collection_formats,
|
1173
|
+
_host=_host,
|
1174
|
+
_request_auth=_request_auth
|
1175
|
+
)
|
1176
|
+
|
1177
|
+
|