daytona_api_client 0.25.6__py3-none-any.whl → 0.26.0__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 +11 -0
- daytona_api_client/api/__init__.py +2 -0
- daytona_api_client/api/default_api.py +1884 -0
- daytona_api_client/api/health_api.py +282 -0
- daytona_api_client/api/sandbox_api.py +855 -2
- daytona_api_client/api/webhooks_api.py +1704 -0
- daytona_api_client/models/__init__.py +9 -0
- daytona_api_client/models/create_audit_log.py +2 -2
- daytona_api_client/models/health_controller_check200_response.py +154 -0
- daytona_api_client/models/{account_provider_dto.py → health_controller_check200_response_info_value.py} +23 -23
- daytona_api_client/models/health_controller_check503_response.py +154 -0
- daytona_api_client/models/sandbox_created_post_request.py +110 -0
- daytona_api_client/models/sandbox_created_post_request_data.py +152 -0
- daytona_api_client/models/sandbox_state_updated_post_request.py +110 -0
- daytona_api_client/models/sandbox_state_updated_post_request_data.py +129 -0
- daytona_api_client/models/{usage_overview.py → sandbox_state_updated_post_request_data_sandbox.py} +23 -21
- daytona_api_client/models/send_webhook_dto.py +105 -0
- daytona_api_client/models/snapshot_created_post_request.py +110 -0
- daytona_api_client/models/snapshot_created_post_request_data.py +136 -0
- daytona_api_client/models/{get_build_logs400_response.py → snapshot_removed_post_request.py} +31 -26
- daytona_api_client/models/snapshot_state_updated_post_request.py +110 -0
- daytona_api_client/models/snapshot_state_updated_post_request_data.py +129 -0
- daytona_api_client/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
- daytona_api_client/models/ssh_access_dto.py +112 -0
- daytona_api_client/models/ssh_access_validation_dto.py +107 -0
- daytona_api_client/models/volume_created_post_request.py +110 -0
- daytona_api_client/models/{volume.py → volume_created_post_request_data.py} +48 -55
- daytona_api_client/models/volume_state_updated_post_request.py +110 -0
- daytona_api_client/models/volume_state_updated_post_request_data.py +129 -0
- daytona_api_client/models/volume_state_updated_post_request_data_volume.py +115 -0
- daytona_api_client/models/{download_files.py → webhook_app_portal_access.py} +7 -7
- daytona_api_client/models/{upload_file.py → webhook_controller_get_app_portal_access200_response.py} +26 -26
- daytona_api_client/models/webhook_controller_get_initialization_status200_response.py +118 -0
- daytona_api_client/models/{toggle_state.py → webhook_controller_get_status200_response.py} +7 -7
- daytona_api_client/models/webhook_initialization_status.py +121 -0
- {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/METADATA +1 -1
- {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/RECORD +40 -21
- daytona_api_client/models/build_snapshot.py +0 -118
- daytona_api_client/models/upload_file_dto.py +0 -101
- daytona_api_client/models/upload_file_request_file.py +0 -159
- daytona_api_client/models/upload_files_multi_request_files_inner.py +0 -101
- {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/WHEEL +0 -0
- {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client-0.25.6.dist-info → daytona_api_client-0.26.0.dist-info}/top_level.txt +0 -0
|
@@ -60,6 +60,9 @@ from daytona_api_client.models.git_commit_response import GitCommitResponse
|
|
|
60
60
|
from daytona_api_client.models.git_delete_branch_request import GitDeleteBranchRequest
|
|
61
61
|
from daytona_api_client.models.git_repo_request import GitRepoRequest
|
|
62
62
|
from daytona_api_client.models.git_status import GitStatus
|
|
63
|
+
from daytona_api_client.models.health_controller_check200_response import HealthControllerCheck200Response
|
|
64
|
+
from daytona_api_client.models.health_controller_check200_response_info_value import HealthControllerCheck200ResponseInfoValue
|
|
65
|
+
from daytona_api_client.models.health_controller_check503_response import HealthControllerCheck503Response
|
|
63
66
|
from daytona_api_client.models.keyboard_hotkey_request import KeyboardHotkeyRequest
|
|
64
67
|
from daytona_api_client.models.keyboard_press_request import KeyboardPressRequest
|
|
65
68
|
from daytona_api_client.models.keyboard_type_request import KeyboardTypeRequest
|
|
@@ -111,12 +114,15 @@ from daytona_api_client.models.sandbox_state import SandboxState
|
|
|
111
114
|
from daytona_api_client.models.sandbox_volume import SandboxVolume
|
|
112
115
|
from daytona_api_client.models.screenshot_response import ScreenshotResponse
|
|
113
116
|
from daytona_api_client.models.search_files_response import SearchFilesResponse
|
|
117
|
+
from daytona_api_client.models.send_webhook_dto import SendWebhookDto
|
|
114
118
|
from daytona_api_client.models.session import Session
|
|
115
119
|
from daytona_api_client.models.session_execute_request import SessionExecuteRequest
|
|
116
120
|
from daytona_api_client.models.session_execute_response import SessionExecuteResponse
|
|
117
121
|
from daytona_api_client.models.set_snapshot_general_status_dto import SetSnapshotGeneralStatusDto
|
|
118
122
|
from daytona_api_client.models.snapshot_dto import SnapshotDto
|
|
119
123
|
from daytona_api_client.models.snapshot_state import SnapshotState
|
|
124
|
+
from daytona_api_client.models.ssh_access_dto import SshAccessDto
|
|
125
|
+
from daytona_api_client.models.ssh_access_validation_dto import SshAccessValidationDto
|
|
120
126
|
from daytona_api_client.models.storage_access_dto import StorageAccessDto
|
|
121
127
|
from daytona_api_client.models.update_assigned_organization_roles import UpdateAssignedOrganizationRoles
|
|
122
128
|
from daytona_api_client.models.update_docker_registry import UpdateDockerRegistry
|
|
@@ -128,5 +134,8 @@ from daytona_api_client.models.user import User
|
|
|
128
134
|
from daytona_api_client.models.user_public_key import UserPublicKey
|
|
129
135
|
from daytona_api_client.models.volume_dto import VolumeDto
|
|
130
136
|
from daytona_api_client.models.volume_state import VolumeState
|
|
137
|
+
from daytona_api_client.models.webhook_app_portal_access import WebhookAppPortalAccess
|
|
138
|
+
from daytona_api_client.models.webhook_controller_get_status200_response import WebhookControllerGetStatus200Response
|
|
139
|
+
from daytona_api_client.models.webhook_initialization_status import WebhookInitializationStatus
|
|
131
140
|
from daytona_api_client.models.windows_response import WindowsResponse
|
|
132
141
|
from daytona_api_client.models.workspace import Workspace
|
|
@@ -39,8 +39,8 @@ class CreateAuditLog(BaseModel):
|
|
|
39
39
|
@field_validator('action')
|
|
40
40
|
def action_validate_enum(cls, value):
|
|
41
41
|
"""Validates the enum"""
|
|
42
|
-
if value not in set(['create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'update_network_settings', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process']):
|
|
43
|
-
raise ValueError("must be one of enum values ('create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'update_network_settings', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process')")
|
|
42
|
+
if value not in set(['create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'update_network_settings', 'get_webhook_app_portal_access', 'send_webhook_message', 'initialize_webhooks', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process']):
|
|
43
|
+
raise ValueError("must be one of enum values ('create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'update_network_settings', 'get_webhook_app_portal_access', 'send_webhook_message', 'initialize_webhooks', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
@field_validator('target_type')
|
|
@@ -0,0 +1,154 @@
|
|
|
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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from daytona_api_client.models.health_controller_check200_response_info_value import HealthControllerCheck200ResponseInfoValue
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class HealthControllerCheck200Response(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
HealthControllerCheck200Response
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
status: Optional[StrictStr] = None
|
|
32
|
+
info: Optional[Dict[str, HealthControllerCheck200ResponseInfoValue]] = None
|
|
33
|
+
error: Optional[Dict[str, HealthControllerCheck200ResponseInfoValue]] = None
|
|
34
|
+
details: Optional[Dict[str, HealthControllerCheck200ResponseInfoValue]] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["status", "info", "error", "details"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of HealthControllerCheck200Response from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each value in info (dict)
|
|
80
|
+
_field_dict = {}
|
|
81
|
+
if self.info:
|
|
82
|
+
for _key_info in self.info:
|
|
83
|
+
if self.info[_key_info]:
|
|
84
|
+
_field_dict[_key_info] = self.info[_key_info].to_dict()
|
|
85
|
+
_dict['info'] = _field_dict
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each value in error (dict)
|
|
87
|
+
_field_dict = {}
|
|
88
|
+
if self.error:
|
|
89
|
+
for _key_error in self.error:
|
|
90
|
+
if self.error[_key_error]:
|
|
91
|
+
_field_dict[_key_error] = self.error[_key_error].to_dict()
|
|
92
|
+
_dict['error'] = _field_dict
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of each value in details (dict)
|
|
94
|
+
_field_dict = {}
|
|
95
|
+
if self.details:
|
|
96
|
+
for _key_details in self.details:
|
|
97
|
+
if self.details[_key_details]:
|
|
98
|
+
_field_dict[_key_details] = self.details[_key_details].to_dict()
|
|
99
|
+
_dict['details'] = _field_dict
|
|
100
|
+
# puts key-value pairs in additional_properties in the top level
|
|
101
|
+
if self.additional_properties is not None:
|
|
102
|
+
for _key, _value in self.additional_properties.items():
|
|
103
|
+
_dict[_key] = _value
|
|
104
|
+
|
|
105
|
+
# set to None if info (nullable) is None
|
|
106
|
+
# and model_fields_set contains the field
|
|
107
|
+
if self.info is None and "info" in self.model_fields_set:
|
|
108
|
+
_dict['info'] = None
|
|
109
|
+
|
|
110
|
+
# set to None if error (nullable) is None
|
|
111
|
+
# and model_fields_set contains the field
|
|
112
|
+
if self.error is None and "error" in self.model_fields_set:
|
|
113
|
+
_dict['error'] = 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 HealthControllerCheck200Response 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
|
+
"status": obj.get("status"),
|
|
128
|
+
"info": dict(
|
|
129
|
+
(_k, HealthControllerCheck200ResponseInfoValue.from_dict(_v))
|
|
130
|
+
for _k, _v in obj["info"].items()
|
|
131
|
+
)
|
|
132
|
+
if obj.get("info") is not None
|
|
133
|
+
else None,
|
|
134
|
+
"error": dict(
|
|
135
|
+
(_k, HealthControllerCheck200ResponseInfoValue.from_dict(_v))
|
|
136
|
+
for _k, _v in obj["error"].items()
|
|
137
|
+
)
|
|
138
|
+
if obj.get("error") is not None
|
|
139
|
+
else None,
|
|
140
|
+
"details": dict(
|
|
141
|
+
(_k, HealthControllerCheck200ResponseInfoValue.from_dict(_v))
|
|
142
|
+
for _k, _v in obj["details"].items()
|
|
143
|
+
)
|
|
144
|
+
if obj.get("details") is not None
|
|
145
|
+
else None
|
|
146
|
+
})
|
|
147
|
+
# store additional fields in additional_properties
|
|
148
|
+
for _key in obj.keys():
|
|
149
|
+
if _key not in cls.__properties:
|
|
150
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
151
|
+
|
|
152
|
+
return _obj
|
|
153
|
+
|
|
154
|
+
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
Daytona
|
|
4
|
+
Daytona
|
|
5
5
|
|
|
6
|
-
Daytona AI platform API Docs
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: 1.0
|
|
9
|
-
Contact: support@daytona.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
|
-
Do not edit the class manually.
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,21 +18,18 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict,
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
class AccountProviderDto(BaseModel):
|
|
26
|
+
class HealthControllerCheck200ResponseInfoValue(BaseModel):
|
|
28
27
|
"""
|
|
29
|
-
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
provider: StrictStr
|
|
33
|
-
display_name: StrictStr = Field(alias="displayName")
|
|
28
|
+
HealthControllerCheck200ResponseInfoValue
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
status: StrictStr
|
|
34
31
|
additional_properties: Dict[str, Any] = {}
|
|
35
|
-
__properties: ClassVar[List[str]] = ["
|
|
32
|
+
__properties: ClassVar[List[str]] = ["status"]
|
|
36
33
|
|
|
37
34
|
model_config = ConfigDict(
|
|
38
35
|
populate_by_name=True,
|
|
@@ -40,6 +37,7 @@ class AccountProviderDto(BaseModel):
|
|
|
40
37
|
protected_namespaces=(),
|
|
41
38
|
)
|
|
42
39
|
|
|
40
|
+
|
|
43
41
|
def to_str(self) -> str:
|
|
44
42
|
"""Returns the string representation of the model using alias"""
|
|
45
43
|
return pprint.pformat(self.model_dump(by_alias=True))
|
|
@@ -51,7 +49,7 @@ class AccountProviderDto(BaseModel):
|
|
|
51
49
|
|
|
52
50
|
@classmethod
|
|
53
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of HealthControllerCheck200ResponseInfoValue from a JSON string"""
|
|
55
53
|
return cls.from_dict(json.loads(json_str))
|
|
56
54
|
|
|
57
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -65,11 +63,9 @@ class AccountProviderDto(BaseModel):
|
|
|
65
63
|
are ignored.
|
|
66
64
|
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
65
|
"""
|
|
68
|
-
excluded_fields: Set[str] = set(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
]
|
|
72
|
-
)
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
73
69
|
|
|
74
70
|
_dict = self.model_dump(
|
|
75
71
|
by_alias=True,
|
|
@@ -85,17 +81,21 @@ class AccountProviderDto(BaseModel):
|
|
|
85
81
|
|
|
86
82
|
@classmethod
|
|
87
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of HealthControllerCheck200ResponseInfoValue from a dict"""
|
|
89
85
|
if obj is None:
|
|
90
86
|
return None
|
|
91
87
|
|
|
92
88
|
if not isinstance(obj, dict):
|
|
93
89
|
return cls.model_validate(obj)
|
|
94
90
|
|
|
95
|
-
_obj = cls.model_validate({
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"status": obj.get("status")
|
|
93
|
+
})
|
|
96
94
|
# store additional fields in additional_properties
|
|
97
95
|
for _key in obj.keys():
|
|
98
96
|
if _key not in cls.__properties:
|
|
99
97
|
_obj.additional_properties[_key] = obj.get(_key)
|
|
100
98
|
|
|
101
99
|
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from daytona_api_client.models.health_controller_check200_response_info_value import HealthControllerCheck200ResponseInfoValue
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class HealthControllerCheck503Response(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
HealthControllerCheck503Response
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
status: Optional[StrictStr] = None
|
|
32
|
+
info: Optional[Dict[str, HealthControllerCheck200ResponseInfoValue]] = None
|
|
33
|
+
error: Optional[Dict[str, HealthControllerCheck200ResponseInfoValue]] = None
|
|
34
|
+
details: Optional[Dict[str, HealthControllerCheck200ResponseInfoValue]] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["status", "info", "error", "details"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of HealthControllerCheck503Response from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each value in info (dict)
|
|
80
|
+
_field_dict = {}
|
|
81
|
+
if self.info:
|
|
82
|
+
for _key_info in self.info:
|
|
83
|
+
if self.info[_key_info]:
|
|
84
|
+
_field_dict[_key_info] = self.info[_key_info].to_dict()
|
|
85
|
+
_dict['info'] = _field_dict
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each value in error (dict)
|
|
87
|
+
_field_dict = {}
|
|
88
|
+
if self.error:
|
|
89
|
+
for _key_error in self.error:
|
|
90
|
+
if self.error[_key_error]:
|
|
91
|
+
_field_dict[_key_error] = self.error[_key_error].to_dict()
|
|
92
|
+
_dict['error'] = _field_dict
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of each value in details (dict)
|
|
94
|
+
_field_dict = {}
|
|
95
|
+
if self.details:
|
|
96
|
+
for _key_details in self.details:
|
|
97
|
+
if self.details[_key_details]:
|
|
98
|
+
_field_dict[_key_details] = self.details[_key_details].to_dict()
|
|
99
|
+
_dict['details'] = _field_dict
|
|
100
|
+
# puts key-value pairs in additional_properties in the top level
|
|
101
|
+
if self.additional_properties is not None:
|
|
102
|
+
for _key, _value in self.additional_properties.items():
|
|
103
|
+
_dict[_key] = _value
|
|
104
|
+
|
|
105
|
+
# set to None if info (nullable) is None
|
|
106
|
+
# and model_fields_set contains the field
|
|
107
|
+
if self.info is None and "info" in self.model_fields_set:
|
|
108
|
+
_dict['info'] = None
|
|
109
|
+
|
|
110
|
+
# set to None if error (nullable) is None
|
|
111
|
+
# and model_fields_set contains the field
|
|
112
|
+
if self.error is None and "error" in self.model_fields_set:
|
|
113
|
+
_dict['error'] = 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 HealthControllerCheck503Response 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
|
+
"status": obj.get("status"),
|
|
128
|
+
"info": dict(
|
|
129
|
+
(_k, HealthControllerCheck200ResponseInfoValue.from_dict(_v))
|
|
130
|
+
for _k, _v in obj["info"].items()
|
|
131
|
+
)
|
|
132
|
+
if obj.get("info") is not None
|
|
133
|
+
else None,
|
|
134
|
+
"error": dict(
|
|
135
|
+
(_k, HealthControllerCheck200ResponseInfoValue.from_dict(_v))
|
|
136
|
+
for _k, _v in obj["error"].items()
|
|
137
|
+
)
|
|
138
|
+
if obj.get("error") is not None
|
|
139
|
+
else None,
|
|
140
|
+
"details": dict(
|
|
141
|
+
(_k, HealthControllerCheck200ResponseInfoValue.from_dict(_v))
|
|
142
|
+
for _k, _v in obj["details"].items()
|
|
143
|
+
)
|
|
144
|
+
if obj.get("details") is not None
|
|
145
|
+
else None
|
|
146
|
+
})
|
|
147
|
+
# store additional fields in additional_properties
|
|
148
|
+
for _key in obj.keys():
|
|
149
|
+
if _key not in cls.__properties:
|
|
150
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
151
|
+
|
|
152
|
+
return _obj
|
|
153
|
+
|
|
154
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
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, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from daytona_api_client.models.sandbox_created_post_request_data import SandboxCreatedPostRequestData
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class SandboxCreatedPostRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SandboxCreatedPostRequest
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
event: Optional[StrictStr] = None
|
|
33
|
+
timestamp: Optional[datetime] = None
|
|
34
|
+
data: Optional[SandboxCreatedPostRequestData] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["event", "timestamp", "data"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of SandboxCreatedPostRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
80
|
+
if self.data:
|
|
81
|
+
_dict['data'] = self.data.to_dict()
|
|
82
|
+
# puts key-value pairs in additional_properties in the top level
|
|
83
|
+
if self.additional_properties is not None:
|
|
84
|
+
for _key, _value in self.additional_properties.items():
|
|
85
|
+
_dict[_key] = _value
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of SandboxCreatedPostRequest from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"event": obj.get("event"),
|
|
100
|
+
"timestamp": obj.get("timestamp"),
|
|
101
|
+
"data": SandboxCreatedPostRequestData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
102
|
+
})
|
|
103
|
+
# store additional fields in additional_properties
|
|
104
|
+
for _key in obj.keys():
|
|
105
|
+
if _key not in cls.__properties:
|
|
106
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
107
|
+
|
|
108
|
+
return _obj
|
|
109
|
+
|
|
110
|
+
|