cyberdesk 1.8.0__py3-none-any.whl → 1.10.0__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 cyberdesk might be problematic. Click here for more details.

Files changed (41) hide show
  1. cyberdesk/__init__.py +13 -1
  2. cyberdesk/client.py +357 -0
  3. {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/METADATA +39 -17
  4. {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/RECORD +41 -13
  5. openapi_client/cyberdesk_cloud_client/api/computer/fs_list_v1_computer_machine_id_fs_list_get.py +188 -0
  6. openapi_client/cyberdesk_cloud_client/api/computer/fs_read_v1_computer_machine_id_fs_read_get.py +188 -0
  7. openapi_client/cyberdesk_cloud_client/api/computer/fs_write_v1_computer_machine_id_fs_write_post.py +201 -0
  8. openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +219 -0
  9. openapi_client/cyberdesk_cloud_client/api/computer/powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +219 -0
  10. openapi_client/cyberdesk_cloud_client/api/run_attachments/__init__.py +1 -0
  11. openapi_client/cyberdesk_cloud_client/api/run_attachments/create_run_attachment_v1_run_attachments_post.py +184 -0
  12. openapi_client/cyberdesk_cloud_client/api/run_attachments/delete_run_attachment_v1_run_attachments_attachment_id_delete.py +170 -0
  13. openapi_client/cyberdesk_cloud_client/api/run_attachments/download_run_attachment_v1_run_attachments_attachment_id_download_get.py +170 -0
  14. openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_download_url_v1_run_attachments_attachment_id_download_url_get.py +209 -0
  15. openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_v1_run_attachments_attachment_id_get.py +172 -0
  16. openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +240 -0
  17. openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +194 -0
  18. openapi_client/cyberdesk_cloud_client/models/__init__.py +40 -0
  19. openapi_client/cyberdesk_cloud_client/models/attachment_type.py +9 -0
  20. openapi_client/cyberdesk_cloud_client/models/file_input.py +99 -0
  21. openapi_client/cyberdesk_cloud_client/models/file_write_request.py +78 -0
  22. openapi_client/cyberdesk_cloud_client/models/fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get.py +44 -0
  23. openapi_client/cyberdesk_cloud_client/models/fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get.py +44 -0
  24. openapi_client/cyberdesk_cloud_client/models/fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post.py +44 -0
  25. openapi_client/cyberdesk_cloud_client/models/paginated_response_run_attachment_response.py +97 -0
  26. openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +110 -0
  27. openapi_client/cyberdesk_cloud_client/models/power_shell_session_request.py +81 -0
  28. openapi_client/cyberdesk_cloud_client/models/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post_response_powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +47 -0
  29. openapi_client/cyberdesk_cloud_client/models/powershell_session_v1_computer_machine_id_shell_powershell_session_post_response_powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +47 -0
  30. openapi_client/cyberdesk_cloud_client/models/run_attachment_create.py +157 -0
  31. openapi_client/cyberdesk_cloud_client/models/run_attachment_download_url_response.py +68 -0
  32. openapi_client/cyberdesk_cloud_client/models/run_attachment_response.py +189 -0
  33. openapi_client/cyberdesk_cloud_client/models/run_attachment_update.py +84 -0
  34. openapi_client/cyberdesk_cloud_client/models/run_create.py +41 -0
  35. openapi_client/cyberdesk_cloud_client/models/run_response.py +26 -0
  36. openapi_client/cyberdesk_cloud_client/models/workflow_create.py +9 -0
  37. openapi_client/cyberdesk_cloud_client/models/workflow_response.py +9 -0
  38. openapi_client/cyberdesk_cloud_client/models/workflow_update.py +20 -0
  39. {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/WHEEL +0 -0
  40. {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/licenses/LICENSE +0 -0
  41. {cyberdesk-1.8.0.dist-info → cyberdesk-1.10.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,188 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get import (
9
+ FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet,
10
+ )
11
+ from ...models.http_validation_error import HTTPValidationError
12
+ from ...types import UNSET, Response, Unset
13
+
14
+
15
+ def _get_kwargs(
16
+ machine_id: str,
17
+ *,
18
+ path: Union[Unset, str] = ".",
19
+ ) -> dict[str, Any]:
20
+ params: dict[str, Any] = {}
21
+
22
+ params["path"] = path
23
+
24
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
25
+
26
+ _kwargs: dict[str, Any] = {
27
+ "method": "get",
28
+ "url": f"/v1/computer/{machine_id}/fs/list",
29
+ "params": params,
30
+ }
31
+
32
+ return _kwargs
33
+
34
+
35
+ def _parse_response(
36
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
37
+ ) -> Optional[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]:
38
+ if response.status_code == 200:
39
+ response_200 = FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet.from_dict(
40
+ response.json()
41
+ )
42
+
43
+ return response_200
44
+ if response.status_code == 422:
45
+ response_422 = HTTPValidationError.from_dict(response.json())
46
+
47
+ return response_422
48
+ if client.raise_on_unexpected_status:
49
+ raise errors.UnexpectedStatus(response.status_code, response.content)
50
+ else:
51
+ return None
52
+
53
+
54
+ def _build_response(
55
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
56
+ ) -> Response[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]:
57
+ return Response(
58
+ status_code=HTTPStatus(response.status_code),
59
+ content=response.content,
60
+ headers=response.headers,
61
+ parsed=_parse_response(client=client, response=response),
62
+ )
63
+
64
+
65
+ def sync_detailed(
66
+ machine_id: str,
67
+ *,
68
+ client: AuthenticatedClient,
69
+ path: Union[Unset, str] = ".",
70
+ ) -> Response[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]:
71
+ """List directory contents
72
+
73
+ List directory contents on the machine.
74
+
75
+ Args:
76
+ machine_id (str):
77
+ path (Union[Unset, str]): Default: '.'.
78
+
79
+ Raises:
80
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
81
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
82
+
83
+ Returns:
84
+ Response[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]
85
+ """
86
+
87
+ kwargs = _get_kwargs(
88
+ machine_id=machine_id,
89
+ path=path,
90
+ )
91
+
92
+ response = client.get_httpx_client().request(
93
+ **kwargs,
94
+ )
95
+
96
+ return _build_response(client=client, response=response)
97
+
98
+
99
+ def sync(
100
+ machine_id: str,
101
+ *,
102
+ client: AuthenticatedClient,
103
+ path: Union[Unset, str] = ".",
104
+ ) -> Optional[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]:
105
+ """List directory contents
106
+
107
+ List directory contents on the machine.
108
+
109
+ Args:
110
+ machine_id (str):
111
+ path (Union[Unset, str]): Default: '.'.
112
+
113
+ Raises:
114
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
116
+
117
+ Returns:
118
+ Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]
119
+ """
120
+
121
+ return sync_detailed(
122
+ machine_id=machine_id,
123
+ client=client,
124
+ path=path,
125
+ ).parsed
126
+
127
+
128
+ async def asyncio_detailed(
129
+ machine_id: str,
130
+ *,
131
+ client: AuthenticatedClient,
132
+ path: Union[Unset, str] = ".",
133
+ ) -> Response[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]:
134
+ """List directory contents
135
+
136
+ List directory contents on the machine.
137
+
138
+ Args:
139
+ machine_id (str):
140
+ path (Union[Unset, str]): Default: '.'.
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ Response[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]
148
+ """
149
+
150
+ kwargs = _get_kwargs(
151
+ machine_id=machine_id,
152
+ path=path,
153
+ )
154
+
155
+ response = await client.get_async_httpx_client().request(**kwargs)
156
+
157
+ return _build_response(client=client, response=response)
158
+
159
+
160
+ async def asyncio(
161
+ machine_id: str,
162
+ *,
163
+ client: AuthenticatedClient,
164
+ path: Union[Unset, str] = ".",
165
+ ) -> Optional[Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]]:
166
+ """List directory contents
167
+
168
+ List directory contents on the machine.
169
+
170
+ Args:
171
+ machine_id (str):
172
+ path (Union[Unset, str]): Default: '.'.
173
+
174
+ Raises:
175
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
176
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
177
+
178
+ Returns:
179
+ Union[FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet, HTTPValidationError]
180
+ """
181
+
182
+ return (
183
+ await asyncio_detailed(
184
+ machine_id=machine_id,
185
+ client=client,
186
+ path=path,
187
+ )
188
+ ).parsed
@@ -0,0 +1,188 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get import (
9
+ FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet,
10
+ )
11
+ from ...models.http_validation_error import HTTPValidationError
12
+ from ...types import UNSET, Response
13
+
14
+
15
+ def _get_kwargs(
16
+ machine_id: str,
17
+ *,
18
+ path: str,
19
+ ) -> dict[str, Any]:
20
+ params: dict[str, Any] = {}
21
+
22
+ params["path"] = path
23
+
24
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
25
+
26
+ _kwargs: dict[str, Any] = {
27
+ "method": "get",
28
+ "url": f"/v1/computer/{machine_id}/fs/read",
29
+ "params": params,
30
+ }
31
+
32
+ return _kwargs
33
+
34
+
35
+ def _parse_response(
36
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
37
+ ) -> Optional[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]:
38
+ if response.status_code == 200:
39
+ response_200 = FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet.from_dict(
40
+ response.json()
41
+ )
42
+
43
+ return response_200
44
+ if response.status_code == 422:
45
+ response_422 = HTTPValidationError.from_dict(response.json())
46
+
47
+ return response_422
48
+ if client.raise_on_unexpected_status:
49
+ raise errors.UnexpectedStatus(response.status_code, response.content)
50
+ else:
51
+ return None
52
+
53
+
54
+ def _build_response(
55
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
56
+ ) -> Response[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]:
57
+ return Response(
58
+ status_code=HTTPStatus(response.status_code),
59
+ content=response.content,
60
+ headers=response.headers,
61
+ parsed=_parse_response(client=client, response=response),
62
+ )
63
+
64
+
65
+ def sync_detailed(
66
+ machine_id: str,
67
+ *,
68
+ client: AuthenticatedClient,
69
+ path: str,
70
+ ) -> Response[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]:
71
+ """Read file contents
72
+
73
+ Read file contents from the machine (base64 encoded).
74
+
75
+ Args:
76
+ machine_id (str):
77
+ path (str):
78
+
79
+ Raises:
80
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
81
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
82
+
83
+ Returns:
84
+ Response[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]
85
+ """
86
+
87
+ kwargs = _get_kwargs(
88
+ machine_id=machine_id,
89
+ path=path,
90
+ )
91
+
92
+ response = client.get_httpx_client().request(
93
+ **kwargs,
94
+ )
95
+
96
+ return _build_response(client=client, response=response)
97
+
98
+
99
+ def sync(
100
+ machine_id: str,
101
+ *,
102
+ client: AuthenticatedClient,
103
+ path: str,
104
+ ) -> Optional[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]:
105
+ """Read file contents
106
+
107
+ Read file contents from the machine (base64 encoded).
108
+
109
+ Args:
110
+ machine_id (str):
111
+ path (str):
112
+
113
+ Raises:
114
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
116
+
117
+ Returns:
118
+ Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]
119
+ """
120
+
121
+ return sync_detailed(
122
+ machine_id=machine_id,
123
+ client=client,
124
+ path=path,
125
+ ).parsed
126
+
127
+
128
+ async def asyncio_detailed(
129
+ machine_id: str,
130
+ *,
131
+ client: AuthenticatedClient,
132
+ path: str,
133
+ ) -> Response[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]:
134
+ """Read file contents
135
+
136
+ Read file contents from the machine (base64 encoded).
137
+
138
+ Args:
139
+ machine_id (str):
140
+ path (str):
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ Response[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]
148
+ """
149
+
150
+ kwargs = _get_kwargs(
151
+ machine_id=machine_id,
152
+ path=path,
153
+ )
154
+
155
+ response = await client.get_async_httpx_client().request(**kwargs)
156
+
157
+ return _build_response(client=client, response=response)
158
+
159
+
160
+ async def asyncio(
161
+ machine_id: str,
162
+ *,
163
+ client: AuthenticatedClient,
164
+ path: str,
165
+ ) -> Optional[Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]]:
166
+ """Read file contents
167
+
168
+ Read file contents from the machine (base64 encoded).
169
+
170
+ Args:
171
+ machine_id (str):
172
+ path (str):
173
+
174
+ Raises:
175
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
176
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
177
+
178
+ Returns:
179
+ Union[FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet, HTTPValidationError]
180
+ """
181
+
182
+ return (
183
+ await asyncio_detailed(
184
+ machine_id=machine_id,
185
+ client=client,
186
+ path=path,
187
+ )
188
+ ).parsed
@@ -0,0 +1,201 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.file_write_request import FileWriteRequest
9
+ from ...models.fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post import (
10
+ FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost,
11
+ )
12
+ from ...models.http_validation_error import HTTPValidationError
13
+ from ...types import Response
14
+
15
+
16
+ def _get_kwargs(
17
+ machine_id: str,
18
+ *,
19
+ body: FileWriteRequest,
20
+ ) -> dict[str, Any]:
21
+ headers: dict[str, Any] = {}
22
+
23
+ _kwargs: dict[str, Any] = {
24
+ "method": "post",
25
+ "url": f"/v1/computer/{machine_id}/fs/write",
26
+ }
27
+
28
+ _kwargs["json"] = body.to_dict()
29
+
30
+ headers["Content-Type"] = "application/json"
31
+
32
+ _kwargs["headers"] = headers
33
+ return _kwargs
34
+
35
+
36
+ def _parse_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Optional[
39
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
40
+ ]:
41
+ if response.status_code == 200:
42
+ response_200 = FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost.from_dict(
43
+ response.json()
44
+ )
45
+
46
+ return response_200
47
+ if response.status_code == 422:
48
+ response_422 = HTTPValidationError.from_dict(response.json())
49
+
50
+ return response_422
51
+ if client.raise_on_unexpected_status:
52
+ raise errors.UnexpectedStatus(response.status_code, response.content)
53
+ else:
54
+ return None
55
+
56
+
57
+ def _build_response(
58
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
59
+ ) -> Response[
60
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
61
+ ]:
62
+ return Response(
63
+ status_code=HTTPStatus(response.status_code),
64
+ content=response.content,
65
+ headers=response.headers,
66
+ parsed=_parse_response(client=client, response=response),
67
+ )
68
+
69
+
70
+ def sync_detailed(
71
+ machine_id: str,
72
+ *,
73
+ client: AuthenticatedClient,
74
+ body: FileWriteRequest,
75
+ ) -> Response[
76
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
77
+ ]:
78
+ """Write file contents
79
+
80
+ Write file contents to the machine.
81
+
82
+ Args:
83
+ machine_id (str):
84
+ body (FileWriteRequest):
85
+
86
+ Raises:
87
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
88
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
89
+
90
+ Returns:
91
+ Response[Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]]
92
+ """
93
+
94
+ kwargs = _get_kwargs(
95
+ machine_id=machine_id,
96
+ body=body,
97
+ )
98
+
99
+ response = client.get_httpx_client().request(
100
+ **kwargs,
101
+ )
102
+
103
+ return _build_response(client=client, response=response)
104
+
105
+
106
+ def sync(
107
+ machine_id: str,
108
+ *,
109
+ client: AuthenticatedClient,
110
+ body: FileWriteRequest,
111
+ ) -> Optional[
112
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
113
+ ]:
114
+ """Write file contents
115
+
116
+ Write file contents to the machine.
117
+
118
+ Args:
119
+ machine_id (str):
120
+ body (FileWriteRequest):
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
128
+ """
129
+
130
+ return sync_detailed(
131
+ machine_id=machine_id,
132
+ client=client,
133
+ body=body,
134
+ ).parsed
135
+
136
+
137
+ async def asyncio_detailed(
138
+ machine_id: str,
139
+ *,
140
+ client: AuthenticatedClient,
141
+ body: FileWriteRequest,
142
+ ) -> Response[
143
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
144
+ ]:
145
+ """Write file contents
146
+
147
+ Write file contents to the machine.
148
+
149
+ Args:
150
+ machine_id (str):
151
+ body (FileWriteRequest):
152
+
153
+ Raises:
154
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
155
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
156
+
157
+ Returns:
158
+ Response[Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]]
159
+ """
160
+
161
+ kwargs = _get_kwargs(
162
+ machine_id=machine_id,
163
+ body=body,
164
+ )
165
+
166
+ response = await client.get_async_httpx_client().request(**kwargs)
167
+
168
+ return _build_response(client=client, response=response)
169
+
170
+
171
+ async def asyncio(
172
+ machine_id: str,
173
+ *,
174
+ client: AuthenticatedClient,
175
+ body: FileWriteRequest,
176
+ ) -> Optional[
177
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
178
+ ]:
179
+ """Write file contents
180
+
181
+ Write file contents to the machine.
182
+
183
+ Args:
184
+ machine_id (str):
185
+ body (FileWriteRequest):
186
+
187
+ Raises:
188
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
189
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
190
+
191
+ Returns:
192
+ Union[FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost, HTTPValidationError]
193
+ """
194
+
195
+ return (
196
+ await asyncio_detailed(
197
+ machine_id=machine_id,
198
+ client=client,
199
+ body=body,
200
+ )
201
+ ).parsed