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

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