daytona_api_client 1.0.0
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_api_client.gemspec +39 -0
- data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
- data/lib/daytona_api_client/api/audit_api.rb +240 -0
- data/lib/daytona_api_client/api/config_api.rb +77 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +472 -0
- data/lib/daytona_api_client/api/health_api.rb +75 -0
- data/lib/daytona_api_client/api/object_storage_api.rb +80 -0
- data/lib/daytona_api_client/api/organizations_api.rb +1695 -0
- data/lib/daytona_api_client/api/preview_api.rb +209 -0
- data/lib/daytona_api_client/api/runners_api.rb +321 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +1573 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +641 -0
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +553 -0
- data/lib/daytona_api_client/api/volumes_api.rb +342 -0
- data/lib/daytona_api_client/api/webhooks_api.rb +413 -0
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +393 -0
- data/lib/daytona_api_client/api_error.rb +58 -0
- data/lib/daytona_api_client/configuration.rb +306 -0
- data/lib/daytona_api_client/models/account_provider.rb +261 -0
- data/lib/daytona_api_client/models/announcement.rb +246 -0
- data/lib/daytona_api_client/models/api_key_list.rb +384 -0
- data/lib/daytona_api_client/models/api_key_response.rb +344 -0
- data/lib/daytona_api_client/models/audit_log.rb +422 -0
- data/lib/daytona_api_client/models/build_info.rb +285 -0
- data/lib/daytona_api_client/models/command.rb +273 -0
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/computer_use_status_response.rb +260 -0
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +288 -0
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +248 -0
- data/lib/daytona_api_client/models/create_docker_registry.rb +388 -0
- data/lib/daytona_api_client/models/create_linked_account.rb +263 -0
- data/lib/daytona_api_client/models/create_organization.rb +236 -0
- data/lib/daytona_api_client/models/create_organization_invitation.rb +326 -0
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/create_runner.rb +545 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +429 -0
- data/lib/daytona_api_client/models/create_session_request.rb +236 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +318 -0
- data/lib/daytona_api_client/models/create_user.rb +331 -0
- data/lib/daytona_api_client/models/create_volume.rb +235 -0
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +531 -0
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- data/lib/daytona_api_client/models/docker_registry.rb +449 -0
- data/lib/daytona_api_client/models/download_files.rb +238 -0
- data/lib/daytona_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/file_status.rb +313 -0
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +253 -0
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +235 -0
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +253 -0
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +236 -0
- data/lib/daytona_api_client/models/keyboard_press_request.rb +248 -0
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +290 -0
- data/lib/daytona_api_client/models/organization.rb +695 -0
- data/lib/daytona_api_client/models/organization_invitation.rb +534 -0
- data/lib/daytona_api_client/models/organization_role.rb +412 -0
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- data/lib/daytona_api_client/models/organization_usage_overview.rb +469 -0
- data/lib/daytona_api_client/models/organization_user.rb +451 -0
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +315 -0
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots_dto.rb +315 -0
- data/lib/daytona_api_client/models/port_preview_url.rb +273 -0
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +263 -0
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/project_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/pty_list_response.rb +238 -0
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +236 -0
- data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_api_client/models/runner.rb +780 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +290 -0
- data/lib/daytona_api_client/models/runner_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox.rb +755 -0
- data/lib/daytona_api_client/models/sandbox_class.rb +41 -0
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox_info.rb +273 -0
- data/lib/daytona_api_client/models/sandbox_labels.rb +238 -0
- data/lib/daytona_api_client/models/sandbox_state.rb +54 -0
- data/lib/daytona_api_client/models/sandbox_volume.rb +263 -0
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/session_execute_request.rb +256 -0
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +236 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +569 -0
- data/lib/daytona_api_client/models/snapshot_state.rb +49 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +283 -0
- data/lib/daytona_api_client/models/storage_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/update_docker_registry.rb +310 -0
- data/lib/daytona_api_client/models/update_organization_invitation.rb +299 -0
- data/lib/daytona_api_client/models/update_organization_member_access.rb +289 -0
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +260 -0
- data/lib/daytona_api_client/models/user.rb +346 -0
- data/lib/daytona_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/user_public_key.rb +263 -0
- data/lib/daytona_api_client/models/volume_dto.rb +417 -0
- data/lib/daytona_api_client/models/volume_state.rb +45 -0
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +236 -0
- data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +218 -0
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +343 -0
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/workspace.rb +834 -0
- data/lib/daytona_api_client/version.rb +15 -0
- data/lib/daytona_api_client.rb +194 -0
- data/project.json +37 -0
- metadata +246 -0
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaApiClient
|
|
16
|
+
class SnapshotsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Activate a snapshot
|
|
23
|
+
# @param id [String] Snapshot ID
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
26
|
+
# @return [SnapshotDto]
|
|
27
|
+
def activate_snapshot(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = activate_snapshot_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Activate a snapshot
|
|
33
|
+
# @param id [String] Snapshot ID
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
36
|
+
# @return [Array<(SnapshotDto, Integer, Hash)>] SnapshotDto data, response status code and response headers
|
|
37
|
+
def activate_snapshot_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.activate_snapshot ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SnapshotsApi.activate_snapshot"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/snapshots/{id}/activate'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
56
|
+
|
|
57
|
+
# form parameters
|
|
58
|
+
form_params = opts[:form_params] || {}
|
|
59
|
+
|
|
60
|
+
# http body (model)
|
|
61
|
+
post_body = opts[:debug_body]
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'SnapshotDto'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"SnapshotsApi.activate_snapshot",
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#activate_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check if an image can be cleaned up
|
|
87
|
+
# @param image_name [String] Image name with tag to check
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
90
|
+
# @return [Boolean]
|
|
91
|
+
def can_cleanup_image(image_name, opts = {})
|
|
92
|
+
data, _status_code, _headers = can_cleanup_image_with_http_info(image_name, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check if an image can be cleaned up
|
|
97
|
+
# @param image_name [String] Image name with tag to check
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
100
|
+
# @return [Array<(Boolean, Integer, Hash)>] Boolean data, response status code and response headers
|
|
101
|
+
def can_cleanup_image_with_http_info(image_name, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.can_cleanup_image ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'image_name' is set
|
|
106
|
+
if @api_client.config.client_side_validation && image_name.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'image_name' when calling SnapshotsApi.can_cleanup_image"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/snapshots/can-cleanup-image'
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
query_params[:'imageName'] = image_name
|
|
115
|
+
|
|
116
|
+
# header parameters
|
|
117
|
+
header_params = opts[:header_params] || {}
|
|
118
|
+
# HTTP header 'Accept' (if needed)
|
|
119
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
120
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type] || 'Boolean'
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"SnapshotsApi.can_cleanup_image",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#can_cleanup_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Create a new snapshot
|
|
152
|
+
# @param create_snapshot [CreateSnapshot]
|
|
153
|
+
# @param [Hash] opts the optional parameters
|
|
154
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
155
|
+
# @return [SnapshotDto]
|
|
156
|
+
def create_snapshot(create_snapshot, opts = {})
|
|
157
|
+
data, _status_code, _headers = create_snapshot_with_http_info(create_snapshot, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Create a new snapshot
|
|
162
|
+
# @param create_snapshot [CreateSnapshot]
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
165
|
+
# @return [Array<(SnapshotDto, Integer, Hash)>] SnapshotDto data, response status code and response headers
|
|
166
|
+
def create_snapshot_with_http_info(create_snapshot, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.create_snapshot ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'create_snapshot' is set
|
|
171
|
+
if @api_client.config.client_side_validation && create_snapshot.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'create_snapshot' when calling SnapshotsApi.create_snapshot"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/snapshots'
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
184
|
+
# HTTP header 'Content-Type'
|
|
185
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
186
|
+
if !content_type.nil?
|
|
187
|
+
header_params['Content-Type'] = content_type
|
|
188
|
+
end
|
|
189
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
190
|
+
|
|
191
|
+
# form parameters
|
|
192
|
+
form_params = opts[:form_params] || {}
|
|
193
|
+
|
|
194
|
+
# http body (model)
|
|
195
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_snapshot)
|
|
196
|
+
|
|
197
|
+
# return_type
|
|
198
|
+
return_type = opts[:debug_return_type] || 'SnapshotDto'
|
|
199
|
+
|
|
200
|
+
# auth_names
|
|
201
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
202
|
+
|
|
203
|
+
new_options = opts.merge(
|
|
204
|
+
:operation => :"SnapshotsApi.create_snapshot",
|
|
205
|
+
:header_params => header_params,
|
|
206
|
+
:query_params => query_params,
|
|
207
|
+
:form_params => form_params,
|
|
208
|
+
:body => post_body,
|
|
209
|
+
:auth_names => auth_names,
|
|
210
|
+
:return_type => return_type
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
214
|
+
if @api_client.config.debugging
|
|
215
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#create_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
216
|
+
end
|
|
217
|
+
return data, status_code, headers
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Deactivate a snapshot
|
|
221
|
+
# @param id [String] Snapshot ID
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
224
|
+
# @return [nil]
|
|
225
|
+
def deactivate_snapshot(id, opts = {})
|
|
226
|
+
deactivate_snapshot_with_http_info(id, opts)
|
|
227
|
+
nil
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Deactivate a snapshot
|
|
231
|
+
# @param id [String] Snapshot ID
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
234
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
235
|
+
def deactivate_snapshot_with_http_info(id, opts = {})
|
|
236
|
+
if @api_client.config.debugging
|
|
237
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.deactivate_snapshot ...'
|
|
238
|
+
end
|
|
239
|
+
# verify the required parameter 'id' is set
|
|
240
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
241
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SnapshotsApi.deactivate_snapshot"
|
|
242
|
+
end
|
|
243
|
+
# resource path
|
|
244
|
+
local_var_path = '/snapshots/{id}/deactivate'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
245
|
+
|
|
246
|
+
# query parameters
|
|
247
|
+
query_params = opts[:query_params] || {}
|
|
248
|
+
|
|
249
|
+
# header parameters
|
|
250
|
+
header_params = opts[:header_params] || {}
|
|
251
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
252
|
+
|
|
253
|
+
# form parameters
|
|
254
|
+
form_params = opts[:form_params] || {}
|
|
255
|
+
|
|
256
|
+
# http body (model)
|
|
257
|
+
post_body = opts[:debug_body]
|
|
258
|
+
|
|
259
|
+
# return_type
|
|
260
|
+
return_type = opts[:debug_return_type]
|
|
261
|
+
|
|
262
|
+
# auth_names
|
|
263
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
264
|
+
|
|
265
|
+
new_options = opts.merge(
|
|
266
|
+
:operation => :"SnapshotsApi.deactivate_snapshot",
|
|
267
|
+
:header_params => header_params,
|
|
268
|
+
:query_params => query_params,
|
|
269
|
+
:form_params => form_params,
|
|
270
|
+
:body => post_body,
|
|
271
|
+
:auth_names => auth_names,
|
|
272
|
+
:return_type => return_type
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
276
|
+
if @api_client.config.debugging
|
|
277
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#deactivate_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
278
|
+
end
|
|
279
|
+
return data, status_code, headers
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# List all snapshots
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
285
|
+
# @option opts [Float] :page Page number of the results (default to 1)
|
|
286
|
+
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
287
|
+
# @option opts [String] :name Filter by partial name match
|
|
288
|
+
# @option opts [String] :sort Field to sort by (default to 'lastUsedAt')
|
|
289
|
+
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
290
|
+
# @return [PaginatedSnapshots]
|
|
291
|
+
def get_all_snapshots(opts = {})
|
|
292
|
+
data, _status_code, _headers = get_all_snapshots_with_http_info(opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# List all snapshots
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
299
|
+
# @option opts [Float] :page Page number of the results (default to 1)
|
|
300
|
+
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
301
|
+
# @option opts [String] :name Filter by partial name match
|
|
302
|
+
# @option opts [String] :sort Field to sort by (default to 'lastUsedAt')
|
|
303
|
+
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
304
|
+
# @return [Array<(PaginatedSnapshots, Integer, Hash)>] PaginatedSnapshots data, response status code and response headers
|
|
305
|
+
def get_all_snapshots_with_http_info(opts = {})
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.get_all_snapshots ...'
|
|
308
|
+
end
|
|
309
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
310
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SnapshotsApi.get_all_snapshots, must be greater than or equal to 1.'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
314
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SnapshotsApi.get_all_snapshots, must be smaller than or equal to 200.'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
318
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SnapshotsApi.get_all_snapshots, must be greater than or equal to 1.'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
allowable_values = ["name", "state", "lastUsedAt", "createdAt"]
|
|
322
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
323
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
324
|
+
end
|
|
325
|
+
allowable_values = ["asc", "desc"]
|
|
326
|
+
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
327
|
+
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
328
|
+
end
|
|
329
|
+
# resource path
|
|
330
|
+
local_var_path = '/snapshots'
|
|
331
|
+
|
|
332
|
+
# query parameters
|
|
333
|
+
query_params = opts[:query_params] || {}
|
|
334
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
335
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
336
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
337
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
338
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
339
|
+
|
|
340
|
+
# header parameters
|
|
341
|
+
header_params = opts[:header_params] || {}
|
|
342
|
+
# HTTP header 'Accept' (if needed)
|
|
343
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
344
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
345
|
+
|
|
346
|
+
# form parameters
|
|
347
|
+
form_params = opts[:form_params] || {}
|
|
348
|
+
|
|
349
|
+
# http body (model)
|
|
350
|
+
post_body = opts[:debug_body]
|
|
351
|
+
|
|
352
|
+
# return_type
|
|
353
|
+
return_type = opts[:debug_return_type] || 'PaginatedSnapshots'
|
|
354
|
+
|
|
355
|
+
# auth_names
|
|
356
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
357
|
+
|
|
358
|
+
new_options = opts.merge(
|
|
359
|
+
:operation => :"SnapshotsApi.get_all_snapshots",
|
|
360
|
+
:header_params => header_params,
|
|
361
|
+
:query_params => query_params,
|
|
362
|
+
:form_params => form_params,
|
|
363
|
+
:body => post_body,
|
|
364
|
+
:auth_names => auth_names,
|
|
365
|
+
:return_type => return_type
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
369
|
+
if @api_client.config.debugging
|
|
370
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#get_all_snapshots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
371
|
+
end
|
|
372
|
+
return data, status_code, headers
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Get snapshot by ID or name
|
|
376
|
+
# @param id [String] Snapshot ID or name
|
|
377
|
+
# @param [Hash] opts the optional parameters
|
|
378
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
379
|
+
# @return [SnapshotDto]
|
|
380
|
+
def get_snapshot(id, opts = {})
|
|
381
|
+
data, _status_code, _headers = get_snapshot_with_http_info(id, opts)
|
|
382
|
+
data
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Get snapshot by ID or name
|
|
386
|
+
# @param id [String] Snapshot ID or name
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
389
|
+
# @return [Array<(SnapshotDto, Integer, Hash)>] SnapshotDto data, response status code and response headers
|
|
390
|
+
def get_snapshot_with_http_info(id, opts = {})
|
|
391
|
+
if @api_client.config.debugging
|
|
392
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.get_snapshot ...'
|
|
393
|
+
end
|
|
394
|
+
# verify the required parameter 'id' is set
|
|
395
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
396
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SnapshotsApi.get_snapshot"
|
|
397
|
+
end
|
|
398
|
+
# resource path
|
|
399
|
+
local_var_path = '/snapshots/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
400
|
+
|
|
401
|
+
# query parameters
|
|
402
|
+
query_params = opts[:query_params] || {}
|
|
403
|
+
|
|
404
|
+
# header parameters
|
|
405
|
+
header_params = opts[:header_params] || {}
|
|
406
|
+
# HTTP header 'Accept' (if needed)
|
|
407
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
408
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
409
|
+
|
|
410
|
+
# form parameters
|
|
411
|
+
form_params = opts[:form_params] || {}
|
|
412
|
+
|
|
413
|
+
# http body (model)
|
|
414
|
+
post_body = opts[:debug_body]
|
|
415
|
+
|
|
416
|
+
# return_type
|
|
417
|
+
return_type = opts[:debug_return_type] || 'SnapshotDto'
|
|
418
|
+
|
|
419
|
+
# auth_names
|
|
420
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
421
|
+
|
|
422
|
+
new_options = opts.merge(
|
|
423
|
+
:operation => :"SnapshotsApi.get_snapshot",
|
|
424
|
+
:header_params => header_params,
|
|
425
|
+
:query_params => query_params,
|
|
426
|
+
:form_params => form_params,
|
|
427
|
+
:body => post_body,
|
|
428
|
+
:auth_names => auth_names,
|
|
429
|
+
:return_type => return_type
|
|
430
|
+
)
|
|
431
|
+
|
|
432
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
433
|
+
if @api_client.config.debugging
|
|
434
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#get_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
435
|
+
end
|
|
436
|
+
return data, status_code, headers
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# Get snapshot build logs
|
|
440
|
+
# @param id [String] Snapshot ID
|
|
441
|
+
# @param [Hash] opts the optional parameters
|
|
442
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
443
|
+
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
444
|
+
# @return [nil]
|
|
445
|
+
def get_snapshot_build_logs(id, opts = {})
|
|
446
|
+
get_snapshot_build_logs_with_http_info(id, opts)
|
|
447
|
+
nil
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Get snapshot build logs
|
|
451
|
+
# @param id [String] Snapshot ID
|
|
452
|
+
# @param [Hash] opts the optional parameters
|
|
453
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
454
|
+
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
455
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
456
|
+
def get_snapshot_build_logs_with_http_info(id, opts = {})
|
|
457
|
+
if @api_client.config.debugging
|
|
458
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.get_snapshot_build_logs ...'
|
|
459
|
+
end
|
|
460
|
+
# verify the required parameter 'id' is set
|
|
461
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
462
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SnapshotsApi.get_snapshot_build_logs"
|
|
463
|
+
end
|
|
464
|
+
# resource path
|
|
465
|
+
local_var_path = '/snapshots/{id}/build-logs'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
466
|
+
|
|
467
|
+
# query parameters
|
|
468
|
+
query_params = opts[:query_params] || {}
|
|
469
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
470
|
+
|
|
471
|
+
# header parameters
|
|
472
|
+
header_params = opts[:header_params] || {}
|
|
473
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
474
|
+
|
|
475
|
+
# form parameters
|
|
476
|
+
form_params = opts[:form_params] || {}
|
|
477
|
+
|
|
478
|
+
# http body (model)
|
|
479
|
+
post_body = opts[:debug_body]
|
|
480
|
+
|
|
481
|
+
# return_type
|
|
482
|
+
return_type = opts[:debug_return_type]
|
|
483
|
+
|
|
484
|
+
# auth_names
|
|
485
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
486
|
+
|
|
487
|
+
new_options = opts.merge(
|
|
488
|
+
:operation => :"SnapshotsApi.get_snapshot_build_logs",
|
|
489
|
+
:header_params => header_params,
|
|
490
|
+
:query_params => query_params,
|
|
491
|
+
:form_params => form_params,
|
|
492
|
+
:body => post_body,
|
|
493
|
+
:auth_names => auth_names,
|
|
494
|
+
:return_type => return_type
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
498
|
+
if @api_client.config.debugging
|
|
499
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#get_snapshot_build_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
500
|
+
end
|
|
501
|
+
return data, status_code, headers
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Delete snapshot
|
|
505
|
+
# @param id [String] Snapshot ID
|
|
506
|
+
# @param [Hash] opts the optional parameters
|
|
507
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
508
|
+
# @return [nil]
|
|
509
|
+
def remove_snapshot(id, opts = {})
|
|
510
|
+
remove_snapshot_with_http_info(id, opts)
|
|
511
|
+
nil
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# Delete snapshot
|
|
515
|
+
# @param id [String] Snapshot ID
|
|
516
|
+
# @param [Hash] opts the optional parameters
|
|
517
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
518
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
519
|
+
def remove_snapshot_with_http_info(id, opts = {})
|
|
520
|
+
if @api_client.config.debugging
|
|
521
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.remove_snapshot ...'
|
|
522
|
+
end
|
|
523
|
+
# verify the required parameter 'id' is set
|
|
524
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
525
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SnapshotsApi.remove_snapshot"
|
|
526
|
+
end
|
|
527
|
+
# resource path
|
|
528
|
+
local_var_path = '/snapshots/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
529
|
+
|
|
530
|
+
# query parameters
|
|
531
|
+
query_params = opts[:query_params] || {}
|
|
532
|
+
|
|
533
|
+
# header parameters
|
|
534
|
+
header_params = opts[:header_params] || {}
|
|
535
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
536
|
+
|
|
537
|
+
# form parameters
|
|
538
|
+
form_params = opts[:form_params] || {}
|
|
539
|
+
|
|
540
|
+
# http body (model)
|
|
541
|
+
post_body = opts[:debug_body]
|
|
542
|
+
|
|
543
|
+
# return_type
|
|
544
|
+
return_type = opts[:debug_return_type]
|
|
545
|
+
|
|
546
|
+
# auth_names
|
|
547
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
548
|
+
|
|
549
|
+
new_options = opts.merge(
|
|
550
|
+
:operation => :"SnapshotsApi.remove_snapshot",
|
|
551
|
+
:header_params => header_params,
|
|
552
|
+
:query_params => query_params,
|
|
553
|
+
:form_params => form_params,
|
|
554
|
+
:body => post_body,
|
|
555
|
+
:auth_names => auth_names,
|
|
556
|
+
:return_type => return_type
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
560
|
+
if @api_client.config.debugging
|
|
561
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#remove_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
562
|
+
end
|
|
563
|
+
return data, status_code, headers
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
# Set snapshot general status
|
|
567
|
+
# @param id [String] Snapshot ID
|
|
568
|
+
# @param set_snapshot_general_status_dto [SetSnapshotGeneralStatusDto]
|
|
569
|
+
# @param [Hash] opts the optional parameters
|
|
570
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
571
|
+
# @return [SnapshotDto]
|
|
572
|
+
def set_snapshot_general_status(id, set_snapshot_general_status_dto, opts = {})
|
|
573
|
+
data, _status_code, _headers = set_snapshot_general_status_with_http_info(id, set_snapshot_general_status_dto, opts)
|
|
574
|
+
data
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# Set snapshot general status
|
|
578
|
+
# @param id [String] Snapshot ID
|
|
579
|
+
# @param set_snapshot_general_status_dto [SetSnapshotGeneralStatusDto]
|
|
580
|
+
# @param [Hash] opts the optional parameters
|
|
581
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
582
|
+
# @return [Array<(SnapshotDto, Integer, Hash)>] SnapshotDto data, response status code and response headers
|
|
583
|
+
def set_snapshot_general_status_with_http_info(id, set_snapshot_general_status_dto, opts = {})
|
|
584
|
+
if @api_client.config.debugging
|
|
585
|
+
@api_client.config.logger.debug 'Calling API: SnapshotsApi.set_snapshot_general_status ...'
|
|
586
|
+
end
|
|
587
|
+
# verify the required parameter 'id' is set
|
|
588
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
589
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SnapshotsApi.set_snapshot_general_status"
|
|
590
|
+
end
|
|
591
|
+
# verify the required parameter 'set_snapshot_general_status_dto' is set
|
|
592
|
+
if @api_client.config.client_side_validation && set_snapshot_general_status_dto.nil?
|
|
593
|
+
fail ArgumentError, "Missing the required parameter 'set_snapshot_general_status_dto' when calling SnapshotsApi.set_snapshot_general_status"
|
|
594
|
+
end
|
|
595
|
+
# resource path
|
|
596
|
+
local_var_path = '/snapshots/{id}/general'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
597
|
+
|
|
598
|
+
# query parameters
|
|
599
|
+
query_params = opts[:query_params] || {}
|
|
600
|
+
|
|
601
|
+
# header parameters
|
|
602
|
+
header_params = opts[:header_params] || {}
|
|
603
|
+
# HTTP header 'Accept' (if needed)
|
|
604
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
605
|
+
# HTTP header 'Content-Type'
|
|
606
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
607
|
+
if !content_type.nil?
|
|
608
|
+
header_params['Content-Type'] = content_type
|
|
609
|
+
end
|
|
610
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
611
|
+
|
|
612
|
+
# form parameters
|
|
613
|
+
form_params = opts[:form_params] || {}
|
|
614
|
+
|
|
615
|
+
# http body (model)
|
|
616
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_snapshot_general_status_dto)
|
|
617
|
+
|
|
618
|
+
# return_type
|
|
619
|
+
return_type = opts[:debug_return_type] || 'SnapshotDto'
|
|
620
|
+
|
|
621
|
+
# auth_names
|
|
622
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
623
|
+
|
|
624
|
+
new_options = opts.merge(
|
|
625
|
+
:operation => :"SnapshotsApi.set_snapshot_general_status",
|
|
626
|
+
:header_params => header_params,
|
|
627
|
+
:query_params => query_params,
|
|
628
|
+
:form_params => form_params,
|
|
629
|
+
:body => post_body,
|
|
630
|
+
:auth_names => auth_names,
|
|
631
|
+
:return_type => return_type
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
635
|
+
if @api_client.config.debugging
|
|
636
|
+
@api_client.config.logger.debug "API called: SnapshotsApi#set_snapshot_general_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
637
|
+
end
|
|
638
|
+
return data, status_code, headers
|
|
639
|
+
end
|
|
640
|
+
end
|
|
641
|
+
end
|