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