daytona_toolbox_api_client 0.102.0rc2__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.

Potentially problematic release.


This version of daytona_toolbox_api_client might be problematic. Click here for more details.

Files changed (163) hide show
  1. daytona_daemon_api_client/__init__.py +102 -0
  2. daytona_daemon_api_client/api/__init__.py +11 -0
  3. daytona_daemon_api_client/api/computer_use_api.py +6077 -0
  4. daytona_daemon_api_client/api/file_system_api.py +3463 -0
  5. daytona_daemon_api_client/api/git_api.py +3052 -0
  6. daytona_daemon_api_client/api/info_api.py +528 -0
  7. daytona_daemon_api_client/api/lsp_api.py +2027 -0
  8. daytona_daemon_api_client/api/port_api.py +547 -0
  9. daytona_daemon_api_client/api/process_api.py +2262 -0
  10. daytona_daemon_api_client/api_client.py +797 -0
  11. daytona_daemon_api_client/api_response.py +21 -0
  12. daytona_daemon_api_client/configuration.py +572 -0
  13. daytona_daemon_api_client/exceptions.py +216 -0
  14. daytona_daemon_api_client/models/__init__.py +79 -0
  15. daytona_daemon_api_client/models/command.py +104 -0
  16. daytona_daemon_api_client/models/completion_context.py +102 -0
  17. daytona_daemon_api_client/models/completion_item.py +112 -0
  18. daytona_daemon_api_client/models/completion_list.py +110 -0
  19. daytona_daemon_api_client/models/computer_use_start_response.py +115 -0
  20. daytona_daemon_api_client/models/computer_use_status_response.py +100 -0
  21. daytona_daemon_api_client/models/computer_use_stop_response.py +115 -0
  22. daytona_daemon_api_client/models/create_session_request.py +100 -0
  23. daytona_daemon_api_client/models/display_info.py +110 -0
  24. daytona_daemon_api_client/models/display_info_response.py +108 -0
  25. daytona_daemon_api_client/models/execute_request.py +104 -0
  26. daytona_daemon_api_client/models/execute_response.py +102 -0
  27. daytona_daemon_api_client/models/file_info.py +114 -0
  28. daytona_daemon_api_client/models/file_status.py +107 -0
  29. daytona_daemon_api_client/models/git_add_request.py +102 -0
  30. daytona_daemon_api_client/models/git_branch_request.py +102 -0
  31. daytona_daemon_api_client/models/git_checkout_request.py +102 -0
  32. daytona_daemon_api_client/models/git_clone_request.py +110 -0
  33. daytona_daemon_api_client/models/git_commit_info.py +108 -0
  34. daytona_daemon_api_client/models/git_commit_request.py +108 -0
  35. daytona_daemon_api_client/models/git_commit_response.py +100 -0
  36. daytona_daemon_api_client/models/git_git_delete_branch_request.py +102 -0
  37. daytona_daemon_api_client/models/git_repo_request.py +104 -0
  38. daytona_daemon_api_client/models/git_status.py +116 -0
  39. daytona_daemon_api_client/models/is_port_in_use_response.py +100 -0
  40. daytona_daemon_api_client/models/keyboard_hotkey_request.py +100 -0
  41. daytona_daemon_api_client/models/keyboard_press_request.py +102 -0
  42. daytona_daemon_api_client/models/keyboard_type_request.py +102 -0
  43. daytona_daemon_api_client/models/list_branch_response.py +100 -0
  44. daytona_daemon_api_client/models/lsp_completion_params.py +116 -0
  45. daytona_daemon_api_client/models/lsp_document_request.py +104 -0
  46. daytona_daemon_api_client/models/lsp_location.py +106 -0
  47. daytona_daemon_api_client/models/lsp_position.py +102 -0
  48. daytona_daemon_api_client/models/lsp_range.py +109 -0
  49. daytona_daemon_api_client/models/lsp_server_request.py +102 -0
  50. daytona_daemon_api_client/models/lsp_symbol.py +108 -0
  51. daytona_daemon_api_client/models/match.py +104 -0
  52. daytona_daemon_api_client/models/mouse_click_request.py +106 -0
  53. daytona_daemon_api_client/models/mouse_click_response.py +102 -0
  54. daytona_daemon_api_client/models/mouse_drag_request.py +108 -0
  55. daytona_daemon_api_client/models/mouse_drag_response.py +102 -0
  56. daytona_daemon_api_client/models/mouse_move_request.py +102 -0
  57. daytona_daemon_api_client/models/mouse_position_response.py +102 -0
  58. daytona_daemon_api_client/models/mouse_scroll_request.py +106 -0
  59. daytona_daemon_api_client/models/port_list.py +100 -0
  60. daytona_daemon_api_client/models/position.py +102 -0
  61. daytona_daemon_api_client/models/process_errors_response.py +102 -0
  62. daytona_daemon_api_client/models/process_logs_response.py +102 -0
  63. daytona_daemon_api_client/models/process_restart_response.py +102 -0
  64. daytona_daemon_api_client/models/process_status.py +106 -0
  65. daytona_daemon_api_client/models/process_status_response.py +102 -0
  66. daytona_daemon_api_client/models/project_dir_response.py +100 -0
  67. daytona_daemon_api_client/models/replace_request.py +104 -0
  68. daytona_daemon_api_client/models/replace_result.py +104 -0
  69. daytona_daemon_api_client/models/screenshot_response.py +108 -0
  70. daytona_daemon_api_client/models/scroll_response.py +100 -0
  71. daytona_daemon_api_client/models/search_files_response.py +100 -0
  72. daytona_daemon_api_client/models/session.py +110 -0
  73. daytona_daemon_api_client/models/session_execute_request.py +104 -0
  74. daytona_daemon_api_client/models/session_execute_response.py +108 -0
  75. daytona_daemon_api_client/models/status.py +43 -0
  76. daytona_daemon_api_client/models/window_info.py +112 -0
  77. daytona_daemon_api_client/models/windows_response.py +108 -0
  78. daytona_daemon_api_client/py.typed +0 -0
  79. daytona_daemon_api_client/rest.py +258 -0
  80. daytona_toolbox_api_client/__init__.py +102 -0
  81. daytona_toolbox_api_client/api/__init__.py +11 -0
  82. daytona_toolbox_api_client/api/computer_use_api.py +6011 -0
  83. daytona_toolbox_api_client/api/file_system_api.py +3310 -0
  84. daytona_toolbox_api_client/api/git_api.py +2970 -0
  85. daytona_toolbox_api_client/api/info_api.py +528 -0
  86. daytona_toolbox_api_client/api/lsp_api.py +1972 -0
  87. daytona_toolbox_api_client/api/port_api.py +544 -0
  88. daytona_toolbox_api_client/api/process_api.py +2200 -0
  89. daytona_toolbox_api_client/api_client.py +797 -0
  90. daytona_toolbox_api_client/api_response.py +21 -0
  91. daytona_toolbox_api_client/configuration.py +572 -0
  92. daytona_toolbox_api_client/exceptions.py +216 -0
  93. daytona_toolbox_api_client/models/__init__.py +79 -0
  94. daytona_toolbox_api_client/models/command.py +104 -0
  95. daytona_toolbox_api_client/models/completion_context.py +102 -0
  96. daytona_toolbox_api_client/models/completion_item.py +112 -0
  97. daytona_toolbox_api_client/models/completion_list.py +110 -0
  98. daytona_toolbox_api_client/models/computer_use_start_response.py +115 -0
  99. daytona_toolbox_api_client/models/computer_use_status_response.py +100 -0
  100. daytona_toolbox_api_client/models/computer_use_stop_response.py +115 -0
  101. daytona_toolbox_api_client/models/create_session_request.py +100 -0
  102. daytona_toolbox_api_client/models/display_info.py +110 -0
  103. daytona_toolbox_api_client/models/display_info_response.py +108 -0
  104. daytona_toolbox_api_client/models/execute_request.py +104 -0
  105. daytona_toolbox_api_client/models/execute_response.py +102 -0
  106. daytona_toolbox_api_client/models/file_info.py +114 -0
  107. daytona_toolbox_api_client/models/file_status.py +107 -0
  108. daytona_toolbox_api_client/models/git_add_request.py +102 -0
  109. daytona_toolbox_api_client/models/git_branch_request.py +102 -0
  110. daytona_toolbox_api_client/models/git_checkout_request.py +102 -0
  111. daytona_toolbox_api_client/models/git_clone_request.py +110 -0
  112. daytona_toolbox_api_client/models/git_commit_info.py +108 -0
  113. daytona_toolbox_api_client/models/git_commit_request.py +108 -0
  114. daytona_toolbox_api_client/models/git_commit_response.py +100 -0
  115. daytona_toolbox_api_client/models/git_git_delete_branch_request.py +102 -0
  116. daytona_toolbox_api_client/models/git_repo_request.py +104 -0
  117. daytona_toolbox_api_client/models/git_status.py +116 -0
  118. daytona_toolbox_api_client/models/is_port_in_use_response.py +100 -0
  119. daytona_toolbox_api_client/models/keyboard_hotkey_request.py +100 -0
  120. daytona_toolbox_api_client/models/keyboard_press_request.py +102 -0
  121. daytona_toolbox_api_client/models/keyboard_type_request.py +102 -0
  122. daytona_toolbox_api_client/models/list_branch_response.py +100 -0
  123. daytona_toolbox_api_client/models/lsp_completion_params.py +116 -0
  124. daytona_toolbox_api_client/models/lsp_document_request.py +104 -0
  125. daytona_toolbox_api_client/models/lsp_location.py +106 -0
  126. daytona_toolbox_api_client/models/lsp_position.py +102 -0
  127. daytona_toolbox_api_client/models/lsp_range.py +109 -0
  128. daytona_toolbox_api_client/models/lsp_server_request.py +102 -0
  129. daytona_toolbox_api_client/models/lsp_symbol.py +108 -0
  130. daytona_toolbox_api_client/models/match.py +104 -0
  131. daytona_toolbox_api_client/models/mouse_click_request.py +106 -0
  132. daytona_toolbox_api_client/models/mouse_click_response.py +102 -0
  133. daytona_toolbox_api_client/models/mouse_drag_request.py +108 -0
  134. daytona_toolbox_api_client/models/mouse_drag_response.py +102 -0
  135. daytona_toolbox_api_client/models/mouse_move_request.py +102 -0
  136. daytona_toolbox_api_client/models/mouse_position_response.py +102 -0
  137. daytona_toolbox_api_client/models/mouse_scroll_request.py +106 -0
  138. daytona_toolbox_api_client/models/port_list.py +100 -0
  139. daytona_toolbox_api_client/models/position.py +102 -0
  140. daytona_toolbox_api_client/models/process_errors_response.py +102 -0
  141. daytona_toolbox_api_client/models/process_logs_response.py +102 -0
  142. daytona_toolbox_api_client/models/process_restart_response.py +102 -0
  143. daytona_toolbox_api_client/models/process_status.py +106 -0
  144. daytona_toolbox_api_client/models/process_status_response.py +102 -0
  145. daytona_toolbox_api_client/models/project_dir_response.py +100 -0
  146. daytona_toolbox_api_client/models/replace_request.py +104 -0
  147. daytona_toolbox_api_client/models/replace_result.py +104 -0
  148. daytona_toolbox_api_client/models/screenshot_response.py +108 -0
  149. daytona_toolbox_api_client/models/scroll_response.py +100 -0
  150. daytona_toolbox_api_client/models/search_files_response.py +100 -0
  151. daytona_toolbox_api_client/models/session.py +110 -0
  152. daytona_toolbox_api_client/models/session_execute_request.py +104 -0
  153. daytona_toolbox_api_client/models/session_execute_response.py +108 -0
  154. daytona_toolbox_api_client/models/status.py +43 -0
  155. daytona_toolbox_api_client/models/window_info.py +112 -0
  156. daytona_toolbox_api_client/models/windows_response.py +108 -0
  157. daytona_toolbox_api_client/py.typed +0 -0
  158. daytona_toolbox_api_client/rest.py +258 -0
  159. daytona_toolbox_api_client-0.102.0rc2.dist-info/METADATA +25 -0
  160. daytona_toolbox_api_client-0.102.0rc2.dist-info/RECORD +163 -0
  161. daytona_toolbox_api_client-0.102.0rc2.dist-info/WHEEL +5 -0
  162. daytona_toolbox_api_client-0.102.0rc2.dist-info/licenses/LICENSE +190 -0
  163. daytona_toolbox_api_client-0.102.0rc2.dist-info/top_level.txt +2 -0
@@ -0,0 +1,2200 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon API
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBool, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from daytona_toolbox_api_client.models.command import Command
23
+ from daytona_toolbox_api_client.models.create_session_request import CreateSessionRequest
24
+ from daytona_toolbox_api_client.models.execute_request import ExecuteRequest
25
+ from daytona_toolbox_api_client.models.execute_response import ExecuteResponse
26
+ from daytona_toolbox_api_client.models.session import Session
27
+ from daytona_toolbox_api_client.models.session_execute_request import SessionExecuteRequest
28
+ from daytona_toolbox_api_client.models.session_execute_response import SessionExecuteResponse
29
+
30
+ from daytona_toolbox_api_client.api_client import ApiClient, RequestSerialized
31
+ from daytona_toolbox_api_client.api_response import ApiResponse
32
+ from daytona_toolbox_api_client.rest import RESTResponseType
33
+
34
+
35
+ class ProcessApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def create_session(
50
+ self,
51
+ request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> None:
65
+ """Create a new session
66
+
67
+ Create a new shell session for command execution
68
+
69
+ :param request: Session creation request (required)
70
+ :type request: CreateSessionRequest
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_session_serialize(
94
+ request=request,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '201': None,
103
+ }
104
+ response_data = self.api_client.call_api(
105
+ *_param,
106
+ _request_timeout=_request_timeout
107
+ )
108
+ response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+
115
+ @validate_call
116
+ def create_session_with_http_info(
117
+ self,
118
+ request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[None]:
132
+ """Create a new session
133
+
134
+ Create a new shell session for command execution
135
+
136
+ :param request: Session creation request (required)
137
+ :type request: CreateSessionRequest
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._create_session_serialize(
161
+ request=request,
162
+ _request_auth=_request_auth,
163
+ _content_type=_content_type,
164
+ _headers=_headers,
165
+ _host_index=_host_index
166
+ )
167
+
168
+ _response_types_map: Dict[str, Optional[str]] = {
169
+ '201': None,
170
+ }
171
+ response_data = self.api_client.call_api(
172
+ *_param,
173
+ _request_timeout=_request_timeout
174
+ )
175
+ response_data.read()
176
+ return self.api_client.response_deserialize(
177
+ response_data=response_data,
178
+ response_types_map=_response_types_map,
179
+ )
180
+
181
+
182
+ @validate_call
183
+ def create_session_without_preload_content(
184
+ self,
185
+ request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Annotated[StrictFloat, Field(gt=0)]
192
+ ]
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Create a new session
200
+
201
+ Create a new shell session for command execution
202
+
203
+ :param request: Session creation request (required)
204
+ :type request: CreateSessionRequest
205
+ :param _request_timeout: timeout setting for this request. If one
206
+ number provided, it will be total request
207
+ timeout. It can also be a pair (tuple) of
208
+ (connection, read) timeouts.
209
+ :type _request_timeout: int, tuple(int, int), optional
210
+ :param _request_auth: set to override the auth_settings for an a single
211
+ request; this effectively ignores the
212
+ authentication in the spec for a single request.
213
+ :type _request_auth: dict, optional
214
+ :param _content_type: force content-type for the request.
215
+ :type _content_type: str, Optional
216
+ :param _headers: set to override the headers for a single
217
+ request; this effectively ignores the headers
218
+ in the spec for a single request.
219
+ :type _headers: dict, optional
220
+ :param _host_index: set to override the host_index for a single
221
+ request; this effectively ignores the host_index
222
+ in the spec for a single request.
223
+ :type _host_index: int, optional
224
+ :return: Returns the result object.
225
+ """ # noqa: E501
226
+
227
+ _param = self._create_session_serialize(
228
+ request=request,
229
+ _request_auth=_request_auth,
230
+ _content_type=_content_type,
231
+ _headers=_headers,
232
+ _host_index=_host_index
233
+ )
234
+
235
+ _response_types_map: Dict[str, Optional[str]] = {
236
+ '201': None,
237
+ }
238
+ response_data = self.api_client.call_api(
239
+ *_param,
240
+ _request_timeout=_request_timeout
241
+ )
242
+ return response_data.response
243
+
244
+
245
+ def _create_session_serialize(
246
+ self,
247
+ request,
248
+ _request_auth,
249
+ _content_type,
250
+ _headers,
251
+ _host_index,
252
+ ) -> RequestSerialized:
253
+
254
+ _host = None
255
+
256
+ _collection_formats: Dict[str, str] = {
257
+ }
258
+
259
+ _path_params: Dict[str, str] = {}
260
+ _query_params: List[Tuple[str, str]] = []
261
+ _header_params: Dict[str, Optional[str]] = _headers or {}
262
+ _form_params: List[Tuple[str, str]] = []
263
+ _files: Dict[
264
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
265
+ ] = {}
266
+ _body_params: Optional[bytes] = None
267
+
268
+ # process the path parameters
269
+ # process the query parameters
270
+ # process the header parameters
271
+ # process the form parameters
272
+ # process the body parameter
273
+ if request is not None:
274
+ _body_params = request
275
+
276
+
277
+
278
+ # set the HTTP header `Content-Type`
279
+ if _content_type:
280
+ _header_params['Content-Type'] = _content_type
281
+ else:
282
+ _default_content_type = (
283
+ self.api_client.select_header_content_type(
284
+ [
285
+ 'application/json'
286
+ ]
287
+ )
288
+ )
289
+ if _default_content_type is not None:
290
+ _header_params['Content-Type'] = _default_content_type
291
+
292
+ # authentication setting
293
+ _auth_settings: List[str] = [
294
+ ]
295
+
296
+ return self.api_client.param_serialize(
297
+ method='POST',
298
+ resource_path='/process/session',
299
+ path_params=_path_params,
300
+ query_params=_query_params,
301
+ header_params=_header_params,
302
+ body=_body_params,
303
+ post_params=_form_params,
304
+ files=_files,
305
+ auth_settings=_auth_settings,
306
+ collection_formats=_collection_formats,
307
+ _host=_host,
308
+ _request_auth=_request_auth
309
+ )
310
+
311
+
312
+
313
+
314
+ @validate_call
315
+ def delete_session(
316
+ self,
317
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
318
+ _request_timeout: Union[
319
+ None,
320
+ Annotated[StrictFloat, Field(gt=0)],
321
+ Tuple[
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Annotated[StrictFloat, Field(gt=0)]
324
+ ]
325
+ ] = None,
326
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
327
+ _content_type: Optional[StrictStr] = None,
328
+ _headers: Optional[Dict[StrictStr, Any]] = None,
329
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
330
+ ) -> None:
331
+ """Delete a session
332
+
333
+ Delete an existing shell session
334
+
335
+ :param session_id: Session ID (required)
336
+ :type session_id: str
337
+ :param _request_timeout: timeout setting for this request. If one
338
+ number provided, it will be total request
339
+ timeout. It can also be a pair (tuple) of
340
+ (connection, read) timeouts.
341
+ :type _request_timeout: int, tuple(int, int), optional
342
+ :param _request_auth: set to override the auth_settings for an a single
343
+ request; this effectively ignores the
344
+ authentication in the spec for a single request.
345
+ :type _request_auth: dict, optional
346
+ :param _content_type: force content-type for the request.
347
+ :type _content_type: str, Optional
348
+ :param _headers: set to override the headers for a single
349
+ request; this effectively ignores the headers
350
+ in the spec for a single request.
351
+ :type _headers: dict, optional
352
+ :param _host_index: set to override the host_index for a single
353
+ request; this effectively ignores the host_index
354
+ in the spec for a single request.
355
+ :type _host_index: int, optional
356
+ :return: Returns the result object.
357
+ """ # noqa: E501
358
+
359
+ _param = self._delete_session_serialize(
360
+ session_id=session_id,
361
+ _request_auth=_request_auth,
362
+ _content_type=_content_type,
363
+ _headers=_headers,
364
+ _host_index=_host_index
365
+ )
366
+
367
+ _response_types_map: Dict[str, Optional[str]] = {
368
+ '204': None,
369
+ }
370
+ response_data = self.api_client.call_api(
371
+ *_param,
372
+ _request_timeout=_request_timeout
373
+ )
374
+ response_data.read()
375
+ return self.api_client.response_deserialize(
376
+ response_data=response_data,
377
+ response_types_map=_response_types_map,
378
+ ).data
379
+
380
+
381
+ @validate_call
382
+ def delete_session_with_http_info(
383
+ self,
384
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
385
+ _request_timeout: Union[
386
+ None,
387
+ Annotated[StrictFloat, Field(gt=0)],
388
+ Tuple[
389
+ Annotated[StrictFloat, Field(gt=0)],
390
+ Annotated[StrictFloat, Field(gt=0)]
391
+ ]
392
+ ] = None,
393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
394
+ _content_type: Optional[StrictStr] = None,
395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
397
+ ) -> ApiResponse[None]:
398
+ """Delete a session
399
+
400
+ Delete an existing shell session
401
+
402
+ :param session_id: Session ID (required)
403
+ :type session_id: str
404
+ :param _request_timeout: timeout setting for this request. If one
405
+ number provided, it will be total request
406
+ timeout. It can also be a pair (tuple) of
407
+ (connection, read) timeouts.
408
+ :type _request_timeout: int, tuple(int, int), optional
409
+ :param _request_auth: set to override the auth_settings for an a single
410
+ request; this effectively ignores the
411
+ authentication in the spec for a single request.
412
+ :type _request_auth: dict, optional
413
+ :param _content_type: force content-type for the request.
414
+ :type _content_type: str, Optional
415
+ :param _headers: set to override the headers for a single
416
+ request; this effectively ignores the headers
417
+ in the spec for a single request.
418
+ :type _headers: dict, optional
419
+ :param _host_index: set to override the host_index for a single
420
+ request; this effectively ignores the host_index
421
+ in the spec for a single request.
422
+ :type _host_index: int, optional
423
+ :return: Returns the result object.
424
+ """ # noqa: E501
425
+
426
+ _param = self._delete_session_serialize(
427
+ session_id=session_id,
428
+ _request_auth=_request_auth,
429
+ _content_type=_content_type,
430
+ _headers=_headers,
431
+ _host_index=_host_index
432
+ )
433
+
434
+ _response_types_map: Dict[str, Optional[str]] = {
435
+ '204': None,
436
+ }
437
+ response_data = self.api_client.call_api(
438
+ *_param,
439
+ _request_timeout=_request_timeout
440
+ )
441
+ response_data.read()
442
+ return self.api_client.response_deserialize(
443
+ response_data=response_data,
444
+ response_types_map=_response_types_map,
445
+ )
446
+
447
+
448
+ @validate_call
449
+ def delete_session_without_preload_content(
450
+ self,
451
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
452
+ _request_timeout: Union[
453
+ None,
454
+ Annotated[StrictFloat, Field(gt=0)],
455
+ Tuple[
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Annotated[StrictFloat, Field(gt=0)]
458
+ ]
459
+ ] = None,
460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
461
+ _content_type: Optional[StrictStr] = None,
462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
464
+ ) -> RESTResponseType:
465
+ """Delete a session
466
+
467
+ Delete an existing shell session
468
+
469
+ :param session_id: Session ID (required)
470
+ :type session_id: str
471
+ :param _request_timeout: timeout setting for this request. If one
472
+ number provided, it will be total request
473
+ timeout. It can also be a pair (tuple) of
474
+ (connection, read) timeouts.
475
+ :type _request_timeout: int, tuple(int, int), optional
476
+ :param _request_auth: set to override the auth_settings for an a single
477
+ request; this effectively ignores the
478
+ authentication in the spec for a single request.
479
+ :type _request_auth: dict, optional
480
+ :param _content_type: force content-type for the request.
481
+ :type _content_type: str, Optional
482
+ :param _headers: set to override the headers for a single
483
+ request; this effectively ignores the headers
484
+ in the spec for a single request.
485
+ :type _headers: dict, optional
486
+ :param _host_index: set to override the host_index for a single
487
+ request; this effectively ignores the host_index
488
+ in the spec for a single request.
489
+ :type _host_index: int, optional
490
+ :return: Returns the result object.
491
+ """ # noqa: E501
492
+
493
+ _param = self._delete_session_serialize(
494
+ session_id=session_id,
495
+ _request_auth=_request_auth,
496
+ _content_type=_content_type,
497
+ _headers=_headers,
498
+ _host_index=_host_index
499
+ )
500
+
501
+ _response_types_map: Dict[str, Optional[str]] = {
502
+ '204': None,
503
+ }
504
+ response_data = self.api_client.call_api(
505
+ *_param,
506
+ _request_timeout=_request_timeout
507
+ )
508
+ return response_data.response
509
+
510
+
511
+ def _delete_session_serialize(
512
+ self,
513
+ session_id,
514
+ _request_auth,
515
+ _content_type,
516
+ _headers,
517
+ _host_index,
518
+ ) -> RequestSerialized:
519
+
520
+ _host = None
521
+
522
+ _collection_formats: Dict[str, str] = {
523
+ }
524
+
525
+ _path_params: Dict[str, str] = {}
526
+ _query_params: List[Tuple[str, str]] = []
527
+ _header_params: Dict[str, Optional[str]] = _headers or {}
528
+ _form_params: List[Tuple[str, str]] = []
529
+ _files: Dict[
530
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
531
+ ] = {}
532
+ _body_params: Optional[bytes] = None
533
+
534
+ # process the path parameters
535
+ if session_id is not None:
536
+ _path_params['sessionId'] = session_id
537
+ # process the query parameters
538
+ # process the header parameters
539
+ # process the form parameters
540
+ # process the body parameter
541
+
542
+
543
+
544
+
545
+ # authentication setting
546
+ _auth_settings: List[str] = [
547
+ ]
548
+
549
+ return self.api_client.param_serialize(
550
+ method='DELETE',
551
+ resource_path='/process/session/{sessionId}',
552
+ path_params=_path_params,
553
+ query_params=_query_params,
554
+ header_params=_header_params,
555
+ body=_body_params,
556
+ post_params=_form_params,
557
+ files=_files,
558
+ auth_settings=_auth_settings,
559
+ collection_formats=_collection_formats,
560
+ _host=_host,
561
+ _request_auth=_request_auth
562
+ )
563
+
564
+
565
+
566
+
567
+ @validate_call
568
+ def execute_command(
569
+ self,
570
+ request: Annotated[ExecuteRequest, Field(description="Command execution request")],
571
+ _request_timeout: Union[
572
+ None,
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Tuple[
575
+ Annotated[StrictFloat, Field(gt=0)],
576
+ Annotated[StrictFloat, Field(gt=0)]
577
+ ]
578
+ ] = None,
579
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
580
+ _content_type: Optional[StrictStr] = None,
581
+ _headers: Optional[Dict[StrictStr, Any]] = None,
582
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
583
+ ) -> ExecuteResponse:
584
+ """Execute a command
585
+
586
+ Execute a shell command and return the output and exit code
587
+
588
+ :param request: Command execution request (required)
589
+ :type request: ExecuteRequest
590
+ :param _request_timeout: timeout setting for this request. If one
591
+ number provided, it will be total request
592
+ timeout. It can also be a pair (tuple) of
593
+ (connection, read) timeouts.
594
+ :type _request_timeout: int, tuple(int, int), optional
595
+ :param _request_auth: set to override the auth_settings for an a single
596
+ request; this effectively ignores the
597
+ authentication in the spec for a single request.
598
+ :type _request_auth: dict, optional
599
+ :param _content_type: force content-type for the request.
600
+ :type _content_type: str, Optional
601
+ :param _headers: set to override the headers for a single
602
+ request; this effectively ignores the headers
603
+ in the spec for a single request.
604
+ :type _headers: dict, optional
605
+ :param _host_index: set to override the host_index for a single
606
+ request; this effectively ignores the host_index
607
+ in the spec for a single request.
608
+ :type _host_index: int, optional
609
+ :return: Returns the result object.
610
+ """ # noqa: E501
611
+
612
+ _param = self._execute_command_serialize(
613
+ request=request,
614
+ _request_auth=_request_auth,
615
+ _content_type=_content_type,
616
+ _headers=_headers,
617
+ _host_index=_host_index
618
+ )
619
+
620
+ _response_types_map: Dict[str, Optional[str]] = {
621
+ '200': "ExecuteResponse",
622
+ }
623
+ response_data = self.api_client.call_api(
624
+ *_param,
625
+ _request_timeout=_request_timeout
626
+ )
627
+ response_data.read()
628
+ return self.api_client.response_deserialize(
629
+ response_data=response_data,
630
+ response_types_map=_response_types_map,
631
+ ).data
632
+
633
+
634
+ @validate_call
635
+ def execute_command_with_http_info(
636
+ self,
637
+ request: Annotated[ExecuteRequest, Field(description="Command execution request")],
638
+ _request_timeout: Union[
639
+ None,
640
+ Annotated[StrictFloat, Field(gt=0)],
641
+ Tuple[
642
+ Annotated[StrictFloat, Field(gt=0)],
643
+ Annotated[StrictFloat, Field(gt=0)]
644
+ ]
645
+ ] = None,
646
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
647
+ _content_type: Optional[StrictStr] = None,
648
+ _headers: Optional[Dict[StrictStr, Any]] = None,
649
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
650
+ ) -> ApiResponse[ExecuteResponse]:
651
+ """Execute a command
652
+
653
+ Execute a shell command and return the output and exit code
654
+
655
+ :param request: Command execution request (required)
656
+ :type request: ExecuteRequest
657
+ :param _request_timeout: timeout setting for this request. If one
658
+ number provided, it will be total request
659
+ timeout. It can also be a pair (tuple) of
660
+ (connection, read) timeouts.
661
+ :type _request_timeout: int, tuple(int, int), optional
662
+ :param _request_auth: set to override the auth_settings for an a single
663
+ request; this effectively ignores the
664
+ authentication in the spec for a single request.
665
+ :type _request_auth: dict, optional
666
+ :param _content_type: force content-type for the request.
667
+ :type _content_type: str, Optional
668
+ :param _headers: set to override the headers for a single
669
+ request; this effectively ignores the headers
670
+ in the spec for a single request.
671
+ :type _headers: dict, optional
672
+ :param _host_index: set to override the host_index for a single
673
+ request; this effectively ignores the host_index
674
+ in the spec for a single request.
675
+ :type _host_index: int, optional
676
+ :return: Returns the result object.
677
+ """ # noqa: E501
678
+
679
+ _param = self._execute_command_serialize(
680
+ request=request,
681
+ _request_auth=_request_auth,
682
+ _content_type=_content_type,
683
+ _headers=_headers,
684
+ _host_index=_host_index
685
+ )
686
+
687
+ _response_types_map: Dict[str, Optional[str]] = {
688
+ '200': "ExecuteResponse",
689
+ }
690
+ response_data = self.api_client.call_api(
691
+ *_param,
692
+ _request_timeout=_request_timeout
693
+ )
694
+ response_data.read()
695
+ return self.api_client.response_deserialize(
696
+ response_data=response_data,
697
+ response_types_map=_response_types_map,
698
+ )
699
+
700
+
701
+ @validate_call
702
+ def execute_command_without_preload_content(
703
+ self,
704
+ request: Annotated[ExecuteRequest, Field(description="Command execution request")],
705
+ _request_timeout: Union[
706
+ None,
707
+ Annotated[StrictFloat, Field(gt=0)],
708
+ Tuple[
709
+ Annotated[StrictFloat, Field(gt=0)],
710
+ Annotated[StrictFloat, Field(gt=0)]
711
+ ]
712
+ ] = None,
713
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
714
+ _content_type: Optional[StrictStr] = None,
715
+ _headers: Optional[Dict[StrictStr, Any]] = None,
716
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
717
+ ) -> RESTResponseType:
718
+ """Execute a command
719
+
720
+ Execute a shell command and return the output and exit code
721
+
722
+ :param request: Command execution request (required)
723
+ :type request: ExecuteRequest
724
+ :param _request_timeout: timeout setting for this request. If one
725
+ number provided, it will be total request
726
+ timeout. It can also be a pair (tuple) of
727
+ (connection, read) timeouts.
728
+ :type _request_timeout: int, tuple(int, int), optional
729
+ :param _request_auth: set to override the auth_settings for an a single
730
+ request; this effectively ignores the
731
+ authentication in the spec for a single request.
732
+ :type _request_auth: dict, optional
733
+ :param _content_type: force content-type for the request.
734
+ :type _content_type: str, Optional
735
+ :param _headers: set to override the headers for a single
736
+ request; this effectively ignores the headers
737
+ in the spec for a single request.
738
+ :type _headers: dict, optional
739
+ :param _host_index: set to override the host_index for a single
740
+ request; this effectively ignores the host_index
741
+ in the spec for a single request.
742
+ :type _host_index: int, optional
743
+ :return: Returns the result object.
744
+ """ # noqa: E501
745
+
746
+ _param = self._execute_command_serialize(
747
+ request=request,
748
+ _request_auth=_request_auth,
749
+ _content_type=_content_type,
750
+ _headers=_headers,
751
+ _host_index=_host_index
752
+ )
753
+
754
+ _response_types_map: Dict[str, Optional[str]] = {
755
+ '200': "ExecuteResponse",
756
+ }
757
+ response_data = self.api_client.call_api(
758
+ *_param,
759
+ _request_timeout=_request_timeout
760
+ )
761
+ return response_data.response
762
+
763
+
764
+ def _execute_command_serialize(
765
+ self,
766
+ request,
767
+ _request_auth,
768
+ _content_type,
769
+ _headers,
770
+ _host_index,
771
+ ) -> RequestSerialized:
772
+
773
+ _host = None
774
+
775
+ _collection_formats: Dict[str, str] = {
776
+ }
777
+
778
+ _path_params: Dict[str, str] = {}
779
+ _query_params: List[Tuple[str, str]] = []
780
+ _header_params: Dict[str, Optional[str]] = _headers or {}
781
+ _form_params: List[Tuple[str, str]] = []
782
+ _files: Dict[
783
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
784
+ ] = {}
785
+ _body_params: Optional[bytes] = None
786
+
787
+ # process the path parameters
788
+ # process the query parameters
789
+ # process the header parameters
790
+ # process the form parameters
791
+ # process the body parameter
792
+ if request is not None:
793
+ _body_params = request
794
+
795
+
796
+ # set the HTTP header `Accept`
797
+ if 'Accept' not in _header_params:
798
+ _header_params['Accept'] = self.api_client.select_header_accept(
799
+ [
800
+ 'application/json'
801
+ ]
802
+ )
803
+
804
+ # set the HTTP header `Content-Type`
805
+ if _content_type:
806
+ _header_params['Content-Type'] = _content_type
807
+ else:
808
+ _default_content_type = (
809
+ self.api_client.select_header_content_type(
810
+ [
811
+ 'application/json'
812
+ ]
813
+ )
814
+ )
815
+ if _default_content_type is not None:
816
+ _header_params['Content-Type'] = _default_content_type
817
+
818
+ # authentication setting
819
+ _auth_settings: List[str] = [
820
+ ]
821
+
822
+ return self.api_client.param_serialize(
823
+ method='POST',
824
+ resource_path='/process/execute',
825
+ path_params=_path_params,
826
+ query_params=_query_params,
827
+ header_params=_header_params,
828
+ body=_body_params,
829
+ post_params=_form_params,
830
+ files=_files,
831
+ auth_settings=_auth_settings,
832
+ collection_formats=_collection_formats,
833
+ _host=_host,
834
+ _request_auth=_request_auth
835
+ )
836
+
837
+
838
+
839
+
840
+ @validate_call
841
+ def get_session(
842
+ self,
843
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
844
+ _request_timeout: Union[
845
+ None,
846
+ Annotated[StrictFloat, Field(gt=0)],
847
+ Tuple[
848
+ Annotated[StrictFloat, Field(gt=0)],
849
+ Annotated[StrictFloat, Field(gt=0)]
850
+ ]
851
+ ] = None,
852
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
853
+ _content_type: Optional[StrictStr] = None,
854
+ _headers: Optional[Dict[StrictStr, Any]] = None,
855
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
856
+ ) -> Session:
857
+ """Get session details
858
+
859
+ Get details of a specific session including its commands
860
+
861
+ :param session_id: Session ID (required)
862
+ :type session_id: str
863
+ :param _request_timeout: timeout setting for this request. If one
864
+ number provided, it will be total request
865
+ timeout. It can also be a pair (tuple) of
866
+ (connection, read) timeouts.
867
+ :type _request_timeout: int, tuple(int, int), optional
868
+ :param _request_auth: set to override the auth_settings for an a single
869
+ request; this effectively ignores the
870
+ authentication in the spec for a single request.
871
+ :type _request_auth: dict, optional
872
+ :param _content_type: force content-type for the request.
873
+ :type _content_type: str, Optional
874
+ :param _headers: set to override the headers for a single
875
+ request; this effectively ignores the headers
876
+ in the spec for a single request.
877
+ :type _headers: dict, optional
878
+ :param _host_index: set to override the host_index for a single
879
+ request; this effectively ignores the host_index
880
+ in the spec for a single request.
881
+ :type _host_index: int, optional
882
+ :return: Returns the result object.
883
+ """ # noqa: E501
884
+
885
+ _param = self._get_session_serialize(
886
+ session_id=session_id,
887
+ _request_auth=_request_auth,
888
+ _content_type=_content_type,
889
+ _headers=_headers,
890
+ _host_index=_host_index
891
+ )
892
+
893
+ _response_types_map: Dict[str, Optional[str]] = {
894
+ '200': "Session",
895
+ }
896
+ response_data = self.api_client.call_api(
897
+ *_param,
898
+ _request_timeout=_request_timeout
899
+ )
900
+ response_data.read()
901
+ return self.api_client.response_deserialize(
902
+ response_data=response_data,
903
+ response_types_map=_response_types_map,
904
+ ).data
905
+
906
+
907
+ @validate_call
908
+ def get_session_with_http_info(
909
+ self,
910
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
911
+ _request_timeout: Union[
912
+ None,
913
+ Annotated[StrictFloat, Field(gt=0)],
914
+ Tuple[
915
+ Annotated[StrictFloat, Field(gt=0)],
916
+ Annotated[StrictFloat, Field(gt=0)]
917
+ ]
918
+ ] = None,
919
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
920
+ _content_type: Optional[StrictStr] = None,
921
+ _headers: Optional[Dict[StrictStr, Any]] = None,
922
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
923
+ ) -> ApiResponse[Session]:
924
+ """Get session details
925
+
926
+ Get details of a specific session including its commands
927
+
928
+ :param session_id: Session ID (required)
929
+ :type session_id: str
930
+ :param _request_timeout: timeout setting for this request. If one
931
+ number provided, it will be total request
932
+ timeout. It can also be a pair (tuple) of
933
+ (connection, read) timeouts.
934
+ :type _request_timeout: int, tuple(int, int), optional
935
+ :param _request_auth: set to override the auth_settings for an a single
936
+ request; this effectively ignores the
937
+ authentication in the spec for a single request.
938
+ :type _request_auth: dict, optional
939
+ :param _content_type: force content-type for the request.
940
+ :type _content_type: str, Optional
941
+ :param _headers: set to override the headers for a single
942
+ request; this effectively ignores the headers
943
+ in the spec for a single request.
944
+ :type _headers: dict, optional
945
+ :param _host_index: set to override the host_index for a single
946
+ request; this effectively ignores the host_index
947
+ in the spec for a single request.
948
+ :type _host_index: int, optional
949
+ :return: Returns the result object.
950
+ """ # noqa: E501
951
+
952
+ _param = self._get_session_serialize(
953
+ session_id=session_id,
954
+ _request_auth=_request_auth,
955
+ _content_type=_content_type,
956
+ _headers=_headers,
957
+ _host_index=_host_index
958
+ )
959
+
960
+ _response_types_map: Dict[str, Optional[str]] = {
961
+ '200': "Session",
962
+ }
963
+ response_data = self.api_client.call_api(
964
+ *_param,
965
+ _request_timeout=_request_timeout
966
+ )
967
+ response_data.read()
968
+ return self.api_client.response_deserialize(
969
+ response_data=response_data,
970
+ response_types_map=_response_types_map,
971
+ )
972
+
973
+
974
+ @validate_call
975
+ def get_session_without_preload_content(
976
+ self,
977
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
978
+ _request_timeout: Union[
979
+ None,
980
+ Annotated[StrictFloat, Field(gt=0)],
981
+ Tuple[
982
+ Annotated[StrictFloat, Field(gt=0)],
983
+ Annotated[StrictFloat, Field(gt=0)]
984
+ ]
985
+ ] = None,
986
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
987
+ _content_type: Optional[StrictStr] = None,
988
+ _headers: Optional[Dict[StrictStr, Any]] = None,
989
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
990
+ ) -> RESTResponseType:
991
+ """Get session details
992
+
993
+ Get details of a specific session including its commands
994
+
995
+ :param session_id: Session ID (required)
996
+ :type session_id: str
997
+ :param _request_timeout: timeout setting for this request. If one
998
+ number provided, it will be total request
999
+ timeout. It can also be a pair (tuple) of
1000
+ (connection, read) timeouts.
1001
+ :type _request_timeout: int, tuple(int, int), optional
1002
+ :param _request_auth: set to override the auth_settings for an a single
1003
+ request; this effectively ignores the
1004
+ authentication in the spec for a single request.
1005
+ :type _request_auth: dict, optional
1006
+ :param _content_type: force content-type for the request.
1007
+ :type _content_type: str, Optional
1008
+ :param _headers: set to override the headers for a single
1009
+ request; this effectively ignores the headers
1010
+ in the spec for a single request.
1011
+ :type _headers: dict, optional
1012
+ :param _host_index: set to override the host_index for a single
1013
+ request; this effectively ignores the host_index
1014
+ in the spec for a single request.
1015
+ :type _host_index: int, optional
1016
+ :return: Returns the result object.
1017
+ """ # noqa: E501
1018
+
1019
+ _param = self._get_session_serialize(
1020
+ session_id=session_id,
1021
+ _request_auth=_request_auth,
1022
+ _content_type=_content_type,
1023
+ _headers=_headers,
1024
+ _host_index=_host_index
1025
+ )
1026
+
1027
+ _response_types_map: Dict[str, Optional[str]] = {
1028
+ '200': "Session",
1029
+ }
1030
+ response_data = self.api_client.call_api(
1031
+ *_param,
1032
+ _request_timeout=_request_timeout
1033
+ )
1034
+ return response_data.response
1035
+
1036
+
1037
+ def _get_session_serialize(
1038
+ self,
1039
+ session_id,
1040
+ _request_auth,
1041
+ _content_type,
1042
+ _headers,
1043
+ _host_index,
1044
+ ) -> RequestSerialized:
1045
+
1046
+ _host = None
1047
+
1048
+ _collection_formats: Dict[str, str] = {
1049
+ }
1050
+
1051
+ _path_params: Dict[str, str] = {}
1052
+ _query_params: List[Tuple[str, str]] = []
1053
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1054
+ _form_params: List[Tuple[str, str]] = []
1055
+ _files: Dict[
1056
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1057
+ ] = {}
1058
+ _body_params: Optional[bytes] = None
1059
+
1060
+ # process the path parameters
1061
+ if session_id is not None:
1062
+ _path_params['sessionId'] = session_id
1063
+ # process the query parameters
1064
+ # process the header parameters
1065
+ # process the form parameters
1066
+ # process the body parameter
1067
+
1068
+
1069
+ # set the HTTP header `Accept`
1070
+ if 'Accept' not in _header_params:
1071
+ _header_params['Accept'] = self.api_client.select_header_accept(
1072
+ [
1073
+ 'application/json'
1074
+ ]
1075
+ )
1076
+
1077
+
1078
+ # authentication setting
1079
+ _auth_settings: List[str] = [
1080
+ ]
1081
+
1082
+ return self.api_client.param_serialize(
1083
+ method='GET',
1084
+ resource_path='/process/session/{sessionId}',
1085
+ path_params=_path_params,
1086
+ query_params=_query_params,
1087
+ header_params=_header_params,
1088
+ body=_body_params,
1089
+ post_params=_form_params,
1090
+ files=_files,
1091
+ auth_settings=_auth_settings,
1092
+ collection_formats=_collection_formats,
1093
+ _host=_host,
1094
+ _request_auth=_request_auth
1095
+ )
1096
+
1097
+
1098
+
1099
+
1100
+ @validate_call
1101
+ def get_session_command(
1102
+ self,
1103
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1104
+ command_id: Annotated[StrictStr, Field(description="Command ID")],
1105
+ _request_timeout: Union[
1106
+ None,
1107
+ Annotated[StrictFloat, Field(gt=0)],
1108
+ Tuple[
1109
+ Annotated[StrictFloat, Field(gt=0)],
1110
+ Annotated[StrictFloat, Field(gt=0)]
1111
+ ]
1112
+ ] = None,
1113
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1114
+ _content_type: Optional[StrictStr] = None,
1115
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1116
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1117
+ ) -> Command:
1118
+ """Get session command details
1119
+
1120
+ Get details of a specific command within a session
1121
+
1122
+ :param session_id: Session ID (required)
1123
+ :type session_id: str
1124
+ :param command_id: Command ID (required)
1125
+ :type command_id: str
1126
+ :param _request_timeout: timeout setting for this request. If one
1127
+ number provided, it will be total request
1128
+ timeout. It can also be a pair (tuple) of
1129
+ (connection, read) timeouts.
1130
+ :type _request_timeout: int, tuple(int, int), optional
1131
+ :param _request_auth: set to override the auth_settings for an a single
1132
+ request; this effectively ignores the
1133
+ authentication in the spec for a single request.
1134
+ :type _request_auth: dict, optional
1135
+ :param _content_type: force content-type for the request.
1136
+ :type _content_type: str, Optional
1137
+ :param _headers: set to override the headers for a single
1138
+ request; this effectively ignores the headers
1139
+ in the spec for a single request.
1140
+ :type _headers: dict, optional
1141
+ :param _host_index: set to override the host_index for a single
1142
+ request; this effectively ignores the host_index
1143
+ in the spec for a single request.
1144
+ :type _host_index: int, optional
1145
+ :return: Returns the result object.
1146
+ """ # noqa: E501
1147
+
1148
+ _param = self._get_session_command_serialize(
1149
+ session_id=session_id,
1150
+ command_id=command_id,
1151
+ _request_auth=_request_auth,
1152
+ _content_type=_content_type,
1153
+ _headers=_headers,
1154
+ _host_index=_host_index
1155
+ )
1156
+
1157
+ _response_types_map: Dict[str, Optional[str]] = {
1158
+ '200': "Command",
1159
+ }
1160
+ response_data = self.api_client.call_api(
1161
+ *_param,
1162
+ _request_timeout=_request_timeout
1163
+ )
1164
+ response_data.read()
1165
+ return self.api_client.response_deserialize(
1166
+ response_data=response_data,
1167
+ response_types_map=_response_types_map,
1168
+ ).data
1169
+
1170
+
1171
+ @validate_call
1172
+ def get_session_command_with_http_info(
1173
+ self,
1174
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1175
+ command_id: Annotated[StrictStr, Field(description="Command ID")],
1176
+ _request_timeout: Union[
1177
+ None,
1178
+ Annotated[StrictFloat, Field(gt=0)],
1179
+ Tuple[
1180
+ Annotated[StrictFloat, Field(gt=0)],
1181
+ Annotated[StrictFloat, Field(gt=0)]
1182
+ ]
1183
+ ] = None,
1184
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1185
+ _content_type: Optional[StrictStr] = None,
1186
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1187
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1188
+ ) -> ApiResponse[Command]:
1189
+ """Get session command details
1190
+
1191
+ Get details of a specific command within a session
1192
+
1193
+ :param session_id: Session ID (required)
1194
+ :type session_id: str
1195
+ :param command_id: Command ID (required)
1196
+ :type command_id: str
1197
+ :param _request_timeout: timeout setting for this request. If one
1198
+ number provided, it will be total request
1199
+ timeout. It can also be a pair (tuple) of
1200
+ (connection, read) timeouts.
1201
+ :type _request_timeout: int, tuple(int, int), optional
1202
+ :param _request_auth: set to override the auth_settings for an a single
1203
+ request; this effectively ignores the
1204
+ authentication in the spec for a single request.
1205
+ :type _request_auth: dict, optional
1206
+ :param _content_type: force content-type for the request.
1207
+ :type _content_type: str, Optional
1208
+ :param _headers: set to override the headers for a single
1209
+ request; this effectively ignores the headers
1210
+ in the spec for a single request.
1211
+ :type _headers: dict, optional
1212
+ :param _host_index: set to override the host_index for a single
1213
+ request; this effectively ignores the host_index
1214
+ in the spec for a single request.
1215
+ :type _host_index: int, optional
1216
+ :return: Returns the result object.
1217
+ """ # noqa: E501
1218
+
1219
+ _param = self._get_session_command_serialize(
1220
+ session_id=session_id,
1221
+ command_id=command_id,
1222
+ _request_auth=_request_auth,
1223
+ _content_type=_content_type,
1224
+ _headers=_headers,
1225
+ _host_index=_host_index
1226
+ )
1227
+
1228
+ _response_types_map: Dict[str, Optional[str]] = {
1229
+ '200': "Command",
1230
+ }
1231
+ response_data = self.api_client.call_api(
1232
+ *_param,
1233
+ _request_timeout=_request_timeout
1234
+ )
1235
+ response_data.read()
1236
+ return self.api_client.response_deserialize(
1237
+ response_data=response_data,
1238
+ response_types_map=_response_types_map,
1239
+ )
1240
+
1241
+
1242
+ @validate_call
1243
+ def get_session_command_without_preload_content(
1244
+ self,
1245
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1246
+ command_id: Annotated[StrictStr, Field(description="Command ID")],
1247
+ _request_timeout: Union[
1248
+ None,
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Tuple[
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Annotated[StrictFloat, Field(gt=0)]
1253
+ ]
1254
+ ] = None,
1255
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1256
+ _content_type: Optional[StrictStr] = None,
1257
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1258
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1259
+ ) -> RESTResponseType:
1260
+ """Get session command details
1261
+
1262
+ Get details of a specific command within a session
1263
+
1264
+ :param session_id: Session ID (required)
1265
+ :type session_id: str
1266
+ :param command_id: Command ID (required)
1267
+ :type command_id: str
1268
+ :param _request_timeout: timeout setting for this request. If one
1269
+ number provided, it will be total request
1270
+ timeout. It can also be a pair (tuple) of
1271
+ (connection, read) timeouts.
1272
+ :type _request_timeout: int, tuple(int, int), optional
1273
+ :param _request_auth: set to override the auth_settings for an a single
1274
+ request; this effectively ignores the
1275
+ authentication in the spec for a single request.
1276
+ :type _request_auth: dict, optional
1277
+ :param _content_type: force content-type for the request.
1278
+ :type _content_type: str, Optional
1279
+ :param _headers: set to override the headers for a single
1280
+ request; this effectively ignores the headers
1281
+ in the spec for a single request.
1282
+ :type _headers: dict, optional
1283
+ :param _host_index: set to override the host_index for a single
1284
+ request; this effectively ignores the host_index
1285
+ in the spec for a single request.
1286
+ :type _host_index: int, optional
1287
+ :return: Returns the result object.
1288
+ """ # noqa: E501
1289
+
1290
+ _param = self._get_session_command_serialize(
1291
+ session_id=session_id,
1292
+ command_id=command_id,
1293
+ _request_auth=_request_auth,
1294
+ _content_type=_content_type,
1295
+ _headers=_headers,
1296
+ _host_index=_host_index
1297
+ )
1298
+
1299
+ _response_types_map: Dict[str, Optional[str]] = {
1300
+ '200': "Command",
1301
+ }
1302
+ response_data = self.api_client.call_api(
1303
+ *_param,
1304
+ _request_timeout=_request_timeout
1305
+ )
1306
+ return response_data.response
1307
+
1308
+
1309
+ def _get_session_command_serialize(
1310
+ self,
1311
+ session_id,
1312
+ command_id,
1313
+ _request_auth,
1314
+ _content_type,
1315
+ _headers,
1316
+ _host_index,
1317
+ ) -> RequestSerialized:
1318
+
1319
+ _host = None
1320
+
1321
+ _collection_formats: Dict[str, str] = {
1322
+ }
1323
+
1324
+ _path_params: Dict[str, str] = {}
1325
+ _query_params: List[Tuple[str, str]] = []
1326
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1327
+ _form_params: List[Tuple[str, str]] = []
1328
+ _files: Dict[
1329
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1330
+ ] = {}
1331
+ _body_params: Optional[bytes] = None
1332
+
1333
+ # process the path parameters
1334
+ if session_id is not None:
1335
+ _path_params['sessionId'] = session_id
1336
+ if command_id is not None:
1337
+ _path_params['commandId'] = command_id
1338
+ # process the query parameters
1339
+ # process the header parameters
1340
+ # process the form parameters
1341
+ # process the body parameter
1342
+
1343
+
1344
+ # set the HTTP header `Accept`
1345
+ if 'Accept' not in _header_params:
1346
+ _header_params['Accept'] = self.api_client.select_header_accept(
1347
+ [
1348
+ 'application/json'
1349
+ ]
1350
+ )
1351
+
1352
+
1353
+ # authentication setting
1354
+ _auth_settings: List[str] = [
1355
+ ]
1356
+
1357
+ return self.api_client.param_serialize(
1358
+ method='GET',
1359
+ resource_path='/process/session/{sessionId}/command/{commandId}',
1360
+ path_params=_path_params,
1361
+ query_params=_query_params,
1362
+ header_params=_header_params,
1363
+ body=_body_params,
1364
+ post_params=_form_params,
1365
+ files=_files,
1366
+ auth_settings=_auth_settings,
1367
+ collection_formats=_collection_formats,
1368
+ _host=_host,
1369
+ _request_auth=_request_auth
1370
+ )
1371
+
1372
+
1373
+
1374
+
1375
+ @validate_call
1376
+ def get_session_command_logs(
1377
+ self,
1378
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1379
+ command_id: Annotated[StrictStr, Field(description="Command ID")],
1380
+ follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
1381
+ _request_timeout: Union[
1382
+ None,
1383
+ Annotated[StrictFloat, Field(gt=0)],
1384
+ Tuple[
1385
+ Annotated[StrictFloat, Field(gt=0)],
1386
+ Annotated[StrictFloat, Field(gt=0)]
1387
+ ]
1388
+ ] = None,
1389
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1390
+ _content_type: Optional[StrictStr] = None,
1391
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1392
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1393
+ ) -> str:
1394
+ """Get session command logs
1395
+
1396
+ Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
1397
+
1398
+ :param session_id: Session ID (required)
1399
+ :type session_id: str
1400
+ :param command_id: Command ID (required)
1401
+ :type command_id: str
1402
+ :param follow: Follow logs in real-time (WebSocket only)
1403
+ :type follow: bool
1404
+ :param _request_timeout: timeout setting for this request. If one
1405
+ number provided, it will be total request
1406
+ timeout. It can also be a pair (tuple) of
1407
+ (connection, read) timeouts.
1408
+ :type _request_timeout: int, tuple(int, int), optional
1409
+ :param _request_auth: set to override the auth_settings for an a single
1410
+ request; this effectively ignores the
1411
+ authentication in the spec for a single request.
1412
+ :type _request_auth: dict, optional
1413
+ :param _content_type: force content-type for the request.
1414
+ :type _content_type: str, Optional
1415
+ :param _headers: set to override the headers for a single
1416
+ request; this effectively ignores the headers
1417
+ in the spec for a single request.
1418
+ :type _headers: dict, optional
1419
+ :param _host_index: set to override the host_index for a single
1420
+ request; this effectively ignores the host_index
1421
+ in the spec for a single request.
1422
+ :type _host_index: int, optional
1423
+ :return: Returns the result object.
1424
+ """ # noqa: E501
1425
+
1426
+ _param = self._get_session_command_logs_serialize(
1427
+ session_id=session_id,
1428
+ command_id=command_id,
1429
+ follow=follow,
1430
+ _request_auth=_request_auth,
1431
+ _content_type=_content_type,
1432
+ _headers=_headers,
1433
+ _host_index=_host_index
1434
+ )
1435
+
1436
+ _response_types_map: Dict[str, Optional[str]] = {
1437
+ '200': "str",
1438
+ }
1439
+ response_data = self.api_client.call_api(
1440
+ *_param,
1441
+ _request_timeout=_request_timeout
1442
+ )
1443
+ response_data.read()
1444
+ return self.api_client.response_deserialize(
1445
+ response_data=response_data,
1446
+ response_types_map=_response_types_map,
1447
+ ).data
1448
+
1449
+
1450
+ @validate_call
1451
+ def get_session_command_logs_with_http_info(
1452
+ self,
1453
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1454
+ command_id: Annotated[StrictStr, Field(description="Command ID")],
1455
+ follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
1456
+ _request_timeout: Union[
1457
+ None,
1458
+ Annotated[StrictFloat, Field(gt=0)],
1459
+ Tuple[
1460
+ Annotated[StrictFloat, Field(gt=0)],
1461
+ Annotated[StrictFloat, Field(gt=0)]
1462
+ ]
1463
+ ] = None,
1464
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1465
+ _content_type: Optional[StrictStr] = None,
1466
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1467
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1468
+ ) -> ApiResponse[str]:
1469
+ """Get session command logs
1470
+
1471
+ Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
1472
+
1473
+ :param session_id: Session ID (required)
1474
+ :type session_id: str
1475
+ :param command_id: Command ID (required)
1476
+ :type command_id: str
1477
+ :param follow: Follow logs in real-time (WebSocket only)
1478
+ :type follow: bool
1479
+ :param _request_timeout: timeout setting for this request. If one
1480
+ number provided, it will be total request
1481
+ timeout. It can also be a pair (tuple) of
1482
+ (connection, read) timeouts.
1483
+ :type _request_timeout: int, tuple(int, int), optional
1484
+ :param _request_auth: set to override the auth_settings for an a single
1485
+ request; this effectively ignores the
1486
+ authentication in the spec for a single request.
1487
+ :type _request_auth: dict, optional
1488
+ :param _content_type: force content-type for the request.
1489
+ :type _content_type: str, Optional
1490
+ :param _headers: set to override the headers for a single
1491
+ request; this effectively ignores the headers
1492
+ in the spec for a single request.
1493
+ :type _headers: dict, optional
1494
+ :param _host_index: set to override the host_index for a single
1495
+ request; this effectively ignores the host_index
1496
+ in the spec for a single request.
1497
+ :type _host_index: int, optional
1498
+ :return: Returns the result object.
1499
+ """ # noqa: E501
1500
+
1501
+ _param = self._get_session_command_logs_serialize(
1502
+ session_id=session_id,
1503
+ command_id=command_id,
1504
+ follow=follow,
1505
+ _request_auth=_request_auth,
1506
+ _content_type=_content_type,
1507
+ _headers=_headers,
1508
+ _host_index=_host_index
1509
+ )
1510
+
1511
+ _response_types_map: Dict[str, Optional[str]] = {
1512
+ '200': "str",
1513
+ }
1514
+ response_data = self.api_client.call_api(
1515
+ *_param,
1516
+ _request_timeout=_request_timeout
1517
+ )
1518
+ response_data.read()
1519
+ return self.api_client.response_deserialize(
1520
+ response_data=response_data,
1521
+ response_types_map=_response_types_map,
1522
+ )
1523
+
1524
+
1525
+ @validate_call
1526
+ def get_session_command_logs_without_preload_content(
1527
+ self,
1528
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1529
+ command_id: Annotated[StrictStr, Field(description="Command ID")],
1530
+ follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
1531
+ _request_timeout: Union[
1532
+ None,
1533
+ Annotated[StrictFloat, Field(gt=0)],
1534
+ Tuple[
1535
+ Annotated[StrictFloat, Field(gt=0)],
1536
+ Annotated[StrictFloat, Field(gt=0)]
1537
+ ]
1538
+ ] = None,
1539
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1540
+ _content_type: Optional[StrictStr] = None,
1541
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1542
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1543
+ ) -> RESTResponseType:
1544
+ """Get session command logs
1545
+
1546
+ Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
1547
+
1548
+ :param session_id: Session ID (required)
1549
+ :type session_id: str
1550
+ :param command_id: Command ID (required)
1551
+ :type command_id: str
1552
+ :param follow: Follow logs in real-time (WebSocket only)
1553
+ :type follow: bool
1554
+ :param _request_timeout: timeout setting for this request. If one
1555
+ number provided, it will be total request
1556
+ timeout. It can also be a pair (tuple) of
1557
+ (connection, read) timeouts.
1558
+ :type _request_timeout: int, tuple(int, int), optional
1559
+ :param _request_auth: set to override the auth_settings for an a single
1560
+ request; this effectively ignores the
1561
+ authentication in the spec for a single request.
1562
+ :type _request_auth: dict, optional
1563
+ :param _content_type: force content-type for the request.
1564
+ :type _content_type: str, Optional
1565
+ :param _headers: set to override the headers for a single
1566
+ request; this effectively ignores the headers
1567
+ in the spec for a single request.
1568
+ :type _headers: dict, optional
1569
+ :param _host_index: set to override the host_index for a single
1570
+ request; this effectively ignores the host_index
1571
+ in the spec for a single request.
1572
+ :type _host_index: int, optional
1573
+ :return: Returns the result object.
1574
+ """ # noqa: E501
1575
+
1576
+ _param = self._get_session_command_logs_serialize(
1577
+ session_id=session_id,
1578
+ command_id=command_id,
1579
+ follow=follow,
1580
+ _request_auth=_request_auth,
1581
+ _content_type=_content_type,
1582
+ _headers=_headers,
1583
+ _host_index=_host_index
1584
+ )
1585
+
1586
+ _response_types_map: Dict[str, Optional[str]] = {
1587
+ '200': "str",
1588
+ }
1589
+ response_data = self.api_client.call_api(
1590
+ *_param,
1591
+ _request_timeout=_request_timeout
1592
+ )
1593
+ return response_data.response
1594
+
1595
+
1596
+ def _get_session_command_logs_serialize(
1597
+ self,
1598
+ session_id,
1599
+ command_id,
1600
+ follow,
1601
+ _request_auth,
1602
+ _content_type,
1603
+ _headers,
1604
+ _host_index,
1605
+ ) -> RequestSerialized:
1606
+
1607
+ _host = None
1608
+
1609
+ _collection_formats: Dict[str, str] = {
1610
+ }
1611
+
1612
+ _path_params: Dict[str, str] = {}
1613
+ _query_params: List[Tuple[str, str]] = []
1614
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1615
+ _form_params: List[Tuple[str, str]] = []
1616
+ _files: Dict[
1617
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1618
+ ] = {}
1619
+ _body_params: Optional[bytes] = None
1620
+
1621
+ # process the path parameters
1622
+ if session_id is not None:
1623
+ _path_params['sessionId'] = session_id
1624
+ if command_id is not None:
1625
+ _path_params['commandId'] = command_id
1626
+ # process the query parameters
1627
+ if follow is not None:
1628
+
1629
+ _query_params.append(('follow', follow))
1630
+
1631
+ # process the header parameters
1632
+ # process the form parameters
1633
+ # process the body parameter
1634
+
1635
+
1636
+ # set the HTTP header `Accept`
1637
+ if 'Accept' not in _header_params:
1638
+ _header_params['Accept'] = self.api_client.select_header_accept(
1639
+ [
1640
+ 'text/plain'
1641
+ ]
1642
+ )
1643
+
1644
+
1645
+ # authentication setting
1646
+ _auth_settings: List[str] = [
1647
+ ]
1648
+
1649
+ return self.api_client.param_serialize(
1650
+ method='GET',
1651
+ resource_path='/process/session/{sessionId}/command/{commandId}/logs',
1652
+ path_params=_path_params,
1653
+ query_params=_query_params,
1654
+ header_params=_header_params,
1655
+ body=_body_params,
1656
+ post_params=_form_params,
1657
+ files=_files,
1658
+ auth_settings=_auth_settings,
1659
+ collection_formats=_collection_formats,
1660
+ _host=_host,
1661
+ _request_auth=_request_auth
1662
+ )
1663
+
1664
+
1665
+
1666
+
1667
+ @validate_call
1668
+ def list_sessions(
1669
+ self,
1670
+ _request_timeout: Union[
1671
+ None,
1672
+ Annotated[StrictFloat, Field(gt=0)],
1673
+ Tuple[
1674
+ Annotated[StrictFloat, Field(gt=0)],
1675
+ Annotated[StrictFloat, Field(gt=0)]
1676
+ ]
1677
+ ] = None,
1678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1679
+ _content_type: Optional[StrictStr] = None,
1680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1682
+ ) -> List[Session]:
1683
+ """List all sessions
1684
+
1685
+ Get a list of all active shell sessions
1686
+
1687
+ :param _request_timeout: timeout setting for this request. If one
1688
+ number provided, it will be total request
1689
+ timeout. It can also be a pair (tuple) of
1690
+ (connection, read) timeouts.
1691
+ :type _request_timeout: int, tuple(int, int), optional
1692
+ :param _request_auth: set to override the auth_settings for an a single
1693
+ request; this effectively ignores the
1694
+ authentication in the spec for a single request.
1695
+ :type _request_auth: dict, optional
1696
+ :param _content_type: force content-type for the request.
1697
+ :type _content_type: str, Optional
1698
+ :param _headers: set to override the headers for a single
1699
+ request; this effectively ignores the headers
1700
+ in the spec for a single request.
1701
+ :type _headers: dict, optional
1702
+ :param _host_index: set to override the host_index for a single
1703
+ request; this effectively ignores the host_index
1704
+ in the spec for a single request.
1705
+ :type _host_index: int, optional
1706
+ :return: Returns the result object.
1707
+ """ # noqa: E501
1708
+
1709
+ _param = self._list_sessions_serialize(
1710
+ _request_auth=_request_auth,
1711
+ _content_type=_content_type,
1712
+ _headers=_headers,
1713
+ _host_index=_host_index
1714
+ )
1715
+
1716
+ _response_types_map: Dict[str, Optional[str]] = {
1717
+ '200': "List[Session]",
1718
+ }
1719
+ response_data = self.api_client.call_api(
1720
+ *_param,
1721
+ _request_timeout=_request_timeout
1722
+ )
1723
+ response_data.read()
1724
+ return self.api_client.response_deserialize(
1725
+ response_data=response_data,
1726
+ response_types_map=_response_types_map,
1727
+ ).data
1728
+
1729
+
1730
+ @validate_call
1731
+ def list_sessions_with_http_info(
1732
+ self,
1733
+ _request_timeout: Union[
1734
+ None,
1735
+ Annotated[StrictFloat, Field(gt=0)],
1736
+ Tuple[
1737
+ Annotated[StrictFloat, Field(gt=0)],
1738
+ Annotated[StrictFloat, Field(gt=0)]
1739
+ ]
1740
+ ] = None,
1741
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1742
+ _content_type: Optional[StrictStr] = None,
1743
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1744
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1745
+ ) -> ApiResponse[List[Session]]:
1746
+ """List all sessions
1747
+
1748
+ Get a list of all active shell sessions
1749
+
1750
+ :param _request_timeout: timeout setting for this request. If one
1751
+ number provided, it will be total request
1752
+ timeout. It can also be a pair (tuple) of
1753
+ (connection, read) timeouts.
1754
+ :type _request_timeout: int, tuple(int, int), optional
1755
+ :param _request_auth: set to override the auth_settings for an a single
1756
+ request; this effectively ignores the
1757
+ authentication in the spec for a single request.
1758
+ :type _request_auth: dict, optional
1759
+ :param _content_type: force content-type for the request.
1760
+ :type _content_type: str, Optional
1761
+ :param _headers: set to override the headers for a single
1762
+ request; this effectively ignores the headers
1763
+ in the spec for a single request.
1764
+ :type _headers: dict, optional
1765
+ :param _host_index: set to override the host_index for a single
1766
+ request; this effectively ignores the host_index
1767
+ in the spec for a single request.
1768
+ :type _host_index: int, optional
1769
+ :return: Returns the result object.
1770
+ """ # noqa: E501
1771
+
1772
+ _param = self._list_sessions_serialize(
1773
+ _request_auth=_request_auth,
1774
+ _content_type=_content_type,
1775
+ _headers=_headers,
1776
+ _host_index=_host_index
1777
+ )
1778
+
1779
+ _response_types_map: Dict[str, Optional[str]] = {
1780
+ '200': "List[Session]",
1781
+ }
1782
+ response_data = self.api_client.call_api(
1783
+ *_param,
1784
+ _request_timeout=_request_timeout
1785
+ )
1786
+ response_data.read()
1787
+ return self.api_client.response_deserialize(
1788
+ response_data=response_data,
1789
+ response_types_map=_response_types_map,
1790
+ )
1791
+
1792
+
1793
+ @validate_call
1794
+ def list_sessions_without_preload_content(
1795
+ self,
1796
+ _request_timeout: Union[
1797
+ None,
1798
+ Annotated[StrictFloat, Field(gt=0)],
1799
+ Tuple[
1800
+ Annotated[StrictFloat, Field(gt=0)],
1801
+ Annotated[StrictFloat, Field(gt=0)]
1802
+ ]
1803
+ ] = None,
1804
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1805
+ _content_type: Optional[StrictStr] = None,
1806
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1807
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1808
+ ) -> RESTResponseType:
1809
+ """List all sessions
1810
+
1811
+ Get a list of all active shell sessions
1812
+
1813
+ :param _request_timeout: timeout setting for this request. If one
1814
+ number provided, it will be total request
1815
+ timeout. It can also be a pair (tuple) of
1816
+ (connection, read) timeouts.
1817
+ :type _request_timeout: int, tuple(int, int), optional
1818
+ :param _request_auth: set to override the auth_settings for an a single
1819
+ request; this effectively ignores the
1820
+ authentication in the spec for a single request.
1821
+ :type _request_auth: dict, optional
1822
+ :param _content_type: force content-type for the request.
1823
+ :type _content_type: str, Optional
1824
+ :param _headers: set to override the headers for a single
1825
+ request; this effectively ignores the headers
1826
+ in the spec for a single request.
1827
+ :type _headers: dict, optional
1828
+ :param _host_index: set to override the host_index for a single
1829
+ request; this effectively ignores the host_index
1830
+ in the spec for a single request.
1831
+ :type _host_index: int, optional
1832
+ :return: Returns the result object.
1833
+ """ # noqa: E501
1834
+
1835
+ _param = self._list_sessions_serialize(
1836
+ _request_auth=_request_auth,
1837
+ _content_type=_content_type,
1838
+ _headers=_headers,
1839
+ _host_index=_host_index
1840
+ )
1841
+
1842
+ _response_types_map: Dict[str, Optional[str]] = {
1843
+ '200': "List[Session]",
1844
+ }
1845
+ response_data = self.api_client.call_api(
1846
+ *_param,
1847
+ _request_timeout=_request_timeout
1848
+ )
1849
+ return response_data.response
1850
+
1851
+
1852
+ def _list_sessions_serialize(
1853
+ self,
1854
+ _request_auth,
1855
+ _content_type,
1856
+ _headers,
1857
+ _host_index,
1858
+ ) -> RequestSerialized:
1859
+
1860
+ _host = None
1861
+
1862
+ _collection_formats: Dict[str, str] = {
1863
+ }
1864
+
1865
+ _path_params: Dict[str, str] = {}
1866
+ _query_params: List[Tuple[str, str]] = []
1867
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1868
+ _form_params: List[Tuple[str, str]] = []
1869
+ _files: Dict[
1870
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1871
+ ] = {}
1872
+ _body_params: Optional[bytes] = None
1873
+
1874
+ # process the path parameters
1875
+ # process the query parameters
1876
+ # process the header parameters
1877
+ # process the form parameters
1878
+ # process the body parameter
1879
+
1880
+
1881
+ # set the HTTP header `Accept`
1882
+ if 'Accept' not in _header_params:
1883
+ _header_params['Accept'] = self.api_client.select_header_accept(
1884
+ [
1885
+ 'application/json'
1886
+ ]
1887
+ )
1888
+
1889
+
1890
+ # authentication setting
1891
+ _auth_settings: List[str] = [
1892
+ ]
1893
+
1894
+ return self.api_client.param_serialize(
1895
+ method='GET',
1896
+ resource_path='/process/session',
1897
+ path_params=_path_params,
1898
+ query_params=_query_params,
1899
+ header_params=_header_params,
1900
+ body=_body_params,
1901
+ post_params=_form_params,
1902
+ files=_files,
1903
+ auth_settings=_auth_settings,
1904
+ collection_formats=_collection_formats,
1905
+ _host=_host,
1906
+ _request_auth=_request_auth
1907
+ )
1908
+
1909
+
1910
+
1911
+
1912
+ @validate_call
1913
+ def session_execute_command(
1914
+ self,
1915
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1916
+ request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
1917
+ _request_timeout: Union[
1918
+ None,
1919
+ Annotated[StrictFloat, Field(gt=0)],
1920
+ Tuple[
1921
+ Annotated[StrictFloat, Field(gt=0)],
1922
+ Annotated[StrictFloat, Field(gt=0)]
1923
+ ]
1924
+ ] = None,
1925
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1926
+ _content_type: Optional[StrictStr] = None,
1927
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1928
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1929
+ ) -> SessionExecuteResponse:
1930
+ """Execute command in session
1931
+
1932
+ Execute a command within an existing shell session
1933
+
1934
+ :param session_id: Session ID (required)
1935
+ :type session_id: str
1936
+ :param request: Command execution request (required)
1937
+ :type request: SessionExecuteRequest
1938
+ :param _request_timeout: timeout setting for this request. If one
1939
+ number provided, it will be total request
1940
+ timeout. It can also be a pair (tuple) of
1941
+ (connection, read) timeouts.
1942
+ :type _request_timeout: int, tuple(int, int), optional
1943
+ :param _request_auth: set to override the auth_settings for an a single
1944
+ request; this effectively ignores the
1945
+ authentication in the spec for a single request.
1946
+ :type _request_auth: dict, optional
1947
+ :param _content_type: force content-type for the request.
1948
+ :type _content_type: str, Optional
1949
+ :param _headers: set to override the headers for a single
1950
+ request; this effectively ignores the headers
1951
+ in the spec for a single request.
1952
+ :type _headers: dict, optional
1953
+ :param _host_index: set to override the host_index for a single
1954
+ request; this effectively ignores the host_index
1955
+ in the spec for a single request.
1956
+ :type _host_index: int, optional
1957
+ :return: Returns the result object.
1958
+ """ # noqa: E501
1959
+
1960
+ _param = self._session_execute_command_serialize(
1961
+ session_id=session_id,
1962
+ request=request,
1963
+ _request_auth=_request_auth,
1964
+ _content_type=_content_type,
1965
+ _headers=_headers,
1966
+ _host_index=_host_index
1967
+ )
1968
+
1969
+ _response_types_map: Dict[str, Optional[str]] = {
1970
+ '200': "SessionExecuteResponse",
1971
+ '202': "SessionExecuteResponse",
1972
+ }
1973
+ response_data = self.api_client.call_api(
1974
+ *_param,
1975
+ _request_timeout=_request_timeout
1976
+ )
1977
+ response_data.read()
1978
+ return self.api_client.response_deserialize(
1979
+ response_data=response_data,
1980
+ response_types_map=_response_types_map,
1981
+ ).data
1982
+
1983
+
1984
+ @validate_call
1985
+ def session_execute_command_with_http_info(
1986
+ self,
1987
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
1988
+ request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
1989
+ _request_timeout: Union[
1990
+ None,
1991
+ Annotated[StrictFloat, Field(gt=0)],
1992
+ Tuple[
1993
+ Annotated[StrictFloat, Field(gt=0)],
1994
+ Annotated[StrictFloat, Field(gt=0)]
1995
+ ]
1996
+ ] = None,
1997
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1998
+ _content_type: Optional[StrictStr] = None,
1999
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2000
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2001
+ ) -> ApiResponse[SessionExecuteResponse]:
2002
+ """Execute command in session
2003
+
2004
+ Execute a command within an existing shell session
2005
+
2006
+ :param session_id: Session ID (required)
2007
+ :type session_id: str
2008
+ :param request: Command execution request (required)
2009
+ :type request: SessionExecuteRequest
2010
+ :param _request_timeout: timeout setting for this request. If one
2011
+ number provided, it will be total request
2012
+ timeout. It can also be a pair (tuple) of
2013
+ (connection, read) timeouts.
2014
+ :type _request_timeout: int, tuple(int, int), optional
2015
+ :param _request_auth: set to override the auth_settings for an a single
2016
+ request; this effectively ignores the
2017
+ authentication in the spec for a single request.
2018
+ :type _request_auth: dict, optional
2019
+ :param _content_type: force content-type for the request.
2020
+ :type _content_type: str, Optional
2021
+ :param _headers: set to override the headers for a single
2022
+ request; this effectively ignores the headers
2023
+ in the spec for a single request.
2024
+ :type _headers: dict, optional
2025
+ :param _host_index: set to override the host_index for a single
2026
+ request; this effectively ignores the host_index
2027
+ in the spec for a single request.
2028
+ :type _host_index: int, optional
2029
+ :return: Returns the result object.
2030
+ """ # noqa: E501
2031
+
2032
+ _param = self._session_execute_command_serialize(
2033
+ session_id=session_id,
2034
+ request=request,
2035
+ _request_auth=_request_auth,
2036
+ _content_type=_content_type,
2037
+ _headers=_headers,
2038
+ _host_index=_host_index
2039
+ )
2040
+
2041
+ _response_types_map: Dict[str, Optional[str]] = {
2042
+ '200': "SessionExecuteResponse",
2043
+ '202': "SessionExecuteResponse",
2044
+ }
2045
+ response_data = self.api_client.call_api(
2046
+ *_param,
2047
+ _request_timeout=_request_timeout
2048
+ )
2049
+ response_data.read()
2050
+ return self.api_client.response_deserialize(
2051
+ response_data=response_data,
2052
+ response_types_map=_response_types_map,
2053
+ )
2054
+
2055
+
2056
+ @validate_call
2057
+ def session_execute_command_without_preload_content(
2058
+ self,
2059
+ session_id: Annotated[StrictStr, Field(description="Session ID")],
2060
+ request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
2061
+ _request_timeout: Union[
2062
+ None,
2063
+ Annotated[StrictFloat, Field(gt=0)],
2064
+ Tuple[
2065
+ Annotated[StrictFloat, Field(gt=0)],
2066
+ Annotated[StrictFloat, Field(gt=0)]
2067
+ ]
2068
+ ] = None,
2069
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2070
+ _content_type: Optional[StrictStr] = None,
2071
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2072
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2073
+ ) -> RESTResponseType:
2074
+ """Execute command in session
2075
+
2076
+ Execute a command within an existing shell session
2077
+
2078
+ :param session_id: Session ID (required)
2079
+ :type session_id: str
2080
+ :param request: Command execution request (required)
2081
+ :type request: SessionExecuteRequest
2082
+ :param _request_timeout: timeout setting for this request. If one
2083
+ number provided, it will be total request
2084
+ timeout. It can also be a pair (tuple) of
2085
+ (connection, read) timeouts.
2086
+ :type _request_timeout: int, tuple(int, int), optional
2087
+ :param _request_auth: set to override the auth_settings for an a single
2088
+ request; this effectively ignores the
2089
+ authentication in the spec for a single request.
2090
+ :type _request_auth: dict, optional
2091
+ :param _content_type: force content-type for the request.
2092
+ :type _content_type: str, Optional
2093
+ :param _headers: set to override the headers for a single
2094
+ request; this effectively ignores the headers
2095
+ in the spec for a single request.
2096
+ :type _headers: dict, optional
2097
+ :param _host_index: set to override the host_index for a single
2098
+ request; this effectively ignores the host_index
2099
+ in the spec for a single request.
2100
+ :type _host_index: int, optional
2101
+ :return: Returns the result object.
2102
+ """ # noqa: E501
2103
+
2104
+ _param = self._session_execute_command_serialize(
2105
+ session_id=session_id,
2106
+ request=request,
2107
+ _request_auth=_request_auth,
2108
+ _content_type=_content_type,
2109
+ _headers=_headers,
2110
+ _host_index=_host_index
2111
+ )
2112
+
2113
+ _response_types_map: Dict[str, Optional[str]] = {
2114
+ '200': "SessionExecuteResponse",
2115
+ '202': "SessionExecuteResponse",
2116
+ }
2117
+ response_data = self.api_client.call_api(
2118
+ *_param,
2119
+ _request_timeout=_request_timeout
2120
+ )
2121
+ return response_data.response
2122
+
2123
+
2124
+ def _session_execute_command_serialize(
2125
+ self,
2126
+ session_id,
2127
+ request,
2128
+ _request_auth,
2129
+ _content_type,
2130
+ _headers,
2131
+ _host_index,
2132
+ ) -> RequestSerialized:
2133
+
2134
+ _host = None
2135
+
2136
+ _collection_formats: Dict[str, str] = {
2137
+ }
2138
+
2139
+ _path_params: Dict[str, str] = {}
2140
+ _query_params: List[Tuple[str, str]] = []
2141
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2142
+ _form_params: List[Tuple[str, str]] = []
2143
+ _files: Dict[
2144
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2145
+ ] = {}
2146
+ _body_params: Optional[bytes] = None
2147
+
2148
+ # process the path parameters
2149
+ if session_id is not None:
2150
+ _path_params['sessionId'] = session_id
2151
+ # process the query parameters
2152
+ # process the header parameters
2153
+ # process the form parameters
2154
+ # process the body parameter
2155
+ if request is not None:
2156
+ _body_params = request
2157
+
2158
+
2159
+ # set the HTTP header `Accept`
2160
+ if 'Accept' not in _header_params:
2161
+ _header_params['Accept'] = self.api_client.select_header_accept(
2162
+ [
2163
+ 'application/json'
2164
+ ]
2165
+ )
2166
+
2167
+ # set the HTTP header `Content-Type`
2168
+ if _content_type:
2169
+ _header_params['Content-Type'] = _content_type
2170
+ else:
2171
+ _default_content_type = (
2172
+ self.api_client.select_header_content_type(
2173
+ [
2174
+ 'application/json'
2175
+ ]
2176
+ )
2177
+ )
2178
+ if _default_content_type is not None:
2179
+ _header_params['Content-Type'] = _default_content_type
2180
+
2181
+ # authentication setting
2182
+ _auth_settings: List[str] = [
2183
+ ]
2184
+
2185
+ return self.api_client.param_serialize(
2186
+ method='POST',
2187
+ resource_path='/process/session/{sessionId}/exec',
2188
+ path_params=_path_params,
2189
+ query_params=_query_params,
2190
+ header_params=_header_params,
2191
+ body=_body_params,
2192
+ post_params=_form_params,
2193
+ files=_files,
2194
+ auth_settings=_auth_settings,
2195
+ collection_formats=_collection_formats,
2196
+ _host=_host,
2197
+ _request_auth=_request_auth
2198
+ )
2199
+
2200
+