cyberdesk 2.1.4__py3-none-any.whl → 2.1.6__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.
- cyberdesk/__init__.py +1 -1
- cyberdesk/client.py +73 -0
- {cyberdesk-2.1.4.dist-info → cyberdesk-2.1.6.dist-info}/METADATA +1 -1
- {cyberdesk-2.1.4.dist-info → cyberdesk-2.1.6.dist-info}/RECORD +26 -13
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_scroll_v1_computer_machine_id_input_mouse_scroll_post.py +187 -0
- openapi_client/cyberdesk_cloud_client/api/runs/create_run_chain_v1_runs_chain_post.py +192 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +22 -0
- openapi_client/cyberdesk_cloud_client/models/chain_step.py +122 -0
- openapi_client/cyberdesk_cloud_client/models/chain_step_inputs_type_0.py +74 -0
- openapi_client/cyberdesk_cloud_client/models/machine_response.py +30 -0
- openapi_client/cyberdesk_cloud_client/models/machine_update.py +32 -0
- openapi_client/cyberdesk_cloud_client/models/mouse_scroll_request.py +109 -0
- openapi_client/cyberdesk_cloud_client/models/ref_value.py +61 -0
- openapi_client/cyberdesk_cloud_client/models/run_bulk_create.py +85 -0
- openapi_client/cyberdesk_cloud_client/models/run_bulk_create_sensitive_input_values_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/run_create.py +105 -0
- openapi_client/cyberdesk_cloud_client/models/run_create_sensitive_input_values_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +83 -0
- openapi_client/cyberdesk_cloud_client/models/run_response_sensitive_input_aliases_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_create.py +305 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_create_shared_inputs_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_create_shared_sensitive_inputs_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_chain_response.py +77 -0
- {cyberdesk-2.1.4.dist-info → cyberdesk-2.1.6.dist-info}/WHEEL +0 -0
- {cyberdesk-2.1.4.dist-info → cyberdesk-2.1.6.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.1.4.dist-info → cyberdesk-2.1.6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"""Contains all the data models used in inputs/outputs"""
|
|
2
2
|
|
|
3
3
|
from .attachment_type import AttachmentType
|
|
4
|
+
from .chain_step import ChainStep
|
|
5
|
+
from .chain_step_inputs_type_0 import ChainStepInputsType0
|
|
4
6
|
from .connection_create import ConnectionCreate
|
|
5
7
|
from .connection_response import ConnectionResponse
|
|
6
8
|
from .connection_status import ConnectionStatus
|
|
@@ -41,6 +43,7 @@ from .machine_update import MachineUpdate
|
|
|
41
43
|
from .mouse_click_request import MouseClickRequest
|
|
42
44
|
from .mouse_move_request import MouseMoveRequest
|
|
43
45
|
from .mouse_position import MousePosition
|
|
46
|
+
from .mouse_scroll_request import MouseScrollRequest
|
|
44
47
|
from .paginated_response import PaginatedResponse
|
|
45
48
|
from .paginated_response_connection_response import PaginatedResponseConnectionResponse
|
|
46
49
|
from .paginated_response_machine_response import PaginatedResponseMachineResponse
|
|
@@ -61,6 +64,7 @@ from .powershell_exec_v1_computer_machine_id_shell_powershell_exec_post_response
|
|
|
61
64
|
from .powershell_session_v1_computer_machine_id_shell_powershell_session_post_response_powershell_session_v1_computer_machine_id_shell_powershell_session_post import (
|
|
62
65
|
PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponsePowershellSessionV1ComputerMachineIdShellPowershellSessionPost,
|
|
63
66
|
)
|
|
67
|
+
from .ref_value import RefValue
|
|
64
68
|
from .request_log_create import RequestLogCreate
|
|
65
69
|
from .request_log_response import RequestLogResponse
|
|
66
70
|
from .request_log_update import RequestLogUpdate
|
|
@@ -71,13 +75,16 @@ from .run_attachment_update import RunAttachmentUpdate
|
|
|
71
75
|
from .run_bulk_create import RunBulkCreate
|
|
72
76
|
from .run_bulk_create_input_values_type_0 import RunBulkCreateInputValuesType0
|
|
73
77
|
from .run_bulk_create_response import RunBulkCreateResponse
|
|
78
|
+
from .run_bulk_create_sensitive_input_values_type_0 import RunBulkCreateSensitiveInputValuesType0
|
|
74
79
|
from .run_completed_event import RunCompletedEvent
|
|
75
80
|
from .run_create import RunCreate
|
|
76
81
|
from .run_create_input_values_type_0 import RunCreateInputValuesType0
|
|
82
|
+
from .run_create_sensitive_input_values_type_0 import RunCreateSensitiveInputValuesType0
|
|
77
83
|
from .run_response import RunResponse
|
|
78
84
|
from .run_response_input_values_type_0 import RunResponseInputValuesType0
|
|
79
85
|
from .run_response_output_data_type_0 import RunResponseOutputDataType0
|
|
80
86
|
from .run_response_run_message_history_type_0_item import RunResponseRunMessageHistoryType0Item
|
|
87
|
+
from .run_response_sensitive_input_aliases_type_0 import RunResponseSensitiveInputAliasesType0
|
|
81
88
|
from .run_status import RunStatus
|
|
82
89
|
from .run_update import RunUpdate
|
|
83
90
|
from .run_update_input_values_type_0 import RunUpdateInputValuesType0
|
|
@@ -94,6 +101,10 @@ from .trajectory_response_trajectory_data_item import TrajectoryResponseTrajecto
|
|
|
94
101
|
from .trajectory_update import TrajectoryUpdate
|
|
95
102
|
from .trajectory_update_trajectory_data_type_0_item import TrajectoryUpdateTrajectoryDataType0Item
|
|
96
103
|
from .validation_error import ValidationError
|
|
104
|
+
from .workflow_chain_create import WorkflowChainCreate
|
|
105
|
+
from .workflow_chain_create_shared_inputs_type_0 import WorkflowChainCreateSharedInputsType0
|
|
106
|
+
from .workflow_chain_create_shared_sensitive_inputs_type_0 import WorkflowChainCreateSharedSensitiveInputsType0
|
|
107
|
+
from .workflow_chain_response import WorkflowChainResponse
|
|
97
108
|
from .workflow_create import WorkflowCreate
|
|
98
109
|
from .workflow_response import WorkflowResponse
|
|
99
110
|
from .workflow_response_old_versions_type_0_item import WorkflowResponseOldVersionsType0Item
|
|
@@ -101,6 +112,8 @@ from .workflow_update import WorkflowUpdate
|
|
|
101
112
|
|
|
102
113
|
__all__ = (
|
|
103
114
|
"AttachmentType",
|
|
115
|
+
"ChainStep",
|
|
116
|
+
"ChainStepInputsType0",
|
|
104
117
|
"ConnectionCreate",
|
|
105
118
|
"ConnectionResponse",
|
|
106
119
|
"ConnectionStatus",
|
|
@@ -127,6 +140,7 @@ __all__ = (
|
|
|
127
140
|
"MouseClickRequest",
|
|
128
141
|
"MouseMoveRequest",
|
|
129
142
|
"MousePosition",
|
|
143
|
+
"MouseScrollRequest",
|
|
130
144
|
"PaginatedResponse",
|
|
131
145
|
"PaginatedResponseConnectionResponse",
|
|
132
146
|
"PaginatedResponseMachineResponse",
|
|
@@ -143,6 +157,7 @@ __all__ = (
|
|
|
143
157
|
"PowershellExecV1ComputerMachineIdShellPowershellExecPostResponsePowershellExecV1ComputerMachineIdShellPowershellExecPost",
|
|
144
158
|
"PowerShellSessionRequest",
|
|
145
159
|
"PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponsePowershellSessionV1ComputerMachineIdShellPowershellSessionPost",
|
|
160
|
+
"RefValue",
|
|
146
161
|
"RequestLogCreate",
|
|
147
162
|
"RequestLogResponse",
|
|
148
163
|
"RequestLogUpdate",
|
|
@@ -153,13 +168,16 @@ __all__ = (
|
|
|
153
168
|
"RunBulkCreate",
|
|
154
169
|
"RunBulkCreateInputValuesType0",
|
|
155
170
|
"RunBulkCreateResponse",
|
|
171
|
+
"RunBulkCreateSensitiveInputValuesType0",
|
|
156
172
|
"RunCompletedEvent",
|
|
157
173
|
"RunCreate",
|
|
158
174
|
"RunCreateInputValuesType0",
|
|
175
|
+
"RunCreateSensitiveInputValuesType0",
|
|
159
176
|
"RunResponse",
|
|
160
177
|
"RunResponseInputValuesType0",
|
|
161
178
|
"RunResponseOutputDataType0",
|
|
162
179
|
"RunResponseRunMessageHistoryType0Item",
|
|
180
|
+
"RunResponseSensitiveInputAliasesType0",
|
|
163
181
|
"RunStatus",
|
|
164
182
|
"RunUpdate",
|
|
165
183
|
"RunUpdateInputValuesType0",
|
|
@@ -176,6 +194,10 @@ __all__ = (
|
|
|
176
194
|
"TrajectoryUpdate",
|
|
177
195
|
"TrajectoryUpdateTrajectoryDataType0Item",
|
|
178
196
|
"ValidationError",
|
|
197
|
+
"WorkflowChainCreate",
|
|
198
|
+
"WorkflowChainCreateSharedInputsType0",
|
|
199
|
+
"WorkflowChainCreateSharedSensitiveInputsType0",
|
|
200
|
+
"WorkflowChainResponse",
|
|
179
201
|
"WorkflowCreate",
|
|
180
202
|
"WorkflowResponse",
|
|
181
203
|
"WorkflowResponseOldVersionsType0Item",
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.chain_step_inputs_type_0 import ChainStepInputsType0
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="ChainStep")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class ChainStep:
|
|
19
|
+
"""One step within a chain
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
workflow_id (UUID):
|
|
23
|
+
session_alias (Union[None, Unset, str]): Alias to persist this step's outputs within the session
|
|
24
|
+
inputs (Union['ChainStepInputsType0', None, Unset]): Step-specific inputs; values must be string or {$ref:
|
|
25
|
+
'alias.outputs.path'}
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
workflow_id: UUID
|
|
29
|
+
session_alias: Union[None, Unset, str] = UNSET
|
|
30
|
+
inputs: Union["ChainStepInputsType0", None, Unset] = UNSET
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
from ..models.chain_step_inputs_type_0 import ChainStepInputsType0
|
|
35
|
+
|
|
36
|
+
workflow_id = str(self.workflow_id)
|
|
37
|
+
|
|
38
|
+
session_alias: Union[None, Unset, str]
|
|
39
|
+
if isinstance(self.session_alias, Unset):
|
|
40
|
+
session_alias = UNSET
|
|
41
|
+
else:
|
|
42
|
+
session_alias = self.session_alias
|
|
43
|
+
|
|
44
|
+
inputs: Union[None, Unset, dict[str, Any]]
|
|
45
|
+
if isinstance(self.inputs, Unset):
|
|
46
|
+
inputs = UNSET
|
|
47
|
+
elif isinstance(self.inputs, ChainStepInputsType0):
|
|
48
|
+
inputs = self.inputs.to_dict()
|
|
49
|
+
else:
|
|
50
|
+
inputs = self.inputs
|
|
51
|
+
|
|
52
|
+
field_dict: dict[str, Any] = {}
|
|
53
|
+
field_dict.update(self.additional_properties)
|
|
54
|
+
field_dict.update(
|
|
55
|
+
{
|
|
56
|
+
"workflow_id": workflow_id,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
if session_alias is not UNSET:
|
|
60
|
+
field_dict["session_alias"] = session_alias
|
|
61
|
+
if inputs is not UNSET:
|
|
62
|
+
field_dict["inputs"] = inputs
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
|
+
from ..models.chain_step_inputs_type_0 import ChainStepInputsType0
|
|
69
|
+
|
|
70
|
+
d = dict(src_dict)
|
|
71
|
+
workflow_id = UUID(d.pop("workflow_id"))
|
|
72
|
+
|
|
73
|
+
def _parse_session_alias(data: object) -> Union[None, Unset, str]:
|
|
74
|
+
if data is None:
|
|
75
|
+
return data
|
|
76
|
+
if isinstance(data, Unset):
|
|
77
|
+
return data
|
|
78
|
+
return cast(Union[None, Unset, str], data)
|
|
79
|
+
|
|
80
|
+
session_alias = _parse_session_alias(d.pop("session_alias", UNSET))
|
|
81
|
+
|
|
82
|
+
def _parse_inputs(data: object) -> Union["ChainStepInputsType0", None, Unset]:
|
|
83
|
+
if data is None:
|
|
84
|
+
return data
|
|
85
|
+
if isinstance(data, Unset):
|
|
86
|
+
return data
|
|
87
|
+
try:
|
|
88
|
+
if not isinstance(data, dict):
|
|
89
|
+
raise TypeError()
|
|
90
|
+
inputs_type_0 = ChainStepInputsType0.from_dict(data)
|
|
91
|
+
|
|
92
|
+
return inputs_type_0
|
|
93
|
+
except: # noqa: E722
|
|
94
|
+
pass
|
|
95
|
+
return cast(Union["ChainStepInputsType0", None, Unset], data)
|
|
96
|
+
|
|
97
|
+
inputs = _parse_inputs(d.pop("inputs", UNSET))
|
|
98
|
+
|
|
99
|
+
chain_step = cls(
|
|
100
|
+
workflow_id=workflow_id,
|
|
101
|
+
session_alias=session_alias,
|
|
102
|
+
inputs=inputs,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
chain_step.additional_properties = d
|
|
106
|
+
return chain_step
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def additional_keys(self) -> list[str]:
|
|
110
|
+
return list(self.additional_properties.keys())
|
|
111
|
+
|
|
112
|
+
def __getitem__(self, key: str) -> Any:
|
|
113
|
+
return self.additional_properties[key]
|
|
114
|
+
|
|
115
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
116
|
+
self.additional_properties[key] = value
|
|
117
|
+
|
|
118
|
+
def __delitem__(self, key: str) -> None:
|
|
119
|
+
del self.additional_properties[key]
|
|
120
|
+
|
|
121
|
+
def __contains__(self, key: str) -> bool:
|
|
122
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.ref_value import RefValue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="ChainStepInputsType0")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class ChainStepInputsType0:
|
|
16
|
+
""" """
|
|
17
|
+
|
|
18
|
+
additional_properties: dict[str, Union["RefValue", str]] = _attrs_field(init=False, factory=dict)
|
|
19
|
+
|
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
|
21
|
+
from ..models.ref_value import RefValue
|
|
22
|
+
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
for prop_name, prop in self.additional_properties.items():
|
|
25
|
+
if isinstance(prop, RefValue):
|
|
26
|
+
field_dict[prop_name] = prop.to_dict()
|
|
27
|
+
else:
|
|
28
|
+
field_dict[prop_name] = prop
|
|
29
|
+
|
|
30
|
+
return field_dict
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
34
|
+
from ..models.ref_value import RefValue
|
|
35
|
+
|
|
36
|
+
d = dict(src_dict)
|
|
37
|
+
chain_step_inputs_type_0 = cls()
|
|
38
|
+
|
|
39
|
+
additional_properties = {}
|
|
40
|
+
for prop_name, prop_dict in d.items():
|
|
41
|
+
|
|
42
|
+
def _parse_additional_property(data: object) -> Union["RefValue", str]:
|
|
43
|
+
try:
|
|
44
|
+
if not isinstance(data, dict):
|
|
45
|
+
raise TypeError()
|
|
46
|
+
additional_property_type_1 = RefValue.from_dict(data)
|
|
47
|
+
|
|
48
|
+
return additional_property_type_1
|
|
49
|
+
except: # noqa: E722
|
|
50
|
+
pass
|
|
51
|
+
return cast(Union["RefValue", str], data)
|
|
52
|
+
|
|
53
|
+
additional_property = _parse_additional_property(prop_dict)
|
|
54
|
+
|
|
55
|
+
additional_properties[prop_name] = additional_property
|
|
56
|
+
|
|
57
|
+
chain_step_inputs_type_0.additional_properties = additional_properties
|
|
58
|
+
return chain_step_inputs_type_0
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> list[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Union["RefValue", str]:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Union["RefValue", str]) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -35,6 +35,7 @@ class MachineResponse:
|
|
|
35
35
|
os_info (Union[None, Unset, str]):
|
|
36
36
|
user_id (Union[None, UUID, Unset]):
|
|
37
37
|
organization_id (Union[None, Unset, str]):
|
|
38
|
+
reserved_session_id (Union[None, UUID, Unset]):
|
|
38
39
|
pools (Union[None, Unset, list['PoolResponse']]):
|
|
39
40
|
"""
|
|
40
41
|
|
|
@@ -51,6 +52,7 @@ class MachineResponse:
|
|
|
51
52
|
os_info: Union[None, Unset, str] = UNSET
|
|
52
53
|
user_id: Union[None, UUID, Unset] = UNSET
|
|
53
54
|
organization_id: Union[None, Unset, str] = UNSET
|
|
55
|
+
reserved_session_id: Union[None, UUID, Unset] = UNSET
|
|
54
56
|
pools: Union[None, Unset, list["PoolResponse"]] = UNSET
|
|
55
57
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
56
58
|
|
|
@@ -107,6 +109,14 @@ class MachineResponse:
|
|
|
107
109
|
else:
|
|
108
110
|
organization_id = self.organization_id
|
|
109
111
|
|
|
112
|
+
reserved_session_id: Union[None, Unset, str]
|
|
113
|
+
if isinstance(self.reserved_session_id, Unset):
|
|
114
|
+
reserved_session_id = UNSET
|
|
115
|
+
elif isinstance(self.reserved_session_id, UUID):
|
|
116
|
+
reserved_session_id = str(self.reserved_session_id)
|
|
117
|
+
else:
|
|
118
|
+
reserved_session_id = self.reserved_session_id
|
|
119
|
+
|
|
110
120
|
pools: Union[None, Unset, list[dict[str, Any]]]
|
|
111
121
|
if isinstance(self.pools, Unset):
|
|
112
122
|
pools = UNSET
|
|
@@ -144,6 +154,8 @@ class MachineResponse:
|
|
|
144
154
|
field_dict["user_id"] = user_id
|
|
145
155
|
if organization_id is not UNSET:
|
|
146
156
|
field_dict["organization_id"] = organization_id
|
|
157
|
+
if reserved_session_id is not UNSET:
|
|
158
|
+
field_dict["reserved_session_id"] = reserved_session_id
|
|
147
159
|
if pools is not UNSET:
|
|
148
160
|
field_dict["pools"] = pools
|
|
149
161
|
|
|
@@ -230,6 +242,23 @@ class MachineResponse:
|
|
|
230
242
|
|
|
231
243
|
organization_id = _parse_organization_id(d.pop("organization_id", UNSET))
|
|
232
244
|
|
|
245
|
+
def _parse_reserved_session_id(data: object) -> Union[None, UUID, Unset]:
|
|
246
|
+
if data is None:
|
|
247
|
+
return data
|
|
248
|
+
if isinstance(data, Unset):
|
|
249
|
+
return data
|
|
250
|
+
try:
|
|
251
|
+
if not isinstance(data, str):
|
|
252
|
+
raise TypeError()
|
|
253
|
+
reserved_session_id_type_0 = UUID(data)
|
|
254
|
+
|
|
255
|
+
return reserved_session_id_type_0
|
|
256
|
+
except: # noqa: E722
|
|
257
|
+
pass
|
|
258
|
+
return cast(Union[None, UUID, Unset], data)
|
|
259
|
+
|
|
260
|
+
reserved_session_id = _parse_reserved_session_id(d.pop("reserved_session_id", UNSET))
|
|
261
|
+
|
|
233
262
|
def _parse_pools(data: object) -> Union[None, Unset, list["PoolResponse"]]:
|
|
234
263
|
if data is None:
|
|
235
264
|
return data
|
|
@@ -266,6 +295,7 @@ class MachineResponse:
|
|
|
266
295
|
os_info=os_info,
|
|
267
296
|
user_id=user_id,
|
|
268
297
|
organization_id=organization_id,
|
|
298
|
+
reserved_session_id=reserved_session_id,
|
|
269
299
|
pools=pools,
|
|
270
300
|
)
|
|
271
301
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
from collections.abc import Mapping
|
|
3
3
|
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
4
5
|
|
|
5
6
|
from attrs import define as _attrs_define
|
|
6
7
|
from attrs import field as _attrs_field
|
|
@@ -24,6 +25,8 @@ class MachineUpdate:
|
|
|
24
25
|
status (Union[MachineStatus, None, Unset]):
|
|
25
26
|
is_available (Union[None, Unset, bool]):
|
|
26
27
|
last_seen (Union[None, Unset, datetime.datetime]):
|
|
28
|
+
reserved_session_id (Union[None, UUID, Unset]): Set to null to clear reservation; server will cancel
|
|
29
|
+
queued/running session runs and clear
|
|
27
30
|
"""
|
|
28
31
|
|
|
29
32
|
name: Union[None, Unset, str] = UNSET
|
|
@@ -33,6 +36,7 @@ class MachineUpdate:
|
|
|
33
36
|
status: Union[MachineStatus, None, Unset] = UNSET
|
|
34
37
|
is_available: Union[None, Unset, bool] = UNSET
|
|
35
38
|
last_seen: Union[None, Unset, datetime.datetime] = UNSET
|
|
39
|
+
reserved_session_id: Union[None, UUID, Unset] = UNSET
|
|
36
40
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
41
|
|
|
38
42
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -82,6 +86,14 @@ class MachineUpdate:
|
|
|
82
86
|
else:
|
|
83
87
|
last_seen = self.last_seen
|
|
84
88
|
|
|
89
|
+
reserved_session_id: Union[None, Unset, str]
|
|
90
|
+
if isinstance(self.reserved_session_id, Unset):
|
|
91
|
+
reserved_session_id = UNSET
|
|
92
|
+
elif isinstance(self.reserved_session_id, UUID):
|
|
93
|
+
reserved_session_id = str(self.reserved_session_id)
|
|
94
|
+
else:
|
|
95
|
+
reserved_session_id = self.reserved_session_id
|
|
96
|
+
|
|
85
97
|
field_dict: dict[str, Any] = {}
|
|
86
98
|
field_dict.update(self.additional_properties)
|
|
87
99
|
field_dict.update({})
|
|
@@ -99,6 +111,8 @@ class MachineUpdate:
|
|
|
99
111
|
field_dict["is_available"] = is_available
|
|
100
112
|
if last_seen is not UNSET:
|
|
101
113
|
field_dict["last_seen"] = last_seen
|
|
114
|
+
if reserved_session_id is not UNSET:
|
|
115
|
+
field_dict["reserved_session_id"] = reserved_session_id
|
|
102
116
|
|
|
103
117
|
return field_dict
|
|
104
118
|
|
|
@@ -185,6 +199,23 @@ class MachineUpdate:
|
|
|
185
199
|
|
|
186
200
|
last_seen = _parse_last_seen(d.pop("last_seen", UNSET))
|
|
187
201
|
|
|
202
|
+
def _parse_reserved_session_id(data: object) -> Union[None, UUID, Unset]:
|
|
203
|
+
if data is None:
|
|
204
|
+
return data
|
|
205
|
+
if isinstance(data, Unset):
|
|
206
|
+
return data
|
|
207
|
+
try:
|
|
208
|
+
if not isinstance(data, str):
|
|
209
|
+
raise TypeError()
|
|
210
|
+
reserved_session_id_type_0 = UUID(data)
|
|
211
|
+
|
|
212
|
+
return reserved_session_id_type_0
|
|
213
|
+
except: # noqa: E722
|
|
214
|
+
pass
|
|
215
|
+
return cast(Union[None, UUID, Unset], data)
|
|
216
|
+
|
|
217
|
+
reserved_session_id = _parse_reserved_session_id(d.pop("reserved_session_id", UNSET))
|
|
218
|
+
|
|
188
219
|
machine_update = cls(
|
|
189
220
|
name=name,
|
|
190
221
|
version=version,
|
|
@@ -193,6 +224,7 @@ class MachineUpdate:
|
|
|
193
224
|
status=status,
|
|
194
225
|
is_available=is_available,
|
|
195
226
|
last_seen=last_seen,
|
|
227
|
+
reserved_session_id=reserved_session_id,
|
|
196
228
|
)
|
|
197
229
|
|
|
198
230
|
machine_update.additional_properties = d
|
|
@@ -0,0 +1,109 @@
|
|
|
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="MouseScrollRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class MouseScrollRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
direction (str): Scroll direction: 'up', 'down', 'left', or 'right'
|
|
17
|
+
amount (int): Number of scroll steps (clicks); non-negative integer
|
|
18
|
+
x (Union[None, Unset, int]):
|
|
19
|
+
y (Union[None, Unset, int]):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
direction: str
|
|
23
|
+
amount: int
|
|
24
|
+
x: Union[None, Unset, int] = UNSET
|
|
25
|
+
y: Union[None, Unset, int] = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
direction = self.direction
|
|
30
|
+
|
|
31
|
+
amount = self.amount
|
|
32
|
+
|
|
33
|
+
x: Union[None, Unset, int]
|
|
34
|
+
if isinstance(self.x, Unset):
|
|
35
|
+
x = UNSET
|
|
36
|
+
else:
|
|
37
|
+
x = self.x
|
|
38
|
+
|
|
39
|
+
y: Union[None, Unset, int]
|
|
40
|
+
if isinstance(self.y, Unset):
|
|
41
|
+
y = UNSET
|
|
42
|
+
else:
|
|
43
|
+
y = self.y
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"direction": direction,
|
|
50
|
+
"amount": amount,
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
if x is not UNSET:
|
|
54
|
+
field_dict["x"] = x
|
|
55
|
+
if y is not UNSET:
|
|
56
|
+
field_dict["y"] = y
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
d = dict(src_dict)
|
|
63
|
+
direction = d.pop("direction")
|
|
64
|
+
|
|
65
|
+
amount = d.pop("amount")
|
|
66
|
+
|
|
67
|
+
def _parse_x(data: object) -> Union[None, Unset, int]:
|
|
68
|
+
if data is None:
|
|
69
|
+
return data
|
|
70
|
+
if isinstance(data, Unset):
|
|
71
|
+
return data
|
|
72
|
+
return cast(Union[None, Unset, int], data)
|
|
73
|
+
|
|
74
|
+
x = _parse_x(d.pop("x", UNSET))
|
|
75
|
+
|
|
76
|
+
def _parse_y(data: object) -> Union[None, Unset, int]:
|
|
77
|
+
if data is None:
|
|
78
|
+
return data
|
|
79
|
+
if isinstance(data, Unset):
|
|
80
|
+
return data
|
|
81
|
+
return cast(Union[None, Unset, int], data)
|
|
82
|
+
|
|
83
|
+
y = _parse_y(d.pop("y", UNSET))
|
|
84
|
+
|
|
85
|
+
mouse_scroll_request = cls(
|
|
86
|
+
direction=direction,
|
|
87
|
+
amount=amount,
|
|
88
|
+
x=x,
|
|
89
|
+
y=y,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
mouse_scroll_request.additional_properties = d
|
|
93
|
+
return mouse_scroll_request
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def additional_keys(self) -> list[str]:
|
|
97
|
+
return list(self.additional_properties.keys())
|
|
98
|
+
|
|
99
|
+
def __getitem__(self, key: str) -> Any:
|
|
100
|
+
return self.additional_properties[key]
|
|
101
|
+
|
|
102
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
103
|
+
self.additional_properties[key] = value
|
|
104
|
+
|
|
105
|
+
def __delitem__(self, key: str) -> None:
|
|
106
|
+
del self.additional_properties[key]
|
|
107
|
+
|
|
108
|
+
def __contains__(self, key: str) -> bool:
|
|
109
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
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="RefValue")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class RefValue:
|
|
12
|
+
"""Reference to a prior step's output within the same session.
|
|
13
|
+
The wire shape is {"$ref": "alias.outputs.path"}.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
ref (str):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
ref: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
ref = self.ref
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"$ref": ref,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
ref = d.pop("$ref")
|
|
39
|
+
|
|
40
|
+
ref_value = cls(
|
|
41
|
+
ref=ref,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
ref_value.additional_properties = d
|
|
45
|
+
return ref_value
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|