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