daytona_toolbox_api_client 0.128.2a1__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.
- daytona_toolbox_api_client/__init__.py +113 -0
- daytona_toolbox_api_client/api/__init__.py +12 -0
- daytona_toolbox_api_client/api/computer_use_api.py +6011 -0
- daytona_toolbox_api_client/api/file_system_api.py +3584 -0
- daytona_toolbox_api_client/api/git_api.py +2970 -0
- daytona_toolbox_api_client/api/info_api.py +774 -0
- daytona_toolbox_api_client/api/interpreter_api.py +1076 -0
- daytona_toolbox_api_client/api/lsp_api.py +1972 -0
- daytona_toolbox_api_client/api/port_api.py +544 -0
- daytona_toolbox_api_client/api/process_api.py +3784 -0
- daytona_toolbox_api_client/api_client.py +797 -0
- daytona_toolbox_api_client/api_response.py +21 -0
- daytona_toolbox_api_client/configuration.py +572 -0
- daytona_toolbox_api_client/exceptions.py +216 -0
- daytona_toolbox_api_client/models/__init__.py +89 -0
- daytona_toolbox_api_client/models/command.py +104 -0
- daytona_toolbox_api_client/models/completion_context.py +102 -0
- daytona_toolbox_api_client/models/completion_item.py +112 -0
- daytona_toolbox_api_client/models/completion_list.py +110 -0
- daytona_toolbox_api_client/models/computer_use_start_response.py +115 -0
- daytona_toolbox_api_client/models/computer_use_status_response.py +100 -0
- daytona_toolbox_api_client/models/computer_use_stop_response.py +115 -0
- daytona_toolbox_api_client/models/create_context_request.py +102 -0
- daytona_toolbox_api_client/models/create_context_response.py +108 -0
- daytona_toolbox_api_client/models/create_session_request.py +100 -0
- daytona_toolbox_api_client/models/display_info.py +110 -0
- daytona_toolbox_api_client/models/display_info_response.py +108 -0
- daytona_toolbox_api_client/models/execute_request.py +104 -0
- daytona_toolbox_api_client/models/execute_response.py +102 -0
- daytona_toolbox_api_client/models/file_info.py +114 -0
- daytona_toolbox_api_client/models/file_status.py +107 -0
- daytona_toolbox_api_client/models/files_download_request.py +100 -0
- daytona_toolbox_api_client/models/git_add_request.py +102 -0
- daytona_toolbox_api_client/models/git_branch_request.py +102 -0
- daytona_toolbox_api_client/models/git_checkout_request.py +102 -0
- daytona_toolbox_api_client/models/git_clone_request.py +110 -0
- daytona_toolbox_api_client/models/git_commit_info.py +108 -0
- daytona_toolbox_api_client/models/git_commit_request.py +108 -0
- daytona_toolbox_api_client/models/git_commit_response.py +100 -0
- daytona_toolbox_api_client/models/git_git_delete_branch_request.py +102 -0
- daytona_toolbox_api_client/models/git_repo_request.py +104 -0
- daytona_toolbox_api_client/models/git_status.py +116 -0
- daytona_toolbox_api_client/models/interpreter_context.py +108 -0
- daytona_toolbox_api_client/models/interpreter_context_info.py +108 -0
- daytona_toolbox_api_client/models/is_port_in_use_response.py +100 -0
- daytona_toolbox_api_client/models/keyboard_hotkey_request.py +100 -0
- daytona_toolbox_api_client/models/keyboard_press_request.py +102 -0
- daytona_toolbox_api_client/models/keyboard_type_request.py +102 -0
- daytona_toolbox_api_client/models/list_branch_response.py +100 -0
- daytona_toolbox_api_client/models/list_contexts_response.py +108 -0
- daytona_toolbox_api_client/models/lsp_completion_params.py +116 -0
- daytona_toolbox_api_client/models/lsp_document_request.py +104 -0
- daytona_toolbox_api_client/models/lsp_location.py +106 -0
- daytona_toolbox_api_client/models/lsp_position.py +102 -0
- daytona_toolbox_api_client/models/lsp_range.py +109 -0
- daytona_toolbox_api_client/models/lsp_server_request.py +102 -0
- daytona_toolbox_api_client/models/lsp_symbol.py +108 -0
- daytona_toolbox_api_client/models/match.py +104 -0
- daytona_toolbox_api_client/models/mouse_click_request.py +106 -0
- daytona_toolbox_api_client/models/mouse_click_response.py +102 -0
- daytona_toolbox_api_client/models/mouse_drag_request.py +108 -0
- daytona_toolbox_api_client/models/mouse_drag_response.py +102 -0
- daytona_toolbox_api_client/models/mouse_move_request.py +102 -0
- daytona_toolbox_api_client/models/mouse_position_response.py +102 -0
- daytona_toolbox_api_client/models/mouse_scroll_request.py +106 -0
- daytona_toolbox_api_client/models/port_list.py +100 -0
- daytona_toolbox_api_client/models/position.py +102 -0
- daytona_toolbox_api_client/models/process_errors_response.py +102 -0
- daytona_toolbox_api_client/models/process_logs_response.py +102 -0
- daytona_toolbox_api_client/models/process_restart_response.py +102 -0
- daytona_toolbox_api_client/models/process_status.py +106 -0
- daytona_toolbox_api_client/models/process_status_response.py +102 -0
- daytona_toolbox_api_client/models/pty_create_request.py +110 -0
- daytona_toolbox_api_client/models/pty_create_response.py +100 -0
- daytona_toolbox_api_client/models/pty_list_response.py +108 -0
- daytona_toolbox_api_client/models/pty_resize_request.py +103 -0
- daytona_toolbox_api_client/models/pty_session_info.py +114 -0
- daytona_toolbox_api_client/models/replace_request.py +104 -0
- daytona_toolbox_api_client/models/replace_result.py +104 -0
- daytona_toolbox_api_client/models/screenshot_response.py +108 -0
- daytona_toolbox_api_client/models/scroll_response.py +100 -0
- daytona_toolbox_api_client/models/search_files_response.py +100 -0
- daytona_toolbox_api_client/models/session.py +110 -0
- daytona_toolbox_api_client/models/session_execute_request.py +104 -0
- daytona_toolbox_api_client/models/session_execute_response.py +108 -0
- daytona_toolbox_api_client/models/status.py +43 -0
- daytona_toolbox_api_client/models/user_home_dir_response.py +100 -0
- daytona_toolbox_api_client/models/window_info.py +112 -0
- daytona_toolbox_api_client/models/windows_response.py +108 -0
- daytona_toolbox_api_client/models/work_dir_response.py +100 -0
- daytona_toolbox_api_client/py.typed +0 -0
- daytona_toolbox_api_client/rest.py +258 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/METADATA +25 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/RECORD +97 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/WHEEL +5 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/licenses/LICENSE +190 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1076 @@
|
|
|
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, StrictStr
|
|
20
|
+
from typing import Dict
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from daytona_toolbox_api_client.models.create_context_request import CreateContextRequest
|
|
23
|
+
from daytona_toolbox_api_client.models.interpreter_context import InterpreterContext
|
|
24
|
+
from daytona_toolbox_api_client.models.list_contexts_response import ListContextsResponse
|
|
25
|
+
|
|
26
|
+
from daytona_toolbox_api_client.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from daytona_toolbox_api_client.api_response import ApiResponse
|
|
28
|
+
from daytona_toolbox_api_client.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class InterpreterApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def create_interpreter_context(
|
|
46
|
+
self,
|
|
47
|
+
request: Annotated[CreateContextRequest, Field(description="Context configuration")],
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> InterpreterContext:
|
|
61
|
+
"""Create a new interpreter context
|
|
62
|
+
|
|
63
|
+
Creates a new isolated interpreter context with optional working directory and language
|
|
64
|
+
|
|
65
|
+
:param request: Context configuration (required)
|
|
66
|
+
:type request: CreateContextRequest
|
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
68
|
+
number provided, it will be total request
|
|
69
|
+
timeout. It can also be a pair (tuple) of
|
|
70
|
+
(connection, read) timeouts.
|
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
73
|
+
request; this effectively ignores the
|
|
74
|
+
authentication in the spec for a single request.
|
|
75
|
+
:type _request_auth: dict, optional
|
|
76
|
+
:param _content_type: force content-type for the request.
|
|
77
|
+
:type _content_type: str, Optional
|
|
78
|
+
:param _headers: set to override the headers for a single
|
|
79
|
+
request; this effectively ignores the headers
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _headers: dict, optional
|
|
82
|
+
:param _host_index: set to override the host_index for a single
|
|
83
|
+
request; this effectively ignores the host_index
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _host_index: int, optional
|
|
86
|
+
:return: Returns the result object.
|
|
87
|
+
""" # noqa: E501
|
|
88
|
+
|
|
89
|
+
_param = self._create_interpreter_context_serialize(
|
|
90
|
+
request=request,
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'200': "InterpreterContext",
|
|
99
|
+
'400': "Dict[str, str]",
|
|
100
|
+
'500': "Dict[str, str]",
|
|
101
|
+
}
|
|
102
|
+
response_data = self.api_client.call_api(
|
|
103
|
+
*_param,
|
|
104
|
+
_request_timeout=_request_timeout
|
|
105
|
+
)
|
|
106
|
+
response_data.read()
|
|
107
|
+
return self.api_client.response_deserialize(
|
|
108
|
+
response_data=response_data,
|
|
109
|
+
response_types_map=_response_types_map,
|
|
110
|
+
).data
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@validate_call
|
|
114
|
+
def create_interpreter_context_with_http_info(
|
|
115
|
+
self,
|
|
116
|
+
request: Annotated[CreateContextRequest, Field(description="Context configuration")],
|
|
117
|
+
_request_timeout: Union[
|
|
118
|
+
None,
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Tuple[
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
123
|
+
]
|
|
124
|
+
] = None,
|
|
125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_content_type: Optional[StrictStr] = None,
|
|
127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
129
|
+
) -> ApiResponse[InterpreterContext]:
|
|
130
|
+
"""Create a new interpreter context
|
|
131
|
+
|
|
132
|
+
Creates a new isolated interpreter context with optional working directory and language
|
|
133
|
+
|
|
134
|
+
:param request: Context configuration (required)
|
|
135
|
+
:type request: CreateContextRequest
|
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
137
|
+
number provided, it will be total request
|
|
138
|
+
timeout. It can also be a pair (tuple) of
|
|
139
|
+
(connection, read) timeouts.
|
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
142
|
+
request; this effectively ignores the
|
|
143
|
+
authentication in the spec for a single request.
|
|
144
|
+
:type _request_auth: dict, optional
|
|
145
|
+
:param _content_type: force content-type for the request.
|
|
146
|
+
:type _content_type: str, Optional
|
|
147
|
+
:param _headers: set to override the headers for a single
|
|
148
|
+
request; this effectively ignores the headers
|
|
149
|
+
in the spec for a single request.
|
|
150
|
+
:type _headers: dict, optional
|
|
151
|
+
:param _host_index: set to override the host_index for a single
|
|
152
|
+
request; this effectively ignores the host_index
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _host_index: int, optional
|
|
155
|
+
:return: Returns the result object.
|
|
156
|
+
""" # noqa: E501
|
|
157
|
+
|
|
158
|
+
_param = self._create_interpreter_context_serialize(
|
|
159
|
+
request=request,
|
|
160
|
+
_request_auth=_request_auth,
|
|
161
|
+
_content_type=_content_type,
|
|
162
|
+
_headers=_headers,
|
|
163
|
+
_host_index=_host_index
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
167
|
+
'200': "InterpreterContext",
|
|
168
|
+
'400': "Dict[str, str]",
|
|
169
|
+
'500': "Dict[str, str]",
|
|
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_interpreter_context_without_preload_content(
|
|
184
|
+
self,
|
|
185
|
+
request: Annotated[CreateContextRequest, Field(description="Context configuration")],
|
|
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 interpreter context
|
|
200
|
+
|
|
201
|
+
Creates a new isolated interpreter context with optional working directory and language
|
|
202
|
+
|
|
203
|
+
:param request: Context configuration (required)
|
|
204
|
+
:type request: CreateContextRequest
|
|
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_interpreter_context_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
|
+
'200': "InterpreterContext",
|
|
237
|
+
'400': "Dict[str, str]",
|
|
238
|
+
'500': "Dict[str, str]",
|
|
239
|
+
}
|
|
240
|
+
response_data = self.api_client.call_api(
|
|
241
|
+
*_param,
|
|
242
|
+
_request_timeout=_request_timeout
|
|
243
|
+
)
|
|
244
|
+
return response_data.response
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def _create_interpreter_context_serialize(
|
|
248
|
+
self,
|
|
249
|
+
request,
|
|
250
|
+
_request_auth,
|
|
251
|
+
_content_type,
|
|
252
|
+
_headers,
|
|
253
|
+
_host_index,
|
|
254
|
+
) -> RequestSerialized:
|
|
255
|
+
|
|
256
|
+
_host = None
|
|
257
|
+
|
|
258
|
+
_collection_formats: Dict[str, str] = {
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
_path_params: Dict[str, str] = {}
|
|
262
|
+
_query_params: List[Tuple[str, str]] = []
|
|
263
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
264
|
+
_form_params: List[Tuple[str, str]] = []
|
|
265
|
+
_files: Dict[
|
|
266
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
267
|
+
] = {}
|
|
268
|
+
_body_params: Optional[bytes] = None
|
|
269
|
+
|
|
270
|
+
# process the path parameters
|
|
271
|
+
# process the query parameters
|
|
272
|
+
# process the header parameters
|
|
273
|
+
# process the form parameters
|
|
274
|
+
# process the body parameter
|
|
275
|
+
if request is not None:
|
|
276
|
+
_body_params = request
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
# set the HTTP header `Accept`
|
|
280
|
+
if 'Accept' not in _header_params:
|
|
281
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
282
|
+
[
|
|
283
|
+
'application/json'
|
|
284
|
+
]
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# set the HTTP header `Content-Type`
|
|
288
|
+
if _content_type:
|
|
289
|
+
_header_params['Content-Type'] = _content_type
|
|
290
|
+
else:
|
|
291
|
+
_default_content_type = (
|
|
292
|
+
self.api_client.select_header_content_type(
|
|
293
|
+
[
|
|
294
|
+
'application/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
)
|
|
298
|
+
if _default_content_type is not None:
|
|
299
|
+
_header_params['Content-Type'] = _default_content_type
|
|
300
|
+
|
|
301
|
+
# authentication setting
|
|
302
|
+
_auth_settings: List[str] = [
|
|
303
|
+
]
|
|
304
|
+
|
|
305
|
+
return self.api_client.param_serialize(
|
|
306
|
+
method='POST',
|
|
307
|
+
resource_path='/process/interpreter/context',
|
|
308
|
+
path_params=_path_params,
|
|
309
|
+
query_params=_query_params,
|
|
310
|
+
header_params=_header_params,
|
|
311
|
+
body=_body_params,
|
|
312
|
+
post_params=_form_params,
|
|
313
|
+
files=_files,
|
|
314
|
+
auth_settings=_auth_settings,
|
|
315
|
+
collection_formats=_collection_formats,
|
|
316
|
+
_host=_host,
|
|
317
|
+
_request_auth=_request_auth
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
@validate_call
|
|
324
|
+
def delete_interpreter_context(
|
|
325
|
+
self,
|
|
326
|
+
id: Annotated[StrictStr, Field(description="Context ID")],
|
|
327
|
+
_request_timeout: Union[
|
|
328
|
+
None,
|
|
329
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
330
|
+
Tuple[
|
|
331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
332
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
333
|
+
]
|
|
334
|
+
] = None,
|
|
335
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
336
|
+
_content_type: Optional[StrictStr] = None,
|
|
337
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
338
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
339
|
+
) -> Dict[str, str]:
|
|
340
|
+
"""Delete an interpreter context
|
|
341
|
+
|
|
342
|
+
Deletes an interpreter context and shuts down its worker process
|
|
343
|
+
|
|
344
|
+
:param id: Context ID (required)
|
|
345
|
+
:type id: str
|
|
346
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
347
|
+
number provided, it will be total request
|
|
348
|
+
timeout. It can also be a pair (tuple) of
|
|
349
|
+
(connection, read) timeouts.
|
|
350
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
351
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
352
|
+
request; this effectively ignores the
|
|
353
|
+
authentication in the spec for a single request.
|
|
354
|
+
:type _request_auth: dict, optional
|
|
355
|
+
:param _content_type: force content-type for the request.
|
|
356
|
+
:type _content_type: str, Optional
|
|
357
|
+
:param _headers: set to override the headers for a single
|
|
358
|
+
request; this effectively ignores the headers
|
|
359
|
+
in the spec for a single request.
|
|
360
|
+
:type _headers: dict, optional
|
|
361
|
+
:param _host_index: set to override the host_index for a single
|
|
362
|
+
request; this effectively ignores the host_index
|
|
363
|
+
in the spec for a single request.
|
|
364
|
+
:type _host_index: int, optional
|
|
365
|
+
:return: Returns the result object.
|
|
366
|
+
""" # noqa: E501
|
|
367
|
+
|
|
368
|
+
_param = self._delete_interpreter_context_serialize(
|
|
369
|
+
id=id,
|
|
370
|
+
_request_auth=_request_auth,
|
|
371
|
+
_content_type=_content_type,
|
|
372
|
+
_headers=_headers,
|
|
373
|
+
_host_index=_host_index
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
377
|
+
'200': "Dict[str, str]",
|
|
378
|
+
'400': "Dict[str, str]",
|
|
379
|
+
'404': "Dict[str, str]",
|
|
380
|
+
}
|
|
381
|
+
response_data = self.api_client.call_api(
|
|
382
|
+
*_param,
|
|
383
|
+
_request_timeout=_request_timeout
|
|
384
|
+
)
|
|
385
|
+
response_data.read()
|
|
386
|
+
return self.api_client.response_deserialize(
|
|
387
|
+
response_data=response_data,
|
|
388
|
+
response_types_map=_response_types_map,
|
|
389
|
+
).data
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
@validate_call
|
|
393
|
+
def delete_interpreter_context_with_http_info(
|
|
394
|
+
self,
|
|
395
|
+
id: Annotated[StrictStr, Field(description="Context ID")],
|
|
396
|
+
_request_timeout: Union[
|
|
397
|
+
None,
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
+
Tuple[
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
401
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
402
|
+
]
|
|
403
|
+
] = None,
|
|
404
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
+
_content_type: Optional[StrictStr] = None,
|
|
406
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
407
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
408
|
+
) -> ApiResponse[Dict[str, str]]:
|
|
409
|
+
"""Delete an interpreter context
|
|
410
|
+
|
|
411
|
+
Deletes an interpreter context and shuts down its worker process
|
|
412
|
+
|
|
413
|
+
:param id: Context ID (required)
|
|
414
|
+
:type id: str
|
|
415
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
416
|
+
number provided, it will be total request
|
|
417
|
+
timeout. It can also be a pair (tuple) of
|
|
418
|
+
(connection, read) timeouts.
|
|
419
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
420
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
421
|
+
request; this effectively ignores the
|
|
422
|
+
authentication in the spec for a single request.
|
|
423
|
+
:type _request_auth: dict, optional
|
|
424
|
+
:param _content_type: force content-type for the request.
|
|
425
|
+
:type _content_type: str, Optional
|
|
426
|
+
:param _headers: set to override the headers for a single
|
|
427
|
+
request; this effectively ignores the headers
|
|
428
|
+
in the spec for a single request.
|
|
429
|
+
:type _headers: dict, optional
|
|
430
|
+
:param _host_index: set to override the host_index for a single
|
|
431
|
+
request; this effectively ignores the host_index
|
|
432
|
+
in the spec for a single request.
|
|
433
|
+
:type _host_index: int, optional
|
|
434
|
+
:return: Returns the result object.
|
|
435
|
+
""" # noqa: E501
|
|
436
|
+
|
|
437
|
+
_param = self._delete_interpreter_context_serialize(
|
|
438
|
+
id=id,
|
|
439
|
+
_request_auth=_request_auth,
|
|
440
|
+
_content_type=_content_type,
|
|
441
|
+
_headers=_headers,
|
|
442
|
+
_host_index=_host_index
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
446
|
+
'200': "Dict[str, str]",
|
|
447
|
+
'400': "Dict[str, str]",
|
|
448
|
+
'404': "Dict[str, str]",
|
|
449
|
+
}
|
|
450
|
+
response_data = self.api_client.call_api(
|
|
451
|
+
*_param,
|
|
452
|
+
_request_timeout=_request_timeout
|
|
453
|
+
)
|
|
454
|
+
response_data.read()
|
|
455
|
+
return self.api_client.response_deserialize(
|
|
456
|
+
response_data=response_data,
|
|
457
|
+
response_types_map=_response_types_map,
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
@validate_call
|
|
462
|
+
def delete_interpreter_context_without_preload_content(
|
|
463
|
+
self,
|
|
464
|
+
id: Annotated[StrictStr, Field(description="Context ID")],
|
|
465
|
+
_request_timeout: Union[
|
|
466
|
+
None,
|
|
467
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
468
|
+
Tuple[
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
470
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
471
|
+
]
|
|
472
|
+
] = None,
|
|
473
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
474
|
+
_content_type: Optional[StrictStr] = None,
|
|
475
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
476
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
477
|
+
) -> RESTResponseType:
|
|
478
|
+
"""Delete an interpreter context
|
|
479
|
+
|
|
480
|
+
Deletes an interpreter context and shuts down its worker process
|
|
481
|
+
|
|
482
|
+
:param id: Context ID (required)
|
|
483
|
+
:type id: str
|
|
484
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
485
|
+
number provided, it will be total request
|
|
486
|
+
timeout. It can also be a pair (tuple) of
|
|
487
|
+
(connection, read) timeouts.
|
|
488
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
489
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
490
|
+
request; this effectively ignores the
|
|
491
|
+
authentication in the spec for a single request.
|
|
492
|
+
:type _request_auth: dict, optional
|
|
493
|
+
:param _content_type: force content-type for the request.
|
|
494
|
+
:type _content_type: str, Optional
|
|
495
|
+
:param _headers: set to override the headers for a single
|
|
496
|
+
request; this effectively ignores the headers
|
|
497
|
+
in the spec for a single request.
|
|
498
|
+
:type _headers: dict, optional
|
|
499
|
+
:param _host_index: set to override the host_index for a single
|
|
500
|
+
request; this effectively ignores the host_index
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _host_index: int, optional
|
|
503
|
+
:return: Returns the result object.
|
|
504
|
+
""" # noqa: E501
|
|
505
|
+
|
|
506
|
+
_param = self._delete_interpreter_context_serialize(
|
|
507
|
+
id=id,
|
|
508
|
+
_request_auth=_request_auth,
|
|
509
|
+
_content_type=_content_type,
|
|
510
|
+
_headers=_headers,
|
|
511
|
+
_host_index=_host_index
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
515
|
+
'200': "Dict[str, str]",
|
|
516
|
+
'400': "Dict[str, str]",
|
|
517
|
+
'404': "Dict[str, str]",
|
|
518
|
+
}
|
|
519
|
+
response_data = self.api_client.call_api(
|
|
520
|
+
*_param,
|
|
521
|
+
_request_timeout=_request_timeout
|
|
522
|
+
)
|
|
523
|
+
return response_data.response
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
def _delete_interpreter_context_serialize(
|
|
527
|
+
self,
|
|
528
|
+
id,
|
|
529
|
+
_request_auth,
|
|
530
|
+
_content_type,
|
|
531
|
+
_headers,
|
|
532
|
+
_host_index,
|
|
533
|
+
) -> RequestSerialized:
|
|
534
|
+
|
|
535
|
+
_host = None
|
|
536
|
+
|
|
537
|
+
_collection_formats: Dict[str, str] = {
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
_path_params: Dict[str, str] = {}
|
|
541
|
+
_query_params: List[Tuple[str, str]] = []
|
|
542
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
543
|
+
_form_params: List[Tuple[str, str]] = []
|
|
544
|
+
_files: Dict[
|
|
545
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
546
|
+
] = {}
|
|
547
|
+
_body_params: Optional[bytes] = None
|
|
548
|
+
|
|
549
|
+
# process the path parameters
|
|
550
|
+
if id is not None:
|
|
551
|
+
_path_params['id'] = id
|
|
552
|
+
# process the query parameters
|
|
553
|
+
# process the header parameters
|
|
554
|
+
# process the form parameters
|
|
555
|
+
# process the body parameter
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
# set the HTTP header `Accept`
|
|
559
|
+
if 'Accept' not in _header_params:
|
|
560
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
561
|
+
[
|
|
562
|
+
'application/json'
|
|
563
|
+
]
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
# authentication setting
|
|
568
|
+
_auth_settings: List[str] = [
|
|
569
|
+
]
|
|
570
|
+
|
|
571
|
+
return self.api_client.param_serialize(
|
|
572
|
+
method='DELETE',
|
|
573
|
+
resource_path='/process/interpreter/context/{id}',
|
|
574
|
+
path_params=_path_params,
|
|
575
|
+
query_params=_query_params,
|
|
576
|
+
header_params=_header_params,
|
|
577
|
+
body=_body_params,
|
|
578
|
+
post_params=_form_params,
|
|
579
|
+
files=_files,
|
|
580
|
+
auth_settings=_auth_settings,
|
|
581
|
+
collection_formats=_collection_formats,
|
|
582
|
+
_host=_host,
|
|
583
|
+
_request_auth=_request_auth
|
|
584
|
+
)
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
@validate_call
|
|
590
|
+
def execute_interpreter_code(
|
|
591
|
+
self,
|
|
592
|
+
_request_timeout: Union[
|
|
593
|
+
None,
|
|
594
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
595
|
+
Tuple[
|
|
596
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
598
|
+
]
|
|
599
|
+
] = None,
|
|
600
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
601
|
+
_content_type: Optional[StrictStr] = None,
|
|
602
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
603
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
604
|
+
) -> None:
|
|
605
|
+
"""Execute code in an interpreter context
|
|
606
|
+
|
|
607
|
+
Executes code in a specified context (or default context if not specified) via WebSocket streaming
|
|
608
|
+
|
|
609
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
610
|
+
number provided, it will be total request
|
|
611
|
+
timeout. It can also be a pair (tuple) of
|
|
612
|
+
(connection, read) timeouts.
|
|
613
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
614
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
615
|
+
request; this effectively ignores the
|
|
616
|
+
authentication in the spec for a single request.
|
|
617
|
+
:type _request_auth: dict, optional
|
|
618
|
+
:param _content_type: force content-type for the request.
|
|
619
|
+
:type _content_type: str, Optional
|
|
620
|
+
:param _headers: set to override the headers for a single
|
|
621
|
+
request; this effectively ignores the headers
|
|
622
|
+
in the spec for a single request.
|
|
623
|
+
:type _headers: dict, optional
|
|
624
|
+
:param _host_index: set to override the host_index for a single
|
|
625
|
+
request; this effectively ignores the host_index
|
|
626
|
+
in the spec for a single request.
|
|
627
|
+
:type _host_index: int, optional
|
|
628
|
+
:return: Returns the result object.
|
|
629
|
+
""" # noqa: E501
|
|
630
|
+
|
|
631
|
+
_param = self._execute_interpreter_code_serialize(
|
|
632
|
+
_request_auth=_request_auth,
|
|
633
|
+
_content_type=_content_type,
|
|
634
|
+
_headers=_headers,
|
|
635
|
+
_host_index=_host_index
|
|
636
|
+
)
|
|
637
|
+
|
|
638
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
639
|
+
'101': "str",
|
|
640
|
+
}
|
|
641
|
+
response_data = self.api_client.call_api(
|
|
642
|
+
*_param,
|
|
643
|
+
_request_timeout=_request_timeout
|
|
644
|
+
)
|
|
645
|
+
response_data.read()
|
|
646
|
+
return self.api_client.response_deserialize(
|
|
647
|
+
response_data=response_data,
|
|
648
|
+
response_types_map=_response_types_map,
|
|
649
|
+
).data
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
@validate_call
|
|
653
|
+
def execute_interpreter_code_with_http_info(
|
|
654
|
+
self,
|
|
655
|
+
_request_timeout: Union[
|
|
656
|
+
None,
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Tuple[
|
|
659
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
660
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
661
|
+
]
|
|
662
|
+
] = None,
|
|
663
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_content_type: Optional[StrictStr] = None,
|
|
665
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
666
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
667
|
+
) -> ApiResponse[None]:
|
|
668
|
+
"""Execute code in an interpreter context
|
|
669
|
+
|
|
670
|
+
Executes code in a specified context (or default context if not specified) via WebSocket streaming
|
|
671
|
+
|
|
672
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
673
|
+
number provided, it will be total request
|
|
674
|
+
timeout. It can also be a pair (tuple) of
|
|
675
|
+
(connection, read) timeouts.
|
|
676
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
677
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
678
|
+
request; this effectively ignores the
|
|
679
|
+
authentication in the spec for a single request.
|
|
680
|
+
:type _request_auth: dict, optional
|
|
681
|
+
:param _content_type: force content-type for the request.
|
|
682
|
+
:type _content_type: str, Optional
|
|
683
|
+
:param _headers: set to override the headers for a single
|
|
684
|
+
request; this effectively ignores the headers
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _headers: dict, optional
|
|
687
|
+
:param _host_index: set to override the host_index for a single
|
|
688
|
+
request; this effectively ignores the host_index
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _host_index: int, optional
|
|
691
|
+
:return: Returns the result object.
|
|
692
|
+
""" # noqa: E501
|
|
693
|
+
|
|
694
|
+
_param = self._execute_interpreter_code_serialize(
|
|
695
|
+
_request_auth=_request_auth,
|
|
696
|
+
_content_type=_content_type,
|
|
697
|
+
_headers=_headers,
|
|
698
|
+
_host_index=_host_index
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
702
|
+
'101': "str",
|
|
703
|
+
}
|
|
704
|
+
response_data = self.api_client.call_api(
|
|
705
|
+
*_param,
|
|
706
|
+
_request_timeout=_request_timeout
|
|
707
|
+
)
|
|
708
|
+
response_data.read()
|
|
709
|
+
return self.api_client.response_deserialize(
|
|
710
|
+
response_data=response_data,
|
|
711
|
+
response_types_map=_response_types_map,
|
|
712
|
+
)
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
@validate_call
|
|
716
|
+
def execute_interpreter_code_without_preload_content(
|
|
717
|
+
self,
|
|
718
|
+
_request_timeout: Union[
|
|
719
|
+
None,
|
|
720
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
721
|
+
Tuple[
|
|
722
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
723
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
724
|
+
]
|
|
725
|
+
] = None,
|
|
726
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
727
|
+
_content_type: Optional[StrictStr] = None,
|
|
728
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
729
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
730
|
+
) -> RESTResponseType:
|
|
731
|
+
"""Execute code in an interpreter context
|
|
732
|
+
|
|
733
|
+
Executes code in a specified context (or default context if not specified) via WebSocket streaming
|
|
734
|
+
|
|
735
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
736
|
+
number provided, it will be total request
|
|
737
|
+
timeout. It can also be a pair (tuple) of
|
|
738
|
+
(connection, read) timeouts.
|
|
739
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
740
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
741
|
+
request; this effectively ignores the
|
|
742
|
+
authentication in the spec for a single request.
|
|
743
|
+
:type _request_auth: dict, optional
|
|
744
|
+
:param _content_type: force content-type for the request.
|
|
745
|
+
:type _content_type: str, Optional
|
|
746
|
+
:param _headers: set to override the headers for a single
|
|
747
|
+
request; this effectively ignores the headers
|
|
748
|
+
in the spec for a single request.
|
|
749
|
+
:type _headers: dict, optional
|
|
750
|
+
:param _host_index: set to override the host_index for a single
|
|
751
|
+
request; this effectively ignores the host_index
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _host_index: int, optional
|
|
754
|
+
:return: Returns the result object.
|
|
755
|
+
""" # noqa: E501
|
|
756
|
+
|
|
757
|
+
_param = self._execute_interpreter_code_serialize(
|
|
758
|
+
_request_auth=_request_auth,
|
|
759
|
+
_content_type=_content_type,
|
|
760
|
+
_headers=_headers,
|
|
761
|
+
_host_index=_host_index
|
|
762
|
+
)
|
|
763
|
+
|
|
764
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
765
|
+
'101': "str",
|
|
766
|
+
}
|
|
767
|
+
response_data = self.api_client.call_api(
|
|
768
|
+
*_param,
|
|
769
|
+
_request_timeout=_request_timeout
|
|
770
|
+
)
|
|
771
|
+
return response_data.response
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
def _execute_interpreter_code_serialize(
|
|
775
|
+
self,
|
|
776
|
+
_request_auth,
|
|
777
|
+
_content_type,
|
|
778
|
+
_headers,
|
|
779
|
+
_host_index,
|
|
780
|
+
) -> RequestSerialized:
|
|
781
|
+
|
|
782
|
+
_host = None
|
|
783
|
+
|
|
784
|
+
_collection_formats: Dict[str, str] = {
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_path_params: Dict[str, str] = {}
|
|
788
|
+
_query_params: List[Tuple[str, str]] = []
|
|
789
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
790
|
+
_form_params: List[Tuple[str, str]] = []
|
|
791
|
+
_files: Dict[
|
|
792
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
793
|
+
] = {}
|
|
794
|
+
_body_params: Optional[bytes] = None
|
|
795
|
+
|
|
796
|
+
# process the path parameters
|
|
797
|
+
# process the query parameters
|
|
798
|
+
# process the header parameters
|
|
799
|
+
# process the form parameters
|
|
800
|
+
# process the body parameter
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
# set the HTTP header `Accept`
|
|
804
|
+
if 'Accept' not in _header_params:
|
|
805
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
806
|
+
[
|
|
807
|
+
'application/json'
|
|
808
|
+
]
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
# authentication setting
|
|
813
|
+
_auth_settings: List[str] = [
|
|
814
|
+
]
|
|
815
|
+
|
|
816
|
+
return self.api_client.param_serialize(
|
|
817
|
+
method='GET',
|
|
818
|
+
resource_path='/process/interpreter/execute',
|
|
819
|
+
path_params=_path_params,
|
|
820
|
+
query_params=_query_params,
|
|
821
|
+
header_params=_header_params,
|
|
822
|
+
body=_body_params,
|
|
823
|
+
post_params=_form_params,
|
|
824
|
+
files=_files,
|
|
825
|
+
auth_settings=_auth_settings,
|
|
826
|
+
collection_formats=_collection_formats,
|
|
827
|
+
_host=_host,
|
|
828
|
+
_request_auth=_request_auth
|
|
829
|
+
)
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
@validate_call
|
|
835
|
+
def list_interpreter_contexts(
|
|
836
|
+
self,
|
|
837
|
+
_request_timeout: Union[
|
|
838
|
+
None,
|
|
839
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
840
|
+
Tuple[
|
|
841
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
842
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
843
|
+
]
|
|
844
|
+
] = None,
|
|
845
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
846
|
+
_content_type: Optional[StrictStr] = None,
|
|
847
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
848
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
849
|
+
) -> ListContextsResponse:
|
|
850
|
+
"""List all user-created interpreter contexts
|
|
851
|
+
|
|
852
|
+
Returns information about all user-created interpreter contexts (excludes default context)
|
|
853
|
+
|
|
854
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
855
|
+
number provided, it will be total request
|
|
856
|
+
timeout. It can also be a pair (tuple) of
|
|
857
|
+
(connection, read) timeouts.
|
|
858
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
859
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
860
|
+
request; this effectively ignores the
|
|
861
|
+
authentication in the spec for a single request.
|
|
862
|
+
:type _request_auth: dict, optional
|
|
863
|
+
:param _content_type: force content-type for the request.
|
|
864
|
+
:type _content_type: str, Optional
|
|
865
|
+
:param _headers: set to override the headers for a single
|
|
866
|
+
request; this effectively ignores the headers
|
|
867
|
+
in the spec for a single request.
|
|
868
|
+
:type _headers: dict, optional
|
|
869
|
+
:param _host_index: set to override the host_index for a single
|
|
870
|
+
request; this effectively ignores the host_index
|
|
871
|
+
in the spec for a single request.
|
|
872
|
+
:type _host_index: int, optional
|
|
873
|
+
:return: Returns the result object.
|
|
874
|
+
""" # noqa: E501
|
|
875
|
+
|
|
876
|
+
_param = self._list_interpreter_contexts_serialize(
|
|
877
|
+
_request_auth=_request_auth,
|
|
878
|
+
_content_type=_content_type,
|
|
879
|
+
_headers=_headers,
|
|
880
|
+
_host_index=_host_index
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
884
|
+
'200': "ListContextsResponse",
|
|
885
|
+
}
|
|
886
|
+
response_data = self.api_client.call_api(
|
|
887
|
+
*_param,
|
|
888
|
+
_request_timeout=_request_timeout
|
|
889
|
+
)
|
|
890
|
+
response_data.read()
|
|
891
|
+
return self.api_client.response_deserialize(
|
|
892
|
+
response_data=response_data,
|
|
893
|
+
response_types_map=_response_types_map,
|
|
894
|
+
).data
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
@validate_call
|
|
898
|
+
def list_interpreter_contexts_with_http_info(
|
|
899
|
+
self,
|
|
900
|
+
_request_timeout: Union[
|
|
901
|
+
None,
|
|
902
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
903
|
+
Tuple[
|
|
904
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
905
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
906
|
+
]
|
|
907
|
+
] = None,
|
|
908
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
909
|
+
_content_type: Optional[StrictStr] = None,
|
|
910
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
911
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
912
|
+
) -> ApiResponse[ListContextsResponse]:
|
|
913
|
+
"""List all user-created interpreter contexts
|
|
914
|
+
|
|
915
|
+
Returns information about all user-created interpreter contexts (excludes default context)
|
|
916
|
+
|
|
917
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
918
|
+
number provided, it will be total request
|
|
919
|
+
timeout. It can also be a pair (tuple) of
|
|
920
|
+
(connection, read) timeouts.
|
|
921
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
922
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
923
|
+
request; this effectively ignores the
|
|
924
|
+
authentication in the spec for a single request.
|
|
925
|
+
:type _request_auth: dict, optional
|
|
926
|
+
:param _content_type: force content-type for the request.
|
|
927
|
+
:type _content_type: str, Optional
|
|
928
|
+
:param _headers: set to override the headers for a single
|
|
929
|
+
request; this effectively ignores the headers
|
|
930
|
+
in the spec for a single request.
|
|
931
|
+
:type _headers: dict, optional
|
|
932
|
+
:param _host_index: set to override the host_index for a single
|
|
933
|
+
request; this effectively ignores the host_index
|
|
934
|
+
in the spec for a single request.
|
|
935
|
+
:type _host_index: int, optional
|
|
936
|
+
:return: Returns the result object.
|
|
937
|
+
""" # noqa: E501
|
|
938
|
+
|
|
939
|
+
_param = self._list_interpreter_contexts_serialize(
|
|
940
|
+
_request_auth=_request_auth,
|
|
941
|
+
_content_type=_content_type,
|
|
942
|
+
_headers=_headers,
|
|
943
|
+
_host_index=_host_index
|
|
944
|
+
)
|
|
945
|
+
|
|
946
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
947
|
+
'200': "ListContextsResponse",
|
|
948
|
+
}
|
|
949
|
+
response_data = self.api_client.call_api(
|
|
950
|
+
*_param,
|
|
951
|
+
_request_timeout=_request_timeout
|
|
952
|
+
)
|
|
953
|
+
response_data.read()
|
|
954
|
+
return self.api_client.response_deserialize(
|
|
955
|
+
response_data=response_data,
|
|
956
|
+
response_types_map=_response_types_map,
|
|
957
|
+
)
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
@validate_call
|
|
961
|
+
def list_interpreter_contexts_without_preload_content(
|
|
962
|
+
self,
|
|
963
|
+
_request_timeout: Union[
|
|
964
|
+
None,
|
|
965
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
966
|
+
Tuple[
|
|
967
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
968
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
969
|
+
]
|
|
970
|
+
] = None,
|
|
971
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
972
|
+
_content_type: Optional[StrictStr] = None,
|
|
973
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
974
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
975
|
+
) -> RESTResponseType:
|
|
976
|
+
"""List all user-created interpreter contexts
|
|
977
|
+
|
|
978
|
+
Returns information about all user-created interpreter contexts (excludes default context)
|
|
979
|
+
|
|
980
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
981
|
+
number provided, it will be total request
|
|
982
|
+
timeout. It can also be a pair (tuple) of
|
|
983
|
+
(connection, read) timeouts.
|
|
984
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
985
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
986
|
+
request; this effectively ignores the
|
|
987
|
+
authentication in the spec for a single request.
|
|
988
|
+
:type _request_auth: dict, optional
|
|
989
|
+
:param _content_type: force content-type for the request.
|
|
990
|
+
:type _content_type: str, Optional
|
|
991
|
+
:param _headers: set to override the headers for a single
|
|
992
|
+
request; this effectively ignores the headers
|
|
993
|
+
in the spec for a single request.
|
|
994
|
+
:type _headers: dict, optional
|
|
995
|
+
:param _host_index: set to override the host_index for a single
|
|
996
|
+
request; this effectively ignores the host_index
|
|
997
|
+
in the spec for a single request.
|
|
998
|
+
:type _host_index: int, optional
|
|
999
|
+
:return: Returns the result object.
|
|
1000
|
+
""" # noqa: E501
|
|
1001
|
+
|
|
1002
|
+
_param = self._list_interpreter_contexts_serialize(
|
|
1003
|
+
_request_auth=_request_auth,
|
|
1004
|
+
_content_type=_content_type,
|
|
1005
|
+
_headers=_headers,
|
|
1006
|
+
_host_index=_host_index
|
|
1007
|
+
)
|
|
1008
|
+
|
|
1009
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1010
|
+
'200': "ListContextsResponse",
|
|
1011
|
+
}
|
|
1012
|
+
response_data = self.api_client.call_api(
|
|
1013
|
+
*_param,
|
|
1014
|
+
_request_timeout=_request_timeout
|
|
1015
|
+
)
|
|
1016
|
+
return response_data.response
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
def _list_interpreter_contexts_serialize(
|
|
1020
|
+
self,
|
|
1021
|
+
_request_auth,
|
|
1022
|
+
_content_type,
|
|
1023
|
+
_headers,
|
|
1024
|
+
_host_index,
|
|
1025
|
+
) -> RequestSerialized:
|
|
1026
|
+
|
|
1027
|
+
_host = None
|
|
1028
|
+
|
|
1029
|
+
_collection_formats: Dict[str, str] = {
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
_path_params: Dict[str, str] = {}
|
|
1033
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1034
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1035
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1036
|
+
_files: Dict[
|
|
1037
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1038
|
+
] = {}
|
|
1039
|
+
_body_params: Optional[bytes] = None
|
|
1040
|
+
|
|
1041
|
+
# process the path parameters
|
|
1042
|
+
# process the query parameters
|
|
1043
|
+
# process the header parameters
|
|
1044
|
+
# process the form parameters
|
|
1045
|
+
# process the body parameter
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
# set the HTTP header `Accept`
|
|
1049
|
+
if 'Accept' not in _header_params:
|
|
1050
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1051
|
+
[
|
|
1052
|
+
'application/json'
|
|
1053
|
+
]
|
|
1054
|
+
)
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
# authentication setting
|
|
1058
|
+
_auth_settings: List[str] = [
|
|
1059
|
+
]
|
|
1060
|
+
|
|
1061
|
+
return self.api_client.param_serialize(
|
|
1062
|
+
method='GET',
|
|
1063
|
+
resource_path='/process/interpreter/context',
|
|
1064
|
+
path_params=_path_params,
|
|
1065
|
+
query_params=_query_params,
|
|
1066
|
+
header_params=_header_params,
|
|
1067
|
+
body=_body_params,
|
|
1068
|
+
post_params=_form_params,
|
|
1069
|
+
files=_files,
|
|
1070
|
+
auth_settings=_auth_settings,
|
|
1071
|
+
collection_formats=_collection_formats,
|
|
1072
|
+
_host=_host,
|
|
1073
|
+
_request_auth=_request_auth
|
|
1074
|
+
)
|
|
1075
|
+
|
|
1076
|
+
|