daytona_api_client 0.21.5a8__py3-none-any.whl → 0.22.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of daytona_api_client might be problematic. Click here for more details.
- daytona_api_client/__init__.py +25 -0
- daytona_api_client/api/sandbox_api.py +29 -5
- daytona_api_client/api/snapshots_api.py +280 -0
- daytona_api_client/api/toolbox_api.py +8022 -1640
- daytona_api_client/models/__init__.py +25 -0
- daytona_api_client/models/compressed_screenshot_response.py +105 -0
- daytona_api_client/models/computer_use_start_response.py +103 -0
- daytona_api_client/models/computer_use_status_response.py +108 -0
- daytona_api_client/models/computer_use_stop_response.py +103 -0
- daytona_api_client/models/display_info_response.py +101 -0
- daytona_api_client/models/download_files.py +101 -0
- daytona_api_client/models/empty_response.py +101 -0
- daytona_api_client/models/keyboard_hotkey_request.py +101 -0
- daytona_api_client/models/keyboard_hotkey_response.py +103 -0
- daytona_api_client/models/keyboard_press_request.py +103 -0
- daytona_api_client/models/keyboard_press_response.py +105 -0
- daytona_api_client/models/keyboard_type_request.py +103 -0
- daytona_api_client/models/keyboard_type_response.py +103 -0
- daytona_api_client/models/mouse_click_request.py +107 -0
- daytona_api_client/models/mouse_click_response.py +103 -0
- daytona_api_client/models/mouse_drag_request.py +109 -0
- daytona_api_client/models/mouse_drag_response.py +103 -0
- daytona_api_client/models/mouse_move_request.py +103 -0
- daytona_api_client/models/mouse_move_response.py +103 -0
- daytona_api_client/models/mouse_position.py +103 -0
- daytona_api_client/models/mouse_scroll_request.py +107 -0
- daytona_api_client/models/mouse_scroll_response.py +101 -0
- daytona_api_client/models/port_preview_url.py +5 -3
- daytona_api_client/models/process_errors_response.py +103 -0
- daytona_api_client/models/process_logs_response.py +103 -0
- daytona_api_client/models/process_restart_response.py +103 -0
- daytona_api_client/models/process_status_response.py +103 -0
- daytona_api_client/models/region_screenshot_response.py +105 -0
- daytona_api_client/models/sandbox.py +4 -1
- daytona_api_client/models/sandbox_desired_state.py +41 -0
- daytona_api_client/models/screenshot_response.py +105 -0
- daytona_api_client/models/snapshot_state.py +1 -0
- daytona_api_client/models/windows_response.py +103 -0
- daytona_api_client/models/workspace.py +4 -1
- {daytona_api_client-0.21.5a8.dist-info → daytona_api_client-0.22.0.dist-info}/METADATA +1 -1
- {daytona_api_client-0.21.5a8.dist-info → daytona_api_client-0.22.0.dist-info}/RECORD +44 -14
- {daytona_api_client-0.21.5a8.dist-info → daytona_api_client-0.22.0.dist-info}/WHEEL +0 -0
- {daytona_api_client-0.21.5a8.dist-info → daytona_api_client-0.22.0.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client-0.21.5a8.dist-info → daytona_api_client-0.22.0.dist-info}/top_level.txt +0 -0
daytona_api_client/__init__.py
CHANGED
|
@@ -51,6 +51,10 @@ from daytona_api_client.models.command import Command
|
|
|
51
51
|
from daytona_api_client.models.completion_context import CompletionContext
|
|
52
52
|
from daytona_api_client.models.completion_item import CompletionItem
|
|
53
53
|
from daytona_api_client.models.completion_list import CompletionList
|
|
54
|
+
from daytona_api_client.models.compressed_screenshot_response import CompressedScreenshotResponse
|
|
55
|
+
from daytona_api_client.models.computer_use_start_response import ComputerUseStartResponse
|
|
56
|
+
from daytona_api_client.models.computer_use_status_response import ComputerUseStatusResponse
|
|
57
|
+
from daytona_api_client.models.computer_use_stop_response import ComputerUseStopResponse
|
|
54
58
|
from daytona_api_client.models.create_api_key import CreateApiKey
|
|
55
59
|
from daytona_api_client.models.create_build_info import CreateBuildInfo
|
|
56
60
|
from daytona_api_client.models.create_docker_registry import CreateDockerRegistry
|
|
@@ -66,6 +70,7 @@ from daytona_api_client.models.create_snapshot import CreateSnapshot
|
|
|
66
70
|
from daytona_api_client.models.create_user import CreateUser
|
|
67
71
|
from daytona_api_client.models.create_volume import CreateVolume
|
|
68
72
|
from daytona_api_client.models.create_workspace import CreateWorkspace
|
|
73
|
+
from daytona_api_client.models.display_info_response import DisplayInfoResponse
|
|
69
74
|
from daytona_api_client.models.docker_registry import DockerRegistry
|
|
70
75
|
from daytona_api_client.models.execute_request import ExecuteRequest
|
|
71
76
|
from daytona_api_client.models.execute_response import ExecuteResponse
|
|
@@ -81,6 +86,9 @@ from daytona_api_client.models.git_commit_response import GitCommitResponse
|
|
|
81
86
|
from daytona_api_client.models.git_delete_branch_request import GitDeleteBranchRequest
|
|
82
87
|
from daytona_api_client.models.git_repo_request import GitRepoRequest
|
|
83
88
|
from daytona_api_client.models.git_status import GitStatus
|
|
89
|
+
from daytona_api_client.models.keyboard_hotkey_request import KeyboardHotkeyRequest
|
|
90
|
+
from daytona_api_client.models.keyboard_press_request import KeyboardPressRequest
|
|
91
|
+
from daytona_api_client.models.keyboard_type_request import KeyboardTypeRequest
|
|
84
92
|
from daytona_api_client.models.list_branch_response import ListBranchResponse
|
|
85
93
|
from daytona_api_client.models.lsp_completion_params import LspCompletionParams
|
|
86
94
|
from daytona_api_client.models.lsp_document_request import LspDocumentRequest
|
|
@@ -88,6 +96,15 @@ from daytona_api_client.models.lsp_location import LspLocation
|
|
|
88
96
|
from daytona_api_client.models.lsp_server_request import LspServerRequest
|
|
89
97
|
from daytona_api_client.models.lsp_symbol import LspSymbol
|
|
90
98
|
from daytona_api_client.models.match import Match
|
|
99
|
+
from daytona_api_client.models.mouse_click_request import MouseClickRequest
|
|
100
|
+
from daytona_api_client.models.mouse_click_response import MouseClickResponse
|
|
101
|
+
from daytona_api_client.models.mouse_drag_request import MouseDragRequest
|
|
102
|
+
from daytona_api_client.models.mouse_drag_response import MouseDragResponse
|
|
103
|
+
from daytona_api_client.models.mouse_move_request import MouseMoveRequest
|
|
104
|
+
from daytona_api_client.models.mouse_move_response import MouseMoveResponse
|
|
105
|
+
from daytona_api_client.models.mouse_position import MousePosition
|
|
106
|
+
from daytona_api_client.models.mouse_scroll_request import MouseScrollRequest
|
|
107
|
+
from daytona_api_client.models.mouse_scroll_response import MouseScrollResponse
|
|
91
108
|
from daytona_api_client.models.organization import Organization
|
|
92
109
|
from daytona_api_client.models.organization_invitation import OrganizationInvitation
|
|
93
110
|
from daytona_api_client.models.organization_role import OrganizationRole
|
|
@@ -96,8 +113,13 @@ from daytona_api_client.models.organization_user import OrganizationUser
|
|
|
96
113
|
from daytona_api_client.models.paginated_snapshots_dto import PaginatedSnapshotsDto
|
|
97
114
|
from daytona_api_client.models.port_preview_url import PortPreviewUrl
|
|
98
115
|
from daytona_api_client.models.position import Position
|
|
116
|
+
from daytona_api_client.models.process_errors_response import ProcessErrorsResponse
|
|
117
|
+
from daytona_api_client.models.process_logs_response import ProcessLogsResponse
|
|
118
|
+
from daytona_api_client.models.process_restart_response import ProcessRestartResponse
|
|
119
|
+
from daytona_api_client.models.process_status_response import ProcessStatusResponse
|
|
99
120
|
from daytona_api_client.models.project_dir_response import ProjectDirResponse
|
|
100
121
|
from daytona_api_client.models.range import Range
|
|
122
|
+
from daytona_api_client.models.region_screenshot_response import RegionScreenshotResponse
|
|
101
123
|
from daytona_api_client.models.registry_push_access_dto import RegistryPushAccessDto
|
|
102
124
|
from daytona_api_client.models.replace_request import ReplaceRequest
|
|
103
125
|
from daytona_api_client.models.replace_result import ReplaceResult
|
|
@@ -107,10 +129,12 @@ from daytona_api_client.models.runner_snapshot_dto import RunnerSnapshotDto
|
|
|
107
129
|
from daytona_api_client.models.runner_state import RunnerState
|
|
108
130
|
from daytona_api_client.models.sandbox import Sandbox
|
|
109
131
|
from daytona_api_client.models.sandbox_class import SandboxClass
|
|
132
|
+
from daytona_api_client.models.sandbox_desired_state import SandboxDesiredState
|
|
110
133
|
from daytona_api_client.models.sandbox_info import SandboxInfo
|
|
111
134
|
from daytona_api_client.models.sandbox_labels import SandboxLabels
|
|
112
135
|
from daytona_api_client.models.sandbox_state import SandboxState
|
|
113
136
|
from daytona_api_client.models.sandbox_volume import SandboxVolume
|
|
137
|
+
from daytona_api_client.models.screenshot_response import ScreenshotResponse
|
|
114
138
|
from daytona_api_client.models.search_files_response import SearchFilesResponse
|
|
115
139
|
from daytona_api_client.models.session import Session
|
|
116
140
|
from daytona_api_client.models.session_execute_request import SessionExecuteRequest
|
|
@@ -131,4 +155,5 @@ from daytona_api_client.models.user import User
|
|
|
131
155
|
from daytona_api_client.models.user_public_key import UserPublicKey
|
|
132
156
|
from daytona_api_client.models.volume_dto import VolumeDto
|
|
133
157
|
from daytona_api_client.models.volume_state import VolumeState
|
|
158
|
+
from daytona_api_client.models.windows_response import WindowsResponse
|
|
134
159
|
from daytona_api_client.models.workspace import Workspace
|
|
@@ -2025,6 +2025,7 @@ class SandboxApi:
|
|
|
2025
2025
|
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2026
2026
|
verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
|
|
2027
2027
|
labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
|
|
2028
|
+
include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
|
|
2028
2029
|
_request_timeout: Union[
|
|
2029
2030
|
None,
|
|
2030
2031
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2047,6 +2048,8 @@ class SandboxApi:
|
|
|
2047
2048
|
:type verbose: bool
|
|
2048
2049
|
:param labels: JSON encoded labels to filter by
|
|
2049
2050
|
:type labels: str
|
|
2051
|
+
:param include_errored_deleted: Include errored and deleted sandboxes
|
|
2052
|
+
:type include_errored_deleted: bool
|
|
2050
2053
|
:param _request_timeout: timeout setting for this request. If one
|
|
2051
2054
|
number provided, it will be total request
|
|
2052
2055
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2073,6 +2076,7 @@ class SandboxApi:
|
|
|
2073
2076
|
x_daytona_organization_id=x_daytona_organization_id,
|
|
2074
2077
|
verbose=verbose,
|
|
2075
2078
|
labels=labels,
|
|
2079
|
+
include_errored_deleted=include_errored_deleted,
|
|
2076
2080
|
_request_auth=_request_auth,
|
|
2077
2081
|
_content_type=_content_type,
|
|
2078
2082
|
_headers=_headers,
|
|
@@ -2099,6 +2103,7 @@ class SandboxApi:
|
|
|
2099
2103
|
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2100
2104
|
verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
|
|
2101
2105
|
labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
|
|
2106
|
+
include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
|
|
2102
2107
|
_request_timeout: Union[
|
|
2103
2108
|
None,
|
|
2104
2109
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2121,6 +2126,8 @@ class SandboxApi:
|
|
|
2121
2126
|
:type verbose: bool
|
|
2122
2127
|
:param labels: JSON encoded labels to filter by
|
|
2123
2128
|
:type labels: str
|
|
2129
|
+
:param include_errored_deleted: Include errored and deleted sandboxes
|
|
2130
|
+
:type include_errored_deleted: bool
|
|
2124
2131
|
:param _request_timeout: timeout setting for this request. If one
|
|
2125
2132
|
number provided, it will be total request
|
|
2126
2133
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2147,6 +2154,7 @@ class SandboxApi:
|
|
|
2147
2154
|
x_daytona_organization_id=x_daytona_organization_id,
|
|
2148
2155
|
verbose=verbose,
|
|
2149
2156
|
labels=labels,
|
|
2157
|
+
include_errored_deleted=include_errored_deleted,
|
|
2150
2158
|
_request_auth=_request_auth,
|
|
2151
2159
|
_content_type=_content_type,
|
|
2152
2160
|
_headers=_headers,
|
|
@@ -2173,6 +2181,7 @@ class SandboxApi:
|
|
|
2173
2181
|
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
2174
2182
|
verbose: Annotated[Optional[StrictBool], Field(description="Include verbose output")] = None,
|
|
2175
2183
|
labels: Annotated[Optional[StrictStr], Field(description="JSON encoded labels to filter by")] = None,
|
|
2184
|
+
include_errored_deleted: Annotated[Optional[StrictBool], Field(description="Include errored and deleted sandboxes")] = None,
|
|
2176
2185
|
_request_timeout: Union[
|
|
2177
2186
|
None,
|
|
2178
2187
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2195,6 +2204,8 @@ class SandboxApi:
|
|
|
2195
2204
|
:type verbose: bool
|
|
2196
2205
|
:param labels: JSON encoded labels to filter by
|
|
2197
2206
|
:type labels: str
|
|
2207
|
+
:param include_errored_deleted: Include errored and deleted sandboxes
|
|
2208
|
+
:type include_errored_deleted: bool
|
|
2198
2209
|
:param _request_timeout: timeout setting for this request. If one
|
|
2199
2210
|
number provided, it will be total request
|
|
2200
2211
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2221,6 +2232,7 @@ class SandboxApi:
|
|
|
2221
2232
|
x_daytona_organization_id=x_daytona_organization_id,
|
|
2222
2233
|
verbose=verbose,
|
|
2223
2234
|
labels=labels,
|
|
2235
|
+
include_errored_deleted=include_errored_deleted,
|
|
2224
2236
|
_request_auth=_request_auth,
|
|
2225
2237
|
_content_type=_content_type,
|
|
2226
2238
|
_headers=_headers,
|
|
@@ -2242,6 +2254,7 @@ class SandboxApi:
|
|
|
2242
2254
|
x_daytona_organization_id,
|
|
2243
2255
|
verbose,
|
|
2244
2256
|
labels,
|
|
2257
|
+
include_errored_deleted,
|
|
2245
2258
|
_request_auth,
|
|
2246
2259
|
_content_type,
|
|
2247
2260
|
_headers,
|
|
@@ -2272,6 +2285,10 @@ class SandboxApi:
|
|
|
2272
2285
|
|
|
2273
2286
|
_query_params.append(('labels', labels))
|
|
2274
2287
|
|
|
2288
|
+
if include_errored_deleted is not None:
|
|
2289
|
+
|
|
2290
|
+
_query_params.append(('includeErroredDeleted', include_errored_deleted))
|
|
2291
|
+
|
|
2275
2292
|
# process the header parameters
|
|
2276
2293
|
if x_daytona_organization_id is not None:
|
|
2277
2294
|
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
@@ -3195,7 +3212,7 @@ class SandboxApi:
|
|
|
3195
3212
|
_content_type: Optional[StrictStr] = None,
|
|
3196
3213
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3197
3214
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3198
|
-
) ->
|
|
3215
|
+
) -> Sandbox:
|
|
3199
3216
|
"""Start sandbox
|
|
3200
3217
|
|
|
3201
3218
|
|
|
@@ -3235,7 +3252,7 @@ class SandboxApi:
|
|
|
3235
3252
|
)
|
|
3236
3253
|
|
|
3237
3254
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3238
|
-
'200':
|
|
3255
|
+
'200': "Sandbox",
|
|
3239
3256
|
}
|
|
3240
3257
|
response_data = self.api_client.call_api(
|
|
3241
3258
|
*_param,
|
|
@@ -3265,7 +3282,7 @@ class SandboxApi:
|
|
|
3265
3282
|
_content_type: Optional[StrictStr] = None,
|
|
3266
3283
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3267
3284
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3268
|
-
) -> ApiResponse[
|
|
3285
|
+
) -> ApiResponse[Sandbox]:
|
|
3269
3286
|
"""Start sandbox
|
|
3270
3287
|
|
|
3271
3288
|
|
|
@@ -3305,7 +3322,7 @@ class SandboxApi:
|
|
|
3305
3322
|
)
|
|
3306
3323
|
|
|
3307
3324
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3308
|
-
'200':
|
|
3325
|
+
'200': "Sandbox",
|
|
3309
3326
|
}
|
|
3310
3327
|
response_data = self.api_client.call_api(
|
|
3311
3328
|
*_param,
|
|
@@ -3375,7 +3392,7 @@ class SandboxApi:
|
|
|
3375
3392
|
)
|
|
3376
3393
|
|
|
3377
3394
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3378
|
-
'200':
|
|
3395
|
+
'200': "Sandbox",
|
|
3379
3396
|
}
|
|
3380
3397
|
response_data = self.api_client.call_api(
|
|
3381
3398
|
*_param,
|
|
@@ -3419,6 +3436,13 @@ class SandboxApi:
|
|
|
3419
3436
|
# process the body parameter
|
|
3420
3437
|
|
|
3421
3438
|
|
|
3439
|
+
# set the HTTP header `Accept`
|
|
3440
|
+
if 'Accept' not in _header_params:
|
|
3441
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3442
|
+
[
|
|
3443
|
+
'application/json'
|
|
3444
|
+
]
|
|
3445
|
+
)
|
|
3422
3446
|
|
|
3423
3447
|
|
|
3424
3448
|
# authentication setting
|
|
@@ -44,6 +44,286 @@ class SnapshotsApi:
|
|
|
44
44
|
self.api_client = api_client
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
@validate_call
|
|
48
|
+
def activate_snapshot(
|
|
49
|
+
self,
|
|
50
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
51
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> SnapshotDto:
|
|
65
|
+
"""Activate a snapshot
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:param id: Snapshot ID (required)
|
|
69
|
+
:type id: str
|
|
70
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
71
|
+
:type x_daytona_organization_id: str
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._activate_snapshot_serialize(
|
|
95
|
+
id=id,
|
|
96
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "SnapshotDto",
|
|
105
|
+
'400': None,
|
|
106
|
+
'404': None,
|
|
107
|
+
}
|
|
108
|
+
response_data = self.api_client.call_api(
|
|
109
|
+
*_param,
|
|
110
|
+
_request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def activate_snapshot_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
123
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[SnapshotDto]:
|
|
137
|
+
"""Activate a snapshot
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
:param id: Snapshot ID (required)
|
|
141
|
+
:type id: str
|
|
142
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
143
|
+
:type x_daytona_organization_id: str
|
|
144
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
145
|
+
number provided, it will be total request
|
|
146
|
+
timeout. It can also be a pair (tuple) of
|
|
147
|
+
(connection, read) timeouts.
|
|
148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
150
|
+
request; this effectively ignores the
|
|
151
|
+
authentication in the spec for a single request.
|
|
152
|
+
:type _request_auth: dict, optional
|
|
153
|
+
:param _content_type: force content-type for the request.
|
|
154
|
+
:type _content_type: str, Optional
|
|
155
|
+
:param _headers: set to override the headers for a single
|
|
156
|
+
request; this effectively ignores the headers
|
|
157
|
+
in the spec for a single request.
|
|
158
|
+
:type _headers: dict, optional
|
|
159
|
+
:param _host_index: set to override the host_index for a single
|
|
160
|
+
request; this effectively ignores the host_index
|
|
161
|
+
in the spec for a single request.
|
|
162
|
+
:type _host_index: int, optional
|
|
163
|
+
:return: Returns the result object.
|
|
164
|
+
""" # noqa: E501
|
|
165
|
+
|
|
166
|
+
_param = self._activate_snapshot_serialize(
|
|
167
|
+
id=id,
|
|
168
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
169
|
+
_request_auth=_request_auth,
|
|
170
|
+
_content_type=_content_type,
|
|
171
|
+
_headers=_headers,
|
|
172
|
+
_host_index=_host_index
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
176
|
+
'200': "SnapshotDto",
|
|
177
|
+
'400': None,
|
|
178
|
+
'404': None,
|
|
179
|
+
}
|
|
180
|
+
response_data = self.api_client.call_api(
|
|
181
|
+
*_param,
|
|
182
|
+
_request_timeout=_request_timeout
|
|
183
|
+
)
|
|
184
|
+
response_data.read()
|
|
185
|
+
return self.api_client.response_deserialize(
|
|
186
|
+
response_data=response_data,
|
|
187
|
+
response_types_map=_response_types_map,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@validate_call
|
|
192
|
+
def activate_snapshot_without_preload_content(
|
|
193
|
+
self,
|
|
194
|
+
id: Annotated[StrictStr, Field(description="Snapshot ID")],
|
|
195
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
196
|
+
_request_timeout: Union[
|
|
197
|
+
None,
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
199
|
+
Tuple[
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
202
|
+
]
|
|
203
|
+
] = None,
|
|
204
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
205
|
+
_content_type: Optional[StrictStr] = None,
|
|
206
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
208
|
+
) -> RESTResponseType:
|
|
209
|
+
"""Activate a snapshot
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
:param id: Snapshot ID (required)
|
|
213
|
+
:type id: str
|
|
214
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
215
|
+
:type x_daytona_organization_id: str
|
|
216
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
217
|
+
number provided, it will be total request
|
|
218
|
+
timeout. It can also be a pair (tuple) of
|
|
219
|
+
(connection, read) timeouts.
|
|
220
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
221
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
222
|
+
request; this effectively ignores the
|
|
223
|
+
authentication in the spec for a single request.
|
|
224
|
+
:type _request_auth: dict, optional
|
|
225
|
+
:param _content_type: force content-type for the request.
|
|
226
|
+
:type _content_type: str, Optional
|
|
227
|
+
:param _headers: set to override the headers for a single
|
|
228
|
+
request; this effectively ignores the headers
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _headers: dict, optional
|
|
231
|
+
:param _host_index: set to override the host_index for a single
|
|
232
|
+
request; this effectively ignores the host_index
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _host_index: int, optional
|
|
235
|
+
:return: Returns the result object.
|
|
236
|
+
""" # noqa: E501
|
|
237
|
+
|
|
238
|
+
_param = self._activate_snapshot_serialize(
|
|
239
|
+
id=id,
|
|
240
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
241
|
+
_request_auth=_request_auth,
|
|
242
|
+
_content_type=_content_type,
|
|
243
|
+
_headers=_headers,
|
|
244
|
+
_host_index=_host_index
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
248
|
+
'200': "SnapshotDto",
|
|
249
|
+
'400': None,
|
|
250
|
+
'404': None,
|
|
251
|
+
}
|
|
252
|
+
response_data = self.api_client.call_api(
|
|
253
|
+
*_param,
|
|
254
|
+
_request_timeout=_request_timeout
|
|
255
|
+
)
|
|
256
|
+
return response_data.response
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def _activate_snapshot_serialize(
|
|
260
|
+
self,
|
|
261
|
+
id,
|
|
262
|
+
x_daytona_organization_id,
|
|
263
|
+
_request_auth,
|
|
264
|
+
_content_type,
|
|
265
|
+
_headers,
|
|
266
|
+
_host_index,
|
|
267
|
+
) -> RequestSerialized:
|
|
268
|
+
|
|
269
|
+
_host = None
|
|
270
|
+
|
|
271
|
+
_collection_formats: Dict[str, str] = {
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
_path_params: Dict[str, str] = {}
|
|
275
|
+
_query_params: List[Tuple[str, str]] = []
|
|
276
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
277
|
+
_form_params: List[Tuple[str, str]] = []
|
|
278
|
+
_files: Dict[
|
|
279
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
280
|
+
] = {}
|
|
281
|
+
_body_params: Optional[bytes] = None
|
|
282
|
+
|
|
283
|
+
# process the path parameters
|
|
284
|
+
if id is not None:
|
|
285
|
+
_path_params['id'] = id
|
|
286
|
+
# process the query parameters
|
|
287
|
+
# process the header parameters
|
|
288
|
+
if x_daytona_organization_id is not None:
|
|
289
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
290
|
+
# process the form parameters
|
|
291
|
+
# process the body parameter
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
# set the HTTP header `Accept`
|
|
295
|
+
if 'Accept' not in _header_params:
|
|
296
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
297
|
+
[
|
|
298
|
+
'application/json'
|
|
299
|
+
]
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
# authentication setting
|
|
304
|
+
_auth_settings: List[str] = [
|
|
305
|
+
'bearer',
|
|
306
|
+
'oauth2'
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
return self.api_client.param_serialize(
|
|
310
|
+
method='POST',
|
|
311
|
+
resource_path='/snapshots/{id}/activate',
|
|
312
|
+
path_params=_path_params,
|
|
313
|
+
query_params=_query_params,
|
|
314
|
+
header_params=_header_params,
|
|
315
|
+
body=_body_params,
|
|
316
|
+
post_params=_form_params,
|
|
317
|
+
files=_files,
|
|
318
|
+
auth_settings=_auth_settings,
|
|
319
|
+
collection_formats=_collection_formats,
|
|
320
|
+
_host=_host,
|
|
321
|
+
_request_auth=_request_auth
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
47
327
|
@validate_call
|
|
48
328
|
def create_snapshot(
|
|
49
329
|
self,
|