daytona_api_client 0.21.3a0__py3-none-any.whl → 0.21.4a4__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.4a4.dist-info}/METADATA +1 -1
- daytona_api_client-0.21.4a4.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.4a4.dist-info}/WHEEL +0 -0
- {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.4a4.dist-info}/top_level.txt +0 -0
|
@@ -24,37 +24,21 @@ from daytona_api_client.models.create_build_info import CreateBuildInfo
|
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
class CreateSnapshot(BaseModel):
|
|
29
28
|
"""
|
|
30
29
|
CreateSnapshot
|
|
31
|
-
"""
|
|
32
|
-
|
|
30
|
+
""" # noqa: E501
|
|
33
31
|
name: StrictStr = Field(description="The name of the snapshot")
|
|
34
|
-
image_name: Optional[StrictStr] = Field(
|
|
35
|
-
default=None, description="The image name of the snapshot", alias="imageName"
|
|
36
|
-
)
|
|
32
|
+
image_name: Optional[StrictStr] = Field(default=None, description="The image name of the snapshot", alias="imageName")
|
|
37
33
|
entrypoint: Optional[List[StrictStr]] = Field(default=None, description="The entrypoint command for the snapshot")
|
|
38
34
|
general: Optional[StrictBool] = Field(default=None, description="Whether the snapshot is general")
|
|
39
35
|
cpu: Optional[StrictInt] = Field(default=None, description="CPU cores allocated to the resulting sandbox")
|
|
40
36
|
gpu: Optional[StrictInt] = Field(default=None, description="GPU units allocated to the resulting sandbox")
|
|
41
37
|
memory: Optional[StrictInt] = Field(default=None, description="Memory allocated to the resulting sandbox in GB")
|
|
42
38
|
disk: Optional[StrictInt] = Field(default=None, description="Disk space allocated to the sandbox in GB")
|
|
43
|
-
build_info: Optional[CreateBuildInfo] = Field(
|
|
44
|
-
default=None, description="Build information for the snapshot", alias="buildInfo"
|
|
45
|
-
)
|
|
39
|
+
build_info: Optional[CreateBuildInfo] = Field(default=None, description="Build information for the snapshot", alias="buildInfo")
|
|
46
40
|
additional_properties: Dict[str, Any] = {}
|
|
47
|
-
__properties: ClassVar[List[str]] = [
|
|
48
|
-
"name",
|
|
49
|
-
"imageName",
|
|
50
|
-
"entrypoint",
|
|
51
|
-
"general",
|
|
52
|
-
"cpu",
|
|
53
|
-
"gpu",
|
|
54
|
-
"memory",
|
|
55
|
-
"disk",
|
|
56
|
-
"buildInfo",
|
|
57
|
-
]
|
|
41
|
+
__properties: ClassVar[List[str]] = ["name", "imageName", "entrypoint", "general", "cpu", "gpu", "memory", "disk", "buildInfo"]
|
|
58
42
|
|
|
59
43
|
model_config = ConfigDict(
|
|
60
44
|
populate_by_name=True,
|
|
@@ -62,6 +46,7 @@ class CreateSnapshot(BaseModel):
|
|
|
62
46
|
protected_namespaces=(),
|
|
63
47
|
)
|
|
64
48
|
|
|
49
|
+
|
|
65
50
|
def to_str(self) -> str:
|
|
66
51
|
"""Returns the string representation of the model using alias"""
|
|
67
52
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -87,11 +72,9 @@ class CreateSnapshot(BaseModel):
|
|
|
87
72
|
are ignored.
|
|
88
73
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
89
74
|
"""
|
|
90
|
-
excluded_fields: Set[str] = set(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]
|
|
94
|
-
)
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
"additional_properties",
|
|
77
|
+
])
|
|
95
78
|
|
|
96
79
|
_dict = self.model_dump(
|
|
97
80
|
by_alias=True,
|
|
@@ -100,7 +83,7 @@ class CreateSnapshot(BaseModel):
|
|
|
100
83
|
)
|
|
101
84
|
# override the default output from pydantic by calling `to_dict()` of build_info
|
|
102
85
|
if self.build_info:
|
|
103
|
-
_dict[
|
|
86
|
+
_dict['buildInfo'] = self.build_info.to_dict()
|
|
104
87
|
# puts key-value pairs in additional_properties in the top level
|
|
105
88
|
if self.additional_properties is not None:
|
|
106
89
|
for _key, _value in self.additional_properties.items():
|
|
@@ -117,22 +100,22 @@ class CreateSnapshot(BaseModel):
|
|
|
117
100
|
if not isinstance(obj, dict):
|
|
118
101
|
return cls.model_validate(obj)
|
|
119
102
|
|
|
120
|
-
_obj = cls.model_validate(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
)
|
|
103
|
+
_obj = cls.model_validate({
|
|
104
|
+
"name": obj.get("name"),
|
|
105
|
+
"imageName": obj.get("imageName"),
|
|
106
|
+
"entrypoint": obj.get("entrypoint"),
|
|
107
|
+
"general": obj.get("general"),
|
|
108
|
+
"cpu": obj.get("cpu"),
|
|
109
|
+
"gpu": obj.get("gpu"),
|
|
110
|
+
"memory": obj.get("memory"),
|
|
111
|
+
"disk": obj.get("disk"),
|
|
112
|
+
"buildInfo": CreateBuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None
|
|
113
|
+
})
|
|
133
114
|
# store additional fields in additional_properties
|
|
134
115
|
for _key in obj.keys():
|
|
135
116
|
if _key not in cls.__properties:
|
|
136
117
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
137
118
|
|
|
138
119
|
return _obj
|
|
120
|
+
|
|
121
|
+
|
|
@@ -24,30 +24,26 @@ from daytona_api_client.models.create_organization_quota import CreateOrganizati
|
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
class CreateUser(BaseModel):
|
|
29
28
|
"""
|
|
30
29
|
CreateUser
|
|
31
|
-
"""
|
|
32
|
-
|
|
30
|
+
""" # noqa: E501
|
|
33
31
|
id: StrictStr
|
|
34
32
|
name: StrictStr
|
|
35
33
|
email: Optional[StrictStr] = None
|
|
36
|
-
personal_organization_quota: Optional[CreateOrganizationQuota] = Field(
|
|
37
|
-
default=None, alias="personalOrganizationQuota"
|
|
38
|
-
)
|
|
34
|
+
personal_organization_quota: Optional[CreateOrganizationQuota] = Field(default=None, alias="personalOrganizationQuota")
|
|
39
35
|
role: Optional[StrictStr] = None
|
|
40
36
|
email_verified: Optional[StrictBool] = Field(default=None, alias="emailVerified")
|
|
41
37
|
additional_properties: Dict[str, Any] = {}
|
|
42
38
|
__properties: ClassVar[List[str]] = ["id", "name", "email", "personalOrganizationQuota", "role", "emailVerified"]
|
|
43
39
|
|
|
44
|
-
@field_validator(
|
|
40
|
+
@field_validator('role')
|
|
45
41
|
def role_validate_enum(cls, value):
|
|
46
42
|
"""Validates the enum"""
|
|
47
43
|
if value is None:
|
|
48
44
|
return value
|
|
49
45
|
|
|
50
|
-
if value not in set([
|
|
46
|
+
if value not in set(['admin', 'user']):
|
|
51
47
|
raise ValueError("must be one of enum values ('admin', 'user')")
|
|
52
48
|
return value
|
|
53
49
|
|
|
@@ -57,6 +53,7 @@ class CreateUser(BaseModel):
|
|
|
57
53
|
protected_namespaces=(),
|
|
58
54
|
)
|
|
59
55
|
|
|
56
|
+
|
|
60
57
|
def to_str(self) -> str:
|
|
61
58
|
"""Returns the string representation of the model using alias"""
|
|
62
59
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -82,11 +79,9 @@ class CreateUser(BaseModel):
|
|
|
82
79
|
are ignored.
|
|
83
80
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
84
81
|
"""
|
|
85
|
-
excluded_fields: Set[str] = set(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
]
|
|
89
|
-
)
|
|
82
|
+
excluded_fields: Set[str] = set([
|
|
83
|
+
"additional_properties",
|
|
84
|
+
])
|
|
90
85
|
|
|
91
86
|
_dict = self.model_dump(
|
|
92
87
|
by_alias=True,
|
|
@@ -95,7 +90,7 @@ class CreateUser(BaseModel):
|
|
|
95
90
|
)
|
|
96
91
|
# override the default output from pydantic by calling `to_dict()` of personal_organization_quota
|
|
97
92
|
if self.personal_organization_quota:
|
|
98
|
-
_dict[
|
|
93
|
+
_dict['personalOrganizationQuota'] = self.personal_organization_quota.to_dict()
|
|
99
94
|
# puts key-value pairs in additional_properties in the top level
|
|
100
95
|
if self.additional_properties is not None:
|
|
101
96
|
for _key, _value in self.additional_properties.items():
|
|
@@ -112,21 +107,19 @@ class CreateUser(BaseModel):
|
|
|
112
107
|
if not isinstance(obj, dict):
|
|
113
108
|
return cls.model_validate(obj)
|
|
114
109
|
|
|
115
|
-
_obj = cls.model_validate(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"role": obj.get("role"),
|
|
124
|
-
"emailVerified": obj.get("emailVerified"),
|
|
125
|
-
}
|
|
126
|
-
)
|
|
110
|
+
_obj = cls.model_validate({
|
|
111
|
+
"id": obj.get("id"),
|
|
112
|
+
"name": obj.get("name"),
|
|
113
|
+
"email": obj.get("email"),
|
|
114
|
+
"personalOrganizationQuota": CreateOrganizationQuota.from_dict(obj["personalOrganizationQuota"]) if obj.get("personalOrganizationQuota") is not None else None,
|
|
115
|
+
"role": obj.get("role"),
|
|
116
|
+
"emailVerified": obj.get("emailVerified")
|
|
117
|
+
})
|
|
127
118
|
# store additional fields in additional_properties
|
|
128
119
|
for _key in obj.keys():
|
|
129
120
|
if _key not in cls.__properties:
|
|
130
121
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
131
122
|
|
|
132
123
|
return _obj
|
|
124
|
+
|
|
125
|
+
|
|
@@ -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 CreateVolume(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
CreateVolume
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
name: StrictStr
|
|
33
31
|
additional_properties: Dict[str, Any] = {}
|
|
34
32
|
__properties: ClassVar[List[str]] = ["name"]
|
|
@@ -39,6 +37,7 @@ class CreateVolume(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 CreateVolume(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 CreateVolume(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
|
+
"name": obj.get("name")
|
|
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
|
+
|
|
@@ -25,77 +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 CreateWorkspace(BaseModel):
|
|
30
29
|
"""
|
|
31
30
|
CreateWorkspace
|
|
32
|
-
"""
|
|
33
|
-
|
|
31
|
+
""" # noqa: E501
|
|
34
32
|
image: Optional[StrictStr] = Field(default=None, description="The image used for the workspace")
|
|
35
33
|
user: Optional[StrictStr] = Field(default=None, description="The user associated with the project")
|
|
36
34
|
env: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variables for the workspace")
|
|
37
35
|
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels for the workspace")
|
|
38
|
-
public: Optional[StrictBool] = Field(
|
|
39
|
-
default=None, description="Whether the workspace http preview is publicly accessible"
|
|
40
|
-
)
|
|
36
|
+
public: Optional[StrictBool] = Field(default=None, description="Whether the workspace http preview is publicly accessible")
|
|
41
37
|
var_class: Optional[StrictStr] = Field(default=None, description="The workspace class type", alias="class")
|
|
42
|
-
target: Optional[StrictStr] = Field(
|
|
43
|
-
default=None, description="The target (region) where the workspace will be created"
|
|
44
|
-
)
|
|
38
|
+
target: Optional[StrictStr] = Field(default=None, description="The target (region) where the workspace will be created")
|
|
45
39
|
cpu: Optional[StrictInt] = Field(default=None, description="CPU cores allocated to the workspace")
|
|
46
40
|
gpu: Optional[StrictInt] = Field(default=None, description="GPU units allocated to the workspace")
|
|
47
41
|
memory: Optional[StrictInt] = Field(default=None, description="Memory allocated to the workspace in GB")
|
|
48
42
|
disk: Optional[StrictInt] = Field(default=None, description="Disk space allocated to the workspace in GB")
|
|
49
|
-
auto_stop_interval: Optional[StrictInt] = Field(
|
|
50
|
-
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
default=None,
|
|
54
|
-
description="Auto-archive interval in minutes (0 means the maximum interval will be used)",
|
|
55
|
-
alias="autoArchiveInterval",
|
|
56
|
-
)
|
|
57
|
-
volumes: Optional[List[SandboxVolume]] = Field(
|
|
58
|
-
default=None, description="Array of volumes to attach to the workspace"
|
|
59
|
-
)
|
|
60
|
-
build_info: Optional[CreateBuildInfo] = Field(
|
|
61
|
-
default=None, description="Build information for the workspace", alias="buildInfo"
|
|
62
|
-
)
|
|
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 workspace")
|
|
46
|
+
build_info: Optional[CreateBuildInfo] = Field(default=None, description="Build information for the workspace", alias="buildInfo")
|
|
63
47
|
additional_properties: Dict[str, Any] = {}
|
|
64
|
-
__properties: ClassVar[List[str]] = [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"env",
|
|
68
|
-
"labels",
|
|
69
|
-
"public",
|
|
70
|
-
"class",
|
|
71
|
-
"target",
|
|
72
|
-
"cpu",
|
|
73
|
-
"gpu",
|
|
74
|
-
"memory",
|
|
75
|
-
"disk",
|
|
76
|
-
"autoStopInterval",
|
|
77
|
-
"autoArchiveInterval",
|
|
78
|
-
"volumes",
|
|
79
|
-
"buildInfo",
|
|
80
|
-
]
|
|
81
|
-
|
|
82
|
-
@field_validator("var_class")
|
|
48
|
+
__properties: ClassVar[List[str]] = ["image", "user", "env", "labels", "public", "class", "target", "cpu", "gpu", "memory", "disk", "autoStopInterval", "autoArchiveInterval", "volumes", "buildInfo"]
|
|
49
|
+
|
|
50
|
+
@field_validator('var_class')
|
|
83
51
|
def var_class_validate_enum(cls, value):
|
|
84
52
|
"""Validates the enum"""
|
|
85
53
|
if value is None:
|
|
86
54
|
return value
|
|
87
55
|
|
|
88
|
-
if value not in set([
|
|
56
|
+
if value not in set(['small', 'medium', 'large']):
|
|
89
57
|
raise ValueError("must be one of enum values ('small', 'medium', 'large')")
|
|
90
58
|
return value
|
|
91
59
|
|
|
92
|
-
@field_validator(
|
|
60
|
+
@field_validator('target')
|
|
93
61
|
def target_validate_enum(cls, value):
|
|
94
62
|
"""Validates the enum"""
|
|
95
63
|
if value is None:
|
|
96
64
|
return value
|
|
97
65
|
|
|
98
|
-
if value not in set([
|
|
66
|
+
if value not in set(['eu', 'us', 'asia']):
|
|
99
67
|
raise ValueError("must be one of enum values ('eu', 'us', 'asia')")
|
|
100
68
|
return value
|
|
101
69
|
|
|
@@ -105,6 +73,7 @@ class CreateWorkspace(BaseModel):
|
|
|
105
73
|
protected_namespaces=(),
|
|
106
74
|
)
|
|
107
75
|
|
|
76
|
+
|
|
108
77
|
def to_str(self) -> str:
|
|
109
78
|
"""Returns the string representation of the model using alias"""
|
|
110
79
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -130,11 +99,9 @@ class CreateWorkspace(BaseModel):
|
|
|
130
99
|
are ignored.
|
|
131
100
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
132
101
|
"""
|
|
133
|
-
excluded_fields: Set[str] = set(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
]
|
|
137
|
-
)
|
|
102
|
+
excluded_fields: Set[str] = set([
|
|
103
|
+
"additional_properties",
|
|
104
|
+
])
|
|
138
105
|
|
|
139
106
|
_dict = self.model_dump(
|
|
140
107
|
by_alias=True,
|
|
@@ -147,10 +114,10 @@ class CreateWorkspace(BaseModel):
|
|
|
147
114
|
for _item_volumes in self.volumes:
|
|
148
115
|
if _item_volumes:
|
|
149
116
|
_items.append(_item_volumes.to_dict())
|
|
150
|
-
_dict[
|
|
117
|
+
_dict['volumes'] = _items
|
|
151
118
|
# override the default output from pydantic by calling `to_dict()` of build_info
|
|
152
119
|
if self.build_info:
|
|
153
|
-
_dict[
|
|
120
|
+
_dict['buildInfo'] = self.build_info.to_dict()
|
|
154
121
|
# puts key-value pairs in additional_properties in the top level
|
|
155
122
|
if self.additional_properties is not None:
|
|
156
123
|
for _key, _value in self.additional_properties.items():
|
|
@@ -167,30 +134,28 @@ class CreateWorkspace(BaseModel):
|
|
|
167
134
|
if not isinstance(obj, dict):
|
|
168
135
|
return cls.model_validate(obj)
|
|
169
136
|
|
|
170
|
-
_obj = cls.model_validate(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
else None,
|
|
188
|
-
"buildInfo": CreateBuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
|
|
189
|
-
}
|
|
190
|
-
)
|
|
137
|
+
_obj = cls.model_validate({
|
|
138
|
+
"image": obj.get("image"),
|
|
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
|
+
})
|
|
191
154
|
# store additional fields in additional_properties
|
|
192
155
|
for _key in obj.keys():
|
|
193
156
|
if _key not in cls.__properties:
|
|
194
157
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
195
158
|
|
|
196
159
|
return _obj
|
|
160
|
+
|
|
161
|
+
|
|
@@ -24,12 +24,10 @@ from typing import Any, ClassVar, Dict, List
|
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
class DockerRegistry(BaseModel):
|
|
29
28
|
"""
|
|
30
29
|
DockerRegistry
|
|
31
|
-
"""
|
|
32
|
-
|
|
30
|
+
""" # noqa: E501
|
|
33
31
|
id: StrictStr = Field(description="Registry ID")
|
|
34
32
|
name: StrictStr = Field(description="Registry name")
|
|
35
33
|
url: StrictStr = Field(description="Registry URL")
|
|
@@ -39,21 +37,12 @@ class DockerRegistry(BaseModel):
|
|
|
39
37
|
created_at: datetime = Field(description="Creation timestamp", alias="createdAt")
|
|
40
38
|
updated_at: datetime = Field(description="Last update timestamp", alias="updatedAt")
|
|
41
39
|
additional_properties: Dict[str, Any] = {}
|
|
42
|
-
__properties: ClassVar[List[str]] = [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"url",
|
|
46
|
-
"username",
|
|
47
|
-
"project",
|
|
48
|
-
"registryType",
|
|
49
|
-
"createdAt",
|
|
50
|
-
"updatedAt",
|
|
51
|
-
]
|
|
52
|
-
|
|
53
|
-
@field_validator("registry_type")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["id", "name", "url", "username", "project", "registryType", "createdAt", "updatedAt"]
|
|
41
|
+
|
|
42
|
+
@field_validator('registry_type')
|
|
54
43
|
def registry_type_validate_enum(cls, value):
|
|
55
44
|
"""Validates the enum"""
|
|
56
|
-
if value not in set([
|
|
45
|
+
if value not in set(['internal', 'organization', 'public', 'transient']):
|
|
57
46
|
raise ValueError("must be one of enum values ('internal', 'organization', 'public', 'transient')")
|
|
58
47
|
return value
|
|
59
48
|
|
|
@@ -63,6 +52,7 @@ class DockerRegistry(BaseModel):
|
|
|
63
52
|
protected_namespaces=(),
|
|
64
53
|
)
|
|
65
54
|
|
|
55
|
+
|
|
66
56
|
def to_str(self) -> str:
|
|
67
57
|
"""Returns the string representation of the model using alias"""
|
|
68
58
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -88,11 +78,9 @@ class DockerRegistry(BaseModel):
|
|
|
88
78
|
are ignored.
|
|
89
79
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
90
80
|
"""
|
|
91
|
-
excluded_fields: Set[str] = set(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
]
|
|
95
|
-
)
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
"additional_properties",
|
|
83
|
+
])
|
|
96
84
|
|
|
97
85
|
_dict = self.model_dump(
|
|
98
86
|
by_alias=True,
|
|
@@ -115,21 +103,21 @@ class DockerRegistry(BaseModel):
|
|
|
115
103
|
if not isinstance(obj, dict):
|
|
116
104
|
return cls.model_validate(obj)
|
|
117
105
|
|
|
118
|
-
_obj = cls.model_validate(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
)
|
|
106
|
+
_obj = cls.model_validate({
|
|
107
|
+
"id": obj.get("id"),
|
|
108
|
+
"name": obj.get("name"),
|
|
109
|
+
"url": obj.get("url"),
|
|
110
|
+
"username": obj.get("username"),
|
|
111
|
+
"project": obj.get("project"),
|
|
112
|
+
"registryType": obj.get("registryType"),
|
|
113
|
+
"createdAt": obj.get("createdAt"),
|
|
114
|
+
"updatedAt": obj.get("updatedAt")
|
|
115
|
+
})
|
|
130
116
|
# store additional fields in additional_properties
|
|
131
117
|
for _key in obj.keys():
|
|
132
118
|
if _key not in cls.__properties:
|
|
133
119
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
134
120
|
|
|
135
121
|
return _obj
|
|
122
|
+
|
|
123
|
+
|
|
@@ -23,17 +23,13 @@ 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 ExecuteRequest(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
ExecuteRequest
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
command: StrictStr
|
|
33
31
|
cwd: Optional[StrictStr] = Field(default=None, description="Current working directory")
|
|
34
|
-
timeout: Optional[Union[StrictFloat, StrictInt]] = Field(
|
|
35
|
-
default=None, description="Timeout in seconds, defaults to 10 seconds"
|
|
36
|
-
)
|
|
32
|
+
timeout: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timeout in seconds, defaults to 10 seconds")
|
|
37
33
|
additional_properties: Dict[str, Any] = {}
|
|
38
34
|
__properties: ClassVar[List[str]] = ["command", "cwd", "timeout"]
|
|
39
35
|
|
|
@@ -43,6 +39,7 @@ class ExecuteRequest(BaseModel):
|
|
|
43
39
|
protected_namespaces=(),
|
|
44
40
|
)
|
|
45
41
|
|
|
42
|
+
|
|
46
43
|
def to_str(self) -> str:
|
|
47
44
|
"""Returns the string representation of the model using alias"""
|
|
48
45
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -68,11 +65,9 @@ class ExecuteRequest(BaseModel):
|
|
|
68
65
|
are ignored.
|
|
69
66
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
67
|
"""
|
|
71
|
-
excluded_fields: Set[str] = set(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
]
|
|
75
|
-
)
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
"additional_properties",
|
|
70
|
+
])
|
|
76
71
|
|
|
77
72
|
_dict = self.model_dump(
|
|
78
73
|
by_alias=True,
|
|
@@ -95,10 +90,16 @@ class ExecuteRequest(BaseModel):
|
|
|
95
90
|
if not isinstance(obj, dict):
|
|
96
91
|
return cls.model_validate(obj)
|
|
97
92
|
|
|
98
|
-
_obj = cls.model_validate({
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"command": obj.get("command"),
|
|
95
|
+
"cwd": obj.get("cwd"),
|
|
96
|
+
"timeout": obj.get("timeout")
|
|
97
|
+
})
|
|
99
98
|
# store additional fields in additional_properties
|
|
100
99
|
for _key in obj.keys():
|
|
101
100
|
if _key not in cls.__properties:
|
|
102
101
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
103
102
|
|
|
104
103
|
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -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 ExecuteResponse(BaseModel):
|
|
28
27
|
"""
|
|
29
28
|
ExecuteResponse
|
|
30
|
-
"""
|
|
31
|
-
|
|
29
|
+
""" # noqa: E501
|
|
32
30
|
exit_code: Union[StrictFloat, StrictInt] = Field(description="Exit code", alias="exitCode")
|
|
33
31
|
result: StrictStr = Field(description="Command output")
|
|
34
32
|
additional_properties: Dict[str, Any] = {}
|
|
@@ -40,6 +38,7 @@ class ExecuteResponse(BaseModel):
|
|
|
40
38
|
protected_namespaces=(),
|
|
41
39
|
)
|
|
42
40
|
|
|
41
|
+
|
|
43
42
|
def to_str(self) -> str:
|
|
44
43
|
"""Returns the string representation of the model using alias"""
|
|
45
44
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -65,11 +64,9 @@ class ExecuteResponse(BaseModel):
|
|
|
65
64
|
are ignored.
|
|
66
65
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
66
|
"""
|
|
68
|
-
excluded_fields: Set[str] = set(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
]
|
|
72
|
-
)
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
73
70
|
|
|
74
71
|
_dict = self.model_dump(
|
|
75
72
|
by_alias=True,
|
|
@@ -92,10 +89,15 @@ class ExecuteResponse(BaseModel):
|
|
|
92
89
|
if not isinstance(obj, dict):
|
|
93
90
|
return cls.model_validate(obj)
|
|
94
91
|
|
|
95
|
-
_obj = cls.model_validate({
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"exitCode": obj.get("exitCode"),
|
|
94
|
+
"result": obj.get("result")
|
|
95
|
+
})
|
|
96
96
|
# store additional fields in additional_properties
|
|
97
97
|
for _key in obj.keys():
|
|
98
98
|
if _key not in cls.__properties:
|
|
99
99
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
100
100
|
|
|
101
101
|
return _obj
|
|
102
|
+
|
|
103
|
+
|