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,544 @@
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, 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
+ }
343
+ response_data = self.api_client.call_api(
344
+ *_param,
345
+ _request_timeout=_request_timeout
346
+ )
347
+ response_data.read()
348
+ return self.api_client.response_deserialize(
349
+ response_data=response_data,
350
+ response_types_map=_response_types_map,
351
+ ).data
352
+
353
+
354
+ @validate_call
355
+ def is_port_in_use_with_http_info(
356
+ self,
357
+ port: Annotated[StrictInt, Field(description="Port number (3000-9999)")],
358
+ _request_timeout: Union[
359
+ None,
360
+ Annotated[StrictFloat, Field(gt=0)],
361
+ Tuple[
362
+ Annotated[StrictFloat, Field(gt=0)],
363
+ Annotated[StrictFloat, Field(gt=0)]
364
+ ]
365
+ ] = None,
366
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
367
+ _content_type: Optional[StrictStr] = None,
368
+ _headers: Optional[Dict[StrictStr, Any]] = None,
369
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
370
+ ) -> ApiResponse[IsPortInUseResponse]:
371
+ """Check if port is in use
372
+
373
+ Check if a specific port is currently in use
374
+
375
+ :param port: Port number (3000-9999) (required)
376
+ :type port: int
377
+ :param _request_timeout: timeout setting for this request. If one
378
+ number provided, it will be total request
379
+ timeout. It can also be a pair (tuple) of
380
+ (connection, read) timeouts.
381
+ :type _request_timeout: int, tuple(int, int), optional
382
+ :param _request_auth: set to override the auth_settings for an a single
383
+ request; this effectively ignores the
384
+ authentication in the spec for a single request.
385
+ :type _request_auth: dict, optional
386
+ :param _content_type: force content-type for the request.
387
+ :type _content_type: str, Optional
388
+ :param _headers: set to override the headers for a single
389
+ request; this effectively ignores the headers
390
+ in the spec for a single request.
391
+ :type _headers: dict, optional
392
+ :param _host_index: set to override the host_index for a single
393
+ request; this effectively ignores the host_index
394
+ in the spec for a single request.
395
+ :type _host_index: int, optional
396
+ :return: Returns the result object.
397
+ """ # noqa: E501
398
+
399
+ _param = self._is_port_in_use_serialize(
400
+ port=port,
401
+ _request_auth=_request_auth,
402
+ _content_type=_content_type,
403
+ _headers=_headers,
404
+ _host_index=_host_index
405
+ )
406
+
407
+ _response_types_map: Dict[str, Optional[str]] = {
408
+ '200': "IsPortInUseResponse",
409
+ }
410
+ response_data = self.api_client.call_api(
411
+ *_param,
412
+ _request_timeout=_request_timeout
413
+ )
414
+ response_data.read()
415
+ return self.api_client.response_deserialize(
416
+ response_data=response_data,
417
+ response_types_map=_response_types_map,
418
+ )
419
+
420
+
421
+ @validate_call
422
+ def is_port_in_use_without_preload_content(
423
+ self,
424
+ port: Annotated[StrictInt, Field(description="Port number (3000-9999)")],
425
+ _request_timeout: Union[
426
+ None,
427
+ Annotated[StrictFloat, Field(gt=0)],
428
+ Tuple[
429
+ Annotated[StrictFloat, Field(gt=0)],
430
+ Annotated[StrictFloat, Field(gt=0)]
431
+ ]
432
+ ] = None,
433
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
434
+ _content_type: Optional[StrictStr] = None,
435
+ _headers: Optional[Dict[StrictStr, Any]] = None,
436
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
437
+ ) -> RESTResponseType:
438
+ """Check if port is in use
439
+
440
+ Check if a specific port is currently in use
441
+
442
+ :param port: Port number (3000-9999) (required)
443
+ :type port: int
444
+ :param _request_timeout: timeout setting for this request. If one
445
+ number provided, it will be total request
446
+ timeout. It can also be a pair (tuple) of
447
+ (connection, read) timeouts.
448
+ :type _request_timeout: int, tuple(int, int), optional
449
+ :param _request_auth: set to override the auth_settings for an a single
450
+ request; this effectively ignores the
451
+ authentication in the spec for a single request.
452
+ :type _request_auth: dict, optional
453
+ :param _content_type: force content-type for the request.
454
+ :type _content_type: str, Optional
455
+ :param _headers: set to override the headers for a single
456
+ request; this effectively ignores the headers
457
+ in the spec for a single request.
458
+ :type _headers: dict, optional
459
+ :param _host_index: set to override the host_index for a single
460
+ request; this effectively ignores the host_index
461
+ in the spec for a single request.
462
+ :type _host_index: int, optional
463
+ :return: Returns the result object.
464
+ """ # noqa: E501
465
+
466
+ _param = self._is_port_in_use_serialize(
467
+ port=port,
468
+ _request_auth=_request_auth,
469
+ _content_type=_content_type,
470
+ _headers=_headers,
471
+ _host_index=_host_index
472
+ )
473
+
474
+ _response_types_map: Dict[str, Optional[str]] = {
475
+ '200': "IsPortInUseResponse",
476
+ }
477
+ response_data = self.api_client.call_api(
478
+ *_param,
479
+ _request_timeout=_request_timeout
480
+ )
481
+ return response_data.response
482
+
483
+
484
+ def _is_port_in_use_serialize(
485
+ self,
486
+ port,
487
+ _request_auth,
488
+ _content_type,
489
+ _headers,
490
+ _host_index,
491
+ ) -> RequestSerialized:
492
+
493
+ _host = None
494
+
495
+ _collection_formats: Dict[str, str] = {
496
+ }
497
+
498
+ _path_params: Dict[str, str] = {}
499
+ _query_params: List[Tuple[str, str]] = []
500
+ _header_params: Dict[str, Optional[str]] = _headers or {}
501
+ _form_params: List[Tuple[str, str]] = []
502
+ _files: Dict[
503
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
504
+ ] = {}
505
+ _body_params: Optional[bytes] = None
506
+
507
+ # process the path parameters
508
+ if port is not None:
509
+ _path_params['port'] = port
510
+ # process the query parameters
511
+ # process the header parameters
512
+ # process the form parameters
513
+ # process the body parameter
514
+
515
+
516
+ # set the HTTP header `Accept`
517
+ if 'Accept' not in _header_params:
518
+ _header_params['Accept'] = self.api_client.select_header_accept(
519
+ [
520
+ 'application/json'
521
+ ]
522
+ )
523
+
524
+
525
+ # authentication setting
526
+ _auth_settings: List[str] = [
527
+ ]
528
+
529
+ return self.api_client.param_serialize(
530
+ method='GET',
531
+ resource_path='/port/{port}/in-use',
532
+ path_params=_path_params,
533
+ query_params=_query_params,
534
+ header_params=_header_params,
535
+ body=_body_params,
536
+ post_params=_form_params,
537
+ files=_files,
538
+ auth_settings=_auth_settings,
539
+ collection_formats=_collection_formats,
540
+ _host=_host,
541
+ _request_auth=_request_auth
542
+ )
543
+
544
+