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