cyberdesk 2.1.16__py3-none-any.whl → 2.1.17__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 +119 -15
- {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.17.dist-info}/METADATA +158 -2
- {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.17.dist-info}/RECORD +23 -15
- openapi_client/cyberdesk_cloud_client/api/computer/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +219 -0
- openapi_client/cyberdesk_cloud_client/api/health/database_health_check_v1_health_db_get.py +9 -68
- openapi_client/cyberdesk_cloud_client/api/machines/delete_machine_v1_machines_machine_id_delete.py +16 -4
- openapi_client/cyberdesk_cloud_client/api/machines/update_machine_v1_machines_machine_id_patch.py +12 -0
- openapi_client/cyberdesk_cloud_client/models/__init__.py +17 -3
- openapi_client/cyberdesk_cloud_client/models/copy_to_clipboard_request.py +59 -0
- openapi_client/cyberdesk_cloud_client/models/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post_response_copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +47 -0
- openapi_client/cyberdesk_cloud_client/models/machine_create.py +80 -1
- openapi_client/cyberdesk_cloud_client/models/machine_create_machine_parameters_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/{database_health_check_v1_health_db_get_response_database_health_check_v1_health_db_get.py → machine_create_machine_sensitive_parameters_type_0.py} +5 -5
- openapi_client/cyberdesk_cloud_client/models/machine_response.py +77 -0
- openapi_client/cyberdesk_cloud_client/models/machine_response_machine_parameters_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/machine_response_machine_sensitive_parameters_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/machine_update.py +80 -1
- openapi_client/cyberdesk_cloud_client/models/machine_update_machine_parameters_type_0.py +44 -0
- openapi_client/cyberdesk_cloud_client/models/machine_update_machine_sensitive_parameters_type_0.py +44 -0
- {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.17.dist-info}/WHEEL +0 -0
- {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.17.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.17.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.machine_create_machine_parameters_type_0 import MachineCreateMachineParametersType0
|
|
11
|
+
from ..models.machine_create_machine_sensitive_parameters_type_0 import MachineCreateMachineSensitiveParametersType0
|
|
12
|
+
|
|
13
|
+
|
|
9
14
|
T = TypeVar("T", bound="MachineCreate")
|
|
10
15
|
|
|
11
16
|
|
|
@@ -20,6 +25,10 @@ class MachineCreate:
|
|
|
20
25
|
version (Union[None, Unset, str]):
|
|
21
26
|
hostname (Union[None, Unset, str]):
|
|
22
27
|
os_info (Union[None, Unset, str]):
|
|
28
|
+
machine_parameters (Union['MachineCreateMachineParametersType0', None, Unset]): Machine-specific input values
|
|
29
|
+
that auto-populate runs
|
|
30
|
+
machine_sensitive_parameters (Union['MachineCreateMachineSensitiveParametersType0', None, Unset]): Machine-
|
|
31
|
+
specific sensitive input aliases (stored in Basis Theory)
|
|
23
32
|
"""
|
|
24
33
|
|
|
25
34
|
fingerprint: str
|
|
@@ -28,9 +37,16 @@ class MachineCreate:
|
|
|
28
37
|
version: Union[None, Unset, str] = UNSET
|
|
29
38
|
hostname: Union[None, Unset, str] = UNSET
|
|
30
39
|
os_info: Union[None, Unset, str] = UNSET
|
|
40
|
+
machine_parameters: Union["MachineCreateMachineParametersType0", None, Unset] = UNSET
|
|
41
|
+
machine_sensitive_parameters: Union["MachineCreateMachineSensitiveParametersType0", None, Unset] = UNSET
|
|
31
42
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
43
|
|
|
33
44
|
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
from ..models.machine_create_machine_parameters_type_0 import MachineCreateMachineParametersType0
|
|
46
|
+
from ..models.machine_create_machine_sensitive_parameters_type_0 import (
|
|
47
|
+
MachineCreateMachineSensitiveParametersType0,
|
|
48
|
+
)
|
|
49
|
+
|
|
34
50
|
fingerprint = self.fingerprint
|
|
35
51
|
|
|
36
52
|
unkey_key_id = self.unkey_key_id
|
|
@@ -59,6 +75,22 @@ class MachineCreate:
|
|
|
59
75
|
else:
|
|
60
76
|
os_info = self.os_info
|
|
61
77
|
|
|
78
|
+
machine_parameters: Union[None, Unset, dict[str, Any]]
|
|
79
|
+
if isinstance(self.machine_parameters, Unset):
|
|
80
|
+
machine_parameters = UNSET
|
|
81
|
+
elif isinstance(self.machine_parameters, MachineCreateMachineParametersType0):
|
|
82
|
+
machine_parameters = self.machine_parameters.to_dict()
|
|
83
|
+
else:
|
|
84
|
+
machine_parameters = self.machine_parameters
|
|
85
|
+
|
|
86
|
+
machine_sensitive_parameters: Union[None, Unset, dict[str, Any]]
|
|
87
|
+
if isinstance(self.machine_sensitive_parameters, Unset):
|
|
88
|
+
machine_sensitive_parameters = UNSET
|
|
89
|
+
elif isinstance(self.machine_sensitive_parameters, MachineCreateMachineSensitiveParametersType0):
|
|
90
|
+
machine_sensitive_parameters = self.machine_sensitive_parameters.to_dict()
|
|
91
|
+
else:
|
|
92
|
+
machine_sensitive_parameters = self.machine_sensitive_parameters
|
|
93
|
+
|
|
62
94
|
field_dict: dict[str, Any] = {}
|
|
63
95
|
field_dict.update(self.additional_properties)
|
|
64
96
|
field_dict.update(
|
|
@@ -75,11 +107,20 @@ class MachineCreate:
|
|
|
75
107
|
field_dict["hostname"] = hostname
|
|
76
108
|
if os_info is not UNSET:
|
|
77
109
|
field_dict["os_info"] = os_info
|
|
110
|
+
if machine_parameters is not UNSET:
|
|
111
|
+
field_dict["machine_parameters"] = machine_parameters
|
|
112
|
+
if machine_sensitive_parameters is not UNSET:
|
|
113
|
+
field_dict["machine_sensitive_parameters"] = machine_sensitive_parameters
|
|
78
114
|
|
|
79
115
|
return field_dict
|
|
80
116
|
|
|
81
117
|
@classmethod
|
|
82
118
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
119
|
+
from ..models.machine_create_machine_parameters_type_0 import MachineCreateMachineParametersType0
|
|
120
|
+
from ..models.machine_create_machine_sensitive_parameters_type_0 import (
|
|
121
|
+
MachineCreateMachineSensitiveParametersType0,
|
|
122
|
+
)
|
|
123
|
+
|
|
83
124
|
d = dict(src_dict)
|
|
84
125
|
fingerprint = d.pop("fingerprint")
|
|
85
126
|
|
|
@@ -121,6 +162,42 @@ class MachineCreate:
|
|
|
121
162
|
|
|
122
163
|
os_info = _parse_os_info(d.pop("os_info", UNSET))
|
|
123
164
|
|
|
165
|
+
def _parse_machine_parameters(data: object) -> Union["MachineCreateMachineParametersType0", None, Unset]:
|
|
166
|
+
if data is None:
|
|
167
|
+
return data
|
|
168
|
+
if isinstance(data, Unset):
|
|
169
|
+
return data
|
|
170
|
+
try:
|
|
171
|
+
if not isinstance(data, dict):
|
|
172
|
+
raise TypeError()
|
|
173
|
+
machine_parameters_type_0 = MachineCreateMachineParametersType0.from_dict(data)
|
|
174
|
+
|
|
175
|
+
return machine_parameters_type_0
|
|
176
|
+
except: # noqa: E722
|
|
177
|
+
pass
|
|
178
|
+
return cast(Union["MachineCreateMachineParametersType0", None, Unset], data)
|
|
179
|
+
|
|
180
|
+
machine_parameters = _parse_machine_parameters(d.pop("machine_parameters", UNSET))
|
|
181
|
+
|
|
182
|
+
def _parse_machine_sensitive_parameters(
|
|
183
|
+
data: object,
|
|
184
|
+
) -> Union["MachineCreateMachineSensitiveParametersType0", None, Unset]:
|
|
185
|
+
if data is None:
|
|
186
|
+
return data
|
|
187
|
+
if isinstance(data, Unset):
|
|
188
|
+
return data
|
|
189
|
+
try:
|
|
190
|
+
if not isinstance(data, dict):
|
|
191
|
+
raise TypeError()
|
|
192
|
+
machine_sensitive_parameters_type_0 = MachineCreateMachineSensitiveParametersType0.from_dict(data)
|
|
193
|
+
|
|
194
|
+
return machine_sensitive_parameters_type_0
|
|
195
|
+
except: # noqa: E722
|
|
196
|
+
pass
|
|
197
|
+
return cast(Union["MachineCreateMachineSensitiveParametersType0", None, Unset], data)
|
|
198
|
+
|
|
199
|
+
machine_sensitive_parameters = _parse_machine_sensitive_parameters(d.pop("machine_sensitive_parameters", UNSET))
|
|
200
|
+
|
|
124
201
|
machine_create = cls(
|
|
125
202
|
fingerprint=fingerprint,
|
|
126
203
|
unkey_key_id=unkey_key_id,
|
|
@@ -128,6 +205,8 @@ class MachineCreate:
|
|
|
128
205
|
version=version,
|
|
129
206
|
hostname=hostname,
|
|
130
207
|
os_info=os_info,
|
|
208
|
+
machine_parameters=machine_parameters,
|
|
209
|
+
machine_sensitive_parameters=machine_sensitive_parameters,
|
|
131
210
|
)
|
|
132
211
|
|
|
133
212
|
machine_create.additional_properties = d
|
|
@@ -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="MachineCreateMachineParametersType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MachineCreateMachineParametersType0:
|
|
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
|
+
machine_create_machine_parameters_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
machine_create_machine_parameters_type_0.additional_properties = d
|
|
28
|
+
return machine_create_machine_parameters_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
|
|
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
T = TypeVar("T", bound="
|
|
7
|
+
T = TypeVar("T", bound="MachineCreateMachineSensitiveParametersType0")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
11
|
+
class MachineCreateMachineSensitiveParametersType0:
|
|
12
12
|
""" """
|
|
13
13
|
|
|
14
14
|
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
@@ -22,10 +22,10 @@ class DatabaseHealthCheckV1HealthDbGetResponseDatabaseHealthCheckV1HealthDbGet:
|
|
|
22
22
|
@classmethod
|
|
23
23
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
24
|
d = dict(src_dict)
|
|
25
|
-
|
|
25
|
+
machine_create_machine_sensitive_parameters_type_0 = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
machine_create_machine_sensitive_parameters_type_0.additional_properties = d
|
|
28
|
+
return machine_create_machine_sensitive_parameters_type_0
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def additional_keys(self) -> list[str]:
|
|
@@ -11,6 +11,10 @@ from ..models.machine_status import MachineStatus
|
|
|
11
11
|
from ..types import UNSET, Unset
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
14
|
+
from ..models.machine_response_machine_parameters_type_0 import MachineResponseMachineParametersType0
|
|
15
|
+
from ..models.machine_response_machine_sensitive_parameters_type_0 import (
|
|
16
|
+
MachineResponseMachineSensitiveParametersType0,
|
|
17
|
+
)
|
|
14
18
|
from ..models.pool_response import PoolResponse
|
|
15
19
|
|
|
16
20
|
|
|
@@ -33,6 +37,10 @@ class MachineResponse:
|
|
|
33
37
|
version (Union[None, Unset, str]):
|
|
34
38
|
hostname (Union[None, Unset, str]):
|
|
35
39
|
os_info (Union[None, Unset, str]):
|
|
40
|
+
machine_parameters (Union['MachineResponseMachineParametersType0', None, Unset]): Machine-specific input values
|
|
41
|
+
that auto-populate runs
|
|
42
|
+
machine_sensitive_parameters (Union['MachineResponseMachineSensitiveParametersType0', None, Unset]): Machine-
|
|
43
|
+
specific sensitive input aliases (stored in Basis Theory)
|
|
36
44
|
user_id (Union[None, UUID, Unset]):
|
|
37
45
|
organization_id (Union[None, Unset, str]):
|
|
38
46
|
reserved_session_id (Union[None, UUID, Unset]):
|
|
@@ -51,6 +59,8 @@ class MachineResponse:
|
|
|
51
59
|
version: Union[None, Unset, str] = UNSET
|
|
52
60
|
hostname: Union[None, Unset, str] = UNSET
|
|
53
61
|
os_info: Union[None, Unset, str] = UNSET
|
|
62
|
+
machine_parameters: Union["MachineResponseMachineParametersType0", None, Unset] = UNSET
|
|
63
|
+
machine_sensitive_parameters: Union["MachineResponseMachineSensitiveParametersType0", None, Unset] = UNSET
|
|
54
64
|
user_id: Union[None, UUID, Unset] = UNSET
|
|
55
65
|
organization_id: Union[None, Unset, str] = UNSET
|
|
56
66
|
reserved_session_id: Union[None, UUID, Unset] = UNSET
|
|
@@ -59,6 +69,11 @@ class MachineResponse:
|
|
|
59
69
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
60
70
|
|
|
61
71
|
def to_dict(self) -> dict[str, Any]:
|
|
72
|
+
from ..models.machine_response_machine_parameters_type_0 import MachineResponseMachineParametersType0
|
|
73
|
+
from ..models.machine_response_machine_sensitive_parameters_type_0 import (
|
|
74
|
+
MachineResponseMachineSensitiveParametersType0,
|
|
75
|
+
)
|
|
76
|
+
|
|
62
77
|
fingerprint = self.fingerprint
|
|
63
78
|
|
|
64
79
|
id = str(self.id)
|
|
@@ -97,6 +112,22 @@ class MachineResponse:
|
|
|
97
112
|
else:
|
|
98
113
|
os_info = self.os_info
|
|
99
114
|
|
|
115
|
+
machine_parameters: Union[None, Unset, dict[str, Any]]
|
|
116
|
+
if isinstance(self.machine_parameters, Unset):
|
|
117
|
+
machine_parameters = UNSET
|
|
118
|
+
elif isinstance(self.machine_parameters, MachineResponseMachineParametersType0):
|
|
119
|
+
machine_parameters = self.machine_parameters.to_dict()
|
|
120
|
+
else:
|
|
121
|
+
machine_parameters = self.machine_parameters
|
|
122
|
+
|
|
123
|
+
machine_sensitive_parameters: Union[None, Unset, dict[str, Any]]
|
|
124
|
+
if isinstance(self.machine_sensitive_parameters, Unset):
|
|
125
|
+
machine_sensitive_parameters = UNSET
|
|
126
|
+
elif isinstance(self.machine_sensitive_parameters, MachineResponseMachineSensitiveParametersType0):
|
|
127
|
+
machine_sensitive_parameters = self.machine_sensitive_parameters.to_dict()
|
|
128
|
+
else:
|
|
129
|
+
machine_sensitive_parameters = self.machine_sensitive_parameters
|
|
130
|
+
|
|
100
131
|
user_id: Union[None, Unset, str]
|
|
101
132
|
if isinstance(self.user_id, Unset):
|
|
102
133
|
user_id = UNSET
|
|
@@ -160,6 +191,10 @@ class MachineResponse:
|
|
|
160
191
|
field_dict["hostname"] = hostname
|
|
161
192
|
if os_info is not UNSET:
|
|
162
193
|
field_dict["os_info"] = os_info
|
|
194
|
+
if machine_parameters is not UNSET:
|
|
195
|
+
field_dict["machine_parameters"] = machine_parameters
|
|
196
|
+
if machine_sensitive_parameters is not UNSET:
|
|
197
|
+
field_dict["machine_sensitive_parameters"] = machine_sensitive_parameters
|
|
163
198
|
if user_id is not UNSET:
|
|
164
199
|
field_dict["user_id"] = user_id
|
|
165
200
|
if organization_id is not UNSET:
|
|
@@ -175,6 +210,10 @@ class MachineResponse:
|
|
|
175
210
|
|
|
176
211
|
@classmethod
|
|
177
212
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
213
|
+
from ..models.machine_response_machine_parameters_type_0 import MachineResponseMachineParametersType0
|
|
214
|
+
from ..models.machine_response_machine_sensitive_parameters_type_0 import (
|
|
215
|
+
MachineResponseMachineSensitiveParametersType0,
|
|
216
|
+
)
|
|
178
217
|
from ..models.pool_response import PoolResponse
|
|
179
218
|
|
|
180
219
|
d = dict(src_dict)
|
|
@@ -228,6 +267,42 @@ class MachineResponse:
|
|
|
228
267
|
|
|
229
268
|
os_info = _parse_os_info(d.pop("os_info", UNSET))
|
|
230
269
|
|
|
270
|
+
def _parse_machine_parameters(data: object) -> Union["MachineResponseMachineParametersType0", None, Unset]:
|
|
271
|
+
if data is None:
|
|
272
|
+
return data
|
|
273
|
+
if isinstance(data, Unset):
|
|
274
|
+
return data
|
|
275
|
+
try:
|
|
276
|
+
if not isinstance(data, dict):
|
|
277
|
+
raise TypeError()
|
|
278
|
+
machine_parameters_type_0 = MachineResponseMachineParametersType0.from_dict(data)
|
|
279
|
+
|
|
280
|
+
return machine_parameters_type_0
|
|
281
|
+
except: # noqa: E722
|
|
282
|
+
pass
|
|
283
|
+
return cast(Union["MachineResponseMachineParametersType0", None, Unset], data)
|
|
284
|
+
|
|
285
|
+
machine_parameters = _parse_machine_parameters(d.pop("machine_parameters", UNSET))
|
|
286
|
+
|
|
287
|
+
def _parse_machine_sensitive_parameters(
|
|
288
|
+
data: object,
|
|
289
|
+
) -> Union["MachineResponseMachineSensitiveParametersType0", None, Unset]:
|
|
290
|
+
if data is None:
|
|
291
|
+
return data
|
|
292
|
+
if isinstance(data, Unset):
|
|
293
|
+
return data
|
|
294
|
+
try:
|
|
295
|
+
if not isinstance(data, dict):
|
|
296
|
+
raise TypeError()
|
|
297
|
+
machine_sensitive_parameters_type_0 = MachineResponseMachineSensitiveParametersType0.from_dict(data)
|
|
298
|
+
|
|
299
|
+
return machine_sensitive_parameters_type_0
|
|
300
|
+
except: # noqa: E722
|
|
301
|
+
pass
|
|
302
|
+
return cast(Union["MachineResponseMachineSensitiveParametersType0", None, Unset], data)
|
|
303
|
+
|
|
304
|
+
machine_sensitive_parameters = _parse_machine_sensitive_parameters(d.pop("machine_sensitive_parameters", UNSET))
|
|
305
|
+
|
|
231
306
|
def _parse_user_id(data: object) -> Union[None, UUID, Unset]:
|
|
232
307
|
if data is None:
|
|
233
308
|
return data
|
|
@@ -322,6 +397,8 @@ class MachineResponse:
|
|
|
322
397
|
version=version,
|
|
323
398
|
hostname=hostname,
|
|
324
399
|
os_info=os_info,
|
|
400
|
+
machine_parameters=machine_parameters,
|
|
401
|
+
machine_sensitive_parameters=machine_sensitive_parameters,
|
|
325
402
|
user_id=user_id,
|
|
326
403
|
organization_id=organization_id,
|
|
327
404
|
reserved_session_id=reserved_session_id,
|
|
@@ -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="MachineResponseMachineParametersType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MachineResponseMachineParametersType0:
|
|
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
|
+
machine_response_machine_parameters_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
machine_response_machine_parameters_type_0.additional_properties = d
|
|
28
|
+
return machine_response_machine_parameters_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
|
openapi_client/cyberdesk_cloud_client/models/machine_response_machine_sensitive_parameters_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="MachineResponseMachineSensitiveParametersType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MachineResponseMachineSensitiveParametersType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, str] = _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
|
+
machine_response_machine_sensitive_parameters_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
machine_response_machine_sensitive_parameters_type_0.additional_properties = d
|
|
28
|
+
return machine_response_machine_sensitive_parameters_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) -> str:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: str) -> 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,6 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
from collections.abc import Mapping
|
|
3
|
-
from typing import Any, TypeVar, Union, cast
|
|
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
|
|
@@ -10,6 +10,11 @@ from dateutil.parser import isoparse
|
|
|
10
10
|
from ..models.machine_status import MachineStatus
|
|
11
11
|
from ..types import UNSET, Unset
|
|
12
12
|
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.machine_update_machine_parameters_type_0 import MachineUpdateMachineParametersType0
|
|
15
|
+
from ..models.machine_update_machine_sensitive_parameters_type_0 import MachineUpdateMachineSensitiveParametersType0
|
|
16
|
+
|
|
17
|
+
|
|
13
18
|
T = TypeVar("T", bound="MachineUpdate")
|
|
14
19
|
|
|
15
20
|
|
|
@@ -27,6 +32,10 @@ class MachineUpdate:
|
|
|
27
32
|
last_seen (Union[None, Unset, datetime.datetime]):
|
|
28
33
|
reserved_session_id (Union[None, UUID, Unset]): Set to null to clear reservation; server will cancel
|
|
29
34
|
queued/running session runs and clear
|
|
35
|
+
machine_parameters (Union['MachineUpdateMachineParametersType0', None, Unset]): Machine-specific input values.
|
|
36
|
+
Provide empty dict {} to clear all.
|
|
37
|
+
machine_sensitive_parameters (Union['MachineUpdateMachineSensitiveParametersType0', None, Unset]): Machine-
|
|
38
|
+
specific sensitive input values (will be stored in Basis Theory). Provide empty dict {} to clear all.
|
|
30
39
|
"""
|
|
31
40
|
|
|
32
41
|
name: Union[None, Unset, str] = UNSET
|
|
@@ -37,9 +46,16 @@ class MachineUpdate:
|
|
|
37
46
|
is_available: Union[None, Unset, bool] = UNSET
|
|
38
47
|
last_seen: Union[None, Unset, datetime.datetime] = UNSET
|
|
39
48
|
reserved_session_id: Union[None, UUID, Unset] = UNSET
|
|
49
|
+
machine_parameters: Union["MachineUpdateMachineParametersType0", None, Unset] = UNSET
|
|
50
|
+
machine_sensitive_parameters: Union["MachineUpdateMachineSensitiveParametersType0", None, Unset] = UNSET
|
|
40
51
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
52
|
|
|
42
53
|
def to_dict(self) -> dict[str, Any]:
|
|
54
|
+
from ..models.machine_update_machine_parameters_type_0 import MachineUpdateMachineParametersType0
|
|
55
|
+
from ..models.machine_update_machine_sensitive_parameters_type_0 import (
|
|
56
|
+
MachineUpdateMachineSensitiveParametersType0,
|
|
57
|
+
)
|
|
58
|
+
|
|
43
59
|
name: Union[None, Unset, str]
|
|
44
60
|
if isinstance(self.name, Unset):
|
|
45
61
|
name = UNSET
|
|
@@ -94,6 +110,22 @@ class MachineUpdate:
|
|
|
94
110
|
else:
|
|
95
111
|
reserved_session_id = self.reserved_session_id
|
|
96
112
|
|
|
113
|
+
machine_parameters: Union[None, Unset, dict[str, Any]]
|
|
114
|
+
if isinstance(self.machine_parameters, Unset):
|
|
115
|
+
machine_parameters = UNSET
|
|
116
|
+
elif isinstance(self.machine_parameters, MachineUpdateMachineParametersType0):
|
|
117
|
+
machine_parameters = self.machine_parameters.to_dict()
|
|
118
|
+
else:
|
|
119
|
+
machine_parameters = self.machine_parameters
|
|
120
|
+
|
|
121
|
+
machine_sensitive_parameters: Union[None, Unset, dict[str, Any]]
|
|
122
|
+
if isinstance(self.machine_sensitive_parameters, Unset):
|
|
123
|
+
machine_sensitive_parameters = UNSET
|
|
124
|
+
elif isinstance(self.machine_sensitive_parameters, MachineUpdateMachineSensitiveParametersType0):
|
|
125
|
+
machine_sensitive_parameters = self.machine_sensitive_parameters.to_dict()
|
|
126
|
+
else:
|
|
127
|
+
machine_sensitive_parameters = self.machine_sensitive_parameters
|
|
128
|
+
|
|
97
129
|
field_dict: dict[str, Any] = {}
|
|
98
130
|
field_dict.update(self.additional_properties)
|
|
99
131
|
field_dict.update({})
|
|
@@ -113,11 +145,20 @@ class MachineUpdate:
|
|
|
113
145
|
field_dict["last_seen"] = last_seen
|
|
114
146
|
if reserved_session_id is not UNSET:
|
|
115
147
|
field_dict["reserved_session_id"] = reserved_session_id
|
|
148
|
+
if machine_parameters is not UNSET:
|
|
149
|
+
field_dict["machine_parameters"] = machine_parameters
|
|
150
|
+
if machine_sensitive_parameters is not UNSET:
|
|
151
|
+
field_dict["machine_sensitive_parameters"] = machine_sensitive_parameters
|
|
116
152
|
|
|
117
153
|
return field_dict
|
|
118
154
|
|
|
119
155
|
@classmethod
|
|
120
156
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
157
|
+
from ..models.machine_update_machine_parameters_type_0 import MachineUpdateMachineParametersType0
|
|
158
|
+
from ..models.machine_update_machine_sensitive_parameters_type_0 import (
|
|
159
|
+
MachineUpdateMachineSensitiveParametersType0,
|
|
160
|
+
)
|
|
161
|
+
|
|
121
162
|
d = dict(src_dict)
|
|
122
163
|
|
|
123
164
|
def _parse_name(data: object) -> Union[None, Unset, str]:
|
|
@@ -216,6 +257,42 @@ class MachineUpdate:
|
|
|
216
257
|
|
|
217
258
|
reserved_session_id = _parse_reserved_session_id(d.pop("reserved_session_id", UNSET))
|
|
218
259
|
|
|
260
|
+
def _parse_machine_parameters(data: object) -> Union["MachineUpdateMachineParametersType0", None, Unset]:
|
|
261
|
+
if data is None:
|
|
262
|
+
return data
|
|
263
|
+
if isinstance(data, Unset):
|
|
264
|
+
return data
|
|
265
|
+
try:
|
|
266
|
+
if not isinstance(data, dict):
|
|
267
|
+
raise TypeError()
|
|
268
|
+
machine_parameters_type_0 = MachineUpdateMachineParametersType0.from_dict(data)
|
|
269
|
+
|
|
270
|
+
return machine_parameters_type_0
|
|
271
|
+
except: # noqa: E722
|
|
272
|
+
pass
|
|
273
|
+
return cast(Union["MachineUpdateMachineParametersType0", None, Unset], data)
|
|
274
|
+
|
|
275
|
+
machine_parameters = _parse_machine_parameters(d.pop("machine_parameters", UNSET))
|
|
276
|
+
|
|
277
|
+
def _parse_machine_sensitive_parameters(
|
|
278
|
+
data: object,
|
|
279
|
+
) -> Union["MachineUpdateMachineSensitiveParametersType0", None, Unset]:
|
|
280
|
+
if data is None:
|
|
281
|
+
return data
|
|
282
|
+
if isinstance(data, Unset):
|
|
283
|
+
return data
|
|
284
|
+
try:
|
|
285
|
+
if not isinstance(data, dict):
|
|
286
|
+
raise TypeError()
|
|
287
|
+
machine_sensitive_parameters_type_0 = MachineUpdateMachineSensitiveParametersType0.from_dict(data)
|
|
288
|
+
|
|
289
|
+
return machine_sensitive_parameters_type_0
|
|
290
|
+
except: # noqa: E722
|
|
291
|
+
pass
|
|
292
|
+
return cast(Union["MachineUpdateMachineSensitiveParametersType0", None, Unset], data)
|
|
293
|
+
|
|
294
|
+
machine_sensitive_parameters = _parse_machine_sensitive_parameters(d.pop("machine_sensitive_parameters", UNSET))
|
|
295
|
+
|
|
219
296
|
machine_update = cls(
|
|
220
297
|
name=name,
|
|
221
298
|
version=version,
|
|
@@ -225,6 +302,8 @@ class MachineUpdate:
|
|
|
225
302
|
is_available=is_available,
|
|
226
303
|
last_seen=last_seen,
|
|
227
304
|
reserved_session_id=reserved_session_id,
|
|
305
|
+
machine_parameters=machine_parameters,
|
|
306
|
+
machine_sensitive_parameters=machine_sensitive_parameters,
|
|
228
307
|
)
|
|
229
308
|
|
|
230
309
|
machine_update.additional_properties = d
|
|
@@ -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="MachineUpdateMachineParametersType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MachineUpdateMachineParametersType0:
|
|
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
|
+
machine_update_machine_parameters_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
machine_update_machine_parameters_type_0.additional_properties = d
|
|
28
|
+
return machine_update_machine_parameters_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
|
openapi_client/cyberdesk_cloud_client/models/machine_update_machine_sensitive_parameters_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="MachineUpdateMachineSensitiveParametersType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MachineUpdateMachineSensitiveParametersType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, str] = _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
|
+
machine_update_machine_sensitive_parameters_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
machine_update_machine_sensitive_parameters_type_0.additional_properties = d
|
|
28
|
+
return machine_update_machine_sensitive_parameters_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) -> str:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: str) -> 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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|