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,547 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona Daemon API
5
+
6
+ Daytona Daemon Toolbox API for file operations, process execution, git operations, LSP, computer use, and more.
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, StrictInt
20
+ from typing_extensions import Annotated
21
+ from daytona_toolbox_api_client.models.is_port_in_use_response import IsPortInUseResponse
22
+ from daytona_toolbox_api_client.models.port_list import PortList
23
+
24
+ from daytona_toolbox_api_client.api_client import ApiClient, RequestSerialized
25
+ from daytona_toolbox_api_client.api_response import ApiResponse
26
+ from daytona_toolbox_api_client.rest import RESTResponseType
27
+
28
+
29
+ class PortApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def get_ports(
44
+ self,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> PortList:
58
+ """Get active ports
59
+
60
+ Get a list of all currently active ports
61
+
62
+ :param _request_timeout: timeout setting for this request. If one
63
+ number provided, it will be total request
64
+ timeout. It can also be a pair (tuple) of
65
+ (connection, read) timeouts.
66
+ :type _request_timeout: int, tuple(int, int), optional
67
+ :param _request_auth: set to override the auth_settings for an a single
68
+ request; this effectively ignores the
69
+ authentication in the spec for a single request.
70
+ :type _request_auth: dict, optional
71
+ :param _content_type: force content-type for the request.
72
+ :type _content_type: str, Optional
73
+ :param _headers: set to override the headers for a single
74
+ request; this effectively ignores the headers
75
+ in the spec for a single request.
76
+ :type _headers: dict, optional
77
+ :param _host_index: set to override the host_index for a single
78
+ request; this effectively ignores the host_index
79
+ in the spec for a single request.
80
+ :type _host_index: int, optional
81
+ :return: Returns the result object.
82
+ """ # noqa: E501
83
+
84
+ _param = self._get_ports_serialize(
85
+ _request_auth=_request_auth,
86
+ _content_type=_content_type,
87
+ _headers=_headers,
88
+ _host_index=_host_index
89
+ )
90
+
91
+ _response_types_map: Dict[str, Optional[str]] = {
92
+ '200': "PortList",
93
+ }
94
+ response_data = self.api_client.call_api(
95
+ *_param,
96
+ _request_timeout=_request_timeout
97
+ )
98
+ response_data.read()
99
+ return self.api_client.response_deserialize(
100
+ response_data=response_data,
101
+ response_types_map=_response_types_map,
102
+ ).data
103
+
104
+
105
+ @validate_call
106
+ def get_ports_with_http_info(
107
+ self,
108
+ _request_timeout: Union[
109
+ None,
110
+ Annotated[StrictFloat, Field(gt=0)],
111
+ Tuple[
112
+ Annotated[StrictFloat, Field(gt=0)],
113
+ Annotated[StrictFloat, Field(gt=0)]
114
+ ]
115
+ ] = None,
116
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
117
+ _content_type: Optional[StrictStr] = None,
118
+ _headers: Optional[Dict[StrictStr, Any]] = None,
119
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
120
+ ) -> ApiResponse[PortList]:
121
+ """Get active ports
122
+
123
+ Get a list of all currently active ports
124
+
125
+ :param _request_timeout: timeout setting for this request. If one
126
+ number provided, it will be total request
127
+ timeout. It can also be a pair (tuple) of
128
+ (connection, read) timeouts.
129
+ :type _request_timeout: int, tuple(int, int), optional
130
+ :param _request_auth: set to override the auth_settings for an a single
131
+ request; this effectively ignores the
132
+ authentication in the spec for a single request.
133
+ :type _request_auth: dict, optional
134
+ :param _content_type: force content-type for the request.
135
+ :type _content_type: str, Optional
136
+ :param _headers: set to override the headers for a single
137
+ request; this effectively ignores the headers
138
+ in the spec for a single request.
139
+ :type _headers: dict, optional
140
+ :param _host_index: set to override the host_index for a single
141
+ request; this effectively ignores the host_index
142
+ in the spec for a single request.
143
+ :type _host_index: int, optional
144
+ :return: Returns the result object.
145
+ """ # noqa: E501
146
+
147
+ _param = self._get_ports_serialize(
148
+ _request_auth=_request_auth,
149
+ _content_type=_content_type,
150
+ _headers=_headers,
151
+ _host_index=_host_index
152
+ )
153
+
154
+ _response_types_map: Dict[str, Optional[str]] = {
155
+ '200': "PortList",
156
+ }
157
+ response_data = self.api_client.call_api(
158
+ *_param,
159
+ _request_timeout=_request_timeout
160
+ )
161
+ response_data.read()
162
+ return self.api_client.response_deserialize(
163
+ response_data=response_data,
164
+ response_types_map=_response_types_map,
165
+ )
166
+
167
+
168
+ @validate_call
169
+ def get_ports_without_preload_content(
170
+ self,
171
+ _request_timeout: Union[
172
+ None,
173
+ Annotated[StrictFloat, Field(gt=0)],
174
+ Tuple[
175
+ Annotated[StrictFloat, Field(gt=0)],
176
+ Annotated[StrictFloat, Field(gt=0)]
177
+ ]
178
+ ] = None,
179
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
180
+ _content_type: Optional[StrictStr] = None,
181
+ _headers: Optional[Dict[StrictStr, Any]] = None,
182
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
183
+ ) -> RESTResponseType:
184
+ """Get active ports
185
+
186
+ Get a list of all currently active ports
187
+
188
+ :param _request_timeout: timeout setting for this request. If one
189
+ number provided, it will be total request
190
+ timeout. It can also be a pair (tuple) of
191
+ (connection, read) timeouts.
192
+ :type _request_timeout: int, tuple(int, int), optional
193
+ :param _request_auth: set to override the auth_settings for an a single
194
+ request; this effectively ignores the
195
+ authentication in the spec for a single request.
196
+ :type _request_auth: dict, optional
197
+ :param _content_type: force content-type for the request.
198
+ :type _content_type: str, Optional
199
+ :param _headers: set to override the headers for a single
200
+ request; this effectively ignores the headers
201
+ in the spec for a single request.
202
+ :type _headers: dict, optional
203
+ :param _host_index: set to override the host_index for a single
204
+ request; this effectively ignores the host_index
205
+ in the spec for a single request.
206
+ :type _host_index: int, optional
207
+ :return: Returns the result object.
208
+ """ # noqa: E501
209
+
210
+ _param = self._get_ports_serialize(
211
+ _request_auth=_request_auth,
212
+ _content_type=_content_type,
213
+ _headers=_headers,
214
+ _host_index=_host_index
215
+ )
216
+
217
+ _response_types_map: Dict[str, Optional[str]] = {
218
+ '200': "PortList",
219
+ }
220
+ response_data = self.api_client.call_api(
221
+ *_param,
222
+ _request_timeout=_request_timeout
223
+ )
224
+ return response_data.response
225
+
226
+
227
+ def _get_ports_serialize(
228
+ self,
229
+ _request_auth,
230
+ _content_type,
231
+ _headers,
232
+ _host_index,
233
+ ) -> RequestSerialized:
234
+
235
+ _host = None
236
+
237
+ _collection_formats: Dict[str, str] = {
238
+ }
239
+
240
+ _path_params: Dict[str, str] = {}
241
+ _query_params: List[Tuple[str, str]] = []
242
+ _header_params: Dict[str, Optional[str]] = _headers or {}
243
+ _form_params: List[Tuple[str, str]] = []
244
+ _files: Dict[
245
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
246
+ ] = {}
247
+ _body_params: Optional[bytes] = None
248
+
249
+ # process the path parameters
250
+ # process the query parameters
251
+ # process the header parameters
252
+ # process the form parameters
253
+ # process the body parameter
254
+
255
+
256
+ # set the HTTP header `Accept`
257
+ if 'Accept' not in _header_params:
258
+ _header_params['Accept'] = self.api_client.select_header_accept(
259
+ [
260
+ 'application/json'
261
+ ]
262
+ )
263
+
264
+
265
+ # authentication setting
266
+ _auth_settings: List[str] = [
267
+ ]
268
+
269
+ return self.api_client.param_serialize(
270
+ method='GET',
271
+ resource_path='/port',
272
+ path_params=_path_params,
273
+ query_params=_query_params,
274
+ header_params=_header_params,
275
+ body=_body_params,
276
+ post_params=_form_params,
277
+ files=_files,
278
+ auth_settings=_auth_settings,
279
+ collection_formats=_collection_formats,
280
+ _host=_host,
281
+ _request_auth=_request_auth
282
+ )
283
+
284
+
285
+
286
+
287
+ @validate_call
288
+ def is_port_in_use(
289
+ self,
290
+ port: Annotated[StrictInt, Field(description="Port number (3000-9999)")],
291
+ _request_timeout: Union[
292
+ None,
293
+ Annotated[StrictFloat, Field(gt=0)],
294
+ Tuple[
295
+ Annotated[StrictFloat, Field(gt=0)],
296
+ Annotated[StrictFloat, Field(gt=0)]
297
+ ]
298
+ ] = None,
299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
300
+ _content_type: Optional[StrictStr] = None,
301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
303
+ ) -> IsPortInUseResponse:
304
+ """Check if port is in use
305
+
306
+ Check if a specific port is currently in use
307
+
308
+ :param port: Port number (3000-9999) (required)
309
+ :type port: int
310
+ :param _request_timeout: timeout setting for this request. If one
311
+ number provided, it will be total request
312
+ timeout. It can also be a pair (tuple) of
313
+ (connection, read) timeouts.
314
+ :type _request_timeout: int, tuple(int, int), optional
315
+ :param _request_auth: set to override the auth_settings for an a single
316
+ request; this effectively ignores the
317
+ authentication in the spec for a single request.
318
+ :type _request_auth: dict, optional
319
+ :param _content_type: force content-type for the request.
320
+ :type _content_type: str, Optional
321
+ :param _headers: set to override the headers for a single
322
+ request; this effectively ignores the headers
323
+ in the spec for a single request.
324
+ :type _headers: dict, optional
325
+ :param _host_index: set to override the host_index for a single
326
+ request; this effectively ignores the host_index
327
+ in the spec for a single request.
328
+ :type _host_index: int, optional
329
+ :return: Returns the result object.
330
+ """ # noqa: E501
331
+
332
+ _param = self._is_port_in_use_serialize(
333
+ port=port,
334
+ _request_auth=_request_auth,
335
+ _content_type=_content_type,
336
+ _headers=_headers,
337
+ _host_index=_host_index
338
+ )
339
+
340
+ _response_types_map: Dict[str, Optional[str]] = {
341
+ '200': "IsPortInUseResponse",
342
+ '400': "Dict[str, object]",
343
+ }
344
+ response_data = self.api_client.call_api(
345
+ *_param,
346
+ _request_timeout=_request_timeout
347
+ )
348
+ response_data.read()
349
+ return self.api_client.response_deserialize(
350
+ response_data=response_data,
351
+ response_types_map=_response_types_map,
352
+ ).data
353
+
354
+
355
+ @validate_call
356
+ def is_port_in_use_with_http_info(
357
+ self,
358
+ port: Annotated[StrictInt, Field(description="Port number (3000-9999)")],
359
+ _request_timeout: Union[
360
+ None,
361
+ Annotated[StrictFloat, Field(gt=0)],
362
+ Tuple[
363
+ Annotated[StrictFloat, Field(gt=0)],
364
+ Annotated[StrictFloat, Field(gt=0)]
365
+ ]
366
+ ] = None,
367
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
368
+ _content_type: Optional[StrictStr] = None,
369
+ _headers: Optional[Dict[StrictStr, Any]] = None,
370
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
371
+ ) -> ApiResponse[IsPortInUseResponse]:
372
+ """Check if port is in use
373
+
374
+ Check if a specific port is currently in use
375
+
376
+ :param port: Port number (3000-9999) (required)
377
+ :type port: int
378
+ :param _request_timeout: timeout setting for this request. If one
379
+ number provided, it will be total request
380
+ timeout. It can also be a pair (tuple) of
381
+ (connection, read) timeouts.
382
+ :type _request_timeout: int, tuple(int, int), optional
383
+ :param _request_auth: set to override the auth_settings for an a single
384
+ request; this effectively ignores the
385
+ authentication in the spec for a single request.
386
+ :type _request_auth: dict, optional
387
+ :param _content_type: force content-type for the request.
388
+ :type _content_type: str, Optional
389
+ :param _headers: set to override the headers for a single
390
+ request; this effectively ignores the headers
391
+ in the spec for a single request.
392
+ :type _headers: dict, optional
393
+ :param _host_index: set to override the host_index for a single
394
+ request; this effectively ignores the host_index
395
+ in the spec for a single request.
396
+ :type _host_index: int, optional
397
+ :return: Returns the result object.
398
+ """ # noqa: E501
399
+
400
+ _param = self._is_port_in_use_serialize(
401
+ port=port,
402
+ _request_auth=_request_auth,
403
+ _content_type=_content_type,
404
+ _headers=_headers,
405
+ _host_index=_host_index
406
+ )
407
+
408
+ _response_types_map: Dict[str, Optional[str]] = {
409
+ '200': "IsPortInUseResponse",
410
+ '400': "Dict[str, object]",
411
+ }
412
+ response_data = self.api_client.call_api(
413
+ *_param,
414
+ _request_timeout=_request_timeout
415
+ )
416
+ response_data.read()
417
+ return self.api_client.response_deserialize(
418
+ response_data=response_data,
419
+ response_types_map=_response_types_map,
420
+ )
421
+
422
+
423
+ @validate_call
424
+ def is_port_in_use_without_preload_content(
425
+ self,
426
+ port: Annotated[StrictInt, Field(description="Port number (3000-9999)")],
427
+ _request_timeout: Union[
428
+ None,
429
+ Annotated[StrictFloat, Field(gt=0)],
430
+ Tuple[
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Annotated[StrictFloat, Field(gt=0)]
433
+ ]
434
+ ] = None,
435
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
436
+ _content_type: Optional[StrictStr] = None,
437
+ _headers: Optional[Dict[StrictStr, Any]] = None,
438
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
439
+ ) -> RESTResponseType:
440
+ """Check if port is in use
441
+
442
+ Check if a specific port is currently in use
443
+
444
+ :param port: Port number (3000-9999) (required)
445
+ :type port: int
446
+ :param _request_timeout: timeout setting for this request. If one
447
+ number provided, it will be total request
448
+ timeout. It can also be a pair (tuple) of
449
+ (connection, read) timeouts.
450
+ :type _request_timeout: int, tuple(int, int), optional
451
+ :param _request_auth: set to override the auth_settings for an a single
452
+ request; this effectively ignores the
453
+ authentication in the spec for a single request.
454
+ :type _request_auth: dict, optional
455
+ :param _content_type: force content-type for the request.
456
+ :type _content_type: str, Optional
457
+ :param _headers: set to override the headers for a single
458
+ request; this effectively ignores the headers
459
+ in the spec for a single request.
460
+ :type _headers: dict, optional
461
+ :param _host_index: set to override the host_index for a single
462
+ request; this effectively ignores the host_index
463
+ in the spec for a single request.
464
+ :type _host_index: int, optional
465
+ :return: Returns the result object.
466
+ """ # noqa: E501
467
+
468
+ _param = self._is_port_in_use_serialize(
469
+ port=port,
470
+ _request_auth=_request_auth,
471
+ _content_type=_content_type,
472
+ _headers=_headers,
473
+ _host_index=_host_index
474
+ )
475
+
476
+ _response_types_map: Dict[str, Optional[str]] = {
477
+ '200': "IsPortInUseResponse",
478
+ '400': "Dict[str, object]",
479
+ }
480
+ response_data = self.api_client.call_api(
481
+ *_param,
482
+ _request_timeout=_request_timeout
483
+ )
484
+ return response_data.response
485
+
486
+
487
+ def _is_port_in_use_serialize(
488
+ self,
489
+ port,
490
+ _request_auth,
491
+ _content_type,
492
+ _headers,
493
+ _host_index,
494
+ ) -> RequestSerialized:
495
+
496
+ _host = None
497
+
498
+ _collection_formats: Dict[str, str] = {
499
+ }
500
+
501
+ _path_params: Dict[str, str] = {}
502
+ _query_params: List[Tuple[str, str]] = []
503
+ _header_params: Dict[str, Optional[str]] = _headers or {}
504
+ _form_params: List[Tuple[str, str]] = []
505
+ _files: Dict[
506
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
507
+ ] = {}
508
+ _body_params: Optional[bytes] = None
509
+
510
+ # process the path parameters
511
+ if port is not None:
512
+ _path_params['port'] = port
513
+ # process the query parameters
514
+ # process the header parameters
515
+ # process the form parameters
516
+ # process the body parameter
517
+
518
+
519
+ # set the HTTP header `Accept`
520
+ if 'Accept' not in _header_params:
521
+ _header_params['Accept'] = self.api_client.select_header_accept(
522
+ [
523
+ 'application/json'
524
+ ]
525
+ )
526
+
527
+
528
+ # authentication setting
529
+ _auth_settings: List[str] = [
530
+ ]
531
+
532
+ return self.api_client.param_serialize(
533
+ method='GET',
534
+ resource_path='/port/{port}/in-use',
535
+ path_params=_path_params,
536
+ query_params=_query_params,
537
+ header_params=_header_params,
538
+ body=_body_params,
539
+ post_params=_form_params,
540
+ files=_files,
541
+ auth_settings=_auth_settings,
542
+ collection_formats=_collection_formats,
543
+ _host=_host,
544
+ _request_auth=_request_auth
545
+ )
546
+
547
+