graphscope-flex 0.27.0__py2.py3-none-any.whl → 0.29.0a20250115__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. graphscope/flex/rest/__init__.py +59 -44
  2. graphscope/flex/rest/api/__init__.py +2 -4
  3. graphscope/flex/rest/api/alert_api.py +721 -394
  4. graphscope/flex/rest/api/{legacy_api.py → data_source_api.py} +260 -189
  5. graphscope/flex/rest/api/deployment_api.py +388 -138
  6. graphscope/flex/rest/api/graph_api.py +858 -260
  7. graphscope/flex/rest/api/job_api.py +286 -203
  8. graphscope/flex/rest/api/service_api.py +320 -39
  9. graphscope/flex/rest/api/{procedure_api.py → stored_procedure_api.py} +296 -237
  10. graphscope/flex/rest/api/utils_api.py +18 -13
  11. graphscope/flex/rest/api_client.py +60 -30
  12. graphscope/flex/rest/configuration.py +19 -5
  13. graphscope/flex/rest/exceptions.py +2 -2
  14. graphscope/flex/rest/models/__init__.py +57 -40
  15. graphscope/flex/rest/models/{vertex_type.py → base_edge_type.py} +25 -25
  16. graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner.py → base_edge_type_vertex_type_pair_relations_inner.py} +17 -17
  17. graphscope/flex/rest/models/{edge_type_vertex_type_pair_relations_inner_x_csr_params.py → base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py} +11 -11
  18. graphscope/flex/rest/models/{model_property.py → base_property_meta.py} +28 -19
  19. graphscope/flex/rest/models/base_vertex_type.py +96 -0
  20. graphscope/flex/rest/models/{procedure_params_inner.py → base_vertex_type_x_csr_params.py} +15 -17
  21. graphscope/flex/rest/models/column_mapping.py +13 -13
  22. graphscope/flex/rest/models/{edge_mapping_source_vertex_mappings_inner_column.py → column_mapping_column.py} +12 -12
  23. graphscope/flex/rest/models/{schema_mapping_loading_config_data_source.py → create_alert_receiver_request.py} +29 -24
  24. graphscope/flex/rest/models/{alert_rule.py → create_alert_rule_request.py} +19 -25
  25. graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
  26. graphscope/flex/rest/models/create_edge_type.py +114 -0
  27. graphscope/flex/rest/models/{graph.py → create_graph_request.py} +27 -33
  28. graphscope/flex/rest/models/create_graph_response.py +88 -0
  29. graphscope/flex/rest/models/{model_schema.py → create_graph_schema_request.py} +25 -25
  30. graphscope/flex/rest/models/{groot_vertex_type.py → create_property_meta.py} +32 -25
  31. graphscope/flex/rest/models/{graph_stored_procedures.py → create_stored_proc_request.py} +26 -23
  32. graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
  33. graphscope/flex/rest/models/create_vertex_type.py +108 -0
  34. graphscope/flex/rest/models/{groot_dataloading_job_config.py → dataloading_job_config.py} +45 -21
  35. graphscope/flex/rest/models/{groot_dataloading_job_config_edges_inner.py → dataloading_job_config_edges_inner.py} +12 -12
  36. graphscope/flex/rest/models/{schema_mapping_loading_config.py → dataloading_job_config_loading_config.py} +16 -22
  37. graphscope/flex/rest/models/{schema_mapping_loading_config_format.py → dataloading_job_config_loading_config_format.py} +12 -12
  38. graphscope/flex/rest/models/{groot_edge_type_relations_inner.py → dataloading_job_config_vertices_inner.py} +15 -17
  39. graphscope/flex/rest/models/dataloading_mr_job_config.py +88 -0
  40. graphscope/flex/rest/models/date_type.py +88 -0
  41. graphscope/flex/rest/models/edge_mapping.py +23 -25
  42. graphscope/flex/rest/models/edge_mapping_type_triplet.py +12 -12
  43. graphscope/flex/rest/models/error.py +90 -0
  44. graphscope/flex/rest/models/{alert_message.py → get_alert_message_response.py} +23 -32
  45. graphscope/flex/rest/models/{alert_receiver.py → get_alert_receiver_response.py} +22 -25
  46. graphscope/flex/rest/models/{connection_status.py → get_alert_rule_response.py} +37 -33
  47. graphscope/flex/rest/models/{edge_type.py → get_edge_type.py} +33 -27
  48. graphscope/flex/rest/models/get_graph_response.py +139 -0
  49. graphscope/flex/rest/models/{groot_schema.py → get_graph_schema_response.py} +32 -32
  50. graphscope/flex/rest/models/get_pod_log_response.py +88 -0
  51. graphscope/flex/rest/models/{edge_mapping_destination_vertex_mappings_inner.py → get_property_meta.py} +34 -19
  52. graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
  53. graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
  54. graphscope/flex/rest/models/{procedure.py → get_stored_proc_response.py} +37 -36
  55. graphscope/flex/rest/models/{groot_edge_type.py → get_vertex_type.py} +33 -31
  56. graphscope/flex/rest/models/gs_data_type.py +152 -0
  57. graphscope/flex/rest/models/job_status.py +14 -17
  58. graphscope/flex/rest/models/{connection.py → long_text.py} +20 -15
  59. graphscope/flex/rest/models/node_status.py +15 -15
  60. graphscope/flex/rest/models/parameter.py +96 -0
  61. graphscope/flex/rest/models/{deployment_info_graphs_info_value.py → pod_status.py} +34 -20
  62. graphscope/flex/rest/models/{property_property_type.py → primitive_type.py} +16 -19
  63. graphscope/flex/rest/models/resource_usage.py +92 -0
  64. graphscope/flex/rest/models/{deployment_info.py → running_deployment_info.py} +42 -45
  65. graphscope/flex/rest/models/running_deployment_status.py +124 -0
  66. graphscope/flex/rest/models/schema_mapping.py +18 -26
  67. graphscope/flex/rest/models/service_status.py +29 -13
  68. graphscope/flex/rest/models/service_status_sdk_endpoints.py +8 -8
  69. graphscope/flex/rest/models/start_service_request.py +11 -11
  70. graphscope/flex/rest/models/{groot_graph.py → stored_procedure_meta.py} +46 -36
  71. graphscope/flex/rest/models/string_type.py +92 -0
  72. graphscope/flex/rest/models/string_type_string.py +124 -0
  73. graphscope/flex/rest/models/temporal_type.py +92 -0
  74. graphscope/flex/rest/models/temporal_type_temporal.py +138 -0
  75. graphscope/flex/rest/models/time_stamp_type.py +88 -0
  76. graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
  77. graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
  78. graphscope/flex/rest/models/upload_file_response.py +90 -0
  79. graphscope/flex/rest/models/vertex_mapping.py +13 -13
  80. graphscope/flex/rest/rest.py +4 -2
  81. graphscope_flex-0.29.0a20250115.dist-info/METADATA +19 -0
  82. graphscope_flex-0.29.0a20250115.dist-info/RECORD +86 -0
  83. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250115.dist-info}/WHEEL +1 -1
  84. graphscope/flex/rest/api/connection_api.py +0 -550
  85. graphscope/flex/rest/api/datasource_api.py +0 -2308
  86. graphscope/flex/rest/models/data_source.py +0 -106
  87. graphscope/flex/rest/models/deployment_status.py +0 -108
  88. graphscope/flex/rest/models/edge_data_source.py +0 -112
  89. graphscope/flex/rest/models/edge_mapping_source_vertex_mappings_inner.py +0 -92
  90. graphscope/flex/rest/models/groot_graph_gremlin_interface.py +0 -94
  91. graphscope/flex/rest/models/groot_property.py +0 -104
  92. graphscope/flex/rest/models/update_alert_messages_request.py +0 -110
  93. graphscope/flex/rest/models/vertex_data_source.py +0 -104
  94. graphscope_flex-0.27.0.dist-info/METADATA +0 -17
  95. graphscope_flex-0.27.0.dist-info/RECORD +0 -71
  96. {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.29.0a20250115.dist-info}/top_level.txt +0 -0
@@ -1,2308 +0,0 @@
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: 0.9.1
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.data_source import DataSource
22
- from graphscope.flex.rest.models.edge_data_source import EdgeDataSource
23
- from graphscope.flex.rest.models.vertex_data_source import VertexDataSource
24
-
25
- from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
26
- from graphscope.flex.rest.api_response import ApiResponse
27
- from graphscope.flex.rest.rest import RESTResponseType
28
-
29
-
30
- class DatasourceApi:
31
- """NOTE: This class is auto generated by OpenAPI Generator
32
- Ref: https://openapi-generator.tech
33
-
34
- Do not edit the class manually.
35
- """
36
-
37
- def __init__(self, api_client=None) -> None:
38
- if api_client is None:
39
- api_client = ApiClient.get_default()
40
- self.api_client = api_client
41
-
42
-
43
- @validate_call
44
- def bind_edge_datasource(
45
- self,
46
- graph_name: StrictStr,
47
- edge_data_source: EdgeDataSource,
48
- _request_timeout: Union[
49
- None,
50
- Annotated[StrictFloat, Field(gt=0)],
51
- Tuple[
52
- Annotated[StrictFloat, Field(gt=0)],
53
- Annotated[StrictFloat, Field(gt=0)]
54
- ]
55
- ] = None,
56
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
- _content_type: Optional[StrictStr] = None,
58
- _headers: Optional[Dict[StrictStr, Any]] = None,
59
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
- ) -> str:
61
- """bind_edge_datasource
62
-
63
- Bind data source on edge type
64
-
65
- :param graph_name: (required)
66
- :type graph_name: str
67
- :param edge_data_source: (required)
68
- :type edge_data_source: EdgeDataSource
69
- :param _request_timeout: timeout setting for this request. If one
70
- number provided, it will be total request
71
- timeout. It can also be a pair (tuple) of
72
- (connection, read) timeouts.
73
- :type _request_timeout: int, tuple(int, int), optional
74
- :param _request_auth: set to override the auth_settings for an a single
75
- request; this effectively ignores the
76
- authentication in the spec for a single request.
77
- :type _request_auth: dict, optional
78
- :param _content_type: force content-type for the request.
79
- :type _content_type: str, Optional
80
- :param _headers: set to override the headers for a single
81
- request; this effectively ignores the headers
82
- in the spec for a single request.
83
- :type _headers: dict, optional
84
- :param _host_index: set to override the host_index for a single
85
- request; this effectively ignores the host_index
86
- in the spec for a single request.
87
- :type _host_index: int, optional
88
- :return: Returns the result object.
89
- """ # noqa: E501
90
-
91
- _param = self._bind_edge_datasource_serialize(
92
- graph_name=graph_name,
93
- edge_data_source=edge_data_source,
94
- _request_auth=_request_auth,
95
- _content_type=_content_type,
96
- _headers=_headers,
97
- _host_index=_host_index
98
- )
99
-
100
- _response_types_map: Dict[str, Optional[str]] = {
101
- '200': "str",
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_edge_datasource_with_http_info(
116
- self,
117
- graph_name: StrictStr,
118
- edge_data_source: EdgeDataSource,
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_edge_datasource
133
-
134
- Bind data source on edge type
135
-
136
- :param graph_name: (required)
137
- :type graph_name: str
138
- :param edge_data_source: (required)
139
- :type edge_data_source: EdgeDataSource
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_edge_datasource_serialize(
163
- graph_name=graph_name,
164
- edge_data_source=edge_data_source,
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
- }
174
- response_data = self.api_client.call_api(
175
- *_param,
176
- _request_timeout=_request_timeout
177
- )
178
- response_data.read()
179
- return self.api_client.response_deserialize(
180
- response_data=response_data,
181
- response_types_map=_response_types_map,
182
- )
183
-
184
-
185
- @validate_call
186
- def bind_edge_datasource_without_preload_content(
187
- self,
188
- graph_name: StrictStr,
189
- edge_data_source: EdgeDataSource,
190
- _request_timeout: Union[
191
- None,
192
- Annotated[StrictFloat, Field(gt=0)],
193
- Tuple[
194
- Annotated[StrictFloat, Field(gt=0)],
195
- Annotated[StrictFloat, Field(gt=0)]
196
- ]
197
- ] = None,
198
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
199
- _content_type: Optional[StrictStr] = None,
200
- _headers: Optional[Dict[StrictStr, Any]] = None,
201
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
202
- ) -> RESTResponseType:
203
- """bind_edge_datasource
204
-
205
- Bind data source on edge type
206
-
207
- :param graph_name: (required)
208
- :type graph_name: str
209
- :param edge_data_source: (required)
210
- :type edge_data_source: EdgeDataSource
211
- :param _request_timeout: timeout setting for this request. If one
212
- number provided, it will be total request
213
- timeout. It can also be a pair (tuple) of
214
- (connection, read) timeouts.
215
- :type _request_timeout: int, tuple(int, int), optional
216
- :param _request_auth: set to override the auth_settings for an a single
217
- request; this effectively ignores the
218
- authentication in the spec for a single request.
219
- :type _request_auth: dict, optional
220
- :param _content_type: force content-type for the request.
221
- :type _content_type: str, Optional
222
- :param _headers: set to override the headers for a single
223
- request; this effectively ignores the headers
224
- in the spec for a single request.
225
- :type _headers: dict, optional
226
- :param _host_index: set to override the host_index for a single
227
- request; this effectively ignores the host_index
228
- in the spec for a single request.
229
- :type _host_index: int, optional
230
- :return: Returns the result object.
231
- """ # noqa: E501
232
-
233
- _param = self._bind_edge_datasource_serialize(
234
- graph_name=graph_name,
235
- edge_data_source=edge_data_source,
236
- _request_auth=_request_auth,
237
- _content_type=_content_type,
238
- _headers=_headers,
239
- _host_index=_host_index
240
- )
241
-
242
- _response_types_map: Dict[str, Optional[str]] = {
243
- '200': "str",
244
- }
245
- response_data = self.api_client.call_api(
246
- *_param,
247
- _request_timeout=_request_timeout
248
- )
249
- return response_data.response
250
-
251
-
252
- def _bind_edge_datasource_serialize(
253
- self,
254
- graph_name,
255
- edge_data_source,
256
- _request_auth,
257
- _content_type,
258
- _headers,
259
- _host_index,
260
- ) -> RequestSerialized:
261
-
262
- _host = None
263
-
264
- _collection_formats: Dict[str, str] = {
265
- }
266
-
267
- _path_params: Dict[str, str] = {}
268
- _query_params: List[Tuple[str, str]] = []
269
- _header_params: Dict[str, Optional[str]] = _headers or {}
270
- _form_params: List[Tuple[str, str]] = []
271
- _files: Dict[str, str] = {}
272
- _body_params: Optional[bytes] = None
273
-
274
- # process the path parameters
275
- if graph_name is not None:
276
- _path_params['graph_name'] = graph_name
277
- # process the query parameters
278
- # process the header parameters
279
- # process the form parameters
280
- # process the body parameter
281
- if edge_data_source is not None:
282
- _body_params = edge_data_source
283
-
284
-
285
- # set the HTTP header `Accept`
286
- _header_params['Accept'] = self.api_client.select_header_accept(
287
- [
288
- 'application/json'
289
- ]
290
- )
291
-
292
- # set the HTTP header `Content-Type`
293
- if _content_type:
294
- _header_params['Content-Type'] = _content_type
295
- else:
296
- _default_content_type = (
297
- self.api_client.select_header_content_type(
298
- [
299
- 'application/json'
300
- ]
301
- )
302
- )
303
- if _default_content_type is not None:
304
- _header_params['Content-Type'] = _default_content_type
305
-
306
- # authentication setting
307
- _auth_settings: List[str] = [
308
- ]
309
-
310
- return self.api_client.param_serialize(
311
- method='POST',
312
- resource_path='/api/v1/graph/{graph_name}/datasource/edge_datasource',
313
- path_params=_path_params,
314
- query_params=_query_params,
315
- header_params=_header_params,
316
- body=_body_params,
317
- post_params=_form_params,
318
- files=_files,
319
- auth_settings=_auth_settings,
320
- collection_formats=_collection_formats,
321
- _host=_host,
322
- _request_auth=_request_auth
323
- )
324
-
325
-
326
-
327
-
328
- @validate_call
329
- def bind_vertex_datasource(
330
- self,
331
- graph_name: StrictStr,
332
- vertex_data_source: VertexDataSource,
333
- _request_timeout: Union[
334
- None,
335
- Annotated[StrictFloat, Field(gt=0)],
336
- Tuple[
337
- Annotated[StrictFloat, Field(gt=0)],
338
- Annotated[StrictFloat, Field(gt=0)]
339
- ]
340
- ] = None,
341
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
342
- _content_type: Optional[StrictStr] = None,
343
- _headers: Optional[Dict[StrictStr, Any]] = None,
344
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
345
- ) -> str:
346
- """bind_vertex_datasource
347
-
348
- Bind data source on vertex type
349
-
350
- :param graph_name: (required)
351
- :type graph_name: str
352
- :param vertex_data_source: (required)
353
- :type vertex_data_source: VertexDataSource
354
- :param _request_timeout: timeout setting for this request. If one
355
- number provided, it will be total request
356
- timeout. It can also be a pair (tuple) of
357
- (connection, read) timeouts.
358
- :type _request_timeout: int, tuple(int, int), optional
359
- :param _request_auth: set to override the auth_settings for an a single
360
- request; this effectively ignores the
361
- authentication in the spec for a single request.
362
- :type _request_auth: dict, optional
363
- :param _content_type: force content-type for the request.
364
- :type _content_type: str, Optional
365
- :param _headers: set to override the headers for a single
366
- request; this effectively ignores the headers
367
- in the spec for a single request.
368
- :type _headers: dict, optional
369
- :param _host_index: set to override the host_index for a single
370
- request; this effectively ignores the host_index
371
- in the spec for a single request.
372
- :type _host_index: int, optional
373
- :return: Returns the result object.
374
- """ # noqa: E501
375
-
376
- _param = self._bind_vertex_datasource_serialize(
377
- graph_name=graph_name,
378
- vertex_data_source=vertex_data_source,
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': "str",
387
- }
388
- response_data = self.api_client.call_api(
389
- *_param,
390
- _request_timeout=_request_timeout
391
- )
392
- response_data.read()
393
- return self.api_client.response_deserialize(
394
- response_data=response_data,
395
- response_types_map=_response_types_map,
396
- ).data
397
-
398
-
399
- @validate_call
400
- def bind_vertex_datasource_with_http_info(
401
- self,
402
- graph_name: StrictStr,
403
- vertex_data_source: VertexDataSource,
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[str]:
417
- """bind_vertex_datasource
418
-
419
- Bind data source on vertex type
420
-
421
- :param graph_name: (required)
422
- :type graph_name: str
423
- :param vertex_data_source: (required)
424
- :type vertex_data_source: VertexDataSource
425
- :param _request_timeout: timeout setting for this request. If one
426
- number provided, it will be total request
427
- timeout. It can also be a pair (tuple) of
428
- (connection, read) timeouts.
429
- :type _request_timeout: int, tuple(int, int), optional
430
- :param _request_auth: set to override the auth_settings for an a single
431
- request; this effectively ignores the
432
- authentication in the spec for a single request.
433
- :type _request_auth: dict, optional
434
- :param _content_type: force content-type for the request.
435
- :type _content_type: str, Optional
436
- :param _headers: set to override the headers for a single
437
- request; this effectively ignores the headers
438
- in the spec for a single request.
439
- :type _headers: dict, optional
440
- :param _host_index: set to override the host_index for a single
441
- request; this effectively ignores the host_index
442
- in the spec for a single request.
443
- :type _host_index: int, optional
444
- :return: Returns the result object.
445
- """ # noqa: E501
446
-
447
- _param = self._bind_vertex_datasource_serialize(
448
- graph_name=graph_name,
449
- vertex_data_source=vertex_data_source,
450
- _request_auth=_request_auth,
451
- _content_type=_content_type,
452
- _headers=_headers,
453
- _host_index=_host_index
454
- )
455
-
456
- _response_types_map: Dict[str, Optional[str]] = {
457
- '200': "str",
458
- }
459
- response_data = self.api_client.call_api(
460
- *_param,
461
- _request_timeout=_request_timeout
462
- )
463
- response_data.read()
464
- return self.api_client.response_deserialize(
465
- response_data=response_data,
466
- response_types_map=_response_types_map,
467
- )
468
-
469
-
470
- @validate_call
471
- def bind_vertex_datasource_without_preload_content(
472
- self,
473
- graph_name: StrictStr,
474
- vertex_data_source: VertexDataSource,
475
- _request_timeout: Union[
476
- None,
477
- Annotated[StrictFloat, Field(gt=0)],
478
- Tuple[
479
- Annotated[StrictFloat, Field(gt=0)],
480
- Annotated[StrictFloat, Field(gt=0)]
481
- ]
482
- ] = None,
483
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
484
- _content_type: Optional[StrictStr] = None,
485
- _headers: Optional[Dict[StrictStr, Any]] = None,
486
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
487
- ) -> RESTResponseType:
488
- """bind_vertex_datasource
489
-
490
- Bind data source on vertex type
491
-
492
- :param graph_name: (required)
493
- :type graph_name: str
494
- :param vertex_data_source: (required)
495
- :type vertex_data_source: VertexDataSource
496
- :param _request_timeout: timeout setting for this request. If one
497
- number provided, it will be total request
498
- timeout. It can also be a pair (tuple) of
499
- (connection, read) timeouts.
500
- :type _request_timeout: int, tuple(int, int), optional
501
- :param _request_auth: set to override the auth_settings for an a single
502
- request; this effectively ignores the
503
- authentication in the spec for a single request.
504
- :type _request_auth: dict, optional
505
- :param _content_type: force content-type for the request.
506
- :type _content_type: str, Optional
507
- :param _headers: set to override the headers for a single
508
- request; this effectively ignores the headers
509
- in the spec for a single request.
510
- :type _headers: dict, optional
511
- :param _host_index: set to override the host_index for a single
512
- request; this effectively ignores the host_index
513
- in the spec for a single request.
514
- :type _host_index: int, optional
515
- :return: Returns the result object.
516
- """ # noqa: E501
517
-
518
- _param = self._bind_vertex_datasource_serialize(
519
- graph_name=graph_name,
520
- vertex_data_source=vertex_data_source,
521
- _request_auth=_request_auth,
522
- _content_type=_content_type,
523
- _headers=_headers,
524
- _host_index=_host_index
525
- )
526
-
527
- _response_types_map: Dict[str, Optional[str]] = {
528
- '200': "str",
529
- }
530
- response_data = self.api_client.call_api(
531
- *_param,
532
- _request_timeout=_request_timeout
533
- )
534
- return response_data.response
535
-
536
-
537
- def _bind_vertex_datasource_serialize(
538
- self,
539
- graph_name,
540
- vertex_data_source,
541
- _request_auth,
542
- _content_type,
543
- _headers,
544
- _host_index,
545
- ) -> RequestSerialized:
546
-
547
- _host = None
548
-
549
- _collection_formats: Dict[str, str] = {
550
- }
551
-
552
- _path_params: Dict[str, str] = {}
553
- _query_params: List[Tuple[str, str]] = []
554
- _header_params: Dict[str, Optional[str]] = _headers or {}
555
- _form_params: List[Tuple[str, str]] = []
556
- _files: Dict[str, str] = {}
557
- _body_params: Optional[bytes] = None
558
-
559
- # process the path parameters
560
- if graph_name is not None:
561
- _path_params['graph_name'] = graph_name
562
- # process the query parameters
563
- # process the header parameters
564
- # process the form parameters
565
- # process the body parameter
566
- if vertex_data_source is not None:
567
- _body_params = vertex_data_source
568
-
569
-
570
- # set the HTTP header `Accept`
571
- _header_params['Accept'] = self.api_client.select_header_accept(
572
- [
573
- 'application/json'
574
- ]
575
- )
576
-
577
- # set the HTTP header `Content-Type`
578
- if _content_type:
579
- _header_params['Content-Type'] = _content_type
580
- else:
581
- _default_content_type = (
582
- self.api_client.select_header_content_type(
583
- [
584
- 'application/json'
585
- ]
586
- )
587
- )
588
- if _default_content_type is not None:
589
- _header_params['Content-Type'] = _default_content_type
590
-
591
- # authentication setting
592
- _auth_settings: List[str] = [
593
- ]
594
-
595
- return self.api_client.param_serialize(
596
- method='POST',
597
- resource_path='/api/v1/graph/{graph_name}/datasource/vertex_datasource',
598
- path_params=_path_params,
599
- query_params=_query_params,
600
- header_params=_header_params,
601
- body=_body_params,
602
- post_params=_form_params,
603
- files=_files,
604
- auth_settings=_auth_settings,
605
- collection_formats=_collection_formats,
606
- _host=_host,
607
- _request_auth=_request_auth
608
- )
609
-
610
-
611
-
612
-
613
- @validate_call
614
- def get_datasource(
615
- self,
616
- graph_name: StrictStr,
617
- _request_timeout: Union[
618
- None,
619
- Annotated[StrictFloat, Field(gt=0)],
620
- Tuple[
621
- Annotated[StrictFloat, Field(gt=0)],
622
- Annotated[StrictFloat, Field(gt=0)]
623
- ]
624
- ] = None,
625
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
626
- _content_type: Optional[StrictStr] = None,
627
- _headers: Optional[Dict[StrictStr, Any]] = None,
628
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
629
- ) -> DataSource:
630
- """get_datasource
631
-
632
- List data source on graph
633
-
634
- :param graph_name: (required)
635
- :type graph_name: str
636
- :param _request_timeout: timeout setting for this request. If one
637
- number provided, it will be total request
638
- timeout. It can also be a pair (tuple) of
639
- (connection, read) timeouts.
640
- :type _request_timeout: int, tuple(int, int), optional
641
- :param _request_auth: set to override the auth_settings for an a single
642
- request; this effectively ignores the
643
- authentication in the spec for a single request.
644
- :type _request_auth: dict, optional
645
- :param _content_type: force content-type for the request.
646
- :type _content_type: str, Optional
647
- :param _headers: set to override the headers for a single
648
- request; this effectively ignores the headers
649
- in the spec for a single request.
650
- :type _headers: dict, optional
651
- :param _host_index: set to override the host_index for a single
652
- request; this effectively ignores the host_index
653
- in the spec for a single request.
654
- :type _host_index: int, optional
655
- :return: Returns the result object.
656
- """ # noqa: E501
657
-
658
- _param = self._get_datasource_serialize(
659
- graph_name=graph_name,
660
- _request_auth=_request_auth,
661
- _content_type=_content_type,
662
- _headers=_headers,
663
- _host_index=_host_index
664
- )
665
-
666
- _response_types_map: Dict[str, Optional[str]] = {
667
- '200': "DataSource",
668
- }
669
- response_data = self.api_client.call_api(
670
- *_param,
671
- _request_timeout=_request_timeout
672
- )
673
- response_data.read()
674
- return self.api_client.response_deserialize(
675
- response_data=response_data,
676
- response_types_map=_response_types_map,
677
- ).data
678
-
679
-
680
- @validate_call
681
- def get_datasource_with_http_info(
682
- self,
683
- graph_name: StrictStr,
684
- _request_timeout: Union[
685
- None,
686
- Annotated[StrictFloat, Field(gt=0)],
687
- Tuple[
688
- Annotated[StrictFloat, Field(gt=0)],
689
- Annotated[StrictFloat, Field(gt=0)]
690
- ]
691
- ] = None,
692
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
693
- _content_type: Optional[StrictStr] = None,
694
- _headers: Optional[Dict[StrictStr, Any]] = None,
695
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
696
- ) -> ApiResponse[DataSource]:
697
- """get_datasource
698
-
699
- List data source on graph
700
-
701
- :param graph_name: (required)
702
- :type graph_name: str
703
- :param _request_timeout: timeout setting for this request. If one
704
- number provided, it will be total request
705
- timeout. It can also be a pair (tuple) of
706
- (connection, read) timeouts.
707
- :type _request_timeout: int, tuple(int, int), optional
708
- :param _request_auth: set to override the auth_settings for an a single
709
- request; this effectively ignores the
710
- authentication in the spec for a single request.
711
- :type _request_auth: dict, optional
712
- :param _content_type: force content-type for the request.
713
- :type _content_type: str, Optional
714
- :param _headers: set to override the headers for a single
715
- request; this effectively ignores the headers
716
- in the spec for a single request.
717
- :type _headers: dict, optional
718
- :param _host_index: set to override the host_index for a single
719
- request; this effectively ignores the host_index
720
- in the spec for a single request.
721
- :type _host_index: int, optional
722
- :return: Returns the result object.
723
- """ # noqa: E501
724
-
725
- _param = self._get_datasource_serialize(
726
- graph_name=graph_name,
727
- _request_auth=_request_auth,
728
- _content_type=_content_type,
729
- _headers=_headers,
730
- _host_index=_host_index
731
- )
732
-
733
- _response_types_map: Dict[str, Optional[str]] = {
734
- '200': "DataSource",
735
- }
736
- response_data = self.api_client.call_api(
737
- *_param,
738
- _request_timeout=_request_timeout
739
- )
740
- response_data.read()
741
- return self.api_client.response_deserialize(
742
- response_data=response_data,
743
- response_types_map=_response_types_map,
744
- )
745
-
746
-
747
- @validate_call
748
- def get_datasource_without_preload_content(
749
- self,
750
- graph_name: StrictStr,
751
- _request_timeout: Union[
752
- None,
753
- Annotated[StrictFloat, Field(gt=0)],
754
- Tuple[
755
- Annotated[StrictFloat, Field(gt=0)],
756
- Annotated[StrictFloat, Field(gt=0)]
757
- ]
758
- ] = None,
759
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
760
- _content_type: Optional[StrictStr] = None,
761
- _headers: Optional[Dict[StrictStr, Any]] = None,
762
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
763
- ) -> RESTResponseType:
764
- """get_datasource
765
-
766
- List data source on graph
767
-
768
- :param graph_name: (required)
769
- :type graph_name: str
770
- :param _request_timeout: timeout setting for this request. If one
771
- number provided, it will be total request
772
- timeout. It can also be a pair (tuple) of
773
- (connection, read) timeouts.
774
- :type _request_timeout: int, tuple(int, int), optional
775
- :param _request_auth: set to override the auth_settings for an a single
776
- request; this effectively ignores the
777
- authentication in the spec for a single request.
778
- :type _request_auth: dict, optional
779
- :param _content_type: force content-type for the request.
780
- :type _content_type: str, Optional
781
- :param _headers: set to override the headers for a single
782
- request; this effectively ignores the headers
783
- in the spec for a single request.
784
- :type _headers: dict, optional
785
- :param _host_index: set to override the host_index for a single
786
- request; this effectively ignores the host_index
787
- in the spec for a single request.
788
- :type _host_index: int, optional
789
- :return: Returns the result object.
790
- """ # noqa: E501
791
-
792
- _param = self._get_datasource_serialize(
793
- graph_name=graph_name,
794
- _request_auth=_request_auth,
795
- _content_type=_content_type,
796
- _headers=_headers,
797
- _host_index=_host_index
798
- )
799
-
800
- _response_types_map: Dict[str, Optional[str]] = {
801
- '200': "DataSource",
802
- }
803
- response_data = self.api_client.call_api(
804
- *_param,
805
- _request_timeout=_request_timeout
806
- )
807
- return response_data.response
808
-
809
-
810
- def _get_datasource_serialize(
811
- self,
812
- graph_name,
813
- _request_auth,
814
- _content_type,
815
- _headers,
816
- _host_index,
817
- ) -> RequestSerialized:
818
-
819
- _host = None
820
-
821
- _collection_formats: Dict[str, str] = {
822
- }
823
-
824
- _path_params: Dict[str, str] = {}
825
- _query_params: List[Tuple[str, str]] = []
826
- _header_params: Dict[str, Optional[str]] = _headers or {}
827
- _form_params: List[Tuple[str, str]] = []
828
- _files: Dict[str, str] = {}
829
- _body_params: Optional[bytes] = None
830
-
831
- # process the path parameters
832
- if graph_name is not None:
833
- _path_params['graph_name'] = graph_name
834
- # process the query parameters
835
- # process the header parameters
836
- # process the form parameters
837
- # process the body parameter
838
-
839
-
840
- # set the HTTP header `Accept`
841
- _header_params['Accept'] = self.api_client.select_header_accept(
842
- [
843
- 'application/json'
844
- ]
845
- )
846
-
847
-
848
- # authentication setting
849
- _auth_settings: List[str] = [
850
- ]
851
-
852
- return self.api_client.param_serialize(
853
- method='GET',
854
- resource_path='/api/v1/graph/{graph_name}/datasource',
855
- path_params=_path_params,
856
- query_params=_query_params,
857
- header_params=_header_params,
858
- body=_body_params,
859
- post_params=_form_params,
860
- files=_files,
861
- auth_settings=_auth_settings,
862
- collection_formats=_collection_formats,
863
- _host=_host,
864
- _request_auth=_request_auth
865
- )
866
-
867
-
868
-
869
-
870
- @validate_call
871
- def get_edge_datasource(
872
- self,
873
- graph_name: StrictStr,
874
- type_name: StrictStr,
875
- source_vertex_type: StrictStr,
876
- destination_vertex_type: StrictStr,
877
- _request_timeout: Union[
878
- None,
879
- Annotated[StrictFloat, Field(gt=0)],
880
- Tuple[
881
- Annotated[StrictFloat, Field(gt=0)],
882
- Annotated[StrictFloat, Field(gt=0)]
883
- ]
884
- ] = None,
885
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
886
- _content_type: Optional[StrictStr] = None,
887
- _headers: Optional[Dict[StrictStr, Any]] = None,
888
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
889
- ) -> EdgeDataSource:
890
- """get_edge_datasource
891
-
892
- Get edge data source
893
-
894
- :param graph_name: (required)
895
- :type graph_name: str
896
- :param type_name: (required)
897
- :type type_name: str
898
- :param source_vertex_type: (required)
899
- :type source_vertex_type: str
900
- :param destination_vertex_type: (required)
901
- :type destination_vertex_type: str
902
- :param _request_timeout: timeout setting for this request. If one
903
- number provided, it will be total request
904
- timeout. It can also be a pair (tuple) of
905
- (connection, read) timeouts.
906
- :type _request_timeout: int, tuple(int, int), optional
907
- :param _request_auth: set to override the auth_settings for an a single
908
- request; this effectively ignores the
909
- authentication in the spec for a single request.
910
- :type _request_auth: dict, optional
911
- :param _content_type: force content-type for the request.
912
- :type _content_type: str, Optional
913
- :param _headers: set to override the headers for a single
914
- request; this effectively ignores the headers
915
- in the spec for a single request.
916
- :type _headers: dict, optional
917
- :param _host_index: set to override the host_index for a single
918
- request; this effectively ignores the host_index
919
- in the spec for a single request.
920
- :type _host_index: int, optional
921
- :return: Returns the result object.
922
- """ # noqa: E501
923
-
924
- _param = self._get_edge_datasource_serialize(
925
- graph_name=graph_name,
926
- type_name=type_name,
927
- source_vertex_type=source_vertex_type,
928
- destination_vertex_type=destination_vertex_type,
929
- _request_auth=_request_auth,
930
- _content_type=_content_type,
931
- _headers=_headers,
932
- _host_index=_host_index
933
- )
934
-
935
- _response_types_map: Dict[str, Optional[str]] = {
936
- '200': "EdgeDataSource",
937
- }
938
- response_data = self.api_client.call_api(
939
- *_param,
940
- _request_timeout=_request_timeout
941
- )
942
- response_data.read()
943
- return self.api_client.response_deserialize(
944
- response_data=response_data,
945
- response_types_map=_response_types_map,
946
- ).data
947
-
948
-
949
- @validate_call
950
- def get_edge_datasource_with_http_info(
951
- self,
952
- graph_name: StrictStr,
953
- type_name: StrictStr,
954
- source_vertex_type: StrictStr,
955
- destination_vertex_type: StrictStr,
956
- _request_timeout: Union[
957
- None,
958
- Annotated[StrictFloat, Field(gt=0)],
959
- Tuple[
960
- Annotated[StrictFloat, Field(gt=0)],
961
- Annotated[StrictFloat, Field(gt=0)]
962
- ]
963
- ] = None,
964
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
965
- _content_type: Optional[StrictStr] = None,
966
- _headers: Optional[Dict[StrictStr, Any]] = None,
967
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
968
- ) -> ApiResponse[EdgeDataSource]:
969
- """get_edge_datasource
970
-
971
- Get edge data source
972
-
973
- :param graph_name: (required)
974
- :type graph_name: str
975
- :param type_name: (required)
976
- :type type_name: str
977
- :param source_vertex_type: (required)
978
- :type source_vertex_type: str
979
- :param destination_vertex_type: (required)
980
- :type destination_vertex_type: str
981
- :param _request_timeout: timeout setting for this request. If one
982
- number provided, it will be total request
983
- timeout. It can also be a pair (tuple) of
984
- (connection, read) timeouts.
985
- :type _request_timeout: int, tuple(int, int), optional
986
- :param _request_auth: set to override the auth_settings for an a single
987
- request; this effectively ignores the
988
- authentication in the spec for a single request.
989
- :type _request_auth: dict, optional
990
- :param _content_type: force content-type for the request.
991
- :type _content_type: str, Optional
992
- :param _headers: set to override the headers for a single
993
- request; this effectively ignores the headers
994
- in the spec for a single request.
995
- :type _headers: dict, optional
996
- :param _host_index: set to override the host_index for a single
997
- request; this effectively ignores the host_index
998
- in the spec for a single request.
999
- :type _host_index: int, optional
1000
- :return: Returns the result object.
1001
- """ # noqa: E501
1002
-
1003
- _param = self._get_edge_datasource_serialize(
1004
- graph_name=graph_name,
1005
- type_name=type_name,
1006
- source_vertex_type=source_vertex_type,
1007
- destination_vertex_type=destination_vertex_type,
1008
- _request_auth=_request_auth,
1009
- _content_type=_content_type,
1010
- _headers=_headers,
1011
- _host_index=_host_index
1012
- )
1013
-
1014
- _response_types_map: Dict[str, Optional[str]] = {
1015
- '200': "EdgeDataSource",
1016
- }
1017
- response_data = self.api_client.call_api(
1018
- *_param,
1019
- _request_timeout=_request_timeout
1020
- )
1021
- response_data.read()
1022
- return self.api_client.response_deserialize(
1023
- response_data=response_data,
1024
- response_types_map=_response_types_map,
1025
- )
1026
-
1027
-
1028
- @validate_call
1029
- def get_edge_datasource_without_preload_content(
1030
- self,
1031
- graph_name: StrictStr,
1032
- type_name: StrictStr,
1033
- source_vertex_type: StrictStr,
1034
- destination_vertex_type: StrictStr,
1035
- _request_timeout: Union[
1036
- None,
1037
- Annotated[StrictFloat, Field(gt=0)],
1038
- Tuple[
1039
- Annotated[StrictFloat, Field(gt=0)],
1040
- Annotated[StrictFloat, Field(gt=0)]
1041
- ]
1042
- ] = None,
1043
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1044
- _content_type: Optional[StrictStr] = None,
1045
- _headers: Optional[Dict[StrictStr, Any]] = None,
1046
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1047
- ) -> RESTResponseType:
1048
- """get_edge_datasource
1049
-
1050
- Get edge data source
1051
-
1052
- :param graph_name: (required)
1053
- :type graph_name: str
1054
- :param type_name: (required)
1055
- :type type_name: str
1056
- :param source_vertex_type: (required)
1057
- :type source_vertex_type: str
1058
- :param destination_vertex_type: (required)
1059
- :type destination_vertex_type: str
1060
- :param _request_timeout: timeout setting for this request. If one
1061
- number provided, it will be total request
1062
- timeout. It can also be a pair (tuple) of
1063
- (connection, read) timeouts.
1064
- :type _request_timeout: int, tuple(int, int), optional
1065
- :param _request_auth: set to override the auth_settings for an a single
1066
- request; this effectively ignores the
1067
- authentication in the spec for a single request.
1068
- :type _request_auth: dict, optional
1069
- :param _content_type: force content-type for the request.
1070
- :type _content_type: str, Optional
1071
- :param _headers: set to override the headers for a single
1072
- request; this effectively ignores the headers
1073
- in the spec for a single request.
1074
- :type _headers: dict, optional
1075
- :param _host_index: set to override the host_index for a single
1076
- request; this effectively ignores the host_index
1077
- in the spec for a single request.
1078
- :type _host_index: int, optional
1079
- :return: Returns the result object.
1080
- """ # noqa: E501
1081
-
1082
- _param = self._get_edge_datasource_serialize(
1083
- graph_name=graph_name,
1084
- type_name=type_name,
1085
- source_vertex_type=source_vertex_type,
1086
- destination_vertex_type=destination_vertex_type,
1087
- _request_auth=_request_auth,
1088
- _content_type=_content_type,
1089
- _headers=_headers,
1090
- _host_index=_host_index
1091
- )
1092
-
1093
- _response_types_map: Dict[str, Optional[str]] = {
1094
- '200': "EdgeDataSource",
1095
- }
1096
- response_data = self.api_client.call_api(
1097
- *_param,
1098
- _request_timeout=_request_timeout
1099
- )
1100
- return response_data.response
1101
-
1102
-
1103
- def _get_edge_datasource_serialize(
1104
- self,
1105
- graph_name,
1106
- type_name,
1107
- source_vertex_type,
1108
- destination_vertex_type,
1109
- _request_auth,
1110
- _content_type,
1111
- _headers,
1112
- _host_index,
1113
- ) -> RequestSerialized:
1114
-
1115
- _host = None
1116
-
1117
- _collection_formats: Dict[str, str] = {
1118
- }
1119
-
1120
- _path_params: Dict[str, str] = {}
1121
- _query_params: List[Tuple[str, str]] = []
1122
- _header_params: Dict[str, Optional[str]] = _headers or {}
1123
- _form_params: List[Tuple[str, str]] = []
1124
- _files: Dict[str, str] = {}
1125
- _body_params: Optional[bytes] = None
1126
-
1127
- # process the path parameters
1128
- if graph_name is not None:
1129
- _path_params['graph_name'] = graph_name
1130
- if type_name is not None:
1131
- _path_params['type_name'] = type_name
1132
- # process the query parameters
1133
- if source_vertex_type is not None:
1134
-
1135
- _query_params.append(('source_vertex_type', source_vertex_type))
1136
-
1137
- if destination_vertex_type is not None:
1138
-
1139
- _query_params.append(('destination_vertex_type', destination_vertex_type))
1140
-
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='GET',
1160
- resource_path='/api/v1/graph/{graph_name}/datasource/edge_datasource/{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
-
1174
-
1175
-
1176
- @validate_call
1177
- def get_vertex_datasource(
1178
- self,
1179
- graph_name: StrictStr,
1180
- type_name: StrictStr,
1181
- _request_timeout: Union[
1182
- None,
1183
- Annotated[StrictFloat, Field(gt=0)],
1184
- Tuple[
1185
- Annotated[StrictFloat, Field(gt=0)],
1186
- Annotated[StrictFloat, Field(gt=0)]
1187
- ]
1188
- ] = None,
1189
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1190
- _content_type: Optional[StrictStr] = None,
1191
- _headers: Optional[Dict[StrictStr, Any]] = None,
1192
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1193
- ) -> VertexDataSource:
1194
- """get_vertex_datasource
1195
-
1196
- Get vertex data source
1197
-
1198
- :param graph_name: (required)
1199
- :type graph_name: str
1200
- :param type_name: (required)
1201
- :type type_name: str
1202
- :param _request_timeout: timeout setting for this request. If one
1203
- number provided, it will be total request
1204
- timeout. It can also be a pair (tuple) of
1205
- (connection, read) timeouts.
1206
- :type _request_timeout: int, tuple(int, int), optional
1207
- :param _request_auth: set to override the auth_settings for an a single
1208
- request; this effectively ignores the
1209
- authentication in the spec for a single request.
1210
- :type _request_auth: dict, optional
1211
- :param _content_type: force content-type for the request.
1212
- :type _content_type: str, Optional
1213
- :param _headers: set to override the headers for a single
1214
- request; this effectively ignores the headers
1215
- in the spec for a single request.
1216
- :type _headers: dict, optional
1217
- :param _host_index: set to override the host_index for a single
1218
- request; this effectively ignores the host_index
1219
- in the spec for a single request.
1220
- :type _host_index: int, optional
1221
- :return: Returns the result object.
1222
- """ # noqa: E501
1223
-
1224
- _param = self._get_vertex_datasource_serialize(
1225
- graph_name=graph_name,
1226
- type_name=type_name,
1227
- _request_auth=_request_auth,
1228
- _content_type=_content_type,
1229
- _headers=_headers,
1230
- _host_index=_host_index
1231
- )
1232
-
1233
- _response_types_map: Dict[str, Optional[str]] = {
1234
- '200': "VertexDataSource",
1235
- }
1236
- response_data = self.api_client.call_api(
1237
- *_param,
1238
- _request_timeout=_request_timeout
1239
- )
1240
- response_data.read()
1241
- return self.api_client.response_deserialize(
1242
- response_data=response_data,
1243
- response_types_map=_response_types_map,
1244
- ).data
1245
-
1246
-
1247
- @validate_call
1248
- def get_vertex_datasource_with_http_info(
1249
- self,
1250
- graph_name: StrictStr,
1251
- type_name: StrictStr,
1252
- _request_timeout: Union[
1253
- None,
1254
- Annotated[StrictFloat, Field(gt=0)],
1255
- Tuple[
1256
- Annotated[StrictFloat, Field(gt=0)],
1257
- Annotated[StrictFloat, Field(gt=0)]
1258
- ]
1259
- ] = None,
1260
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1261
- _content_type: Optional[StrictStr] = None,
1262
- _headers: Optional[Dict[StrictStr, Any]] = None,
1263
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1264
- ) -> ApiResponse[VertexDataSource]:
1265
- """get_vertex_datasource
1266
-
1267
- Get vertex data source
1268
-
1269
- :param graph_name: (required)
1270
- :type graph_name: str
1271
- :param type_name: (required)
1272
- :type type_name: str
1273
- :param _request_timeout: timeout setting for this request. If one
1274
- number provided, it will be total request
1275
- timeout. It can also be a pair (tuple) of
1276
- (connection, read) timeouts.
1277
- :type _request_timeout: int, tuple(int, int), optional
1278
- :param _request_auth: set to override the auth_settings for an a single
1279
- request; this effectively ignores the
1280
- authentication in the spec for a single request.
1281
- :type _request_auth: dict, optional
1282
- :param _content_type: force content-type for the request.
1283
- :type _content_type: str, Optional
1284
- :param _headers: set to override the headers for a single
1285
- request; this effectively ignores the headers
1286
- in the spec for a single request.
1287
- :type _headers: dict, optional
1288
- :param _host_index: set to override the host_index for a single
1289
- request; this effectively ignores the host_index
1290
- in the spec for a single request.
1291
- :type _host_index: int, optional
1292
- :return: Returns the result object.
1293
- """ # noqa: E501
1294
-
1295
- _param = self._get_vertex_datasource_serialize(
1296
- graph_name=graph_name,
1297
- type_name=type_name,
1298
- _request_auth=_request_auth,
1299
- _content_type=_content_type,
1300
- _headers=_headers,
1301
- _host_index=_host_index
1302
- )
1303
-
1304
- _response_types_map: Dict[str, Optional[str]] = {
1305
- '200': "VertexDataSource",
1306
- }
1307
- response_data = self.api_client.call_api(
1308
- *_param,
1309
- _request_timeout=_request_timeout
1310
- )
1311
- response_data.read()
1312
- return self.api_client.response_deserialize(
1313
- response_data=response_data,
1314
- response_types_map=_response_types_map,
1315
- )
1316
-
1317
-
1318
- @validate_call
1319
- def get_vertex_datasource_without_preload_content(
1320
- self,
1321
- graph_name: StrictStr,
1322
- type_name: StrictStr,
1323
- _request_timeout: Union[
1324
- None,
1325
- Annotated[StrictFloat, Field(gt=0)],
1326
- Tuple[
1327
- Annotated[StrictFloat, Field(gt=0)],
1328
- Annotated[StrictFloat, Field(gt=0)]
1329
- ]
1330
- ] = None,
1331
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1332
- _content_type: Optional[StrictStr] = None,
1333
- _headers: Optional[Dict[StrictStr, Any]] = None,
1334
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1335
- ) -> RESTResponseType:
1336
- """get_vertex_datasource
1337
-
1338
- Get vertex data source
1339
-
1340
- :param graph_name: (required)
1341
- :type graph_name: str
1342
- :param type_name: (required)
1343
- :type type_name: str
1344
- :param _request_timeout: timeout setting for this request. If one
1345
- number provided, it will be total request
1346
- timeout. It can also be a pair (tuple) of
1347
- (connection, read) timeouts.
1348
- :type _request_timeout: int, tuple(int, int), optional
1349
- :param _request_auth: set to override the auth_settings for an a single
1350
- request; this effectively ignores the
1351
- authentication in the spec for a single request.
1352
- :type _request_auth: dict, optional
1353
- :param _content_type: force content-type for the request.
1354
- :type _content_type: str, Optional
1355
- :param _headers: set to override the headers for a single
1356
- request; this effectively ignores the headers
1357
- in the spec for a single request.
1358
- :type _headers: dict, optional
1359
- :param _host_index: set to override the host_index for a single
1360
- request; this effectively ignores the host_index
1361
- in the spec for a single request.
1362
- :type _host_index: int, optional
1363
- :return: Returns the result object.
1364
- """ # noqa: E501
1365
-
1366
- _param = self._get_vertex_datasource_serialize(
1367
- graph_name=graph_name,
1368
- type_name=type_name,
1369
- _request_auth=_request_auth,
1370
- _content_type=_content_type,
1371
- _headers=_headers,
1372
- _host_index=_host_index
1373
- )
1374
-
1375
- _response_types_map: Dict[str, Optional[str]] = {
1376
- '200': "VertexDataSource",
1377
- }
1378
- response_data = self.api_client.call_api(
1379
- *_param,
1380
- _request_timeout=_request_timeout
1381
- )
1382
- return response_data.response
1383
-
1384
-
1385
- def _get_vertex_datasource_serialize(
1386
- self,
1387
- graph_name,
1388
- type_name,
1389
- _request_auth,
1390
- _content_type,
1391
- _headers,
1392
- _host_index,
1393
- ) -> RequestSerialized:
1394
-
1395
- _host = None
1396
-
1397
- _collection_formats: Dict[str, str] = {
1398
- }
1399
-
1400
- _path_params: Dict[str, str] = {}
1401
- _query_params: List[Tuple[str, str]] = []
1402
- _header_params: Dict[str, Optional[str]] = _headers or {}
1403
- _form_params: List[Tuple[str, str]] = []
1404
- _files: Dict[str, str] = {}
1405
- _body_params: Optional[bytes] = None
1406
-
1407
- # process the path parameters
1408
- if graph_name is not None:
1409
- _path_params['graph_name'] = graph_name
1410
- if type_name is not None:
1411
- _path_params['type_name'] = type_name
1412
- # process the query parameters
1413
- # process the header parameters
1414
- # process the form parameters
1415
- # process the body parameter
1416
-
1417
-
1418
- # set the HTTP header `Accept`
1419
- _header_params['Accept'] = self.api_client.select_header_accept(
1420
- [
1421
- 'application/json'
1422
- ]
1423
- )
1424
-
1425
-
1426
- # authentication setting
1427
- _auth_settings: List[str] = [
1428
- ]
1429
-
1430
- return self.api_client.param_serialize(
1431
- method='GET',
1432
- resource_path='/api/v1/graph/{graph_name}/datasource/vertex_datasource/{type_name}',
1433
- path_params=_path_params,
1434
- query_params=_query_params,
1435
- header_params=_header_params,
1436
- body=_body_params,
1437
- post_params=_form_params,
1438
- files=_files,
1439
- auth_settings=_auth_settings,
1440
- collection_formats=_collection_formats,
1441
- _host=_host,
1442
- _request_auth=_request_auth
1443
- )
1444
-
1445
-
1446
-
1447
-
1448
- @validate_call
1449
- def import_datasource(
1450
- self,
1451
- graph_name: StrictStr,
1452
- data_source: DataSource,
1453
- _request_timeout: Union[
1454
- None,
1455
- Annotated[StrictFloat, Field(gt=0)],
1456
- Tuple[
1457
- Annotated[StrictFloat, Field(gt=0)],
1458
- Annotated[StrictFloat, Field(gt=0)]
1459
- ]
1460
- ] = None,
1461
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1462
- _content_type: Optional[StrictStr] = None,
1463
- _headers: Optional[Dict[StrictStr, Any]] = None,
1464
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1465
- ) -> str:
1466
- """import_datasource
1467
-
1468
- Import data source in batch
1469
-
1470
- :param graph_name: (required)
1471
- :type graph_name: str
1472
- :param data_source: (required)
1473
- :type data_source: DataSource
1474
- :param _request_timeout: timeout setting for this request. If one
1475
- number provided, it will be total request
1476
- timeout. It can also be a pair (tuple) of
1477
- (connection, read) timeouts.
1478
- :type _request_timeout: int, tuple(int, int), optional
1479
- :param _request_auth: set to override the auth_settings for an a single
1480
- request; this effectively ignores the
1481
- authentication in the spec for a single request.
1482
- :type _request_auth: dict, optional
1483
- :param _content_type: force content-type for the request.
1484
- :type _content_type: str, Optional
1485
- :param _headers: set to override the headers for a single
1486
- request; this effectively ignores the headers
1487
- in the spec for a single request.
1488
- :type _headers: dict, optional
1489
- :param _host_index: set to override the host_index for a single
1490
- request; this effectively ignores the host_index
1491
- in the spec for a single request.
1492
- :type _host_index: int, optional
1493
- :return: Returns the result object.
1494
- """ # noqa: E501
1495
-
1496
- _param = self._import_datasource_serialize(
1497
- graph_name=graph_name,
1498
- data_source=data_source,
1499
- _request_auth=_request_auth,
1500
- _content_type=_content_type,
1501
- _headers=_headers,
1502
- _host_index=_host_index
1503
- )
1504
-
1505
- _response_types_map: Dict[str, Optional[str]] = {
1506
- '200': "str",
1507
- }
1508
- response_data = self.api_client.call_api(
1509
- *_param,
1510
- _request_timeout=_request_timeout
1511
- )
1512
- response_data.read()
1513
- return self.api_client.response_deserialize(
1514
- response_data=response_data,
1515
- response_types_map=_response_types_map,
1516
- ).data
1517
-
1518
-
1519
- @validate_call
1520
- def import_datasource_with_http_info(
1521
- self,
1522
- graph_name: StrictStr,
1523
- data_source: DataSource,
1524
- _request_timeout: Union[
1525
- None,
1526
- Annotated[StrictFloat, Field(gt=0)],
1527
- Tuple[
1528
- Annotated[StrictFloat, Field(gt=0)],
1529
- Annotated[StrictFloat, Field(gt=0)]
1530
- ]
1531
- ] = None,
1532
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1533
- _content_type: Optional[StrictStr] = None,
1534
- _headers: Optional[Dict[StrictStr, Any]] = None,
1535
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1536
- ) -> ApiResponse[str]:
1537
- """import_datasource
1538
-
1539
- Import data source in batch
1540
-
1541
- :param graph_name: (required)
1542
- :type graph_name: str
1543
- :param data_source: (required)
1544
- :type data_source: DataSource
1545
- :param _request_timeout: timeout setting for this request. If one
1546
- number provided, it will be total request
1547
- timeout. It can also be a pair (tuple) of
1548
- (connection, read) timeouts.
1549
- :type _request_timeout: int, tuple(int, int), optional
1550
- :param _request_auth: set to override the auth_settings for an a single
1551
- request; this effectively ignores the
1552
- authentication in the spec for a single request.
1553
- :type _request_auth: dict, optional
1554
- :param _content_type: force content-type for the request.
1555
- :type _content_type: str, Optional
1556
- :param _headers: set to override the headers for a single
1557
- request; this effectively ignores the headers
1558
- in the spec for a single request.
1559
- :type _headers: dict, optional
1560
- :param _host_index: set to override the host_index for a single
1561
- request; this effectively ignores the host_index
1562
- in the spec for a single request.
1563
- :type _host_index: int, optional
1564
- :return: Returns the result object.
1565
- """ # noqa: E501
1566
-
1567
- _param = self._import_datasource_serialize(
1568
- graph_name=graph_name,
1569
- data_source=data_source,
1570
- _request_auth=_request_auth,
1571
- _content_type=_content_type,
1572
- _headers=_headers,
1573
- _host_index=_host_index
1574
- )
1575
-
1576
- _response_types_map: Dict[str, Optional[str]] = {
1577
- '200': "str",
1578
- }
1579
- response_data = self.api_client.call_api(
1580
- *_param,
1581
- _request_timeout=_request_timeout
1582
- )
1583
- response_data.read()
1584
- return self.api_client.response_deserialize(
1585
- response_data=response_data,
1586
- response_types_map=_response_types_map,
1587
- )
1588
-
1589
-
1590
- @validate_call
1591
- def import_datasource_without_preload_content(
1592
- self,
1593
- graph_name: StrictStr,
1594
- data_source: DataSource,
1595
- _request_timeout: Union[
1596
- None,
1597
- Annotated[StrictFloat, Field(gt=0)],
1598
- Tuple[
1599
- Annotated[StrictFloat, Field(gt=0)],
1600
- Annotated[StrictFloat, Field(gt=0)]
1601
- ]
1602
- ] = None,
1603
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1604
- _content_type: Optional[StrictStr] = None,
1605
- _headers: Optional[Dict[StrictStr, Any]] = None,
1606
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1607
- ) -> RESTResponseType:
1608
- """import_datasource
1609
-
1610
- Import data source in batch
1611
-
1612
- :param graph_name: (required)
1613
- :type graph_name: str
1614
- :param data_source: (required)
1615
- :type data_source: DataSource
1616
- :param _request_timeout: timeout setting for this request. If one
1617
- number provided, it will be total request
1618
- timeout. It can also be a pair (tuple) of
1619
- (connection, read) timeouts.
1620
- :type _request_timeout: int, tuple(int, int), optional
1621
- :param _request_auth: set to override the auth_settings for an a single
1622
- request; this effectively ignores the
1623
- authentication in the spec for a single request.
1624
- :type _request_auth: dict, optional
1625
- :param _content_type: force content-type for the request.
1626
- :type _content_type: str, Optional
1627
- :param _headers: set to override the headers for a single
1628
- request; this effectively ignores the headers
1629
- in the spec for a single request.
1630
- :type _headers: dict, optional
1631
- :param _host_index: set to override the host_index for a single
1632
- request; this effectively ignores the host_index
1633
- in the spec for a single request.
1634
- :type _host_index: int, optional
1635
- :return: Returns the result object.
1636
- """ # noqa: E501
1637
-
1638
- _param = self._import_datasource_serialize(
1639
- graph_name=graph_name,
1640
- data_source=data_source,
1641
- _request_auth=_request_auth,
1642
- _content_type=_content_type,
1643
- _headers=_headers,
1644
- _host_index=_host_index
1645
- )
1646
-
1647
- _response_types_map: Dict[str, Optional[str]] = {
1648
- '200': "str",
1649
- }
1650
- response_data = self.api_client.call_api(
1651
- *_param,
1652
- _request_timeout=_request_timeout
1653
- )
1654
- return response_data.response
1655
-
1656
-
1657
- def _import_datasource_serialize(
1658
- self,
1659
- graph_name,
1660
- data_source,
1661
- _request_auth,
1662
- _content_type,
1663
- _headers,
1664
- _host_index,
1665
- ) -> RequestSerialized:
1666
-
1667
- _host = None
1668
-
1669
- _collection_formats: Dict[str, str] = {
1670
- }
1671
-
1672
- _path_params: Dict[str, str] = {}
1673
- _query_params: List[Tuple[str, str]] = []
1674
- _header_params: Dict[str, Optional[str]] = _headers or {}
1675
- _form_params: List[Tuple[str, str]] = []
1676
- _files: Dict[str, str] = {}
1677
- _body_params: Optional[bytes] = None
1678
-
1679
- # process the path parameters
1680
- if graph_name is not None:
1681
- _path_params['graph_name'] = graph_name
1682
- # process the query parameters
1683
- # process the header parameters
1684
- # process the form parameters
1685
- # process the body parameter
1686
- if data_source is not None:
1687
- _body_params = data_source
1688
-
1689
-
1690
- # set the HTTP header `Accept`
1691
- _header_params['Accept'] = self.api_client.select_header_accept(
1692
- [
1693
- 'application/json'
1694
- ]
1695
- )
1696
-
1697
- # set the HTTP header `Content-Type`
1698
- if _content_type:
1699
- _header_params['Content-Type'] = _content_type
1700
- else:
1701
- _default_content_type = (
1702
- self.api_client.select_header_content_type(
1703
- [
1704
- 'application/json'
1705
- ]
1706
- )
1707
- )
1708
- if _default_content_type is not None:
1709
- _header_params['Content-Type'] = _default_content_type
1710
-
1711
- # authentication setting
1712
- _auth_settings: List[str] = [
1713
- ]
1714
-
1715
- return self.api_client.param_serialize(
1716
- method='POST',
1717
- resource_path='/api/v1/graph/{graph_name}/datasource',
1718
- path_params=_path_params,
1719
- query_params=_query_params,
1720
- header_params=_header_params,
1721
- body=_body_params,
1722
- post_params=_form_params,
1723
- files=_files,
1724
- auth_settings=_auth_settings,
1725
- collection_formats=_collection_formats,
1726
- _host=_host,
1727
- _request_auth=_request_auth
1728
- )
1729
-
1730
-
1731
-
1732
-
1733
- @validate_call
1734
- def unbind_edge_datasource(
1735
- self,
1736
- graph_name: StrictStr,
1737
- type_name: StrictStr,
1738
- source_vertex_type: StrictStr,
1739
- destination_vertex_type: StrictStr,
1740
- _request_timeout: Union[
1741
- None,
1742
- Annotated[StrictFloat, Field(gt=0)],
1743
- Tuple[
1744
- Annotated[StrictFloat, Field(gt=0)],
1745
- Annotated[StrictFloat, Field(gt=0)]
1746
- ]
1747
- ] = None,
1748
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1749
- _content_type: Optional[StrictStr] = None,
1750
- _headers: Optional[Dict[StrictStr, Any]] = None,
1751
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1752
- ) -> str:
1753
- """unbind_edge_datasource
1754
-
1755
- Unbind datasource on an edge type
1756
-
1757
- :param graph_name: (required)
1758
- :type graph_name: str
1759
- :param type_name: (required)
1760
- :type type_name: str
1761
- :param source_vertex_type: (required)
1762
- :type source_vertex_type: str
1763
- :param destination_vertex_type: (required)
1764
- :type destination_vertex_type: str
1765
- :param _request_timeout: timeout setting for this request. If one
1766
- number provided, it will be total request
1767
- timeout. It can also be a pair (tuple) of
1768
- (connection, read) timeouts.
1769
- :type _request_timeout: int, tuple(int, int), optional
1770
- :param _request_auth: set to override the auth_settings for an a single
1771
- request; this effectively ignores the
1772
- authentication in the spec for a single request.
1773
- :type _request_auth: dict, optional
1774
- :param _content_type: force content-type for the request.
1775
- :type _content_type: str, Optional
1776
- :param _headers: set to override the headers for a single
1777
- request; this effectively ignores the headers
1778
- in the spec for a single request.
1779
- :type _headers: dict, optional
1780
- :param _host_index: set to override the host_index for a single
1781
- request; this effectively ignores the host_index
1782
- in the spec for a single request.
1783
- :type _host_index: int, optional
1784
- :return: Returns the result object.
1785
- """ # noqa: E501
1786
-
1787
- _param = self._unbind_edge_datasource_serialize(
1788
- graph_name=graph_name,
1789
- type_name=type_name,
1790
- source_vertex_type=source_vertex_type,
1791
- destination_vertex_type=destination_vertex_type,
1792
- _request_auth=_request_auth,
1793
- _content_type=_content_type,
1794
- _headers=_headers,
1795
- _host_index=_host_index
1796
- )
1797
-
1798
- _response_types_map: Dict[str, Optional[str]] = {
1799
- '200': "str",
1800
- }
1801
- response_data = self.api_client.call_api(
1802
- *_param,
1803
- _request_timeout=_request_timeout
1804
- )
1805
- response_data.read()
1806
- return self.api_client.response_deserialize(
1807
- response_data=response_data,
1808
- response_types_map=_response_types_map,
1809
- ).data
1810
-
1811
-
1812
- @validate_call
1813
- def unbind_edge_datasource_with_http_info(
1814
- self,
1815
- graph_name: StrictStr,
1816
- type_name: StrictStr,
1817
- source_vertex_type: StrictStr,
1818
- destination_vertex_type: StrictStr,
1819
- _request_timeout: Union[
1820
- None,
1821
- Annotated[StrictFloat, Field(gt=0)],
1822
- Tuple[
1823
- Annotated[StrictFloat, Field(gt=0)],
1824
- Annotated[StrictFloat, Field(gt=0)]
1825
- ]
1826
- ] = None,
1827
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1828
- _content_type: Optional[StrictStr] = None,
1829
- _headers: Optional[Dict[StrictStr, Any]] = None,
1830
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1831
- ) -> ApiResponse[str]:
1832
- """unbind_edge_datasource
1833
-
1834
- Unbind datasource on an edge type
1835
-
1836
- :param graph_name: (required)
1837
- :type graph_name: str
1838
- :param type_name: (required)
1839
- :type type_name: str
1840
- :param source_vertex_type: (required)
1841
- :type source_vertex_type: str
1842
- :param destination_vertex_type: (required)
1843
- :type destination_vertex_type: str
1844
- :param _request_timeout: timeout setting for this request. If one
1845
- number provided, it will be total request
1846
- timeout. It can also be a pair (tuple) of
1847
- (connection, read) timeouts.
1848
- :type _request_timeout: int, tuple(int, int), optional
1849
- :param _request_auth: set to override the auth_settings for an a single
1850
- request; this effectively ignores the
1851
- authentication in the spec for a single request.
1852
- :type _request_auth: dict, optional
1853
- :param _content_type: force content-type for the request.
1854
- :type _content_type: str, Optional
1855
- :param _headers: set to override the headers for a single
1856
- request; this effectively ignores the headers
1857
- in the spec for a single request.
1858
- :type _headers: dict, optional
1859
- :param _host_index: set to override the host_index for a single
1860
- request; this effectively ignores the host_index
1861
- in the spec for a single request.
1862
- :type _host_index: int, optional
1863
- :return: Returns the result object.
1864
- """ # noqa: E501
1865
-
1866
- _param = self._unbind_edge_datasource_serialize(
1867
- graph_name=graph_name,
1868
- type_name=type_name,
1869
- source_vertex_type=source_vertex_type,
1870
- destination_vertex_type=destination_vertex_type,
1871
- _request_auth=_request_auth,
1872
- _content_type=_content_type,
1873
- _headers=_headers,
1874
- _host_index=_host_index
1875
- )
1876
-
1877
- _response_types_map: Dict[str, Optional[str]] = {
1878
- '200': "str",
1879
- }
1880
- response_data = self.api_client.call_api(
1881
- *_param,
1882
- _request_timeout=_request_timeout
1883
- )
1884
- response_data.read()
1885
- return self.api_client.response_deserialize(
1886
- response_data=response_data,
1887
- response_types_map=_response_types_map,
1888
- )
1889
-
1890
-
1891
- @validate_call
1892
- def unbind_edge_datasource_without_preload_content(
1893
- self,
1894
- graph_name: StrictStr,
1895
- type_name: StrictStr,
1896
- source_vertex_type: StrictStr,
1897
- destination_vertex_type: StrictStr,
1898
- _request_timeout: Union[
1899
- None,
1900
- Annotated[StrictFloat, Field(gt=0)],
1901
- Tuple[
1902
- Annotated[StrictFloat, Field(gt=0)],
1903
- Annotated[StrictFloat, Field(gt=0)]
1904
- ]
1905
- ] = None,
1906
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1907
- _content_type: Optional[StrictStr] = None,
1908
- _headers: Optional[Dict[StrictStr, Any]] = None,
1909
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1910
- ) -> RESTResponseType:
1911
- """unbind_edge_datasource
1912
-
1913
- Unbind datasource on an edge type
1914
-
1915
- :param graph_name: (required)
1916
- :type graph_name: str
1917
- :param type_name: (required)
1918
- :type type_name: str
1919
- :param source_vertex_type: (required)
1920
- :type source_vertex_type: str
1921
- :param destination_vertex_type: (required)
1922
- :type destination_vertex_type: str
1923
- :param _request_timeout: timeout setting for this request. If one
1924
- number provided, it will be total request
1925
- timeout. It can also be a pair (tuple) of
1926
- (connection, read) timeouts.
1927
- :type _request_timeout: int, tuple(int, int), optional
1928
- :param _request_auth: set to override the auth_settings for an a single
1929
- request; this effectively ignores the
1930
- authentication in the spec for a single request.
1931
- :type _request_auth: dict, optional
1932
- :param _content_type: force content-type for the request.
1933
- :type _content_type: str, Optional
1934
- :param _headers: set to override the headers for a single
1935
- request; this effectively ignores the headers
1936
- in the spec for a single request.
1937
- :type _headers: dict, optional
1938
- :param _host_index: set to override the host_index for a single
1939
- request; this effectively ignores the host_index
1940
- in the spec for a single request.
1941
- :type _host_index: int, optional
1942
- :return: Returns the result object.
1943
- """ # noqa: E501
1944
-
1945
- _param = self._unbind_edge_datasource_serialize(
1946
- graph_name=graph_name,
1947
- type_name=type_name,
1948
- source_vertex_type=source_vertex_type,
1949
- destination_vertex_type=destination_vertex_type,
1950
- _request_auth=_request_auth,
1951
- _content_type=_content_type,
1952
- _headers=_headers,
1953
- _host_index=_host_index
1954
- )
1955
-
1956
- _response_types_map: Dict[str, Optional[str]] = {
1957
- '200': "str",
1958
- }
1959
- response_data = self.api_client.call_api(
1960
- *_param,
1961
- _request_timeout=_request_timeout
1962
- )
1963
- return response_data.response
1964
-
1965
-
1966
- def _unbind_edge_datasource_serialize(
1967
- self,
1968
- graph_name,
1969
- type_name,
1970
- source_vertex_type,
1971
- destination_vertex_type,
1972
- _request_auth,
1973
- _content_type,
1974
- _headers,
1975
- _host_index,
1976
- ) -> RequestSerialized:
1977
-
1978
- _host = None
1979
-
1980
- _collection_formats: Dict[str, str] = {
1981
- }
1982
-
1983
- _path_params: Dict[str, str] = {}
1984
- _query_params: List[Tuple[str, str]] = []
1985
- _header_params: Dict[str, Optional[str]] = _headers or {}
1986
- _form_params: List[Tuple[str, str]] = []
1987
- _files: Dict[str, str] = {}
1988
- _body_params: Optional[bytes] = None
1989
-
1990
- # process the path parameters
1991
- if graph_name is not None:
1992
- _path_params['graph_name'] = graph_name
1993
- if type_name is not None:
1994
- _path_params['type_name'] = type_name
1995
- # process the query parameters
1996
- if source_vertex_type is not None:
1997
-
1998
- _query_params.append(('source_vertex_type', source_vertex_type))
1999
-
2000
- if destination_vertex_type is not None:
2001
-
2002
- _query_params.append(('destination_vertex_type', destination_vertex_type))
2003
-
2004
- # process the header parameters
2005
- # process the form parameters
2006
- # process the body parameter
2007
-
2008
-
2009
- # set the HTTP header `Accept`
2010
- _header_params['Accept'] = self.api_client.select_header_accept(
2011
- [
2012
- 'application/json'
2013
- ]
2014
- )
2015
-
2016
-
2017
- # authentication setting
2018
- _auth_settings: List[str] = [
2019
- ]
2020
-
2021
- return self.api_client.param_serialize(
2022
- method='DELETE',
2023
- resource_path='/api/v1/graph/{graph_name}/datasource/edge_datasource/{type_name}',
2024
- path_params=_path_params,
2025
- query_params=_query_params,
2026
- header_params=_header_params,
2027
- body=_body_params,
2028
- post_params=_form_params,
2029
- files=_files,
2030
- auth_settings=_auth_settings,
2031
- collection_formats=_collection_formats,
2032
- _host=_host,
2033
- _request_auth=_request_auth
2034
- )
2035
-
2036
-
2037
-
2038
-
2039
- @validate_call
2040
- def unbind_vertex_datasource(
2041
- self,
2042
- graph_name: StrictStr,
2043
- type_name: StrictStr,
2044
- _request_timeout: Union[
2045
- None,
2046
- Annotated[StrictFloat, Field(gt=0)],
2047
- Tuple[
2048
- Annotated[StrictFloat, Field(gt=0)],
2049
- Annotated[StrictFloat, Field(gt=0)]
2050
- ]
2051
- ] = None,
2052
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2053
- _content_type: Optional[StrictStr] = None,
2054
- _headers: Optional[Dict[StrictStr, Any]] = None,
2055
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2056
- ) -> str:
2057
- """unbind_vertex_datasource
2058
-
2059
- Unbind datasource on a vertex type
2060
-
2061
- :param graph_name: (required)
2062
- :type graph_name: str
2063
- :param type_name: (required)
2064
- :type type_name: str
2065
- :param _request_timeout: timeout setting for this request. If one
2066
- number provided, it will be total request
2067
- timeout. It can also be a pair (tuple) of
2068
- (connection, read) timeouts.
2069
- :type _request_timeout: int, tuple(int, int), optional
2070
- :param _request_auth: set to override the auth_settings for an a single
2071
- request; this effectively ignores the
2072
- authentication in the spec for a single request.
2073
- :type _request_auth: dict, optional
2074
- :param _content_type: force content-type for the request.
2075
- :type _content_type: str, Optional
2076
- :param _headers: set to override the headers for a single
2077
- request; this effectively ignores the headers
2078
- in the spec for a single request.
2079
- :type _headers: dict, optional
2080
- :param _host_index: set to override the host_index for a single
2081
- request; this effectively ignores the host_index
2082
- in the spec for a single request.
2083
- :type _host_index: int, optional
2084
- :return: Returns the result object.
2085
- """ # noqa: E501
2086
-
2087
- _param = self._unbind_vertex_datasource_serialize(
2088
- graph_name=graph_name,
2089
- type_name=type_name,
2090
- _request_auth=_request_auth,
2091
- _content_type=_content_type,
2092
- _headers=_headers,
2093
- _host_index=_host_index
2094
- )
2095
-
2096
- _response_types_map: Dict[str, Optional[str]] = {
2097
- '200': "str",
2098
- }
2099
- response_data = self.api_client.call_api(
2100
- *_param,
2101
- _request_timeout=_request_timeout
2102
- )
2103
- response_data.read()
2104
- return self.api_client.response_deserialize(
2105
- response_data=response_data,
2106
- response_types_map=_response_types_map,
2107
- ).data
2108
-
2109
-
2110
- @validate_call
2111
- def unbind_vertex_datasource_with_http_info(
2112
- self,
2113
- graph_name: StrictStr,
2114
- type_name: StrictStr,
2115
- _request_timeout: Union[
2116
- None,
2117
- Annotated[StrictFloat, Field(gt=0)],
2118
- Tuple[
2119
- Annotated[StrictFloat, Field(gt=0)],
2120
- Annotated[StrictFloat, Field(gt=0)]
2121
- ]
2122
- ] = None,
2123
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2124
- _content_type: Optional[StrictStr] = None,
2125
- _headers: Optional[Dict[StrictStr, Any]] = None,
2126
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2127
- ) -> ApiResponse[str]:
2128
- """unbind_vertex_datasource
2129
-
2130
- Unbind datasource on a vertex type
2131
-
2132
- :param graph_name: (required)
2133
- :type graph_name: str
2134
- :param type_name: (required)
2135
- :type type_name: str
2136
- :param _request_timeout: timeout setting for this request. If one
2137
- number provided, it will be total request
2138
- timeout. It can also be a pair (tuple) of
2139
- (connection, read) timeouts.
2140
- :type _request_timeout: int, tuple(int, int), optional
2141
- :param _request_auth: set to override the auth_settings for an a single
2142
- request; this effectively ignores the
2143
- authentication in the spec for a single request.
2144
- :type _request_auth: dict, optional
2145
- :param _content_type: force content-type for the request.
2146
- :type _content_type: str, Optional
2147
- :param _headers: set to override the headers for a single
2148
- request; this effectively ignores the headers
2149
- in the spec for a single request.
2150
- :type _headers: dict, optional
2151
- :param _host_index: set to override the host_index for a single
2152
- request; this effectively ignores the host_index
2153
- in the spec for a single request.
2154
- :type _host_index: int, optional
2155
- :return: Returns the result object.
2156
- """ # noqa: E501
2157
-
2158
- _param = self._unbind_vertex_datasource_serialize(
2159
- graph_name=graph_name,
2160
- type_name=type_name,
2161
- _request_auth=_request_auth,
2162
- _content_type=_content_type,
2163
- _headers=_headers,
2164
- _host_index=_host_index
2165
- )
2166
-
2167
- _response_types_map: Dict[str, Optional[str]] = {
2168
- '200': "str",
2169
- }
2170
- response_data = self.api_client.call_api(
2171
- *_param,
2172
- _request_timeout=_request_timeout
2173
- )
2174
- response_data.read()
2175
- return self.api_client.response_deserialize(
2176
- response_data=response_data,
2177
- response_types_map=_response_types_map,
2178
- )
2179
-
2180
-
2181
- @validate_call
2182
- def unbind_vertex_datasource_without_preload_content(
2183
- self,
2184
- graph_name: StrictStr,
2185
- type_name: StrictStr,
2186
- _request_timeout: Union[
2187
- None,
2188
- Annotated[StrictFloat, Field(gt=0)],
2189
- Tuple[
2190
- Annotated[StrictFloat, Field(gt=0)],
2191
- Annotated[StrictFloat, Field(gt=0)]
2192
- ]
2193
- ] = None,
2194
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2195
- _content_type: Optional[StrictStr] = None,
2196
- _headers: Optional[Dict[StrictStr, Any]] = None,
2197
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2198
- ) -> RESTResponseType:
2199
- """unbind_vertex_datasource
2200
-
2201
- Unbind datasource on a vertex type
2202
-
2203
- :param graph_name: (required)
2204
- :type graph_name: str
2205
- :param type_name: (required)
2206
- :type type_name: str
2207
- :param _request_timeout: timeout setting for this request. If one
2208
- number provided, it will be total request
2209
- timeout. It can also be a pair (tuple) of
2210
- (connection, read) timeouts.
2211
- :type _request_timeout: int, tuple(int, int), optional
2212
- :param _request_auth: set to override the auth_settings for an a single
2213
- request; this effectively ignores the
2214
- authentication in the spec for a single request.
2215
- :type _request_auth: dict, optional
2216
- :param _content_type: force content-type for the request.
2217
- :type _content_type: str, Optional
2218
- :param _headers: set to override the headers for a single
2219
- request; this effectively ignores the headers
2220
- in the spec for a single request.
2221
- :type _headers: dict, optional
2222
- :param _host_index: set to override the host_index for a single
2223
- request; this effectively ignores the host_index
2224
- in the spec for a single request.
2225
- :type _host_index: int, optional
2226
- :return: Returns the result object.
2227
- """ # noqa: E501
2228
-
2229
- _param = self._unbind_vertex_datasource_serialize(
2230
- graph_name=graph_name,
2231
- type_name=type_name,
2232
- _request_auth=_request_auth,
2233
- _content_type=_content_type,
2234
- _headers=_headers,
2235
- _host_index=_host_index
2236
- )
2237
-
2238
- _response_types_map: Dict[str, Optional[str]] = {
2239
- '200': "str",
2240
- }
2241
- response_data = self.api_client.call_api(
2242
- *_param,
2243
- _request_timeout=_request_timeout
2244
- )
2245
- return response_data.response
2246
-
2247
-
2248
- def _unbind_vertex_datasource_serialize(
2249
- self,
2250
- graph_name,
2251
- type_name,
2252
- _request_auth,
2253
- _content_type,
2254
- _headers,
2255
- _host_index,
2256
- ) -> RequestSerialized:
2257
-
2258
- _host = None
2259
-
2260
- _collection_formats: Dict[str, str] = {
2261
- }
2262
-
2263
- _path_params: Dict[str, str] = {}
2264
- _query_params: List[Tuple[str, str]] = []
2265
- _header_params: Dict[str, Optional[str]] = _headers or {}
2266
- _form_params: List[Tuple[str, str]] = []
2267
- _files: Dict[str, str] = {}
2268
- _body_params: Optional[bytes] = None
2269
-
2270
- # process the path parameters
2271
- if graph_name is not None:
2272
- _path_params['graph_name'] = graph_name
2273
- if type_name is not None:
2274
- _path_params['type_name'] = type_name
2275
- # process the query parameters
2276
- # process the header parameters
2277
- # process the form parameters
2278
- # process the body parameter
2279
-
2280
-
2281
- # set the HTTP header `Accept`
2282
- _header_params['Accept'] = self.api_client.select_header_accept(
2283
- [
2284
- 'application/json'
2285
- ]
2286
- )
2287
-
2288
-
2289
- # authentication setting
2290
- _auth_settings: List[str] = [
2291
- ]
2292
-
2293
- return self.api_client.param_serialize(
2294
- method='DELETE',
2295
- resource_path='/api/v1/graph/{graph_name}/datasource/vertex_datasource/{type_name}',
2296
- path_params=_path_params,
2297
- query_params=_query_params,
2298
- header_params=_header_params,
2299
- body=_body_params,
2300
- post_params=_form_params,
2301
- files=_files,
2302
- auth_settings=_auth_settings,
2303
- collection_formats=_collection_formats,
2304
- _host=_host,
2305
- _request_auth=_request_auth
2306
- )
2307
-
2308
-