daytona_api_client 0.21.3a0__py3-none-any.whl → 0.21.5a0__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 daytona_api_client might be problematic. Click here for more details.
- daytona_api_client/api/__init__.py +1 -0
- daytona_api_client/api/api_keys_api.py +328 -171
- daytona_api_client/api/docker_registry_api.py +463 -239
- daytona_api_client/api/object_storage_api.py +63 -33
- daytona_api_client/api/organizations_api.py +1582 -612
- daytona_api_client/api/preview_api.py +175 -71
- daytona_api_client/api/runners_api.py +195 -67
- daytona_api_client/api/sandbox_api.py +909 -499
- daytona_api_client/api/snapshots_api.py +482 -253
- daytona_api_client/api/toolbox_api.py +2684 -1410
- daytona_api_client/api/users_api.py +526 -184
- daytona_api_client/api/volumes_api.py +332 -180
- daytona_api_client/api/workspace_api.py +909 -499
- daytona_api_client/api_client.py +192 -90
- daytona_api_client/api_response.py +3 -2
- daytona_api_client/configuration.py +52 -55
- daytona_api_client/exceptions.py +16 -15
- daytona_api_client/models/account_provider.py +11 -9
- daytona_api_client/models/api_key_list.py +21 -40
- daytona_api_client/models/api_key_response.py +19 -38
- daytona_api_client/models/build_info.py +15 -22
- daytona_api_client/models/command.py +13 -12
- daytona_api_client/models/completion_context.py +11 -11
- daytona_api_client/models/completion_item.py +17 -28
- daytona_api_client/models/completion_list.py +12 -17
- daytona_api_client/models/create_api_key.py +17 -32
- daytona_api_client/models/create_build_info.py +13 -17
- daytona_api_client/models/create_docker_registry.py +18 -21
- daytona_api_client/models/create_linked_account.py +11 -9
- daytona_api_client/models/create_organization.py +10 -9
- daytona_api_client/models/create_organization_invitation.py +17 -24
- daytona_api_client/models/create_organization_quota.py +19 -32
- daytona_api_client/models/create_organization_role.py +15 -28
- daytona_api_client/models/create_runner.py +26 -41
- daytona_api_client/models/create_sandbox.py +39 -76
- daytona_api_client/models/create_session_request.py +10 -9
- daytona_api_client/models/create_snapshot.py +22 -39
- daytona_api_client/models/create_user.py +19 -26
- daytona_api_client/models/create_volume.py +10 -9
- daytona_api_client/models/create_workspace.py +38 -73
- daytona_api_client/models/docker_registry.py +21 -33
- daytona_api_client/models/execute_request.py +13 -12
- daytona_api_client/models/execute_response.py +11 -9
- daytona_api_client/models/file_info.py +17 -20
- daytona_api_client/models/file_status.py +13 -16
- daytona_api_client/models/git_add_request.py +11 -9
- daytona_api_client/models/git_branch_request.py +11 -9
- daytona_api_client/models/git_checkout_request.py +11 -9
- daytona_api_client/models/git_clone_request.py +15 -18
- daytona_api_client/models/git_commit_info.py +14 -17
- daytona_api_client/models/git_commit_request.py +13 -16
- daytona_api_client/models/git_commit_response.py +10 -9
- daytona_api_client/models/git_delete_branch_request.py +11 -9
- daytona_api_client/models/git_repo_request.py +12 -11
- daytona_api_client/models/git_status.py +15 -20
- daytona_api_client/models/list_branch_response.py +10 -9
- daytona_api_client/models/lsp_completion_params.py +16 -19
- daytona_api_client/models/lsp_document_request.py +12 -11
- daytona_api_client/models/lsp_location.py +12 -12
- daytona_api_client/models/lsp_server_request.py +11 -9
- daytona_api_client/models/lsp_symbol.py +13 -16
- daytona_api_client/models/match.py +12 -9
- daytona_api_client/models/organization.py +20 -34
- daytona_api_client/models/organization_invitation.py +27 -44
- daytona_api_client/models/organization_role.py +21 -46
- daytona_api_client/models/organization_suspension.py +11 -9
- daytona_api_client/models/organization_user.py +22 -36
- daytona_api_client/models/paginated_snapshots_dto.py +14 -19
- daytona_api_client/models/port_preview_url.py +11 -9
- daytona_api_client/models/position.py +11 -9
- daytona_api_client/models/project_dir_response.py +10 -9
- daytona_api_client/models/range.py +13 -16
- daytona_api_client/models/registry_push_access_dto.py +15 -18
- daytona_api_client/models/replace_request.py +12 -11
- daytona_api_client/models/replace_result.py +12 -9
- daytona_api_client/models/sandbox.py +49 -95
- daytona_api_client/models/sandbox_info.py +13 -18
- daytona_api_client/models/sandbox_labels.py +10 -9
- daytona_api_client/models/sandbox_state.py +18 -16
- daytona_api_client/models/sandbox_volume.py +11 -9
- daytona_api_client/models/search_files_response.py +10 -9
- daytona_api_client/models/session.py +13 -18
- daytona_api_client/models/session_execute_request.py +14 -19
- daytona_api_client/models/session_execute_response.py +13 -14
- daytona_api_client/models/set_snapshot_general_status_dto.py +10 -9
- daytona_api_client/models/snapshot_dto.py +34 -58
- daytona_api_client/models/snapshot_state.py +12 -10
- daytona_api_client/models/storage_access_dto.py +16 -26
- daytona_api_client/models/toggle_state.py +10 -9
- daytona_api_client/models/update_assigned_organization_roles.py +10 -9
- daytona_api_client/models/update_docker_registry.py +12 -11
- daytona_api_client/models/update_organization_invitation.py +15 -16
- daytona_api_client/models/update_organization_member_role.py +12 -11
- daytona_api_client/models/update_organization_quota.py +28 -41
- daytona_api_client/models/update_organization_role.py +15 -28
- daytona_api_client/models/usage_overview.py +17 -28
- daytona_api_client/models/user.py +14 -19
- daytona_api_client/models/user_public_key.py +11 -9
- daytona_api_client/models/volume_dto.py +20 -32
- daytona_api_client/models/volume_state.py +9 -7
- daytona_api_client/models/workspace.py +58 -113
- daytona_api_client/rest.py +77 -26
- {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.5a0.dist-info}/METADATA +1 -1
- daytona_api_client-0.21.5a0.dist-info/RECORD +117 -0
- daytona_api_client-0.21.3a0.dist-info/RECORD +0 -117
- {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.5a0.dist-info}/WHEEL +0 -0
- {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.5a0.dist-info}/top_level.txt +0 -0
|
@@ -24,27 +24,21 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
class CreateOrganizationInvitation(BaseModel):
|
|
29
28
|
"""
|
|
30
29
|
CreateOrganizationInvitation
|
|
31
|
-
"""
|
|
32
|
-
|
|
30
|
+
""" # noqa: E501
|
|
33
31
|
email: StrictStr = Field(description="Email address of the invitee")
|
|
34
32
|
role: StrictStr = Field(description="Organization member role for the invitee")
|
|
35
|
-
assigned_role_ids: List[StrictStr] = Field(
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
expires_at: Optional[datetime] = Field(
|
|
39
|
-
default=None, description="Expiration date of the invitation", alias="expiresAt"
|
|
40
|
-
)
|
|
33
|
+
assigned_role_ids: List[StrictStr] = Field(description="Array of assigned role IDs for the invitee", alias="assignedRoleIds")
|
|
34
|
+
expires_at: Optional[datetime] = Field(default=None, description="Expiration date of the invitation", alias="expiresAt")
|
|
41
35
|
additional_properties: Dict[str, Any] = {}
|
|
42
36
|
__properties: ClassVar[List[str]] = ["email", "role", "assignedRoleIds", "expiresAt"]
|
|
43
37
|
|
|
44
|
-
@field_validator(
|
|
38
|
+
@field_validator('role')
|
|
45
39
|
def role_validate_enum(cls, value):
|
|
46
40
|
"""Validates the enum"""
|
|
47
|
-
if value not in set([
|
|
41
|
+
if value not in set(['owner', 'member']):
|
|
48
42
|
raise ValueError("must be one of enum values ('owner', 'member')")
|
|
49
43
|
return value
|
|
50
44
|
|
|
@@ -54,6 +48,7 @@ class CreateOrganizationInvitation(BaseModel):
|
|
|
54
48
|
protected_namespaces=(),
|
|
55
49
|
)
|
|
56
50
|
|
|
51
|
+
|
|
57
52
|
def to_str(self) -> str:
|
|
58
53
|
"""Returns the string representation of the model using alias"""
|
|
59
54
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -79,11 +74,9 @@ class CreateOrganizationInvitation(BaseModel):
|
|
|
79
74
|
are ignored.
|
|
80
75
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
81
76
|
"""
|
|
82
|
-
excluded_fields: Set[str] = set(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
]
|
|
86
|
-
)
|
|
77
|
+
excluded_fields: Set[str] = set([
|
|
78
|
+
"additional_properties",
|
|
79
|
+
])
|
|
87
80
|
|
|
88
81
|
_dict = self.model_dump(
|
|
89
82
|
by_alias=True,
|
|
@@ -106,17 +99,17 @@ class CreateOrganizationInvitation(BaseModel):
|
|
|
106
99
|
if not isinstance(obj, dict):
|
|
107
100
|
return cls.model_validate(obj)
|
|
108
101
|
|
|
109
|
-
_obj = cls.model_validate(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
)
|
|
102
|
+
_obj = cls.model_validate({
|
|
103
|
+
"email": obj.get("email"),
|
|
104
|
+
"role": obj.get("role") if obj.get("role") is not None else 'member',
|
|
105
|
+
"assignedRoleIds": obj.get("assignedRoleIds"),
|
|
106
|
+
"expiresAt": obj.get("expiresAt")
|
|
107
|
+
})
|
|
117
108
|
# store additional fields in additional_properties
|
|
118
109
|
for _key in obj.keys():
|
|
119
110
|
if _key not in cls.__properties:
|
|
120
111
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
121
112
|
|
|
122
113
|
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -23,12 +23,10 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
class CreateOrganizationQuota(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
CreateOrganizationQuota
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
total_cpu_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalCpuQuota")
|
|
33
31
|
total_memory_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalMemoryQuota")
|
|
34
32
|
total_disk_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalDiskQuota")
|
|
@@ -39,17 +37,7 @@ class CreateOrganizationQuota(BaseModel):
|
|
|
39
37
|
max_snapshot_size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="maxSnapshotSize")
|
|
40
38
|
volume_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="volumeQuota")
|
|
41
39
|
additional_properties: Dict[str, Any] = {}
|
|
42
|
-
__properties: ClassVar[List[str]] = [
|
|
43
|
-
"totalCpuQuota",
|
|
44
|
-
"totalMemoryQuota",
|
|
45
|
-
"totalDiskQuota",
|
|
46
|
-
"maxCpuPerSandbox",
|
|
47
|
-
"maxMemoryPerSandbox",
|
|
48
|
-
"maxDiskPerSandbox",
|
|
49
|
-
"snapshotQuota",
|
|
50
|
-
"maxSnapshotSize",
|
|
51
|
-
"volumeQuota",
|
|
52
|
-
]
|
|
40
|
+
__properties: ClassVar[List[str]] = ["totalCpuQuota", "totalMemoryQuota", "totalDiskQuota", "maxCpuPerSandbox", "maxMemoryPerSandbox", "maxDiskPerSandbox", "snapshotQuota", "maxSnapshotSize", "volumeQuota"]
|
|
53
41
|
|
|
54
42
|
model_config = ConfigDict(
|
|
55
43
|
populate_by_name=True,
|
|
@@ -57,6 +45,7 @@ class CreateOrganizationQuota(BaseModel):
|
|
|
57
45
|
protected_namespaces=(),
|
|
58
46
|
)
|
|
59
47
|
|
|
48
|
+
|
|
60
49
|
def to_str(self) -> str:
|
|
61
50
|
"""Returns the string representation of the model using alias"""
|
|
62
51
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -82,11 +71,9 @@ class CreateOrganizationQuota(BaseModel):
|
|
|
82
71
|
are ignored.
|
|
83
72
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
84
73
|
"""
|
|
85
|
-
excluded_fields: Set[str] = set(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
]
|
|
89
|
-
)
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
"additional_properties",
|
|
76
|
+
])
|
|
90
77
|
|
|
91
78
|
_dict = self.model_dump(
|
|
92
79
|
by_alias=True,
|
|
@@ -109,22 +96,22 @@ class CreateOrganizationQuota(BaseModel):
|
|
|
109
96
|
if not isinstance(obj, dict):
|
|
110
97
|
return cls.model_validate(obj)
|
|
111
98
|
|
|
112
|
-
_obj = cls.model_validate(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
)
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"totalCpuQuota": obj.get("totalCpuQuota"),
|
|
101
|
+
"totalMemoryQuota": obj.get("totalMemoryQuota"),
|
|
102
|
+
"totalDiskQuota": obj.get("totalDiskQuota"),
|
|
103
|
+
"maxCpuPerSandbox": obj.get("maxCpuPerSandbox"),
|
|
104
|
+
"maxMemoryPerSandbox": obj.get("maxMemoryPerSandbox"),
|
|
105
|
+
"maxDiskPerSandbox": obj.get("maxDiskPerSandbox"),
|
|
106
|
+
"snapshotQuota": obj.get("snapshotQuota"),
|
|
107
|
+
"maxSnapshotSize": obj.get("maxSnapshotSize"),
|
|
108
|
+
"volumeQuota": obj.get("volumeQuota")
|
|
109
|
+
})
|
|
125
110
|
# store additional fields in additional_properties
|
|
126
111
|
for _key in obj.keys():
|
|
127
112
|
if _key not in cls.__properties:
|
|
128
113
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
129
114
|
|
|
130
115
|
return _obj
|
|
116
|
+
|
|
117
|
+
|
|
@@ -23,38 +23,22 @@ from typing import Any, ClassVar, Dict, List
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
class CreateOrganizationRole(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
CreateOrganizationRole
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
name: StrictStr = Field(description="The name of the role")
|
|
33
31
|
description: StrictStr = Field(description="The description of the role")
|
|
34
32
|
permissions: List[StrictStr] = Field(description="The list of permissions assigned to the role")
|
|
35
33
|
additional_properties: Dict[str, Any] = {}
|
|
36
34
|
__properties: ClassVar[List[str]] = ["name", "description", "permissions"]
|
|
37
35
|
|
|
38
|
-
@field_validator(
|
|
36
|
+
@field_validator('permissions')
|
|
39
37
|
def permissions_validate_enum(cls, value):
|
|
40
38
|
"""Validates the enum"""
|
|
41
39
|
for i in value:
|
|
42
|
-
if i not in set(
|
|
43
|
-
|
|
44
|
-
"write:registries",
|
|
45
|
-
"delete:registries",
|
|
46
|
-
"write:snapshots",
|
|
47
|
-
"delete:snapshots",
|
|
48
|
-
"write:sandboxes",
|
|
49
|
-
"delete:sandboxes",
|
|
50
|
-
"read:volumes",
|
|
51
|
-
"write:volumes",
|
|
52
|
-
"delete:volumes",
|
|
53
|
-
]
|
|
54
|
-
):
|
|
55
|
-
raise ValueError(
|
|
56
|
-
"each list item must be one of ('write:registries', 'delete:registries', 'write:snapshots', 'delete:snapshots', 'write:sandboxes', 'delete:sandboxes', 'read:volumes', 'write:volumes', 'delete:volumes')"
|
|
57
|
-
)
|
|
40
|
+
if i not in set(['write:registries', 'delete:registries', 'write:snapshots', 'delete:snapshots', 'write:sandboxes', 'delete:sandboxes', 'read:volumes', 'write:volumes', 'delete:volumes']):
|
|
41
|
+
raise ValueError("each list item must be one of ('write:registries', 'delete:registries', 'write:snapshots', 'delete:snapshots', 'write:sandboxes', 'delete:sandboxes', 'read:volumes', 'write:volumes', 'delete:volumes')")
|
|
58
42
|
return value
|
|
59
43
|
|
|
60
44
|
model_config = ConfigDict(
|
|
@@ -63,6 +47,7 @@ class CreateOrganizationRole(BaseModel):
|
|
|
63
47
|
protected_namespaces=(),
|
|
64
48
|
)
|
|
65
49
|
|
|
50
|
+
|
|
66
51
|
def to_str(self) -> str:
|
|
67
52
|
"""Returns the string representation of the model using alias"""
|
|
68
53
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -88,11 +73,9 @@ class CreateOrganizationRole(BaseModel):
|
|
|
88
73
|
are ignored.
|
|
89
74
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
90
75
|
"""
|
|
91
|
-
excluded_fields: Set[str] = set(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
]
|
|
95
|
-
)
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
"additional_properties",
|
|
78
|
+
])
|
|
96
79
|
|
|
97
80
|
_dict = self.model_dump(
|
|
98
81
|
by_alias=True,
|
|
@@ -115,12 +98,16 @@ class CreateOrganizationRole(BaseModel):
|
|
|
115
98
|
if not isinstance(obj, dict):
|
|
116
99
|
return cls.model_validate(obj)
|
|
117
100
|
|
|
118
|
-
_obj = cls.model_validate(
|
|
119
|
-
|
|
120
|
-
|
|
101
|
+
_obj = cls.model_validate({
|
|
102
|
+
"name": obj.get("name"),
|
|
103
|
+
"description": obj.get("description"),
|
|
104
|
+
"permissions": obj.get("permissions")
|
|
105
|
+
})
|
|
121
106
|
# store additional fields in additional_properties
|
|
122
107
|
for _key in obj.keys():
|
|
123
108
|
if _key not in cls.__properties:
|
|
124
109
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
125
110
|
|
|
126
111
|
return _obj
|
|
112
|
+
|
|
113
|
+
|
|
@@ -23,12 +23,10 @@ from typing import Any, ClassVar, Dict, List, Union
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
class CreateRunner(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
CreateRunner
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
domain: StrictStr
|
|
33
31
|
api_url: StrictStr = Field(alias="apiUrl")
|
|
34
32
|
api_key: StrictStr = Field(alias="apiKey")
|
|
@@ -41,31 +39,19 @@ class CreateRunner(BaseModel):
|
|
|
41
39
|
capacity: Union[StrictFloat, StrictInt]
|
|
42
40
|
region: StrictStr
|
|
43
41
|
additional_properties: Dict[str, Any] = {}
|
|
44
|
-
__properties: ClassVar[List[str]] = [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"apiKey",
|
|
48
|
-
"cpu",
|
|
49
|
-
"memory",
|
|
50
|
-
"disk",
|
|
51
|
-
"gpu",
|
|
52
|
-
"gpuType",
|
|
53
|
-
"class",
|
|
54
|
-
"capacity",
|
|
55
|
-
"region",
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
@field_validator("var_class")
|
|
42
|
+
__properties: ClassVar[List[str]] = ["domain", "apiUrl", "apiKey", "cpu", "memory", "disk", "gpu", "gpuType", "class", "capacity", "region"]
|
|
43
|
+
|
|
44
|
+
@field_validator('var_class')
|
|
59
45
|
def var_class_validate_enum(cls, value):
|
|
60
46
|
"""Validates the enum"""
|
|
61
|
-
if value not in set([
|
|
47
|
+
if value not in set(['small', 'medium', 'large']):
|
|
62
48
|
raise ValueError("must be one of enum values ('small', 'medium', 'large')")
|
|
63
49
|
return value
|
|
64
50
|
|
|
65
|
-
@field_validator(
|
|
51
|
+
@field_validator('region')
|
|
66
52
|
def region_validate_enum(cls, value):
|
|
67
53
|
"""Validates the enum"""
|
|
68
|
-
if value not in set([
|
|
54
|
+
if value not in set(['eu', 'us', 'asia']):
|
|
69
55
|
raise ValueError("must be one of enum values ('eu', 'us', 'asia')")
|
|
70
56
|
return value
|
|
71
57
|
|
|
@@ -75,6 +61,7 @@ class CreateRunner(BaseModel):
|
|
|
75
61
|
protected_namespaces=(),
|
|
76
62
|
)
|
|
77
63
|
|
|
64
|
+
|
|
78
65
|
def to_str(self) -> str:
|
|
79
66
|
"""Returns the string representation of the model using alias"""
|
|
80
67
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -100,11 +87,9 @@ class CreateRunner(BaseModel):
|
|
|
100
87
|
are ignored.
|
|
101
88
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
102
89
|
"""
|
|
103
|
-
excluded_fields: Set[str] = set(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
]
|
|
107
|
-
)
|
|
90
|
+
excluded_fields: Set[str] = set([
|
|
91
|
+
"additional_properties",
|
|
92
|
+
])
|
|
108
93
|
|
|
109
94
|
_dict = self.model_dump(
|
|
110
95
|
by_alias=True,
|
|
@@ -127,24 +112,24 @@ class CreateRunner(BaseModel):
|
|
|
127
112
|
if not isinstance(obj, dict):
|
|
128
113
|
return cls.model_validate(obj)
|
|
129
114
|
|
|
130
|
-
_obj = cls.model_validate(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
)
|
|
115
|
+
_obj = cls.model_validate({
|
|
116
|
+
"domain": obj.get("domain"),
|
|
117
|
+
"apiUrl": obj.get("apiUrl"),
|
|
118
|
+
"apiKey": obj.get("apiKey"),
|
|
119
|
+
"cpu": obj.get("cpu"),
|
|
120
|
+
"memory": obj.get("memory"),
|
|
121
|
+
"disk": obj.get("disk"),
|
|
122
|
+
"gpu": obj.get("gpu"),
|
|
123
|
+
"gpuType": obj.get("gpuType"),
|
|
124
|
+
"class": obj.get("class"),
|
|
125
|
+
"capacity": obj.get("capacity"),
|
|
126
|
+
"region": obj.get("region")
|
|
127
|
+
})
|
|
145
128
|
# store additional fields in additional_properties
|
|
146
129
|
for _key in obj.keys():
|
|
147
130
|
if _key not in cls.__properties:
|
|
148
131
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
149
132
|
|
|
150
133
|
return _obj
|
|
134
|
+
|
|
135
|
+
|
|
@@ -25,79 +25,45 @@ from daytona_api_client.models.sandbox_volume import SandboxVolume
|
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
class CreateSandbox(BaseModel):
|
|
30
29
|
"""
|
|
31
30
|
CreateSandbox
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
snapshot: Optional[StrictStr] = Field(
|
|
35
|
-
default=None, description="The ID or name of the snapshot used for the sandbox"
|
|
36
|
-
)
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
snapshot: Optional[StrictStr] = Field(default=None, description="The ID or name of the snapshot used for the sandbox")
|
|
37
33
|
user: Optional[StrictStr] = Field(default=None, description="The user associated with the project")
|
|
38
34
|
env: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variables for the sandbox")
|
|
39
35
|
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels for the sandbox")
|
|
40
|
-
public: Optional[StrictBool] = Field(
|
|
41
|
-
default=None, description="Whether the sandbox http preview is publicly accessible"
|
|
42
|
-
)
|
|
36
|
+
public: Optional[StrictBool] = Field(default=None, description="Whether the sandbox http preview is publicly accessible")
|
|
43
37
|
var_class: Optional[StrictStr] = Field(default=None, description="The sandbox class type", alias="class")
|
|
44
|
-
target: Optional[StrictStr] = Field(
|
|
45
|
-
default=None, description="The target (region) where the sandbox will be created"
|
|
46
|
-
)
|
|
38
|
+
target: Optional[StrictStr] = Field(default=None, description="The target (region) where the sandbox will be created")
|
|
47
39
|
cpu: Optional[StrictInt] = Field(default=None, description="CPU cores allocated to the sandbox")
|
|
48
40
|
gpu: Optional[StrictInt] = Field(default=None, description="GPU units allocated to the sandbox")
|
|
49
41
|
memory: Optional[StrictInt] = Field(default=None, description="Memory allocated to the sandbox in GB")
|
|
50
42
|
disk: Optional[StrictInt] = Field(default=None, description="Disk space allocated to the sandbox in GB")
|
|
51
|
-
auto_stop_interval: Optional[StrictInt] = Field(
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
default=None,
|
|
56
|
-
description="Auto-archive interval in minutes (0 means the maximum interval will be used)",
|
|
57
|
-
alias="autoArchiveInterval",
|
|
58
|
-
)
|
|
59
|
-
volumes: Optional[List[SandboxVolume]] = Field(
|
|
60
|
-
default=None, description="Array of volumes to attach to the sandbox"
|
|
61
|
-
)
|
|
62
|
-
build_info: Optional[CreateBuildInfo] = Field(
|
|
63
|
-
default=None, description="Build information for the sandbox", alias="buildInfo"
|
|
64
|
-
)
|
|
43
|
+
auto_stop_interval: Optional[StrictInt] = Field(default=None, description="Auto-stop interval in minutes (0 means disabled)", alias="autoStopInterval")
|
|
44
|
+
auto_archive_interval: Optional[StrictInt] = Field(default=None, description="Auto-archive interval in minutes (0 means the maximum interval will be used)", alias="autoArchiveInterval")
|
|
45
|
+
volumes: Optional[List[SandboxVolume]] = Field(default=None, description="Array of volumes to attach to the sandbox")
|
|
46
|
+
build_info: Optional[CreateBuildInfo] = Field(default=None, description="Build information for the sandbox", alias="buildInfo")
|
|
65
47
|
additional_properties: Dict[str, Any] = {}
|
|
66
|
-
__properties: ClassVar[List[str]] = [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"env",
|
|
70
|
-
"labels",
|
|
71
|
-
"public",
|
|
72
|
-
"class",
|
|
73
|
-
"target",
|
|
74
|
-
"cpu",
|
|
75
|
-
"gpu",
|
|
76
|
-
"memory",
|
|
77
|
-
"disk",
|
|
78
|
-
"autoStopInterval",
|
|
79
|
-
"autoArchiveInterval",
|
|
80
|
-
"volumes",
|
|
81
|
-
"buildInfo",
|
|
82
|
-
]
|
|
83
|
-
|
|
84
|
-
@field_validator("var_class")
|
|
48
|
+
__properties: ClassVar[List[str]] = ["snapshot", "user", "env", "labels", "public", "class", "target", "cpu", "gpu", "memory", "disk", "autoStopInterval", "autoArchiveInterval", "volumes", "buildInfo"]
|
|
49
|
+
|
|
50
|
+
@field_validator('var_class')
|
|
85
51
|
def var_class_validate_enum(cls, value):
|
|
86
52
|
"""Validates the enum"""
|
|
87
53
|
if value is None:
|
|
88
54
|
return value
|
|
89
55
|
|
|
90
|
-
if value not in set([
|
|
56
|
+
if value not in set(['small', 'medium', 'large']):
|
|
91
57
|
raise ValueError("must be one of enum values ('small', 'medium', 'large')")
|
|
92
58
|
return value
|
|
93
59
|
|
|
94
|
-
@field_validator(
|
|
60
|
+
@field_validator('target')
|
|
95
61
|
def target_validate_enum(cls, value):
|
|
96
62
|
"""Validates the enum"""
|
|
97
63
|
if value is None:
|
|
98
64
|
return value
|
|
99
65
|
|
|
100
|
-
if value not in set([
|
|
66
|
+
if value not in set(['eu', 'us', 'asia']):
|
|
101
67
|
raise ValueError("must be one of enum values ('eu', 'us', 'asia')")
|
|
102
68
|
return value
|
|
103
69
|
|
|
@@ -107,6 +73,7 @@ class CreateSandbox(BaseModel):
|
|
|
107
73
|
protected_namespaces=(),
|
|
108
74
|
)
|
|
109
75
|
|
|
76
|
+
|
|
110
77
|
def to_str(self) -> str:
|
|
111
78
|
"""Returns the string representation of the model using alias"""
|
|
112
79
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -132,11 +99,9 @@ class CreateSandbox(BaseModel):
|
|
|
132
99
|
are ignored.
|
|
133
100
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
134
101
|
"""
|
|
135
|
-
excluded_fields: Set[str] = set(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
]
|
|
139
|
-
)
|
|
102
|
+
excluded_fields: Set[str] = set([
|
|
103
|
+
"additional_properties",
|
|
104
|
+
])
|
|
140
105
|
|
|
141
106
|
_dict = self.model_dump(
|
|
142
107
|
by_alias=True,
|
|
@@ -149,10 +114,10 @@ class CreateSandbox(BaseModel):
|
|
|
149
114
|
for _item_volumes in self.volumes:
|
|
150
115
|
if _item_volumes:
|
|
151
116
|
_items.append(_item_volumes.to_dict())
|
|
152
|
-
_dict[
|
|
117
|
+
_dict['volumes'] = _items
|
|
153
118
|
# override the default output from pydantic by calling `to_dict()` of build_info
|
|
154
119
|
if self.build_info:
|
|
155
|
-
_dict[
|
|
120
|
+
_dict['buildInfo'] = self.build_info.to_dict()
|
|
156
121
|
# puts key-value pairs in additional_properties in the top level
|
|
157
122
|
if self.additional_properties is not None:
|
|
158
123
|
for _key, _value in self.additional_properties.items():
|
|
@@ -169,30 +134,28 @@ class CreateSandbox(BaseModel):
|
|
|
169
134
|
if not isinstance(obj, dict):
|
|
170
135
|
return cls.model_validate(obj)
|
|
171
136
|
|
|
172
|
-
_obj = cls.model_validate(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
else None,
|
|
190
|
-
"buildInfo": CreateBuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
|
|
191
|
-
}
|
|
192
|
-
)
|
|
137
|
+
_obj = cls.model_validate({
|
|
138
|
+
"snapshot": obj.get("snapshot"),
|
|
139
|
+
"user": obj.get("user"),
|
|
140
|
+
"env": obj.get("env"),
|
|
141
|
+
"labels": obj.get("labels"),
|
|
142
|
+
"public": obj.get("public"),
|
|
143
|
+
"class": obj.get("class"),
|
|
144
|
+
"target": obj.get("target"),
|
|
145
|
+
"cpu": obj.get("cpu"),
|
|
146
|
+
"gpu": obj.get("gpu"),
|
|
147
|
+
"memory": obj.get("memory"),
|
|
148
|
+
"disk": obj.get("disk"),
|
|
149
|
+
"autoStopInterval": obj.get("autoStopInterval"),
|
|
150
|
+
"autoArchiveInterval": obj.get("autoArchiveInterval"),
|
|
151
|
+
"volumes": [SandboxVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None,
|
|
152
|
+
"buildInfo": CreateBuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None
|
|
153
|
+
})
|
|
193
154
|
# store additional fields in additional_properties
|
|
194
155
|
for _key in obj.keys():
|
|
195
156
|
if _key not in cls.__properties:
|
|
196
157
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
197
158
|
|
|
198
159
|
return _obj
|
|
160
|
+
|
|
161
|
+
|
|
@@ -23,12 +23,10 @@ from typing import Any, ClassVar, Dict, List
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
class CreateSessionRequest(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
CreateSessionRequest
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
session_id: StrictStr = Field(description="The ID of the session", alias="sessionId")
|
|
33
31
|
additional_properties: Dict[str, Any] = {}
|
|
34
32
|
__properties: ClassVar[List[str]] = ["sessionId"]
|
|
@@ -39,6 +37,7 @@ class CreateSessionRequest(BaseModel):
|
|
|
39
37
|
protected_namespaces=(),
|
|
40
38
|
)
|
|
41
39
|
|
|
40
|
+
|
|
42
41
|
def to_str(self) -> str:
|
|
43
42
|
"""Returns the string representation of the model using alias"""
|
|
44
43
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -64,11 +63,9 @@ class CreateSessionRequest(BaseModel):
|
|
|
64
63
|
are ignored.
|
|
65
64
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
65
|
"""
|
|
67
|
-
excluded_fields: Set[str] = set(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
]
|
|
71
|
-
)
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
72
69
|
|
|
73
70
|
_dict = self.model_dump(
|
|
74
71
|
by_alias=True,
|
|
@@ -91,10 +88,14 @@ class CreateSessionRequest(BaseModel):
|
|
|
91
88
|
if not isinstance(obj, dict):
|
|
92
89
|
return cls.model_validate(obj)
|
|
93
90
|
|
|
94
|
-
_obj = cls.model_validate({
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"sessionId": obj.get("sessionId")
|
|
93
|
+
})
|
|
95
94
|
# store additional fields in additional_properties
|
|
96
95
|
for _key in obj.keys():
|
|
97
96
|
if _key not in cls.__properties:
|
|
98
97
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
98
|
|
|
100
99
|
return _obj
|
|
100
|
+
|
|
101
|
+
|