moru 0.1.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.
- moru/__init__.py +174 -0
- moru/api/__init__.py +164 -0
- moru/api/client/__init__.py +8 -0
- moru/api/client/api/__init__.py +1 -0
- moru/api/client/api/sandboxes/__init__.py +1 -0
- moru/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +161 -0
- moru/api/client/api/sandboxes/get_sandboxes.py +176 -0
- moru/api/client/api/sandboxes/get_sandboxes_metrics.py +173 -0
- moru/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +163 -0
- moru/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +199 -0
- moru/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +212 -0
- moru/api/client/api/sandboxes/get_v2_sandboxes.py +230 -0
- moru/api/client/api/sandboxes/post_sandboxes.py +172 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +193 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +165 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +181 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +189 -0
- moru/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +193 -0
- moru/api/client/api/templates/__init__.py +1 -0
- moru/api/client/api/templates/delete_templates_template_id.py +157 -0
- moru/api/client/api/templates/get_templates.py +172 -0
- moru/api/client/api/templates/get_templates_template_id.py +195 -0
- moru/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +217 -0
- moru/api/client/api/templates/get_templates_template_id_files_hash.py +180 -0
- moru/api/client/api/templates/patch_templates_template_id.py +183 -0
- moru/api/client/api/templates/post_templates.py +172 -0
- moru/api/client/api/templates/post_templates_template_id.py +181 -0
- moru/api/client/api/templates/post_templates_template_id_builds_build_id.py +170 -0
- moru/api/client/api/templates/post_v2_templates.py +172 -0
- moru/api/client/api/templates/post_v3_templates.py +172 -0
- moru/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +192 -0
- moru/api/client/client.py +286 -0
- moru/api/client/errors.py +16 -0
- moru/api/client/models/__init__.py +123 -0
- moru/api/client/models/aws_registry.py +85 -0
- moru/api/client/models/aws_registry_type.py +8 -0
- moru/api/client/models/build_log_entry.py +89 -0
- moru/api/client/models/build_status_reason.py +95 -0
- moru/api/client/models/connect_sandbox.py +59 -0
- moru/api/client/models/created_access_token.py +100 -0
- moru/api/client/models/created_team_api_key.py +166 -0
- moru/api/client/models/disk_metrics.py +91 -0
- moru/api/client/models/error.py +67 -0
- moru/api/client/models/gcp_registry.py +69 -0
- moru/api/client/models/gcp_registry_type.py +8 -0
- moru/api/client/models/general_registry.py +77 -0
- moru/api/client/models/general_registry_type.py +8 -0
- moru/api/client/models/identifier_masking_details.py +83 -0
- moru/api/client/models/listed_sandbox.py +154 -0
- moru/api/client/models/log_level.py +11 -0
- moru/api/client/models/max_team_metric.py +78 -0
- moru/api/client/models/mcp_type_0.py +44 -0
- moru/api/client/models/new_access_token.py +59 -0
- moru/api/client/models/new_sandbox.py +172 -0
- moru/api/client/models/new_team_api_key.py +59 -0
- moru/api/client/models/node.py +155 -0
- moru/api/client/models/node_detail.py +165 -0
- moru/api/client/models/node_metrics.py +122 -0
- moru/api/client/models/node_status.py +11 -0
- moru/api/client/models/node_status_change.py +79 -0
- moru/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py +59 -0
- moru/api/client/models/post_sandboxes_sandbox_id_timeout_body.py +59 -0
- moru/api/client/models/resumed_sandbox.py +68 -0
- moru/api/client/models/sandbox.py +145 -0
- moru/api/client/models/sandbox_detail.py +183 -0
- moru/api/client/models/sandbox_log.py +70 -0
- moru/api/client/models/sandbox_log_entry.py +93 -0
- moru/api/client/models/sandbox_log_entry_fields.py +44 -0
- moru/api/client/models/sandbox_logs.py +91 -0
- moru/api/client/models/sandbox_metric.py +118 -0
- moru/api/client/models/sandbox_network_config.py +92 -0
- moru/api/client/models/sandbox_state.py +9 -0
- moru/api/client/models/sandboxes_with_metrics.py +59 -0
- moru/api/client/models/team.py +83 -0
- moru/api/client/models/team_api_key.py +158 -0
- moru/api/client/models/team_metric.py +86 -0
- moru/api/client/models/team_user.py +68 -0
- moru/api/client/models/template.py +217 -0
- moru/api/client/models/template_build.py +139 -0
- moru/api/client/models/template_build_file_upload.py +70 -0
- moru/api/client/models/template_build_info.py +126 -0
- moru/api/client/models/template_build_request.py +115 -0
- moru/api/client/models/template_build_request_v2.py +88 -0
- moru/api/client/models/template_build_request_v3.py +88 -0
- moru/api/client/models/template_build_start_v2.py +184 -0
- moru/api/client/models/template_build_status.py +11 -0
- moru/api/client/models/template_legacy.py +207 -0
- moru/api/client/models/template_request_response_v3.py +83 -0
- moru/api/client/models/template_step.py +91 -0
- moru/api/client/models/template_update_request.py +59 -0
- moru/api/client/models/template_with_builds.py +148 -0
- moru/api/client/models/update_team_api_key.py +59 -0
- moru/api/client/py.typed +1 -0
- moru/api/client/types.py +54 -0
- moru/api/client_async/__init__.py +50 -0
- moru/api/client_sync/__init__.py +52 -0
- moru/api/metadata.py +14 -0
- moru/connection_config.py +217 -0
- moru/envd/api.py +59 -0
- moru/envd/filesystem/filesystem_connect.py +193 -0
- moru/envd/filesystem/filesystem_pb2.py +76 -0
- moru/envd/filesystem/filesystem_pb2.pyi +233 -0
- moru/envd/process/process_connect.py +155 -0
- moru/envd/process/process_pb2.py +92 -0
- moru/envd/process/process_pb2.pyi +304 -0
- moru/envd/rpc.py +61 -0
- moru/envd/versions.py +6 -0
- moru/exceptions.py +95 -0
- moru/sandbox/commands/command_handle.py +69 -0
- moru/sandbox/commands/main.py +39 -0
- moru/sandbox/filesystem/filesystem.py +94 -0
- moru/sandbox/filesystem/watch_handle.py +60 -0
- moru/sandbox/main.py +210 -0
- moru/sandbox/mcp.py +1120 -0
- moru/sandbox/network.py +8 -0
- moru/sandbox/sandbox_api.py +210 -0
- moru/sandbox/signature.py +45 -0
- moru/sandbox/utils.py +34 -0
- moru/sandbox_async/commands/command.py +336 -0
- moru/sandbox_async/commands/command_handle.py +196 -0
- moru/sandbox_async/commands/pty.py +240 -0
- moru/sandbox_async/filesystem/filesystem.py +531 -0
- moru/sandbox_async/filesystem/watch_handle.py +62 -0
- moru/sandbox_async/main.py +734 -0
- moru/sandbox_async/paginator.py +69 -0
- moru/sandbox_async/sandbox_api.py +325 -0
- moru/sandbox_async/utils.py +7 -0
- moru/sandbox_sync/commands/command.py +328 -0
- moru/sandbox_sync/commands/command_handle.py +150 -0
- moru/sandbox_sync/commands/pty.py +230 -0
- moru/sandbox_sync/filesystem/filesystem.py +518 -0
- moru/sandbox_sync/filesystem/watch_handle.py +69 -0
- moru/sandbox_sync/main.py +726 -0
- moru/sandbox_sync/paginator.py +69 -0
- moru/sandbox_sync/sandbox_api.py +308 -0
- moru/template/consts.py +30 -0
- moru/template/dockerfile_parser.py +275 -0
- moru/template/logger.py +232 -0
- moru/template/main.py +1360 -0
- moru/template/readycmd.py +138 -0
- moru/template/types.py +105 -0
- moru/template/utils.py +320 -0
- moru/template_async/build_api.py +202 -0
- moru/template_async/main.py +366 -0
- moru/template_sync/build_api.py +199 -0
- moru/template_sync/main.py +371 -0
- moru-0.1.0.dist-info/METADATA +63 -0
- moru-0.1.0.dist-info/RECORD +152 -0
- moru-0.1.0.dist-info/WHEEL +4 -0
- moru-0.1.0.dist-info/licenses/LICENSE +9 -0
- moru_connect/__init__.py +1 -0
- moru_connect/client.py +493 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.build_log_entry import BuildLogEntry
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="BuildStatusReason")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class BuildStatusReason:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
message (str): Message with the status reason, currently reporting only for error status
|
|
21
|
+
log_entries (Union[Unset, list['BuildLogEntry']]): Log entries related to the status reason
|
|
22
|
+
step (Union[Unset, str]): Step that failed
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
message: str
|
|
26
|
+
log_entries: Union[Unset, list["BuildLogEntry"]] = UNSET
|
|
27
|
+
step: Union[Unset, str] = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
message = self.message
|
|
32
|
+
|
|
33
|
+
log_entries: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
34
|
+
if not isinstance(self.log_entries, Unset):
|
|
35
|
+
log_entries = []
|
|
36
|
+
for log_entries_item_data in self.log_entries:
|
|
37
|
+
log_entries_item = log_entries_item_data.to_dict()
|
|
38
|
+
log_entries.append(log_entries_item)
|
|
39
|
+
|
|
40
|
+
step = self.step
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"message": message,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
if log_entries is not UNSET:
|
|
50
|
+
field_dict["logEntries"] = log_entries
|
|
51
|
+
if step is not UNSET:
|
|
52
|
+
field_dict["step"] = step
|
|
53
|
+
|
|
54
|
+
return field_dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
58
|
+
from ..models.build_log_entry import BuildLogEntry
|
|
59
|
+
|
|
60
|
+
d = dict(src_dict)
|
|
61
|
+
message = d.pop("message")
|
|
62
|
+
|
|
63
|
+
log_entries = []
|
|
64
|
+
_log_entries = d.pop("logEntries", UNSET)
|
|
65
|
+
for log_entries_item_data in _log_entries or []:
|
|
66
|
+
log_entries_item = BuildLogEntry.from_dict(log_entries_item_data)
|
|
67
|
+
|
|
68
|
+
log_entries.append(log_entries_item)
|
|
69
|
+
|
|
70
|
+
step = d.pop("step", UNSET)
|
|
71
|
+
|
|
72
|
+
build_status_reason = cls(
|
|
73
|
+
message=message,
|
|
74
|
+
log_entries=log_entries,
|
|
75
|
+
step=step,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
build_status_reason.additional_properties = d
|
|
79
|
+
return build_status_reason
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def additional_keys(self) -> list[str]:
|
|
83
|
+
return list(self.additional_properties.keys())
|
|
84
|
+
|
|
85
|
+
def __getitem__(self, key: str) -> Any:
|
|
86
|
+
return self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
89
|
+
self.additional_properties[key] = value
|
|
90
|
+
|
|
91
|
+
def __delitem__(self, key: str) -> None:
|
|
92
|
+
del self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __contains__(self, key: str) -> bool:
|
|
95
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,59 @@
|
|
|
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="ConnectSandbox")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class ConnectSandbox:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
timeout (int): Timeout in seconds from the current time after which the sandbox should expire
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
timeout: int
|
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
19
|
+
|
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
|
21
|
+
timeout = self.timeout
|
|
22
|
+
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
field_dict.update(self.additional_properties)
|
|
25
|
+
field_dict.update(
|
|
26
|
+
{
|
|
27
|
+
"timeout": timeout,
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
return field_dict
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
35
|
+
d = dict(src_dict)
|
|
36
|
+
timeout = d.pop("timeout")
|
|
37
|
+
|
|
38
|
+
connect_sandbox = cls(
|
|
39
|
+
timeout=timeout,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
connect_sandbox.additional_properties = d
|
|
43
|
+
return connect_sandbox
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def additional_keys(self) -> list[str]:
|
|
47
|
+
return list(self.additional_properties.keys())
|
|
48
|
+
|
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
|
50
|
+
return self.additional_properties[key]
|
|
51
|
+
|
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
53
|
+
self.additional_properties[key] = value
|
|
54
|
+
|
|
55
|
+
def __delitem__(self, key: str) -> None:
|
|
56
|
+
del self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __contains__(self, key: str) -> bool:
|
|
59
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
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
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.identifier_masking_details import IdentifierMaskingDetails
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="CreatedAccessToken")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class CreatedAccessToken:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
created_at (datetime.datetime): Timestamp of access token creation
|
|
22
|
+
id (UUID): Identifier of the access token
|
|
23
|
+
mask (IdentifierMaskingDetails):
|
|
24
|
+
name (str): Name of the access token
|
|
25
|
+
token (str): The fully created access token
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
created_at: datetime.datetime
|
|
29
|
+
id: UUID
|
|
30
|
+
mask: "IdentifierMaskingDetails"
|
|
31
|
+
name: str
|
|
32
|
+
token: str
|
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
created_at = self.created_at.isoformat()
|
|
37
|
+
|
|
38
|
+
id = str(self.id)
|
|
39
|
+
|
|
40
|
+
mask = self.mask.to_dict()
|
|
41
|
+
|
|
42
|
+
name = self.name
|
|
43
|
+
|
|
44
|
+
token = self.token
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update(
|
|
49
|
+
{
|
|
50
|
+
"createdAt": created_at,
|
|
51
|
+
"id": id,
|
|
52
|
+
"mask": mask,
|
|
53
|
+
"name": name,
|
|
54
|
+
"token": token,
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
from ..models.identifier_masking_details import IdentifierMaskingDetails
|
|
63
|
+
|
|
64
|
+
d = dict(src_dict)
|
|
65
|
+
created_at = isoparse(d.pop("createdAt"))
|
|
66
|
+
|
|
67
|
+
id = UUID(d.pop("id"))
|
|
68
|
+
|
|
69
|
+
mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
|
|
70
|
+
|
|
71
|
+
name = d.pop("name")
|
|
72
|
+
|
|
73
|
+
token = d.pop("token")
|
|
74
|
+
|
|
75
|
+
created_access_token = cls(
|
|
76
|
+
created_at=created_at,
|
|
77
|
+
id=id,
|
|
78
|
+
mask=mask,
|
|
79
|
+
name=name,
|
|
80
|
+
token=token,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
created_access_token.additional_properties = d
|
|
84
|
+
return created_access_token
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def additional_keys(self) -> list[str]:
|
|
88
|
+
return list(self.additional_properties.keys())
|
|
89
|
+
|
|
90
|
+
def __getitem__(self, key: str) -> Any:
|
|
91
|
+
return self.additional_properties[key]
|
|
92
|
+
|
|
93
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
94
|
+
self.additional_properties[key] = value
|
|
95
|
+
|
|
96
|
+
def __delitem__(self, key: str) -> None:
|
|
97
|
+
del self.additional_properties[key]
|
|
98
|
+
|
|
99
|
+
def __contains__(self, key: str) -> bool:
|
|
100
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, 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 ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.identifier_masking_details import IdentifierMaskingDetails
|
|
14
|
+
from ..models.team_user import TeamUser
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="CreatedTeamAPIKey")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class CreatedTeamAPIKey:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
created_at (datetime.datetime): Timestamp of API key creation
|
|
25
|
+
id (UUID): Identifier of the API key
|
|
26
|
+
key (str): Raw value of the API key
|
|
27
|
+
mask (IdentifierMaskingDetails):
|
|
28
|
+
name (str): Name of the API key
|
|
29
|
+
created_by (Union['TeamUser', None, Unset]):
|
|
30
|
+
last_used (Union[None, Unset, datetime.datetime]): Last time this API key was used
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
created_at: datetime.datetime
|
|
34
|
+
id: UUID
|
|
35
|
+
key: str
|
|
36
|
+
mask: "IdentifierMaskingDetails"
|
|
37
|
+
name: str
|
|
38
|
+
created_by: Union["TeamUser", None, Unset] = UNSET
|
|
39
|
+
last_used: Union[None, Unset, datetime.datetime] = UNSET
|
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
from ..models.team_user import TeamUser
|
|
44
|
+
|
|
45
|
+
created_at = self.created_at.isoformat()
|
|
46
|
+
|
|
47
|
+
id = str(self.id)
|
|
48
|
+
|
|
49
|
+
key = self.key
|
|
50
|
+
|
|
51
|
+
mask = self.mask.to_dict()
|
|
52
|
+
|
|
53
|
+
name = self.name
|
|
54
|
+
|
|
55
|
+
created_by: Union[None, Unset, dict[str, Any]]
|
|
56
|
+
if isinstance(self.created_by, Unset):
|
|
57
|
+
created_by = UNSET
|
|
58
|
+
elif isinstance(self.created_by, TeamUser):
|
|
59
|
+
created_by = self.created_by.to_dict()
|
|
60
|
+
else:
|
|
61
|
+
created_by = self.created_by
|
|
62
|
+
|
|
63
|
+
last_used: Union[None, Unset, str]
|
|
64
|
+
if isinstance(self.last_used, Unset):
|
|
65
|
+
last_used = UNSET
|
|
66
|
+
elif isinstance(self.last_used, datetime.datetime):
|
|
67
|
+
last_used = self.last_used.isoformat()
|
|
68
|
+
else:
|
|
69
|
+
last_used = self.last_used
|
|
70
|
+
|
|
71
|
+
field_dict: dict[str, Any] = {}
|
|
72
|
+
field_dict.update(self.additional_properties)
|
|
73
|
+
field_dict.update(
|
|
74
|
+
{
|
|
75
|
+
"createdAt": created_at,
|
|
76
|
+
"id": id,
|
|
77
|
+
"key": key,
|
|
78
|
+
"mask": mask,
|
|
79
|
+
"name": name,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
if created_by is not UNSET:
|
|
83
|
+
field_dict["createdBy"] = created_by
|
|
84
|
+
if last_used is not UNSET:
|
|
85
|
+
field_dict["lastUsed"] = last_used
|
|
86
|
+
|
|
87
|
+
return field_dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
91
|
+
from ..models.identifier_masking_details import IdentifierMaskingDetails
|
|
92
|
+
from ..models.team_user import TeamUser
|
|
93
|
+
|
|
94
|
+
d = dict(src_dict)
|
|
95
|
+
created_at = isoparse(d.pop("createdAt"))
|
|
96
|
+
|
|
97
|
+
id = UUID(d.pop("id"))
|
|
98
|
+
|
|
99
|
+
key = d.pop("key")
|
|
100
|
+
|
|
101
|
+
mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
|
|
102
|
+
|
|
103
|
+
name = d.pop("name")
|
|
104
|
+
|
|
105
|
+
def _parse_created_by(data: object) -> Union["TeamUser", None, Unset]:
|
|
106
|
+
if data is None:
|
|
107
|
+
return data
|
|
108
|
+
if isinstance(data, Unset):
|
|
109
|
+
return data
|
|
110
|
+
try:
|
|
111
|
+
if not isinstance(data, dict):
|
|
112
|
+
raise TypeError()
|
|
113
|
+
created_by_type_1 = TeamUser.from_dict(data)
|
|
114
|
+
|
|
115
|
+
return created_by_type_1
|
|
116
|
+
except: # noqa: E722
|
|
117
|
+
pass
|
|
118
|
+
return cast(Union["TeamUser", None, Unset], data)
|
|
119
|
+
|
|
120
|
+
created_by = _parse_created_by(d.pop("createdBy", UNSET))
|
|
121
|
+
|
|
122
|
+
def _parse_last_used(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
123
|
+
if data is None:
|
|
124
|
+
return data
|
|
125
|
+
if isinstance(data, Unset):
|
|
126
|
+
return data
|
|
127
|
+
try:
|
|
128
|
+
if not isinstance(data, str):
|
|
129
|
+
raise TypeError()
|
|
130
|
+
last_used_type_0 = isoparse(data)
|
|
131
|
+
|
|
132
|
+
return last_used_type_0
|
|
133
|
+
except: # noqa: E722
|
|
134
|
+
pass
|
|
135
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
136
|
+
|
|
137
|
+
last_used = _parse_last_used(d.pop("lastUsed", UNSET))
|
|
138
|
+
|
|
139
|
+
created_team_api_key = cls(
|
|
140
|
+
created_at=created_at,
|
|
141
|
+
id=id,
|
|
142
|
+
key=key,
|
|
143
|
+
mask=mask,
|
|
144
|
+
name=name,
|
|
145
|
+
created_by=created_by,
|
|
146
|
+
last_used=last_used,
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
created_team_api_key.additional_properties = d
|
|
150
|
+
return created_team_api_key
|
|
151
|
+
|
|
152
|
+
@property
|
|
153
|
+
def additional_keys(self) -> list[str]:
|
|
154
|
+
return list(self.additional_properties.keys())
|
|
155
|
+
|
|
156
|
+
def __getitem__(self, key: str) -> Any:
|
|
157
|
+
return self.additional_properties[key]
|
|
158
|
+
|
|
159
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
160
|
+
self.additional_properties[key] = value
|
|
161
|
+
|
|
162
|
+
def __delitem__(self, key: str) -> None:
|
|
163
|
+
del self.additional_properties[key]
|
|
164
|
+
|
|
165
|
+
def __contains__(self, key: str) -> bool:
|
|
166
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,91 @@
|
|
|
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="DiskMetrics")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class DiskMetrics:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
device (str): Device name
|
|
15
|
+
filesystem_type (str): Filesystem type (e.g., ext4, xfs)
|
|
16
|
+
mount_point (str): Mount point of the disk
|
|
17
|
+
total_bytes (int): Total space in bytes
|
|
18
|
+
used_bytes (int): Used space in bytes
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
device: str
|
|
22
|
+
filesystem_type: str
|
|
23
|
+
mount_point: str
|
|
24
|
+
total_bytes: int
|
|
25
|
+
used_bytes: int
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
device = self.device
|
|
30
|
+
|
|
31
|
+
filesystem_type = self.filesystem_type
|
|
32
|
+
|
|
33
|
+
mount_point = self.mount_point
|
|
34
|
+
|
|
35
|
+
total_bytes = self.total_bytes
|
|
36
|
+
|
|
37
|
+
used_bytes = self.used_bytes
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"device": device,
|
|
44
|
+
"filesystemType": filesystem_type,
|
|
45
|
+
"mountPoint": mount_point,
|
|
46
|
+
"totalBytes": total_bytes,
|
|
47
|
+
"usedBytes": used_bytes,
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
device = d.pop("device")
|
|
57
|
+
|
|
58
|
+
filesystem_type = d.pop("filesystemType")
|
|
59
|
+
|
|
60
|
+
mount_point = d.pop("mountPoint")
|
|
61
|
+
|
|
62
|
+
total_bytes = d.pop("totalBytes")
|
|
63
|
+
|
|
64
|
+
used_bytes = d.pop("usedBytes")
|
|
65
|
+
|
|
66
|
+
disk_metrics = cls(
|
|
67
|
+
device=device,
|
|
68
|
+
filesystem_type=filesystem_type,
|
|
69
|
+
mount_point=mount_point,
|
|
70
|
+
total_bytes=total_bytes,
|
|
71
|
+
used_bytes=used_bytes,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
disk_metrics.additional_properties = d
|
|
75
|
+
return disk_metrics
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def additional_keys(self) -> list[str]:
|
|
79
|
+
return list(self.additional_properties.keys())
|
|
80
|
+
|
|
81
|
+
def __getitem__(self, key: str) -> Any:
|
|
82
|
+
return self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
85
|
+
self.additional_properties[key] = value
|
|
86
|
+
|
|
87
|
+
def __delitem__(self, key: str) -> None:
|
|
88
|
+
del self.additional_properties[key]
|
|
89
|
+
|
|
90
|
+
def __contains__(self, key: str) -> bool:
|
|
91
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,67 @@
|
|
|
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="Error")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class Error:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
code (int): Error code
|
|
15
|
+
message (str): Error
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
code: int
|
|
19
|
+
message: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
code = self.code
|
|
24
|
+
|
|
25
|
+
message = self.message
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"code": code,
|
|
32
|
+
"message": message,
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
return field_dict
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
40
|
+
d = dict(src_dict)
|
|
41
|
+
code = d.pop("code")
|
|
42
|
+
|
|
43
|
+
message = d.pop("message")
|
|
44
|
+
|
|
45
|
+
error = cls(
|
|
46
|
+
code=code,
|
|
47
|
+
message=message,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
error.additional_properties = d
|
|
51
|
+
return error
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def additional_keys(self) -> list[str]:
|
|
55
|
+
return list(self.additional_properties.keys())
|
|
56
|
+
|
|
57
|
+
def __getitem__(self, key: str) -> Any:
|
|
58
|
+
return self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
61
|
+
self.additional_properties[key] = value
|
|
62
|
+
|
|
63
|
+
def __delitem__(self, key: str) -> None:
|
|
64
|
+
del self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __contains__(self, key: str) -> bool:
|
|
67
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
from ..models.gcp_registry_type import GCPRegistryType
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="GCPRegistry")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GCPRegistry:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
service_account_json (str): Service Account JSON for GCP authentication
|
|
17
|
+
type_ (GCPRegistryType): Type of registry authentication
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
service_account_json: str
|
|
21
|
+
type_: GCPRegistryType
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
service_account_json = self.service_account_json
|
|
26
|
+
|
|
27
|
+
type_ = self.type_.value
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"serviceAccountJson": service_account_json,
|
|
34
|
+
"type": type_,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
service_account_json = d.pop("serviceAccountJson")
|
|
44
|
+
|
|
45
|
+
type_ = GCPRegistryType(d.pop("type"))
|
|
46
|
+
|
|
47
|
+
gcp_registry = cls(
|
|
48
|
+
service_account_json=service_account_json,
|
|
49
|
+
type_=type_,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
gcp_registry.additional_properties = d
|
|
53
|
+
return gcp_registry
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|