daytona_api_client_async 0.21.3a0__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_async might be problematic. Click here for more details.
- daytona_api_client_async/__init__.py +129 -0
- daytona_api_client_async/api/__init__.py +16 -0
- daytona_api_client_async/api/api_keys_api.py +1391 -0
- daytona_api_client_async/api/docker_registry_api.py +1965 -0
- daytona_api_client_async/api/images_api.py +2350 -0
- daytona_api_client_async/api/nodes_api.py +792 -0
- daytona_api_client_async/api/object_storage_api.py +298 -0
- daytona_api_client_async/api/organizations_api.py +6762 -0
- daytona_api_client_async/api/preview_api.py +819 -0
- daytona_api_client_async/api/runners_api.py +792 -0
- daytona_api_client_async/api/sandbox_api.py +3994 -0
- daytona_api_client_async/api/snapshots_api.py +2059 -0
- daytona_api_client_async/api/toolbox_api.py +11819 -0
- daytona_api_client_async/api/users_api.py +2075 -0
- daytona_api_client_async/api/volumes_api.py +1419 -0
- daytona_api_client_async/api/workspace_api.py +4036 -0
- daytona_api_client_async/api_client.py +801 -0
- daytona_api_client_async/api_response.py +21 -0
- daytona_api_client_async/configuration.py +579 -0
- daytona_api_client_async/exceptions.py +217 -0
- daytona_api_client_async/models/__init__.py +101 -0
- daytona_api_client_async/models/account_provider.py +103 -0
- daytona_api_client_async/models/api_key_list.py +130 -0
- daytona_api_client_async/models/api_key_response.py +123 -0
- daytona_api_client_async/models/build_image.py +107 -0
- daytona_api_client_async/models/build_info.py +108 -0
- daytona_api_client_async/models/build_snapshot.py +115 -0
- daytona_api_client_async/models/command.py +105 -0
- daytona_api_client_async/models/completion_context.py +103 -0
- daytona_api_client_async/models/completion_item.py +113 -0
- daytona_api_client_async/models/completion_list.py +111 -0
- daytona_api_client_async/models/create_api_key.py +119 -0
- daytona_api_client_async/models/create_build_info.py +103 -0
- daytona_api_client_async/models/create_docker_registry.py +120 -0
- daytona_api_client_async/models/create_image.py +105 -0
- daytona_api_client_async/models/create_linked_account.py +103 -0
- daytona_api_client_async/models/create_node.py +135 -0
- daytona_api_client_async/models/create_organization.py +101 -0
- daytona_api_client_async/models/create_organization_invitation.py +115 -0
- daytona_api_client_async/models/create_organization_quota.py +117 -0
- daytona_api_client_async/models/create_organization_role.py +113 -0
- daytona_api_client_async/models/create_runner.py +135 -0
- daytona_api_client_async/models/create_sandbox.py +161 -0
- daytona_api_client_async/models/create_session_request.py +101 -0
- daytona_api_client_async/models/create_snapshot.py +121 -0
- daytona_api_client_async/models/create_user.py +125 -0
- daytona_api_client_async/models/create_volume.py +101 -0
- daytona_api_client_async/models/create_workspace.py +161 -0
- daytona_api_client_async/models/docker_registry.py +123 -0
- daytona_api_client_async/models/execute_request.py +105 -0
- daytona_api_client_async/models/execute_response.py +103 -0
- daytona_api_client_async/models/file_info.py +115 -0
- daytona_api_client_async/models/file_status.py +107 -0
- daytona_api_client_async/models/git_add_request.py +103 -0
- daytona_api_client_async/models/git_branch_request.py +103 -0
- daytona_api_client_async/models/git_checkout_request.py +103 -0
- daytona_api_client_async/models/git_clone_request.py +111 -0
- daytona_api_client_async/models/git_commit_info.py +109 -0
- daytona_api_client_async/models/git_commit_request.py +107 -0
- daytona_api_client_async/models/git_commit_response.py +101 -0
- daytona_api_client_async/models/git_delete_branch_request.py +103 -0
- daytona_api_client_async/models/git_repo_request.py +105 -0
- daytona_api_client_async/models/git_status.py +117 -0
- daytona_api_client_async/models/image_dto.py +145 -0
- daytona_api_client_async/models/image_state.py +45 -0
- daytona_api_client_async/models/list_branch_response.py +101 -0
- daytona_api_client_async/models/lsp_completion_params.py +117 -0
- daytona_api_client_async/models/lsp_document_request.py +105 -0
- daytona_api_client_async/models/lsp_location.py +107 -0
- daytona_api_client_async/models/lsp_server_request.py +103 -0
- daytona_api_client_async/models/lsp_symbol.py +109 -0
- daytona_api_client_async/models/match.py +105 -0
- daytona_api_client_async/models/organization.py +120 -0
- daytona_api_client_async/models/organization_invitation.py +144 -0
- daytona_api_client_async/models/organization_role.py +122 -0
- daytona_api_client_async/models/organization_suspension.py +104 -0
- daytona_api_client_async/models/organization_user.py +131 -0
- daytona_api_client_async/models/paginated_images_dto.py +115 -0
- daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
- daytona_api_client_async/models/port_preview_url.py +103 -0
- daytona_api_client_async/models/position.py +103 -0
- daytona_api_client_async/models/project_dir_response.py +101 -0
- daytona_api_client_async/models/range.py +110 -0
- daytona_api_client_async/models/registry_push_access_dto.py +111 -0
- daytona_api_client_async/models/replace_request.py +105 -0
- daytona_api_client_async/models/replace_result.py +105 -0
- daytona_api_client_async/models/sandbox.py +180 -0
- daytona_api_client_async/models/sandbox_info.py +105 -0
- daytona_api_client_async/models/sandbox_labels.py +101 -0
- daytona_api_client_async/models/sandbox_state.py +52 -0
- daytona_api_client_async/models/sandbox_volume.py +103 -0
- daytona_api_client_async/models/search_files_response.py +101 -0
- daytona_api_client_async/models/session.py +116 -0
- daytona_api_client_async/models/session_execute_request.py +105 -0
- daytona_api_client_async/models/session_execute_response.py +105 -0
- daytona_api_client_async/models/set_image_general_status.py +101 -0
- daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
- daytona_api_client_async/models/snapshot_dto.py +161 -0
- daytona_api_client_async/models/snapshot_state.py +46 -0
- daytona_api_client_async/models/storage_access_dto.py +111 -0
- daytona_api_client_async/models/toggle_state.py +101 -0
- daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
- daytona_api_client_async/models/update_docker_registry.py +105 -0
- daytona_api_client_async/models/update_organization_invitation.py +113 -0
- daytona_api_client_async/models/update_organization_member_role.py +108 -0
- daytona_api_client_async/models/update_organization_quota.py +162 -0
- daytona_api_client_async/models/update_organization_role.py +113 -0
- daytona_api_client_async/models/usage_overview.py +113 -0
- daytona_api_client_async/models/user.py +115 -0
- daytona_api_client_async/models/user_public_key.py +103 -0
- daytona_api_client_async/models/volume_dto.py +126 -0
- daytona_api_client_async/models/volume_state.py +43 -0
- daytona_api_client_async/models/workspace.py +204 -0
- daytona_api_client_async/models/workspace_info.py +105 -0
- daytona_api_client_async/models/workspace_labels.py +101 -0
- daytona_api_client_async/models/workspace_state.py +51 -0
- daytona_api_client_async/models/workspace_volume.py +103 -0
- daytona_api_client_async/py.typed +0 -0
- daytona_api_client_async/rest.py +214 -0
- daytona_api_client_async-0.21.3a0.dist-info/METADATA +25 -0
- daytona_api_client_async-0.21.3a0.dist-info/RECORD +123 -0
- daytona_api_client_async-0.21.3a0.dist-info/WHEEL +5 -0
- daytona_api_client_async-0.21.3a0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class UpdateOrganizationQuota(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UpdateOrganizationQuota
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
total_cpu_quota: Optional[Union[StrictFloat, StrictInt]] = Field(alias="totalCpuQuota")
|
|
31
|
+
total_memory_quota: Optional[Union[StrictFloat, StrictInt]] = Field(alias="totalMemoryQuota")
|
|
32
|
+
total_disk_quota: Optional[Union[StrictFloat, StrictInt]] = Field(alias="totalDiskQuota")
|
|
33
|
+
max_cpu_per_sandbox: Optional[Union[StrictFloat, StrictInt]] = Field(alias="maxCpuPerSandbox")
|
|
34
|
+
max_memory_per_sandbox: Optional[Union[StrictFloat, StrictInt]] = Field(alias="maxMemoryPerSandbox")
|
|
35
|
+
max_disk_per_sandbox: Optional[Union[StrictFloat, StrictInt]] = Field(alias="maxDiskPerSandbox")
|
|
36
|
+
snapshot_quota: Optional[Union[StrictFloat, StrictInt]] = Field(alias="snapshotQuota")
|
|
37
|
+
max_snapshot_size: Optional[Union[StrictFloat, StrictInt]] = Field(alias="maxSnapshotSize")
|
|
38
|
+
volume_quota: Optional[Union[StrictFloat, StrictInt]] = Field(alias="volumeQuota")
|
|
39
|
+
additional_properties: Dict[str, Any] = {}
|
|
40
|
+
__properties: ClassVar[List[str]] = ["totalCpuQuota", "totalMemoryQuota", "totalDiskQuota", "maxCpuPerSandbox", "maxMemoryPerSandbox", "maxDiskPerSandbox", "snapshotQuota", "maxSnapshotSize", "volumeQuota"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of UpdateOrganizationQuota from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
"additional_properties",
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
# puts key-value pairs in additional_properties in the top level
|
|
84
|
+
if self.additional_properties is not None:
|
|
85
|
+
for _key, _value in self.additional_properties.items():
|
|
86
|
+
_dict[_key] = _value
|
|
87
|
+
|
|
88
|
+
# set to None if total_cpu_quota (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.total_cpu_quota is None and "total_cpu_quota" in self.model_fields_set:
|
|
91
|
+
_dict['totalCpuQuota'] = None
|
|
92
|
+
|
|
93
|
+
# set to None if total_memory_quota (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.total_memory_quota is None and "total_memory_quota" in self.model_fields_set:
|
|
96
|
+
_dict['totalMemoryQuota'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if total_disk_quota (nullable) is None
|
|
99
|
+
# and model_fields_set contains the field
|
|
100
|
+
if self.total_disk_quota is None and "total_disk_quota" in self.model_fields_set:
|
|
101
|
+
_dict['totalDiskQuota'] = None
|
|
102
|
+
|
|
103
|
+
# set to None if max_cpu_per_sandbox (nullable) is None
|
|
104
|
+
# and model_fields_set contains the field
|
|
105
|
+
if self.max_cpu_per_sandbox is None and "max_cpu_per_sandbox" in self.model_fields_set:
|
|
106
|
+
_dict['maxCpuPerSandbox'] = None
|
|
107
|
+
|
|
108
|
+
# set to None if max_memory_per_sandbox (nullable) is None
|
|
109
|
+
# and model_fields_set contains the field
|
|
110
|
+
if self.max_memory_per_sandbox is None and "max_memory_per_sandbox" in self.model_fields_set:
|
|
111
|
+
_dict['maxMemoryPerSandbox'] = None
|
|
112
|
+
|
|
113
|
+
# set to None if max_disk_per_sandbox (nullable) is None
|
|
114
|
+
# and model_fields_set contains the field
|
|
115
|
+
if self.max_disk_per_sandbox is None and "max_disk_per_sandbox" in self.model_fields_set:
|
|
116
|
+
_dict['maxDiskPerSandbox'] = None
|
|
117
|
+
|
|
118
|
+
# set to None if snapshot_quota (nullable) is None
|
|
119
|
+
# and model_fields_set contains the field
|
|
120
|
+
if self.snapshot_quota is None and "snapshot_quota" in self.model_fields_set:
|
|
121
|
+
_dict['snapshotQuota'] = None
|
|
122
|
+
|
|
123
|
+
# set to None if max_snapshot_size (nullable) is None
|
|
124
|
+
# and model_fields_set contains the field
|
|
125
|
+
if self.max_snapshot_size is None and "max_snapshot_size" in self.model_fields_set:
|
|
126
|
+
_dict['maxSnapshotSize'] = None
|
|
127
|
+
|
|
128
|
+
# set to None if volume_quota (nullable) is None
|
|
129
|
+
# and model_fields_set contains the field
|
|
130
|
+
if self.volume_quota is None and "volume_quota" in self.model_fields_set:
|
|
131
|
+
_dict['volumeQuota'] = None
|
|
132
|
+
|
|
133
|
+
return _dict
|
|
134
|
+
|
|
135
|
+
@classmethod
|
|
136
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
137
|
+
"""Create an instance of UpdateOrganizationQuota from a dict"""
|
|
138
|
+
if obj is None:
|
|
139
|
+
return None
|
|
140
|
+
|
|
141
|
+
if not isinstance(obj, dict):
|
|
142
|
+
return cls.model_validate(obj)
|
|
143
|
+
|
|
144
|
+
_obj = cls.model_validate({
|
|
145
|
+
"totalCpuQuota": obj.get("totalCpuQuota"),
|
|
146
|
+
"totalMemoryQuota": obj.get("totalMemoryQuota"),
|
|
147
|
+
"totalDiskQuota": obj.get("totalDiskQuota"),
|
|
148
|
+
"maxCpuPerSandbox": obj.get("maxCpuPerSandbox"),
|
|
149
|
+
"maxMemoryPerSandbox": obj.get("maxMemoryPerSandbox"),
|
|
150
|
+
"maxDiskPerSandbox": obj.get("maxDiskPerSandbox"),
|
|
151
|
+
"snapshotQuota": obj.get("snapshotQuota"),
|
|
152
|
+
"maxSnapshotSize": obj.get("maxSnapshotSize"),
|
|
153
|
+
"volumeQuota": obj.get("volumeQuota")
|
|
154
|
+
})
|
|
155
|
+
# store additional fields in additional_properties
|
|
156
|
+
for _key in obj.keys():
|
|
157
|
+
if _key not in cls.__properties:
|
|
158
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
159
|
+
|
|
160
|
+
return _obj
|
|
161
|
+
|
|
162
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class UpdateOrganizationRole(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UpdateOrganizationRole
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
name: StrictStr = Field(description="The name of the role")
|
|
31
|
+
description: StrictStr = Field(description="The description of the role")
|
|
32
|
+
permissions: List[StrictStr] = Field(description="The list of permissions assigned to the role")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "description", "permissions"]
|
|
35
|
+
|
|
36
|
+
@field_validator('permissions')
|
|
37
|
+
def permissions_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
for i in value:
|
|
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')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of UpdateOrganizationRole from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
"additional_properties",
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
# puts key-value pairs in additional_properties in the top level
|
|
86
|
+
if self.additional_properties is not None:
|
|
87
|
+
for _key, _value in self.additional_properties.items():
|
|
88
|
+
_dict[_key] = _value
|
|
89
|
+
|
|
90
|
+
return _dict
|
|
91
|
+
|
|
92
|
+
@classmethod
|
|
93
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
94
|
+
"""Create an instance of UpdateOrganizationRole from a dict"""
|
|
95
|
+
if obj is None:
|
|
96
|
+
return None
|
|
97
|
+
|
|
98
|
+
if not isinstance(obj, dict):
|
|
99
|
+
return cls.model_validate(obj)
|
|
100
|
+
|
|
101
|
+
_obj = cls.model_validate({
|
|
102
|
+
"name": obj.get("name"),
|
|
103
|
+
"description": obj.get("description"),
|
|
104
|
+
"permissions": obj.get("permissions")
|
|
105
|
+
})
|
|
106
|
+
# store additional fields in additional_properties
|
|
107
|
+
for _key in obj.keys():
|
|
108
|
+
if _key not in cls.__properties:
|
|
109
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
110
|
+
|
|
111
|
+
return _obj
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class UsageOverview(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UsageOverview
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
total_cpu_quota: Union[StrictFloat, StrictInt] = Field(alias="totalCpuQuota")
|
|
31
|
+
total_gpu_quota: Union[StrictFloat, StrictInt] = Field(alias="totalGpuQuota")
|
|
32
|
+
total_memory_quota: Union[StrictFloat, StrictInt] = Field(alias="totalMemoryQuota")
|
|
33
|
+
total_disk_quota: Union[StrictFloat, StrictInt] = Field(alias="totalDiskQuota")
|
|
34
|
+
current_cpu_usage: Union[StrictFloat, StrictInt] = Field(alias="currentCpuUsage")
|
|
35
|
+
current_memory_usage: Union[StrictFloat, StrictInt] = Field(alias="currentMemoryUsage")
|
|
36
|
+
current_disk_usage: Union[StrictFloat, StrictInt] = Field(alias="currentDiskUsage")
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["totalCpuQuota", "totalGpuQuota", "totalMemoryQuota", "totalDiskQuota", "currentCpuUsage", "currentMemoryUsage", "currentDiskUsage"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of UsageOverview from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
"additional_properties",
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# puts key-value pairs in additional_properties in the top level
|
|
82
|
+
if self.additional_properties is not None:
|
|
83
|
+
for _key, _value in self.additional_properties.items():
|
|
84
|
+
_dict[_key] = _value
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of UsageOverview from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"totalCpuQuota": obj.get("totalCpuQuota"),
|
|
99
|
+
"totalGpuQuota": obj.get("totalGpuQuota"),
|
|
100
|
+
"totalMemoryQuota": obj.get("totalMemoryQuota"),
|
|
101
|
+
"totalDiskQuota": obj.get("totalDiskQuota"),
|
|
102
|
+
"currentCpuUsage": obj.get("currentCpuUsage"),
|
|
103
|
+
"currentMemoryUsage": obj.get("currentMemoryUsage"),
|
|
104
|
+
"currentDiskUsage": obj.get("currentDiskUsage")
|
|
105
|
+
})
|
|
106
|
+
# store additional fields in additional_properties
|
|
107
|
+
for _key in obj.keys():
|
|
108
|
+
if _key not in cls.__properties:
|
|
109
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
110
|
+
|
|
111
|
+
return _obj
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from daytona_api_client_async.models.user_public_key import UserPublicKey
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class User(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
User
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
id: StrictStr = Field(description="User ID")
|
|
32
|
+
name: StrictStr = Field(description="User name")
|
|
33
|
+
email: StrictStr = Field(description="User email")
|
|
34
|
+
public_keys: List[UserPublicKey] = Field(description="User public keys", alias="publicKeys")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "name", "email", "publicKeys"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of User from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in public_keys (list)
|
|
80
|
+
_items = []
|
|
81
|
+
if self.public_keys:
|
|
82
|
+
for _item_public_keys in self.public_keys:
|
|
83
|
+
if _item_public_keys:
|
|
84
|
+
_items.append(_item_public_keys.to_dict())
|
|
85
|
+
_dict['publicKeys'] = _items
|
|
86
|
+
# puts key-value pairs in additional_properties in the top level
|
|
87
|
+
if self.additional_properties is not None:
|
|
88
|
+
for _key, _value in self.additional_properties.items():
|
|
89
|
+
_dict[_key] = _value
|
|
90
|
+
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of User from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return cls.model_validate(obj)
|
|
101
|
+
|
|
102
|
+
_obj = cls.model_validate({
|
|
103
|
+
"id": obj.get("id"),
|
|
104
|
+
"name": obj.get("name"),
|
|
105
|
+
"email": obj.get("email"),
|
|
106
|
+
"publicKeys": [UserPublicKey.from_dict(_item) for _item in obj["publicKeys"]] if obj.get("publicKeys") is not None else None
|
|
107
|
+
})
|
|
108
|
+
# store additional fields in additional_properties
|
|
109
|
+
for _key in obj.keys():
|
|
110
|
+
if _key not in cls.__properties:
|
|
111
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
112
|
+
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class UserPublicKey(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UserPublicKey
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
key: StrictStr = Field(description="Public key")
|
|
31
|
+
name: StrictStr = Field(description="Key name")
|
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
|
33
|
+
__properties: ClassVar[List[str]] = ["key", "name"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of UserPublicKey from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of UserPublicKey from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"key": obj.get("key"),
|
|
94
|
+
"name": obj.get("name")
|
|
95
|
+
})
|
|
96
|
+
# store additional fields in additional_properties
|
|
97
|
+
for _key in obj.keys():
|
|
98
|
+
if _key not in cls.__properties:
|
|
99
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
100
|
+
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|