graphscope-flex 0.27.0__3-py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. graphscope/flex/rest/__init__.py +97 -0
  2. graphscope/flex/rest/api/__init__.py +12 -0
  3. graphscope/flex/rest/api/alert_api.py +2780 -0
  4. graphscope/flex/rest/api/data_source_api.py +1173 -0
  5. graphscope/flex/rest/api/deployment_api.py +528 -0
  6. graphscope/flex/rest/api/graph_api.py +2803 -0
  7. graphscope/flex/rest/api/job_api.py +1356 -0
  8. graphscope/flex/rest/api/service_api.py +1311 -0
  9. graphscope/flex/rest/api/stored_procedure_api.py +1449 -0
  10. graphscope/flex/rest/api/utils_api.py +309 -0
  11. graphscope/flex/rest/api_client.py +759 -0
  12. graphscope/flex/rest/api_response.py +21 -0
  13. graphscope/flex/rest/configuration.py +437 -0
  14. graphscope/flex/rest/exceptions.py +200 -0
  15. graphscope/flex/rest/models/__init__.py +73 -0
  16. graphscope/flex/rest/models/base_edge_type.py +102 -0
  17. graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +105 -0
  18. graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner_x_csr_params.py +98 -0
  19. graphscope/flex/rest/models/base_property_meta.py +105 -0
  20. graphscope/flex/rest/models/base_vertex_type.py +96 -0
  21. graphscope/flex/rest/models/base_vertex_type_x_csr_params.py +88 -0
  22. graphscope/flex/rest/models/column_mapping.py +94 -0
  23. graphscope/flex/rest/models/column_mapping_column.py +90 -0
  24. graphscope/flex/rest/models/create_alert_receiver_request.py +103 -0
  25. graphscope/flex/rest/models/create_alert_rule_request.py +112 -0
  26. graphscope/flex/rest/models/create_dataloading_job_response.py +88 -0
  27. graphscope/flex/rest/models/create_edge_type.py +114 -0
  28. graphscope/flex/rest/models/create_graph_request.py +106 -0
  29. graphscope/flex/rest/models/create_graph_response.py +88 -0
  30. graphscope/flex/rest/models/create_graph_schema_request.py +106 -0
  31. graphscope/flex/rest/models/create_property_meta.py +100 -0
  32. graphscope/flex/rest/models/create_stored_proc_request.py +101 -0
  33. graphscope/flex/rest/models/create_stored_proc_response.py +88 -0
  34. graphscope/flex/rest/models/create_vertex_type.py +108 -0
  35. graphscope/flex/rest/models/dataloading_job_config.py +136 -0
  36. graphscope/flex/rest/models/dataloading_job_config_edges_inner.py +92 -0
  37. graphscope/flex/rest/models/dataloading_job_config_loading_config.py +104 -0
  38. graphscope/flex/rest/models/dataloading_job_config_loading_config_format.py +90 -0
  39. graphscope/flex/rest/models/dataloading_job_config_vertices_inner.py +88 -0
  40. graphscope/flex/rest/models/edge_mapping.py +122 -0
  41. graphscope/flex/rest/models/edge_mapping_type_triplet.py +92 -0
  42. graphscope/flex/rest/models/error.py +90 -0
  43. graphscope/flex/rest/models/get_alert_message_response.py +123 -0
  44. graphscope/flex/rest/models/get_alert_receiver_response.py +107 -0
  45. graphscope/flex/rest/models/get_alert_rule_response.py +114 -0
  46. graphscope/flex/rest/models/get_edge_type.py +116 -0
  47. graphscope/flex/rest/models/get_graph_response.py +126 -0
  48. graphscope/flex/rest/models/get_graph_schema_response.py +106 -0
  49. graphscope/flex/rest/models/get_property_meta.py +102 -0
  50. graphscope/flex/rest/models/get_stored_proc_response.py +128 -0
  51. graphscope/flex/rest/models/get_vertex_type.py +110 -0
  52. graphscope/flex/rest/models/gs_data_type.py +138 -0
  53. graphscope/flex/rest/models/job_status.py +107 -0
  54. graphscope/flex/rest/models/long_text.py +93 -0
  55. graphscope/flex/rest/models/node_status.py +94 -0
  56. graphscope/flex/rest/models/parameter.py +94 -0
  57. graphscope/flex/rest/models/primitive_type.py +95 -0
  58. graphscope/flex/rest/models/running_deployment_info.py +128 -0
  59. graphscope/flex/rest/models/running_deployment_status.py +105 -0
  60. graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +124 -0
  61. graphscope/flex/rest/models/schema_mapping.py +106 -0
  62. graphscope/flex/rest/models/service_status.py +105 -0
  63. graphscope/flex/rest/models/service_status_sdk_endpoints.py +94 -0
  64. graphscope/flex/rest/models/start_service_request.py +88 -0
  65. graphscope/flex/rest/models/stored_procedure_meta.py +124 -0
  66. graphscope/flex/rest/models/string_type.py +92 -0
  67. graphscope/flex/rest/models/string_type_string.py +124 -0
  68. graphscope/flex/rest/models/update_alert_message_status_request.py +97 -0
  69. graphscope/flex/rest/models/update_stored_proc_request.py +88 -0
  70. graphscope/flex/rest/models/upload_file_response.py +88 -0
  71. graphscope/flex/rest/models/vertex_mapping.py +100 -0
  72. graphscope/flex/rest/py.typed +0 -0
  73. graphscope/flex/rest/rest.py +256 -0
  74. graphscope_flex-0.27.0.dist-info/METADATA +17 -0
  75. graphscope_flex-0.27.0.dist-info/RECORD +77 -0
  76. graphscope_flex-0.27.0.dist-info/WHEEL +6 -0
  77. graphscope_flex-0.27.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2803 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ GraphScope FLEX HTTP SERVICE API
5
+
6
+ This is a specification for GraphScope FLEX HTTP service based on the OpenAPI 3.0 specification. You can find out more details about specification at [doc](https://swagger.io/specification/v3/). Some useful links: - [GraphScope Repository](https://github.com/alibaba/GraphScope) - [The Source API definition for GraphScope Interactive](https://github.com/GraphScope/portal/tree/main/httpservice)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: graphscope@alibaba-inc.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import StrictStr
21
+ from typing import Optional
22
+ from graphscope.flex.rest.models.create_edge_type import CreateEdgeType
23
+ from graphscope.flex.rest.models.create_graph_request import CreateGraphRequest
24
+ from graphscope.flex.rest.models.create_graph_response import CreateGraphResponse
25
+ from graphscope.flex.rest.models.create_graph_schema_request import CreateGraphSchemaRequest
26
+ from graphscope.flex.rest.models.create_vertex_type import CreateVertexType
27
+ from graphscope.flex.rest.models.get_graph_response import GetGraphResponse
28
+ from graphscope.flex.rest.models.get_graph_schema_response import GetGraphSchemaResponse
29
+
30
+ from graphscope.flex.rest.api_client import ApiClient, RequestSerialized
31
+ from graphscope.flex.rest.api_response import ApiResponse
32
+ from graphscope.flex.rest.rest import RESTResponseType
33
+
34
+
35
+ class GraphApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def create_edge_type(
50
+ self,
51
+ graph_id: StrictStr,
52
+ create_edge_type: Optional[CreateEdgeType] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> str:
66
+ """create_edge_type
67
+
68
+ Create a edge type
69
+
70
+ :param graph_id: (required)
71
+ :type graph_id: str
72
+ :param create_edge_type:
73
+ :type create_edge_type: CreateEdgeType
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._create_edge_type_serialize(
97
+ graph_id=graph_id,
98
+ create_edge_type=create_edge_type,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ '200': "str",
107
+ '400': "Error",
108
+ '500': "Error",
109
+ }
110
+ response_data = self.api_client.call_api(
111
+ *_param,
112
+ _request_timeout=_request_timeout
113
+ )
114
+ response_data.read()
115
+ return self.api_client.response_deserialize(
116
+ response_data=response_data,
117
+ response_types_map=_response_types_map,
118
+ ).data
119
+
120
+
121
+ @validate_call
122
+ def create_edge_type_with_http_info(
123
+ self,
124
+ graph_id: StrictStr,
125
+ create_edge_type: Optional[CreateEdgeType] = None,
126
+ _request_timeout: Union[
127
+ None,
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Tuple[
130
+ Annotated[StrictFloat, Field(gt=0)],
131
+ Annotated[StrictFloat, Field(gt=0)]
132
+ ]
133
+ ] = None,
134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
135
+ _content_type: Optional[StrictStr] = None,
136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
138
+ ) -> ApiResponse[str]:
139
+ """create_edge_type
140
+
141
+ Create a edge type
142
+
143
+ :param graph_id: (required)
144
+ :type graph_id: str
145
+ :param create_edge_type:
146
+ :type create_edge_type: CreateEdgeType
147
+ :param _request_timeout: timeout setting for this request. If one
148
+ number provided, it will be total request
149
+ timeout. It can also be a pair (tuple) of
150
+ (connection, read) timeouts.
151
+ :type _request_timeout: int, tuple(int, int), optional
152
+ :param _request_auth: set to override the auth_settings for an a single
153
+ request; this effectively ignores the
154
+ authentication in the spec for a single request.
155
+ :type _request_auth: dict, optional
156
+ :param _content_type: force content-type for the request.
157
+ :type _content_type: str, Optional
158
+ :param _headers: set to override the headers for a single
159
+ request; this effectively ignores the headers
160
+ in the spec for a single request.
161
+ :type _headers: dict, optional
162
+ :param _host_index: set to override the host_index for a single
163
+ request; this effectively ignores the host_index
164
+ in the spec for a single request.
165
+ :type _host_index: int, optional
166
+ :return: Returns the result object.
167
+ """ # noqa: E501
168
+
169
+ _param = self._create_edge_type_serialize(
170
+ graph_id=graph_id,
171
+ create_edge_type=create_edge_type,
172
+ _request_auth=_request_auth,
173
+ _content_type=_content_type,
174
+ _headers=_headers,
175
+ _host_index=_host_index
176
+ )
177
+
178
+ _response_types_map: Dict[str, Optional[str]] = {
179
+ '200': "str",
180
+ '400': "Error",
181
+ '500': "Error",
182
+ }
183
+ response_data = self.api_client.call_api(
184
+ *_param,
185
+ _request_timeout=_request_timeout
186
+ )
187
+ response_data.read()
188
+ return self.api_client.response_deserialize(
189
+ response_data=response_data,
190
+ response_types_map=_response_types_map,
191
+ )
192
+
193
+
194
+ @validate_call
195
+ def create_edge_type_without_preload_content(
196
+ self,
197
+ graph_id: StrictStr,
198
+ create_edge_type: Optional[CreateEdgeType] = None,
199
+ _request_timeout: Union[
200
+ None,
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Tuple[
203
+ Annotated[StrictFloat, Field(gt=0)],
204
+ Annotated[StrictFloat, Field(gt=0)]
205
+ ]
206
+ ] = None,
207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
208
+ _content_type: Optional[StrictStr] = None,
209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211
+ ) -> RESTResponseType:
212
+ """create_edge_type
213
+
214
+ Create a edge type
215
+
216
+ :param graph_id: (required)
217
+ :type graph_id: str
218
+ :param create_edge_type:
219
+ :type create_edge_type: CreateEdgeType
220
+ :param _request_timeout: timeout setting for this request. If one
221
+ number provided, it will be total request
222
+ timeout. It can also be a pair (tuple) of
223
+ (connection, read) timeouts.
224
+ :type _request_timeout: int, tuple(int, int), optional
225
+ :param _request_auth: set to override the auth_settings for an a single
226
+ request; this effectively ignores the
227
+ authentication in the spec for a single request.
228
+ :type _request_auth: dict, optional
229
+ :param _content_type: force content-type for the request.
230
+ :type _content_type: str, Optional
231
+ :param _headers: set to override the headers for a single
232
+ request; this effectively ignores the headers
233
+ in the spec for a single request.
234
+ :type _headers: dict, optional
235
+ :param _host_index: set to override the host_index for a single
236
+ request; this effectively ignores the host_index
237
+ in the spec for a single request.
238
+ :type _host_index: int, optional
239
+ :return: Returns the result object.
240
+ """ # noqa: E501
241
+
242
+ _param = self._create_edge_type_serialize(
243
+ graph_id=graph_id,
244
+ create_edge_type=create_edge_type,
245
+ _request_auth=_request_auth,
246
+ _content_type=_content_type,
247
+ _headers=_headers,
248
+ _host_index=_host_index
249
+ )
250
+
251
+ _response_types_map: Dict[str, Optional[str]] = {
252
+ '200': "str",
253
+ '400': "Error",
254
+ '500': "Error",
255
+ }
256
+ response_data = self.api_client.call_api(
257
+ *_param,
258
+ _request_timeout=_request_timeout
259
+ )
260
+ return response_data.response
261
+
262
+
263
+ def _create_edge_type_serialize(
264
+ self,
265
+ graph_id,
266
+ create_edge_type,
267
+ _request_auth,
268
+ _content_type,
269
+ _headers,
270
+ _host_index,
271
+ ) -> RequestSerialized:
272
+
273
+ _host = None
274
+
275
+ _collection_formats: Dict[str, str] = {
276
+ }
277
+
278
+ _path_params: Dict[str, str] = {}
279
+ _query_params: List[Tuple[str, str]] = []
280
+ _header_params: Dict[str, Optional[str]] = _headers or {}
281
+ _form_params: List[Tuple[str, str]] = []
282
+ _files: Dict[str, str] = {}
283
+ _body_params: Optional[bytes] = None
284
+
285
+ # process the path parameters
286
+ if graph_id is not None:
287
+ _path_params['graph_id'] = graph_id
288
+ # process the query parameters
289
+ # process the header parameters
290
+ # process the form parameters
291
+ # process the body parameter
292
+ if create_edge_type is not None:
293
+ _body_params = create_edge_type
294
+
295
+
296
+ # set the HTTP header `Accept`
297
+ _header_params['Accept'] = self.api_client.select_header_accept(
298
+ [
299
+ 'application/json'
300
+ ]
301
+ )
302
+
303
+ # set the HTTP header `Content-Type`
304
+ if _content_type:
305
+ _header_params['Content-Type'] = _content_type
306
+ else:
307
+ _default_content_type = (
308
+ self.api_client.select_header_content_type(
309
+ [
310
+ 'application/json'
311
+ ]
312
+ )
313
+ )
314
+ if _default_content_type is not None:
315
+ _header_params['Content-Type'] = _default_content_type
316
+
317
+ # authentication setting
318
+ _auth_settings: List[str] = [
319
+ ]
320
+
321
+ return self.api_client.param_serialize(
322
+ method='POST',
323
+ resource_path='/api/v1/graph/{graph_id}/schema/edge',
324
+ path_params=_path_params,
325
+ query_params=_query_params,
326
+ header_params=_header_params,
327
+ body=_body_params,
328
+ post_params=_form_params,
329
+ files=_files,
330
+ auth_settings=_auth_settings,
331
+ collection_formats=_collection_formats,
332
+ _host=_host,
333
+ _request_auth=_request_auth
334
+ )
335
+
336
+
337
+
338
+
339
+ @validate_call
340
+ def create_graph(
341
+ self,
342
+ create_graph_request: CreateGraphRequest,
343
+ _request_timeout: Union[
344
+ None,
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Tuple[
347
+ Annotated[StrictFloat, Field(gt=0)],
348
+ Annotated[StrictFloat, Field(gt=0)]
349
+ ]
350
+ ] = None,
351
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
352
+ _content_type: Optional[StrictStr] = None,
353
+ _headers: Optional[Dict[StrictStr, Any]] = None,
354
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
355
+ ) -> CreateGraphResponse:
356
+ """create_graph
357
+
358
+ Create a new graph
359
+
360
+ :param create_graph_request: (required)
361
+ :type create_graph_request: CreateGraphRequest
362
+ :param _request_timeout: timeout setting for this request. If one
363
+ number provided, it will be total request
364
+ timeout. It can also be a pair (tuple) of
365
+ (connection, read) timeouts.
366
+ :type _request_timeout: int, tuple(int, int), optional
367
+ :param _request_auth: set to override the auth_settings for an a single
368
+ request; this effectively ignores the
369
+ authentication in the spec for a single request.
370
+ :type _request_auth: dict, optional
371
+ :param _content_type: force content-type for the request.
372
+ :type _content_type: str, Optional
373
+ :param _headers: set to override the headers for a single
374
+ request; this effectively ignores the headers
375
+ in the spec for a single request.
376
+ :type _headers: dict, optional
377
+ :param _host_index: set to override the host_index for a single
378
+ request; this effectively ignores the host_index
379
+ in the spec for a single request.
380
+ :type _host_index: int, optional
381
+ :return: Returns the result object.
382
+ """ # noqa: E501
383
+
384
+ _param = self._create_graph_serialize(
385
+ create_graph_request=create_graph_request,
386
+ _request_auth=_request_auth,
387
+ _content_type=_content_type,
388
+ _headers=_headers,
389
+ _host_index=_host_index
390
+ )
391
+
392
+ _response_types_map: Dict[str, Optional[str]] = {
393
+ '200': "CreateGraphResponse",
394
+ '400': "Error",
395
+ '500': "Error",
396
+ }
397
+ response_data = self.api_client.call_api(
398
+ *_param,
399
+ _request_timeout=_request_timeout
400
+ )
401
+ response_data.read()
402
+ return self.api_client.response_deserialize(
403
+ response_data=response_data,
404
+ response_types_map=_response_types_map,
405
+ ).data
406
+
407
+
408
+ @validate_call
409
+ def create_graph_with_http_info(
410
+ self,
411
+ create_graph_request: CreateGraphRequest,
412
+ _request_timeout: Union[
413
+ None,
414
+ Annotated[StrictFloat, Field(gt=0)],
415
+ Tuple[
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Annotated[StrictFloat, Field(gt=0)]
418
+ ]
419
+ ] = None,
420
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
421
+ _content_type: Optional[StrictStr] = None,
422
+ _headers: Optional[Dict[StrictStr, Any]] = None,
423
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424
+ ) -> ApiResponse[CreateGraphResponse]:
425
+ """create_graph
426
+
427
+ Create a new graph
428
+
429
+ :param create_graph_request: (required)
430
+ :type create_graph_request: CreateGraphRequest
431
+ :param _request_timeout: timeout setting for this request. If one
432
+ number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :type _request_timeout: int, tuple(int, int), optional
436
+ :param _request_auth: set to override the auth_settings for an a single
437
+ request; this effectively ignores the
438
+ authentication in the spec for a single request.
439
+ :type _request_auth: dict, optional
440
+ :param _content_type: force content-type for the request.
441
+ :type _content_type: str, Optional
442
+ :param _headers: set to override the headers for a single
443
+ request; this effectively ignores the headers
444
+ in the spec for a single request.
445
+ :type _headers: dict, optional
446
+ :param _host_index: set to override the host_index for a single
447
+ request; this effectively ignores the host_index
448
+ in the spec for a single request.
449
+ :type _host_index: int, optional
450
+ :return: Returns the result object.
451
+ """ # noqa: E501
452
+
453
+ _param = self._create_graph_serialize(
454
+ create_graph_request=create_graph_request,
455
+ _request_auth=_request_auth,
456
+ _content_type=_content_type,
457
+ _headers=_headers,
458
+ _host_index=_host_index
459
+ )
460
+
461
+ _response_types_map: Dict[str, Optional[str]] = {
462
+ '200': "CreateGraphResponse",
463
+ '400': "Error",
464
+ '500': "Error",
465
+ }
466
+ response_data = self.api_client.call_api(
467
+ *_param,
468
+ _request_timeout=_request_timeout
469
+ )
470
+ response_data.read()
471
+ return self.api_client.response_deserialize(
472
+ response_data=response_data,
473
+ response_types_map=_response_types_map,
474
+ )
475
+
476
+
477
+ @validate_call
478
+ def create_graph_without_preload_content(
479
+ self,
480
+ create_graph_request: CreateGraphRequest,
481
+ _request_timeout: Union[
482
+ None,
483
+ Annotated[StrictFloat, Field(gt=0)],
484
+ Tuple[
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Annotated[StrictFloat, Field(gt=0)]
487
+ ]
488
+ ] = None,
489
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
490
+ _content_type: Optional[StrictStr] = None,
491
+ _headers: Optional[Dict[StrictStr, Any]] = None,
492
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
493
+ ) -> RESTResponseType:
494
+ """create_graph
495
+
496
+ Create a new graph
497
+
498
+ :param create_graph_request: (required)
499
+ :type create_graph_request: CreateGraphRequest
500
+ :param _request_timeout: timeout setting for this request. If one
501
+ number provided, it will be total request
502
+ timeout. It can also be a pair (tuple) of
503
+ (connection, read) timeouts.
504
+ :type _request_timeout: int, tuple(int, int), optional
505
+ :param _request_auth: set to override the auth_settings for an a single
506
+ request; this effectively ignores the
507
+ authentication in the spec for a single request.
508
+ :type _request_auth: dict, optional
509
+ :param _content_type: force content-type for the request.
510
+ :type _content_type: str, Optional
511
+ :param _headers: set to override the headers for a single
512
+ request; this effectively ignores the headers
513
+ in the spec for a single request.
514
+ :type _headers: dict, optional
515
+ :param _host_index: set to override the host_index for a single
516
+ request; this effectively ignores the host_index
517
+ in the spec for a single request.
518
+ :type _host_index: int, optional
519
+ :return: Returns the result object.
520
+ """ # noqa: E501
521
+
522
+ _param = self._create_graph_serialize(
523
+ create_graph_request=create_graph_request,
524
+ _request_auth=_request_auth,
525
+ _content_type=_content_type,
526
+ _headers=_headers,
527
+ _host_index=_host_index
528
+ )
529
+
530
+ _response_types_map: Dict[str, Optional[str]] = {
531
+ '200': "CreateGraphResponse",
532
+ '400': "Error",
533
+ '500': "Error",
534
+ }
535
+ response_data = self.api_client.call_api(
536
+ *_param,
537
+ _request_timeout=_request_timeout
538
+ )
539
+ return response_data.response
540
+
541
+
542
+ def _create_graph_serialize(
543
+ self,
544
+ create_graph_request,
545
+ _request_auth,
546
+ _content_type,
547
+ _headers,
548
+ _host_index,
549
+ ) -> RequestSerialized:
550
+
551
+ _host = None
552
+
553
+ _collection_formats: Dict[str, str] = {
554
+ }
555
+
556
+ _path_params: Dict[str, str] = {}
557
+ _query_params: List[Tuple[str, str]] = []
558
+ _header_params: Dict[str, Optional[str]] = _headers or {}
559
+ _form_params: List[Tuple[str, str]] = []
560
+ _files: Dict[str, str] = {}
561
+ _body_params: Optional[bytes] = None
562
+
563
+ # process the path parameters
564
+ # process the query parameters
565
+ # process the header parameters
566
+ # process the form parameters
567
+ # process the body parameter
568
+ if create_graph_request is not None:
569
+ _body_params = create_graph_request
570
+
571
+
572
+ # set the HTTP header `Accept`
573
+ _header_params['Accept'] = self.api_client.select_header_accept(
574
+ [
575
+ 'application/json'
576
+ ]
577
+ )
578
+
579
+ # set the HTTP header `Content-Type`
580
+ if _content_type:
581
+ _header_params['Content-Type'] = _content_type
582
+ else:
583
+ _default_content_type = (
584
+ self.api_client.select_header_content_type(
585
+ [
586
+ 'application/json'
587
+ ]
588
+ )
589
+ )
590
+ if _default_content_type is not None:
591
+ _header_params['Content-Type'] = _default_content_type
592
+
593
+ # authentication setting
594
+ _auth_settings: List[str] = [
595
+ ]
596
+
597
+ return self.api_client.param_serialize(
598
+ method='POST',
599
+ resource_path='/api/v1/graph',
600
+ path_params=_path_params,
601
+ query_params=_query_params,
602
+ header_params=_header_params,
603
+ body=_body_params,
604
+ post_params=_form_params,
605
+ files=_files,
606
+ auth_settings=_auth_settings,
607
+ collection_formats=_collection_formats,
608
+ _host=_host,
609
+ _request_auth=_request_auth
610
+ )
611
+
612
+
613
+
614
+
615
+ @validate_call
616
+ def create_vertex_type(
617
+ self,
618
+ graph_id: StrictStr,
619
+ create_vertex_type: CreateVertexType,
620
+ _request_timeout: Union[
621
+ None,
622
+ Annotated[StrictFloat, Field(gt=0)],
623
+ Tuple[
624
+ Annotated[StrictFloat, Field(gt=0)],
625
+ Annotated[StrictFloat, Field(gt=0)]
626
+ ]
627
+ ] = None,
628
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
629
+ _content_type: Optional[StrictStr] = None,
630
+ _headers: Optional[Dict[StrictStr, Any]] = None,
631
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
632
+ ) -> str:
633
+ """create_vertex_type
634
+
635
+ Create a vertex type
636
+
637
+ :param graph_id: (required)
638
+ :type graph_id: str
639
+ :param create_vertex_type: (required)
640
+ :type create_vertex_type: CreateVertexType
641
+ :param _request_timeout: timeout setting for this request. If one
642
+ number provided, it will be total request
643
+ timeout. It can also be a pair (tuple) of
644
+ (connection, read) timeouts.
645
+ :type _request_timeout: int, tuple(int, int), optional
646
+ :param _request_auth: set to override the auth_settings for an a single
647
+ request; this effectively ignores the
648
+ authentication in the spec for a single request.
649
+ :type _request_auth: dict, optional
650
+ :param _content_type: force content-type for the request.
651
+ :type _content_type: str, Optional
652
+ :param _headers: set to override the headers for a single
653
+ request; this effectively ignores the headers
654
+ in the spec for a single request.
655
+ :type _headers: dict, optional
656
+ :param _host_index: set to override the host_index for a single
657
+ request; this effectively ignores the host_index
658
+ in the spec for a single request.
659
+ :type _host_index: int, optional
660
+ :return: Returns the result object.
661
+ """ # noqa: E501
662
+
663
+ _param = self._create_vertex_type_serialize(
664
+ graph_id=graph_id,
665
+ create_vertex_type=create_vertex_type,
666
+ _request_auth=_request_auth,
667
+ _content_type=_content_type,
668
+ _headers=_headers,
669
+ _host_index=_host_index
670
+ )
671
+
672
+ _response_types_map: Dict[str, Optional[str]] = {
673
+ '200': "str",
674
+ '400': "Error",
675
+ '500': "Error",
676
+ }
677
+ response_data = self.api_client.call_api(
678
+ *_param,
679
+ _request_timeout=_request_timeout
680
+ )
681
+ response_data.read()
682
+ return self.api_client.response_deserialize(
683
+ response_data=response_data,
684
+ response_types_map=_response_types_map,
685
+ ).data
686
+
687
+
688
+ @validate_call
689
+ def create_vertex_type_with_http_info(
690
+ self,
691
+ graph_id: StrictStr,
692
+ create_vertex_type: CreateVertexType,
693
+ _request_timeout: Union[
694
+ None,
695
+ Annotated[StrictFloat, Field(gt=0)],
696
+ Tuple[
697
+ Annotated[StrictFloat, Field(gt=0)],
698
+ Annotated[StrictFloat, Field(gt=0)]
699
+ ]
700
+ ] = None,
701
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
702
+ _content_type: Optional[StrictStr] = None,
703
+ _headers: Optional[Dict[StrictStr, Any]] = None,
704
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
705
+ ) -> ApiResponse[str]:
706
+ """create_vertex_type
707
+
708
+ Create a vertex type
709
+
710
+ :param graph_id: (required)
711
+ :type graph_id: str
712
+ :param create_vertex_type: (required)
713
+ :type create_vertex_type: CreateVertexType
714
+ :param _request_timeout: timeout setting for this request. If one
715
+ number provided, it will be total request
716
+ timeout. It can also be a pair (tuple) of
717
+ (connection, read) timeouts.
718
+ :type _request_timeout: int, tuple(int, int), optional
719
+ :param _request_auth: set to override the auth_settings for an a single
720
+ request; this effectively ignores the
721
+ authentication in the spec for a single request.
722
+ :type _request_auth: dict, optional
723
+ :param _content_type: force content-type for the request.
724
+ :type _content_type: str, Optional
725
+ :param _headers: set to override the headers for a single
726
+ request; this effectively ignores the headers
727
+ in the spec for a single request.
728
+ :type _headers: dict, optional
729
+ :param _host_index: set to override the host_index for a single
730
+ request; this effectively ignores the host_index
731
+ in the spec for a single request.
732
+ :type _host_index: int, optional
733
+ :return: Returns the result object.
734
+ """ # noqa: E501
735
+
736
+ _param = self._create_vertex_type_serialize(
737
+ graph_id=graph_id,
738
+ create_vertex_type=create_vertex_type,
739
+ _request_auth=_request_auth,
740
+ _content_type=_content_type,
741
+ _headers=_headers,
742
+ _host_index=_host_index
743
+ )
744
+
745
+ _response_types_map: Dict[str, Optional[str]] = {
746
+ '200': "str",
747
+ '400': "Error",
748
+ '500': "Error",
749
+ }
750
+ response_data = self.api_client.call_api(
751
+ *_param,
752
+ _request_timeout=_request_timeout
753
+ )
754
+ response_data.read()
755
+ return self.api_client.response_deserialize(
756
+ response_data=response_data,
757
+ response_types_map=_response_types_map,
758
+ )
759
+
760
+
761
+ @validate_call
762
+ def create_vertex_type_without_preload_content(
763
+ self,
764
+ graph_id: StrictStr,
765
+ create_vertex_type: CreateVertexType,
766
+ _request_timeout: Union[
767
+ None,
768
+ Annotated[StrictFloat, Field(gt=0)],
769
+ Tuple[
770
+ Annotated[StrictFloat, Field(gt=0)],
771
+ Annotated[StrictFloat, Field(gt=0)]
772
+ ]
773
+ ] = None,
774
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
775
+ _content_type: Optional[StrictStr] = None,
776
+ _headers: Optional[Dict[StrictStr, Any]] = None,
777
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
778
+ ) -> RESTResponseType:
779
+ """create_vertex_type
780
+
781
+ Create a vertex type
782
+
783
+ :param graph_id: (required)
784
+ :type graph_id: str
785
+ :param create_vertex_type: (required)
786
+ :type create_vertex_type: CreateVertexType
787
+ :param _request_timeout: timeout setting for this request. If one
788
+ number provided, it will be total request
789
+ timeout. It can also be a pair (tuple) of
790
+ (connection, read) timeouts.
791
+ :type _request_timeout: int, tuple(int, int), optional
792
+ :param _request_auth: set to override the auth_settings for an a single
793
+ request; this effectively ignores the
794
+ authentication in the spec for a single request.
795
+ :type _request_auth: dict, optional
796
+ :param _content_type: force content-type for the request.
797
+ :type _content_type: str, Optional
798
+ :param _headers: set to override the headers for a single
799
+ request; this effectively ignores the headers
800
+ in the spec for a single request.
801
+ :type _headers: dict, optional
802
+ :param _host_index: set to override the host_index for a single
803
+ request; this effectively ignores the host_index
804
+ in the spec for a single request.
805
+ :type _host_index: int, optional
806
+ :return: Returns the result object.
807
+ """ # noqa: E501
808
+
809
+ _param = self._create_vertex_type_serialize(
810
+ graph_id=graph_id,
811
+ create_vertex_type=create_vertex_type,
812
+ _request_auth=_request_auth,
813
+ _content_type=_content_type,
814
+ _headers=_headers,
815
+ _host_index=_host_index
816
+ )
817
+
818
+ _response_types_map: Dict[str, Optional[str]] = {
819
+ '200': "str",
820
+ '400': "Error",
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 _create_vertex_type_serialize(
831
+ self,
832
+ graph_id,
833
+ create_vertex_type,
834
+ _request_auth,
835
+ _content_type,
836
+ _headers,
837
+ _host_index,
838
+ ) -> RequestSerialized:
839
+
840
+ _host = None
841
+
842
+ _collection_formats: Dict[str, str] = {
843
+ }
844
+
845
+ _path_params: Dict[str, str] = {}
846
+ _query_params: List[Tuple[str, str]] = []
847
+ _header_params: Dict[str, Optional[str]] = _headers or {}
848
+ _form_params: List[Tuple[str, str]] = []
849
+ _files: Dict[str, str] = {}
850
+ _body_params: Optional[bytes] = None
851
+
852
+ # process the path parameters
853
+ if graph_id is not None:
854
+ _path_params['graph_id'] = graph_id
855
+ # process the query parameters
856
+ # process the header parameters
857
+ # process the form parameters
858
+ # process the body parameter
859
+ if create_vertex_type is not None:
860
+ _body_params = create_vertex_type
861
+
862
+
863
+ # set the HTTP header `Accept`
864
+ _header_params['Accept'] = self.api_client.select_header_accept(
865
+ [
866
+ 'application/json'
867
+ ]
868
+ )
869
+
870
+ # set the HTTP header `Content-Type`
871
+ if _content_type:
872
+ _header_params['Content-Type'] = _content_type
873
+ else:
874
+ _default_content_type = (
875
+ self.api_client.select_header_content_type(
876
+ [
877
+ 'application/json'
878
+ ]
879
+ )
880
+ )
881
+ if _default_content_type is not None:
882
+ _header_params['Content-Type'] = _default_content_type
883
+
884
+ # authentication setting
885
+ _auth_settings: List[str] = [
886
+ ]
887
+
888
+ return self.api_client.param_serialize(
889
+ method='POST',
890
+ resource_path='/api/v1/graph/{graph_id}/schema/vertex',
891
+ path_params=_path_params,
892
+ query_params=_query_params,
893
+ header_params=_header_params,
894
+ body=_body_params,
895
+ post_params=_form_params,
896
+ files=_files,
897
+ auth_settings=_auth_settings,
898
+ collection_formats=_collection_formats,
899
+ _host=_host,
900
+ _request_auth=_request_auth
901
+ )
902
+
903
+
904
+
905
+
906
+ @validate_call
907
+ def delete_edge_type_by_name(
908
+ self,
909
+ graph_id: StrictStr,
910
+ type_name: StrictStr,
911
+ source_vertex_type: StrictStr,
912
+ destination_vertex_type: StrictStr,
913
+ _request_timeout: Union[
914
+ None,
915
+ Annotated[StrictFloat, Field(gt=0)],
916
+ Tuple[
917
+ Annotated[StrictFloat, Field(gt=0)],
918
+ Annotated[StrictFloat, Field(gt=0)]
919
+ ]
920
+ ] = None,
921
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
922
+ _content_type: Optional[StrictStr] = None,
923
+ _headers: Optional[Dict[StrictStr, Any]] = None,
924
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
925
+ ) -> str:
926
+ """delete_edge_type_by_name
927
+
928
+ Delete edge type by name
929
+
930
+ :param graph_id: (required)
931
+ :type graph_id: str
932
+ :param type_name: (required)
933
+ :type type_name: str
934
+ :param source_vertex_type: (required)
935
+ :type source_vertex_type: str
936
+ :param destination_vertex_type: (required)
937
+ :type destination_vertex_type: str
938
+ :param _request_timeout: timeout setting for this request. If one
939
+ number provided, it will be total request
940
+ timeout. It can also be a pair (tuple) of
941
+ (connection, read) timeouts.
942
+ :type _request_timeout: int, tuple(int, int), optional
943
+ :param _request_auth: set to override the auth_settings for an a single
944
+ request; this effectively ignores the
945
+ authentication in the spec for a single request.
946
+ :type _request_auth: dict, optional
947
+ :param _content_type: force content-type for the request.
948
+ :type _content_type: str, Optional
949
+ :param _headers: set to override the headers for a single
950
+ request; this effectively ignores the headers
951
+ in the spec for a single request.
952
+ :type _headers: dict, optional
953
+ :param _host_index: set to override the host_index for a single
954
+ request; this effectively ignores the host_index
955
+ in the spec for a single request.
956
+ :type _host_index: int, optional
957
+ :return: Returns the result object.
958
+ """ # noqa: E501
959
+
960
+ _param = self._delete_edge_type_by_name_serialize(
961
+ graph_id=graph_id,
962
+ type_name=type_name,
963
+ source_vertex_type=source_vertex_type,
964
+ destination_vertex_type=destination_vertex_type,
965
+ _request_auth=_request_auth,
966
+ _content_type=_content_type,
967
+ _headers=_headers,
968
+ _host_index=_host_index
969
+ )
970
+
971
+ _response_types_map: Dict[str, Optional[str]] = {
972
+ '200': "str",
973
+ '500': "Error",
974
+ }
975
+ response_data = self.api_client.call_api(
976
+ *_param,
977
+ _request_timeout=_request_timeout
978
+ )
979
+ response_data.read()
980
+ return self.api_client.response_deserialize(
981
+ response_data=response_data,
982
+ response_types_map=_response_types_map,
983
+ ).data
984
+
985
+
986
+ @validate_call
987
+ def delete_edge_type_by_name_with_http_info(
988
+ self,
989
+ graph_id: StrictStr,
990
+ type_name: StrictStr,
991
+ source_vertex_type: StrictStr,
992
+ destination_vertex_type: StrictStr,
993
+ _request_timeout: Union[
994
+ None,
995
+ Annotated[StrictFloat, Field(gt=0)],
996
+ Tuple[
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Annotated[StrictFloat, Field(gt=0)]
999
+ ]
1000
+ ] = None,
1001
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1002
+ _content_type: Optional[StrictStr] = None,
1003
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1004
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1005
+ ) -> ApiResponse[str]:
1006
+ """delete_edge_type_by_name
1007
+
1008
+ Delete edge type by name
1009
+
1010
+ :param graph_id: (required)
1011
+ :type graph_id: str
1012
+ :param type_name: (required)
1013
+ :type type_name: str
1014
+ :param source_vertex_type: (required)
1015
+ :type source_vertex_type: str
1016
+ :param destination_vertex_type: (required)
1017
+ :type destination_vertex_type: str
1018
+ :param _request_timeout: timeout setting for this request. If one
1019
+ number provided, it will be total request
1020
+ timeout. It can also be a pair (tuple) of
1021
+ (connection, read) timeouts.
1022
+ :type _request_timeout: int, tuple(int, int), optional
1023
+ :param _request_auth: set to override the auth_settings for an a single
1024
+ request; this effectively ignores the
1025
+ authentication in the spec for a single request.
1026
+ :type _request_auth: dict, optional
1027
+ :param _content_type: force content-type for the request.
1028
+ :type _content_type: str, Optional
1029
+ :param _headers: set to override the headers for a single
1030
+ request; this effectively ignores the headers
1031
+ in the spec for a single request.
1032
+ :type _headers: dict, optional
1033
+ :param _host_index: set to override the host_index for a single
1034
+ request; this effectively ignores the host_index
1035
+ in the spec for a single request.
1036
+ :type _host_index: int, optional
1037
+ :return: Returns the result object.
1038
+ """ # noqa: E501
1039
+
1040
+ _param = self._delete_edge_type_by_name_serialize(
1041
+ graph_id=graph_id,
1042
+ type_name=type_name,
1043
+ source_vertex_type=source_vertex_type,
1044
+ destination_vertex_type=destination_vertex_type,
1045
+ _request_auth=_request_auth,
1046
+ _content_type=_content_type,
1047
+ _headers=_headers,
1048
+ _host_index=_host_index
1049
+ )
1050
+
1051
+ _response_types_map: Dict[str, Optional[str]] = {
1052
+ '200': "str",
1053
+ '500': "Error",
1054
+ }
1055
+ response_data = self.api_client.call_api(
1056
+ *_param,
1057
+ _request_timeout=_request_timeout
1058
+ )
1059
+ response_data.read()
1060
+ return self.api_client.response_deserialize(
1061
+ response_data=response_data,
1062
+ response_types_map=_response_types_map,
1063
+ )
1064
+
1065
+
1066
+ @validate_call
1067
+ def delete_edge_type_by_name_without_preload_content(
1068
+ self,
1069
+ graph_id: StrictStr,
1070
+ type_name: StrictStr,
1071
+ source_vertex_type: StrictStr,
1072
+ destination_vertex_type: StrictStr,
1073
+ _request_timeout: Union[
1074
+ None,
1075
+ Annotated[StrictFloat, Field(gt=0)],
1076
+ Tuple[
1077
+ Annotated[StrictFloat, Field(gt=0)],
1078
+ Annotated[StrictFloat, Field(gt=0)]
1079
+ ]
1080
+ ] = None,
1081
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1082
+ _content_type: Optional[StrictStr] = None,
1083
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1084
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1085
+ ) -> RESTResponseType:
1086
+ """delete_edge_type_by_name
1087
+
1088
+ Delete edge type by name
1089
+
1090
+ :param graph_id: (required)
1091
+ :type graph_id: str
1092
+ :param type_name: (required)
1093
+ :type type_name: str
1094
+ :param source_vertex_type: (required)
1095
+ :type source_vertex_type: str
1096
+ :param destination_vertex_type: (required)
1097
+ :type destination_vertex_type: str
1098
+ :param _request_timeout: timeout setting for this request. If one
1099
+ number provided, it will be total request
1100
+ timeout. It can also be a pair (tuple) of
1101
+ (connection, read) timeouts.
1102
+ :type _request_timeout: int, tuple(int, int), optional
1103
+ :param _request_auth: set to override the auth_settings for an a single
1104
+ request; this effectively ignores the
1105
+ authentication in the spec for a single request.
1106
+ :type _request_auth: dict, optional
1107
+ :param _content_type: force content-type for the request.
1108
+ :type _content_type: str, Optional
1109
+ :param _headers: set to override the headers for a single
1110
+ request; this effectively ignores the headers
1111
+ in the spec for a single request.
1112
+ :type _headers: dict, optional
1113
+ :param _host_index: set to override the host_index for a single
1114
+ request; this effectively ignores the host_index
1115
+ in the spec for a single request.
1116
+ :type _host_index: int, optional
1117
+ :return: Returns the result object.
1118
+ """ # noqa: E501
1119
+
1120
+ _param = self._delete_edge_type_by_name_serialize(
1121
+ graph_id=graph_id,
1122
+ type_name=type_name,
1123
+ source_vertex_type=source_vertex_type,
1124
+ destination_vertex_type=destination_vertex_type,
1125
+ _request_auth=_request_auth,
1126
+ _content_type=_content_type,
1127
+ _headers=_headers,
1128
+ _host_index=_host_index
1129
+ )
1130
+
1131
+ _response_types_map: Dict[str, Optional[str]] = {
1132
+ '200': "str",
1133
+ '500': "Error",
1134
+ }
1135
+ response_data = self.api_client.call_api(
1136
+ *_param,
1137
+ _request_timeout=_request_timeout
1138
+ )
1139
+ return response_data.response
1140
+
1141
+
1142
+ def _delete_edge_type_by_name_serialize(
1143
+ self,
1144
+ graph_id,
1145
+ type_name,
1146
+ source_vertex_type,
1147
+ destination_vertex_type,
1148
+ _request_auth,
1149
+ _content_type,
1150
+ _headers,
1151
+ _host_index,
1152
+ ) -> RequestSerialized:
1153
+
1154
+ _host = None
1155
+
1156
+ _collection_formats: Dict[str, str] = {
1157
+ }
1158
+
1159
+ _path_params: Dict[str, str] = {}
1160
+ _query_params: List[Tuple[str, str]] = []
1161
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1162
+ _form_params: List[Tuple[str, str]] = []
1163
+ _files: Dict[str, str] = {}
1164
+ _body_params: Optional[bytes] = None
1165
+
1166
+ # process the path parameters
1167
+ if graph_id is not None:
1168
+ _path_params['graph_id'] = graph_id
1169
+ if type_name is not None:
1170
+ _path_params['type_name'] = type_name
1171
+ # process the query parameters
1172
+ if source_vertex_type is not None:
1173
+
1174
+ _query_params.append(('source_vertex_type', source_vertex_type))
1175
+
1176
+ if destination_vertex_type is not None:
1177
+
1178
+ _query_params.append(('destination_vertex_type', destination_vertex_type))
1179
+
1180
+ # process the header parameters
1181
+ # process the form parameters
1182
+ # process the body parameter
1183
+
1184
+
1185
+ # set the HTTP header `Accept`
1186
+ _header_params['Accept'] = self.api_client.select_header_accept(
1187
+ [
1188
+ 'application/json'
1189
+ ]
1190
+ )
1191
+
1192
+
1193
+ # authentication setting
1194
+ _auth_settings: List[str] = [
1195
+ ]
1196
+
1197
+ return self.api_client.param_serialize(
1198
+ method='DELETE',
1199
+ resource_path='/api/v1/graph/{graph_id}/schema/edge/{type_name}',
1200
+ path_params=_path_params,
1201
+ query_params=_query_params,
1202
+ header_params=_header_params,
1203
+ body=_body_params,
1204
+ post_params=_form_params,
1205
+ files=_files,
1206
+ auth_settings=_auth_settings,
1207
+ collection_formats=_collection_formats,
1208
+ _host=_host,
1209
+ _request_auth=_request_auth
1210
+ )
1211
+
1212
+
1213
+
1214
+
1215
+ @validate_call
1216
+ def delete_graph_by_id(
1217
+ self,
1218
+ graph_id: StrictStr,
1219
+ _request_timeout: Union[
1220
+ None,
1221
+ Annotated[StrictFloat, Field(gt=0)],
1222
+ Tuple[
1223
+ Annotated[StrictFloat, Field(gt=0)],
1224
+ Annotated[StrictFloat, Field(gt=0)]
1225
+ ]
1226
+ ] = None,
1227
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1228
+ _content_type: Optional[StrictStr] = None,
1229
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1230
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1231
+ ) -> str:
1232
+ """delete_graph_by_id
1233
+
1234
+ Delete graph by ID
1235
+
1236
+ :param graph_id: (required)
1237
+ :type graph_id: str
1238
+ :param _request_timeout: timeout setting for this request. If one
1239
+ number provided, it will be total request
1240
+ timeout. It can also be a pair (tuple) of
1241
+ (connection, read) timeouts.
1242
+ :type _request_timeout: int, tuple(int, int), optional
1243
+ :param _request_auth: set to override the auth_settings for an a single
1244
+ request; this effectively ignores the
1245
+ authentication in the spec for a single request.
1246
+ :type _request_auth: dict, optional
1247
+ :param _content_type: force content-type for the request.
1248
+ :type _content_type: str, Optional
1249
+ :param _headers: set to override the headers for a single
1250
+ request; this effectively ignores the headers
1251
+ in the spec for a single request.
1252
+ :type _headers: dict, optional
1253
+ :param _host_index: set to override the host_index for a single
1254
+ request; this effectively ignores the host_index
1255
+ in the spec for a single request.
1256
+ :type _host_index: int, optional
1257
+ :return: Returns the result object.
1258
+ """ # noqa: E501
1259
+
1260
+ _param = self._delete_graph_by_id_serialize(
1261
+ graph_id=graph_id,
1262
+ _request_auth=_request_auth,
1263
+ _content_type=_content_type,
1264
+ _headers=_headers,
1265
+ _host_index=_host_index
1266
+ )
1267
+
1268
+ _response_types_map: Dict[str, Optional[str]] = {
1269
+ '200': "str",
1270
+ '500': "Error",
1271
+ }
1272
+ response_data = self.api_client.call_api(
1273
+ *_param,
1274
+ _request_timeout=_request_timeout
1275
+ )
1276
+ response_data.read()
1277
+ return self.api_client.response_deserialize(
1278
+ response_data=response_data,
1279
+ response_types_map=_response_types_map,
1280
+ ).data
1281
+
1282
+
1283
+ @validate_call
1284
+ def delete_graph_by_id_with_http_info(
1285
+ self,
1286
+ graph_id: StrictStr,
1287
+ _request_timeout: Union[
1288
+ None,
1289
+ Annotated[StrictFloat, Field(gt=0)],
1290
+ Tuple[
1291
+ Annotated[StrictFloat, Field(gt=0)],
1292
+ Annotated[StrictFloat, Field(gt=0)]
1293
+ ]
1294
+ ] = None,
1295
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1296
+ _content_type: Optional[StrictStr] = None,
1297
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1298
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1299
+ ) -> ApiResponse[str]:
1300
+ """delete_graph_by_id
1301
+
1302
+ Delete graph by ID
1303
+
1304
+ :param graph_id: (required)
1305
+ :type graph_id: str
1306
+ :param _request_timeout: timeout setting for this request. If one
1307
+ number provided, it will be total request
1308
+ timeout. It can also be a pair (tuple) of
1309
+ (connection, read) timeouts.
1310
+ :type _request_timeout: int, tuple(int, int), optional
1311
+ :param _request_auth: set to override the auth_settings for an a single
1312
+ request; this effectively ignores the
1313
+ authentication in the spec for a single request.
1314
+ :type _request_auth: dict, optional
1315
+ :param _content_type: force content-type for the request.
1316
+ :type _content_type: str, Optional
1317
+ :param _headers: set to override the headers for a single
1318
+ request; this effectively ignores the headers
1319
+ in the spec for a single request.
1320
+ :type _headers: dict, optional
1321
+ :param _host_index: set to override the host_index for a single
1322
+ request; this effectively ignores the host_index
1323
+ in the spec for a single request.
1324
+ :type _host_index: int, optional
1325
+ :return: Returns the result object.
1326
+ """ # noqa: E501
1327
+
1328
+ _param = self._delete_graph_by_id_serialize(
1329
+ graph_id=graph_id,
1330
+ _request_auth=_request_auth,
1331
+ _content_type=_content_type,
1332
+ _headers=_headers,
1333
+ _host_index=_host_index
1334
+ )
1335
+
1336
+ _response_types_map: Dict[str, Optional[str]] = {
1337
+ '200': "str",
1338
+ '500': "Error",
1339
+ }
1340
+ response_data = self.api_client.call_api(
1341
+ *_param,
1342
+ _request_timeout=_request_timeout
1343
+ )
1344
+ response_data.read()
1345
+ return self.api_client.response_deserialize(
1346
+ response_data=response_data,
1347
+ response_types_map=_response_types_map,
1348
+ )
1349
+
1350
+
1351
+ @validate_call
1352
+ def delete_graph_by_id_without_preload_content(
1353
+ self,
1354
+ graph_id: StrictStr,
1355
+ _request_timeout: Union[
1356
+ None,
1357
+ Annotated[StrictFloat, Field(gt=0)],
1358
+ Tuple[
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Annotated[StrictFloat, Field(gt=0)]
1361
+ ]
1362
+ ] = None,
1363
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1364
+ _content_type: Optional[StrictStr] = None,
1365
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1366
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1367
+ ) -> RESTResponseType:
1368
+ """delete_graph_by_id
1369
+
1370
+ Delete graph by ID
1371
+
1372
+ :param graph_id: (required)
1373
+ :type graph_id: str
1374
+ :param _request_timeout: timeout setting for this request. If one
1375
+ number provided, it will be total request
1376
+ timeout. It can also be a pair (tuple) of
1377
+ (connection, read) timeouts.
1378
+ :type _request_timeout: int, tuple(int, int), optional
1379
+ :param _request_auth: set to override the auth_settings for an a single
1380
+ request; this effectively ignores the
1381
+ authentication in the spec for a single request.
1382
+ :type _request_auth: dict, optional
1383
+ :param _content_type: force content-type for the request.
1384
+ :type _content_type: str, Optional
1385
+ :param _headers: set to override the headers for a single
1386
+ request; this effectively ignores the headers
1387
+ in the spec for a single request.
1388
+ :type _headers: dict, optional
1389
+ :param _host_index: set to override the host_index for a single
1390
+ request; this effectively ignores the host_index
1391
+ in the spec for a single request.
1392
+ :type _host_index: int, optional
1393
+ :return: Returns the result object.
1394
+ """ # noqa: E501
1395
+
1396
+ _param = self._delete_graph_by_id_serialize(
1397
+ graph_id=graph_id,
1398
+ _request_auth=_request_auth,
1399
+ _content_type=_content_type,
1400
+ _headers=_headers,
1401
+ _host_index=_host_index
1402
+ )
1403
+
1404
+ _response_types_map: Dict[str, Optional[str]] = {
1405
+ '200': "str",
1406
+ '500': "Error",
1407
+ }
1408
+ response_data = self.api_client.call_api(
1409
+ *_param,
1410
+ _request_timeout=_request_timeout
1411
+ )
1412
+ return response_data.response
1413
+
1414
+
1415
+ def _delete_graph_by_id_serialize(
1416
+ self,
1417
+ graph_id,
1418
+ _request_auth,
1419
+ _content_type,
1420
+ _headers,
1421
+ _host_index,
1422
+ ) -> RequestSerialized:
1423
+
1424
+ _host = None
1425
+
1426
+ _collection_formats: Dict[str, str] = {
1427
+ }
1428
+
1429
+ _path_params: Dict[str, str] = {}
1430
+ _query_params: List[Tuple[str, str]] = []
1431
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1432
+ _form_params: List[Tuple[str, str]] = []
1433
+ _files: Dict[str, str] = {}
1434
+ _body_params: Optional[bytes] = None
1435
+
1436
+ # process the path parameters
1437
+ if graph_id is not None:
1438
+ _path_params['graph_id'] = graph_id
1439
+ # process the query parameters
1440
+ # process the header parameters
1441
+ # process the form parameters
1442
+ # process the body parameter
1443
+
1444
+
1445
+ # set the HTTP header `Accept`
1446
+ _header_params['Accept'] = self.api_client.select_header_accept(
1447
+ [
1448
+ 'application/json'
1449
+ ]
1450
+ )
1451
+
1452
+
1453
+ # authentication setting
1454
+ _auth_settings: List[str] = [
1455
+ ]
1456
+
1457
+ return self.api_client.param_serialize(
1458
+ method='DELETE',
1459
+ resource_path='/api/v1/graph/{graph_id}',
1460
+ path_params=_path_params,
1461
+ query_params=_query_params,
1462
+ header_params=_header_params,
1463
+ body=_body_params,
1464
+ post_params=_form_params,
1465
+ files=_files,
1466
+ auth_settings=_auth_settings,
1467
+ collection_formats=_collection_formats,
1468
+ _host=_host,
1469
+ _request_auth=_request_auth
1470
+ )
1471
+
1472
+
1473
+
1474
+
1475
+ @validate_call
1476
+ def delete_vertex_type_by_name(
1477
+ self,
1478
+ graph_id: StrictStr,
1479
+ type_name: StrictStr,
1480
+ _request_timeout: Union[
1481
+ None,
1482
+ Annotated[StrictFloat, Field(gt=0)],
1483
+ Tuple[
1484
+ Annotated[StrictFloat, Field(gt=0)],
1485
+ Annotated[StrictFloat, Field(gt=0)]
1486
+ ]
1487
+ ] = None,
1488
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1489
+ _content_type: Optional[StrictStr] = None,
1490
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1491
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1492
+ ) -> str:
1493
+ """delete_vertex_type_by_name
1494
+
1495
+ Delete vertex type by name
1496
+
1497
+ :param graph_id: (required)
1498
+ :type graph_id: str
1499
+ :param type_name: (required)
1500
+ :type type_name: str
1501
+ :param _request_timeout: timeout setting for this request. If one
1502
+ number provided, it will be total request
1503
+ timeout. It can also be a pair (tuple) of
1504
+ (connection, read) timeouts.
1505
+ :type _request_timeout: int, tuple(int, int), optional
1506
+ :param _request_auth: set to override the auth_settings for an a single
1507
+ request; this effectively ignores the
1508
+ authentication in the spec for a single request.
1509
+ :type _request_auth: dict, optional
1510
+ :param _content_type: force content-type for the request.
1511
+ :type _content_type: str, Optional
1512
+ :param _headers: set to override the headers for a single
1513
+ request; this effectively ignores the headers
1514
+ in the spec for a single request.
1515
+ :type _headers: dict, optional
1516
+ :param _host_index: set to override the host_index for a single
1517
+ request; this effectively ignores the host_index
1518
+ in the spec for a single request.
1519
+ :type _host_index: int, optional
1520
+ :return: Returns the result object.
1521
+ """ # noqa: E501
1522
+
1523
+ _param = self._delete_vertex_type_by_name_serialize(
1524
+ graph_id=graph_id,
1525
+ type_name=type_name,
1526
+ _request_auth=_request_auth,
1527
+ _content_type=_content_type,
1528
+ _headers=_headers,
1529
+ _host_index=_host_index
1530
+ )
1531
+
1532
+ _response_types_map: Dict[str, Optional[str]] = {
1533
+ '200': "str",
1534
+ '500': "Error",
1535
+ }
1536
+ response_data = self.api_client.call_api(
1537
+ *_param,
1538
+ _request_timeout=_request_timeout
1539
+ )
1540
+ response_data.read()
1541
+ return self.api_client.response_deserialize(
1542
+ response_data=response_data,
1543
+ response_types_map=_response_types_map,
1544
+ ).data
1545
+
1546
+
1547
+ @validate_call
1548
+ def delete_vertex_type_by_name_with_http_info(
1549
+ self,
1550
+ graph_id: StrictStr,
1551
+ type_name: StrictStr,
1552
+ _request_timeout: Union[
1553
+ None,
1554
+ Annotated[StrictFloat, Field(gt=0)],
1555
+ Tuple[
1556
+ Annotated[StrictFloat, Field(gt=0)],
1557
+ Annotated[StrictFloat, Field(gt=0)]
1558
+ ]
1559
+ ] = None,
1560
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1561
+ _content_type: Optional[StrictStr] = None,
1562
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1563
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1564
+ ) -> ApiResponse[str]:
1565
+ """delete_vertex_type_by_name
1566
+
1567
+ Delete vertex type by name
1568
+
1569
+ :param graph_id: (required)
1570
+ :type graph_id: str
1571
+ :param type_name: (required)
1572
+ :type type_name: str
1573
+ :param _request_timeout: timeout setting for this request. If one
1574
+ number provided, it will be total request
1575
+ timeout. It can also be a pair (tuple) of
1576
+ (connection, read) timeouts.
1577
+ :type _request_timeout: int, tuple(int, int), optional
1578
+ :param _request_auth: set to override the auth_settings for an a single
1579
+ request; this effectively ignores the
1580
+ authentication in the spec for a single request.
1581
+ :type _request_auth: dict, optional
1582
+ :param _content_type: force content-type for the request.
1583
+ :type _content_type: str, Optional
1584
+ :param _headers: set to override the headers for a single
1585
+ request; this effectively ignores the headers
1586
+ in the spec for a single request.
1587
+ :type _headers: dict, optional
1588
+ :param _host_index: set to override the host_index for a single
1589
+ request; this effectively ignores the host_index
1590
+ in the spec for a single request.
1591
+ :type _host_index: int, optional
1592
+ :return: Returns the result object.
1593
+ """ # noqa: E501
1594
+
1595
+ _param = self._delete_vertex_type_by_name_serialize(
1596
+ graph_id=graph_id,
1597
+ type_name=type_name,
1598
+ _request_auth=_request_auth,
1599
+ _content_type=_content_type,
1600
+ _headers=_headers,
1601
+ _host_index=_host_index
1602
+ )
1603
+
1604
+ _response_types_map: Dict[str, Optional[str]] = {
1605
+ '200': "str",
1606
+ '500': "Error",
1607
+ }
1608
+ response_data = self.api_client.call_api(
1609
+ *_param,
1610
+ _request_timeout=_request_timeout
1611
+ )
1612
+ response_data.read()
1613
+ return self.api_client.response_deserialize(
1614
+ response_data=response_data,
1615
+ response_types_map=_response_types_map,
1616
+ )
1617
+
1618
+
1619
+ @validate_call
1620
+ def delete_vertex_type_by_name_without_preload_content(
1621
+ self,
1622
+ graph_id: StrictStr,
1623
+ type_name: StrictStr,
1624
+ _request_timeout: Union[
1625
+ None,
1626
+ Annotated[StrictFloat, Field(gt=0)],
1627
+ Tuple[
1628
+ Annotated[StrictFloat, Field(gt=0)],
1629
+ Annotated[StrictFloat, Field(gt=0)]
1630
+ ]
1631
+ ] = None,
1632
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1633
+ _content_type: Optional[StrictStr] = None,
1634
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1635
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1636
+ ) -> RESTResponseType:
1637
+ """delete_vertex_type_by_name
1638
+
1639
+ Delete vertex type by name
1640
+
1641
+ :param graph_id: (required)
1642
+ :type graph_id: str
1643
+ :param type_name: (required)
1644
+ :type type_name: str
1645
+ :param _request_timeout: timeout setting for this request. If one
1646
+ number provided, it will be total request
1647
+ timeout. It can also be a pair (tuple) of
1648
+ (connection, read) timeouts.
1649
+ :type _request_timeout: int, tuple(int, int), optional
1650
+ :param _request_auth: set to override the auth_settings for an a single
1651
+ request; this effectively ignores the
1652
+ authentication in the spec for a single request.
1653
+ :type _request_auth: dict, optional
1654
+ :param _content_type: force content-type for the request.
1655
+ :type _content_type: str, Optional
1656
+ :param _headers: set to override the headers for a single
1657
+ request; this effectively ignores the headers
1658
+ in the spec for a single request.
1659
+ :type _headers: dict, optional
1660
+ :param _host_index: set to override the host_index for a single
1661
+ request; this effectively ignores the host_index
1662
+ in the spec for a single request.
1663
+ :type _host_index: int, optional
1664
+ :return: Returns the result object.
1665
+ """ # noqa: E501
1666
+
1667
+ _param = self._delete_vertex_type_by_name_serialize(
1668
+ graph_id=graph_id,
1669
+ type_name=type_name,
1670
+ _request_auth=_request_auth,
1671
+ _content_type=_content_type,
1672
+ _headers=_headers,
1673
+ _host_index=_host_index
1674
+ )
1675
+
1676
+ _response_types_map: Dict[str, Optional[str]] = {
1677
+ '200': "str",
1678
+ '500': "Error",
1679
+ }
1680
+ response_data = self.api_client.call_api(
1681
+ *_param,
1682
+ _request_timeout=_request_timeout
1683
+ )
1684
+ return response_data.response
1685
+
1686
+
1687
+ def _delete_vertex_type_by_name_serialize(
1688
+ self,
1689
+ graph_id,
1690
+ type_name,
1691
+ _request_auth,
1692
+ _content_type,
1693
+ _headers,
1694
+ _host_index,
1695
+ ) -> RequestSerialized:
1696
+
1697
+ _host = None
1698
+
1699
+ _collection_formats: Dict[str, str] = {
1700
+ }
1701
+
1702
+ _path_params: Dict[str, str] = {}
1703
+ _query_params: List[Tuple[str, str]] = []
1704
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1705
+ _form_params: List[Tuple[str, str]] = []
1706
+ _files: Dict[str, str] = {}
1707
+ _body_params: Optional[bytes] = None
1708
+
1709
+ # process the path parameters
1710
+ if graph_id is not None:
1711
+ _path_params['graph_id'] = graph_id
1712
+ if type_name is not None:
1713
+ _path_params['type_name'] = type_name
1714
+ # process the query parameters
1715
+ # process the header parameters
1716
+ # process the form parameters
1717
+ # process the body parameter
1718
+
1719
+
1720
+ # set the HTTP header `Accept`
1721
+ _header_params['Accept'] = self.api_client.select_header_accept(
1722
+ [
1723
+ 'application/json'
1724
+ ]
1725
+ )
1726
+
1727
+
1728
+ # authentication setting
1729
+ _auth_settings: List[str] = [
1730
+ ]
1731
+
1732
+ return self.api_client.param_serialize(
1733
+ method='DELETE',
1734
+ resource_path='/api/v1/graph/{graph_id}/schema/vertex/{type_name}',
1735
+ path_params=_path_params,
1736
+ query_params=_query_params,
1737
+ header_params=_header_params,
1738
+ body=_body_params,
1739
+ post_params=_form_params,
1740
+ files=_files,
1741
+ auth_settings=_auth_settings,
1742
+ collection_formats=_collection_formats,
1743
+ _host=_host,
1744
+ _request_auth=_request_auth
1745
+ )
1746
+
1747
+
1748
+
1749
+
1750
+ @validate_call
1751
+ def get_graph_by_id(
1752
+ self,
1753
+ graph_id: StrictStr,
1754
+ _request_timeout: Union[
1755
+ None,
1756
+ Annotated[StrictFloat, Field(gt=0)],
1757
+ Tuple[
1758
+ Annotated[StrictFloat, Field(gt=0)],
1759
+ Annotated[StrictFloat, Field(gt=0)]
1760
+ ]
1761
+ ] = None,
1762
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1763
+ _content_type: Optional[StrictStr] = None,
1764
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1765
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1766
+ ) -> GetGraphResponse:
1767
+ """get_graph_by_id
1768
+
1769
+ Get graph by ID
1770
+
1771
+ :param graph_id: (required)
1772
+ :type graph_id: str
1773
+ :param _request_timeout: timeout setting for this request. If one
1774
+ number provided, it will be total request
1775
+ timeout. It can also be a pair (tuple) of
1776
+ (connection, read) timeouts.
1777
+ :type _request_timeout: int, tuple(int, int), optional
1778
+ :param _request_auth: set to override the auth_settings for an a single
1779
+ request; this effectively ignores the
1780
+ authentication in the spec for a single request.
1781
+ :type _request_auth: dict, optional
1782
+ :param _content_type: force content-type for the request.
1783
+ :type _content_type: str, Optional
1784
+ :param _headers: set to override the headers for a single
1785
+ request; this effectively ignores the headers
1786
+ in the spec for a single request.
1787
+ :type _headers: dict, optional
1788
+ :param _host_index: set to override the host_index for a single
1789
+ request; this effectively ignores the host_index
1790
+ in the spec for a single request.
1791
+ :type _host_index: int, optional
1792
+ :return: Returns the result object.
1793
+ """ # noqa: E501
1794
+
1795
+ _param = self._get_graph_by_id_serialize(
1796
+ graph_id=graph_id,
1797
+ _request_auth=_request_auth,
1798
+ _content_type=_content_type,
1799
+ _headers=_headers,
1800
+ _host_index=_host_index
1801
+ )
1802
+
1803
+ _response_types_map: Dict[str, Optional[str]] = {
1804
+ '200': "GetGraphResponse",
1805
+ '500': "Error",
1806
+ }
1807
+ response_data = self.api_client.call_api(
1808
+ *_param,
1809
+ _request_timeout=_request_timeout
1810
+ )
1811
+ response_data.read()
1812
+ return self.api_client.response_deserialize(
1813
+ response_data=response_data,
1814
+ response_types_map=_response_types_map,
1815
+ ).data
1816
+
1817
+
1818
+ @validate_call
1819
+ def get_graph_by_id_with_http_info(
1820
+ self,
1821
+ graph_id: StrictStr,
1822
+ _request_timeout: Union[
1823
+ None,
1824
+ Annotated[StrictFloat, Field(gt=0)],
1825
+ Tuple[
1826
+ Annotated[StrictFloat, Field(gt=0)],
1827
+ Annotated[StrictFloat, Field(gt=0)]
1828
+ ]
1829
+ ] = None,
1830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1831
+ _content_type: Optional[StrictStr] = None,
1832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1834
+ ) -> ApiResponse[GetGraphResponse]:
1835
+ """get_graph_by_id
1836
+
1837
+ Get graph by ID
1838
+
1839
+ :param graph_id: (required)
1840
+ :type graph_id: str
1841
+ :param _request_timeout: timeout setting for this request. If one
1842
+ number provided, it will be total request
1843
+ timeout. It can also be a pair (tuple) of
1844
+ (connection, read) timeouts.
1845
+ :type _request_timeout: int, tuple(int, int), optional
1846
+ :param _request_auth: set to override the auth_settings for an a single
1847
+ request; this effectively ignores the
1848
+ authentication in the spec for a single request.
1849
+ :type _request_auth: dict, optional
1850
+ :param _content_type: force content-type for the request.
1851
+ :type _content_type: str, Optional
1852
+ :param _headers: set to override the headers for a single
1853
+ request; this effectively ignores the headers
1854
+ in the spec for a single request.
1855
+ :type _headers: dict, optional
1856
+ :param _host_index: set to override the host_index for a single
1857
+ request; this effectively ignores the host_index
1858
+ in the spec for a single request.
1859
+ :type _host_index: int, optional
1860
+ :return: Returns the result object.
1861
+ """ # noqa: E501
1862
+
1863
+ _param = self._get_graph_by_id_serialize(
1864
+ graph_id=graph_id,
1865
+ _request_auth=_request_auth,
1866
+ _content_type=_content_type,
1867
+ _headers=_headers,
1868
+ _host_index=_host_index
1869
+ )
1870
+
1871
+ _response_types_map: Dict[str, Optional[str]] = {
1872
+ '200': "GetGraphResponse",
1873
+ '500': "Error",
1874
+ }
1875
+ response_data = self.api_client.call_api(
1876
+ *_param,
1877
+ _request_timeout=_request_timeout
1878
+ )
1879
+ response_data.read()
1880
+ return self.api_client.response_deserialize(
1881
+ response_data=response_data,
1882
+ response_types_map=_response_types_map,
1883
+ )
1884
+
1885
+
1886
+ @validate_call
1887
+ def get_graph_by_id_without_preload_content(
1888
+ self,
1889
+ graph_id: StrictStr,
1890
+ _request_timeout: Union[
1891
+ None,
1892
+ Annotated[StrictFloat, Field(gt=0)],
1893
+ Tuple[
1894
+ Annotated[StrictFloat, Field(gt=0)],
1895
+ Annotated[StrictFloat, Field(gt=0)]
1896
+ ]
1897
+ ] = None,
1898
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1899
+ _content_type: Optional[StrictStr] = None,
1900
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1901
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1902
+ ) -> RESTResponseType:
1903
+ """get_graph_by_id
1904
+
1905
+ Get graph by ID
1906
+
1907
+ :param graph_id: (required)
1908
+ :type graph_id: str
1909
+ :param _request_timeout: timeout setting for this request. If one
1910
+ number provided, it will be total request
1911
+ timeout. It can also be a pair (tuple) of
1912
+ (connection, read) timeouts.
1913
+ :type _request_timeout: int, tuple(int, int), optional
1914
+ :param _request_auth: set to override the auth_settings for an a single
1915
+ request; this effectively ignores the
1916
+ authentication in the spec for a single request.
1917
+ :type _request_auth: dict, optional
1918
+ :param _content_type: force content-type for the request.
1919
+ :type _content_type: str, Optional
1920
+ :param _headers: set to override the headers for a single
1921
+ request; this effectively ignores the headers
1922
+ in the spec for a single request.
1923
+ :type _headers: dict, optional
1924
+ :param _host_index: set to override the host_index for a single
1925
+ request; this effectively ignores the host_index
1926
+ in the spec for a single request.
1927
+ :type _host_index: int, optional
1928
+ :return: Returns the result object.
1929
+ """ # noqa: E501
1930
+
1931
+ _param = self._get_graph_by_id_serialize(
1932
+ graph_id=graph_id,
1933
+ _request_auth=_request_auth,
1934
+ _content_type=_content_type,
1935
+ _headers=_headers,
1936
+ _host_index=_host_index
1937
+ )
1938
+
1939
+ _response_types_map: Dict[str, Optional[str]] = {
1940
+ '200': "GetGraphResponse",
1941
+ '500': "Error",
1942
+ }
1943
+ response_data = self.api_client.call_api(
1944
+ *_param,
1945
+ _request_timeout=_request_timeout
1946
+ )
1947
+ return response_data.response
1948
+
1949
+
1950
+ def _get_graph_by_id_serialize(
1951
+ self,
1952
+ graph_id,
1953
+ _request_auth,
1954
+ _content_type,
1955
+ _headers,
1956
+ _host_index,
1957
+ ) -> RequestSerialized:
1958
+
1959
+ _host = None
1960
+
1961
+ _collection_formats: Dict[str, str] = {
1962
+ }
1963
+
1964
+ _path_params: Dict[str, str] = {}
1965
+ _query_params: List[Tuple[str, str]] = []
1966
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1967
+ _form_params: List[Tuple[str, str]] = []
1968
+ _files: Dict[str, str] = {}
1969
+ _body_params: Optional[bytes] = None
1970
+
1971
+ # process the path parameters
1972
+ if graph_id is not None:
1973
+ _path_params['graph_id'] = graph_id
1974
+ # process the query parameters
1975
+ # process the header parameters
1976
+ # process the form parameters
1977
+ # process the body parameter
1978
+
1979
+
1980
+ # set the HTTP header `Accept`
1981
+ _header_params['Accept'] = self.api_client.select_header_accept(
1982
+ [
1983
+ 'application/json'
1984
+ ]
1985
+ )
1986
+
1987
+
1988
+ # authentication setting
1989
+ _auth_settings: List[str] = [
1990
+ ]
1991
+
1992
+ return self.api_client.param_serialize(
1993
+ method='GET',
1994
+ resource_path='/api/v1/graph/{graph_id}',
1995
+ path_params=_path_params,
1996
+ query_params=_query_params,
1997
+ header_params=_header_params,
1998
+ body=_body_params,
1999
+ post_params=_form_params,
2000
+ files=_files,
2001
+ auth_settings=_auth_settings,
2002
+ collection_formats=_collection_formats,
2003
+ _host=_host,
2004
+ _request_auth=_request_auth
2005
+ )
2006
+
2007
+
2008
+
2009
+
2010
+ @validate_call
2011
+ def get_schema_by_id(
2012
+ self,
2013
+ graph_id: StrictStr,
2014
+ _request_timeout: Union[
2015
+ None,
2016
+ Annotated[StrictFloat, Field(gt=0)],
2017
+ Tuple[
2018
+ Annotated[StrictFloat, Field(gt=0)],
2019
+ Annotated[StrictFloat, Field(gt=0)]
2020
+ ]
2021
+ ] = None,
2022
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2023
+ _content_type: Optional[StrictStr] = None,
2024
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2025
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2026
+ ) -> GetGraphSchemaResponse:
2027
+ """get_schema_by_id
2028
+
2029
+ Get graph schema by ID
2030
+
2031
+ :param graph_id: (required)
2032
+ :type graph_id: str
2033
+ :param _request_timeout: timeout setting for this request. If one
2034
+ number provided, it will be total request
2035
+ timeout. It can also be a pair (tuple) of
2036
+ (connection, read) timeouts.
2037
+ :type _request_timeout: int, tuple(int, int), optional
2038
+ :param _request_auth: set to override the auth_settings for an a single
2039
+ request; this effectively ignores the
2040
+ authentication in the spec for a single request.
2041
+ :type _request_auth: dict, optional
2042
+ :param _content_type: force content-type for the request.
2043
+ :type _content_type: str, Optional
2044
+ :param _headers: set to override the headers for a single
2045
+ request; this effectively ignores the headers
2046
+ in the spec for a single request.
2047
+ :type _headers: dict, optional
2048
+ :param _host_index: set to override the host_index for a single
2049
+ request; this effectively ignores the host_index
2050
+ in the spec for a single request.
2051
+ :type _host_index: int, optional
2052
+ :return: Returns the result object.
2053
+ """ # noqa: E501
2054
+
2055
+ _param = self._get_schema_by_id_serialize(
2056
+ graph_id=graph_id,
2057
+ _request_auth=_request_auth,
2058
+ _content_type=_content_type,
2059
+ _headers=_headers,
2060
+ _host_index=_host_index
2061
+ )
2062
+
2063
+ _response_types_map: Dict[str, Optional[str]] = {
2064
+ '200': "GetGraphSchemaResponse",
2065
+ '500': "Error",
2066
+ }
2067
+ response_data = self.api_client.call_api(
2068
+ *_param,
2069
+ _request_timeout=_request_timeout
2070
+ )
2071
+ response_data.read()
2072
+ return self.api_client.response_deserialize(
2073
+ response_data=response_data,
2074
+ response_types_map=_response_types_map,
2075
+ ).data
2076
+
2077
+
2078
+ @validate_call
2079
+ def get_schema_by_id_with_http_info(
2080
+ self,
2081
+ graph_id: StrictStr,
2082
+ _request_timeout: Union[
2083
+ None,
2084
+ Annotated[StrictFloat, Field(gt=0)],
2085
+ Tuple[
2086
+ Annotated[StrictFloat, Field(gt=0)],
2087
+ Annotated[StrictFloat, Field(gt=0)]
2088
+ ]
2089
+ ] = None,
2090
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2091
+ _content_type: Optional[StrictStr] = None,
2092
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2093
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2094
+ ) -> ApiResponse[GetGraphSchemaResponse]:
2095
+ """get_schema_by_id
2096
+
2097
+ Get graph schema by ID
2098
+
2099
+ :param graph_id: (required)
2100
+ :type graph_id: str
2101
+ :param _request_timeout: timeout setting for this request. If one
2102
+ number provided, it will be total request
2103
+ timeout. It can also be a pair (tuple) of
2104
+ (connection, read) timeouts.
2105
+ :type _request_timeout: int, tuple(int, int), optional
2106
+ :param _request_auth: set to override the auth_settings for an a single
2107
+ request; this effectively ignores the
2108
+ authentication in the spec for a single request.
2109
+ :type _request_auth: dict, optional
2110
+ :param _content_type: force content-type for the request.
2111
+ :type _content_type: str, Optional
2112
+ :param _headers: set to override the headers for a single
2113
+ request; this effectively ignores the headers
2114
+ in the spec for a single request.
2115
+ :type _headers: dict, optional
2116
+ :param _host_index: set to override the host_index for a single
2117
+ request; this effectively ignores the host_index
2118
+ in the spec for a single request.
2119
+ :type _host_index: int, optional
2120
+ :return: Returns the result object.
2121
+ """ # noqa: E501
2122
+
2123
+ _param = self._get_schema_by_id_serialize(
2124
+ graph_id=graph_id,
2125
+ _request_auth=_request_auth,
2126
+ _content_type=_content_type,
2127
+ _headers=_headers,
2128
+ _host_index=_host_index
2129
+ )
2130
+
2131
+ _response_types_map: Dict[str, Optional[str]] = {
2132
+ '200': "GetGraphSchemaResponse",
2133
+ '500': "Error",
2134
+ }
2135
+ response_data = self.api_client.call_api(
2136
+ *_param,
2137
+ _request_timeout=_request_timeout
2138
+ )
2139
+ response_data.read()
2140
+ return self.api_client.response_deserialize(
2141
+ response_data=response_data,
2142
+ response_types_map=_response_types_map,
2143
+ )
2144
+
2145
+
2146
+ @validate_call
2147
+ def get_schema_by_id_without_preload_content(
2148
+ self,
2149
+ graph_id: StrictStr,
2150
+ _request_timeout: Union[
2151
+ None,
2152
+ Annotated[StrictFloat, Field(gt=0)],
2153
+ Tuple[
2154
+ Annotated[StrictFloat, Field(gt=0)],
2155
+ Annotated[StrictFloat, Field(gt=0)]
2156
+ ]
2157
+ ] = None,
2158
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2159
+ _content_type: Optional[StrictStr] = None,
2160
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2161
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2162
+ ) -> RESTResponseType:
2163
+ """get_schema_by_id
2164
+
2165
+ Get graph schema by ID
2166
+
2167
+ :param graph_id: (required)
2168
+ :type graph_id: str
2169
+ :param _request_timeout: timeout setting for this request. If one
2170
+ number provided, it will be total request
2171
+ timeout. It can also be a pair (tuple) of
2172
+ (connection, read) timeouts.
2173
+ :type _request_timeout: int, tuple(int, int), optional
2174
+ :param _request_auth: set to override the auth_settings for an a single
2175
+ request; this effectively ignores the
2176
+ authentication in the spec for a single request.
2177
+ :type _request_auth: dict, optional
2178
+ :param _content_type: force content-type for the request.
2179
+ :type _content_type: str, Optional
2180
+ :param _headers: set to override the headers for a single
2181
+ request; this effectively ignores the headers
2182
+ in the spec for a single request.
2183
+ :type _headers: dict, optional
2184
+ :param _host_index: set to override the host_index for a single
2185
+ request; this effectively ignores the host_index
2186
+ in the spec for a single request.
2187
+ :type _host_index: int, optional
2188
+ :return: Returns the result object.
2189
+ """ # noqa: E501
2190
+
2191
+ _param = self._get_schema_by_id_serialize(
2192
+ graph_id=graph_id,
2193
+ _request_auth=_request_auth,
2194
+ _content_type=_content_type,
2195
+ _headers=_headers,
2196
+ _host_index=_host_index
2197
+ )
2198
+
2199
+ _response_types_map: Dict[str, Optional[str]] = {
2200
+ '200': "GetGraphSchemaResponse",
2201
+ '500': "Error",
2202
+ }
2203
+ response_data = self.api_client.call_api(
2204
+ *_param,
2205
+ _request_timeout=_request_timeout
2206
+ )
2207
+ return response_data.response
2208
+
2209
+
2210
+ def _get_schema_by_id_serialize(
2211
+ self,
2212
+ graph_id,
2213
+ _request_auth,
2214
+ _content_type,
2215
+ _headers,
2216
+ _host_index,
2217
+ ) -> RequestSerialized:
2218
+
2219
+ _host = None
2220
+
2221
+ _collection_formats: Dict[str, str] = {
2222
+ }
2223
+
2224
+ _path_params: Dict[str, str] = {}
2225
+ _query_params: List[Tuple[str, str]] = []
2226
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2227
+ _form_params: List[Tuple[str, str]] = []
2228
+ _files: Dict[str, str] = {}
2229
+ _body_params: Optional[bytes] = None
2230
+
2231
+ # process the path parameters
2232
+ if graph_id is not None:
2233
+ _path_params['graph_id'] = graph_id
2234
+ # process the query parameters
2235
+ # process the header parameters
2236
+ # process the form parameters
2237
+ # process the body parameter
2238
+
2239
+
2240
+ # set the HTTP header `Accept`
2241
+ _header_params['Accept'] = self.api_client.select_header_accept(
2242
+ [
2243
+ 'application/json'
2244
+ ]
2245
+ )
2246
+
2247
+
2248
+ # authentication setting
2249
+ _auth_settings: List[str] = [
2250
+ ]
2251
+
2252
+ return self.api_client.param_serialize(
2253
+ method='GET',
2254
+ resource_path='/api/v1/graph/{graph_id}/schema',
2255
+ path_params=_path_params,
2256
+ query_params=_query_params,
2257
+ header_params=_header_params,
2258
+ body=_body_params,
2259
+ post_params=_form_params,
2260
+ files=_files,
2261
+ auth_settings=_auth_settings,
2262
+ collection_formats=_collection_formats,
2263
+ _host=_host,
2264
+ _request_auth=_request_auth
2265
+ )
2266
+
2267
+
2268
+
2269
+
2270
+ @validate_call
2271
+ def import_schema_by_id(
2272
+ self,
2273
+ graph_id: StrictStr,
2274
+ create_graph_schema_request: CreateGraphSchemaRequest,
2275
+ _request_timeout: Union[
2276
+ None,
2277
+ Annotated[StrictFloat, Field(gt=0)],
2278
+ Tuple[
2279
+ Annotated[StrictFloat, Field(gt=0)],
2280
+ Annotated[StrictFloat, Field(gt=0)]
2281
+ ]
2282
+ ] = None,
2283
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2284
+ _content_type: Optional[StrictStr] = None,
2285
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2286
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2287
+ ) -> str:
2288
+ """import_schema_by_id
2289
+
2290
+ Import graph schema
2291
+
2292
+ :param graph_id: (required)
2293
+ :type graph_id: str
2294
+ :param create_graph_schema_request: (required)
2295
+ :type create_graph_schema_request: CreateGraphSchemaRequest
2296
+ :param _request_timeout: timeout setting for this request. If one
2297
+ number provided, it will be total request
2298
+ timeout. It can also be a pair (tuple) of
2299
+ (connection, read) timeouts.
2300
+ :type _request_timeout: int, tuple(int, int), optional
2301
+ :param _request_auth: set to override the auth_settings for an a single
2302
+ request; this effectively ignores the
2303
+ authentication in the spec for a single request.
2304
+ :type _request_auth: dict, optional
2305
+ :param _content_type: force content-type for the request.
2306
+ :type _content_type: str, Optional
2307
+ :param _headers: set to override the headers for a single
2308
+ request; this effectively ignores the headers
2309
+ in the spec for a single request.
2310
+ :type _headers: dict, optional
2311
+ :param _host_index: set to override the host_index for a single
2312
+ request; this effectively ignores the host_index
2313
+ in the spec for a single request.
2314
+ :type _host_index: int, optional
2315
+ :return: Returns the result object.
2316
+ """ # noqa: E501
2317
+
2318
+ _param = self._import_schema_by_id_serialize(
2319
+ graph_id=graph_id,
2320
+ create_graph_schema_request=create_graph_schema_request,
2321
+ _request_auth=_request_auth,
2322
+ _content_type=_content_type,
2323
+ _headers=_headers,
2324
+ _host_index=_host_index
2325
+ )
2326
+
2327
+ _response_types_map: Dict[str, Optional[str]] = {
2328
+ '200': "str",
2329
+ '400': "Error",
2330
+ '500': "Error",
2331
+ }
2332
+ response_data = self.api_client.call_api(
2333
+ *_param,
2334
+ _request_timeout=_request_timeout
2335
+ )
2336
+ response_data.read()
2337
+ return self.api_client.response_deserialize(
2338
+ response_data=response_data,
2339
+ response_types_map=_response_types_map,
2340
+ ).data
2341
+
2342
+
2343
+ @validate_call
2344
+ def import_schema_by_id_with_http_info(
2345
+ self,
2346
+ graph_id: StrictStr,
2347
+ create_graph_schema_request: CreateGraphSchemaRequest,
2348
+ _request_timeout: Union[
2349
+ None,
2350
+ Annotated[StrictFloat, Field(gt=0)],
2351
+ Tuple[
2352
+ Annotated[StrictFloat, Field(gt=0)],
2353
+ Annotated[StrictFloat, Field(gt=0)]
2354
+ ]
2355
+ ] = None,
2356
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2357
+ _content_type: Optional[StrictStr] = None,
2358
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2359
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2360
+ ) -> ApiResponse[str]:
2361
+ """import_schema_by_id
2362
+
2363
+ Import graph schema
2364
+
2365
+ :param graph_id: (required)
2366
+ :type graph_id: str
2367
+ :param create_graph_schema_request: (required)
2368
+ :type create_graph_schema_request: CreateGraphSchemaRequest
2369
+ :param _request_timeout: timeout setting for this request. If one
2370
+ number provided, it will be total request
2371
+ timeout. It can also be a pair (tuple) of
2372
+ (connection, read) timeouts.
2373
+ :type _request_timeout: int, tuple(int, int), optional
2374
+ :param _request_auth: set to override the auth_settings for an a single
2375
+ request; this effectively ignores the
2376
+ authentication in the spec for a single request.
2377
+ :type _request_auth: dict, optional
2378
+ :param _content_type: force content-type for the request.
2379
+ :type _content_type: str, Optional
2380
+ :param _headers: set to override the headers for a single
2381
+ request; this effectively ignores the headers
2382
+ in the spec for a single request.
2383
+ :type _headers: dict, optional
2384
+ :param _host_index: set to override the host_index for a single
2385
+ request; this effectively ignores the host_index
2386
+ in the spec for a single request.
2387
+ :type _host_index: int, optional
2388
+ :return: Returns the result object.
2389
+ """ # noqa: E501
2390
+
2391
+ _param = self._import_schema_by_id_serialize(
2392
+ graph_id=graph_id,
2393
+ create_graph_schema_request=create_graph_schema_request,
2394
+ _request_auth=_request_auth,
2395
+ _content_type=_content_type,
2396
+ _headers=_headers,
2397
+ _host_index=_host_index
2398
+ )
2399
+
2400
+ _response_types_map: Dict[str, Optional[str]] = {
2401
+ '200': "str",
2402
+ '400': "Error",
2403
+ '500': "Error",
2404
+ }
2405
+ response_data = self.api_client.call_api(
2406
+ *_param,
2407
+ _request_timeout=_request_timeout
2408
+ )
2409
+ response_data.read()
2410
+ return self.api_client.response_deserialize(
2411
+ response_data=response_data,
2412
+ response_types_map=_response_types_map,
2413
+ )
2414
+
2415
+
2416
+ @validate_call
2417
+ def import_schema_by_id_without_preload_content(
2418
+ self,
2419
+ graph_id: StrictStr,
2420
+ create_graph_schema_request: CreateGraphSchemaRequest,
2421
+ _request_timeout: Union[
2422
+ None,
2423
+ Annotated[StrictFloat, Field(gt=0)],
2424
+ Tuple[
2425
+ Annotated[StrictFloat, Field(gt=0)],
2426
+ Annotated[StrictFloat, Field(gt=0)]
2427
+ ]
2428
+ ] = None,
2429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2430
+ _content_type: Optional[StrictStr] = None,
2431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2433
+ ) -> RESTResponseType:
2434
+ """import_schema_by_id
2435
+
2436
+ Import graph schema
2437
+
2438
+ :param graph_id: (required)
2439
+ :type graph_id: str
2440
+ :param create_graph_schema_request: (required)
2441
+ :type create_graph_schema_request: CreateGraphSchemaRequest
2442
+ :param _request_timeout: timeout setting for this request. If one
2443
+ number provided, it will be total request
2444
+ timeout. It can also be a pair (tuple) of
2445
+ (connection, read) timeouts.
2446
+ :type _request_timeout: int, tuple(int, int), optional
2447
+ :param _request_auth: set to override the auth_settings for an a single
2448
+ request; this effectively ignores the
2449
+ authentication in the spec for a single request.
2450
+ :type _request_auth: dict, optional
2451
+ :param _content_type: force content-type for the request.
2452
+ :type _content_type: str, Optional
2453
+ :param _headers: set to override the headers for a single
2454
+ request; this effectively ignores the headers
2455
+ in the spec for a single request.
2456
+ :type _headers: dict, optional
2457
+ :param _host_index: set to override the host_index for a single
2458
+ request; this effectively ignores the host_index
2459
+ in the spec for a single request.
2460
+ :type _host_index: int, optional
2461
+ :return: Returns the result object.
2462
+ """ # noqa: E501
2463
+
2464
+ _param = self._import_schema_by_id_serialize(
2465
+ graph_id=graph_id,
2466
+ create_graph_schema_request=create_graph_schema_request,
2467
+ _request_auth=_request_auth,
2468
+ _content_type=_content_type,
2469
+ _headers=_headers,
2470
+ _host_index=_host_index
2471
+ )
2472
+
2473
+ _response_types_map: Dict[str, Optional[str]] = {
2474
+ '200': "str",
2475
+ '400': "Error",
2476
+ '500': "Error",
2477
+ }
2478
+ response_data = self.api_client.call_api(
2479
+ *_param,
2480
+ _request_timeout=_request_timeout
2481
+ )
2482
+ return response_data.response
2483
+
2484
+
2485
+ def _import_schema_by_id_serialize(
2486
+ self,
2487
+ graph_id,
2488
+ create_graph_schema_request,
2489
+ _request_auth,
2490
+ _content_type,
2491
+ _headers,
2492
+ _host_index,
2493
+ ) -> RequestSerialized:
2494
+
2495
+ _host = None
2496
+
2497
+ _collection_formats: Dict[str, str] = {
2498
+ }
2499
+
2500
+ _path_params: Dict[str, str] = {}
2501
+ _query_params: List[Tuple[str, str]] = []
2502
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2503
+ _form_params: List[Tuple[str, str]] = []
2504
+ _files: Dict[str, str] = {}
2505
+ _body_params: Optional[bytes] = None
2506
+
2507
+ # process the path parameters
2508
+ if graph_id is not None:
2509
+ _path_params['graph_id'] = graph_id
2510
+ # process the query parameters
2511
+ # process the header parameters
2512
+ # process the form parameters
2513
+ # process the body parameter
2514
+ if create_graph_schema_request is not None:
2515
+ _body_params = create_graph_schema_request
2516
+
2517
+
2518
+ # set the HTTP header `Accept`
2519
+ _header_params['Accept'] = self.api_client.select_header_accept(
2520
+ [
2521
+ 'application/json'
2522
+ ]
2523
+ )
2524
+
2525
+ # set the HTTP header `Content-Type`
2526
+ if _content_type:
2527
+ _header_params['Content-Type'] = _content_type
2528
+ else:
2529
+ _default_content_type = (
2530
+ self.api_client.select_header_content_type(
2531
+ [
2532
+ 'application/json'
2533
+ ]
2534
+ )
2535
+ )
2536
+ if _default_content_type is not None:
2537
+ _header_params['Content-Type'] = _default_content_type
2538
+
2539
+ # authentication setting
2540
+ _auth_settings: List[str] = [
2541
+ ]
2542
+
2543
+ return self.api_client.param_serialize(
2544
+ method='POST',
2545
+ resource_path='/api/v1/graph/{graph_id}/schema',
2546
+ path_params=_path_params,
2547
+ query_params=_query_params,
2548
+ header_params=_header_params,
2549
+ body=_body_params,
2550
+ post_params=_form_params,
2551
+ files=_files,
2552
+ auth_settings=_auth_settings,
2553
+ collection_formats=_collection_formats,
2554
+ _host=_host,
2555
+ _request_auth=_request_auth
2556
+ )
2557
+
2558
+
2559
+
2560
+
2561
+ @validate_call
2562
+ def list_graphs(
2563
+ self,
2564
+ _request_timeout: Union[
2565
+ None,
2566
+ Annotated[StrictFloat, Field(gt=0)],
2567
+ Tuple[
2568
+ Annotated[StrictFloat, Field(gt=0)],
2569
+ Annotated[StrictFloat, Field(gt=0)]
2570
+ ]
2571
+ ] = None,
2572
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2573
+ _content_type: Optional[StrictStr] = None,
2574
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2575
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2576
+ ) -> List[GetGraphResponse]:
2577
+ """list_graphs
2578
+
2579
+ List all graphs
2580
+
2581
+ :param _request_timeout: timeout setting for this request. If one
2582
+ number provided, it will be total request
2583
+ timeout. It can also be a pair (tuple) of
2584
+ (connection, read) timeouts.
2585
+ :type _request_timeout: int, tuple(int, int), optional
2586
+ :param _request_auth: set to override the auth_settings for an a single
2587
+ request; this effectively ignores the
2588
+ authentication in the spec for a single request.
2589
+ :type _request_auth: dict, optional
2590
+ :param _content_type: force content-type for the request.
2591
+ :type _content_type: str, Optional
2592
+ :param _headers: set to override the headers for a single
2593
+ request; this effectively ignores the headers
2594
+ in the spec for a single request.
2595
+ :type _headers: dict, optional
2596
+ :param _host_index: set to override the host_index for a single
2597
+ request; this effectively ignores the host_index
2598
+ in the spec for a single request.
2599
+ :type _host_index: int, optional
2600
+ :return: Returns the result object.
2601
+ """ # noqa: E501
2602
+
2603
+ _param = self._list_graphs_serialize(
2604
+ _request_auth=_request_auth,
2605
+ _content_type=_content_type,
2606
+ _headers=_headers,
2607
+ _host_index=_host_index
2608
+ )
2609
+
2610
+ _response_types_map: Dict[str, Optional[str]] = {
2611
+ '200': "List[GetGraphResponse]",
2612
+ '500': "Error",
2613
+ }
2614
+ response_data = self.api_client.call_api(
2615
+ *_param,
2616
+ _request_timeout=_request_timeout
2617
+ )
2618
+ response_data.read()
2619
+ return self.api_client.response_deserialize(
2620
+ response_data=response_data,
2621
+ response_types_map=_response_types_map,
2622
+ ).data
2623
+
2624
+
2625
+ @validate_call
2626
+ def list_graphs_with_http_info(
2627
+ self,
2628
+ _request_timeout: Union[
2629
+ None,
2630
+ Annotated[StrictFloat, Field(gt=0)],
2631
+ Tuple[
2632
+ Annotated[StrictFloat, Field(gt=0)],
2633
+ Annotated[StrictFloat, Field(gt=0)]
2634
+ ]
2635
+ ] = None,
2636
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2637
+ _content_type: Optional[StrictStr] = None,
2638
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2639
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2640
+ ) -> ApiResponse[List[GetGraphResponse]]:
2641
+ """list_graphs
2642
+
2643
+ List all graphs
2644
+
2645
+ :param _request_timeout: timeout setting for this request. If one
2646
+ number provided, it will be total request
2647
+ timeout. It can also be a pair (tuple) of
2648
+ (connection, read) timeouts.
2649
+ :type _request_timeout: int, tuple(int, int), optional
2650
+ :param _request_auth: set to override the auth_settings for an a single
2651
+ request; this effectively ignores the
2652
+ authentication in the spec for a single request.
2653
+ :type _request_auth: dict, optional
2654
+ :param _content_type: force content-type for the request.
2655
+ :type _content_type: str, Optional
2656
+ :param _headers: set to override the headers for a single
2657
+ request; this effectively ignores the headers
2658
+ in the spec for a single request.
2659
+ :type _headers: dict, optional
2660
+ :param _host_index: set to override the host_index for a single
2661
+ request; this effectively ignores the host_index
2662
+ in the spec for a single request.
2663
+ :type _host_index: int, optional
2664
+ :return: Returns the result object.
2665
+ """ # noqa: E501
2666
+
2667
+ _param = self._list_graphs_serialize(
2668
+ _request_auth=_request_auth,
2669
+ _content_type=_content_type,
2670
+ _headers=_headers,
2671
+ _host_index=_host_index
2672
+ )
2673
+
2674
+ _response_types_map: Dict[str, Optional[str]] = {
2675
+ '200': "List[GetGraphResponse]",
2676
+ '500': "Error",
2677
+ }
2678
+ response_data = self.api_client.call_api(
2679
+ *_param,
2680
+ _request_timeout=_request_timeout
2681
+ )
2682
+ response_data.read()
2683
+ return self.api_client.response_deserialize(
2684
+ response_data=response_data,
2685
+ response_types_map=_response_types_map,
2686
+ )
2687
+
2688
+
2689
+ @validate_call
2690
+ def list_graphs_without_preload_content(
2691
+ self,
2692
+ _request_timeout: Union[
2693
+ None,
2694
+ Annotated[StrictFloat, Field(gt=0)],
2695
+ Tuple[
2696
+ Annotated[StrictFloat, Field(gt=0)],
2697
+ Annotated[StrictFloat, Field(gt=0)]
2698
+ ]
2699
+ ] = None,
2700
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2701
+ _content_type: Optional[StrictStr] = None,
2702
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2703
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2704
+ ) -> RESTResponseType:
2705
+ """list_graphs
2706
+
2707
+ List all graphs
2708
+
2709
+ :param _request_timeout: timeout setting for this request. If one
2710
+ number provided, it will be total request
2711
+ timeout. It can also be a pair (tuple) of
2712
+ (connection, read) timeouts.
2713
+ :type _request_timeout: int, tuple(int, int), optional
2714
+ :param _request_auth: set to override the auth_settings for an a single
2715
+ request; this effectively ignores the
2716
+ authentication in the spec for a single request.
2717
+ :type _request_auth: dict, optional
2718
+ :param _content_type: force content-type for the request.
2719
+ :type _content_type: str, Optional
2720
+ :param _headers: set to override the headers for a single
2721
+ request; this effectively ignores the headers
2722
+ in the spec for a single request.
2723
+ :type _headers: dict, optional
2724
+ :param _host_index: set to override the host_index for a single
2725
+ request; this effectively ignores the host_index
2726
+ in the spec for a single request.
2727
+ :type _host_index: int, optional
2728
+ :return: Returns the result object.
2729
+ """ # noqa: E501
2730
+
2731
+ _param = self._list_graphs_serialize(
2732
+ _request_auth=_request_auth,
2733
+ _content_type=_content_type,
2734
+ _headers=_headers,
2735
+ _host_index=_host_index
2736
+ )
2737
+
2738
+ _response_types_map: Dict[str, Optional[str]] = {
2739
+ '200': "List[GetGraphResponse]",
2740
+ '500': "Error",
2741
+ }
2742
+ response_data = self.api_client.call_api(
2743
+ *_param,
2744
+ _request_timeout=_request_timeout
2745
+ )
2746
+ return response_data.response
2747
+
2748
+
2749
+ def _list_graphs_serialize(
2750
+ self,
2751
+ _request_auth,
2752
+ _content_type,
2753
+ _headers,
2754
+ _host_index,
2755
+ ) -> RequestSerialized:
2756
+
2757
+ _host = None
2758
+
2759
+ _collection_formats: Dict[str, str] = {
2760
+ }
2761
+
2762
+ _path_params: Dict[str, str] = {}
2763
+ _query_params: List[Tuple[str, str]] = []
2764
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2765
+ _form_params: List[Tuple[str, str]] = []
2766
+ _files: Dict[str, str] = {}
2767
+ _body_params: Optional[bytes] = None
2768
+
2769
+ # process the path parameters
2770
+ # process the query parameters
2771
+ # process the header parameters
2772
+ # process the form parameters
2773
+ # process the body parameter
2774
+
2775
+
2776
+ # set the HTTP header `Accept`
2777
+ _header_params['Accept'] = self.api_client.select_header_accept(
2778
+ [
2779
+ 'application/json'
2780
+ ]
2781
+ )
2782
+
2783
+
2784
+ # authentication setting
2785
+ _auth_settings: List[str] = [
2786
+ ]
2787
+
2788
+ return self.api_client.param_serialize(
2789
+ method='GET',
2790
+ resource_path='/api/v1/graph',
2791
+ path_params=_path_params,
2792
+ query_params=_query_params,
2793
+ header_params=_header_params,
2794
+ body=_body_params,
2795
+ post_params=_form_params,
2796
+ files=_files,
2797
+ auth_settings=_auth_settings,
2798
+ collection_formats=_collection_formats,
2799
+ _host=_host,
2800
+ _request_auth=_request_auth
2801
+ )
2802
+
2803
+