loopix-sdk 2.30.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.
- loopix/__init__.py +260 -0
- loopix/api/__init__.py +287 -0
- loopix/api/client/__init__.py +8 -0
- loopix/api/client/api/__init__.py +1 -0
- loopix/api/client/api/sandboxes/__init__.py +1 -0
- loopix/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +161 -0
- loopix/api/client/api/sandboxes/get_sandboxes.py +176 -0
- loopix/api/client/api/sandboxes/get_sandboxes_metrics.py +173 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +163 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +199 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +212 -0
- loopix/api/client/api/sandboxes/get_v2_sandboxes.py +230 -0
- loopix/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +254 -0
- loopix/api/client/api/sandboxes/post_sandboxes.py +172 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +193 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +187 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +181 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +189 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +195 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +193 -0
- loopix/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +199 -0
- loopix/api/client/api/snapshots/__init__.py +1 -0
- loopix/api/client/api/snapshots/get_snapshots.py +202 -0
- loopix/api/client/api/tags/__init__.py +1 -0
- loopix/api/client/api/tags/delete_templates_tags.py +174 -0
- loopix/api/client/api/tags/get_templates_template_id_tags.py +172 -0
- loopix/api/client/api/tags/post_templates_tags.py +176 -0
- loopix/api/client/api/templates/__init__.py +1 -0
- loopix/api/client/api/templates/delete_templates_template_id.py +157 -0
- loopix/api/client/api/templates/get_templates.py +172 -0
- loopix/api/client/api/templates/get_templates_aliases_alias.py +167 -0
- loopix/api/client/api/templates/get_templates_template_id.py +195 -0
- loopix/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +272 -0
- loopix/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +232 -0
- loopix/api/client/api/templates/get_templates_template_id_files_hash.py +180 -0
- loopix/api/client/api/templates/patch_templates_template_id.py +183 -0
- loopix/api/client/api/templates/patch_v_2_templates_template_id.py +185 -0
- loopix/api/client/api/templates/post_templates.py +172 -0
- loopix/api/client/api/templates/post_templates_template_id.py +181 -0
- loopix/api/client/api/templates/post_templates_template_id_builds_build_id.py +170 -0
- loopix/api/client/api/templates/post_v2_templates.py +172 -0
- loopix/api/client/api/templates/post_v3_templates.py +176 -0
- loopix/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +192 -0
- loopix/api/client/api/volumes/__init__.py +1 -0
- loopix/api/client/api/volumes/delete_volumes_volume_id.py +161 -0
- loopix/api/client/api/volumes/get_volumes.py +140 -0
- loopix/api/client/api/volumes/get_volumes_volume_id.py +163 -0
- loopix/api/client/api/volumes/post_volumes.py +172 -0
- loopix/api/client/client.py +286 -0
- loopix/api/client/errors.py +16 -0
- loopix/api/client/models/__init__.py +185 -0
- loopix/api/client/models/admin_build_cancel_result.py +67 -0
- loopix/api/client/models/admin_sandbox_kill_result.py +67 -0
- loopix/api/client/models/assign_template_tags_request.py +67 -0
- loopix/api/client/models/assigned_template_tags.py +68 -0
- loopix/api/client/models/aws_registry.py +85 -0
- loopix/api/client/models/aws_registry_type.py +8 -0
- loopix/api/client/models/build_log_entry.py +89 -0
- loopix/api/client/models/build_status_reason.py +95 -0
- loopix/api/client/models/connect_sandbox.py +59 -0
- loopix/api/client/models/created_access_token.py +100 -0
- loopix/api/client/models/created_team_api_key.py +166 -0
- loopix/api/client/models/delete_template_tags_request.py +67 -0
- loopix/api/client/models/disk_metrics.py +91 -0
- loopix/api/client/models/error.py +67 -0
- loopix/api/client/models/gcp_registry.py +69 -0
- loopix/api/client/models/gcp_registry_type.py +8 -0
- loopix/api/client/models/general_registry.py +77 -0
- loopix/api/client/models/general_registry_type.py +8 -0
- loopix/api/client/models/identifier_masking_details.py +83 -0
- loopix/api/client/models/listed_sandbox.py +179 -0
- loopix/api/client/models/log_level.py +11 -0
- loopix/api/client/models/logs_direction.py +9 -0
- loopix/api/client/models/logs_source.py +9 -0
- loopix/api/client/models/machine_info.py +83 -0
- loopix/api/client/models/max_team_metric.py +78 -0
- loopix/api/client/models/mcp_type_0.py +44 -0
- loopix/api/client/models/new_access_token.py +59 -0
- loopix/api/client/models/new_sandbox.py +224 -0
- loopix/api/client/models/new_team_api_key.py +59 -0
- loopix/api/client/models/new_volume.py +59 -0
- loopix/api/client/models/node.py +160 -0
- loopix/api/client/models/node_detail.py +160 -0
- loopix/api/client/models/node_metrics.py +122 -0
- loopix/api/client/models/node_status.py +12 -0
- loopix/api/client/models/node_status_change.py +82 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py +59 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py +60 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_timeout_body.py +59 -0
- loopix/api/client/models/resumed_sandbox.py +68 -0
- loopix/api/client/models/sandbox.py +145 -0
- loopix/api/client/models/sandbox_auto_resume_config.py +60 -0
- loopix/api/client/models/sandbox_detail.py +267 -0
- loopix/api/client/models/sandbox_lifecycle.py +70 -0
- loopix/api/client/models/sandbox_log.py +70 -0
- loopix/api/client/models/sandbox_log_entry.py +93 -0
- loopix/api/client/models/sandbox_log_entry_fields.py +44 -0
- loopix/api/client/models/sandbox_logs.py +91 -0
- loopix/api/client/models/sandbox_logs_v2_response.py +73 -0
- loopix/api/client/models/sandbox_metric.py +126 -0
- loopix/api/client/models/sandbox_network_config.py +118 -0
- loopix/api/client/models/sandbox_network_config_rules.py +72 -0
- loopix/api/client/models/sandbox_network_rule.py +74 -0
- loopix/api/client/models/sandbox_network_transform.py +79 -0
- loopix/api/client/models/sandbox_network_transform_headers.py +47 -0
- loopix/api/client/models/sandbox_network_update_config.py +114 -0
- loopix/api/client/models/sandbox_network_update_config_rules.py +71 -0
- loopix/api/client/models/sandbox_on_timeout.py +9 -0
- loopix/api/client/models/sandbox_pause_request.py +62 -0
- loopix/api/client/models/sandbox_state.py +9 -0
- loopix/api/client/models/sandbox_volume_mount.py +67 -0
- loopix/api/client/models/sandboxes_with_metrics.py +59 -0
- loopix/api/client/models/snapshot_info.py +70 -0
- loopix/api/client/models/team.py +83 -0
- loopix/api/client/models/team_api_key.py +158 -0
- loopix/api/client/models/team_metric.py +86 -0
- loopix/api/client/models/team_user.py +75 -0
- loopix/api/client/models/template.py +225 -0
- loopix/api/client/models/template_alias_response.py +67 -0
- loopix/api/client/models/template_build.py +139 -0
- loopix/api/client/models/template_build_file_upload.py +70 -0
- loopix/api/client/models/template_build_info.py +126 -0
- loopix/api/client/models/template_build_logs_response.py +73 -0
- loopix/api/client/models/template_build_request.py +115 -0
- loopix/api/client/models/template_build_request_v2.py +88 -0
- loopix/api/client/models/template_build_request_v3.py +107 -0
- loopix/api/client/models/template_build_start_v2.py +184 -0
- loopix/api/client/models/template_build_status.py +11 -0
- loopix/api/client/models/template_legacy.py +207 -0
- loopix/api/client/models/template_request_response_v3.py +99 -0
- loopix/api/client/models/template_step.py +91 -0
- loopix/api/client/models/template_tag.py +78 -0
- loopix/api/client/models/template_update_request.py +59 -0
- loopix/api/client/models/template_update_response.py +59 -0
- loopix/api/client/models/template_with_builds.py +156 -0
- loopix/api/client/models/update_team_api_key.py +59 -0
- loopix/api/client/models/volume.py +67 -0
- loopix/api/client/models/volume_and_token.py +75 -0
- loopix/api/client/models/volume_token.py +59 -0
- loopix/api/client/py.typed +1 -0
- loopix/api/client/types.py +54 -0
- loopix/api/client_async/__init__.py +74 -0
- loopix/api/client_sync/__init__.py +73 -0
- loopix/api/metadata.py +14 -0
- loopix/connection_config.py +309 -0
- loopix/envd/api.py +170 -0
- loopix/envd/filesystem/filesystem_connect.py +193 -0
- loopix/envd/filesystem/filesystem_pb2.py +80 -0
- loopix/envd/filesystem/filesystem_pb2.pyi +272 -0
- loopix/envd/process/process_connect.py +174 -0
- loopix/envd/process/process_pb2.py +96 -0
- loopix/envd/process/process_pb2.pyi +316 -0
- loopix/envd/rpc.py +139 -0
- loopix/envd/versions.py +11 -0
- loopix/exceptions.py +133 -0
- loopix/io_utils.py +57 -0
- loopix/paginator.py +52 -0
- loopix/py.typed +0 -0
- loopix/sandbox/_git/__init__.py +85 -0
- loopix/sandbox/_git/args.py +363 -0
- loopix/sandbox/_git/auth.py +132 -0
- loopix/sandbox/_git/config.py +32 -0
- loopix/sandbox/_git/parse.py +222 -0
- loopix/sandbox/_git/types.py +149 -0
- loopix/sandbox/commands/command_handle.py +69 -0
- loopix/sandbox/commands/main.py +39 -0
- loopix/sandbox/filesystem/filesystem.py +337 -0
- loopix/sandbox/filesystem/watch_handle.py +70 -0
- loopix/sandbox/main.py +227 -0
- loopix/sandbox/mcp.py +1949 -0
- loopix/sandbox/network.py +8 -0
- loopix/sandbox/sandbox_api.py +624 -0
- loopix/sandbox/signature.py +47 -0
- loopix/sandbox/utils.py +34 -0
- loopix/sandbox_async/commands/command.py +396 -0
- loopix/sandbox_async/commands/command_handle.py +298 -0
- loopix/sandbox_async/commands/pty.py +257 -0
- loopix/sandbox_async/filesystem/filesystem.py +720 -0
- loopix/sandbox_async/filesystem/watch_handle.py +97 -0
- loopix/sandbox_async/git.py +1100 -0
- loopix/sandbox_async/main.py +987 -0
- loopix/sandbox_async/paginator.py +140 -0
- loopix/sandbox_async/sandbox_api.py +504 -0
- loopix/sandbox_async/utils.py +7 -0
- loopix/sandbox_domains.py +5 -0
- loopix/sandbox_sync/commands/command.py +420 -0
- loopix/sandbox_sync/commands/command_handle.py +239 -0
- loopix/sandbox_sync/commands/pty.py +279 -0
- loopix/sandbox_sync/filesystem/filesystem.py +710 -0
- loopix/sandbox_sync/filesystem/watch_handle.py +102 -0
- loopix/sandbox_sync/git.py +1077 -0
- loopix/sandbox_sync/main.py +975 -0
- loopix/sandbox_sync/paginator.py +140 -0
- loopix/sandbox_sync/sandbox_api.py +491 -0
- loopix/template/consts.py +45 -0
- loopix/template/dockerfile_parser.py +286 -0
- loopix/template/logger.py +232 -0
- loopix/template/main.py +1368 -0
- loopix/template/readycmd.py +144 -0
- loopix/template/types.py +194 -0
- loopix/template/utils.py +426 -0
- loopix/template_async/build_api.py +419 -0
- loopix/template_async/main.py +528 -0
- loopix/template_sync/build_api.py +409 -0
- loopix/template_sync/main.py +529 -0
- loopix/volume/client/__init__.py +8 -0
- loopix/volume/client/api/__init__.py +1 -0
- loopix/volume/client/api/volumes/__init__.py +1 -0
- loopix/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +174 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +204 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_file.py +179 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_path.py +176 -0
- loopix/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +203 -0
- loopix/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +239 -0
- loopix/volume/client/api/volumes/put_volumecontent_volume_id_file.py +259 -0
- loopix/volume/client/client.py +286 -0
- loopix/volume/client/errors.py +16 -0
- loopix/volume/client/models/__init__.py +13 -0
- loopix/volume/client/models/error.py +67 -0
- loopix/volume/client/models/patch_volumecontent_volume_id_path_body.py +77 -0
- loopix/volume/client/models/volume_entry_stat.py +145 -0
- loopix/volume/client/models/volume_entry_stat_type.py +11 -0
- loopix/volume/client/py.typed +1 -0
- loopix/volume/client/types.py +54 -0
- loopix/volume/client_async/__init__.py +88 -0
- loopix/volume/client_sync/__init__.py +80 -0
- loopix/volume/connection_config.py +145 -0
- loopix/volume/types.py +62 -0
- loopix/volume/utils.py +52 -0
- loopix/volume/volume_async.py +639 -0
- loopix/volume/volume_sync.py +639 -0
- loopix_connect/__init__.py +1 -0
- loopix_connect/client.py +534 -0
- loopix_connect/py.typed +0 -0
- loopix_sdk-2.30.0.dist-info/METADATA +98 -0
- loopix_sdk-2.30.0.dist-info/RECORD +238 -0
- loopix_sdk-2.30.0.dist-info/WHEEL +4 -0
- loopix_sdk-2.30.0.dist-info/licenses/LICENSE +9 -0
|
@@ -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,67 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="DeleteTemplateTagsRequest")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class DeleteTemplateTagsRequest:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
name (str): Name of the template
|
|
15
|
+
tags (list[str]): Tags to delete
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
name: str
|
|
19
|
+
tags: list[str]
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
name = self.name
|
|
24
|
+
|
|
25
|
+
tags = self.tags
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"name": name,
|
|
32
|
+
"tags": tags,
|
|
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
|
+
name = d.pop("name")
|
|
42
|
+
|
|
43
|
+
tags = cast(list[str], d.pop("tags"))
|
|
44
|
+
|
|
45
|
+
delete_template_tags_request = cls(
|
|
46
|
+
name=name,
|
|
47
|
+
tags=tags,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
delete_template_tags_request.additional_properties = d
|
|
51
|
+
return delete_template_tags_request
|
|
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,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
|
|
@@ -0,0 +1,77 @@
|
|
|
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.general_registry_type import GeneralRegistryType
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="GeneralRegistry")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GeneralRegistry:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
password (str): Password to use for the registry
|
|
17
|
+
type_ (GeneralRegistryType): Type of registry authentication
|
|
18
|
+
username (str): Username to use for the registry
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
password: str
|
|
22
|
+
type_: GeneralRegistryType
|
|
23
|
+
username: str
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
password = self.password
|
|
28
|
+
|
|
29
|
+
type_ = self.type_.value
|
|
30
|
+
|
|
31
|
+
username = self.username
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"password": password,
|
|
38
|
+
"type": type_,
|
|
39
|
+
"username": username,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
password = d.pop("password")
|
|
49
|
+
|
|
50
|
+
type_ = GeneralRegistryType(d.pop("type"))
|
|
51
|
+
|
|
52
|
+
username = d.pop("username")
|
|
53
|
+
|
|
54
|
+
general_registry = cls(
|
|
55
|
+
password=password,
|
|
56
|
+
type_=type_,
|
|
57
|
+
username=username,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
general_registry.additional_properties = d
|
|
61
|
+
return general_registry
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def additional_keys(self) -> list[str]:
|
|
65
|
+
return list(self.additional_properties.keys())
|
|
66
|
+
|
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
|
68
|
+
return self.additional_properties[key]
|
|
69
|
+
|
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
+
self.additional_properties[key] = value
|
|
72
|
+
|
|
73
|
+
def __delitem__(self, key: str) -> None:
|
|
74
|
+
del self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __contains__(self, key: str) -> bool:
|
|
77
|
+
return key in self.additional_properties
|