gsctl 0.29.0a20250114__py2.py3-none-any.whl

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