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,216 @@
|
|
|
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
|
+
from typing import Any, Optional
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class OpenApiException(Exception):
|
|
20
|
+
"""The base exception class for all OpenAPIExceptions"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ApiTypeError(OpenApiException, TypeError):
|
|
24
|
+
def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) -> None:
|
|
25
|
+
"""Raises an exception for TypeErrors
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
msg (str): the exception message
|
|
29
|
+
|
|
30
|
+
Keyword Args:
|
|
31
|
+
path_to_item (list): a list of keys an indices to get to the
|
|
32
|
+
current_item
|
|
33
|
+
None if unset
|
|
34
|
+
valid_classes (tuple): the primitive classes that current item
|
|
35
|
+
should be an instance of
|
|
36
|
+
None if unset
|
|
37
|
+
key_type (bool): False if our value is a value in a dict
|
|
38
|
+
True if it is a key in a dict
|
|
39
|
+
False if our item is an item in a list
|
|
40
|
+
None if unset
|
|
41
|
+
"""
|
|
42
|
+
self.path_to_item = path_to_item
|
|
43
|
+
self.valid_classes = valid_classes
|
|
44
|
+
self.key_type = key_type
|
|
45
|
+
full_msg = msg
|
|
46
|
+
if path_to_item:
|
|
47
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
48
|
+
super(ApiTypeError, self).__init__(full_msg)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class ApiValueError(OpenApiException, ValueError):
|
|
52
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
53
|
+
"""
|
|
54
|
+
Args:
|
|
55
|
+
msg (str): the exception message
|
|
56
|
+
|
|
57
|
+
Keyword Args:
|
|
58
|
+
path_to_item (list) the path to the exception in the
|
|
59
|
+
received_data dict. None if unset
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
self.path_to_item = path_to_item
|
|
63
|
+
full_msg = msg
|
|
64
|
+
if path_to_item:
|
|
65
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
66
|
+
super(ApiValueError, self).__init__(full_msg)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class ApiAttributeError(OpenApiException, AttributeError):
|
|
70
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
71
|
+
"""
|
|
72
|
+
Raised when an attribute reference or assignment fails.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
msg (str): the exception message
|
|
76
|
+
|
|
77
|
+
Keyword Args:
|
|
78
|
+
path_to_item (None/list) the path to the exception in the
|
|
79
|
+
received_data dict
|
|
80
|
+
"""
|
|
81
|
+
self.path_to_item = path_to_item
|
|
82
|
+
full_msg = msg
|
|
83
|
+
if path_to_item:
|
|
84
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
85
|
+
super(ApiAttributeError, self).__init__(full_msg)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class ApiKeyError(OpenApiException, KeyError):
|
|
89
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
90
|
+
"""
|
|
91
|
+
Args:
|
|
92
|
+
msg (str): the exception message
|
|
93
|
+
|
|
94
|
+
Keyword Args:
|
|
95
|
+
path_to_item (None/list) the path to the exception in the
|
|
96
|
+
received_data dict
|
|
97
|
+
"""
|
|
98
|
+
self.path_to_item = path_to_item
|
|
99
|
+
full_msg = msg
|
|
100
|
+
if path_to_item:
|
|
101
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
102
|
+
super(ApiKeyError, self).__init__(full_msg)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class ApiException(OpenApiException):
|
|
106
|
+
def __init__(
|
|
107
|
+
self,
|
|
108
|
+
status=None,
|
|
109
|
+
reason=None,
|
|
110
|
+
http_resp=None,
|
|
111
|
+
*,
|
|
112
|
+
body: Optional[str] = None,
|
|
113
|
+
data: Optional[Any] = None,
|
|
114
|
+
) -> None:
|
|
115
|
+
self.status = status
|
|
116
|
+
self.reason = reason
|
|
117
|
+
self.body = body
|
|
118
|
+
self.data = data
|
|
119
|
+
self.headers = None
|
|
120
|
+
|
|
121
|
+
if http_resp:
|
|
122
|
+
if self.status is None:
|
|
123
|
+
self.status = http_resp.status
|
|
124
|
+
if self.reason is None:
|
|
125
|
+
self.reason = http_resp.reason
|
|
126
|
+
if self.body is None:
|
|
127
|
+
try:
|
|
128
|
+
self.body = http_resp.data.decode("utf-8")
|
|
129
|
+
except Exception:
|
|
130
|
+
pass
|
|
131
|
+
self.headers = http_resp.getheaders()
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_response(
|
|
135
|
+
cls,
|
|
136
|
+
*,
|
|
137
|
+
http_resp,
|
|
138
|
+
body: Optional[str],
|
|
139
|
+
data: Optional[Any],
|
|
140
|
+
) -> Self:
|
|
141
|
+
if http_resp.status == 400:
|
|
142
|
+
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
|
143
|
+
|
|
144
|
+
if http_resp.status == 401:
|
|
145
|
+
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
146
|
+
|
|
147
|
+
if http_resp.status == 403:
|
|
148
|
+
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
149
|
+
|
|
150
|
+
if http_resp.status == 404:
|
|
151
|
+
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
152
|
+
|
|
153
|
+
# Added new conditions for 409 and 422
|
|
154
|
+
if http_resp.status == 409:
|
|
155
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
|
156
|
+
|
|
157
|
+
if http_resp.status == 422:
|
|
158
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
|
159
|
+
|
|
160
|
+
if 500 <= http_resp.status <= 599:
|
|
161
|
+
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
162
|
+
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
163
|
+
|
|
164
|
+
def __str__(self):
|
|
165
|
+
"""Custom error messages for exception"""
|
|
166
|
+
error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason)
|
|
167
|
+
if self.headers:
|
|
168
|
+
error_message += "HTTP response headers: {0}\n".format(self.headers)
|
|
169
|
+
|
|
170
|
+
if self.data or self.body:
|
|
171
|
+
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
|
|
172
|
+
|
|
173
|
+
return error_message
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class BadRequestException(ApiException):
|
|
177
|
+
pass
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class NotFoundException(ApiException):
|
|
181
|
+
pass
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class UnauthorizedException(ApiException):
|
|
185
|
+
pass
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class ForbiddenException(ApiException):
|
|
189
|
+
pass
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class ServiceException(ApiException):
|
|
193
|
+
pass
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class ConflictException(ApiException):
|
|
197
|
+
"""Exception for HTTP 409 Conflict."""
|
|
198
|
+
|
|
199
|
+
pass
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class UnprocessableEntityException(ApiException):
|
|
203
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
|
204
|
+
|
|
205
|
+
pass
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def render_path(path_to_item):
|
|
209
|
+
"""Returns a string representation of a path"""
|
|
210
|
+
result = ""
|
|
211
|
+
for pth in path_to_item:
|
|
212
|
+
if isinstance(pth, int):
|
|
213
|
+
result += "[{0}]".format(pth)
|
|
214
|
+
else:
|
|
215
|
+
result += "['{0}']".format(pth)
|
|
216
|
+
return result
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
Daytona
|
|
6
|
+
|
|
7
|
+
Daytona AI platform API Docs
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: 1.0
|
|
10
|
+
Contact: support@daytona.com
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# import models into model package
|
|
18
|
+
from daytona_api_client.models.account_provider import AccountProvider
|
|
19
|
+
from daytona_api_client.models.api_key_list import ApiKeyList
|
|
20
|
+
from daytona_api_client.models.api_key_response import ApiKeyResponse
|
|
21
|
+
from daytona_api_client.models.build_info import BuildInfo
|
|
22
|
+
from daytona_api_client.models.command import Command
|
|
23
|
+
from daytona_api_client.models.completion_context import CompletionContext
|
|
24
|
+
from daytona_api_client.models.completion_item import CompletionItem
|
|
25
|
+
from daytona_api_client.models.completion_list import CompletionList
|
|
26
|
+
from daytona_api_client.models.create_api_key import CreateApiKey
|
|
27
|
+
from daytona_api_client.models.create_build_info import CreateBuildInfo
|
|
28
|
+
from daytona_api_client.models.create_docker_registry import CreateDockerRegistry
|
|
29
|
+
from daytona_api_client.models.create_linked_account import CreateLinkedAccount
|
|
30
|
+
from daytona_api_client.models.create_organization import CreateOrganization
|
|
31
|
+
from daytona_api_client.models.create_organization_invitation import CreateOrganizationInvitation
|
|
32
|
+
from daytona_api_client.models.create_organization_quota import CreateOrganizationQuota
|
|
33
|
+
from daytona_api_client.models.create_organization_role import CreateOrganizationRole
|
|
34
|
+
from daytona_api_client.models.create_runner import CreateRunner
|
|
35
|
+
from daytona_api_client.models.create_sandbox import CreateSandbox
|
|
36
|
+
from daytona_api_client.models.create_session_request import CreateSessionRequest
|
|
37
|
+
from daytona_api_client.models.create_snapshot import CreateSnapshot
|
|
38
|
+
from daytona_api_client.models.create_user import CreateUser
|
|
39
|
+
from daytona_api_client.models.create_volume import CreateVolume
|
|
40
|
+
from daytona_api_client.models.create_workspace import CreateWorkspace
|
|
41
|
+
from daytona_api_client.models.docker_registry import DockerRegistry
|
|
42
|
+
from daytona_api_client.models.execute_request import ExecuteRequest
|
|
43
|
+
from daytona_api_client.models.execute_response import ExecuteResponse
|
|
44
|
+
from daytona_api_client.models.file_info import FileInfo
|
|
45
|
+
from daytona_api_client.models.file_status import FileStatus
|
|
46
|
+
from daytona_api_client.models.git_add_request import GitAddRequest
|
|
47
|
+
from daytona_api_client.models.git_branch_request import GitBranchRequest
|
|
48
|
+
from daytona_api_client.models.git_checkout_request import GitCheckoutRequest
|
|
49
|
+
from daytona_api_client.models.git_clone_request import GitCloneRequest
|
|
50
|
+
from daytona_api_client.models.git_commit_info import GitCommitInfo
|
|
51
|
+
from daytona_api_client.models.git_commit_request import GitCommitRequest
|
|
52
|
+
from daytona_api_client.models.git_commit_response import GitCommitResponse
|
|
53
|
+
from daytona_api_client.models.git_delete_branch_request import GitDeleteBranchRequest
|
|
54
|
+
from daytona_api_client.models.git_repo_request import GitRepoRequest
|
|
55
|
+
from daytona_api_client.models.git_status import GitStatus
|
|
56
|
+
from daytona_api_client.models.list_branch_response import ListBranchResponse
|
|
57
|
+
from daytona_api_client.models.lsp_completion_params import LspCompletionParams
|
|
58
|
+
from daytona_api_client.models.lsp_document_request import LspDocumentRequest
|
|
59
|
+
from daytona_api_client.models.lsp_location import LspLocation
|
|
60
|
+
from daytona_api_client.models.lsp_server_request import LspServerRequest
|
|
61
|
+
from daytona_api_client.models.lsp_symbol import LspSymbol
|
|
62
|
+
from daytona_api_client.models.match import Match
|
|
63
|
+
from daytona_api_client.models.organization import Organization
|
|
64
|
+
from daytona_api_client.models.organization_invitation import OrganizationInvitation
|
|
65
|
+
from daytona_api_client.models.organization_role import OrganizationRole
|
|
66
|
+
from daytona_api_client.models.organization_suspension import OrganizationSuspension
|
|
67
|
+
from daytona_api_client.models.organization_user import OrganizationUser
|
|
68
|
+
from daytona_api_client.models.paginated_snapshots_dto import PaginatedSnapshotsDto
|
|
69
|
+
from daytona_api_client.models.port_preview_url import PortPreviewUrl
|
|
70
|
+
from daytona_api_client.models.position import Position
|
|
71
|
+
from daytona_api_client.models.project_dir_response import ProjectDirResponse
|
|
72
|
+
from daytona_api_client.models.range import Range
|
|
73
|
+
from daytona_api_client.models.registry_push_access_dto import RegistryPushAccessDto
|
|
74
|
+
from daytona_api_client.models.replace_request import ReplaceRequest
|
|
75
|
+
from daytona_api_client.models.replace_result import ReplaceResult
|
|
76
|
+
from daytona_api_client.models.sandbox import Sandbox
|
|
77
|
+
from daytona_api_client.models.sandbox_info import SandboxInfo
|
|
78
|
+
from daytona_api_client.models.sandbox_labels import SandboxLabels
|
|
79
|
+
from daytona_api_client.models.sandbox_state import SandboxState
|
|
80
|
+
from daytona_api_client.models.sandbox_volume import SandboxVolume
|
|
81
|
+
from daytona_api_client.models.search_files_response import SearchFilesResponse
|
|
82
|
+
from daytona_api_client.models.session import Session
|
|
83
|
+
from daytona_api_client.models.session_execute_request import SessionExecuteRequest
|
|
84
|
+
from daytona_api_client.models.session_execute_response import SessionExecuteResponse
|
|
85
|
+
from daytona_api_client.models.set_snapshot_general_status_dto import SetSnapshotGeneralStatusDto
|
|
86
|
+
from daytona_api_client.models.snapshot_dto import SnapshotDto
|
|
87
|
+
from daytona_api_client.models.snapshot_state import SnapshotState
|
|
88
|
+
from daytona_api_client.models.storage_access_dto import StorageAccessDto
|
|
89
|
+
from daytona_api_client.models.toggle_state import ToggleState
|
|
90
|
+
from daytona_api_client.models.update_assigned_organization_roles import UpdateAssignedOrganizationRoles
|
|
91
|
+
from daytona_api_client.models.update_docker_registry import UpdateDockerRegistry
|
|
92
|
+
from daytona_api_client.models.update_organization_invitation import UpdateOrganizationInvitation
|
|
93
|
+
from daytona_api_client.models.update_organization_member_role import UpdateOrganizationMemberRole
|
|
94
|
+
from daytona_api_client.models.update_organization_quota import UpdateOrganizationQuota
|
|
95
|
+
from daytona_api_client.models.update_organization_role import UpdateOrganizationRole
|
|
96
|
+
from daytona_api_client.models.usage_overview import UsageOverview
|
|
97
|
+
from daytona_api_client.models.user import User
|
|
98
|
+
from daytona_api_client.models.user_public_key import UserPublicKey
|
|
99
|
+
from daytona_api_client.models.volume_dto import VolumeDto
|
|
100
|
+
from daytona_api_client.models.volume_state import VolumeState
|
|
101
|
+
from daytona_api_client.models.workspace import Workspace
|
|
@@ -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 AccountProvider(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
AccountProvider
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
name: StrictStr
|
|
33
|
+
display_name: StrictStr = Field(alias="displayName")
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties: ClassVar[List[str]] = ["name", "displayName"]
|
|
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 AccountProvider 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 AccountProvider 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({"name": obj.get("name"), "displayName": obj.get("displayName")})
|
|
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
|
|
@@ -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 AccountProviderDto(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
AccountProviderDto
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
provider: StrictStr
|
|
33
|
+
display_name: StrictStr = Field(alias="displayName")
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties: ClassVar[List[str]] = ["provider", "displayName"]
|
|
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 AccountProviderDto 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 AccountProviderDto 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({"provider": obj.get("provider"), "displayName": obj.get("displayName")})
|
|
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
|
|
@@ -0,0 +1,149 @@
|
|
|
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 ApiKeyList(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
ApiKeyList
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
name: StrictStr = Field(description="The name of the API key")
|
|
34
|
+
value: StrictStr = Field(description="The masked API key value")
|
|
35
|
+
created_at: datetime = Field(description="When the API key was created", alias="createdAt")
|
|
36
|
+
permissions: List[StrictStr] = Field(
|
|
37
|
+
description="The list of organization resource permissions assigned to the API key"
|
|
38
|
+
)
|
|
39
|
+
last_used_at: Optional[datetime] = Field(description="When the API key was last used", alias="lastUsedAt")
|
|
40
|
+
expires_at: Optional[datetime] = Field(description="When the API key expires", alias="expiresAt")
|
|
41
|
+
additional_properties: Dict[str, Any] = {}
|
|
42
|
+
__properties: ClassVar[List[str]] = ["name", "value", "createdAt", "permissions", "lastUsedAt", "expiresAt"]
|
|
43
|
+
|
|
44
|
+
@field_validator("permissions")
|
|
45
|
+
def permissions_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
for i in value:
|
|
48
|
+
if i not in set(
|
|
49
|
+
[
|
|
50
|
+
"write:registries",
|
|
51
|
+
"delete:registries",
|
|
52
|
+
"write:snapshots",
|
|
53
|
+
"delete:snapshots",
|
|
54
|
+
"write:sandboxes",
|
|
55
|
+
"delete:sandboxes",
|
|
56
|
+
"read:volumes",
|
|
57
|
+
"write:volumes",
|
|
58
|
+
"delete:volumes",
|
|
59
|
+
]
|
|
60
|
+
):
|
|
61
|
+
raise ValueError(
|
|
62
|
+
"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')"
|
|
63
|
+
)
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
model_config = ConfigDict(
|
|
67
|
+
populate_by_name=True,
|
|
68
|
+
validate_assignment=True,
|
|
69
|
+
protected_namespaces=(),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def to_str(self) -> str:
|
|
73
|
+
"""Returns the string representation of the model using alias"""
|
|
74
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
|
+
|
|
76
|
+
def to_json(self) -> str:
|
|
77
|
+
"""Returns the JSON representation of the model using alias"""
|
|
78
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
79
|
+
return json.dumps(self.to_dict())
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ApiKeyList from a JSON string"""
|
|
84
|
+
return cls.from_dict(json.loads(json_str))
|
|
85
|
+
|
|
86
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
87
|
+
"""Return the dictionary representation of the model using alias.
|
|
88
|
+
|
|
89
|
+
This has the following differences from calling pydantic's
|
|
90
|
+
`self.model_dump(by_alias=True)`:
|
|
91
|
+
|
|
92
|
+
* `None` is only added to the output dict for nullable fields that
|
|
93
|
+
were set at model initialization. Other fields with value `None`
|
|
94
|
+
are ignored.
|
|
95
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
96
|
+
"""
|
|
97
|
+
excluded_fields: Set[str] = set(
|
|
98
|
+
[
|
|
99
|
+
"additional_properties",
|
|
100
|
+
]
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_dict = self.model_dump(
|
|
104
|
+
by_alias=True,
|
|
105
|
+
exclude=excluded_fields,
|
|
106
|
+
exclude_none=True,
|
|
107
|
+
)
|
|
108
|
+
# puts key-value pairs in additional_properties in the top level
|
|
109
|
+
if self.additional_properties is not None:
|
|
110
|
+
for _key, _value in self.additional_properties.items():
|
|
111
|
+
_dict[_key] = _value
|
|
112
|
+
|
|
113
|
+
# set to None if last_used_at (nullable) is None
|
|
114
|
+
# and model_fields_set contains the field
|
|
115
|
+
if self.last_used_at is None and "last_used_at" in self.model_fields_set:
|
|
116
|
+
_dict["lastUsedAt"] = None
|
|
117
|
+
|
|
118
|
+
# set to None if expires_at (nullable) is None
|
|
119
|
+
# and model_fields_set contains the field
|
|
120
|
+
if self.expires_at is None and "expires_at" in self.model_fields_set:
|
|
121
|
+
_dict["expiresAt"] = None
|
|
122
|
+
|
|
123
|
+
return _dict
|
|
124
|
+
|
|
125
|
+
@classmethod
|
|
126
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
127
|
+
"""Create an instance of ApiKeyList from a dict"""
|
|
128
|
+
if obj is None:
|
|
129
|
+
return None
|
|
130
|
+
|
|
131
|
+
if not isinstance(obj, dict):
|
|
132
|
+
return cls.model_validate(obj)
|
|
133
|
+
|
|
134
|
+
_obj = cls.model_validate(
|
|
135
|
+
{
|
|
136
|
+
"name": obj.get("name"),
|
|
137
|
+
"value": obj.get("value"),
|
|
138
|
+
"createdAt": obj.get("createdAt"),
|
|
139
|
+
"permissions": obj.get("permissions"),
|
|
140
|
+
"lastUsedAt": obj.get("lastUsedAt"),
|
|
141
|
+
"expiresAt": obj.get("expiresAt"),
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
# store additional fields in additional_properties
|
|
145
|
+
for _key in obj.keys():
|
|
146
|
+
if _key not in cls.__properties:
|
|
147
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
148
|
+
|
|
149
|
+
return _obj
|