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.
- cyberdesk/__init__.py +11 -1
- cyberdesk/client.py +188 -0
- {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/METADATA +39 -17
- {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/RECORD +43 -15
- openapi_client/cyberdesk_cloud_client/api/computer/fs_list_v1_computer_machine_id_fs_list_get.py +188 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_read_v1_computer_machine_id_fs_read_get.py +188 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_write_v1_computer_machine_id_fs_write_post.py +201 -0
- openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +219 -0
- openapi_client/cyberdesk_cloud_client/api/computer/powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +219 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/__init__.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/create_run_attachment_v1_run_attachments_post.py +184 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/delete_run_attachment_v1_run_attachments_attachment_id_delete.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/download_run_attachment_v1_run_attachments_attachment_id_download_get.py +170 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_v1_run_attachments_attachment_id_get.py +172 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +240 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +194 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +42 -0
- openapi_client/cyberdesk_cloud_client/models/attachment_type.py +9 -0
- openapi_client/cyberdesk_cloud_client/models/file_input.py +99 -0
- openapi_client/cyberdesk_cloud_client/models/file_write_request.py +78 -0
- 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
- 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
- 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
- openapi_client/cyberdesk_cloud_client/models/paginated_response_run_attachment_response.py +97 -0
- openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +110 -0
- openapi_client/cyberdesk_cloud_client/models/power_shell_session_request.py +81 -0
- 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
- 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
- openapi_client/cyberdesk_cloud_client/models/run_attachment_create.py +157 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_response.py +189 -0
- openapi_client/cyberdesk_cloud_client/models/run_attachment_update.py +84 -0
- openapi_client/cyberdesk_cloud_client/models/run_create.py +41 -0
- openapi_client/cyberdesk_cloud_client/models/run_response.py +26 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_create.py +40 -1
- openapi_client/cyberdesk_cloud_client/models/trajectory_create_original_input_values_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/trajectory_response.py +40 -1
- openapi_client/cyberdesk_cloud_client/models/trajectory_response_original_input_values_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_create.py +9 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_response.py +9 -0
- openapi_client/cyberdesk_cloud_client/models/workflow_update.py +20 -0
- {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/WHEEL +0 -0
- {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-1.7.0.dist-info → cyberdesk-1.9.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..models.attachment_type import AttachmentType
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="RunAttachmentResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class RunAttachmentResponse:
|
|
18
|
+
"""Run attachment response schema
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
filename (str):
|
|
22
|
+
content_type (str):
|
|
23
|
+
attachment_type (AttachmentType):
|
|
24
|
+
id (UUID):
|
|
25
|
+
user_id (UUID):
|
|
26
|
+
run_id (UUID):
|
|
27
|
+
size_bytes (int):
|
|
28
|
+
storage_path (str):
|
|
29
|
+
created_at (datetime.datetime):
|
|
30
|
+
target_path (Union[None, Unset, str]):
|
|
31
|
+
cleanup_imports_after_run (Union[Unset, bool]): Default: False.
|
|
32
|
+
expires_at (Union[None, Unset, datetime.datetime]):
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
filename: str
|
|
36
|
+
content_type: str
|
|
37
|
+
attachment_type: AttachmentType
|
|
38
|
+
id: UUID
|
|
39
|
+
user_id: UUID
|
|
40
|
+
run_id: UUID
|
|
41
|
+
size_bytes: int
|
|
42
|
+
storage_path: str
|
|
43
|
+
created_at: datetime.datetime
|
|
44
|
+
target_path: Union[None, Unset, str] = UNSET
|
|
45
|
+
cleanup_imports_after_run: Union[Unset, bool] = False
|
|
46
|
+
expires_at: Union[None, Unset, datetime.datetime] = UNSET
|
|
47
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
48
|
+
|
|
49
|
+
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
filename = self.filename
|
|
51
|
+
|
|
52
|
+
content_type = self.content_type
|
|
53
|
+
|
|
54
|
+
attachment_type = self.attachment_type.value
|
|
55
|
+
|
|
56
|
+
id = str(self.id)
|
|
57
|
+
|
|
58
|
+
user_id = str(self.user_id)
|
|
59
|
+
|
|
60
|
+
run_id = str(self.run_id)
|
|
61
|
+
|
|
62
|
+
size_bytes = self.size_bytes
|
|
63
|
+
|
|
64
|
+
storage_path = self.storage_path
|
|
65
|
+
|
|
66
|
+
created_at = self.created_at.isoformat()
|
|
67
|
+
|
|
68
|
+
target_path: Union[None, Unset, str]
|
|
69
|
+
if isinstance(self.target_path, Unset):
|
|
70
|
+
target_path = UNSET
|
|
71
|
+
else:
|
|
72
|
+
target_path = self.target_path
|
|
73
|
+
|
|
74
|
+
cleanup_imports_after_run = self.cleanup_imports_after_run
|
|
75
|
+
|
|
76
|
+
expires_at: Union[None, Unset, str]
|
|
77
|
+
if isinstance(self.expires_at, Unset):
|
|
78
|
+
expires_at = UNSET
|
|
79
|
+
elif isinstance(self.expires_at, datetime.datetime):
|
|
80
|
+
expires_at = self.expires_at.isoformat()
|
|
81
|
+
else:
|
|
82
|
+
expires_at = self.expires_at
|
|
83
|
+
|
|
84
|
+
field_dict: dict[str, Any] = {}
|
|
85
|
+
field_dict.update(self.additional_properties)
|
|
86
|
+
field_dict.update(
|
|
87
|
+
{
|
|
88
|
+
"filename": filename,
|
|
89
|
+
"content_type": content_type,
|
|
90
|
+
"attachment_type": attachment_type,
|
|
91
|
+
"id": id,
|
|
92
|
+
"user_id": user_id,
|
|
93
|
+
"run_id": run_id,
|
|
94
|
+
"size_bytes": size_bytes,
|
|
95
|
+
"storage_path": storage_path,
|
|
96
|
+
"created_at": created_at,
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
if target_path is not UNSET:
|
|
100
|
+
field_dict["target_path"] = target_path
|
|
101
|
+
if cleanup_imports_after_run is not UNSET:
|
|
102
|
+
field_dict["cleanup_imports_after_run"] = cleanup_imports_after_run
|
|
103
|
+
if expires_at is not UNSET:
|
|
104
|
+
field_dict["expires_at"] = expires_at
|
|
105
|
+
|
|
106
|
+
return field_dict
|
|
107
|
+
|
|
108
|
+
@classmethod
|
|
109
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
110
|
+
d = dict(src_dict)
|
|
111
|
+
filename = d.pop("filename")
|
|
112
|
+
|
|
113
|
+
content_type = d.pop("content_type")
|
|
114
|
+
|
|
115
|
+
attachment_type = AttachmentType(d.pop("attachment_type"))
|
|
116
|
+
|
|
117
|
+
id = UUID(d.pop("id"))
|
|
118
|
+
|
|
119
|
+
user_id = UUID(d.pop("user_id"))
|
|
120
|
+
|
|
121
|
+
run_id = UUID(d.pop("run_id"))
|
|
122
|
+
|
|
123
|
+
size_bytes = d.pop("size_bytes")
|
|
124
|
+
|
|
125
|
+
storage_path = d.pop("storage_path")
|
|
126
|
+
|
|
127
|
+
created_at = isoparse(d.pop("created_at"))
|
|
128
|
+
|
|
129
|
+
def _parse_target_path(data: object) -> Union[None, Unset, str]:
|
|
130
|
+
if data is None:
|
|
131
|
+
return data
|
|
132
|
+
if isinstance(data, Unset):
|
|
133
|
+
return data
|
|
134
|
+
return cast(Union[None, Unset, str], data)
|
|
135
|
+
|
|
136
|
+
target_path = _parse_target_path(d.pop("target_path", UNSET))
|
|
137
|
+
|
|
138
|
+
cleanup_imports_after_run = d.pop("cleanup_imports_after_run", UNSET)
|
|
139
|
+
|
|
140
|
+
def _parse_expires_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
141
|
+
if data is None:
|
|
142
|
+
return data
|
|
143
|
+
if isinstance(data, Unset):
|
|
144
|
+
return data
|
|
145
|
+
try:
|
|
146
|
+
if not isinstance(data, str):
|
|
147
|
+
raise TypeError()
|
|
148
|
+
expires_at_type_0 = isoparse(data)
|
|
149
|
+
|
|
150
|
+
return expires_at_type_0
|
|
151
|
+
except: # noqa: E722
|
|
152
|
+
pass
|
|
153
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
154
|
+
|
|
155
|
+
expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
|
|
156
|
+
|
|
157
|
+
run_attachment_response = cls(
|
|
158
|
+
filename=filename,
|
|
159
|
+
content_type=content_type,
|
|
160
|
+
attachment_type=attachment_type,
|
|
161
|
+
id=id,
|
|
162
|
+
user_id=user_id,
|
|
163
|
+
run_id=run_id,
|
|
164
|
+
size_bytes=size_bytes,
|
|
165
|
+
storage_path=storage_path,
|
|
166
|
+
created_at=created_at,
|
|
167
|
+
target_path=target_path,
|
|
168
|
+
cleanup_imports_after_run=cleanup_imports_after_run,
|
|
169
|
+
expires_at=expires_at,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
run_attachment_response.additional_properties = d
|
|
173
|
+
return run_attachment_response
|
|
174
|
+
|
|
175
|
+
@property
|
|
176
|
+
def additional_keys(self) -> list[str]:
|
|
177
|
+
return list(self.additional_properties.keys())
|
|
178
|
+
|
|
179
|
+
def __getitem__(self, key: str) -> Any:
|
|
180
|
+
return self.additional_properties[key]
|
|
181
|
+
|
|
182
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
183
|
+
self.additional_properties[key] = value
|
|
184
|
+
|
|
185
|
+
def __delitem__(self, key: str) -> None:
|
|
186
|
+
del self.additional_properties[key]
|
|
187
|
+
|
|
188
|
+
def __contains__(self, key: str) -> bool:
|
|
189
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
from dateutil.parser import isoparse
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="RunAttachmentUpdate")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class RunAttachmentUpdate:
|
|
16
|
+
"""Schema for updating a run attachment
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
expires_at (Union[None, Unset, datetime.datetime]):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
expires_at: Union[None, Unset, datetime.datetime] = UNSET
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
expires_at: Union[None, Unset, str]
|
|
27
|
+
if isinstance(self.expires_at, Unset):
|
|
28
|
+
expires_at = UNSET
|
|
29
|
+
elif isinstance(self.expires_at, datetime.datetime):
|
|
30
|
+
expires_at = self.expires_at.isoformat()
|
|
31
|
+
else:
|
|
32
|
+
expires_at = self.expires_at
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update({})
|
|
37
|
+
if expires_at is not UNSET:
|
|
38
|
+
field_dict["expires_at"] = expires_at
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
d = dict(src_dict)
|
|
45
|
+
|
|
46
|
+
def _parse_expires_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
47
|
+
if data is None:
|
|
48
|
+
return data
|
|
49
|
+
if isinstance(data, Unset):
|
|
50
|
+
return data
|
|
51
|
+
try:
|
|
52
|
+
if not isinstance(data, str):
|
|
53
|
+
raise TypeError()
|
|
54
|
+
expires_at_type_0 = isoparse(data)
|
|
55
|
+
|
|
56
|
+
return expires_at_type_0
|
|
57
|
+
except: # noqa: E722
|
|
58
|
+
pass
|
|
59
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
60
|
+
|
|
61
|
+
expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
|
|
62
|
+
|
|
63
|
+
run_attachment_update = cls(
|
|
64
|
+
expires_at=expires_at,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
run_attachment_update.additional_properties = d
|
|
68
|
+
return run_attachment_update
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def additional_keys(self) -> list[str]:
|
|
72
|
+
return list(self.additional_properties.keys())
|
|
73
|
+
|
|
74
|
+
def __getitem__(self, key: str) -> Any:
|
|
75
|
+
return self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
78
|
+
self.additional_properties[key] = value
|
|
79
|
+
|
|
80
|
+
def __delitem__(self, key: str) -> None:
|
|
81
|
+
del self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __contains__(self, key: str) -> bool:
|
|
84
|
+
return key in self.additional_properties
|
|
@@ -8,6 +8,7 @@ from attrs import field as _attrs_field
|
|
|
8
8
|
from ..types import UNSET, Unset
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
|
+
from ..models.file_input import FileInput
|
|
11
12
|
from ..models.run_create_input_values_type_0 import RunCreateInputValuesType0
|
|
12
13
|
|
|
13
14
|
|
|
@@ -23,11 +24,13 @@ class RunCreate:
|
|
|
23
24
|
machine_id (Union[None, UUID, Unset]): Machine ID. If not provided, an available machine will be automatically
|
|
24
25
|
selected.
|
|
25
26
|
input_values (Union['RunCreateInputValuesType0', None, Unset]): Input values for workflow variables
|
|
27
|
+
file_inputs (Union[None, Unset, list['FileInput']]): Files to upload to the machine
|
|
26
28
|
"""
|
|
27
29
|
|
|
28
30
|
workflow_id: UUID
|
|
29
31
|
machine_id: Union[None, UUID, Unset] = UNSET
|
|
30
32
|
input_values: Union["RunCreateInputValuesType0", None, Unset] = UNSET
|
|
33
|
+
file_inputs: Union[None, Unset, list["FileInput"]] = UNSET
|
|
31
34
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
35
|
|
|
33
36
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -51,6 +54,18 @@ class RunCreate:
|
|
|
51
54
|
else:
|
|
52
55
|
input_values = self.input_values
|
|
53
56
|
|
|
57
|
+
file_inputs: Union[None, Unset, list[dict[str, Any]]]
|
|
58
|
+
if isinstance(self.file_inputs, Unset):
|
|
59
|
+
file_inputs = UNSET
|
|
60
|
+
elif isinstance(self.file_inputs, list):
|
|
61
|
+
file_inputs = []
|
|
62
|
+
for file_inputs_type_0_item_data in self.file_inputs:
|
|
63
|
+
file_inputs_type_0_item = file_inputs_type_0_item_data.to_dict()
|
|
64
|
+
file_inputs.append(file_inputs_type_0_item)
|
|
65
|
+
|
|
66
|
+
else:
|
|
67
|
+
file_inputs = self.file_inputs
|
|
68
|
+
|
|
54
69
|
field_dict: dict[str, Any] = {}
|
|
55
70
|
field_dict.update(self.additional_properties)
|
|
56
71
|
field_dict.update(
|
|
@@ -62,11 +77,14 @@ class RunCreate:
|
|
|
62
77
|
field_dict["machine_id"] = machine_id
|
|
63
78
|
if input_values is not UNSET:
|
|
64
79
|
field_dict["input_values"] = input_values
|
|
80
|
+
if file_inputs is not UNSET:
|
|
81
|
+
field_dict["file_inputs"] = file_inputs
|
|
65
82
|
|
|
66
83
|
return field_dict
|
|
67
84
|
|
|
68
85
|
@classmethod
|
|
69
86
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
87
|
+
from ..models.file_input import FileInput
|
|
70
88
|
from ..models.run_create_input_values_type_0 import RunCreateInputValuesType0
|
|
71
89
|
|
|
72
90
|
d = dict(src_dict)
|
|
@@ -106,10 +124,33 @@ class RunCreate:
|
|
|
106
124
|
|
|
107
125
|
input_values = _parse_input_values(d.pop("input_values", UNSET))
|
|
108
126
|
|
|
127
|
+
def _parse_file_inputs(data: object) -> Union[None, Unset, list["FileInput"]]:
|
|
128
|
+
if data is None:
|
|
129
|
+
return data
|
|
130
|
+
if isinstance(data, Unset):
|
|
131
|
+
return data
|
|
132
|
+
try:
|
|
133
|
+
if not isinstance(data, list):
|
|
134
|
+
raise TypeError()
|
|
135
|
+
file_inputs_type_0 = []
|
|
136
|
+
_file_inputs_type_0 = data
|
|
137
|
+
for file_inputs_type_0_item_data in _file_inputs_type_0:
|
|
138
|
+
file_inputs_type_0_item = FileInput.from_dict(file_inputs_type_0_item_data)
|
|
139
|
+
|
|
140
|
+
file_inputs_type_0.append(file_inputs_type_0_item)
|
|
141
|
+
|
|
142
|
+
return file_inputs_type_0
|
|
143
|
+
except: # noqa: E722
|
|
144
|
+
pass
|
|
145
|
+
return cast(Union[None, Unset, list["FileInput"]], data)
|
|
146
|
+
|
|
147
|
+
file_inputs = _parse_file_inputs(d.pop("file_inputs", UNSET))
|
|
148
|
+
|
|
109
149
|
run_create = cls(
|
|
110
150
|
workflow_id=workflow_id,
|
|
111
151
|
machine_id=machine_id,
|
|
112
152
|
input_values=input_values,
|
|
153
|
+
file_inputs=file_inputs,
|
|
113
154
|
)
|
|
114
155
|
|
|
115
156
|
run_create.additional_properties = d
|
|
@@ -30,6 +30,7 @@ class RunResponse:
|
|
|
30
30
|
status (RunStatus):
|
|
31
31
|
error (Union[None, list[str]]):
|
|
32
32
|
output_data (Union['RunResponseOutputDataType0', None]):
|
|
33
|
+
input_attachment_ids (Union[None, list[str]]):
|
|
33
34
|
output_attachment_ids (Union[None, list[str]]):
|
|
34
35
|
run_message_history (Union[None, list['RunResponseRunMessageHistoryType0Item']]):
|
|
35
36
|
input_values (Union['RunResponseInputValuesType0', None]):
|
|
@@ -43,6 +44,7 @@ class RunResponse:
|
|
|
43
44
|
status: RunStatus
|
|
44
45
|
error: Union[None, list[str]]
|
|
45
46
|
output_data: Union["RunResponseOutputDataType0", None]
|
|
47
|
+
input_attachment_ids: Union[None, list[str]]
|
|
46
48
|
output_attachment_ids: Union[None, list[str]]
|
|
47
49
|
run_message_history: Union[None, list["RunResponseRunMessageHistoryType0Item"]]
|
|
48
50
|
input_values: Union["RunResponseInputValuesType0", None]
|
|
@@ -80,6 +82,13 @@ class RunResponse:
|
|
|
80
82
|
else:
|
|
81
83
|
output_data = self.output_data
|
|
82
84
|
|
|
85
|
+
input_attachment_ids: Union[None, list[str]]
|
|
86
|
+
if isinstance(self.input_attachment_ids, list):
|
|
87
|
+
input_attachment_ids = self.input_attachment_ids
|
|
88
|
+
|
|
89
|
+
else:
|
|
90
|
+
input_attachment_ids = self.input_attachment_ids
|
|
91
|
+
|
|
83
92
|
output_attachment_ids: Union[None, list[str]]
|
|
84
93
|
if isinstance(self.output_attachment_ids, list):
|
|
85
94
|
output_attachment_ids = self.output_attachment_ids
|
|
@@ -116,6 +125,7 @@ class RunResponse:
|
|
|
116
125
|
"status": status,
|
|
117
126
|
"error": error,
|
|
118
127
|
"output_data": output_data,
|
|
128
|
+
"input_attachment_ids": input_attachment_ids,
|
|
119
129
|
"output_attachment_ids": output_attachment_ids,
|
|
120
130
|
"run_message_history": run_message_history,
|
|
121
131
|
"input_values": input_values,
|
|
@@ -185,6 +195,21 @@ class RunResponse:
|
|
|
185
195
|
|
|
186
196
|
output_data = _parse_output_data(d.pop("output_data"))
|
|
187
197
|
|
|
198
|
+
def _parse_input_attachment_ids(data: object) -> Union[None, list[str]]:
|
|
199
|
+
if data is None:
|
|
200
|
+
return data
|
|
201
|
+
try:
|
|
202
|
+
if not isinstance(data, list):
|
|
203
|
+
raise TypeError()
|
|
204
|
+
input_attachment_ids_type_0 = cast(list[str], data)
|
|
205
|
+
|
|
206
|
+
return input_attachment_ids_type_0
|
|
207
|
+
except: # noqa: E722
|
|
208
|
+
pass
|
|
209
|
+
return cast(Union[None, list[str]], data)
|
|
210
|
+
|
|
211
|
+
input_attachment_ids = _parse_input_attachment_ids(d.pop("input_attachment_ids"))
|
|
212
|
+
|
|
188
213
|
def _parse_output_attachment_ids(data: object) -> Union[None, list[str]]:
|
|
189
214
|
if data is None:
|
|
190
215
|
return data
|
|
@@ -247,6 +272,7 @@ class RunResponse:
|
|
|
247
272
|
status=status,
|
|
248
273
|
error=error,
|
|
249
274
|
output_data=output_data,
|
|
275
|
+
input_attachment_ids=input_attachment_ids,
|
|
250
276
|
output_attachment_ids=output_attachment_ids,
|
|
251
277
|
run_message_history=run_message_history,
|
|
252
278
|
input_values=input_values,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
|
|
5
5
|
from attrs import define as _attrs_define
|
|
6
6
|
from attrs import field as _attrs_field
|
|
7
7
|
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
8
10
|
if TYPE_CHECKING:
|
|
9
11
|
from ..models.trajectory_create_dimensions import TrajectoryCreateDimensions
|
|
12
|
+
from ..models.trajectory_create_original_input_values_type_0 import TrajectoryCreateOriginalInputValuesType0
|
|
10
13
|
from ..models.trajectory_create_trajectory_data_item import TrajectoryCreateTrajectoryDataItem
|
|
11
14
|
|
|
12
15
|
|
|
@@ -21,14 +24,19 @@ class TrajectoryCreate:
|
|
|
21
24
|
workflow_id (UUID):
|
|
22
25
|
trajectory_data (list['TrajectoryCreateTrajectoryDataItem']):
|
|
23
26
|
dimensions (TrajectoryCreateDimensions): Display dimensions when trajectory was recorded
|
|
27
|
+
original_input_values (Union['TrajectoryCreateOriginalInputValuesType0', None, Unset]): Original input values
|
|
28
|
+
used when trajectory was created
|
|
24
29
|
"""
|
|
25
30
|
|
|
26
31
|
workflow_id: UUID
|
|
27
32
|
trajectory_data: list["TrajectoryCreateTrajectoryDataItem"]
|
|
28
33
|
dimensions: "TrajectoryCreateDimensions"
|
|
34
|
+
original_input_values: Union["TrajectoryCreateOriginalInputValuesType0", None, Unset] = UNSET
|
|
29
35
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
36
|
|
|
31
37
|
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
from ..models.trajectory_create_original_input_values_type_0 import TrajectoryCreateOriginalInputValuesType0
|
|
39
|
+
|
|
32
40
|
workflow_id = str(self.workflow_id)
|
|
33
41
|
|
|
34
42
|
trajectory_data = []
|
|
@@ -38,6 +46,14 @@ class TrajectoryCreate:
|
|
|
38
46
|
|
|
39
47
|
dimensions = self.dimensions.to_dict()
|
|
40
48
|
|
|
49
|
+
original_input_values: Union[None, Unset, dict[str, Any]]
|
|
50
|
+
if isinstance(self.original_input_values, Unset):
|
|
51
|
+
original_input_values = UNSET
|
|
52
|
+
elif isinstance(self.original_input_values, TrajectoryCreateOriginalInputValuesType0):
|
|
53
|
+
original_input_values = self.original_input_values.to_dict()
|
|
54
|
+
else:
|
|
55
|
+
original_input_values = self.original_input_values
|
|
56
|
+
|
|
41
57
|
field_dict: dict[str, Any] = {}
|
|
42
58
|
field_dict.update(self.additional_properties)
|
|
43
59
|
field_dict.update(
|
|
@@ -47,12 +63,15 @@ class TrajectoryCreate:
|
|
|
47
63
|
"dimensions": dimensions,
|
|
48
64
|
}
|
|
49
65
|
)
|
|
66
|
+
if original_input_values is not UNSET:
|
|
67
|
+
field_dict["original_input_values"] = original_input_values
|
|
50
68
|
|
|
51
69
|
return field_dict
|
|
52
70
|
|
|
53
71
|
@classmethod
|
|
54
72
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
73
|
from ..models.trajectory_create_dimensions import TrajectoryCreateDimensions
|
|
74
|
+
from ..models.trajectory_create_original_input_values_type_0 import TrajectoryCreateOriginalInputValuesType0
|
|
56
75
|
from ..models.trajectory_create_trajectory_data_item import TrajectoryCreateTrajectoryDataItem
|
|
57
76
|
|
|
58
77
|
d = dict(src_dict)
|
|
@@ -67,10 +86,30 @@ class TrajectoryCreate:
|
|
|
67
86
|
|
|
68
87
|
dimensions = TrajectoryCreateDimensions.from_dict(d.pop("dimensions"))
|
|
69
88
|
|
|
89
|
+
def _parse_original_input_values(
|
|
90
|
+
data: object,
|
|
91
|
+
) -> Union["TrajectoryCreateOriginalInputValuesType0", None, Unset]:
|
|
92
|
+
if data is None:
|
|
93
|
+
return data
|
|
94
|
+
if isinstance(data, Unset):
|
|
95
|
+
return data
|
|
96
|
+
try:
|
|
97
|
+
if not isinstance(data, dict):
|
|
98
|
+
raise TypeError()
|
|
99
|
+
original_input_values_type_0 = TrajectoryCreateOriginalInputValuesType0.from_dict(data)
|
|
100
|
+
|
|
101
|
+
return original_input_values_type_0
|
|
102
|
+
except: # noqa: E722
|
|
103
|
+
pass
|
|
104
|
+
return cast(Union["TrajectoryCreateOriginalInputValuesType0", None, Unset], data)
|
|
105
|
+
|
|
106
|
+
original_input_values = _parse_original_input_values(d.pop("original_input_values", UNSET))
|
|
107
|
+
|
|
70
108
|
trajectory_create = cls(
|
|
71
109
|
workflow_id=workflow_id,
|
|
72
110
|
trajectory_data=trajectory_data,
|
|
73
111
|
dimensions=dimensions,
|
|
112
|
+
original_input_values=original_input_values,
|
|
74
113
|
)
|
|
75
114
|
|
|
76
115
|
trajectory_create.additional_properties = d
|
openapi_client/cyberdesk_cloud_client/models/trajectory_create_original_input_values_type_0.py
ADDED
|
@@ -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="TrajectoryCreateOriginalInputValuesType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class TrajectoryCreateOriginalInputValuesType0:
|
|
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
|
+
trajectory_create_original_input_values_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
trajectory_create_original_input_values_type_0.additional_properties = d
|
|
28
|
+
return trajectory_create_original_input_values_type_0
|
|
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
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
from collections.abc import Mapping
|
|
3
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
4
4
|
from uuid import UUID
|
|
5
5
|
|
|
6
6
|
from attrs import define as _attrs_define
|
|
7
7
|
from attrs import field as _attrs_field
|
|
8
8
|
from dateutil.parser import isoparse
|
|
9
9
|
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
10
12
|
if TYPE_CHECKING:
|
|
11
13
|
from ..models.trajectory_response_dimensions import TrajectoryResponseDimensions
|
|
14
|
+
from ..models.trajectory_response_original_input_values_type_0 import TrajectoryResponseOriginalInputValuesType0
|
|
12
15
|
from ..models.trajectory_response_trajectory_data_item import TrajectoryResponseTrajectoryDataItem
|
|
13
16
|
|
|
14
17
|
|
|
@@ -27,6 +30,8 @@ class TrajectoryResponse:
|
|
|
27
30
|
user_id (UUID):
|
|
28
31
|
created_at (datetime.datetime):
|
|
29
32
|
updated_at (datetime.datetime):
|
|
33
|
+
original_input_values (Union['TrajectoryResponseOriginalInputValuesType0', None, Unset]): Original input values
|
|
34
|
+
used when trajectory was created
|
|
30
35
|
"""
|
|
31
36
|
|
|
32
37
|
workflow_id: UUID
|
|
@@ -36,9 +41,12 @@ class TrajectoryResponse:
|
|
|
36
41
|
user_id: UUID
|
|
37
42
|
created_at: datetime.datetime
|
|
38
43
|
updated_at: datetime.datetime
|
|
44
|
+
original_input_values: Union["TrajectoryResponseOriginalInputValuesType0", None, Unset] = UNSET
|
|
39
45
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
40
46
|
|
|
41
47
|
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
from ..models.trajectory_response_original_input_values_type_0 import TrajectoryResponseOriginalInputValuesType0
|
|
49
|
+
|
|
42
50
|
workflow_id = str(self.workflow_id)
|
|
43
51
|
|
|
44
52
|
trajectory_data = []
|
|
@@ -56,6 +64,14 @@ class TrajectoryResponse:
|
|
|
56
64
|
|
|
57
65
|
updated_at = self.updated_at.isoformat()
|
|
58
66
|
|
|
67
|
+
original_input_values: Union[None, Unset, dict[str, Any]]
|
|
68
|
+
if isinstance(self.original_input_values, Unset):
|
|
69
|
+
original_input_values = UNSET
|
|
70
|
+
elif isinstance(self.original_input_values, TrajectoryResponseOriginalInputValuesType0):
|
|
71
|
+
original_input_values = self.original_input_values.to_dict()
|
|
72
|
+
else:
|
|
73
|
+
original_input_values = self.original_input_values
|
|
74
|
+
|
|
59
75
|
field_dict: dict[str, Any] = {}
|
|
60
76
|
field_dict.update(self.additional_properties)
|
|
61
77
|
field_dict.update(
|
|
@@ -69,12 +85,15 @@ class TrajectoryResponse:
|
|
|
69
85
|
"updated_at": updated_at,
|
|
70
86
|
}
|
|
71
87
|
)
|
|
88
|
+
if original_input_values is not UNSET:
|
|
89
|
+
field_dict["original_input_values"] = original_input_values
|
|
72
90
|
|
|
73
91
|
return field_dict
|
|
74
92
|
|
|
75
93
|
@classmethod
|
|
76
94
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
95
|
from ..models.trajectory_response_dimensions import TrajectoryResponseDimensions
|
|
96
|
+
from ..models.trajectory_response_original_input_values_type_0 import TrajectoryResponseOriginalInputValuesType0
|
|
78
97
|
from ..models.trajectory_response_trajectory_data_item import TrajectoryResponseTrajectoryDataItem
|
|
79
98
|
|
|
80
99
|
d = dict(src_dict)
|
|
@@ -97,6 +116,25 @@ class TrajectoryResponse:
|
|
|
97
116
|
|
|
98
117
|
updated_at = isoparse(d.pop("updated_at"))
|
|
99
118
|
|
|
119
|
+
def _parse_original_input_values(
|
|
120
|
+
data: object,
|
|
121
|
+
) -> Union["TrajectoryResponseOriginalInputValuesType0", None, Unset]:
|
|
122
|
+
if data is None:
|
|
123
|
+
return data
|
|
124
|
+
if isinstance(data, Unset):
|
|
125
|
+
return data
|
|
126
|
+
try:
|
|
127
|
+
if not isinstance(data, dict):
|
|
128
|
+
raise TypeError()
|
|
129
|
+
original_input_values_type_0 = TrajectoryResponseOriginalInputValuesType0.from_dict(data)
|
|
130
|
+
|
|
131
|
+
return original_input_values_type_0
|
|
132
|
+
except: # noqa: E722
|
|
133
|
+
pass
|
|
134
|
+
return cast(Union["TrajectoryResponseOriginalInputValuesType0", None, Unset], data)
|
|
135
|
+
|
|
136
|
+
original_input_values = _parse_original_input_values(d.pop("original_input_values", UNSET))
|
|
137
|
+
|
|
100
138
|
trajectory_response = cls(
|
|
101
139
|
workflow_id=workflow_id,
|
|
102
140
|
trajectory_data=trajectory_data,
|
|
@@ -105,6 +143,7 @@ class TrajectoryResponse:
|
|
|
105
143
|
user_id=user_id,
|
|
106
144
|
created_at=created_at,
|
|
107
145
|
updated_at=updated_at,
|
|
146
|
+
original_input_values=original_input_values,
|
|
108
147
|
)
|
|
109
148
|
|
|
110
149
|
trajectory_response.additional_properties = d
|