daytona_api_client 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 might be problematic. Click here for more details.
- daytona_api_client/__init__.py +129 -0
- daytona_api_client/api/__init__.py +15 -0
- daytona_api_client/api/api_keys_api.py +1234 -0
- daytona_api_client/api/docker_registry_api.py +1741 -0
- daytona_api_client/api/object_storage_api.py +268 -0
- daytona_api_client/api/organizations_api.py +5792 -0
- daytona_api_client/api/preview_api.py +715 -0
- daytona_api_client/api/runners_api.py +664 -0
- daytona_api_client/api/sandbox_api.py +3584 -0
- daytona_api_client/api/snapshots_api.py +1830 -0
- daytona_api_client/api/toolbox_api.py +10545 -0
- daytona_api_client/api/users_api.py +1733 -0
- daytona_api_client/api/volumes_api.py +1267 -0
- daytona_api_client/api/workspace_api.py +3626 -0
- daytona_api_client/api_client.py +696 -0
- daytona_api_client/api_response.py +20 -0
- daytona_api_client/configuration.py +586 -0
- daytona_api_client/exceptions.py +216 -0
- daytona_api_client/models/__init__.py +101 -0
- daytona_api_client/models/account_provider.py +101 -0
- daytona_api_client/models/account_provider_dto.py +101 -0
- daytona_api_client/models/api_key_list.py +149 -0
- daytona_api_client/models/api_key_response.py +142 -0
- daytona_api_client/models/build_info.py +115 -0
- daytona_api_client/models/build_snapshot.py +118 -0
- daytona_api_client/models/command.py +104 -0
- daytona_api_client/models/completion_context.py +103 -0
- daytona_api_client/models/completion_item.py +124 -0
- daytona_api_client/models/completion_list.py +116 -0
- daytona_api_client/models/create_api_key.py +134 -0
- daytona_api_client/models/create_build_info.py +107 -0
- daytona_api_client/models/create_docker_registry.py +123 -0
- daytona_api_client/models/create_linked_account.py +101 -0
- daytona_api_client/models/create_organization.py +100 -0
- daytona_api_client/models/create_organization_invitation.py +122 -0
- daytona_api_client/models/create_organization_quota.py +130 -0
- daytona_api_client/models/create_organization_role.py +126 -0
- daytona_api_client/models/create_runner.py +150 -0
- daytona_api_client/models/create_sandbox.py +198 -0
- daytona_api_client/models/create_session_request.py +100 -0
- daytona_api_client/models/create_snapshot.py +138 -0
- daytona_api_client/models/create_user.py +132 -0
- daytona_api_client/models/create_volume.py +100 -0
- daytona_api_client/models/create_workspace.py +196 -0
- daytona_api_client/models/docker_registry.py +135 -0
- daytona_api_client/models/execute_request.py +104 -0
- daytona_api_client/models/execute_response.py +101 -0
- daytona_api_client/models/file_info.py +118 -0
- daytona_api_client/models/file_status.py +110 -0
- daytona_api_client/models/get_build_logs400_response.py +101 -0
- daytona_api_client/models/git_add_request.py +101 -0
- daytona_api_client/models/git_branch_request.py +101 -0
- daytona_api_client/models/git_checkout_request.py +101 -0
- daytona_api_client/models/git_clone_request.py +114 -0
- daytona_api_client/models/git_commit_info.py +112 -0
- daytona_api_client/models/git_commit_request.py +110 -0
- daytona_api_client/models/git_commit_response.py +100 -0
- daytona_api_client/models/git_delete_branch_request.py +101 -0
- daytona_api_client/models/git_repo_request.py +104 -0
- daytona_api_client/models/git_status.py +122 -0
- daytona_api_client/models/list_branch_response.py +100 -0
- daytona_api_client/models/lsp_completion_params.py +120 -0
- daytona_api_client/models/lsp_document_request.py +104 -0
- daytona_api_client/models/lsp_location.py +107 -0
- daytona_api_client/models/lsp_server_request.py +101 -0
- daytona_api_client/models/lsp_symbol.py +112 -0
- daytona_api_client/models/match.py +102 -0
- daytona_api_client/models/organization.py +134 -0
- daytona_api_client/models/organization_invitation.py +161 -0
- daytona_api_client/models/organization_role.py +147 -0
- daytona_api_client/models/organization_suspension.py +102 -0
- daytona_api_client/models/organization_user.py +145 -0
- daytona_api_client/models/paginated_snapshots_dto.py +120 -0
- daytona_api_client/models/port_preview_url.py +101 -0
- daytona_api_client/models/position.py +101 -0
- daytona_api_client/models/project_dir_response.py +100 -0
- daytona_api_client/models/range.py +113 -0
- daytona_api_client/models/registry_push_access_dto.py +114 -0
- daytona_api_client/models/replace_request.py +104 -0
- daytona_api_client/models/replace_result.py +102 -0
- daytona_api_client/models/sandbox.py +226 -0
- daytona_api_client/models/sandbox_info.py +110 -0
- daytona_api_client/models/sandbox_labels.py +100 -0
- daytona_api_client/models/sandbox_state.py +50 -0
- daytona_api_client/models/sandbox_volume.py +101 -0
- daytona_api_client/models/search_files_response.py +100 -0
- daytona_api_client/models/session.py +121 -0
- daytona_api_client/models/session_execute_request.py +110 -0
- daytona_api_client/models/session_execute_response.py +106 -0
- daytona_api_client/models/set_snapshot_general_status_dto.py +100 -0
- daytona_api_client/models/snapshot_dto.py +185 -0
- daytona_api_client/models/snapshot_state.py +44 -0
- daytona_api_client/models/storage_access_dto.py +121 -0
- daytona_api_client/models/toggle_state.py +100 -0
- daytona_api_client/models/update_assigned_organization_roles.py +100 -0
- daytona_api_client/models/update_docker_registry.py +104 -0
- daytona_api_client/models/update_organization_invitation.py +114 -0
- daytona_api_client/models/update_organization_member_role.py +107 -0
- daytona_api_client/models/update_organization_quota.py +175 -0
- daytona_api_client/models/update_organization_role.py +126 -0
- daytona_api_client/models/upload_file.py +101 -0
- daytona_api_client/models/upload_file_dto.py +101 -0
- daytona_api_client/models/upload_file_request_file.py +159 -0
- daytona_api_client/models/upload_files_multi_request_files_inner.py +101 -0
- daytona_api_client/models/usage_overview.py +124 -0
- daytona_api_client/models/user.py +120 -0
- daytona_api_client/models/user_public_key.py +101 -0
- daytona_api_client/models/volume.py +133 -0
- daytona_api_client/models/volume_dto.py +138 -0
- daytona_api_client/models/volume_state.py +41 -0
- daytona_api_client/models/workspace.py +259 -0
- daytona_api_client/py.typed +0 -0
- daytona_api_client/rest.py +208 -0
- daytona_api_client-0.21.3a0.dist-info/METADATA +23 -0
- daytona_api_client-0.21.3a0.dist-info/RECORD +117 -0
- daytona_api_client-0.21.3a0.dist-info/WHEEL +5 -0
- daytona_api_client-0.21.3a0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,147 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class OrganizationRole(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
OrganizationRole
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
id: StrictStr = Field(description="Role ID")
|
|
34
|
+
name: StrictStr = Field(description="Role name")
|
|
35
|
+
description: StrictStr = Field(description="Role description")
|
|
36
|
+
permissions: List[StrictStr] = Field(description="Roles assigned to the user")
|
|
37
|
+
is_global: StrictBool = Field(description="Global role flag", alias="isGlobal")
|
|
38
|
+
created_at: datetime = Field(description="Creation timestamp", alias="createdAt")
|
|
39
|
+
updated_at: datetime = Field(description="Last update timestamp", alias="updatedAt")
|
|
40
|
+
additional_properties: Dict[str, Any] = {}
|
|
41
|
+
__properties: ClassVar[List[str]] = [
|
|
42
|
+
"id",
|
|
43
|
+
"name",
|
|
44
|
+
"description",
|
|
45
|
+
"permissions",
|
|
46
|
+
"isGlobal",
|
|
47
|
+
"createdAt",
|
|
48
|
+
"updatedAt",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
@field_validator("permissions")
|
|
52
|
+
def permissions_validate_enum(cls, value):
|
|
53
|
+
"""Validates the enum"""
|
|
54
|
+
for i in value:
|
|
55
|
+
if i not in set(
|
|
56
|
+
[
|
|
57
|
+
"write:registries",
|
|
58
|
+
"delete:registries",
|
|
59
|
+
"write:snapshots",
|
|
60
|
+
"delete:snapshots",
|
|
61
|
+
"write:sandboxes",
|
|
62
|
+
"delete:sandboxes",
|
|
63
|
+
"read:volumes",
|
|
64
|
+
"write:volumes",
|
|
65
|
+
"delete:volumes",
|
|
66
|
+
]
|
|
67
|
+
):
|
|
68
|
+
raise ValueError(
|
|
69
|
+
"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')"
|
|
70
|
+
)
|
|
71
|
+
return value
|
|
72
|
+
|
|
73
|
+
model_config = ConfigDict(
|
|
74
|
+
populate_by_name=True,
|
|
75
|
+
validate_assignment=True,
|
|
76
|
+
protected_namespaces=(),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def to_str(self) -> str:
|
|
80
|
+
"""Returns the string representation of the model using alias"""
|
|
81
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
82
|
+
|
|
83
|
+
def to_json(self) -> str:
|
|
84
|
+
"""Returns the JSON representation of the model using alias"""
|
|
85
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
86
|
+
return json.dumps(self.to_dict())
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of OrganizationRole from a JSON string"""
|
|
91
|
+
return cls.from_dict(json.loads(json_str))
|
|
92
|
+
|
|
93
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
94
|
+
"""Return the dictionary representation of the model using alias.
|
|
95
|
+
|
|
96
|
+
This has the following differences from calling pydantic's
|
|
97
|
+
`self.model_dump(by_alias=True)`:
|
|
98
|
+
|
|
99
|
+
* `None` is only added to the output dict for nullable fields that
|
|
100
|
+
were set at model initialization. Other fields with value `None`
|
|
101
|
+
are ignored.
|
|
102
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
103
|
+
"""
|
|
104
|
+
excluded_fields: Set[str] = set(
|
|
105
|
+
[
|
|
106
|
+
"additional_properties",
|
|
107
|
+
]
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
_dict = self.model_dump(
|
|
111
|
+
by_alias=True,
|
|
112
|
+
exclude=excluded_fields,
|
|
113
|
+
exclude_none=True,
|
|
114
|
+
)
|
|
115
|
+
# puts key-value pairs in additional_properties in the top level
|
|
116
|
+
if self.additional_properties is not None:
|
|
117
|
+
for _key, _value in self.additional_properties.items():
|
|
118
|
+
_dict[_key] = _value
|
|
119
|
+
|
|
120
|
+
return _dict
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
124
|
+
"""Create an instance of OrganizationRole from a dict"""
|
|
125
|
+
if obj is None:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
if not isinstance(obj, dict):
|
|
129
|
+
return cls.model_validate(obj)
|
|
130
|
+
|
|
131
|
+
_obj = cls.model_validate(
|
|
132
|
+
{
|
|
133
|
+
"id": obj.get("id"),
|
|
134
|
+
"name": obj.get("name"),
|
|
135
|
+
"description": obj.get("description"),
|
|
136
|
+
"permissions": obj.get("permissions"),
|
|
137
|
+
"isGlobal": obj.get("isGlobal"),
|
|
138
|
+
"createdAt": obj.get("createdAt"),
|
|
139
|
+
"updatedAt": obj.get("updatedAt"),
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
# store additional fields in additional_properties
|
|
143
|
+
for _key in obj.keys():
|
|
144
|
+
if _key not in cls.__properties:
|
|
145
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
146
|
+
|
|
147
|
+
return _obj
|
|
@@ -0,0 +1,102 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class OrganizationSuspension(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
OrganizationSuspension
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
reason: StrictStr = Field(description="Suspension reason")
|
|
34
|
+
until: datetime = Field(description="Suspension until")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["reason", "until"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of OrganizationSuspension from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set(
|
|
70
|
+
[
|
|
71
|
+
"additional_properties",
|
|
72
|
+
]
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# puts key-value pairs in additional_properties in the top level
|
|
81
|
+
if self.additional_properties is not None:
|
|
82
|
+
for _key, _value in self.additional_properties.items():
|
|
83
|
+
_dict[_key] = _value
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of OrganizationSuspension from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({"reason": obj.get("reason"), "until": obj.get("until")})
|
|
97
|
+
# store additional fields in additional_properties
|
|
98
|
+
for _key in obj.keys():
|
|
99
|
+
if _key not in cls.__properties:
|
|
100
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
101
|
+
|
|
102
|
+
return _obj
|
|
@@ -0,0 +1,145 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List
|
|
24
|
+
from daytona_api_client.models.organization_role import OrganizationRole
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class OrganizationUser(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
OrganizationUser
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
|
|
34
|
+
user_id: StrictStr = Field(description="User ID", alias="userId")
|
|
35
|
+
organization_id: StrictStr = Field(description="Organization ID", alias="organizationId")
|
|
36
|
+
name: StrictStr = Field(description="User name")
|
|
37
|
+
email: StrictStr = Field(description="User email")
|
|
38
|
+
role: StrictStr = Field(description="Member role")
|
|
39
|
+
assigned_roles: List[OrganizationRole] = Field(description="Roles assigned to the user", alias="assignedRoles")
|
|
40
|
+
created_at: datetime = Field(description="Creation timestamp", alias="createdAt")
|
|
41
|
+
updated_at: datetime = Field(description="Last update timestamp", alias="updatedAt")
|
|
42
|
+
additional_properties: Dict[str, Any] = {}
|
|
43
|
+
__properties: ClassVar[List[str]] = [
|
|
44
|
+
"userId",
|
|
45
|
+
"organizationId",
|
|
46
|
+
"name",
|
|
47
|
+
"email",
|
|
48
|
+
"role",
|
|
49
|
+
"assignedRoles",
|
|
50
|
+
"createdAt",
|
|
51
|
+
"updatedAt",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
@field_validator("role")
|
|
55
|
+
def role_validate_enum(cls, value):
|
|
56
|
+
"""Validates the enum"""
|
|
57
|
+
if value not in set(["owner", "member"]):
|
|
58
|
+
raise ValueError("must be one of enum values ('owner', 'member')")
|
|
59
|
+
return value
|
|
60
|
+
|
|
61
|
+
model_config = ConfigDict(
|
|
62
|
+
populate_by_name=True,
|
|
63
|
+
validate_assignment=True,
|
|
64
|
+
protected_namespaces=(),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def to_str(self) -> str:
|
|
68
|
+
"""Returns the string representation of the model using alias"""
|
|
69
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
70
|
+
|
|
71
|
+
def to_json(self) -> str:
|
|
72
|
+
"""Returns the JSON representation of the model using alias"""
|
|
73
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
74
|
+
return json.dumps(self.to_dict())
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of OrganizationUser from a JSON string"""
|
|
79
|
+
return cls.from_dict(json.loads(json_str))
|
|
80
|
+
|
|
81
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
82
|
+
"""Return the dictionary representation of the model using alias.
|
|
83
|
+
|
|
84
|
+
This has the following differences from calling pydantic's
|
|
85
|
+
`self.model_dump(by_alias=True)`:
|
|
86
|
+
|
|
87
|
+
* `None` is only added to the output dict for nullable fields that
|
|
88
|
+
were set at model initialization. Other fields with value `None`
|
|
89
|
+
are ignored.
|
|
90
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
91
|
+
"""
|
|
92
|
+
excluded_fields: Set[str] = set(
|
|
93
|
+
[
|
|
94
|
+
"additional_properties",
|
|
95
|
+
]
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_dict = self.model_dump(
|
|
99
|
+
by_alias=True,
|
|
100
|
+
exclude=excluded_fields,
|
|
101
|
+
exclude_none=True,
|
|
102
|
+
)
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of each item in assigned_roles (list)
|
|
104
|
+
_items = []
|
|
105
|
+
if self.assigned_roles:
|
|
106
|
+
for _item_assigned_roles in self.assigned_roles:
|
|
107
|
+
if _item_assigned_roles:
|
|
108
|
+
_items.append(_item_assigned_roles.to_dict())
|
|
109
|
+
_dict["assignedRoles"] = _items
|
|
110
|
+
# puts key-value pairs in additional_properties in the top level
|
|
111
|
+
if self.additional_properties is not None:
|
|
112
|
+
for _key, _value in self.additional_properties.items():
|
|
113
|
+
_dict[_key] = _value
|
|
114
|
+
|
|
115
|
+
return _dict
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
119
|
+
"""Create an instance of OrganizationUser from a dict"""
|
|
120
|
+
if obj is None:
|
|
121
|
+
return None
|
|
122
|
+
|
|
123
|
+
if not isinstance(obj, dict):
|
|
124
|
+
return cls.model_validate(obj)
|
|
125
|
+
|
|
126
|
+
_obj = cls.model_validate(
|
|
127
|
+
{
|
|
128
|
+
"userId": obj.get("userId"),
|
|
129
|
+
"organizationId": obj.get("organizationId"),
|
|
130
|
+
"name": obj.get("name"),
|
|
131
|
+
"email": obj.get("email"),
|
|
132
|
+
"role": obj.get("role"),
|
|
133
|
+
"assignedRoles": [OrganizationRole.from_dict(_item) for _item in obj["assignedRoles"]]
|
|
134
|
+
if obj.get("assignedRoles") is not None
|
|
135
|
+
else None,
|
|
136
|
+
"createdAt": obj.get("createdAt"),
|
|
137
|
+
"updatedAt": obj.get("updatedAt"),
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
# store additional fields in additional_properties
|
|
141
|
+
for _key in obj.keys():
|
|
142
|
+
if _key not in cls.__properties:
|
|
143
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
144
|
+
|
|
145
|
+
return _obj
|
|
@@ -0,0 +1,120 @@
|
|
|
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 daytona_api_client.models.snapshot_dto import SnapshotDto
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class PaginatedSnapshotsDto(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PaginatedSnapshotsDto
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
items: List[SnapshotDto]
|
|
34
|
+
total: Union[StrictFloat, StrictInt]
|
|
35
|
+
page: Union[StrictFloat, StrictInt]
|
|
36
|
+
total_pages: Union[StrictFloat, StrictInt] = Field(alias="totalPages")
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["items", "total", "page", "totalPages"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of PaginatedSnapshotsDto from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set(
|
|
72
|
+
[
|
|
73
|
+
"additional_properties",
|
|
74
|
+
]
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
83
|
+
_items = []
|
|
84
|
+
if self.items:
|
|
85
|
+
for _item_items in self.items:
|
|
86
|
+
if _item_items:
|
|
87
|
+
_items.append(_item_items.to_dict())
|
|
88
|
+
_dict["items"] = _items
|
|
89
|
+
# puts key-value pairs in additional_properties in the top level
|
|
90
|
+
if self.additional_properties is not None:
|
|
91
|
+
for _key, _value in self.additional_properties.items():
|
|
92
|
+
_dict[_key] = _value
|
|
93
|
+
|
|
94
|
+
return _dict
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
+
"""Create an instance of PaginatedSnapshotsDto from a dict"""
|
|
99
|
+
if obj is None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
if not isinstance(obj, dict):
|
|
103
|
+
return cls.model_validate(obj)
|
|
104
|
+
|
|
105
|
+
_obj = cls.model_validate(
|
|
106
|
+
{
|
|
107
|
+
"items": [SnapshotDto.from_dict(_item) for _item in obj["items"]]
|
|
108
|
+
if obj.get("items") is not None
|
|
109
|
+
else None,
|
|
110
|
+
"total": obj.get("total"),
|
|
111
|
+
"page": obj.get("page"),
|
|
112
|
+
"totalPages": obj.get("totalPages"),
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
# store additional fields in additional_properties
|
|
116
|
+
for _key in obj.keys():
|
|
117
|
+
if _key not in cls.__properties:
|
|
118
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
119
|
+
|
|
120
|
+
return _obj
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
|
|
27
|
+
class PortPreviewUrl(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PortPreviewUrl
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
url: StrictStr = Field(description="Preview url")
|
|
33
|
+
token: StrictStr = Field(description="Access token")
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties: ClassVar[List[str]] = ["url", "token"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of PortPreviewUrl from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set(
|
|
69
|
+
[
|
|
70
|
+
"additional_properties",
|
|
71
|
+
]
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# puts key-value pairs in additional_properties in the top level
|
|
80
|
+
if self.additional_properties is not None:
|
|
81
|
+
for _key, _value in self.additional_properties.items():
|
|
82
|
+
_dict[_key] = _value
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of PortPreviewUrl from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({"url": obj.get("url"), "token": obj.get("token")})
|
|
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
|