cyberdesk 1.7.0__py3-none-any.whl → 1.9.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 (43) hide show
  1. cyberdesk/__init__.py +11 -1
  2. cyberdesk/client.py +188 -0
  3. {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/METADATA +39 -17
  4. {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/RECORD +43 -15
  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_v1_run_attachments_attachment_id_get.py +172 -0
  15. openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +240 -0
  16. openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +194 -0
  17. openapi_client/cyberdesk_cloud_client/models/__init__.py +42 -0
  18. openapi_client/cyberdesk_cloud_client/models/attachment_type.py +9 -0
  19. openapi_client/cyberdesk_cloud_client/models/file_input.py +99 -0
  20. openapi_client/cyberdesk_cloud_client/models/file_write_request.py +78 -0
  21. 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
  22. 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
  23. 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
  24. openapi_client/cyberdesk_cloud_client/models/paginated_response_run_attachment_response.py +97 -0
  25. openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +110 -0
  26. openapi_client/cyberdesk_cloud_client/models/power_shell_session_request.py +81 -0
  27. 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
  28. 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
  29. openapi_client/cyberdesk_cloud_client/models/run_attachment_create.py +157 -0
  30. openapi_client/cyberdesk_cloud_client/models/run_attachment_response.py +189 -0
  31. openapi_client/cyberdesk_cloud_client/models/run_attachment_update.py +84 -0
  32. openapi_client/cyberdesk_cloud_client/models/run_create.py +41 -0
  33. openapi_client/cyberdesk_cloud_client/models/run_response.py +26 -0
  34. openapi_client/cyberdesk_cloud_client/models/trajectory_create.py +40 -1
  35. openapi_client/cyberdesk_cloud_client/models/trajectory_create_original_input_values_type_0.py +44 -0
  36. openapi_client/cyberdesk_cloud_client/models/trajectory_response.py +40 -1
  37. openapi_client/cyberdesk_cloud_client/models/trajectory_response_original_input_values_type_0.py +44 -0
  38. openapi_client/cyberdesk_cloud_client/models/workflow_create.py +9 -0
  39. openapi_client/cyberdesk_cloud_client/models/workflow_response.py +9 -0
  40. openapi_client/cyberdesk_cloud_client/models/workflow_update.py +20 -0
  41. {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/WHEEL +0 -0
  42. {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/licenses/LICENSE +0 -0
  43. {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,194 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...models.run_attachment_response import RunAttachmentResponse
11
+ from ...models.run_attachment_update import RunAttachmentUpdate
12
+ from ...types import Response
13
+
14
+
15
+ def _get_kwargs(
16
+ attachment_id: UUID,
17
+ *,
18
+ body: RunAttachmentUpdate,
19
+ ) -> dict[str, Any]:
20
+ headers: dict[str, Any] = {}
21
+
22
+ _kwargs: dict[str, Any] = {
23
+ "method": "put",
24
+ "url": f"/v1/run-attachments/{attachment_id}",
25
+ }
26
+
27
+ _kwargs["json"] = body.to_dict()
28
+
29
+ headers["Content-Type"] = "application/json"
30
+
31
+ _kwargs["headers"] = headers
32
+ return _kwargs
33
+
34
+
35
+ def _parse_response(
36
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
37
+ ) -> Optional[Union[HTTPValidationError, RunAttachmentResponse]]:
38
+ if response.status_code == 200:
39
+ response_200 = RunAttachmentResponse.from_dict(response.json())
40
+
41
+ return response_200
42
+ if response.status_code == 422:
43
+ response_422 = HTTPValidationError.from_dict(response.json())
44
+
45
+ return response_422
46
+ if client.raise_on_unexpected_status:
47
+ raise errors.UnexpectedStatus(response.status_code, response.content)
48
+ else:
49
+ return None
50
+
51
+
52
+ def _build_response(
53
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
54
+ ) -> Response[Union[HTTPValidationError, RunAttachmentResponse]]:
55
+ return Response(
56
+ status_code=HTTPStatus(response.status_code),
57
+ content=response.content,
58
+ headers=response.headers,
59
+ parsed=_parse_response(client=client, response=response),
60
+ )
61
+
62
+
63
+ def sync_detailed(
64
+ attachment_id: UUID,
65
+ *,
66
+ client: AuthenticatedClient,
67
+ body: RunAttachmentUpdate,
68
+ ) -> Response[Union[HTTPValidationError, RunAttachmentResponse]]:
69
+ """Update Run Attachment
70
+
71
+ Update a run attachment.
72
+
73
+ Currently only supports updating the expiration date.
74
+
75
+ Args:
76
+ attachment_id (UUID):
77
+ body (RunAttachmentUpdate): Schema for updating a run attachment
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[HTTPValidationError, RunAttachmentResponse]]
85
+ """
86
+
87
+ kwargs = _get_kwargs(
88
+ attachment_id=attachment_id,
89
+ body=body,
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
+ attachment_id: UUID,
101
+ *,
102
+ client: AuthenticatedClient,
103
+ body: RunAttachmentUpdate,
104
+ ) -> Optional[Union[HTTPValidationError, RunAttachmentResponse]]:
105
+ """Update Run Attachment
106
+
107
+ Update a run attachment.
108
+
109
+ Currently only supports updating the expiration date.
110
+
111
+ Args:
112
+ attachment_id (UUID):
113
+ body (RunAttachmentUpdate): Schema for updating a run attachment
114
+
115
+ Raises:
116
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
117
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
118
+
119
+ Returns:
120
+ Union[HTTPValidationError, RunAttachmentResponse]
121
+ """
122
+
123
+ return sync_detailed(
124
+ attachment_id=attachment_id,
125
+ client=client,
126
+ body=body,
127
+ ).parsed
128
+
129
+
130
+ async def asyncio_detailed(
131
+ attachment_id: UUID,
132
+ *,
133
+ client: AuthenticatedClient,
134
+ body: RunAttachmentUpdate,
135
+ ) -> Response[Union[HTTPValidationError, RunAttachmentResponse]]:
136
+ """Update Run Attachment
137
+
138
+ Update a run attachment.
139
+
140
+ Currently only supports updating the expiration date.
141
+
142
+ Args:
143
+ attachment_id (UUID):
144
+ body (RunAttachmentUpdate): Schema for updating a run attachment
145
+
146
+ Raises:
147
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
148
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
149
+
150
+ Returns:
151
+ Response[Union[HTTPValidationError, RunAttachmentResponse]]
152
+ """
153
+
154
+ kwargs = _get_kwargs(
155
+ attachment_id=attachment_id,
156
+ body=body,
157
+ )
158
+
159
+ response = await client.get_async_httpx_client().request(**kwargs)
160
+
161
+ return _build_response(client=client, response=response)
162
+
163
+
164
+ async def asyncio(
165
+ attachment_id: UUID,
166
+ *,
167
+ client: AuthenticatedClient,
168
+ body: RunAttachmentUpdate,
169
+ ) -> Optional[Union[HTTPValidationError, RunAttachmentResponse]]:
170
+ """Update Run Attachment
171
+
172
+ Update a run attachment.
173
+
174
+ Currently only supports updating the expiration date.
175
+
176
+ Args:
177
+ attachment_id (UUID):
178
+ body (RunAttachmentUpdate): Schema for updating a run attachment
179
+
180
+ Raises:
181
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
182
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
183
+
184
+ Returns:
185
+ Union[HTTPValidationError, RunAttachmentResponse]
186
+ """
187
+
188
+ return (
189
+ await asyncio_detailed(
190
+ attachment_id=attachment_id,
191
+ client=client,
192
+ body=body,
193
+ )
194
+ ).parsed
@@ -1,5 +1,6 @@
1
1
  """Contains all the data models used in inputs/outputs"""
2
2
 
3
+ from .attachment_type import AttachmentType
3
4
  from .connection_create import ConnectionCreate
4
5
  from .connection_response import ConnectionResponse
5
6
  from .connection_status import ConnectionStatus
@@ -10,6 +11,17 @@ from .display_dimensions import DisplayDimensions
10
11
  from .dummy_test_endpoint_v1_test_post_response_dummy_test_endpoint_v1_test_post import (
11
12
  DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost,
12
13
  )
14
+ from .file_input import FileInput
15
+ from .file_write_request import FileWriteRequest
16
+ from .fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get import (
17
+ FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet,
18
+ )
19
+ from .fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get import (
20
+ FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet,
21
+ )
22
+ from .fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post import (
23
+ FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost,
24
+ )
13
25
  from .get_workflow_versions_v1_workflows_workflow_id_versions_get_response_200_item import (
14
26
  GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item,
15
27
  )
@@ -29,12 +41,24 @@ from .mouse_position import MousePosition
29
41
  from .paginated_response import PaginatedResponse
30
42
  from .paginated_response_connection_response import PaginatedResponseConnectionResponse
31
43
  from .paginated_response_machine_response import PaginatedResponseMachineResponse
44
+ from .paginated_response_run_attachment_response import PaginatedResponseRunAttachmentResponse
32
45
  from .paginated_response_run_response import PaginatedResponseRunResponse
33
46
  from .paginated_response_trajectory_response import PaginatedResponseTrajectoryResponse
34
47
  from .paginated_response_workflow_response import PaginatedResponseWorkflowResponse
48
+ from .power_shell_exec_request import PowerShellExecRequest
49
+ from .power_shell_session_request import PowerShellSessionRequest
50
+ from .powershell_exec_v1_computer_machine_id_shell_powershell_exec_post_response_powershell_exec_v1_computer_machine_id_shell_powershell_exec_post import (
51
+ PowershellExecV1ComputerMachineIdShellPowershellExecPostResponsePowershellExecV1ComputerMachineIdShellPowershellExecPost,
52
+ )
53
+ from .powershell_session_v1_computer_machine_id_shell_powershell_session_post_response_powershell_session_v1_computer_machine_id_shell_powershell_session_post import (
54
+ PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponsePowershellSessionV1ComputerMachineIdShellPowershellSessionPost,
55
+ )
35
56
  from .request_log_create import RequestLogCreate
36
57
  from .request_log_response import RequestLogResponse
37
58
  from .request_log_update import RequestLogUpdate
59
+ from .run_attachment_create import RunAttachmentCreate
60
+ from .run_attachment_response import RunAttachmentResponse
61
+ from .run_attachment_update import RunAttachmentUpdate
38
62
  from .run_create import RunCreate
39
63
  from .run_create_input_values_type_0 import RunCreateInputValuesType0
40
64
  from .run_response import RunResponse
@@ -48,9 +72,11 @@ from .run_update_output_data_type_0 import RunUpdateOutputDataType0
48
72
  from .run_update_run_message_history_type_0_item import RunUpdateRunMessageHistoryType0Item
49
73
  from .trajectory_create import TrajectoryCreate
50
74
  from .trajectory_create_dimensions import TrajectoryCreateDimensions
75
+ from .trajectory_create_original_input_values_type_0 import TrajectoryCreateOriginalInputValuesType0
51
76
  from .trajectory_create_trajectory_data_item import TrajectoryCreateTrajectoryDataItem
52
77
  from .trajectory_response import TrajectoryResponse
53
78
  from .trajectory_response_dimensions import TrajectoryResponseDimensions
79
+ from .trajectory_response_original_input_values_type_0 import TrajectoryResponseOriginalInputValuesType0
54
80
  from .trajectory_response_trajectory_data_item import TrajectoryResponseTrajectoryDataItem
55
81
  from .trajectory_update import TrajectoryUpdate
56
82
  from .trajectory_update_trajectory_data_type_0_item import TrajectoryUpdateTrajectoryDataType0Item
@@ -61,12 +87,18 @@ from .workflow_response_old_versions_type_0_item import WorkflowResponseOldVersi
61
87
  from .workflow_update import WorkflowUpdate
62
88
 
63
89
  __all__ = (
90
+ "AttachmentType",
64
91
  "ConnectionCreate",
65
92
  "ConnectionResponse",
66
93
  "ConnectionStatus",
67
94
  "DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet",
68
95
  "DisplayDimensions",
69
96
  "DummyTestEndpointV1TestPostResponseDummyTestEndpointV1TestPost",
97
+ "FileInput",
98
+ "FileWriteRequest",
99
+ "FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet",
100
+ "FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet",
101
+ "FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost",
70
102
  "GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetResponse200Item",
71
103
  "HealthCheckV1HealthGetResponseHealthCheckV1HealthGet",
72
104
  "HTTPValidationError",
@@ -82,12 +114,20 @@ __all__ = (
82
114
  "PaginatedResponse",
83
115
  "PaginatedResponseConnectionResponse",
84
116
  "PaginatedResponseMachineResponse",
117
+ "PaginatedResponseRunAttachmentResponse",
85
118
  "PaginatedResponseRunResponse",
86
119
  "PaginatedResponseTrajectoryResponse",
87
120
  "PaginatedResponseWorkflowResponse",
121
+ "PowerShellExecRequest",
122
+ "PowershellExecV1ComputerMachineIdShellPowershellExecPostResponsePowershellExecV1ComputerMachineIdShellPowershellExecPost",
123
+ "PowerShellSessionRequest",
124
+ "PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponsePowershellSessionV1ComputerMachineIdShellPowershellSessionPost",
88
125
  "RequestLogCreate",
89
126
  "RequestLogResponse",
90
127
  "RequestLogUpdate",
128
+ "RunAttachmentCreate",
129
+ "RunAttachmentResponse",
130
+ "RunAttachmentUpdate",
91
131
  "RunCreate",
92
132
  "RunCreateInputValuesType0",
93
133
  "RunResponse",
@@ -101,9 +141,11 @@ __all__ = (
101
141
  "RunUpdateRunMessageHistoryType0Item",
102
142
  "TrajectoryCreate",
103
143
  "TrajectoryCreateDimensions",
144
+ "TrajectoryCreateOriginalInputValuesType0",
104
145
  "TrajectoryCreateTrajectoryDataItem",
105
146
  "TrajectoryResponse",
106
147
  "TrajectoryResponseDimensions",
148
+ "TrajectoryResponseOriginalInputValuesType0",
107
149
  "TrajectoryResponseTrajectoryDataItem",
108
150
  "TrajectoryUpdate",
109
151
  "TrajectoryUpdateTrajectoryDataType0Item",
@@ -0,0 +1,9 @@
1
+ from enum import Enum
2
+
3
+
4
+ class AttachmentType(str, Enum):
5
+ INPUT = "input"
6
+ OUTPUT = "output"
7
+
8
+ def __str__(self) -> str:
9
+ return str(self.value)
@@ -0,0 +1,99 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="FileInput")
10
+
11
+
12
+ @_attrs_define
13
+ class FileInput:
14
+ """File input for run creation
15
+
16
+ Attributes:
17
+ filename (str):
18
+ content (str): Base64 encoded file content
19
+ target_path (Union[None, Unset, str]): Optional path on machine, defaults to ~/CyberdeskTransfers/
20
+ cleanup_imports_after_run (Union[Unset, bool]): Delete from machine after run completes Default: False.
21
+ """
22
+
23
+ filename: str
24
+ content: str
25
+ target_path: Union[None, Unset, str] = UNSET
26
+ cleanup_imports_after_run: Union[Unset, bool] = False
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ filename = self.filename
31
+
32
+ content = self.content
33
+
34
+ target_path: Union[None, Unset, str]
35
+ if isinstance(self.target_path, Unset):
36
+ target_path = UNSET
37
+ else:
38
+ target_path = self.target_path
39
+
40
+ cleanup_imports_after_run = self.cleanup_imports_after_run
41
+
42
+ field_dict: dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update(
45
+ {
46
+ "filename": filename,
47
+ "content": content,
48
+ }
49
+ )
50
+ if target_path is not UNSET:
51
+ field_dict["target_path"] = target_path
52
+ if cleanup_imports_after_run is not UNSET:
53
+ field_dict["cleanup_imports_after_run"] = cleanup_imports_after_run
54
+
55
+ return field_dict
56
+
57
+ @classmethod
58
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
59
+ d = dict(src_dict)
60
+ filename = d.pop("filename")
61
+
62
+ content = d.pop("content")
63
+
64
+ def _parse_target_path(data: object) -> Union[None, Unset, str]:
65
+ if data is None:
66
+ return data
67
+ if isinstance(data, Unset):
68
+ return data
69
+ return cast(Union[None, Unset, str], data)
70
+
71
+ target_path = _parse_target_path(d.pop("target_path", UNSET))
72
+
73
+ cleanup_imports_after_run = d.pop("cleanup_imports_after_run", UNSET)
74
+
75
+ file_input = cls(
76
+ filename=filename,
77
+ content=content,
78
+ target_path=target_path,
79
+ cleanup_imports_after_run=cleanup_imports_after_run,
80
+ )
81
+
82
+ file_input.additional_properties = d
83
+ return file_input
84
+
85
+ @property
86
+ def additional_keys(self) -> list[str]:
87
+ return list(self.additional_properties.keys())
88
+
89
+ def __getitem__(self, key: str) -> Any:
90
+ return self.additional_properties[key]
91
+
92
+ def __setitem__(self, key: str, value: Any) -> None:
93
+ self.additional_properties[key] = value
94
+
95
+ def __delitem__(self, key: str) -> None:
96
+ del self.additional_properties[key]
97
+
98
+ def __contains__(self, key: str) -> bool:
99
+ return key in self.additional_properties
@@ -0,0 +1,78 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="FileWriteRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class FileWriteRequest:
14
+ """
15
+ Attributes:
16
+ path (str): Target file path
17
+ content (str): Base64 encoded file content
18
+ mode (Union[Unset, str]): Write mode - 'write' or 'append' Default: 'write'.
19
+ """
20
+
21
+ path: str
22
+ content: str
23
+ mode: Union[Unset, str] = "write"
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ path = self.path
28
+
29
+ content = self.content
30
+
31
+ mode = self.mode
32
+
33
+ field_dict: dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update(
36
+ {
37
+ "path": path,
38
+ "content": content,
39
+ }
40
+ )
41
+ if mode is not UNSET:
42
+ field_dict["mode"] = mode
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
48
+ d = dict(src_dict)
49
+ path = d.pop("path")
50
+
51
+ content = d.pop("content")
52
+
53
+ mode = d.pop("mode", UNSET)
54
+
55
+ file_write_request = cls(
56
+ path=path,
57
+ content=content,
58
+ mode=mode,
59
+ )
60
+
61
+ file_write_request.additional_properties = d
62
+ return file_write_request
63
+
64
+ @property
65
+ def additional_keys(self) -> list[str]:
66
+ return list(self.additional_properties.keys())
67
+
68
+ def __getitem__(self, key: str) -> Any:
69
+ return self.additional_properties[key]
70
+
71
+ def __setitem__(self, key: str, value: Any) -> None:
72
+ self.additional_properties[key] = value
73
+
74
+ def __delitem__(self, key: str) -> None:
75
+ del self.additional_properties[key]
76
+
77
+ def __contains__(self, key: str) -> bool:
78
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet")
8
+
9
+
10
+ @_attrs_define
11
+ class FsListV1ComputerMachineIdFsListGetResponseFsListV1ComputerMachineIdFsListGet:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get = cls()
26
+
27
+ fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get.additional_properties = d
28
+ return fs_list_v1_computer_machine_id_fs_list_get_response_fs_list_v1_computer_machine_id_fs_list_get
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet")
8
+
9
+
10
+ @_attrs_define
11
+ class FsReadV1ComputerMachineIdFsReadGetResponseFsReadV1ComputerMachineIdFsReadGet:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get = cls()
26
+
27
+ fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get.additional_properties = d
28
+ return fs_read_v1_computer_machine_id_fs_read_get_response_fs_read_v1_computer_machine_id_fs_read_get
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost")
8
+
9
+
10
+ @_attrs_define
11
+ class FsWriteV1ComputerMachineIdFsWritePostResponseFsWriteV1ComputerMachineIdFsWritePost:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post = cls()
26
+
27
+ fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post.additional_properties = d
28
+ return fs_write_v1_computer_machine_id_fs_write_post_response_fs_write_v1_computer_machine_id_fs_write_post
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties