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,124 @@
|
|
|
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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CompletionItem(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
CompletionItem
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
label: StrictStr
|
|
33
|
+
kind: Optional[Union[StrictFloat, StrictInt]] = None
|
|
34
|
+
detail: Optional[StrictStr] = None
|
|
35
|
+
documentation: Optional[Dict[str, Any]] = None
|
|
36
|
+
sort_text: Optional[StrictStr] = Field(default=None, alias="sortText")
|
|
37
|
+
filter_text: Optional[StrictStr] = Field(default=None, alias="filterText")
|
|
38
|
+
insert_text: Optional[StrictStr] = Field(default=None, alias="insertText")
|
|
39
|
+
additional_properties: Dict[str, Any] = {}
|
|
40
|
+
__properties: ClassVar[List[str]] = [
|
|
41
|
+
"label",
|
|
42
|
+
"kind",
|
|
43
|
+
"detail",
|
|
44
|
+
"documentation",
|
|
45
|
+
"sortText",
|
|
46
|
+
"filterText",
|
|
47
|
+
"insertText",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
def to_str(self) -> str:
|
|
57
|
+
"""Returns the string representation of the model using alias"""
|
|
58
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
59
|
+
|
|
60
|
+
def to_json(self) -> str:
|
|
61
|
+
"""Returns the JSON representation of the model using alias"""
|
|
62
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
63
|
+
return json.dumps(self.to_dict())
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
67
|
+
"""Create an instance of CompletionItem from a JSON string"""
|
|
68
|
+
return cls.from_dict(json.loads(json_str))
|
|
69
|
+
|
|
70
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
71
|
+
"""Return the dictionary representation of the model using alias.
|
|
72
|
+
|
|
73
|
+
This has the following differences from calling pydantic's
|
|
74
|
+
`self.model_dump(by_alias=True)`:
|
|
75
|
+
|
|
76
|
+
* `None` is only added to the output dict for nullable fields that
|
|
77
|
+
were set at model initialization. Other fields with value `None`
|
|
78
|
+
are ignored.
|
|
79
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set(
|
|
82
|
+
[
|
|
83
|
+
"additional_properties",
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
_dict = self.model_dump(
|
|
88
|
+
by_alias=True,
|
|
89
|
+
exclude=excluded_fields,
|
|
90
|
+
exclude_none=True,
|
|
91
|
+
)
|
|
92
|
+
# puts key-value pairs in additional_properties in the top level
|
|
93
|
+
if self.additional_properties is not None:
|
|
94
|
+
for _key, _value in self.additional_properties.items():
|
|
95
|
+
_dict[_key] = _value
|
|
96
|
+
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
+
"""Create an instance of CompletionItem from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return cls.model_validate(obj)
|
|
107
|
+
|
|
108
|
+
_obj = cls.model_validate(
|
|
109
|
+
{
|
|
110
|
+
"label": obj.get("label"),
|
|
111
|
+
"kind": obj.get("kind"),
|
|
112
|
+
"detail": obj.get("detail"),
|
|
113
|
+
"documentation": obj.get("documentation"),
|
|
114
|
+
"sortText": obj.get("sortText"),
|
|
115
|
+
"filterText": obj.get("filterText"),
|
|
116
|
+
"insertText": obj.get("insertText"),
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
# store additional fields in additional_properties
|
|
120
|
+
for _key in obj.keys():
|
|
121
|
+
if _key not in cls.__properties:
|
|
122
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
123
|
+
|
|
124
|
+
return _obj
|
|
@@ -0,0 +1,116 @@
|
|
|
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, StrictBool
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from daytona_api_client.models.completion_item import CompletionItem
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CompletionList(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
CompletionList
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
is_incomplete: StrictBool = Field(alias="isIncomplete")
|
|
34
|
+
items: List[CompletionItem]
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["isIncomplete", "items"]
|
|
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 CompletionList 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
81
|
+
_items = []
|
|
82
|
+
if self.items:
|
|
83
|
+
for _item_items in self.items:
|
|
84
|
+
if _item_items:
|
|
85
|
+
_items.append(_item_items.to_dict())
|
|
86
|
+
_dict["items"] = _items
|
|
87
|
+
# puts key-value pairs in additional_properties in the top level
|
|
88
|
+
if self.additional_properties is not None:
|
|
89
|
+
for _key, _value in self.additional_properties.items():
|
|
90
|
+
_dict[_key] = _value
|
|
91
|
+
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
+
"""Create an instance of CompletionList from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return cls.model_validate(obj)
|
|
102
|
+
|
|
103
|
+
_obj = cls.model_validate(
|
|
104
|
+
{
|
|
105
|
+
"isIncomplete": obj.get("isIncomplete"),
|
|
106
|
+
"items": [CompletionItem.from_dict(_item) for _item in obj["items"]]
|
|
107
|
+
if obj.get("items") is not None
|
|
108
|
+
else None,
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
# store additional fields in additional_properties
|
|
112
|
+
for _key in obj.keys():
|
|
113
|
+
if _key not in cls.__properties:
|
|
114
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
115
|
+
|
|
116
|
+
return _obj
|
|
@@ -0,0 +1,134 @@
|
|
|
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, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CreateApiKey(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
CreateApiKey
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
name: StrictStr = Field(description="The name of the API key")
|
|
34
|
+
permissions: List[StrictStr] = Field(
|
|
35
|
+
description="The list of organization resource permissions assigned to the API key"
|
|
36
|
+
)
|
|
37
|
+
expires_at: Optional[datetime] = Field(default=None, description="When the API key expires", alias="expiresAt")
|
|
38
|
+
additional_properties: Dict[str, Any] = {}
|
|
39
|
+
__properties: ClassVar[List[str]] = ["name", "permissions", "expiresAt"]
|
|
40
|
+
|
|
41
|
+
@field_validator("permissions")
|
|
42
|
+
def permissions_validate_enum(cls, value):
|
|
43
|
+
"""Validates the enum"""
|
|
44
|
+
for i in value:
|
|
45
|
+
if i not in set(
|
|
46
|
+
[
|
|
47
|
+
"write:registries",
|
|
48
|
+
"delete:registries",
|
|
49
|
+
"write:snapshots",
|
|
50
|
+
"delete:snapshots",
|
|
51
|
+
"write:sandboxes",
|
|
52
|
+
"delete:sandboxes",
|
|
53
|
+
"read:volumes",
|
|
54
|
+
"write:volumes",
|
|
55
|
+
"delete:volumes",
|
|
56
|
+
]
|
|
57
|
+
):
|
|
58
|
+
raise ValueError(
|
|
59
|
+
"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')"
|
|
60
|
+
)
|
|
61
|
+
return value
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
populate_by_name=True,
|
|
65
|
+
validate_assignment=True,
|
|
66
|
+
protected_namespaces=(),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def to_str(self) -> str:
|
|
70
|
+
"""Returns the string representation of the model using alias"""
|
|
71
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
72
|
+
|
|
73
|
+
def to_json(self) -> str:
|
|
74
|
+
"""Returns the JSON representation of the model using alias"""
|
|
75
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
76
|
+
return json.dumps(self.to_dict())
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of CreateApiKey from a JSON string"""
|
|
81
|
+
return cls.from_dict(json.loads(json_str))
|
|
82
|
+
|
|
83
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
84
|
+
"""Return the dictionary representation of the model using alias.
|
|
85
|
+
|
|
86
|
+
This has the following differences from calling pydantic's
|
|
87
|
+
`self.model_dump(by_alias=True)`:
|
|
88
|
+
|
|
89
|
+
* `None` is only added to the output dict for nullable fields that
|
|
90
|
+
were set at model initialization. Other fields with value `None`
|
|
91
|
+
are ignored.
|
|
92
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
93
|
+
"""
|
|
94
|
+
excluded_fields: Set[str] = set(
|
|
95
|
+
[
|
|
96
|
+
"additional_properties",
|
|
97
|
+
]
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_dict = self.model_dump(
|
|
101
|
+
by_alias=True,
|
|
102
|
+
exclude=excluded_fields,
|
|
103
|
+
exclude_none=True,
|
|
104
|
+
)
|
|
105
|
+
# puts key-value pairs in additional_properties in the top level
|
|
106
|
+
if self.additional_properties is not None:
|
|
107
|
+
for _key, _value in self.additional_properties.items():
|
|
108
|
+
_dict[_key] = _value
|
|
109
|
+
|
|
110
|
+
# set to None if expires_at (nullable) is None
|
|
111
|
+
# and model_fields_set contains the field
|
|
112
|
+
if self.expires_at is None and "expires_at" in self.model_fields_set:
|
|
113
|
+
_dict["expiresAt"] = None
|
|
114
|
+
|
|
115
|
+
return _dict
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
119
|
+
"""Create an instance of CreateApiKey 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
|
+
{"name": obj.get("name"), "permissions": obj.get("permissions"), "expiresAt": obj.get("expiresAt")}
|
|
128
|
+
)
|
|
129
|
+
# store additional fields in additional_properties
|
|
130
|
+
for _key in obj.keys():
|
|
131
|
+
if _key not in cls.__properties:
|
|
132
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
133
|
+
|
|
134
|
+
return _obj
|
|
@@ -0,0 +1,107 @@
|
|
|
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, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CreateBuildInfo(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
CreateBuildInfo
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
dockerfile_content: StrictStr = Field(
|
|
33
|
+
description="The Dockerfile content used for the build", alias="dockerfileContent"
|
|
34
|
+
)
|
|
35
|
+
context_hashes: Optional[List[StrictStr]] = Field(
|
|
36
|
+
default=None, description="The context hashes used for the build", alias="contextHashes"
|
|
37
|
+
)
|
|
38
|
+
additional_properties: Dict[str, Any] = {}
|
|
39
|
+
__properties: ClassVar[List[str]] = ["dockerfileContent", "contextHashes"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
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 CreateBuildInfo 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
|
+
[
|
|
74
|
+
"additional_properties",
|
|
75
|
+
]
|
|
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
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of CreateBuildInfo from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate(
|
|
100
|
+
{"dockerfileContent": obj.get("dockerfileContent"), "contextHashes": obj.get("contextHashes")}
|
|
101
|
+
)
|
|
102
|
+
# store additional fields in additional_properties
|
|
103
|
+
for _key in obj.keys():
|
|
104
|
+
if _key not in cls.__properties:
|
|
105
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
106
|
+
|
|
107
|
+
return _obj
|
|
@@ -0,0 +1,123 @@
|
|
|
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, StrictBool, 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
|
+
|
|
27
|
+
class CreateDockerRegistry(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
CreateDockerRegistry
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
name: StrictStr = Field(description="Registry name")
|
|
33
|
+
url: StrictStr = Field(description="Registry URL")
|
|
34
|
+
username: StrictStr = Field(description="Registry username")
|
|
35
|
+
password: StrictStr = Field(description="Registry password")
|
|
36
|
+
project: StrictStr = Field(description="Registry project")
|
|
37
|
+
registry_type: StrictStr = Field(description="Registry type", alias="registryType")
|
|
38
|
+
is_default: StrictBool = Field(description="Set as default registry", alias="isDefault")
|
|
39
|
+
additional_properties: Dict[str, Any] = {}
|
|
40
|
+
__properties: ClassVar[List[str]] = ["name", "url", "username", "password", "project", "registryType", "isDefault"]
|
|
41
|
+
|
|
42
|
+
@field_validator("registry_type")
|
|
43
|
+
def registry_type_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value not in set(["internal", "organization", "public", "transient"]):
|
|
46
|
+
raise ValueError("must be one of enum values ('internal', 'organization', 'public', 'transient')")
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
populate_by_name=True,
|
|
51
|
+
validate_assignment=True,
|
|
52
|
+
protected_namespaces=(),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def to_str(self) -> str:
|
|
56
|
+
"""Returns the string representation of the model using alias"""
|
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
58
|
+
|
|
59
|
+
def to_json(self) -> str:
|
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
62
|
+
return json.dumps(self.to_dict())
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
+
"""Create an instance of CreateDockerRegistry from a JSON string"""
|
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
|
+
|
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
|
71
|
+
|
|
72
|
+
This has the following differences from calling pydantic's
|
|
73
|
+
`self.model_dump(by_alias=True)`:
|
|
74
|
+
|
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
|
76
|
+
were set at model initialization. Other fields with value `None`
|
|
77
|
+
are ignored.
|
|
78
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
79
|
+
"""
|
|
80
|
+
excluded_fields: Set[str] = set(
|
|
81
|
+
[
|
|
82
|
+
"additional_properties",
|
|
83
|
+
]
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
_dict = self.model_dump(
|
|
87
|
+
by_alias=True,
|
|
88
|
+
exclude=excluded_fields,
|
|
89
|
+
exclude_none=True,
|
|
90
|
+
)
|
|
91
|
+
# puts key-value pairs in additional_properties in the top level
|
|
92
|
+
if self.additional_properties is not None:
|
|
93
|
+
for _key, _value in self.additional_properties.items():
|
|
94
|
+
_dict[_key] = _value
|
|
95
|
+
|
|
96
|
+
return _dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
100
|
+
"""Create an instance of CreateDockerRegistry from a dict"""
|
|
101
|
+
if obj is None:
|
|
102
|
+
return None
|
|
103
|
+
|
|
104
|
+
if not isinstance(obj, dict):
|
|
105
|
+
return cls.model_validate(obj)
|
|
106
|
+
|
|
107
|
+
_obj = cls.model_validate(
|
|
108
|
+
{
|
|
109
|
+
"name": obj.get("name"),
|
|
110
|
+
"url": obj.get("url"),
|
|
111
|
+
"username": obj.get("username"),
|
|
112
|
+
"password": obj.get("password"),
|
|
113
|
+
"project": obj.get("project"),
|
|
114
|
+
"registryType": obj.get("registryType") if obj.get("registryType") is not None else "internal",
|
|
115
|
+
"isDefault": obj.get("isDefault") if obj.get("isDefault") is not None else False,
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
# store additional fields in additional_properties
|
|
119
|
+
for _key in obj.keys():
|
|
120
|
+
if _key not in cls.__properties:
|
|
121
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
122
|
+
|
|
123
|
+
return _obj
|