daytona_api_client_async 0.0.0.dev0__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.
- daytona_api_client_async/__init__.py +195 -0
- daytona_api_client_async/api/__init__.py +21 -0
- daytona_api_client_async/api/api_keys_api.py +1673 -0
- daytona_api_client_async/api/audit_api.py +750 -0
- daytona_api_client_async/api/config_api.py +279 -0
- daytona_api_client_async/api/default_api.py +1884 -0
- daytona_api_client_async/api/docker_registry_api.py +1965 -0
- daytona_api_client_async/api/health_api.py +282 -0
- daytona_api_client_async/api/object_storage_api.py +299 -0
- daytona_api_client_async/api/organizations_api.py +7836 -0
- daytona_api_client_async/api/preview_api.py +826 -0
- daytona_api_client_async/api/regions_api.py +316 -0
- daytona_api_client_async/api/runners_api.py +1560 -0
- daytona_api_client_async/api/sandbox_api.py +6927 -0
- daytona_api_client_async/api/snapshots_api.py +2630 -0
- daytona_api_client_async/api/toolbox_api.py +20759 -0
- daytona_api_client_async/api/users_api.py +2319 -0
- daytona_api_client_async/api/volumes_api.py +1419 -0
- daytona_api_client_async/api/webhooks_api.py +1704 -0
- daytona_api_client_async/api/workspace_api.py +4036 -0
- daytona_api_client_async/api_client.py +801 -0
- daytona_api_client_async/api_response.py +21 -0
- daytona_api_client_async/configuration.py +579 -0
- daytona_api_client_async/exceptions.py +217 -0
- daytona_api_client_async/models/__init__.py +162 -0
- daytona_api_client_async/models/account_provider.py +103 -0
- daytona_api_client_async/models/announcement.py +103 -0
- daytona_api_client_async/models/api_key_list.py +132 -0
- daytona_api_client_async/models/api_key_response.py +123 -0
- daytona_api_client_async/models/audit_log.py +128 -0
- daytona_api_client_async/models/build_info.py +108 -0
- daytona_api_client_async/models/command.py +105 -0
- daytona_api_client_async/models/completion_context.py +103 -0
- daytona_api_client_async/models/completion_item.py +113 -0
- daytona_api_client_async/models/completion_list.py +111 -0
- daytona_api_client_async/models/compressed_screenshot_response.py +105 -0
- daytona_api_client_async/models/computer_use_start_response.py +103 -0
- daytona_api_client_async/models/computer_use_status_response.py +108 -0
- daytona_api_client_async/models/computer_use_stop_response.py +103 -0
- daytona_api_client_async/models/configuration.py +145 -0
- daytona_api_client_async/models/create_api_key.py +119 -0
- daytona_api_client_async/models/create_audit_log.py +128 -0
- daytona_api_client_async/models/create_build_info.py +103 -0
- daytona_api_client_async/models/create_docker_registry.py +120 -0
- daytona_api_client_async/models/create_linked_account.py +103 -0
- daytona_api_client_async/models/create_organization.py +103 -0
- daytona_api_client_async/models/create_organization_invitation.py +115 -0
- daytona_api_client_async/models/create_organization_quota.py +117 -0
- daytona_api_client_async/models/create_organization_role.py +113 -0
- daytona_api_client_async/models/create_runner.py +130 -0
- daytona_api_client_async/models/create_sandbox.py +159 -0
- daytona_api_client_async/models/create_session_request.py +101 -0
- daytona_api_client_async/models/create_snapshot.py +121 -0
- daytona_api_client_async/models/create_user.py +127 -0
- daytona_api_client_async/models/create_volume.py +101 -0
- daytona_api_client_async/models/create_workspace.py +161 -0
- daytona_api_client_async/models/daytona_configuration.py +158 -0
- daytona_api_client_async/models/display_info_response.py +101 -0
- daytona_api_client_async/models/docker_registry.py +123 -0
- daytona_api_client_async/models/download_files.py +101 -0
- daytona_api_client_async/models/empty_response.py +101 -0
- daytona_api_client_async/models/execute_request.py +105 -0
- daytona_api_client_async/models/execute_response.py +103 -0
- daytona_api_client_async/models/file_info.py +115 -0
- daytona_api_client_async/models/file_status.py +107 -0
- daytona_api_client_async/models/git_add_request.py +103 -0
- daytona_api_client_async/models/git_branch_request.py +103 -0
- daytona_api_client_async/models/git_checkout_request.py +103 -0
- daytona_api_client_async/models/git_clone_request.py +111 -0
- daytona_api_client_async/models/git_commit_info.py +109 -0
- daytona_api_client_async/models/git_commit_request.py +109 -0
- daytona_api_client_async/models/git_commit_response.py +101 -0
- daytona_api_client_async/models/git_delete_branch_request.py +103 -0
- daytona_api_client_async/models/git_repo_request.py +105 -0
- daytona_api_client_async/models/git_status.py +117 -0
- daytona_api_client_async/models/health_controller_check200_response.py +154 -0
- daytona_api_client_async/models/health_controller_check200_response_info_value.py +101 -0
- daytona_api_client_async/models/health_controller_check503_response.py +154 -0
- daytona_api_client_async/models/keyboard_hotkey_request.py +101 -0
- daytona_api_client_async/models/keyboard_hotkey_response.py +103 -0
- daytona_api_client_async/models/keyboard_press_request.py +103 -0
- daytona_api_client_async/models/keyboard_press_response.py +105 -0
- daytona_api_client_async/models/keyboard_type_request.py +103 -0
- daytona_api_client_async/models/keyboard_type_response.py +103 -0
- daytona_api_client_async/models/list_branch_response.py +101 -0
- daytona_api_client_async/models/lsp_completion_params.py +117 -0
- daytona_api_client_async/models/lsp_document_request.py +105 -0
- daytona_api_client_async/models/lsp_location.py +107 -0
- daytona_api_client_async/models/lsp_server_request.py +103 -0
- daytona_api_client_async/models/lsp_symbol.py +109 -0
- daytona_api_client_async/models/match.py +105 -0
- daytona_api_client_async/models/mouse_click_request.py +107 -0
- daytona_api_client_async/models/mouse_click_response.py +103 -0
- daytona_api_client_async/models/mouse_drag_request.py +109 -0
- daytona_api_client_async/models/mouse_drag_response.py +103 -0
- daytona_api_client_async/models/mouse_move_request.py +103 -0
- daytona_api_client_async/models/mouse_move_response.py +103 -0
- daytona_api_client_async/models/mouse_position.py +103 -0
- daytona_api_client_async/models/mouse_scroll_request.py +107 -0
- daytona_api_client_async/models/mouse_scroll_response.py +101 -0
- daytona_api_client_async/models/oidc_config.py +105 -0
- daytona_api_client_async/models/organization.py +153 -0
- daytona_api_client_async/models/organization_invitation.py +144 -0
- daytona_api_client_async/models/organization_role.py +122 -0
- daytona_api_client_async/models/organization_sandbox_default_limited_network_egress.py +101 -0
- daytona_api_client_async/models/organization_sandbox_default_network_block_all.py +101 -0
- daytona_api_client_async/models/organization_suspension.py +106 -0
- daytona_api_client_async/models/organization_usage_overview.py +117 -0
- daytona_api_client_async/models/organization_user.py +131 -0
- daytona_api_client_async/models/paginated_audit_logs.py +117 -0
- daytona_api_client_async/models/paginated_sandboxes.py +115 -0
- daytona_api_client_async/models/paginated_snapshots.py +115 -0
- daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
- daytona_api_client_async/models/paginated_workspaces.py +115 -0
- daytona_api_client_async/models/port_preview_url.py +105 -0
- daytona_api_client_async/models/position.py +103 -0
- daytona_api_client_async/models/posthog_config.py +103 -0
- daytona_api_client_async/models/process_errors_response.py +103 -0
- daytona_api_client_async/models/process_logs_response.py +103 -0
- daytona_api_client_async/models/process_restart_response.py +103 -0
- daytona_api_client_async/models/process_status_response.py +103 -0
- daytona_api_client_async/models/project_dir_response.py +101 -0
- daytona_api_client_async/models/pty_create_request.py +111 -0
- daytona_api_client_async/models/pty_create_response.py +101 -0
- daytona_api_client_async/models/pty_list_response.py +109 -0
- daytona_api_client_async/models/pty_resize_request.py +103 -0
- daytona_api_client_async/models/pty_session_info.py +115 -0
- daytona_api_client_async/models/range.py +110 -0
- daytona_api_client_async/models/rate_limit_config.py +120 -0
- daytona_api_client_async/models/rate_limit_entry.py +103 -0
- daytona_api_client_async/models/region.py +114 -0
- daytona_api_client_async/models/region_quota.py +109 -0
- daytona_api_client_async/models/region_screenshot_response.py +105 -0
- daytona_api_client_async/models/region_usage_overview.py +113 -0
- daytona_api_client_async/models/registry_push_access_dto.py +111 -0
- daytona_api_client_async/models/replace_request.py +105 -0
- daytona_api_client_async/models/replace_result.py +105 -0
- daytona_api_client_async/models/runner.py +153 -0
- daytona_api_client_async/models/runner_region.py +39 -0
- daytona_api_client_async/models/runner_snapshot_dto.py +105 -0
- daytona_api_client_async/models/runner_state.py +41 -0
- daytona_api_client_async/models/sandbox.py +193 -0
- daytona_api_client_async/models/sandbox_class.py +39 -0
- daytona_api_client_async/models/sandbox_created_post_request.py +110 -0
- daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
- daytona_api_client_async/models/sandbox_desired_state.py +41 -0
- daytona_api_client_async/models/sandbox_info.py +105 -0
- daytona_api_client_async/models/sandbox_labels.py +101 -0
- daytona_api_client_async/models/sandbox_state.py +52 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
- daytona_api_client_async/models/sandbox_volume.py +105 -0
- daytona_api_client_async/models/screenshot_response.py +105 -0
- daytona_api_client_async/models/search_files_response.py +101 -0
- daytona_api_client_async/models/send_webhook_dto.py +105 -0
- daytona_api_client_async/models/session.py +116 -0
- daytona_api_client_async/models/session_command_logs_response.py +103 -0
- daytona_api_client_async/models/session_execute_request.py +105 -0
- daytona_api_client_async/models/session_execute_response.py +105 -0
- daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
- daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
- daytona_api_client_async/models/snapshot_created_post_request_data.py +136 -0
- daytona_api_client_async/models/snapshot_dto.py +159 -0
- daytona_api_client_async/models/snapshot_removed_post_request.py +106 -0
- daytona_api_client_async/models/snapshot_state.py +44 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
- daytona_api_client_async/models/ssh_access_dto.py +112 -0
- daytona_api_client_async/models/ssh_access_validation_dto.py +103 -0
- daytona_api_client_async/models/storage_access_dto.py +111 -0
- daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
- daytona_api_client_async/models/update_docker_registry.py +109 -0
- daytona_api_client_async/models/update_organization_default_region.py +101 -0
- daytona_api_client_async/models/update_organization_invitation.py +113 -0
- daytona_api_client_async/models/update_organization_member_access.py +110 -0
- daytona_api_client_async/models/update_organization_member_role.py +108 -0
- daytona_api_client_async/models/update_organization_quota.py +162 -0
- daytona_api_client_async/models/update_organization_region_quota.py +120 -0
- daytona_api_client_async/models/update_organization_role.py +113 -0
- daytona_api_client_async/models/update_sandbox_state_dto.py +110 -0
- daytona_api_client_async/models/user.py +118 -0
- daytona_api_client_async/models/user_home_dir_response.py +101 -0
- daytona_api_client_async/models/user_public_key.py +103 -0
- daytona_api_client_async/models/volume_created_post_request.py +110 -0
- daytona_api_client_async/models/volume_created_post_request_data.py +126 -0
- daytona_api_client_async/models/volume_dto.py +126 -0
- daytona_api_client_async/models/volume_state.py +43 -0
- daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/volume_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/volume_state_updated_post_request_data_volume.py +115 -0
- daytona_api_client_async/models/webhook_app_portal_access.py +101 -0
- daytona_api_client_async/models/webhook_controller_get_app_portal_access200_response.py +101 -0
- daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
- daytona_api_client_async/models/webhook_controller_get_status200_response.py +101 -0
- daytona_api_client_async/models/webhook_initialization_status.py +121 -0
- daytona_api_client_async/models/windows_response.py +103 -0
- daytona_api_client_async/models/work_dir_response.py +101 -0
- daytona_api_client_async/models/workdir_response.py +101 -0
- daytona_api_client_async/models/workspace.py +215 -0
- daytona_api_client_async/models/workspace_port_preview_url.py +103 -0
- daytona_api_client_async/py.typed +0 -0
- daytona_api_client_async/rest.py +214 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/METADATA +27 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/RECORD +209 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/WHEEL +5 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/licenses/LICENSE +190 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2630 @@
|
|
|
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
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictBool, StrictStr, field_validator
|
|
21
|
+
from typing import Optional, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from daytona_api_client_async.models.create_snapshot import CreateSnapshot
|
|
24
|
+
from daytona_api_client_async.models.paginated_snapshots import PaginatedSnapshots
|
|
25
|
+
from daytona_api_client_async.models.set_snapshot_general_status_dto import SetSnapshotGeneralStatusDto
|
|
26
|
+
from daytona_api_client_async.models.snapshot_dto import SnapshotDto
|
|
27
|
+
|
|
28
|
+
from daytona_api_client_async.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from daytona_api_client_async.api_response import ApiResponse
|
|
30
|
+
from daytona_api_client_async.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SnapshotsApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
async def activate_snapshot(
|
|
48
|
+
self,
|
|
49
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
50
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> SnapshotDto:
|
|
64
|
+
"""Activate a snapshot
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
:param id: Snapshot ID (required)
|
|
68
|
+
:type id: str
|
|
69
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
70
|
+
:type x_daytona_organization_id: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._activate_snapshot_serialize(
|
|
94
|
+
id=id,
|
|
95
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'200': "SnapshotDto",
|
|
104
|
+
'400': None,
|
|
105
|
+
'404': None,
|
|
106
|
+
}
|
|
107
|
+
response_data = await self.api_client.call_api(
|
|
108
|
+
*_param,
|
|
109
|
+
_request_timeout=_request_timeout
|
|
110
|
+
)
|
|
111
|
+
await response_data.read()
|
|
112
|
+
return self.api_client.response_deserialize(
|
|
113
|
+
response_data=response_data,
|
|
114
|
+
response_types_map=_response_types_map,
|
|
115
|
+
).data
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@validate_call
|
|
119
|
+
async def activate_snapshot_with_http_info(
|
|
120
|
+
self,
|
|
121
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
122
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
123
|
+
_request_timeout: Union[
|
|
124
|
+
None,
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Tuple[
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_content_type: Optional[StrictStr] = None,
|
|
133
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
135
|
+
) -> ApiResponse[SnapshotDto]:
|
|
136
|
+
"""Activate a snapshot
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
:param id: Snapshot ID (required)
|
|
140
|
+
:type id: str
|
|
141
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
142
|
+
:type x_daytona_organization_id: str
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._activate_snapshot_serialize(
|
|
166
|
+
id=id,
|
|
167
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
168
|
+
_request_auth=_request_auth,
|
|
169
|
+
_content_type=_content_type,
|
|
170
|
+
_headers=_headers,
|
|
171
|
+
_host_index=_host_index
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
175
|
+
'200': "SnapshotDto",
|
|
176
|
+
'400': None,
|
|
177
|
+
'404': None,
|
|
178
|
+
}
|
|
179
|
+
response_data = await self.api_client.call_api(
|
|
180
|
+
*_param,
|
|
181
|
+
_request_timeout=_request_timeout
|
|
182
|
+
)
|
|
183
|
+
await response_data.read()
|
|
184
|
+
return self.api_client.response_deserialize(
|
|
185
|
+
response_data=response_data,
|
|
186
|
+
response_types_map=_response_types_map,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@validate_call
|
|
191
|
+
async def activate_snapshot_without_preload_content(
|
|
192
|
+
self,
|
|
193
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
194
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
195
|
+
_request_timeout: Union[
|
|
196
|
+
None,
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Tuple[
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
) -> RESTResponseType:
|
|
208
|
+
"""Activate a snapshot
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
:param id: Snapshot ID (required)
|
|
212
|
+
:type id: str
|
|
213
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
214
|
+
:type x_daytona_organization_id: str
|
|
215
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
216
|
+
number provided, it will be total request
|
|
217
|
+
timeout. It can also be a pair (tuple) of
|
|
218
|
+
(connection, read) timeouts.
|
|
219
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
220
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
221
|
+
request; this effectively ignores the
|
|
222
|
+
authentication in the spec for a single request.
|
|
223
|
+
:type _request_auth: dict, optional
|
|
224
|
+
:param _content_type: force content-type for the request.
|
|
225
|
+
:type _content_type: str, Optional
|
|
226
|
+
:param _headers: set to override the headers for a single
|
|
227
|
+
request; this effectively ignores the headers
|
|
228
|
+
in the spec for a single request.
|
|
229
|
+
:type _headers: dict, optional
|
|
230
|
+
:param _host_index: set to override the host_index for a single
|
|
231
|
+
request; this effectively ignores the host_index
|
|
232
|
+
in the spec for a single request.
|
|
233
|
+
:type _host_index: int, optional
|
|
234
|
+
:return: Returns the result object.
|
|
235
|
+
""" # noqa: E501
|
|
236
|
+
|
|
237
|
+
_param = self._activate_snapshot_serialize(
|
|
238
|
+
id=id,
|
|
239
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
240
|
+
_request_auth=_request_auth,
|
|
241
|
+
_content_type=_content_type,
|
|
242
|
+
_headers=_headers,
|
|
243
|
+
_host_index=_host_index
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
247
|
+
'200': "SnapshotDto",
|
|
248
|
+
'400': None,
|
|
249
|
+
'404': None,
|
|
250
|
+
}
|
|
251
|
+
response_data = await self.api_client.call_api(
|
|
252
|
+
*_param,
|
|
253
|
+
_request_timeout=_request_timeout
|
|
254
|
+
)
|
|
255
|
+
return response_data.response
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def _activate_snapshot_serialize(
|
|
259
|
+
self,
|
|
260
|
+
id,
|
|
261
|
+
x_daytona_organization_id,
|
|
262
|
+
_request_auth,
|
|
263
|
+
_content_type,
|
|
264
|
+
_headers,
|
|
265
|
+
_host_index,
|
|
266
|
+
) -> RequestSerialized:
|
|
267
|
+
|
|
268
|
+
_host = None
|
|
269
|
+
|
|
270
|
+
_collection_formats: Dict[str, str] = {
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
_path_params: Dict[str, str] = {}
|
|
274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
277
|
+
_files: Dict[
|
|
278
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
279
|
+
] = {}
|
|
280
|
+
_body_params: Optional[bytes] = None
|
|
281
|
+
|
|
282
|
+
# process the path parameters
|
|
283
|
+
if id is not None:
|
|
284
|
+
_path_params['id'] = id
|
|
285
|
+
# process the query parameters
|
|
286
|
+
# process the header parameters
|
|
287
|
+
if x_daytona_organization_id is not None:
|
|
288
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
289
|
+
# process the form parameters
|
|
290
|
+
# process the body parameter
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
# set the HTTP header `Accept`
|
|
294
|
+
if 'Accept' not in _header_params:
|
|
295
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
296
|
+
[
|
|
297
|
+
'application/json'
|
|
298
|
+
]
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
# authentication setting
|
|
303
|
+
_auth_settings: List[str] = [
|
|
304
|
+
'bearer',
|
|
305
|
+
'oauth2'
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
return self.api_client.param_serialize(
|
|
309
|
+
method='POST',
|
|
310
|
+
resource_path='/snapshots/{id}/activate',
|
|
311
|
+
path_params=_path_params,
|
|
312
|
+
query_params=_query_params,
|
|
313
|
+
header_params=_header_params,
|
|
314
|
+
body=_body_params,
|
|
315
|
+
post_params=_form_params,
|
|
316
|
+
files=_files,
|
|
317
|
+
auth_settings=_auth_settings,
|
|
318
|
+
collection_formats=_collection_formats,
|
|
319
|
+
_host=_host,
|
|
320
|
+
_request_auth=_request_auth
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
@validate_call
|
|
327
|
+
async def can_cleanup_image(
|
|
328
|
+
self,
|
|
329
|
+
image_name: Annotated[StrictStr, Field(description="Image name with tag to check")],
|
|
330
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
331
|
+
_request_timeout: Union[
|
|
332
|
+
None,
|
|
333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
334
|
+
Tuple[
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
337
|
+
]
|
|
338
|
+
] = None,
|
|
339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
340
|
+
_content_type: Optional[StrictStr] = None,
|
|
341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
343
|
+
) -> bool:
|
|
344
|
+
"""Check if an image can be cleaned up
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
:param image_name: Image name with tag to check (required)
|
|
348
|
+
:type image_name: str
|
|
349
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
350
|
+
:type x_daytona_organization_id: str
|
|
351
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
352
|
+
number provided, it will be total request
|
|
353
|
+
timeout. It can also be a pair (tuple) of
|
|
354
|
+
(connection, read) timeouts.
|
|
355
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
356
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
357
|
+
request; this effectively ignores the
|
|
358
|
+
authentication in the spec for a single request.
|
|
359
|
+
:type _request_auth: dict, optional
|
|
360
|
+
:param _content_type: force content-type for the request.
|
|
361
|
+
:type _content_type: str, Optional
|
|
362
|
+
:param _headers: set to override the headers for a single
|
|
363
|
+
request; this effectively ignores the headers
|
|
364
|
+
in the spec for a single request.
|
|
365
|
+
:type _headers: dict, optional
|
|
366
|
+
:param _host_index: set to override the host_index for a single
|
|
367
|
+
request; this effectively ignores the host_index
|
|
368
|
+
in the spec for a single request.
|
|
369
|
+
:type _host_index: int, optional
|
|
370
|
+
:return: Returns the result object.
|
|
371
|
+
""" # noqa: E501
|
|
372
|
+
|
|
373
|
+
_param = self._can_cleanup_image_serialize(
|
|
374
|
+
image_name=image_name,
|
|
375
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
376
|
+
_request_auth=_request_auth,
|
|
377
|
+
_content_type=_content_type,
|
|
378
|
+
_headers=_headers,
|
|
379
|
+
_host_index=_host_index
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
+
'200': "bool",
|
|
384
|
+
}
|
|
385
|
+
response_data = await self.api_client.call_api(
|
|
386
|
+
*_param,
|
|
387
|
+
_request_timeout=_request_timeout
|
|
388
|
+
)
|
|
389
|
+
await response_data.read()
|
|
390
|
+
return self.api_client.response_deserialize(
|
|
391
|
+
response_data=response_data,
|
|
392
|
+
response_types_map=_response_types_map,
|
|
393
|
+
).data
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
@validate_call
|
|
397
|
+
async def can_cleanup_image_with_http_info(
|
|
398
|
+
self,
|
|
399
|
+
image_name: Annotated[StrictStr, Field(description="Image name with tag to check")],
|
|
400
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
401
|
+
_request_timeout: Union[
|
|
402
|
+
None,
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
404
|
+
Tuple[
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
407
|
+
]
|
|
408
|
+
] = None,
|
|
409
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
410
|
+
_content_type: Optional[StrictStr] = None,
|
|
411
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
413
|
+
) -> ApiResponse[bool]:
|
|
414
|
+
"""Check if an image can be cleaned up
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
:param image_name: Image name with tag to check (required)
|
|
418
|
+
:type image_name: str
|
|
419
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
420
|
+
:type x_daytona_organization_id: str
|
|
421
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
422
|
+
number provided, it will be total request
|
|
423
|
+
timeout. It can also be a pair (tuple) of
|
|
424
|
+
(connection, read) timeouts.
|
|
425
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
426
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
427
|
+
request; this effectively ignores the
|
|
428
|
+
authentication in the spec for a single request.
|
|
429
|
+
:type _request_auth: dict, optional
|
|
430
|
+
:param _content_type: force content-type for the request.
|
|
431
|
+
:type _content_type: str, Optional
|
|
432
|
+
:param _headers: set to override the headers for a single
|
|
433
|
+
request; this effectively ignores the headers
|
|
434
|
+
in the spec for a single request.
|
|
435
|
+
:type _headers: dict, optional
|
|
436
|
+
:param _host_index: set to override the host_index for a single
|
|
437
|
+
request; this effectively ignores the host_index
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _host_index: int, optional
|
|
440
|
+
:return: Returns the result object.
|
|
441
|
+
""" # noqa: E501
|
|
442
|
+
|
|
443
|
+
_param = self._can_cleanup_image_serialize(
|
|
444
|
+
image_name=image_name,
|
|
445
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
446
|
+
_request_auth=_request_auth,
|
|
447
|
+
_content_type=_content_type,
|
|
448
|
+
_headers=_headers,
|
|
449
|
+
_host_index=_host_index
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
|
+
'200': "bool",
|
|
454
|
+
}
|
|
455
|
+
response_data = await self.api_client.call_api(
|
|
456
|
+
*_param,
|
|
457
|
+
_request_timeout=_request_timeout
|
|
458
|
+
)
|
|
459
|
+
await response_data.read()
|
|
460
|
+
return self.api_client.response_deserialize(
|
|
461
|
+
response_data=response_data,
|
|
462
|
+
response_types_map=_response_types_map,
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@validate_call
|
|
467
|
+
async def can_cleanup_image_without_preload_content(
|
|
468
|
+
self,
|
|
469
|
+
image_name: Annotated[StrictStr, Field(description="Image name with tag to check")],
|
|
470
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
471
|
+
_request_timeout: Union[
|
|
472
|
+
None,
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Tuple[
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
477
|
+
]
|
|
478
|
+
] = None,
|
|
479
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_content_type: Optional[StrictStr] = None,
|
|
481
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
483
|
+
) -> RESTResponseType:
|
|
484
|
+
"""Check if an image can be cleaned up
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
:param image_name: Image name with tag to check (required)
|
|
488
|
+
:type image_name: str
|
|
489
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
490
|
+
:type x_daytona_organization_id: str
|
|
491
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
492
|
+
number provided, it will be total request
|
|
493
|
+
timeout. It can also be a pair (tuple) of
|
|
494
|
+
(connection, read) timeouts.
|
|
495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
496
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
497
|
+
request; this effectively ignores the
|
|
498
|
+
authentication in the spec for a single request.
|
|
499
|
+
:type _request_auth: dict, optional
|
|
500
|
+
:param _content_type: force content-type for the request.
|
|
501
|
+
:type _content_type: str, Optional
|
|
502
|
+
:param _headers: set to override the headers for a single
|
|
503
|
+
request; this effectively ignores the headers
|
|
504
|
+
in the spec for a single request.
|
|
505
|
+
:type _headers: dict, optional
|
|
506
|
+
:param _host_index: set to override the host_index for a single
|
|
507
|
+
request; this effectively ignores the host_index
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _host_index: int, optional
|
|
510
|
+
:return: Returns the result object.
|
|
511
|
+
""" # noqa: E501
|
|
512
|
+
|
|
513
|
+
_param = self._can_cleanup_image_serialize(
|
|
514
|
+
image_name=image_name,
|
|
515
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
516
|
+
_request_auth=_request_auth,
|
|
517
|
+
_content_type=_content_type,
|
|
518
|
+
_headers=_headers,
|
|
519
|
+
_host_index=_host_index
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
523
|
+
'200': "bool",
|
|
524
|
+
}
|
|
525
|
+
response_data = await self.api_client.call_api(
|
|
526
|
+
*_param,
|
|
527
|
+
_request_timeout=_request_timeout
|
|
528
|
+
)
|
|
529
|
+
return response_data.response
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
def _can_cleanup_image_serialize(
|
|
533
|
+
self,
|
|
534
|
+
image_name,
|
|
535
|
+
x_daytona_organization_id,
|
|
536
|
+
_request_auth,
|
|
537
|
+
_content_type,
|
|
538
|
+
_headers,
|
|
539
|
+
_host_index,
|
|
540
|
+
) -> RequestSerialized:
|
|
541
|
+
|
|
542
|
+
_host = None
|
|
543
|
+
|
|
544
|
+
_collection_formats: Dict[str, str] = {
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[
|
|
552
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
553
|
+
] = {}
|
|
554
|
+
_body_params: Optional[bytes] = None
|
|
555
|
+
|
|
556
|
+
# process the path parameters
|
|
557
|
+
# process the query parameters
|
|
558
|
+
if image_name is not None:
|
|
559
|
+
|
|
560
|
+
_query_params.append(('imageName', image_name))
|
|
561
|
+
|
|
562
|
+
# process the header parameters
|
|
563
|
+
if x_daytona_organization_id is not None:
|
|
564
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
565
|
+
# process the form parameters
|
|
566
|
+
# process the body parameter
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# set the HTTP header `Accept`
|
|
570
|
+
if 'Accept' not in _header_params:
|
|
571
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
572
|
+
[
|
|
573
|
+
'application/json'
|
|
574
|
+
]
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
# authentication setting
|
|
579
|
+
_auth_settings: List[str] = [
|
|
580
|
+
'bearer',
|
|
581
|
+
'oauth2'
|
|
582
|
+
]
|
|
583
|
+
|
|
584
|
+
return self.api_client.param_serialize(
|
|
585
|
+
method='GET',
|
|
586
|
+
resource_path='/snapshots/can-cleanup-image',
|
|
587
|
+
path_params=_path_params,
|
|
588
|
+
query_params=_query_params,
|
|
589
|
+
header_params=_header_params,
|
|
590
|
+
body=_body_params,
|
|
591
|
+
post_params=_form_params,
|
|
592
|
+
files=_files,
|
|
593
|
+
auth_settings=_auth_settings,
|
|
594
|
+
collection_formats=_collection_formats,
|
|
595
|
+
_host=_host,
|
|
596
|
+
_request_auth=_request_auth
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
@validate_call
|
|
603
|
+
async def create_snapshot(
|
|
604
|
+
self,
|
|
605
|
+
create_snapshot: CreateSnapshot,
|
|
606
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
607
|
+
_request_timeout: Union[
|
|
608
|
+
None,
|
|
609
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
610
|
+
Tuple[
|
|
611
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
612
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
613
|
+
]
|
|
614
|
+
] = None,
|
|
615
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
616
|
+
_content_type: Optional[StrictStr] = None,
|
|
617
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
618
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
619
|
+
) -> SnapshotDto:
|
|
620
|
+
"""Create a new snapshot
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
:param create_snapshot: (required)
|
|
624
|
+
:type create_snapshot: CreateSnapshot
|
|
625
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
626
|
+
:type x_daytona_organization_id: str
|
|
627
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
628
|
+
number provided, it will be total request
|
|
629
|
+
timeout. It can also be a pair (tuple) of
|
|
630
|
+
(connection, read) timeouts.
|
|
631
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
632
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
633
|
+
request; this effectively ignores the
|
|
634
|
+
authentication in the spec for a single request.
|
|
635
|
+
:type _request_auth: dict, optional
|
|
636
|
+
:param _content_type: force content-type for the request.
|
|
637
|
+
:type _content_type: str, Optional
|
|
638
|
+
:param _headers: set to override the headers for a single
|
|
639
|
+
request; this effectively ignores the headers
|
|
640
|
+
in the spec for a single request.
|
|
641
|
+
:type _headers: dict, optional
|
|
642
|
+
:param _host_index: set to override the host_index for a single
|
|
643
|
+
request; this effectively ignores the host_index
|
|
644
|
+
in the spec for a single request.
|
|
645
|
+
:type _host_index: int, optional
|
|
646
|
+
:return: Returns the result object.
|
|
647
|
+
""" # noqa: E501
|
|
648
|
+
|
|
649
|
+
_param = self._create_snapshot_serialize(
|
|
650
|
+
create_snapshot=create_snapshot,
|
|
651
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
652
|
+
_request_auth=_request_auth,
|
|
653
|
+
_content_type=_content_type,
|
|
654
|
+
_headers=_headers,
|
|
655
|
+
_host_index=_host_index
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
659
|
+
'200': "SnapshotDto",
|
|
660
|
+
'400': None,
|
|
661
|
+
}
|
|
662
|
+
response_data = await self.api_client.call_api(
|
|
663
|
+
*_param,
|
|
664
|
+
_request_timeout=_request_timeout
|
|
665
|
+
)
|
|
666
|
+
await response_data.read()
|
|
667
|
+
return self.api_client.response_deserialize(
|
|
668
|
+
response_data=response_data,
|
|
669
|
+
response_types_map=_response_types_map,
|
|
670
|
+
).data
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
@validate_call
|
|
674
|
+
async def create_snapshot_with_http_info(
|
|
675
|
+
self,
|
|
676
|
+
create_snapshot: CreateSnapshot,
|
|
677
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
678
|
+
_request_timeout: Union[
|
|
679
|
+
None,
|
|
680
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
681
|
+
Tuple[
|
|
682
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
683
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
684
|
+
]
|
|
685
|
+
] = None,
|
|
686
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
687
|
+
_content_type: Optional[StrictStr] = None,
|
|
688
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
689
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
690
|
+
) -> ApiResponse[SnapshotDto]:
|
|
691
|
+
"""Create a new snapshot
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
:param create_snapshot: (required)
|
|
695
|
+
:type create_snapshot: CreateSnapshot
|
|
696
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
697
|
+
:type x_daytona_organization_id: str
|
|
698
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
699
|
+
number provided, it will be total request
|
|
700
|
+
timeout. It can also be a pair (tuple) of
|
|
701
|
+
(connection, read) timeouts.
|
|
702
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
703
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
704
|
+
request; this effectively ignores the
|
|
705
|
+
authentication in the spec for a single request.
|
|
706
|
+
:type _request_auth: dict, optional
|
|
707
|
+
:param _content_type: force content-type for the request.
|
|
708
|
+
:type _content_type: str, Optional
|
|
709
|
+
:param _headers: set to override the headers for a single
|
|
710
|
+
request; this effectively ignores the headers
|
|
711
|
+
in the spec for a single request.
|
|
712
|
+
:type _headers: dict, optional
|
|
713
|
+
:param _host_index: set to override the host_index for a single
|
|
714
|
+
request; this effectively ignores the host_index
|
|
715
|
+
in the spec for a single request.
|
|
716
|
+
:type _host_index: int, optional
|
|
717
|
+
:return: Returns the result object.
|
|
718
|
+
""" # noqa: E501
|
|
719
|
+
|
|
720
|
+
_param = self._create_snapshot_serialize(
|
|
721
|
+
create_snapshot=create_snapshot,
|
|
722
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
723
|
+
_request_auth=_request_auth,
|
|
724
|
+
_content_type=_content_type,
|
|
725
|
+
_headers=_headers,
|
|
726
|
+
_host_index=_host_index
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
730
|
+
'200': "SnapshotDto",
|
|
731
|
+
'400': None,
|
|
732
|
+
}
|
|
733
|
+
response_data = await self.api_client.call_api(
|
|
734
|
+
*_param,
|
|
735
|
+
_request_timeout=_request_timeout
|
|
736
|
+
)
|
|
737
|
+
await response_data.read()
|
|
738
|
+
return self.api_client.response_deserialize(
|
|
739
|
+
response_data=response_data,
|
|
740
|
+
response_types_map=_response_types_map,
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
@validate_call
|
|
745
|
+
async def create_snapshot_without_preload_content(
|
|
746
|
+
self,
|
|
747
|
+
create_snapshot: CreateSnapshot,
|
|
748
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
749
|
+
_request_timeout: Union[
|
|
750
|
+
None,
|
|
751
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
752
|
+
Tuple[
|
|
753
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
754
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
755
|
+
]
|
|
756
|
+
] = None,
|
|
757
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
758
|
+
_content_type: Optional[StrictStr] = None,
|
|
759
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
760
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
761
|
+
) -> RESTResponseType:
|
|
762
|
+
"""Create a new snapshot
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
:param create_snapshot: (required)
|
|
766
|
+
:type create_snapshot: CreateSnapshot
|
|
767
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
768
|
+
:type x_daytona_organization_id: str
|
|
769
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
770
|
+
number provided, it will be total request
|
|
771
|
+
timeout. It can also be a pair (tuple) of
|
|
772
|
+
(connection, read) timeouts.
|
|
773
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
774
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
775
|
+
request; this effectively ignores the
|
|
776
|
+
authentication in the spec for a single request.
|
|
777
|
+
:type _request_auth: dict, optional
|
|
778
|
+
:param _content_type: force content-type for the request.
|
|
779
|
+
:type _content_type: str, Optional
|
|
780
|
+
:param _headers: set to override the headers for a single
|
|
781
|
+
request; this effectively ignores the headers
|
|
782
|
+
in the spec for a single request.
|
|
783
|
+
:type _headers: dict, optional
|
|
784
|
+
:param _host_index: set to override the host_index for a single
|
|
785
|
+
request; this effectively ignores the host_index
|
|
786
|
+
in the spec for a single request.
|
|
787
|
+
:type _host_index: int, optional
|
|
788
|
+
:return: Returns the result object.
|
|
789
|
+
""" # noqa: E501
|
|
790
|
+
|
|
791
|
+
_param = self._create_snapshot_serialize(
|
|
792
|
+
create_snapshot=create_snapshot,
|
|
793
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
794
|
+
_request_auth=_request_auth,
|
|
795
|
+
_content_type=_content_type,
|
|
796
|
+
_headers=_headers,
|
|
797
|
+
_host_index=_host_index
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
801
|
+
'200': "SnapshotDto",
|
|
802
|
+
'400': None,
|
|
803
|
+
}
|
|
804
|
+
response_data = await self.api_client.call_api(
|
|
805
|
+
*_param,
|
|
806
|
+
_request_timeout=_request_timeout
|
|
807
|
+
)
|
|
808
|
+
return response_data.response
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
def _create_snapshot_serialize(
|
|
812
|
+
self,
|
|
813
|
+
create_snapshot,
|
|
814
|
+
x_daytona_organization_id,
|
|
815
|
+
_request_auth,
|
|
816
|
+
_content_type,
|
|
817
|
+
_headers,
|
|
818
|
+
_host_index,
|
|
819
|
+
) -> RequestSerialized:
|
|
820
|
+
|
|
821
|
+
_host = None
|
|
822
|
+
|
|
823
|
+
_collection_formats: Dict[str, str] = {
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
_path_params: Dict[str, str] = {}
|
|
827
|
+
_query_params: List[Tuple[str, str]] = []
|
|
828
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
829
|
+
_form_params: List[Tuple[str, str]] = []
|
|
830
|
+
_files: Dict[
|
|
831
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
832
|
+
] = {}
|
|
833
|
+
_body_params: Optional[bytes] = None
|
|
834
|
+
|
|
835
|
+
# process the path parameters
|
|
836
|
+
# process the query parameters
|
|
837
|
+
# process the header parameters
|
|
838
|
+
if x_daytona_organization_id is not None:
|
|
839
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
840
|
+
# process the form parameters
|
|
841
|
+
# process the body parameter
|
|
842
|
+
if create_snapshot is not None:
|
|
843
|
+
_body_params = create_snapshot
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
# set the HTTP header `Accept`
|
|
847
|
+
if 'Accept' not in _header_params:
|
|
848
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
849
|
+
[
|
|
850
|
+
'application/json'
|
|
851
|
+
]
|
|
852
|
+
)
|
|
853
|
+
|
|
854
|
+
# set the HTTP header `Content-Type`
|
|
855
|
+
if _content_type:
|
|
856
|
+
_header_params['Content-Type'] = _content_type
|
|
857
|
+
else:
|
|
858
|
+
_default_content_type = (
|
|
859
|
+
self.api_client.select_header_content_type(
|
|
860
|
+
[
|
|
861
|
+
'application/json'
|
|
862
|
+
]
|
|
863
|
+
)
|
|
864
|
+
)
|
|
865
|
+
if _default_content_type is not None:
|
|
866
|
+
_header_params['Content-Type'] = _default_content_type
|
|
867
|
+
|
|
868
|
+
# authentication setting
|
|
869
|
+
_auth_settings: List[str] = [
|
|
870
|
+
'bearer',
|
|
871
|
+
'oauth2'
|
|
872
|
+
]
|
|
873
|
+
|
|
874
|
+
return self.api_client.param_serialize(
|
|
875
|
+
method='POST',
|
|
876
|
+
resource_path='/snapshots',
|
|
877
|
+
path_params=_path_params,
|
|
878
|
+
query_params=_query_params,
|
|
879
|
+
header_params=_header_params,
|
|
880
|
+
body=_body_params,
|
|
881
|
+
post_params=_form_params,
|
|
882
|
+
files=_files,
|
|
883
|
+
auth_settings=_auth_settings,
|
|
884
|
+
collection_formats=_collection_formats,
|
|
885
|
+
_host=_host,
|
|
886
|
+
_request_auth=_request_auth
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
@validate_call
|
|
893
|
+
async def deactivate_snapshot(
|
|
894
|
+
self,
|
|
895
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
896
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
897
|
+
_request_timeout: Union[
|
|
898
|
+
None,
|
|
899
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
900
|
+
Tuple[
|
|
901
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
902
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
903
|
+
]
|
|
904
|
+
] = None,
|
|
905
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
906
|
+
_content_type: Optional[StrictStr] = None,
|
|
907
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
908
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
909
|
+
) -> None:
|
|
910
|
+
"""Deactivate a snapshot
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
:param id: Snapshot ID (required)
|
|
914
|
+
:type id: str
|
|
915
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
916
|
+
:type x_daytona_organization_id: str
|
|
917
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
918
|
+
number provided, it will be total request
|
|
919
|
+
timeout. It can also be a pair (tuple) of
|
|
920
|
+
(connection, read) timeouts.
|
|
921
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
922
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
923
|
+
request; this effectively ignores the
|
|
924
|
+
authentication in the spec for a single request.
|
|
925
|
+
:type _request_auth: dict, optional
|
|
926
|
+
:param _content_type: force content-type for the request.
|
|
927
|
+
:type _content_type: str, Optional
|
|
928
|
+
:param _headers: set to override the headers for a single
|
|
929
|
+
request; this effectively ignores the headers
|
|
930
|
+
in the spec for a single request.
|
|
931
|
+
:type _headers: dict, optional
|
|
932
|
+
:param _host_index: set to override the host_index for a single
|
|
933
|
+
request; this effectively ignores the host_index
|
|
934
|
+
in the spec for a single request.
|
|
935
|
+
:type _host_index: int, optional
|
|
936
|
+
:return: Returns the result object.
|
|
937
|
+
""" # noqa: E501
|
|
938
|
+
|
|
939
|
+
_param = self._deactivate_snapshot_serialize(
|
|
940
|
+
id=id,
|
|
941
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
942
|
+
_request_auth=_request_auth,
|
|
943
|
+
_content_type=_content_type,
|
|
944
|
+
_headers=_headers,
|
|
945
|
+
_host_index=_host_index
|
|
946
|
+
)
|
|
947
|
+
|
|
948
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
949
|
+
'204': None,
|
|
950
|
+
}
|
|
951
|
+
response_data = await self.api_client.call_api(
|
|
952
|
+
*_param,
|
|
953
|
+
_request_timeout=_request_timeout
|
|
954
|
+
)
|
|
955
|
+
await response_data.read()
|
|
956
|
+
return self.api_client.response_deserialize(
|
|
957
|
+
response_data=response_data,
|
|
958
|
+
response_types_map=_response_types_map,
|
|
959
|
+
).data
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
@validate_call
|
|
963
|
+
async def deactivate_snapshot_with_http_info(
|
|
964
|
+
self,
|
|
965
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
966
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
967
|
+
_request_timeout: Union[
|
|
968
|
+
None,
|
|
969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
970
|
+
Tuple[
|
|
971
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
972
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
973
|
+
]
|
|
974
|
+
] = None,
|
|
975
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
976
|
+
_content_type: Optional[StrictStr] = None,
|
|
977
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
978
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
979
|
+
) -> ApiResponse[None]:
|
|
980
|
+
"""Deactivate a snapshot
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
:param id: Snapshot ID (required)
|
|
984
|
+
:type id: str
|
|
985
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
986
|
+
:type x_daytona_organization_id: str
|
|
987
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
988
|
+
number provided, it will be total request
|
|
989
|
+
timeout. It can also be a pair (tuple) of
|
|
990
|
+
(connection, read) timeouts.
|
|
991
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
992
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
993
|
+
request; this effectively ignores the
|
|
994
|
+
authentication in the spec for a single request.
|
|
995
|
+
:type _request_auth: dict, optional
|
|
996
|
+
:param _content_type: force content-type for the request.
|
|
997
|
+
:type _content_type: str, Optional
|
|
998
|
+
:param _headers: set to override the headers for a single
|
|
999
|
+
request; this effectively ignores the headers
|
|
1000
|
+
in the spec for a single request.
|
|
1001
|
+
:type _headers: dict, optional
|
|
1002
|
+
:param _host_index: set to override the host_index for a single
|
|
1003
|
+
request; this effectively ignores the host_index
|
|
1004
|
+
in the spec for a single request.
|
|
1005
|
+
:type _host_index: int, optional
|
|
1006
|
+
:return: Returns the result object.
|
|
1007
|
+
""" # noqa: E501
|
|
1008
|
+
|
|
1009
|
+
_param = self._deactivate_snapshot_serialize(
|
|
1010
|
+
id=id,
|
|
1011
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1012
|
+
_request_auth=_request_auth,
|
|
1013
|
+
_content_type=_content_type,
|
|
1014
|
+
_headers=_headers,
|
|
1015
|
+
_host_index=_host_index
|
|
1016
|
+
)
|
|
1017
|
+
|
|
1018
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1019
|
+
'204': None,
|
|
1020
|
+
}
|
|
1021
|
+
response_data = await self.api_client.call_api(
|
|
1022
|
+
*_param,
|
|
1023
|
+
_request_timeout=_request_timeout
|
|
1024
|
+
)
|
|
1025
|
+
await response_data.read()
|
|
1026
|
+
return self.api_client.response_deserialize(
|
|
1027
|
+
response_data=response_data,
|
|
1028
|
+
response_types_map=_response_types_map,
|
|
1029
|
+
)
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
@validate_call
|
|
1033
|
+
async def deactivate_snapshot_without_preload_content(
|
|
1034
|
+
self,
|
|
1035
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
1036
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1037
|
+
_request_timeout: Union[
|
|
1038
|
+
None,
|
|
1039
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1040
|
+
Tuple[
|
|
1041
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1042
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1043
|
+
]
|
|
1044
|
+
] = None,
|
|
1045
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1046
|
+
_content_type: Optional[StrictStr] = None,
|
|
1047
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1048
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1049
|
+
) -> RESTResponseType:
|
|
1050
|
+
"""Deactivate a snapshot
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
:param id: Snapshot ID (required)
|
|
1054
|
+
:type id: str
|
|
1055
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1056
|
+
:type x_daytona_organization_id: str
|
|
1057
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1058
|
+
number provided, it will be total request
|
|
1059
|
+
timeout. It can also be a pair (tuple) of
|
|
1060
|
+
(connection, read) timeouts.
|
|
1061
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1062
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1063
|
+
request; this effectively ignores the
|
|
1064
|
+
authentication in the spec for a single request.
|
|
1065
|
+
:type _request_auth: dict, optional
|
|
1066
|
+
:param _content_type: force content-type for the request.
|
|
1067
|
+
:type _content_type: str, Optional
|
|
1068
|
+
:param _headers: set to override the headers for a single
|
|
1069
|
+
request; this effectively ignores the headers
|
|
1070
|
+
in the spec for a single request.
|
|
1071
|
+
:type _headers: dict, optional
|
|
1072
|
+
:param _host_index: set to override the host_index for a single
|
|
1073
|
+
request; this effectively ignores the host_index
|
|
1074
|
+
in the spec for a single request.
|
|
1075
|
+
:type _host_index: int, optional
|
|
1076
|
+
:return: Returns the result object.
|
|
1077
|
+
""" # noqa: E501
|
|
1078
|
+
|
|
1079
|
+
_param = self._deactivate_snapshot_serialize(
|
|
1080
|
+
id=id,
|
|
1081
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1082
|
+
_request_auth=_request_auth,
|
|
1083
|
+
_content_type=_content_type,
|
|
1084
|
+
_headers=_headers,
|
|
1085
|
+
_host_index=_host_index
|
|
1086
|
+
)
|
|
1087
|
+
|
|
1088
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1089
|
+
'204': None,
|
|
1090
|
+
}
|
|
1091
|
+
response_data = await self.api_client.call_api(
|
|
1092
|
+
*_param,
|
|
1093
|
+
_request_timeout=_request_timeout
|
|
1094
|
+
)
|
|
1095
|
+
return response_data.response
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
def _deactivate_snapshot_serialize(
|
|
1099
|
+
self,
|
|
1100
|
+
id,
|
|
1101
|
+
x_daytona_organization_id,
|
|
1102
|
+
_request_auth,
|
|
1103
|
+
_content_type,
|
|
1104
|
+
_headers,
|
|
1105
|
+
_host_index,
|
|
1106
|
+
) -> RequestSerialized:
|
|
1107
|
+
|
|
1108
|
+
_host = None
|
|
1109
|
+
|
|
1110
|
+
_collection_formats: Dict[str, str] = {
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
_path_params: Dict[str, str] = {}
|
|
1114
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1115
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1116
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1117
|
+
_files: Dict[
|
|
1118
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1119
|
+
] = {}
|
|
1120
|
+
_body_params: Optional[bytes] = None
|
|
1121
|
+
|
|
1122
|
+
# process the path parameters
|
|
1123
|
+
if id is not None:
|
|
1124
|
+
_path_params['id'] = id
|
|
1125
|
+
# process the query parameters
|
|
1126
|
+
# process the header parameters
|
|
1127
|
+
if x_daytona_organization_id is not None:
|
|
1128
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1129
|
+
# process the form parameters
|
|
1130
|
+
# process the body parameter
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
# authentication setting
|
|
1136
|
+
_auth_settings: List[str] = [
|
|
1137
|
+
'bearer',
|
|
1138
|
+
'oauth2'
|
|
1139
|
+
]
|
|
1140
|
+
|
|
1141
|
+
return self.api_client.param_serialize(
|
|
1142
|
+
method='POST',
|
|
1143
|
+
resource_path='/snapshots/{id}/deactivate',
|
|
1144
|
+
path_params=_path_params,
|
|
1145
|
+
query_params=_query_params,
|
|
1146
|
+
header_params=_header_params,
|
|
1147
|
+
body=_body_params,
|
|
1148
|
+
post_params=_form_params,
|
|
1149
|
+
files=_files,
|
|
1150
|
+
auth_settings=_auth_settings,
|
|
1151
|
+
collection_formats=_collection_formats,
|
|
1152
|
+
_host=_host,
|
|
1153
|
+
_request_auth=_request_auth
|
|
1154
|
+
)
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
@validate_call
|
|
1160
|
+
async def get_all_snapshots(
|
|
1161
|
+
self,
|
|
1162
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1163
|
+
page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
|
|
1164
|
+
limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
|
|
1165
|
+
name: Annotated[Optional[StrictStr], Field(description="Filter by partial name match")] = None,
|
|
1166
|
+
sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
|
|
1167
|
+
order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
|
|
1168
|
+
_request_timeout: Union[
|
|
1169
|
+
None,
|
|
1170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1171
|
+
Tuple[
|
|
1172
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1173
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1174
|
+
]
|
|
1175
|
+
] = None,
|
|
1176
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1177
|
+
_content_type: Optional[StrictStr] = None,
|
|
1178
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1179
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1180
|
+
) -> PaginatedSnapshots:
|
|
1181
|
+
"""List all snapshots
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1185
|
+
:type x_daytona_organization_id: str
|
|
1186
|
+
:param page: Page number of the results
|
|
1187
|
+
:type page: float
|
|
1188
|
+
:param limit: Number of results per page
|
|
1189
|
+
:type limit: float
|
|
1190
|
+
:param name: Filter by partial name match
|
|
1191
|
+
:type name: str
|
|
1192
|
+
:param sort: Field to sort by
|
|
1193
|
+
:type sort: str
|
|
1194
|
+
:param order: Direction to sort by
|
|
1195
|
+
:type order: str
|
|
1196
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1197
|
+
number provided, it will be total request
|
|
1198
|
+
timeout. It can also be a pair (tuple) of
|
|
1199
|
+
(connection, read) timeouts.
|
|
1200
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1201
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1202
|
+
request; this effectively ignores the
|
|
1203
|
+
authentication in the spec for a single request.
|
|
1204
|
+
:type _request_auth: dict, optional
|
|
1205
|
+
:param _content_type: force content-type for the request.
|
|
1206
|
+
:type _content_type: str, Optional
|
|
1207
|
+
:param _headers: set to override the headers for a single
|
|
1208
|
+
request; this effectively ignores the headers
|
|
1209
|
+
in the spec for a single request.
|
|
1210
|
+
:type _headers: dict, optional
|
|
1211
|
+
:param _host_index: set to override the host_index for a single
|
|
1212
|
+
request; this effectively ignores the host_index
|
|
1213
|
+
in the spec for a single request.
|
|
1214
|
+
:type _host_index: int, optional
|
|
1215
|
+
:return: Returns the result object.
|
|
1216
|
+
""" # noqa: E501
|
|
1217
|
+
|
|
1218
|
+
_param = self._get_all_snapshots_serialize(
|
|
1219
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1220
|
+
page=page,
|
|
1221
|
+
limit=limit,
|
|
1222
|
+
name=name,
|
|
1223
|
+
sort=sort,
|
|
1224
|
+
order=order,
|
|
1225
|
+
_request_auth=_request_auth,
|
|
1226
|
+
_content_type=_content_type,
|
|
1227
|
+
_headers=_headers,
|
|
1228
|
+
_host_index=_host_index
|
|
1229
|
+
)
|
|
1230
|
+
|
|
1231
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1232
|
+
'200': "PaginatedSnapshots",
|
|
1233
|
+
}
|
|
1234
|
+
response_data = await self.api_client.call_api(
|
|
1235
|
+
*_param,
|
|
1236
|
+
_request_timeout=_request_timeout
|
|
1237
|
+
)
|
|
1238
|
+
await response_data.read()
|
|
1239
|
+
return self.api_client.response_deserialize(
|
|
1240
|
+
response_data=response_data,
|
|
1241
|
+
response_types_map=_response_types_map,
|
|
1242
|
+
).data
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
@validate_call
|
|
1246
|
+
async def get_all_snapshots_with_http_info(
|
|
1247
|
+
self,
|
|
1248
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1249
|
+
page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
|
|
1250
|
+
limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
|
|
1251
|
+
name: Annotated[Optional[StrictStr], Field(description="Filter by partial name match")] = None,
|
|
1252
|
+
sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
|
|
1253
|
+
order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
|
|
1254
|
+
_request_timeout: Union[
|
|
1255
|
+
None,
|
|
1256
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1257
|
+
Tuple[
|
|
1258
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1259
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1260
|
+
]
|
|
1261
|
+
] = None,
|
|
1262
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1263
|
+
_content_type: Optional[StrictStr] = None,
|
|
1264
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1265
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1266
|
+
) -> ApiResponse[PaginatedSnapshots]:
|
|
1267
|
+
"""List all snapshots
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1271
|
+
:type x_daytona_organization_id: str
|
|
1272
|
+
:param page: Page number of the results
|
|
1273
|
+
:type page: float
|
|
1274
|
+
:param limit: Number of results per page
|
|
1275
|
+
:type limit: float
|
|
1276
|
+
:param name: Filter by partial name match
|
|
1277
|
+
:type name: str
|
|
1278
|
+
:param sort: Field to sort by
|
|
1279
|
+
:type sort: str
|
|
1280
|
+
:param order: Direction to sort by
|
|
1281
|
+
:type order: str
|
|
1282
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1283
|
+
number provided, it will be total request
|
|
1284
|
+
timeout. It can also be a pair (tuple) of
|
|
1285
|
+
(connection, read) timeouts.
|
|
1286
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1287
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1288
|
+
request; this effectively ignores the
|
|
1289
|
+
authentication in the spec for a single request.
|
|
1290
|
+
:type _request_auth: dict, optional
|
|
1291
|
+
:param _content_type: force content-type for the request.
|
|
1292
|
+
:type _content_type: str, Optional
|
|
1293
|
+
:param _headers: set to override the headers for a single
|
|
1294
|
+
request; this effectively ignores the headers
|
|
1295
|
+
in the spec for a single request.
|
|
1296
|
+
:type _headers: dict, optional
|
|
1297
|
+
:param _host_index: set to override the host_index for a single
|
|
1298
|
+
request; this effectively ignores the host_index
|
|
1299
|
+
in the spec for a single request.
|
|
1300
|
+
:type _host_index: int, optional
|
|
1301
|
+
:return: Returns the result object.
|
|
1302
|
+
""" # noqa: E501
|
|
1303
|
+
|
|
1304
|
+
_param = self._get_all_snapshots_serialize(
|
|
1305
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1306
|
+
page=page,
|
|
1307
|
+
limit=limit,
|
|
1308
|
+
name=name,
|
|
1309
|
+
sort=sort,
|
|
1310
|
+
order=order,
|
|
1311
|
+
_request_auth=_request_auth,
|
|
1312
|
+
_content_type=_content_type,
|
|
1313
|
+
_headers=_headers,
|
|
1314
|
+
_host_index=_host_index
|
|
1315
|
+
)
|
|
1316
|
+
|
|
1317
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1318
|
+
'200': "PaginatedSnapshots",
|
|
1319
|
+
}
|
|
1320
|
+
response_data = await self.api_client.call_api(
|
|
1321
|
+
*_param,
|
|
1322
|
+
_request_timeout=_request_timeout
|
|
1323
|
+
)
|
|
1324
|
+
await response_data.read()
|
|
1325
|
+
return self.api_client.response_deserialize(
|
|
1326
|
+
response_data=response_data,
|
|
1327
|
+
response_types_map=_response_types_map,
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
@validate_call
|
|
1332
|
+
async def get_all_snapshots_without_preload_content(
|
|
1333
|
+
self,
|
|
1334
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1335
|
+
page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
|
|
1336
|
+
limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
|
|
1337
|
+
name: Annotated[Optional[StrictStr], Field(description="Filter by partial name match")] = None,
|
|
1338
|
+
sort: Annotated[Optional[StrictStr], Field(description="Field to sort by")] = None,
|
|
1339
|
+
order: Annotated[Optional[StrictStr], Field(description="Direction to sort by")] = None,
|
|
1340
|
+
_request_timeout: Union[
|
|
1341
|
+
None,
|
|
1342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1343
|
+
Tuple[
|
|
1344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1346
|
+
]
|
|
1347
|
+
] = None,
|
|
1348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1349
|
+
_content_type: Optional[StrictStr] = None,
|
|
1350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1352
|
+
) -> RESTResponseType:
|
|
1353
|
+
"""List all snapshots
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1357
|
+
:type x_daytona_organization_id: str
|
|
1358
|
+
:param page: Page number of the results
|
|
1359
|
+
:type page: float
|
|
1360
|
+
:param limit: Number of results per page
|
|
1361
|
+
:type limit: float
|
|
1362
|
+
:param name: Filter by partial name match
|
|
1363
|
+
:type name: str
|
|
1364
|
+
:param sort: Field to sort by
|
|
1365
|
+
:type sort: str
|
|
1366
|
+
:param order: Direction to sort by
|
|
1367
|
+
:type order: str
|
|
1368
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1369
|
+
number provided, it will be total request
|
|
1370
|
+
timeout. It can also be a pair (tuple) of
|
|
1371
|
+
(connection, read) timeouts.
|
|
1372
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1373
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1374
|
+
request; this effectively ignores the
|
|
1375
|
+
authentication in the spec for a single request.
|
|
1376
|
+
:type _request_auth: dict, optional
|
|
1377
|
+
:param _content_type: force content-type for the request.
|
|
1378
|
+
:type _content_type: str, Optional
|
|
1379
|
+
:param _headers: set to override the headers for a single
|
|
1380
|
+
request; this effectively ignores the headers
|
|
1381
|
+
in the spec for a single request.
|
|
1382
|
+
:type _headers: dict, optional
|
|
1383
|
+
:param _host_index: set to override the host_index for a single
|
|
1384
|
+
request; this effectively ignores the host_index
|
|
1385
|
+
in the spec for a single request.
|
|
1386
|
+
:type _host_index: int, optional
|
|
1387
|
+
:return: Returns the result object.
|
|
1388
|
+
""" # noqa: E501
|
|
1389
|
+
|
|
1390
|
+
_param = self._get_all_snapshots_serialize(
|
|
1391
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1392
|
+
page=page,
|
|
1393
|
+
limit=limit,
|
|
1394
|
+
name=name,
|
|
1395
|
+
sort=sort,
|
|
1396
|
+
order=order,
|
|
1397
|
+
_request_auth=_request_auth,
|
|
1398
|
+
_content_type=_content_type,
|
|
1399
|
+
_headers=_headers,
|
|
1400
|
+
_host_index=_host_index
|
|
1401
|
+
)
|
|
1402
|
+
|
|
1403
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1404
|
+
'200': "PaginatedSnapshots",
|
|
1405
|
+
}
|
|
1406
|
+
response_data = await self.api_client.call_api(
|
|
1407
|
+
*_param,
|
|
1408
|
+
_request_timeout=_request_timeout
|
|
1409
|
+
)
|
|
1410
|
+
return response_data.response
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
def _get_all_snapshots_serialize(
|
|
1414
|
+
self,
|
|
1415
|
+
x_daytona_organization_id,
|
|
1416
|
+
page,
|
|
1417
|
+
limit,
|
|
1418
|
+
name,
|
|
1419
|
+
sort,
|
|
1420
|
+
order,
|
|
1421
|
+
_request_auth,
|
|
1422
|
+
_content_type,
|
|
1423
|
+
_headers,
|
|
1424
|
+
_host_index,
|
|
1425
|
+
) -> RequestSerialized:
|
|
1426
|
+
|
|
1427
|
+
_host = None
|
|
1428
|
+
|
|
1429
|
+
_collection_formats: Dict[str, str] = {
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
_path_params: Dict[str, str] = {}
|
|
1433
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1434
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1435
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1436
|
+
_files: Dict[
|
|
1437
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1438
|
+
] = {}
|
|
1439
|
+
_body_params: Optional[bytes] = None
|
|
1440
|
+
|
|
1441
|
+
# process the path parameters
|
|
1442
|
+
# process the query parameters
|
|
1443
|
+
if page is not None:
|
|
1444
|
+
|
|
1445
|
+
_query_params.append(('page', page))
|
|
1446
|
+
|
|
1447
|
+
if limit is not None:
|
|
1448
|
+
|
|
1449
|
+
_query_params.append(('limit', limit))
|
|
1450
|
+
|
|
1451
|
+
if name is not None:
|
|
1452
|
+
|
|
1453
|
+
_query_params.append(('name', name))
|
|
1454
|
+
|
|
1455
|
+
if sort is not None:
|
|
1456
|
+
|
|
1457
|
+
_query_params.append(('sort', sort))
|
|
1458
|
+
|
|
1459
|
+
if order is not None:
|
|
1460
|
+
|
|
1461
|
+
_query_params.append(('order', order))
|
|
1462
|
+
|
|
1463
|
+
# process the header parameters
|
|
1464
|
+
if x_daytona_organization_id is not None:
|
|
1465
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1466
|
+
# process the form parameters
|
|
1467
|
+
# process the body parameter
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
# set the HTTP header `Accept`
|
|
1471
|
+
if 'Accept' not in _header_params:
|
|
1472
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1473
|
+
[
|
|
1474
|
+
'application/json'
|
|
1475
|
+
]
|
|
1476
|
+
)
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
# authentication setting
|
|
1480
|
+
_auth_settings: List[str] = [
|
|
1481
|
+
'bearer',
|
|
1482
|
+
'oauth2'
|
|
1483
|
+
]
|
|
1484
|
+
|
|
1485
|
+
return self.api_client.param_serialize(
|
|
1486
|
+
method='GET',
|
|
1487
|
+
resource_path='/snapshots',
|
|
1488
|
+
path_params=_path_params,
|
|
1489
|
+
query_params=_query_params,
|
|
1490
|
+
header_params=_header_params,
|
|
1491
|
+
body=_body_params,
|
|
1492
|
+
post_params=_form_params,
|
|
1493
|
+
files=_files,
|
|
1494
|
+
auth_settings=_auth_settings,
|
|
1495
|
+
collection_formats=_collection_formats,
|
|
1496
|
+
_host=_host,
|
|
1497
|
+
_request_auth=_request_auth
|
|
1498
|
+
)
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
@validate_call
|
|
1504
|
+
async def get_snapshot(
|
|
1505
|
+
self,
|
|
1506
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID or name")],
|
|
1507
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1508
|
+
_request_timeout: Union[
|
|
1509
|
+
None,
|
|
1510
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1511
|
+
Tuple[
|
|
1512
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1513
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1514
|
+
]
|
|
1515
|
+
] = None,
|
|
1516
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1517
|
+
_content_type: Optional[StrictStr] = None,
|
|
1518
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1519
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1520
|
+
) -> SnapshotDto:
|
|
1521
|
+
"""Get snapshot by ID or name
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
:param id: Snapshot ID or name (required)
|
|
1525
|
+
:type id: str
|
|
1526
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1527
|
+
:type x_daytona_organization_id: str
|
|
1528
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1529
|
+
number provided, it will be total request
|
|
1530
|
+
timeout. It can also be a pair (tuple) of
|
|
1531
|
+
(connection, read) timeouts.
|
|
1532
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1533
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1534
|
+
request; this effectively ignores the
|
|
1535
|
+
authentication in the spec for a single request.
|
|
1536
|
+
:type _request_auth: dict, optional
|
|
1537
|
+
:param _content_type: force content-type for the request.
|
|
1538
|
+
:type _content_type: str, Optional
|
|
1539
|
+
:param _headers: set to override the headers for a single
|
|
1540
|
+
request; this effectively ignores the headers
|
|
1541
|
+
in the spec for a single request.
|
|
1542
|
+
:type _headers: dict, optional
|
|
1543
|
+
:param _host_index: set to override the host_index for a single
|
|
1544
|
+
request; this effectively ignores the host_index
|
|
1545
|
+
in the spec for a single request.
|
|
1546
|
+
:type _host_index: int, optional
|
|
1547
|
+
:return: Returns the result object.
|
|
1548
|
+
""" # noqa: E501
|
|
1549
|
+
|
|
1550
|
+
_param = self._get_snapshot_serialize(
|
|
1551
|
+
id=id,
|
|
1552
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1553
|
+
_request_auth=_request_auth,
|
|
1554
|
+
_content_type=_content_type,
|
|
1555
|
+
_headers=_headers,
|
|
1556
|
+
_host_index=_host_index
|
|
1557
|
+
)
|
|
1558
|
+
|
|
1559
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1560
|
+
'200': "SnapshotDto",
|
|
1561
|
+
'404': None,
|
|
1562
|
+
}
|
|
1563
|
+
response_data = await self.api_client.call_api(
|
|
1564
|
+
*_param,
|
|
1565
|
+
_request_timeout=_request_timeout
|
|
1566
|
+
)
|
|
1567
|
+
await response_data.read()
|
|
1568
|
+
return self.api_client.response_deserialize(
|
|
1569
|
+
response_data=response_data,
|
|
1570
|
+
response_types_map=_response_types_map,
|
|
1571
|
+
).data
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
@validate_call
|
|
1575
|
+
async def get_snapshot_with_http_info(
|
|
1576
|
+
self,
|
|
1577
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID or name")],
|
|
1578
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1579
|
+
_request_timeout: Union[
|
|
1580
|
+
None,
|
|
1581
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1582
|
+
Tuple[
|
|
1583
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1584
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1585
|
+
]
|
|
1586
|
+
] = None,
|
|
1587
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1588
|
+
_content_type: Optional[StrictStr] = None,
|
|
1589
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1590
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1591
|
+
) -> ApiResponse[SnapshotDto]:
|
|
1592
|
+
"""Get snapshot by ID or name
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
:param id: Snapshot ID or name (required)
|
|
1596
|
+
:type id: str
|
|
1597
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1598
|
+
:type x_daytona_organization_id: str
|
|
1599
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1600
|
+
number provided, it will be total request
|
|
1601
|
+
timeout. It can also be a pair (tuple) of
|
|
1602
|
+
(connection, read) timeouts.
|
|
1603
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1604
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1605
|
+
request; this effectively ignores the
|
|
1606
|
+
authentication in the spec for a single request.
|
|
1607
|
+
:type _request_auth: dict, optional
|
|
1608
|
+
:param _content_type: force content-type for the request.
|
|
1609
|
+
:type _content_type: str, Optional
|
|
1610
|
+
:param _headers: set to override the headers for a single
|
|
1611
|
+
request; this effectively ignores the headers
|
|
1612
|
+
in the spec for a single request.
|
|
1613
|
+
:type _headers: dict, optional
|
|
1614
|
+
:param _host_index: set to override the host_index for a single
|
|
1615
|
+
request; this effectively ignores the host_index
|
|
1616
|
+
in the spec for a single request.
|
|
1617
|
+
:type _host_index: int, optional
|
|
1618
|
+
:return: Returns the result object.
|
|
1619
|
+
""" # noqa: E501
|
|
1620
|
+
|
|
1621
|
+
_param = self._get_snapshot_serialize(
|
|
1622
|
+
id=id,
|
|
1623
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1624
|
+
_request_auth=_request_auth,
|
|
1625
|
+
_content_type=_content_type,
|
|
1626
|
+
_headers=_headers,
|
|
1627
|
+
_host_index=_host_index
|
|
1628
|
+
)
|
|
1629
|
+
|
|
1630
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1631
|
+
'200': "SnapshotDto",
|
|
1632
|
+
'404': None,
|
|
1633
|
+
}
|
|
1634
|
+
response_data = await self.api_client.call_api(
|
|
1635
|
+
*_param,
|
|
1636
|
+
_request_timeout=_request_timeout
|
|
1637
|
+
)
|
|
1638
|
+
await response_data.read()
|
|
1639
|
+
return self.api_client.response_deserialize(
|
|
1640
|
+
response_data=response_data,
|
|
1641
|
+
response_types_map=_response_types_map,
|
|
1642
|
+
)
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
@validate_call
|
|
1646
|
+
async def get_snapshot_without_preload_content(
|
|
1647
|
+
self,
|
|
1648
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID or name")],
|
|
1649
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1650
|
+
_request_timeout: Union[
|
|
1651
|
+
None,
|
|
1652
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1653
|
+
Tuple[
|
|
1654
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1655
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1656
|
+
]
|
|
1657
|
+
] = None,
|
|
1658
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1659
|
+
_content_type: Optional[StrictStr] = None,
|
|
1660
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1661
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1662
|
+
) -> RESTResponseType:
|
|
1663
|
+
"""Get snapshot by ID or name
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
:param id: Snapshot ID or name (required)
|
|
1667
|
+
:type id: str
|
|
1668
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1669
|
+
:type x_daytona_organization_id: str
|
|
1670
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1671
|
+
number provided, it will be total request
|
|
1672
|
+
timeout. It can also be a pair (tuple) of
|
|
1673
|
+
(connection, read) timeouts.
|
|
1674
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1675
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1676
|
+
request; this effectively ignores the
|
|
1677
|
+
authentication in the spec for a single request.
|
|
1678
|
+
:type _request_auth: dict, optional
|
|
1679
|
+
:param _content_type: force content-type for the request.
|
|
1680
|
+
:type _content_type: str, Optional
|
|
1681
|
+
:param _headers: set to override the headers for a single
|
|
1682
|
+
request; this effectively ignores the headers
|
|
1683
|
+
in the spec for a single request.
|
|
1684
|
+
:type _headers: dict, optional
|
|
1685
|
+
:param _host_index: set to override the host_index for a single
|
|
1686
|
+
request; this effectively ignores the host_index
|
|
1687
|
+
in the spec for a single request.
|
|
1688
|
+
:type _host_index: int, optional
|
|
1689
|
+
:return: Returns the result object.
|
|
1690
|
+
""" # noqa: E501
|
|
1691
|
+
|
|
1692
|
+
_param = self._get_snapshot_serialize(
|
|
1693
|
+
id=id,
|
|
1694
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1695
|
+
_request_auth=_request_auth,
|
|
1696
|
+
_content_type=_content_type,
|
|
1697
|
+
_headers=_headers,
|
|
1698
|
+
_host_index=_host_index
|
|
1699
|
+
)
|
|
1700
|
+
|
|
1701
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1702
|
+
'200': "SnapshotDto",
|
|
1703
|
+
'404': None,
|
|
1704
|
+
}
|
|
1705
|
+
response_data = await self.api_client.call_api(
|
|
1706
|
+
*_param,
|
|
1707
|
+
_request_timeout=_request_timeout
|
|
1708
|
+
)
|
|
1709
|
+
return response_data.response
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
def _get_snapshot_serialize(
|
|
1713
|
+
self,
|
|
1714
|
+
id,
|
|
1715
|
+
x_daytona_organization_id,
|
|
1716
|
+
_request_auth,
|
|
1717
|
+
_content_type,
|
|
1718
|
+
_headers,
|
|
1719
|
+
_host_index,
|
|
1720
|
+
) -> RequestSerialized:
|
|
1721
|
+
|
|
1722
|
+
_host = None
|
|
1723
|
+
|
|
1724
|
+
_collection_formats: Dict[str, str] = {
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
_path_params: Dict[str, str] = {}
|
|
1728
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1729
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1730
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1731
|
+
_files: Dict[
|
|
1732
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1733
|
+
] = {}
|
|
1734
|
+
_body_params: Optional[bytes] = None
|
|
1735
|
+
|
|
1736
|
+
# process the path parameters
|
|
1737
|
+
if id is not None:
|
|
1738
|
+
_path_params['id'] = id
|
|
1739
|
+
# process the query parameters
|
|
1740
|
+
# process the header parameters
|
|
1741
|
+
if x_daytona_organization_id is not None:
|
|
1742
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1743
|
+
# process the form parameters
|
|
1744
|
+
# process the body parameter
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
# set the HTTP header `Accept`
|
|
1748
|
+
if 'Accept' not in _header_params:
|
|
1749
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1750
|
+
[
|
|
1751
|
+
'application/json'
|
|
1752
|
+
]
|
|
1753
|
+
)
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
# authentication setting
|
|
1757
|
+
_auth_settings: List[str] = [
|
|
1758
|
+
'bearer',
|
|
1759
|
+
'oauth2'
|
|
1760
|
+
]
|
|
1761
|
+
|
|
1762
|
+
return self.api_client.param_serialize(
|
|
1763
|
+
method='GET',
|
|
1764
|
+
resource_path='/snapshots/{id}',
|
|
1765
|
+
path_params=_path_params,
|
|
1766
|
+
query_params=_query_params,
|
|
1767
|
+
header_params=_header_params,
|
|
1768
|
+
body=_body_params,
|
|
1769
|
+
post_params=_form_params,
|
|
1770
|
+
files=_files,
|
|
1771
|
+
auth_settings=_auth_settings,
|
|
1772
|
+
collection_formats=_collection_formats,
|
|
1773
|
+
_host=_host,
|
|
1774
|
+
_request_auth=_request_auth
|
|
1775
|
+
)
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
@validate_call
|
|
1781
|
+
async def get_snapshot_build_logs(
|
|
1782
|
+
self,
|
|
1783
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
1784
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1785
|
+
follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
|
|
1786
|
+
_request_timeout: Union[
|
|
1787
|
+
None,
|
|
1788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1789
|
+
Tuple[
|
|
1790
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1791
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1792
|
+
]
|
|
1793
|
+
] = None,
|
|
1794
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1795
|
+
_content_type: Optional[StrictStr] = None,
|
|
1796
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1797
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1798
|
+
) -> None:
|
|
1799
|
+
"""Get snapshot build logs
|
|
1800
|
+
|
|
1801
|
+
|
|
1802
|
+
:param id: Snapshot ID (required)
|
|
1803
|
+
:type id: str
|
|
1804
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1805
|
+
:type x_daytona_organization_id: str
|
|
1806
|
+
:param follow: Whether to follow the logs stream
|
|
1807
|
+
:type follow: bool
|
|
1808
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1809
|
+
number provided, it will be total request
|
|
1810
|
+
timeout. It can also be a pair (tuple) of
|
|
1811
|
+
(connection, read) timeouts.
|
|
1812
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1813
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1814
|
+
request; this effectively ignores the
|
|
1815
|
+
authentication in the spec for a single request.
|
|
1816
|
+
:type _request_auth: dict, optional
|
|
1817
|
+
:param _content_type: force content-type for the request.
|
|
1818
|
+
:type _content_type: str, Optional
|
|
1819
|
+
:param _headers: set to override the headers for a single
|
|
1820
|
+
request; this effectively ignores the headers
|
|
1821
|
+
in the spec for a single request.
|
|
1822
|
+
:type _headers: dict, optional
|
|
1823
|
+
:param _host_index: set to override the host_index for a single
|
|
1824
|
+
request; this effectively ignores the host_index
|
|
1825
|
+
in the spec for a single request.
|
|
1826
|
+
:type _host_index: int, optional
|
|
1827
|
+
:return: Returns the result object.
|
|
1828
|
+
""" # noqa: E501
|
|
1829
|
+
|
|
1830
|
+
_param = self._get_snapshot_build_logs_serialize(
|
|
1831
|
+
id=id,
|
|
1832
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1833
|
+
follow=follow,
|
|
1834
|
+
_request_auth=_request_auth,
|
|
1835
|
+
_content_type=_content_type,
|
|
1836
|
+
_headers=_headers,
|
|
1837
|
+
_host_index=_host_index
|
|
1838
|
+
)
|
|
1839
|
+
|
|
1840
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1841
|
+
'200': None,
|
|
1842
|
+
}
|
|
1843
|
+
response_data = await self.api_client.call_api(
|
|
1844
|
+
*_param,
|
|
1845
|
+
_request_timeout=_request_timeout
|
|
1846
|
+
)
|
|
1847
|
+
await response_data.read()
|
|
1848
|
+
return self.api_client.response_deserialize(
|
|
1849
|
+
response_data=response_data,
|
|
1850
|
+
response_types_map=_response_types_map,
|
|
1851
|
+
).data
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
@validate_call
|
|
1855
|
+
async def get_snapshot_build_logs_with_http_info(
|
|
1856
|
+
self,
|
|
1857
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
1858
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1859
|
+
follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
|
|
1860
|
+
_request_timeout: Union[
|
|
1861
|
+
None,
|
|
1862
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1863
|
+
Tuple[
|
|
1864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1865
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1866
|
+
]
|
|
1867
|
+
] = None,
|
|
1868
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1869
|
+
_content_type: Optional[StrictStr] = None,
|
|
1870
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1871
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1872
|
+
) -> ApiResponse[None]:
|
|
1873
|
+
"""Get snapshot build logs
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
:param id: Snapshot ID (required)
|
|
1877
|
+
:type id: str
|
|
1878
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1879
|
+
:type x_daytona_organization_id: str
|
|
1880
|
+
:param follow: Whether to follow the logs stream
|
|
1881
|
+
:type follow: bool
|
|
1882
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1883
|
+
number provided, it will be total request
|
|
1884
|
+
timeout. It can also be a pair (tuple) of
|
|
1885
|
+
(connection, read) timeouts.
|
|
1886
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1887
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1888
|
+
request; this effectively ignores the
|
|
1889
|
+
authentication in the spec for a single request.
|
|
1890
|
+
:type _request_auth: dict, optional
|
|
1891
|
+
:param _content_type: force content-type for the request.
|
|
1892
|
+
:type _content_type: str, Optional
|
|
1893
|
+
:param _headers: set to override the headers for a single
|
|
1894
|
+
request; this effectively ignores the headers
|
|
1895
|
+
in the spec for a single request.
|
|
1896
|
+
:type _headers: dict, optional
|
|
1897
|
+
:param _host_index: set to override the host_index for a single
|
|
1898
|
+
request; this effectively ignores the host_index
|
|
1899
|
+
in the spec for a single request.
|
|
1900
|
+
:type _host_index: int, optional
|
|
1901
|
+
:return: Returns the result object.
|
|
1902
|
+
""" # noqa: E501
|
|
1903
|
+
|
|
1904
|
+
_param = self._get_snapshot_build_logs_serialize(
|
|
1905
|
+
id=id,
|
|
1906
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1907
|
+
follow=follow,
|
|
1908
|
+
_request_auth=_request_auth,
|
|
1909
|
+
_content_type=_content_type,
|
|
1910
|
+
_headers=_headers,
|
|
1911
|
+
_host_index=_host_index
|
|
1912
|
+
)
|
|
1913
|
+
|
|
1914
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1915
|
+
'200': None,
|
|
1916
|
+
}
|
|
1917
|
+
response_data = await self.api_client.call_api(
|
|
1918
|
+
*_param,
|
|
1919
|
+
_request_timeout=_request_timeout
|
|
1920
|
+
)
|
|
1921
|
+
await response_data.read()
|
|
1922
|
+
return self.api_client.response_deserialize(
|
|
1923
|
+
response_data=response_data,
|
|
1924
|
+
response_types_map=_response_types_map,
|
|
1925
|
+
)
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
@validate_call
|
|
1929
|
+
async def get_snapshot_build_logs_without_preload_content(
|
|
1930
|
+
self,
|
|
1931
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
1932
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1933
|
+
follow: Annotated[Optional[StrictBool], Field(description="Whether to follow the logs stream")] = None,
|
|
1934
|
+
_request_timeout: Union[
|
|
1935
|
+
None,
|
|
1936
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1937
|
+
Tuple[
|
|
1938
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1939
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1940
|
+
]
|
|
1941
|
+
] = None,
|
|
1942
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1943
|
+
_content_type: Optional[StrictStr] = None,
|
|
1944
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1945
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1946
|
+
) -> RESTResponseType:
|
|
1947
|
+
"""Get snapshot build logs
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
:param id: Snapshot ID (required)
|
|
1951
|
+
:type id: str
|
|
1952
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1953
|
+
:type x_daytona_organization_id: str
|
|
1954
|
+
:param follow: Whether to follow the logs stream
|
|
1955
|
+
:type follow: bool
|
|
1956
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1957
|
+
number provided, it will be total request
|
|
1958
|
+
timeout. It can also be a pair (tuple) of
|
|
1959
|
+
(connection, read) timeouts.
|
|
1960
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1961
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1962
|
+
request; this effectively ignores the
|
|
1963
|
+
authentication in the spec for a single request.
|
|
1964
|
+
:type _request_auth: dict, optional
|
|
1965
|
+
:param _content_type: force content-type for the request.
|
|
1966
|
+
:type _content_type: str, Optional
|
|
1967
|
+
:param _headers: set to override the headers for a single
|
|
1968
|
+
request; this effectively ignores the headers
|
|
1969
|
+
in the spec for a single request.
|
|
1970
|
+
:type _headers: dict, optional
|
|
1971
|
+
:param _host_index: set to override the host_index for a single
|
|
1972
|
+
request; this effectively ignores the host_index
|
|
1973
|
+
in the spec for a single request.
|
|
1974
|
+
:type _host_index: int, optional
|
|
1975
|
+
:return: Returns the result object.
|
|
1976
|
+
""" # noqa: E501
|
|
1977
|
+
|
|
1978
|
+
_param = self._get_snapshot_build_logs_serialize(
|
|
1979
|
+
id=id,
|
|
1980
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1981
|
+
follow=follow,
|
|
1982
|
+
_request_auth=_request_auth,
|
|
1983
|
+
_content_type=_content_type,
|
|
1984
|
+
_headers=_headers,
|
|
1985
|
+
_host_index=_host_index
|
|
1986
|
+
)
|
|
1987
|
+
|
|
1988
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1989
|
+
'200': None,
|
|
1990
|
+
}
|
|
1991
|
+
response_data = await self.api_client.call_api(
|
|
1992
|
+
*_param,
|
|
1993
|
+
_request_timeout=_request_timeout
|
|
1994
|
+
)
|
|
1995
|
+
return response_data.response
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
def _get_snapshot_build_logs_serialize(
|
|
1999
|
+
self,
|
|
2000
|
+
id,
|
|
2001
|
+
x_daytona_organization_id,
|
|
2002
|
+
follow,
|
|
2003
|
+
_request_auth,
|
|
2004
|
+
_content_type,
|
|
2005
|
+
_headers,
|
|
2006
|
+
_host_index,
|
|
2007
|
+
) -> RequestSerialized:
|
|
2008
|
+
|
|
2009
|
+
_host = None
|
|
2010
|
+
|
|
2011
|
+
_collection_formats: Dict[str, str] = {
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
_path_params: Dict[str, str] = {}
|
|
2015
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2016
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2017
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2018
|
+
_files: Dict[
|
|
2019
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2020
|
+
] = {}
|
|
2021
|
+
_body_params: Optional[bytes] = None
|
|
2022
|
+
|
|
2023
|
+
# process the path parameters
|
|
2024
|
+
if id is not None:
|
|
2025
|
+
_path_params['id'] = id
|
|
2026
|
+
# process the query parameters
|
|
2027
|
+
if follow is not None:
|
|
2028
|
+
|
|
2029
|
+
_query_params.append(('follow', follow))
|
|
2030
|
+
|
|
2031
|
+
# process the header parameters
|
|
2032
|
+
if x_daytona_organization_id is not None:
|
|
2033
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
2034
|
+
# process the form parameters
|
|
2035
|
+
# process the body parameter
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
# authentication setting
|
|
2041
|
+
_auth_settings: List[str] = [
|
|
2042
|
+
'bearer',
|
|
2043
|
+
'oauth2'
|
|
2044
|
+
]
|
|
2045
|
+
|
|
2046
|
+
return self.api_client.param_serialize(
|
|
2047
|
+
method='GET',
|
|
2048
|
+
resource_path='/snapshots/{id}/build-logs',
|
|
2049
|
+
path_params=_path_params,
|
|
2050
|
+
query_params=_query_params,
|
|
2051
|
+
header_params=_header_params,
|
|
2052
|
+
body=_body_params,
|
|
2053
|
+
post_params=_form_params,
|
|
2054
|
+
files=_files,
|
|
2055
|
+
auth_settings=_auth_settings,
|
|
2056
|
+
collection_formats=_collection_formats,
|
|
2057
|
+
_host=_host,
|
|
2058
|
+
_request_auth=_request_auth
|
|
2059
|
+
)
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
@validate_call
|
|
2065
|
+
async def remove_snapshot(
|
|
2066
|
+
self,
|
|
2067
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
2068
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2069
|
+
_request_timeout: Union[
|
|
2070
|
+
None,
|
|
2071
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2072
|
+
Tuple[
|
|
2073
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2074
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2075
|
+
]
|
|
2076
|
+
] = None,
|
|
2077
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2078
|
+
_content_type: Optional[StrictStr] = None,
|
|
2079
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2080
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2081
|
+
) -> None:
|
|
2082
|
+
"""Delete snapshot
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
:param id: Snapshot ID (required)
|
|
2086
|
+
:type id: str
|
|
2087
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2088
|
+
:type x_daytona_organization_id: str
|
|
2089
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2090
|
+
number provided, it will be total request
|
|
2091
|
+
timeout. It can also be a pair (tuple) of
|
|
2092
|
+
(connection, read) timeouts.
|
|
2093
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2094
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2095
|
+
request; this effectively ignores the
|
|
2096
|
+
authentication in the spec for a single request.
|
|
2097
|
+
:type _request_auth: dict, optional
|
|
2098
|
+
:param _content_type: force content-type for the request.
|
|
2099
|
+
:type _content_type: str, Optional
|
|
2100
|
+
:param _headers: set to override the headers for a single
|
|
2101
|
+
request; this effectively ignores the headers
|
|
2102
|
+
in the spec for a single request.
|
|
2103
|
+
:type _headers: dict, optional
|
|
2104
|
+
:param _host_index: set to override the host_index for a single
|
|
2105
|
+
request; this effectively ignores the host_index
|
|
2106
|
+
in the spec for a single request.
|
|
2107
|
+
:type _host_index: int, optional
|
|
2108
|
+
:return: Returns the result object.
|
|
2109
|
+
""" # noqa: E501
|
|
2110
|
+
|
|
2111
|
+
_param = self._remove_snapshot_serialize(
|
|
2112
|
+
id=id,
|
|
2113
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
2114
|
+
_request_auth=_request_auth,
|
|
2115
|
+
_content_type=_content_type,
|
|
2116
|
+
_headers=_headers,
|
|
2117
|
+
_host_index=_host_index
|
|
2118
|
+
)
|
|
2119
|
+
|
|
2120
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2121
|
+
'200': None,
|
|
2122
|
+
}
|
|
2123
|
+
response_data = await self.api_client.call_api(
|
|
2124
|
+
*_param,
|
|
2125
|
+
_request_timeout=_request_timeout
|
|
2126
|
+
)
|
|
2127
|
+
await response_data.read()
|
|
2128
|
+
return self.api_client.response_deserialize(
|
|
2129
|
+
response_data=response_data,
|
|
2130
|
+
response_types_map=_response_types_map,
|
|
2131
|
+
).data
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
@validate_call
|
|
2135
|
+
async def remove_snapshot_with_http_info(
|
|
2136
|
+
self,
|
|
2137
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
2138
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2139
|
+
_request_timeout: Union[
|
|
2140
|
+
None,
|
|
2141
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2142
|
+
Tuple[
|
|
2143
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2144
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2145
|
+
]
|
|
2146
|
+
] = None,
|
|
2147
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2148
|
+
_content_type: Optional[StrictStr] = None,
|
|
2149
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2150
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2151
|
+
) -> ApiResponse[None]:
|
|
2152
|
+
"""Delete snapshot
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
:param id: Snapshot ID (required)
|
|
2156
|
+
:type id: str
|
|
2157
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2158
|
+
:type x_daytona_organization_id: str
|
|
2159
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2160
|
+
number provided, it will be total request
|
|
2161
|
+
timeout. It can also be a pair (tuple) of
|
|
2162
|
+
(connection, read) timeouts.
|
|
2163
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2164
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2165
|
+
request; this effectively ignores the
|
|
2166
|
+
authentication in the spec for a single request.
|
|
2167
|
+
:type _request_auth: dict, optional
|
|
2168
|
+
:param _content_type: force content-type for the request.
|
|
2169
|
+
:type _content_type: str, Optional
|
|
2170
|
+
:param _headers: set to override the headers for a single
|
|
2171
|
+
request; this effectively ignores the headers
|
|
2172
|
+
in the spec for a single request.
|
|
2173
|
+
:type _headers: dict, optional
|
|
2174
|
+
:param _host_index: set to override the host_index for a single
|
|
2175
|
+
request; this effectively ignores the host_index
|
|
2176
|
+
in the spec for a single request.
|
|
2177
|
+
:type _host_index: int, optional
|
|
2178
|
+
:return: Returns the result object.
|
|
2179
|
+
""" # noqa: E501
|
|
2180
|
+
|
|
2181
|
+
_param = self._remove_snapshot_serialize(
|
|
2182
|
+
id=id,
|
|
2183
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
2184
|
+
_request_auth=_request_auth,
|
|
2185
|
+
_content_type=_content_type,
|
|
2186
|
+
_headers=_headers,
|
|
2187
|
+
_host_index=_host_index
|
|
2188
|
+
)
|
|
2189
|
+
|
|
2190
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2191
|
+
'200': None,
|
|
2192
|
+
}
|
|
2193
|
+
response_data = await self.api_client.call_api(
|
|
2194
|
+
*_param,
|
|
2195
|
+
_request_timeout=_request_timeout
|
|
2196
|
+
)
|
|
2197
|
+
await response_data.read()
|
|
2198
|
+
return self.api_client.response_deserialize(
|
|
2199
|
+
response_data=response_data,
|
|
2200
|
+
response_types_map=_response_types_map,
|
|
2201
|
+
)
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
@validate_call
|
|
2205
|
+
async def remove_snapshot_without_preload_content(
|
|
2206
|
+
self,
|
|
2207
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
2208
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2209
|
+
_request_timeout: Union[
|
|
2210
|
+
None,
|
|
2211
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2212
|
+
Tuple[
|
|
2213
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2214
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2215
|
+
]
|
|
2216
|
+
] = None,
|
|
2217
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2218
|
+
_content_type: Optional[StrictStr] = None,
|
|
2219
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2220
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2221
|
+
) -> RESTResponseType:
|
|
2222
|
+
"""Delete snapshot
|
|
2223
|
+
|
|
2224
|
+
|
|
2225
|
+
:param id: Snapshot ID (required)
|
|
2226
|
+
:type id: str
|
|
2227
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2228
|
+
:type x_daytona_organization_id: str
|
|
2229
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2230
|
+
number provided, it will be total request
|
|
2231
|
+
timeout. It can also be a pair (tuple) of
|
|
2232
|
+
(connection, read) timeouts.
|
|
2233
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2234
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2235
|
+
request; this effectively ignores the
|
|
2236
|
+
authentication in the spec for a single request.
|
|
2237
|
+
:type _request_auth: dict, optional
|
|
2238
|
+
:param _content_type: force content-type for the request.
|
|
2239
|
+
:type _content_type: str, Optional
|
|
2240
|
+
:param _headers: set to override the headers for a single
|
|
2241
|
+
request; this effectively ignores the headers
|
|
2242
|
+
in the spec for a single request.
|
|
2243
|
+
:type _headers: dict, optional
|
|
2244
|
+
:param _host_index: set to override the host_index for a single
|
|
2245
|
+
request; this effectively ignores the host_index
|
|
2246
|
+
in the spec for a single request.
|
|
2247
|
+
:type _host_index: int, optional
|
|
2248
|
+
:return: Returns the result object.
|
|
2249
|
+
""" # noqa: E501
|
|
2250
|
+
|
|
2251
|
+
_param = self._remove_snapshot_serialize(
|
|
2252
|
+
id=id,
|
|
2253
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
2254
|
+
_request_auth=_request_auth,
|
|
2255
|
+
_content_type=_content_type,
|
|
2256
|
+
_headers=_headers,
|
|
2257
|
+
_host_index=_host_index
|
|
2258
|
+
)
|
|
2259
|
+
|
|
2260
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2261
|
+
'200': None,
|
|
2262
|
+
}
|
|
2263
|
+
response_data = await self.api_client.call_api(
|
|
2264
|
+
*_param,
|
|
2265
|
+
_request_timeout=_request_timeout
|
|
2266
|
+
)
|
|
2267
|
+
return response_data.response
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
def _remove_snapshot_serialize(
|
|
2271
|
+
self,
|
|
2272
|
+
id,
|
|
2273
|
+
x_daytona_organization_id,
|
|
2274
|
+
_request_auth,
|
|
2275
|
+
_content_type,
|
|
2276
|
+
_headers,
|
|
2277
|
+
_host_index,
|
|
2278
|
+
) -> RequestSerialized:
|
|
2279
|
+
|
|
2280
|
+
_host = None
|
|
2281
|
+
|
|
2282
|
+
_collection_formats: Dict[str, str] = {
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
_path_params: Dict[str, str] = {}
|
|
2286
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2287
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2288
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2289
|
+
_files: Dict[
|
|
2290
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2291
|
+
] = {}
|
|
2292
|
+
_body_params: Optional[bytes] = None
|
|
2293
|
+
|
|
2294
|
+
# process the path parameters
|
|
2295
|
+
if id is not None:
|
|
2296
|
+
_path_params['id'] = id
|
|
2297
|
+
# process the query parameters
|
|
2298
|
+
# process the header parameters
|
|
2299
|
+
if x_daytona_organization_id is not None:
|
|
2300
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
2301
|
+
# process the form parameters
|
|
2302
|
+
# process the body parameter
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
# authentication setting
|
|
2308
|
+
_auth_settings: List[str] = [
|
|
2309
|
+
'bearer',
|
|
2310
|
+
'oauth2'
|
|
2311
|
+
]
|
|
2312
|
+
|
|
2313
|
+
return self.api_client.param_serialize(
|
|
2314
|
+
method='DELETE',
|
|
2315
|
+
resource_path='/snapshots/{id}',
|
|
2316
|
+
path_params=_path_params,
|
|
2317
|
+
query_params=_query_params,
|
|
2318
|
+
header_params=_header_params,
|
|
2319
|
+
body=_body_params,
|
|
2320
|
+
post_params=_form_params,
|
|
2321
|
+
files=_files,
|
|
2322
|
+
auth_settings=_auth_settings,
|
|
2323
|
+
collection_formats=_collection_formats,
|
|
2324
|
+
_host=_host,
|
|
2325
|
+
_request_auth=_request_auth
|
|
2326
|
+
)
|
|
2327
|
+
|
|
2328
|
+
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
@validate_call
|
|
2332
|
+
async def set_snapshot_general_status(
|
|
2333
|
+
self,
|
|
2334
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
2335
|
+
set_snapshot_general_status_dto: SetSnapshotGeneralStatusDto,
|
|
2336
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2337
|
+
_request_timeout: Union[
|
|
2338
|
+
None,
|
|
2339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2340
|
+
Tuple[
|
|
2341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2342
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2343
|
+
]
|
|
2344
|
+
] = None,
|
|
2345
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2346
|
+
_content_type: Optional[StrictStr] = None,
|
|
2347
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2348
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2349
|
+
) -> SnapshotDto:
|
|
2350
|
+
"""Set snapshot general status
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
:param id: Snapshot ID (required)
|
|
2354
|
+
:type id: str
|
|
2355
|
+
:param set_snapshot_general_status_dto: (required)
|
|
2356
|
+
:type set_snapshot_general_status_dto: SetSnapshotGeneralStatusDto
|
|
2357
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2358
|
+
:type x_daytona_organization_id: str
|
|
2359
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2360
|
+
number provided, it will be total request
|
|
2361
|
+
timeout. It can also be a pair (tuple) of
|
|
2362
|
+
(connection, read) timeouts.
|
|
2363
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2364
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2365
|
+
request; this effectively ignores the
|
|
2366
|
+
authentication in the spec for a single request.
|
|
2367
|
+
:type _request_auth: dict, optional
|
|
2368
|
+
:param _content_type: force content-type for the request.
|
|
2369
|
+
:type _content_type: str, Optional
|
|
2370
|
+
:param _headers: set to override the headers for a single
|
|
2371
|
+
request; this effectively ignores the headers
|
|
2372
|
+
in the spec for a single request.
|
|
2373
|
+
:type _headers: dict, optional
|
|
2374
|
+
:param _host_index: set to override the host_index for a single
|
|
2375
|
+
request; this effectively ignores the host_index
|
|
2376
|
+
in the spec for a single request.
|
|
2377
|
+
:type _host_index: int, optional
|
|
2378
|
+
:return: Returns the result object.
|
|
2379
|
+
""" # noqa: E501
|
|
2380
|
+
|
|
2381
|
+
_param = self._set_snapshot_general_status_serialize(
|
|
2382
|
+
id=id,
|
|
2383
|
+
set_snapshot_general_status_dto=set_snapshot_general_status_dto,
|
|
2384
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
2385
|
+
_request_auth=_request_auth,
|
|
2386
|
+
_content_type=_content_type,
|
|
2387
|
+
_headers=_headers,
|
|
2388
|
+
_host_index=_host_index
|
|
2389
|
+
)
|
|
2390
|
+
|
|
2391
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2392
|
+
'200': "SnapshotDto",
|
|
2393
|
+
}
|
|
2394
|
+
response_data = await self.api_client.call_api(
|
|
2395
|
+
*_param,
|
|
2396
|
+
_request_timeout=_request_timeout
|
|
2397
|
+
)
|
|
2398
|
+
await response_data.read()
|
|
2399
|
+
return self.api_client.response_deserialize(
|
|
2400
|
+
response_data=response_data,
|
|
2401
|
+
response_types_map=_response_types_map,
|
|
2402
|
+
).data
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
@validate_call
|
|
2406
|
+
async def set_snapshot_general_status_with_http_info(
|
|
2407
|
+
self,
|
|
2408
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
2409
|
+
set_snapshot_general_status_dto: SetSnapshotGeneralStatusDto,
|
|
2410
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2411
|
+
_request_timeout: Union[
|
|
2412
|
+
None,
|
|
2413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2414
|
+
Tuple[
|
|
2415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2416
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2417
|
+
]
|
|
2418
|
+
] = None,
|
|
2419
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2420
|
+
_content_type: Optional[StrictStr] = None,
|
|
2421
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2422
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2423
|
+
) -> ApiResponse[SnapshotDto]:
|
|
2424
|
+
"""Set snapshot general status
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
:param id: Snapshot ID (required)
|
|
2428
|
+
:type id: str
|
|
2429
|
+
:param set_snapshot_general_status_dto: (required)
|
|
2430
|
+
:type set_snapshot_general_status_dto: SetSnapshotGeneralStatusDto
|
|
2431
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2432
|
+
:type x_daytona_organization_id: str
|
|
2433
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2434
|
+
number provided, it will be total request
|
|
2435
|
+
timeout. It can also be a pair (tuple) of
|
|
2436
|
+
(connection, read) timeouts.
|
|
2437
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2438
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2439
|
+
request; this effectively ignores the
|
|
2440
|
+
authentication in the spec for a single request.
|
|
2441
|
+
:type _request_auth: dict, optional
|
|
2442
|
+
:param _content_type: force content-type for the request.
|
|
2443
|
+
:type _content_type: str, Optional
|
|
2444
|
+
:param _headers: set to override the headers for a single
|
|
2445
|
+
request; this effectively ignores the headers
|
|
2446
|
+
in the spec for a single request.
|
|
2447
|
+
:type _headers: dict, optional
|
|
2448
|
+
:param _host_index: set to override the host_index for a single
|
|
2449
|
+
request; this effectively ignores the host_index
|
|
2450
|
+
in the spec for a single request.
|
|
2451
|
+
:type _host_index: int, optional
|
|
2452
|
+
:return: Returns the result object.
|
|
2453
|
+
""" # noqa: E501
|
|
2454
|
+
|
|
2455
|
+
_param = self._set_snapshot_general_status_serialize(
|
|
2456
|
+
id=id,
|
|
2457
|
+
set_snapshot_general_status_dto=set_snapshot_general_status_dto,
|
|
2458
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
2459
|
+
_request_auth=_request_auth,
|
|
2460
|
+
_content_type=_content_type,
|
|
2461
|
+
_headers=_headers,
|
|
2462
|
+
_host_index=_host_index
|
|
2463
|
+
)
|
|
2464
|
+
|
|
2465
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2466
|
+
'200': "SnapshotDto",
|
|
2467
|
+
}
|
|
2468
|
+
response_data = await self.api_client.call_api(
|
|
2469
|
+
*_param,
|
|
2470
|
+
_request_timeout=_request_timeout
|
|
2471
|
+
)
|
|
2472
|
+
await response_data.read()
|
|
2473
|
+
return self.api_client.response_deserialize(
|
|
2474
|
+
response_data=response_data,
|
|
2475
|
+
response_types_map=_response_types_map,
|
|
2476
|
+
)
|
|
2477
|
+
|
|
2478
|
+
|
|
2479
|
+
@validate_call
|
|
2480
|
+
async def set_snapshot_general_status_without_preload_content(
|
|
2481
|
+
self,
|
|
2482
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
2483
|
+
set_snapshot_general_status_dto: SetSnapshotGeneralStatusDto,
|
|
2484
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2485
|
+
_request_timeout: Union[
|
|
2486
|
+
None,
|
|
2487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2488
|
+
Tuple[
|
|
2489
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2490
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2491
|
+
]
|
|
2492
|
+
] = None,
|
|
2493
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2494
|
+
_content_type: Optional[StrictStr] = None,
|
|
2495
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2496
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2497
|
+
) -> RESTResponseType:
|
|
2498
|
+
"""Set snapshot general status
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
:param id: Snapshot ID (required)
|
|
2502
|
+
:type id: str
|
|
2503
|
+
:param set_snapshot_general_status_dto: (required)
|
|
2504
|
+
:type set_snapshot_general_status_dto: SetSnapshotGeneralStatusDto
|
|
2505
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
2506
|
+
:type x_daytona_organization_id: str
|
|
2507
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2508
|
+
number provided, it will be total request
|
|
2509
|
+
timeout. It can also be a pair (tuple) of
|
|
2510
|
+
(connection, read) timeouts.
|
|
2511
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2512
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2513
|
+
request; this effectively ignores the
|
|
2514
|
+
authentication in the spec for a single request.
|
|
2515
|
+
:type _request_auth: dict, optional
|
|
2516
|
+
:param _content_type: force content-type for the request.
|
|
2517
|
+
:type _content_type: str, Optional
|
|
2518
|
+
:param _headers: set to override the headers for a single
|
|
2519
|
+
request; this effectively ignores the headers
|
|
2520
|
+
in the spec for a single request.
|
|
2521
|
+
:type _headers: dict, optional
|
|
2522
|
+
:param _host_index: set to override the host_index for a single
|
|
2523
|
+
request; this effectively ignores the host_index
|
|
2524
|
+
in the spec for a single request.
|
|
2525
|
+
:type _host_index: int, optional
|
|
2526
|
+
:return: Returns the result object.
|
|
2527
|
+
""" # noqa: E501
|
|
2528
|
+
|
|
2529
|
+
_param = self._set_snapshot_general_status_serialize(
|
|
2530
|
+
id=id,
|
|
2531
|
+
set_snapshot_general_status_dto=set_snapshot_general_status_dto,
|
|
2532
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
2533
|
+
_request_auth=_request_auth,
|
|
2534
|
+
_content_type=_content_type,
|
|
2535
|
+
_headers=_headers,
|
|
2536
|
+
_host_index=_host_index
|
|
2537
|
+
)
|
|
2538
|
+
|
|
2539
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2540
|
+
'200': "SnapshotDto",
|
|
2541
|
+
}
|
|
2542
|
+
response_data = await self.api_client.call_api(
|
|
2543
|
+
*_param,
|
|
2544
|
+
_request_timeout=_request_timeout
|
|
2545
|
+
)
|
|
2546
|
+
return response_data.response
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
def _set_snapshot_general_status_serialize(
|
|
2550
|
+
self,
|
|
2551
|
+
id,
|
|
2552
|
+
set_snapshot_general_status_dto,
|
|
2553
|
+
x_daytona_organization_id,
|
|
2554
|
+
_request_auth,
|
|
2555
|
+
_content_type,
|
|
2556
|
+
_headers,
|
|
2557
|
+
_host_index,
|
|
2558
|
+
) -> RequestSerialized:
|
|
2559
|
+
|
|
2560
|
+
_host = None
|
|
2561
|
+
|
|
2562
|
+
_collection_formats: Dict[str, str] = {
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
_path_params: Dict[str, str] = {}
|
|
2566
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2567
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2568
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2569
|
+
_files: Dict[
|
|
2570
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2571
|
+
] = {}
|
|
2572
|
+
_body_params: Optional[bytes] = None
|
|
2573
|
+
|
|
2574
|
+
# process the path parameters
|
|
2575
|
+
if id is not None:
|
|
2576
|
+
_path_params['id'] = id
|
|
2577
|
+
# process the query parameters
|
|
2578
|
+
# process the header parameters
|
|
2579
|
+
if x_daytona_organization_id is not None:
|
|
2580
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
2581
|
+
# process the form parameters
|
|
2582
|
+
# process the body parameter
|
|
2583
|
+
if set_snapshot_general_status_dto is not None:
|
|
2584
|
+
_body_params = set_snapshot_general_status_dto
|
|
2585
|
+
|
|
2586
|
+
|
|
2587
|
+
# set the HTTP header `Accept`
|
|
2588
|
+
if 'Accept' not in _header_params:
|
|
2589
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2590
|
+
[
|
|
2591
|
+
'application/json'
|
|
2592
|
+
]
|
|
2593
|
+
)
|
|
2594
|
+
|
|
2595
|
+
# set the HTTP header `Content-Type`
|
|
2596
|
+
if _content_type:
|
|
2597
|
+
_header_params['Content-Type'] = _content_type
|
|
2598
|
+
else:
|
|
2599
|
+
_default_content_type = (
|
|
2600
|
+
self.api_client.select_header_content_type(
|
|
2601
|
+
[
|
|
2602
|
+
'application/json'
|
|
2603
|
+
]
|
|
2604
|
+
)
|
|
2605
|
+
)
|
|
2606
|
+
if _default_content_type is not None:
|
|
2607
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2608
|
+
|
|
2609
|
+
# authentication setting
|
|
2610
|
+
_auth_settings: List[str] = [
|
|
2611
|
+
'bearer',
|
|
2612
|
+
'oauth2'
|
|
2613
|
+
]
|
|
2614
|
+
|
|
2615
|
+
return self.api_client.param_serialize(
|
|
2616
|
+
method='PATCH',
|
|
2617
|
+
resource_path='/snapshots/{id}/general',
|
|
2618
|
+
path_params=_path_params,
|
|
2619
|
+
query_params=_query_params,
|
|
2620
|
+
header_params=_header_params,
|
|
2621
|
+
body=_body_params,
|
|
2622
|
+
post_params=_form_params,
|
|
2623
|
+
files=_files,
|
|
2624
|
+
auth_settings=_auth_settings,
|
|
2625
|
+
collection_formats=_collection_formats,
|
|
2626
|
+
_host=_host,
|
|
2627
|
+
_request_auth=_request_auth
|
|
2628
|
+
)
|
|
2629
|
+
|
|
2630
|
+
|