daytona_api_client 0.202.0 → 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.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +4 -4
  5. data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
  6. data/lib/daytona_api_client/api/audit_api.rb +140 -40
  7. data/lib/daytona_api_client/api/config_api.rb +1 -1
  8. data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
  9. data/lib/daytona_api_client/api/health_api.rb +3 -54
  10. data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
  11. data/lib/daytona_api_client/api/organizations_api.rb +265 -1316
  12. data/lib/daytona_api_client/api/preview_api.rb +8 -202
  13. data/lib/daytona_api_client/api/runners_api.rb +22 -412
  14. data/lib/daytona_api_client/api/sandbox_api.rb +434 -2352
  15. data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
  16. data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
  17. data/lib/daytona_api_client/api/users_api.rb +239 -2
  18. data/lib/daytona_api_client/api/volumes_api.rb +2 -2
  19. data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
  20. data/lib/daytona_api_client/api/workspace_api.rb +955 -0
  21. data/lib/daytona_api_client/api_client.rb +4 -8
  22. data/lib/daytona_api_client/api_error.rb +1 -1
  23. data/lib/daytona_api_client/configuration.rb +2 -5
  24. data/lib/daytona_api_client/models/account_provider.rb +74 -3
  25. data/lib/daytona_api_client/models/announcement.rb +74 -3
  26. data/lib/daytona_api_client/models/api_key_list.rb +74 -3
  27. data/lib/daytona_api_client/models/api_key_response.rb +74 -3
  28. data/lib/daytona_api_client/models/audit_log.rb +75 -22
  29. data/lib/daytona_api_client/models/build_info.rb +78 -34
  30. data/lib/daytona_api_client/models/{create_runner_response.rb → command.rb} +104 -23
  31. data/lib/daytona_api_client/models/completion_context.rb +244 -0
  32. data/lib/daytona_api_client/models/completion_item.rb +289 -0
  33. data/lib/daytona_api_client/models/{paginated_traces.rb → completion_list.rb} +106 -91
  34. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
  35. data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
  36. data/lib/daytona_api_client/models/{available_sandbox_class.rb → computer_use_status_response.rb} +97 -86
  37. data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
  38. data/lib/daytona_api_client/models/create_api_key.rb +75 -4
  39. data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
  40. data/lib/daytona_api_client/models/create_build_info.rb +74 -3
  41. data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
  42. data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
  43. data/lib/daytona_api_client/models/create_organization.rb +78 -34
  44. data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
  45. data/lib/daytona_api_client/models/create_organization_quota.rb +78 -26
  46. data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
  47. data/lib/daytona_api_client/models/create_runner.rb +386 -43
  48. data/lib/daytona_api_client/models/create_sandbox.rb +117 -76
  49. data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
  50. data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
  51. data/lib/daytona_api_client/models/create_user.rb +77 -15
  52. data/lib/daytona_api_client/models/create_volume.rb +74 -3
  53. data/lib/daytona_api_client/models/create_workspace.rb +411 -0
  54. data/lib/daytona_api_client/models/daytona_configuration.rb +78 -64
  55. data/lib/daytona_api_client/models/display_info_response.rb +238 -0
  56. data/lib/daytona_api_client/models/docker_registry.rb +76 -5
  57. data/lib/daytona_api_client/models/{paginated_jobs.rb → download_files.rb} +94 -100
  58. data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
  59. data/lib/daytona_api_client/models/execute_response.rb +263 -0
  60. data/lib/daytona_api_client/models/file_info.rb +417 -0
  61. data/lib/daytona_api_client/models/{secret.rb → file_status.rb} +122 -121
  62. data/lib/daytona_api_client/models/git_add_request.rb +264 -0
  63. data/lib/daytona_api_client/models/{admin_create_organization.rb → git_branch_request.rb} +95 -53
  64. data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
  65. data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
  66. data/lib/daytona_api_client/models/{trace_span.rb → git_commit_info.rb} +148 -141
  67. data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
  68. data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
  69. data/lib/daytona_api_client/models/{create_secret.rb → git_delete_branch_request.rb} +106 -59
  70. data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
  71. data/lib/daytona_api_client/models/git_status.rb +290 -0
  72. data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
  73. data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
  74. data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
  75. data/lib/daytona_api_client/models/{create_sandbox_snapshot.rb → keyboard_hotkey_request.rb} +93 -34
  76. data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
  77. data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
  78. data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
  79. data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
  80. data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
  81. data/lib/daytona_api_client/models/lsp_location.rb +261 -0
  82. data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
  83. data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
  84. data/lib/daytona_api_client/models/match.rb +287 -0
  85. data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
  86. data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
  87. data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
  88. data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
  89. data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
  90. data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
  91. data/lib/daytona_api_client/models/mouse_position.rb +263 -0
  92. data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
  93. data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
  94. data/lib/daytona_api_client/models/oidc_config.rb +74 -3
  95. data/lib/daytona_api_client/models/organization.rb +159 -243
  96. data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
  97. data/lib/daytona_api_client/models/organization_role.rb +74 -3
  98. data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
  99. data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
  100. data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
  101. data/lib/daytona_api_client/models/organization_user.rb +76 -5
  102. data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
  103. data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
  104. data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
  105. data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +77 -10
  106. data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
  107. data/lib/daytona_api_client/models/position.rb +261 -0
  108. data/lib/daytona_api_client/models/posthog_config.rb +74 -3
  109. data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
  110. data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
  111. data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
  112. data/lib/daytona_api_client/models/process_status_response.rb +263 -0
  113. data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
  114. data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
  115. data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
  116. data/lib/daytona_api_client/models/{metric_data_point.rb → pty_list_response.rb} +95 -49
  117. data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
  118. data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
  119. data/lib/daytona_api_client/models/range.rb +261 -0
  120. data/lib/daytona_api_client/models/region.rb +78 -181
  121. data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
  122. data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
  123. data/lib/daytona_api_client/models/replace_request.rb +289 -0
  124. data/lib/daytona_api_client/models/{resize_sandbox.rb → replace_result.rb} +95 -84
  125. data/lib/daytona_api_client/models/runner.rb +215 -155
  126. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
  127. data/lib/daytona_api_client/models/runner_state.rb +3 -4
  128. data/lib/daytona_api_client/models/sandbox.rb +101 -164
  129. data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
  130. data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
  131. data/lib/daytona_api_client/models/{create_region.rb → sandbox_info.rb} +113 -38
  132. data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
  133. data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
  134. data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
  135. data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
  136. data/lib/daytona_api_client/models/{runner_service_health.rb → search_files_response.rb} +94 -59
  137. data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
  138. data/lib/daytona_api_client/models/session.rb +251 -0
  139. data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
  140. data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
  141. data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
  142. data/lib/daytona_api_client/models/snapshot_dto.rb +78 -71
  143. data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
  144. data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
  145. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
  146. data/lib/daytona_api_client/models/storage_access_dto.rb +78 -34
  147. data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
  148. data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
  149. data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
  150. data/lib/daytona_api_client/models/update_organization_quota.rb +115 -131
  151. data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
  152. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
  153. data/lib/daytona_api_client/models/user.rb +74 -3
  154. data/lib/daytona_api_client/models/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
  155. data/lib/daytona_api_client/models/user_public_key.rb +74 -3
  156. data/lib/daytona_api_client/models/volume_dto.rb +74 -3
  157. data/lib/daytona_api_client/models/volume_state.rb +3 -4
  158. data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
  159. data/lib/daytona_api_client/models/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
  160. data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
  161. data/lib/daytona_api_client/models/windows_response.rb +265 -0
  162. data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
  163. data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +339 -193
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +76 -74
  166. data/project.json +13 -38
  167. metadata +81 -83
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -163
  170. data/.openapi-generator/VERSION +0 -1
  171. data/.openapi-generator-ignore +0 -31
  172. data/.rspec +0 -2
  173. data/.rubocop.yml +0 -148
  174. data/fix-gemspec.sh +0 -11
  175. data/lib/daytona_api_client/api/admin_api.rb +0 -1615
  176. data/lib/daytona_api_client/api/jobs_api.rb +0 -299
  177. data/lib/daytona_api_client/api/regions_api.rb +0 -77
  178. data/lib/daytona_api_client/api/secret_api.rb +0 -441
  179. data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
  180. data/lib/daytona_api_client/api_model_base.rb +0 -88
  181. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
  182. data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
  183. data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -375
  184. data/lib/daytona_api_client/models/date_filter.rb +0 -178
  185. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  186. data/lib/daytona_api_client/models/gpu_type.rb +0 -44
  187. data/lib/daytona_api_client/models/int_filter.rb +0 -222
  188. data/lib/daytona_api_client/models/job.rb +0 -366
  189. data/lib/daytona_api_client/models/job_status.rb +0 -43
  190. data/lib/daytona_api_client/models/job_type.rb +0 -55
  191. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  192. data/lib/daytona_api_client/models/metric_series.rb +0 -194
  193. data/lib/daytona_api_client/models/metrics_response.rb +0 -167
  194. data/lib/daytona_api_client/models/organization_preview_warning.rb +0 -165
  195. data/lib/daytona_api_client/models/otel_config.rb +0 -188
  196. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  197. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
  198. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  199. data/lib/daytona_api_client/models/region_quota.rb +0 -440
  200. data/lib/daytona_api_client/models/region_type.rb +0 -42
  201. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
  202. data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
  203. data/lib/daytona_api_client/models/runner_class.rb +0 -40
  204. data/lib/daytona_api_client/models/runner_full.rb +0 -757
  205. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
  206. data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
  207. data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
  208. data/lib/daytona_api_client/models/string_filter.rb +0 -182
  209. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  210. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  211. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -302
  212. data/lib/daytona_api_client/models/update_region.rb +0 -171
  213. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
  214. data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
  215. data/lib/daytona_api_client/models/update_secret.rb +0 -170
  216. data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
  217. data/lib/daytona_api_client/models/url.rb +0 -165
  218. data/lib/daytona_api_client/models/warm_pool.rb +0 -490
  219. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@daytona.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -20,38 +20,36 @@ module DaytonaApiClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Archive sandbox
23
- # @param sandbox_id_or_name [String]
23
+ # @param sandbox_id [String]
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
26
- # @return [Sandbox]
27
- def archive_sandbox(sandbox_id_or_name, opts = {})
28
- data, _status_code, _headers = archive_sandbox_with_http_info(sandbox_id_or_name, opts)
29
- data
26
+ # @return [nil]
27
+ def archive_sandbox(sandbox_id, opts = {})
28
+ archive_sandbox_with_http_info(sandbox_id, opts)
29
+ nil
30
30
  end
31
31
 
32
32
  # Archive sandbox
33
- # @param sandbox_id_or_name [String]
33
+ # @param sandbox_id [String]
34
34
  # @param [Hash] opts the optional parameters
35
35
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
36
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
37
- def archive_sandbox_with_http_info(sandbox_id_or_name, opts = {})
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def archive_sandbox_with_http_info(sandbox_id, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: SandboxApi.archive_sandbox ...'
40
40
  end
41
- # verify the required parameter 'sandbox_id_or_name' is set
42
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
43
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.archive_sandbox"
41
+ # verify the required parameter 'sandbox_id' is set
42
+ if @api_client.config.client_side_validation && sandbox_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.archive_sandbox"
44
44
  end
45
45
  # resource path
46
- local_var_path = '/sandbox/{sandboxIdOrName}/archive'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
46
+ local_var_path = '/sandbox/{sandboxId}/archive'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
47
47
 
48
48
  # query parameters
49
49
  query_params = opts[:query_params] || {}
50
50
 
51
51
  # header parameters
52
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
53
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
56
54
 
57
55
  # form parameters
@@ -61,7 +59,7 @@ module DaytonaApiClient
61
59
  post_body = opts[:debug_body]
62
60
 
63
61
  # return_type
64
- return_type = opts[:debug_return_type] || 'Sandbox'
62
+ return_type = opts[:debug_return_type]
65
63
 
66
64
  # auth_names
67
65
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -84,32 +82,30 @@ module DaytonaApiClient
84
82
  end
85
83
 
86
84
  # Create sandbox backup
87
- # Deprecated: backups are managed automatically. This endpoint is a no-op kept for compatibility.
88
- # @param sandbox_id_or_name [String] ID or name of the sandbox
85
+ # @param sandbox_id [String] ID of the sandbox
89
86
  # @param [Hash] opts the optional parameters
90
87
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
91
88
  # @return [Sandbox]
92
- def create_backup(sandbox_id_or_name, opts = {})
93
- data, _status_code, _headers = create_backup_with_http_info(sandbox_id_or_name, opts)
89
+ def create_backup(sandbox_id, opts = {})
90
+ data, _status_code, _headers = create_backup_with_http_info(sandbox_id, opts)
94
91
  data
95
92
  end
96
93
 
97
94
  # Create sandbox backup
98
- # Deprecated: backups are managed automatically. This endpoint is a no-op kept for compatibility.
99
- # @param sandbox_id_or_name [String] ID or name of the sandbox
95
+ # @param sandbox_id [String] ID of the sandbox
100
96
  # @param [Hash] opts the optional parameters
101
97
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
102
98
  # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
103
- def create_backup_with_http_info(sandbox_id_or_name, opts = {})
99
+ def create_backup_with_http_info(sandbox_id, opts = {})
104
100
  if @api_client.config.debugging
105
101
  @api_client.config.logger.debug 'Calling API: SandboxApi.create_backup ...'
106
102
  end
107
- # verify the required parameter 'sandbox_id_or_name' is set
108
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
109
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_backup"
103
+ # verify the required parameter 'sandbox_id' is set
104
+ if @api_client.config.client_side_validation && sandbox_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.create_backup"
110
106
  end
111
107
  # resource path
112
- local_var_path = '/sandbox/{sandboxIdOrName}/backup'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
108
+ local_var_path = '/sandbox/{sandboxId}/backup'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
113
109
 
114
110
  # query parameters
115
111
  query_params = opts[:query_params] || {}
@@ -185,7 +181,7 @@ module DaytonaApiClient
185
181
  # HTTP header 'Content-Type'
186
182
  content_type = @api_client.select_header_content_type(['application/json'])
187
183
  if !content_type.nil?
188
- header_params['Content-Type'] = content_type
184
+ header_params['Content-Type'] = content_type
189
185
  end
190
186
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
191
187
 
@@ -218,108 +214,33 @@ module DaytonaApiClient
218
214
  return data, status_code, headers
219
215
  end
220
216
 
221
- # Create a snapshot from a sandbox
222
- # @param sandbox_id_or_name [String]
223
- # @param create_sandbox_snapshot [CreateSandboxSnapshot]
224
- # @param [Hash] opts the optional parameters
225
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
226
- # @return [Sandbox]
227
- def create_sandbox_snapshot(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
228
- data, _status_code, _headers = create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts)
229
- data
230
- end
231
-
232
- # Create a snapshot from a sandbox
233
- # @param sandbox_id_or_name [String]
234
- # @param create_sandbox_snapshot [CreateSandboxSnapshot]
235
- # @param [Hash] opts the optional parameters
236
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
237
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
238
- def create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
239
- if @api_client.config.debugging
240
- @api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox_snapshot ...'
241
- end
242
- # verify the required parameter 'sandbox_id_or_name' is set
243
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
244
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_sandbox_snapshot"
245
- end
246
- # verify the required parameter 'create_sandbox_snapshot' is set
247
- if @api_client.config.client_side_validation && create_sandbox_snapshot.nil?
248
- fail ArgumentError, "Missing the required parameter 'create_sandbox_snapshot' when calling SandboxApi.create_sandbox_snapshot"
249
- end
250
- # resource path
251
- local_var_path = '/sandbox/{sandboxIdOrName}/snapshot'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
252
-
253
- # query parameters
254
- query_params = opts[:query_params] || {}
255
-
256
- # header parameters
257
- header_params = opts[:header_params] || {}
258
- # HTTP header 'Accept' (if needed)
259
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
260
- # HTTP header 'Content-Type'
261
- content_type = @api_client.select_header_content_type(['application/json'])
262
- if !content_type.nil?
263
- header_params['Content-Type'] = content_type
264
- end
265
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
266
-
267
- # form parameters
268
- form_params = opts[:form_params] || {}
269
-
270
- # http body (model)
271
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_snapshot)
272
-
273
- # return_type
274
- return_type = opts[:debug_return_type] || 'Sandbox'
275
-
276
- # auth_names
277
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
278
-
279
- new_options = opts.merge(
280
- :operation => :"SandboxApi.create_sandbox_snapshot",
281
- :header_params => header_params,
282
- :query_params => query_params,
283
- :form_params => form_params,
284
- :body => post_body,
285
- :auth_names => auth_names,
286
- :return_type => return_type
287
- )
288
-
289
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
290
- if @api_client.config.debugging
291
- @api_client.config.logger.debug "API called: SandboxApi#create_sandbox_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
- end
293
- return data, status_code, headers
294
- end
295
-
296
217
  # Create SSH access for sandbox
297
- # @param sandbox_id_or_name [String] ID or name of the sandbox
218
+ # @param sandbox_id [String] ID of the sandbox
298
219
  # @param [Hash] opts the optional parameters
299
220
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
300
221
  # @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
301
222
  # @return [SshAccessDto]
302
- def create_ssh_access(sandbox_id_or_name, opts = {})
303
- data, _status_code, _headers = create_ssh_access_with_http_info(sandbox_id_or_name, opts)
223
+ def create_ssh_access(sandbox_id, opts = {})
224
+ data, _status_code, _headers = create_ssh_access_with_http_info(sandbox_id, opts)
304
225
  data
305
226
  end
306
227
 
307
228
  # Create SSH access for sandbox
308
- # @param sandbox_id_or_name [String] ID or name of the sandbox
229
+ # @param sandbox_id [String] ID of the sandbox
309
230
  # @param [Hash] opts the optional parameters
310
231
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
311
232
  # @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
312
233
  # @return [Array<(SshAccessDto, Integer, Hash)>] SshAccessDto data, response status code and response headers
313
- def create_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
234
+ def create_ssh_access_with_http_info(sandbox_id, opts = {})
314
235
  if @api_client.config.debugging
315
236
  @api_client.config.logger.debug 'Calling API: SandboxApi.create_ssh_access ...'
316
237
  end
317
- # verify the required parameter 'sandbox_id_or_name' is set
318
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
319
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_ssh_access"
238
+ # verify the required parameter 'sandbox_id' is set
239
+ if @api_client.config.client_side_validation && sandbox_id.nil?
240
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.create_ssh_access"
320
241
  end
321
242
  # resource path
322
- local_var_path = '/sandbox/{sandboxIdOrName}/ssh-access'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
243
+ local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
323
244
 
324
245
  # query parameters
325
246
  query_params = opts[:query_params] || {}
@@ -361,38 +282,36 @@ module DaytonaApiClient
361
282
  end
362
283
 
363
284
  # Delete sandbox
364
- # @param sandbox_id_or_name [String] ID or name of the sandbox
285
+ # @param sandbox_id [String] ID of the sandbox
365
286
  # @param [Hash] opts the optional parameters
366
287
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
367
- # @return [Sandbox]
368
- def delete_sandbox(sandbox_id_or_name, opts = {})
369
- data, _status_code, _headers = delete_sandbox_with_http_info(sandbox_id_or_name, opts)
370
- data
288
+ # @return [nil]
289
+ def delete_sandbox(sandbox_id, opts = {})
290
+ delete_sandbox_with_http_info(sandbox_id, opts)
291
+ nil
371
292
  end
372
293
 
373
294
  # Delete sandbox
374
- # @param sandbox_id_or_name [String] ID or name of the sandbox
295
+ # @param sandbox_id [String] ID of the sandbox
375
296
  # @param [Hash] opts the optional parameters
376
297
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
377
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
378
- def delete_sandbox_with_http_info(sandbox_id_or_name, opts = {})
298
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
299
+ def delete_sandbox_with_http_info(sandbox_id, opts = {})
379
300
  if @api_client.config.debugging
380
301
  @api_client.config.logger.debug 'Calling API: SandboxApi.delete_sandbox ...'
381
302
  end
382
- # verify the required parameter 'sandbox_id_or_name' is set
383
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
384
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.delete_sandbox"
303
+ # verify the required parameter 'sandbox_id' is set
304
+ if @api_client.config.client_side_validation && sandbox_id.nil?
305
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.delete_sandbox"
385
306
  end
386
307
  # resource path
387
- local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
308
+ local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
388
309
 
389
310
  # query parameters
390
311
  query_params = opts[:query_params] || {}
391
312
 
392
313
  # header parameters
393
314
  header_params = opts[:header_params] || {}
394
- # HTTP header 'Accept' (if needed)
395
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
396
315
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
397
316
 
398
317
  # form parameters
@@ -402,7 +321,7 @@ module DaytonaApiClient
402
321
  post_body = opts[:debug_body]
403
322
 
404
323
  # return_type
405
- return_type = opts[:debug_return_type] || 'Sandbox'
324
+ return_type = opts[:debug_return_type]
406
325
 
407
326
  # auth_names
408
327
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -424,46 +343,37 @@ module DaytonaApiClient
424
343
  return data, status_code, headers
425
344
  end
426
345
 
427
- # Expire signed preview URL for a sandbox port
428
- # @param sandbox_id_or_name [String] ID or name of the sandbox
429
- # @param port [Integer] Port number to expire signed preview URL for
430
- # @param token [String] Token to expire signed preview URL for
346
+ # Get build logs
347
+ # @param sandbox_id [String] ID of the sandbox
431
348
  # @param [Hash] opts the optional parameters
432
349
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
350
+ # @option opts [Boolean] :follow Whether to follow the logs stream
433
351
  # @return [nil]
434
- def expire_signed_port_preview_url(sandbox_id_or_name, port, token, opts = {})
435
- expire_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, token, opts)
352
+ def get_build_logs(sandbox_id, opts = {})
353
+ get_build_logs_with_http_info(sandbox_id, opts)
436
354
  nil
437
355
  end
438
356
 
439
- # Expire signed preview URL for a sandbox port
440
- # @param sandbox_id_or_name [String] ID or name of the sandbox
441
- # @param port [Integer] Port number to expire signed preview URL for
442
- # @param token [String] Token to expire signed preview URL for
357
+ # Get build logs
358
+ # @param sandbox_id [String] ID of the sandbox
443
359
  # @param [Hash] opts the optional parameters
444
360
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
361
+ # @option opts [Boolean] :follow Whether to follow the logs stream
445
362
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
446
- def expire_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, token, opts = {})
363
+ def get_build_logs_with_http_info(sandbox_id, opts = {})
447
364
  if @api_client.config.debugging
448
- @api_client.config.logger.debug 'Calling API: SandboxApi.expire_signed_port_preview_url ...'
449
- end
450
- # verify the required parameter 'sandbox_id_or_name' is set
451
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
452
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.expire_signed_port_preview_url"
453
- end
454
- # verify the required parameter 'port' is set
455
- if @api_client.config.client_side_validation && port.nil?
456
- fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.expire_signed_port_preview_url"
365
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
457
366
  end
458
- # verify the required parameter 'token' is set
459
- if @api_client.config.client_side_validation && token.nil?
460
- fail ArgumentError, "Missing the required parameter 'token' when calling SandboxApi.expire_signed_port_preview_url"
367
+ # verify the required parameter 'sandbox_id' is set
368
+ if @api_client.config.client_side_validation && sandbox_id.nil?
369
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_build_logs"
461
370
  end
462
371
  # resource path
463
- local_var_path = '/sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url/{token}/expire'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s)).sub('{' + 'token' + '}', CGI.escape(token.to_s))
372
+ local_var_path = '/sandbox/{sandboxId}/build-logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
464
373
 
465
374
  # query parameters
466
375
  query_params = opts[:query_params] || {}
376
+ query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
467
377
 
468
378
  # header parameters
469
379
  header_params = opts[:header_params] || {}
@@ -482,7 +392,7 @@ module DaytonaApiClient
482
392
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
483
393
 
484
394
  new_options = opts.merge(
485
- :operation => :"SandboxApi.expire_signed_port_preview_url",
395
+ :operation => :"SandboxApi.get_build_logs",
486
396
  :header_params => header_params,
487
397
  :query_params => query_params,
488
398
  :form_params => form_params,
@@ -491,44 +401,44 @@ module DaytonaApiClient
491
401
  :return_type => return_type
492
402
  )
493
403
 
494
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
404
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
495
405
  if @api_client.config.debugging
496
- @api_client.config.logger.debug "API called: SandboxApi#expire_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
406
+ @api_client.config.logger.debug "API called: SandboxApi#get_build_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
407
  end
498
408
  return data, status_code, headers
499
409
  end
500
410
 
501
- # Fork a sandbox
502
- # @param sandbox_id_or_name [String]
503
- # @param fork_sandbox [ForkSandbox]
411
+ # Get preview URL for a sandbox port
412
+ # @param sandbox_id [String] ID of the sandbox
413
+ # @param port [Float] Port number to get preview URL for
504
414
  # @param [Hash] opts the optional parameters
505
415
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
506
- # @return [Sandbox]
507
- def fork_sandbox(sandbox_id_or_name, fork_sandbox, opts = {})
508
- data, _status_code, _headers = fork_sandbox_with_http_info(sandbox_id_or_name, fork_sandbox, opts)
416
+ # @return [PortPreviewUrl]
417
+ def get_port_preview_url(sandbox_id, port, opts = {})
418
+ data, _status_code, _headers = get_port_preview_url_with_http_info(sandbox_id, port, opts)
509
419
  data
510
420
  end
511
421
 
512
- # Fork a sandbox
513
- # @param sandbox_id_or_name [String]
514
- # @param fork_sandbox [ForkSandbox]
422
+ # Get preview URL for a sandbox port
423
+ # @param sandbox_id [String] ID of the sandbox
424
+ # @param port [Float] Port number to get preview URL for
515
425
  # @param [Hash] opts the optional parameters
516
426
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
517
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
518
- def fork_sandbox_with_http_info(sandbox_id_or_name, fork_sandbox, opts = {})
427
+ # @return [Array<(PortPreviewUrl, Integer, Hash)>] PortPreviewUrl data, response status code and response headers
428
+ def get_port_preview_url_with_http_info(sandbox_id, port, opts = {})
519
429
  if @api_client.config.debugging
520
- @api_client.config.logger.debug 'Calling API: SandboxApi.fork_sandbox ...'
430
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
521
431
  end
522
- # verify the required parameter 'sandbox_id_or_name' is set
523
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
524
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.fork_sandbox"
432
+ # verify the required parameter 'sandbox_id' is set
433
+ if @api_client.config.client_side_validation && sandbox_id.nil?
434
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_port_preview_url"
525
435
  end
526
- # verify the required parameter 'fork_sandbox' is set
527
- if @api_client.config.client_side_validation && fork_sandbox.nil?
528
- fail ArgumentError, "Missing the required parameter 'fork_sandbox' when calling SandboxApi.fork_sandbox"
436
+ # verify the required parameter 'port' is set
437
+ if @api_client.config.client_side_validation && port.nil?
438
+ fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_port_preview_url"
529
439
  end
530
440
  # resource path
531
- local_var_path = '/sandbox/{sandboxIdOrName}/fork'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
441
+ local_var_path = '/sandbox/{sandboxId}/ports/{port}/preview-url'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
532
442
 
533
443
  # query parameters
534
444
  query_params = opts[:query_params] || {}
@@ -537,27 +447,22 @@ module DaytonaApiClient
537
447
  header_params = opts[:header_params] || {}
538
448
  # HTTP header 'Accept' (if needed)
539
449
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
540
- # HTTP header 'Content-Type'
541
- content_type = @api_client.select_header_content_type(['application/json'])
542
- if !content_type.nil?
543
- header_params['Content-Type'] = content_type
544
- end
545
450
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
546
451
 
547
452
  # form parameters
548
453
  form_params = opts[:form_params] || {}
549
454
 
550
455
  # http body (model)
551
- post_body = opts[:debug_body] || @api_client.object_to_http_body(fork_sandbox)
456
+ post_body = opts[:debug_body]
552
457
 
553
458
  # return_type
554
- return_type = opts[:debug_return_type] || 'Sandbox'
459
+ return_type = opts[:debug_return_type] || 'PortPreviewUrl'
555
460
 
556
461
  # auth_names
557
462
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
558
463
 
559
464
  new_options = opts.merge(
560
- :operation => :"SandboxApi.fork_sandbox",
465
+ :operation => :"SandboxApi.get_port_preview_url",
561
466
  :header_params => header_params,
562
467
  :query_params => query_params,
563
468
  :form_params => form_params,
@@ -566,49 +471,49 @@ module DaytonaApiClient
566
471
  :return_type => return_type
567
472
  )
568
473
 
569
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
474
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
570
475
  if @api_client.config.debugging
571
- @api_client.config.logger.debug "API called: SandboxApi#fork_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
476
+ @api_client.config.logger.debug "API called: SandboxApi#get_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
572
477
  end
573
478
  return data, status_code, headers
574
479
  end
575
480
 
576
- # Get build logs
577
- # This endpoint is deprecated. Use `getBuildLogsUrl` instead.
578
- # @param sandbox_id_or_name [String] ID or name of the sandbox
481
+ # Get sandbox details
482
+ # @param sandbox_id [String] ID of the sandbox
579
483
  # @param [Hash] opts the optional parameters
580
484
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
581
- # @option opts [Boolean] :follow Whether to follow the logs stream
582
- # @return [nil]
583
- def get_build_logs(sandbox_id_or_name, opts = {})
584
- get_build_logs_with_http_info(sandbox_id_or_name, opts)
585
- nil
485
+ # @option opts [Boolean] :verbose Include verbose output
486
+ # @return [Sandbox]
487
+ def get_sandbox(sandbox_id, opts = {})
488
+ data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id, opts)
489
+ data
586
490
  end
587
491
 
588
- # Get build logs
589
- # This endpoint is deprecated. Use &#x60;getBuildLogsUrl&#x60; instead.
590
- # @param sandbox_id_or_name [String] ID or name of the sandbox
492
+ # Get sandbox details
493
+ # @param sandbox_id [String] ID of the sandbox
591
494
  # @param [Hash] opts the optional parameters
592
495
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
593
- # @option opts [Boolean] :follow Whether to follow the logs stream
594
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
595
- def get_build_logs_with_http_info(sandbox_id_or_name, opts = {})
496
+ # @option opts [Boolean] :verbose Include verbose output
497
+ # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
498
+ def get_sandbox_with_http_info(sandbox_id, opts = {})
596
499
  if @api_client.config.debugging
597
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
500
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
598
501
  end
599
- # verify the required parameter 'sandbox_id_or_name' is set
600
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
601
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_build_logs"
502
+ # verify the required parameter 'sandbox_id' is set
503
+ if @api_client.config.client_side_validation && sandbox_id.nil?
504
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox"
602
505
  end
603
506
  # resource path
604
- local_var_path = '/sandbox/{sandboxIdOrName}/build-logs'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
507
+ local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
605
508
 
606
509
  # query parameters
607
510
  query_params = opts[:query_params] || {}
608
- query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
511
+ query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
609
512
 
610
513
  # header parameters
611
514
  header_params = opts[:header_params] || {}
515
+ # HTTP header 'Accept' (if needed)
516
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
612
517
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
613
518
 
614
519
  # form parameters
@@ -618,13 +523,13 @@ module DaytonaApiClient
618
523
  post_body = opts[:debug_body]
619
524
 
620
525
  # return_type
621
- return_type = opts[:debug_return_type]
526
+ return_type = opts[:debug_return_type] || 'Sandbox'
622
527
 
623
528
  # auth_names
624
529
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
625
530
 
626
531
  new_options = opts.merge(
627
- :operation => :"SandboxApi.get_build_logs",
532
+ :operation => :"SandboxApi.get_sandbox",
628
533
  :header_params => header_params,
629
534
  :query_params => query_params,
630
535
  :form_params => form_params,
@@ -635,36 +540,30 @@ module DaytonaApiClient
635
540
 
636
541
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
637
542
  if @api_client.config.debugging
638
- @api_client.config.logger.debug "API called: SandboxApi#get_build_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
543
+ @api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
639
544
  end
640
545
  return data, status_code, headers
641
546
  end
642
547
 
643
- # Get build logs URL
644
- # @param sandbox_id_or_name [String] ID or name of the sandbox
548
+ # List all regions where sandboxes have been created
645
549
  # @param [Hash] opts the optional parameters
646
550
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
647
- # @return [Url]
648
- def get_build_logs_url(sandbox_id_or_name, opts = {})
649
- data, _status_code, _headers = get_build_logs_url_with_http_info(sandbox_id_or_name, opts)
551
+ # @return [Array<Region>]
552
+ def get_sandbox_regions(opts = {})
553
+ data, _status_code, _headers = get_sandbox_regions_with_http_info(opts)
650
554
  data
651
555
  end
652
556
 
653
- # Get build logs URL
654
- # @param sandbox_id_or_name [String] ID or name of the sandbox
557
+ # List all regions where sandboxes have been created
655
558
  # @param [Hash] opts the optional parameters
656
559
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
657
- # @return [Array<(Url, Integer, Hash)>] Url data, response status code and response headers
658
- def get_build_logs_url_with_http_info(sandbox_id_or_name, opts = {})
560
+ # @return [Array<(Array<Region>, Integer, Hash)>] Array<Region> data, response status code and response headers
561
+ def get_sandbox_regions_with_http_info(opts = {})
659
562
  if @api_client.config.debugging
660
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs_url ...'
661
- end
662
- # verify the required parameter 'sandbox_id_or_name' is set
663
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
664
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_build_logs_url"
563
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_regions ...'
665
564
  end
666
565
  # resource path
667
- local_var_path = '/sandbox/{sandboxIdOrName}/build-logs-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
566
+ local_var_path = '/sandbox/regions'
668
567
 
669
568
  # query parameters
670
569
  query_params = opts[:query_params] || {}
@@ -682,13 +581,13 @@ module DaytonaApiClient
682
581
  post_body = opts[:debug_body]
683
582
 
684
583
  # return_type
685
- return_type = opts[:debug_return_type] || 'Url'
584
+ return_type = opts[:debug_return_type] || 'Array<Region>'
686
585
 
687
586
  # auth_names
688
587
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
689
588
 
690
589
  new_options = opts.merge(
691
- :operation => :"SandboxApi.get_build_logs_url",
590
+ :operation => :"SandboxApi.get_sandbox_regions",
692
591
  :header_params => header_params,
693
592
  :query_params => query_params,
694
593
  :form_params => form_params,
@@ -699,39 +598,39 @@ module DaytonaApiClient
699
598
 
700
599
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
701
600
  if @api_client.config.debugging
702
- @api_client.config.logger.debug "API called: SandboxApi#get_build_logs_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
601
+ @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
703
602
  end
704
603
  return data, status_code, headers
705
604
  end
706
605
 
707
- # Get organization by sandbox ID
708
- # @param sandbox_id [String] ID of the sandbox
606
+ # Get sandboxes for the authenticated runner
709
607
  # @param [Hash] opts the optional parameters
710
608
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
711
- # @return [Organization]
712
- def get_organization_by_sandbox_id(sandbox_id, opts = {})
713
- data, _status_code, _headers = get_organization_by_sandbox_id_with_http_info(sandbox_id, opts)
609
+ # @option opts [String] :states Comma-separated list of sandbox states to filter by
610
+ # @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
611
+ # @return [Array<Sandbox>]
612
+ def get_sandboxes_for_runner(opts = {})
613
+ data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
714
614
  data
715
615
  end
716
616
 
717
- # Get organization by sandbox ID
718
- # @param sandbox_id [String] ID of the sandbox
617
+ # Get sandboxes for the authenticated runner
719
618
  # @param [Hash] opts the optional parameters
720
619
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
721
- # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
722
- def get_organization_by_sandbox_id_with_http_info(sandbox_id, opts = {})
620
+ # @option opts [String] :states Comma-separated list of sandbox states to filter by
621
+ # @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
622
+ # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
623
+ def get_sandboxes_for_runner_with_http_info(opts = {})
723
624
  if @api_client.config.debugging
724
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_organization_by_sandbox_id ...'
725
- end
726
- # verify the required parameter 'sandbox_id' is set
727
- if @api_client.config.client_side_validation && sandbox_id.nil?
728
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_organization_by_sandbox_id"
625
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
729
626
  end
730
627
  # resource path
731
- local_var_path = '/sandbox/{sandboxId}/organization'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
628
+ local_var_path = '/sandbox/for-runner'
732
629
 
733
630
  # query parameters
734
631
  query_params = opts[:query_params] || {}
632
+ query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
633
+ query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
735
634
 
736
635
  # header parameters
737
636
  header_params = opts[:header_params] || {}
@@ -746,13 +645,13 @@ module DaytonaApiClient
746
645
  post_body = opts[:debug_body]
747
646
 
748
647
  # return_type
749
- return_type = opts[:debug_return_type] || 'Organization'
648
+ return_type = opts[:debug_return_type] || 'Array<Sandbox>'
750
649
 
751
650
  # auth_names
752
651
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
753
652
 
754
653
  new_options = opts.merge(
755
- :operation => :"SandboxApi.get_organization_by_sandbox_id",
654
+ :operation => :"SandboxApi.get_sandboxes_for_runner",
756
655
  :header_params => header_params,
757
656
  :query_params => query_params,
758
657
  :form_params => form_params,
@@ -763,45 +662,42 @@ module DaytonaApiClient
763
662
 
764
663
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
765
664
  if @api_client.config.debugging
766
- @api_client.config.logger.debug "API called: SandboxApi#get_organization_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
665
+ @api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
767
666
  end
768
667
  return data, status_code, headers
769
668
  end
770
669
 
771
- # Get preview URL for a sandbox port
772
- # @param sandbox_id_or_name [String] ID or name of the sandbox
773
- # @param port [Float] Port number to get preview URL for
670
+ # List all sandboxes
774
671
  # @param [Hash] opts the optional parameters
775
672
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
776
- # @return [PortPreviewUrl]
777
- def get_port_preview_url(sandbox_id_or_name, port, opts = {})
778
- data, _status_code, _headers = get_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
673
+ # @option opts [Boolean] :verbose Include verbose output
674
+ # @option opts [String] :labels JSON encoded labels to filter by
675
+ # @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
676
+ # @return [Array<Sandbox>]
677
+ def list_sandboxes(opts = {})
678
+ data, _status_code, _headers = list_sandboxes_with_http_info(opts)
779
679
  data
780
680
  end
781
681
 
782
- # Get preview URL for a sandbox port
783
- # @param sandbox_id_or_name [String] ID or name of the sandbox
784
- # @param port [Float] Port number to get preview URL for
682
+ # List all sandboxes
785
683
  # @param [Hash] opts the optional parameters
786
684
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
787
- # @return [Array<(PortPreviewUrl, Integer, Hash)>] PortPreviewUrl data, response status code and response headers
788
- def get_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
685
+ # @option opts [Boolean] :verbose Include verbose output
686
+ # @option opts [String] :labels JSON encoded labels to filter by
687
+ # @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
688
+ # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
689
+ def list_sandboxes_with_http_info(opts = {})
789
690
  if @api_client.config.debugging
790
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
791
- end
792
- # verify the required parameter 'sandbox_id_or_name' is set
793
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
794
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_port_preview_url"
795
- end
796
- # verify the required parameter 'port' is set
797
- if @api_client.config.client_side_validation && port.nil?
798
- fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_port_preview_url"
691
+ @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
799
692
  end
800
693
  # resource path
801
- local_var_path = '/sandbox/{sandboxIdOrName}/ports/{port}/preview-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
694
+ local_var_path = '/sandbox'
802
695
 
803
696
  # query parameters
804
697
  query_params = opts[:query_params] || {}
698
+ query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
699
+ query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
700
+ query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
805
701
 
806
702
  # header parameters
807
703
  header_params = opts[:header_params] || {}
@@ -816,13 +712,13 @@ module DaytonaApiClient
816
712
  post_body = opts[:debug_body]
817
713
 
818
714
  # return_type
819
- return_type = opts[:debug_return_type] || 'PortPreviewUrl'
715
+ return_type = opts[:debug_return_type] || 'Array<Sandbox>'
820
716
 
821
717
  # auth_names
822
718
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
823
719
 
824
720
  new_options = opts.merge(
825
- :operation => :"SandboxApi.get_port_preview_url",
721
+ :operation => :"SandboxApi.list_sandboxes",
826
722
  :header_params => header_params,
827
723
  :query_params => query_params,
828
724
  :form_params => form_params,
@@ -833,1921 +729,135 @@ module DaytonaApiClient
833
729
 
834
730
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
835
731
  if @api_client.config.debugging
836
- @api_client.config.logger.debug "API called: SandboxApi#get_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
732
+ @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
837
733
  end
838
734
  return data, status_code, headers
839
735
  end
840
736
 
841
- # Get region quota by sandbox ID
842
- # @param sandbox_id [String] ID of the sandbox
737
+ # List all sandboxes paginated
843
738
  # @param [Hash] opts the optional parameters
844
739
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
845
- # @return [RegionQuota]
846
- def get_region_quota_by_sandbox_id(sandbox_id, opts = {})
847
- data, _status_code, _headers = get_region_quota_by_sandbox_id_with_http_info(sandbox_id, opts)
740
+ # @option opts [Float] :page Page number of the results (default to 1)
741
+ # @option opts [Float] :limit Number of results per page (default to 100)
742
+ # @option opts [String] :id Filter by partial ID match
743
+ # @option opts [String] :labels JSON encoded labels to filter by
744
+ # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
745
+ # @option opts [Array<String>] :states List of states to filter by
746
+ # @option opts [Array<String>] :snapshots List of snapshot names to filter by
747
+ # @option opts [Array<String>] :regions List of regions to filter by
748
+ # @option opts [Float] :min_cpu Minimum CPU
749
+ # @option opts [Float] :max_cpu Maximum CPU
750
+ # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
751
+ # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
752
+ # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
753
+ # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
754
+ # @option opts [Time] :last_event_after Include items with last event after this timestamp
755
+ # @option opts [Time] :last_event_before Include items with last event before this timestamp
756
+ # @option opts [String] :sort Field to sort by (default to 'createdAt')
757
+ # @option opts [String] :order Direction to sort by (default to 'desc')
758
+ # @return [PaginatedSandboxes]
759
+ def list_sandboxes_paginated(opts = {})
760
+ data, _status_code, _headers = list_sandboxes_paginated_with_http_info(opts)
848
761
  data
849
762
  end
850
763
 
851
- # Get region quota by sandbox ID
852
- # @param sandbox_id [String] ID of the sandbox
764
+ # List all sandboxes paginated
853
765
  # @param [Hash] opts the optional parameters
854
766
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
855
- # @return [Array<(RegionQuota, Integer, Hash)>] RegionQuota data, response status code and response headers
856
- def get_region_quota_by_sandbox_id_with_http_info(sandbox_id, opts = {})
857
- if @api_client.config.debugging
858
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_region_quota_by_sandbox_id ...'
859
- end
860
- # verify the required parameter 'sandbox_id' is set
861
- if @api_client.config.client_side_validation && sandbox_id.nil?
862
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_region_quota_by_sandbox_id"
863
- end
864
- # resource path
865
- local_var_path = '/sandbox/{sandboxId}/region-quota'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
866
-
867
- # query parameters
868
- query_params = opts[:query_params] || {}
869
-
870
- # header parameters
871
- header_params = opts[:header_params] || {}
872
- # HTTP header 'Accept' (if needed)
873
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
874
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
875
-
876
- # form parameters
877
- form_params = opts[:form_params] || {}
878
-
879
- # http body (model)
880
- post_body = opts[:debug_body]
881
-
882
- # return_type
883
- return_type = opts[:debug_return_type] || 'RegionQuota'
884
-
885
- # auth_names
886
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
887
-
888
- new_options = opts.merge(
889
- :operation => :"SandboxApi.get_region_quota_by_sandbox_id",
890
- :header_params => header_params,
891
- :query_params => query_params,
892
- :form_params => form_params,
893
- :body => post_body,
894
- :auth_names => auth_names,
895
- :return_type => return_type
896
- )
897
-
898
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
899
- if @api_client.config.debugging
900
- @api_client.config.logger.debug "API called: SandboxApi#get_region_quota_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
901
- end
902
- return data, status_code, headers
903
- end
904
-
905
- # Get sandbox details
906
- # @param sandbox_id_or_name [String] ID or name of the sandbox
907
- # @param [Hash] opts the optional parameters
908
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
909
- # @option opts [Boolean] :verbose Include verbose output
910
- # @return [Sandbox]
911
- def get_sandbox(sandbox_id_or_name, opts = {})
912
- data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id_or_name, opts)
913
- data
914
- end
915
-
916
- # Get sandbox details
917
- # @param sandbox_id_or_name [String] ID or name of the sandbox
918
- # @param [Hash] opts the optional parameters
919
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
920
- # @option opts [Boolean] :verbose Include verbose output
921
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
922
- def get_sandbox_with_http_info(sandbox_id_or_name, opts = {})
923
- if @api_client.config.debugging
924
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
925
- end
926
- # verify the required parameter 'sandbox_id_or_name' is set
927
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
928
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox"
929
- end
930
- # resource path
931
- local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
932
-
933
- # query parameters
934
- query_params = opts[:query_params] || {}
935
- query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
936
-
937
- # header parameters
938
- header_params = opts[:header_params] || {}
939
- # HTTP header 'Accept' (if needed)
940
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
941
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
942
-
943
- # form parameters
944
- form_params = opts[:form_params] || {}
945
-
946
- # http body (model)
947
- post_body = opts[:debug_body]
948
-
949
- # return_type
950
- return_type = opts[:debug_return_type] || 'Sandbox'
951
-
952
- # auth_names
953
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
954
-
955
- new_options = opts.merge(
956
- :operation => :"SandboxApi.get_sandbox",
957
- :header_params => header_params,
958
- :query_params => query_params,
959
- :form_params => form_params,
960
- :body => post_body,
961
- :auth_names => auth_names,
962
- :return_type => return_type
963
- )
964
-
965
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
966
- if @api_client.config.debugging
967
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
968
- end
969
- return data, status_code, headers
970
- end
971
-
972
- # Get sandbox fork ancestor chain
973
- # @param sandbox_id_or_name [String]
974
- # @param [Hash] opts the optional parameters
975
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
976
- # @return [Array<Sandbox>]
977
- def get_sandbox_ancestors(sandbox_id_or_name, opts = {})
978
- data, _status_code, _headers = get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts)
979
- data
980
- end
981
-
982
- # Get sandbox fork ancestor chain
983
- # @param sandbox_id_or_name [String]
984
- # @param [Hash] opts the optional parameters
985
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
986
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
987
- def get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts = {})
988
- if @api_client.config.debugging
989
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_ancestors ...'
990
- end
991
- # verify the required parameter 'sandbox_id_or_name' is set
992
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
993
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_ancestors"
994
- end
995
- # resource path
996
- local_var_path = '/sandbox/{sandboxIdOrName}/ancestors'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
997
-
998
- # query parameters
999
- query_params = opts[:query_params] || {}
1000
-
1001
- # header parameters
1002
- header_params = opts[:header_params] || {}
1003
- # HTTP header 'Accept' (if needed)
1004
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1005
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1006
-
1007
- # form parameters
1008
- form_params = opts[:form_params] || {}
1009
-
1010
- # http body (model)
1011
- post_body = opts[:debug_body]
1012
-
1013
- # return_type
1014
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1015
-
1016
- # auth_names
1017
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1018
-
1019
- new_options = opts.merge(
1020
- :operation => :"SandboxApi.get_sandbox_ancestors",
1021
- :header_params => header_params,
1022
- :query_params => query_params,
1023
- :form_params => form_params,
1024
- :body => post_body,
1025
- :auth_names => auth_names,
1026
- :return_type => return_type
1027
- )
1028
-
1029
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1030
- if @api_client.config.debugging
1031
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_ancestors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1032
- end
1033
- return data, status_code, headers
1034
- end
1035
-
1036
- # Get sandbox fork children
1037
- # @param sandbox_id_or_name [String]
1038
- # @param [Hash] opts the optional parameters
1039
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1040
- # @option opts [Boolean] :include_destroyed
1041
- # @return [Array<Sandbox>]
1042
- def get_sandbox_forks(sandbox_id_or_name, opts = {})
1043
- data, _status_code, _headers = get_sandbox_forks_with_http_info(sandbox_id_or_name, opts)
1044
- data
1045
- end
1046
-
1047
- # Get sandbox fork children
1048
- # @param sandbox_id_or_name [String]
1049
- # @param [Hash] opts the optional parameters
1050
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1051
- # @option opts [Boolean] :include_destroyed
1052
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
1053
- def get_sandbox_forks_with_http_info(sandbox_id_or_name, opts = {})
1054
- if @api_client.config.debugging
1055
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_forks ...'
1056
- end
1057
- # verify the required parameter 'sandbox_id_or_name' is set
1058
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1059
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_forks"
1060
- end
1061
- # resource path
1062
- local_var_path = '/sandbox/{sandboxIdOrName}/forks'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1063
-
1064
- # query parameters
1065
- query_params = opts[:query_params] || {}
1066
- query_params[:'includeDestroyed'] = opts[:'include_destroyed'] if !opts[:'include_destroyed'].nil?
1067
-
1068
- # header parameters
1069
- header_params = opts[:header_params] || {}
1070
- # HTTP header 'Accept' (if needed)
1071
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1072
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1073
-
1074
- # form parameters
1075
- form_params = opts[:form_params] || {}
1076
-
1077
- # http body (model)
1078
- post_body = opts[:debug_body]
1079
-
1080
- # return_type
1081
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1082
-
1083
- # auth_names
1084
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1085
-
1086
- new_options = opts.merge(
1087
- :operation => :"SandboxApi.get_sandbox_forks",
1088
- :header_params => header_params,
1089
- :query_params => query_params,
1090
- :form_params => form_params,
1091
- :body => post_body,
1092
- :auth_names => auth_names,
1093
- :return_type => return_type
1094
- )
1095
-
1096
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1097
- if @api_client.config.debugging
1098
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_forks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1099
- end
1100
- return data, status_code, headers
1101
- end
1102
-
1103
- # Get sandbox logs
1104
- # Retrieve OTEL logs for a sandbox within a time range
1105
- # @param sandbox_id [String] ID of the sandbox
1106
- # @param from [Time] Start of time range (ISO 8601)
1107
- # @param to [Time] End of time range (ISO 8601)
1108
- # @param [Hash] opts the optional parameters
1109
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1110
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1111
- # @option opts [Float] :limit Number of items per page (default to 100)
1112
- # @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
1113
- # @option opts [String] :search Search in log body
1114
- # @return [PaginatedLogs]
1115
- def get_sandbox_logs(sandbox_id, from, to, opts = {})
1116
- data, _status_code, _headers = get_sandbox_logs_with_http_info(sandbox_id, from, to, opts)
1117
- data
1118
- end
1119
-
1120
- # Get sandbox logs
1121
- # Retrieve OTEL logs for a sandbox within a time range
1122
- # @param sandbox_id [String] ID of the sandbox
1123
- # @param from [Time] Start of time range (ISO 8601)
1124
- # @param to [Time] End of time range (ISO 8601)
1125
- # @param [Hash] opts the optional parameters
1126
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1127
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1128
- # @option opts [Float] :limit Number of items per page (default to 100)
1129
- # @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
1130
- # @option opts [String] :search Search in log body
1131
- # @return [Array<(PaginatedLogs, Integer, Hash)>] PaginatedLogs data, response status code and response headers
1132
- def get_sandbox_logs_with_http_info(sandbox_id, from, to, opts = {})
1133
- if @api_client.config.debugging
1134
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_logs ...'
1135
- end
1136
- # verify the required parameter 'sandbox_id' is set
1137
- if @api_client.config.client_side_validation && sandbox_id.nil?
1138
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_logs"
1139
- end
1140
- # verify the required parameter 'from' is set
1141
- if @api_client.config.client_side_validation && from.nil?
1142
- fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_logs"
1143
- end
1144
- # verify the required parameter 'to' is set
1145
- if @api_client.config.client_side_validation && to.nil?
1146
- fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_logs"
1147
- end
1148
- # resource path
1149
- local_var_path = '/sandbox/{sandboxId}/telemetry/logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1150
-
1151
- # query parameters
1152
- query_params = opts[:query_params] || {}
1153
- query_params[:'from'] = from
1154
- query_params[:'to'] = to
1155
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1156
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1157
- query_params[:'severities'] = @api_client.build_collection_param(opts[:'severities'], :multi) if !opts[:'severities'].nil?
1158
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1159
-
1160
- # header parameters
1161
- header_params = opts[:header_params] || {}
1162
- # HTTP header 'Accept' (if needed)
1163
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1164
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1165
-
1166
- # form parameters
1167
- form_params = opts[:form_params] || {}
1168
-
1169
- # http body (model)
1170
- post_body = opts[:debug_body]
1171
-
1172
- # return_type
1173
- return_type = opts[:debug_return_type] || 'PaginatedLogs'
1174
-
1175
- # auth_names
1176
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1177
-
1178
- new_options = opts.merge(
1179
- :operation => :"SandboxApi.get_sandbox_logs",
1180
- :header_params => header_params,
1181
- :query_params => query_params,
1182
- :form_params => form_params,
1183
- :body => post_body,
1184
- :auth_names => auth_names,
1185
- :return_type => return_type
1186
- )
1187
-
1188
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1189
- if @api_client.config.debugging
1190
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1191
- end
1192
- return data, status_code, headers
1193
- end
1194
-
1195
- # Get sandbox metrics
1196
- # Retrieve OTEL metrics for a sandbox within a time range
1197
- # @param sandbox_id [String] ID of the sandbox
1198
- # @param from [Time] Start of time range (ISO 8601)
1199
- # @param to [Time] End of time range (ISO 8601)
1200
- # @param [Hash] opts the optional parameters
1201
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1202
- # @option opts [Array<String>] :metric_names Filter by metric names
1203
- # @return [MetricsResponse]
1204
- def get_sandbox_metrics(sandbox_id, from, to, opts = {})
1205
- data, _status_code, _headers = get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts)
1206
- data
1207
- end
1208
-
1209
- # Get sandbox metrics
1210
- # Retrieve OTEL metrics for a sandbox within a time range
1211
- # @param sandbox_id [String] ID of the sandbox
1212
- # @param from [Time] Start of time range (ISO 8601)
1213
- # @param to [Time] End of time range (ISO 8601)
1214
- # @param [Hash] opts the optional parameters
1215
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1216
- # @option opts [Array<String>] :metric_names Filter by metric names
1217
- # @return [Array<(MetricsResponse, Integer, Hash)>] MetricsResponse data, response status code and response headers
1218
- def get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts = {})
1219
- if @api_client.config.debugging
1220
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_metrics ...'
1221
- end
1222
- # verify the required parameter 'sandbox_id' is set
1223
- if @api_client.config.client_side_validation && sandbox_id.nil?
1224
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_metrics"
1225
- end
1226
- # verify the required parameter 'from' is set
1227
- if @api_client.config.client_side_validation && from.nil?
1228
- fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_metrics"
1229
- end
1230
- # verify the required parameter 'to' is set
1231
- if @api_client.config.client_side_validation && to.nil?
1232
- fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_metrics"
1233
- end
1234
- # resource path
1235
- local_var_path = '/sandbox/{sandboxId}/telemetry/metrics'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1236
-
1237
- # query parameters
1238
- query_params = opts[:query_params] || {}
1239
- query_params[:'from'] = from
1240
- query_params[:'to'] = to
1241
- query_params[:'metricNames'] = @api_client.build_collection_param(opts[:'metric_names'], :multi) if !opts[:'metric_names'].nil?
1242
-
1243
- # header parameters
1244
- header_params = opts[:header_params] || {}
1245
- # HTTP header 'Accept' (if needed)
1246
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1247
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1248
-
1249
- # form parameters
1250
- form_params = opts[:form_params] || {}
1251
-
1252
- # http body (model)
1253
- post_body = opts[:debug_body]
1254
-
1255
- # return_type
1256
- return_type = opts[:debug_return_type] || 'MetricsResponse'
1257
-
1258
- # auth_names
1259
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1260
-
1261
- new_options = opts.merge(
1262
- :operation => :"SandboxApi.get_sandbox_metrics",
1263
- :header_params => header_params,
1264
- :query_params => query_params,
1265
- :form_params => form_params,
1266
- :body => post_body,
1267
- :auth_names => auth_names,
1268
- :return_type => return_type
1269
- )
1270
-
1271
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1272
- if @api_client.config.debugging
1273
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1274
- end
1275
- return data, status_code, headers
1276
- end
1277
-
1278
- # Get sandbox fork parent
1279
- # @param sandbox_id_or_name [String]
1280
- # @param [Hash] opts the optional parameters
1281
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1282
- # @return [Sandbox]
1283
- def get_sandbox_parent(sandbox_id_or_name, opts = {})
1284
- data, _status_code, _headers = get_sandbox_parent_with_http_info(sandbox_id_or_name, opts)
1285
- data
1286
- end
1287
-
1288
- # Get sandbox fork parent
1289
- # @param sandbox_id_or_name [String]
1290
- # @param [Hash] opts the optional parameters
1291
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1292
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
1293
- def get_sandbox_parent_with_http_info(sandbox_id_or_name, opts = {})
1294
- if @api_client.config.debugging
1295
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_parent ...'
1296
- end
1297
- # verify the required parameter 'sandbox_id_or_name' is set
1298
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1299
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_parent"
1300
- end
1301
- # resource path
1302
- local_var_path = '/sandbox/{sandboxIdOrName}/parent'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1303
-
1304
- # query parameters
1305
- query_params = opts[:query_params] || {}
1306
-
1307
- # header parameters
1308
- header_params = opts[:header_params] || {}
1309
- # HTTP header 'Accept' (if needed)
1310
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1311
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1312
-
1313
- # form parameters
1314
- form_params = opts[:form_params] || {}
1315
-
1316
- # http body (model)
1317
- post_body = opts[:debug_body]
1318
-
1319
- # return_type
1320
- return_type = opts[:debug_return_type] || 'Sandbox'
1321
-
1322
- # auth_names
1323
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1324
-
1325
- new_options = opts.merge(
1326
- :operation => :"SandboxApi.get_sandbox_parent",
1327
- :header_params => header_params,
1328
- :query_params => query_params,
1329
- :form_params => form_params,
1330
- :body => post_body,
1331
- :auth_names => auth_names,
1332
- :return_type => return_type
1333
- )
1334
-
1335
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1336
- if @api_client.config.debugging
1337
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_parent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1338
- end
1339
- return data, status_code, headers
1340
- end
1341
-
1342
- # Get the signing key for a sandbox
1343
- # @param sandbox_id [String] ID of the sandbox
1344
- # @param [Hash] opts the optional parameters
1345
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1346
- # @return [String]
1347
- def get_sandbox_signing_key(sandbox_id, opts = {})
1348
- data, _status_code, _headers = get_sandbox_signing_key_with_http_info(sandbox_id, opts)
1349
- data
1350
- end
1351
-
1352
- # Get the signing key for a sandbox
1353
- # @param sandbox_id [String] ID of the sandbox
1354
- # @param [Hash] opts the optional parameters
1355
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1356
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
1357
- def get_sandbox_signing_key_with_http_info(sandbox_id, opts = {})
1358
- if @api_client.config.debugging
1359
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_signing_key ...'
1360
- end
1361
- # verify the required parameter 'sandbox_id' is set
1362
- if @api_client.config.client_side_validation && sandbox_id.nil?
1363
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_signing_key"
1364
- end
1365
- # resource path
1366
- local_var_path = '/sandbox/{sandboxId}/signing-key'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1367
-
1368
- # query parameters
1369
- query_params = opts[:query_params] || {}
1370
-
1371
- # header parameters
1372
- header_params = opts[:header_params] || {}
1373
- # HTTP header 'Accept' (if needed)
1374
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1375
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1376
-
1377
- # form parameters
1378
- form_params = opts[:form_params] || {}
1379
-
1380
- # http body (model)
1381
- post_body = opts[:debug_body]
1382
-
1383
- # return_type
1384
- return_type = opts[:debug_return_type] || 'String'
1385
-
1386
- # auth_names
1387
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1388
-
1389
- new_options = opts.merge(
1390
- :operation => :"SandboxApi.get_sandbox_signing_key",
1391
- :header_params => header_params,
1392
- :query_params => query_params,
1393
- :form_params => form_params,
1394
- :body => post_body,
1395
- :auth_names => auth_names,
1396
- :return_type => return_type
1397
- )
1398
-
1399
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1400
- if @api_client.config.debugging
1401
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_signing_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1402
- end
1403
- return data, status_code, headers
1404
- end
1405
-
1406
- # Get trace spans
1407
- # Retrieve all spans for a specific trace
1408
- # @param sandbox_id [String] ID of the sandbox
1409
- # @param trace_id [String] ID of the trace
1410
- # @param [Hash] opts the optional parameters
1411
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1412
- # @return [Array<TraceSpan>]
1413
- def get_sandbox_trace_spans(sandbox_id, trace_id, opts = {})
1414
- data, _status_code, _headers = get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts)
1415
- data
1416
- end
1417
-
1418
- # Get trace spans
1419
- # Retrieve all spans for a specific trace
1420
- # @param sandbox_id [String] ID of the sandbox
1421
- # @param trace_id [String] ID of the trace
1422
- # @param [Hash] opts the optional parameters
1423
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1424
- # @return [Array<(Array<TraceSpan>, Integer, Hash)>] Array<TraceSpan> data, response status code and response headers
1425
- def get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts = {})
1426
- if @api_client.config.debugging
1427
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_trace_spans ...'
1428
- end
1429
- # verify the required parameter 'sandbox_id' is set
1430
- if @api_client.config.client_side_validation && sandbox_id.nil?
1431
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_trace_spans"
1432
- end
1433
- # verify the required parameter 'trace_id' is set
1434
- if @api_client.config.client_side_validation && trace_id.nil?
1435
- fail ArgumentError, "Missing the required parameter 'trace_id' when calling SandboxApi.get_sandbox_trace_spans"
1436
- end
1437
- # resource path
1438
- local_var_path = '/sandbox/{sandboxId}/telemetry/traces/{traceId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'traceId' + '}', CGI.escape(trace_id.to_s))
1439
-
1440
- # query parameters
1441
- query_params = opts[:query_params] || {}
1442
-
1443
- # header parameters
1444
- header_params = opts[:header_params] || {}
1445
- # HTTP header 'Accept' (if needed)
1446
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1447
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1448
-
1449
- # form parameters
1450
- form_params = opts[:form_params] || {}
1451
-
1452
- # http body (model)
1453
- post_body = opts[:debug_body]
1454
-
1455
- # return_type
1456
- return_type = opts[:debug_return_type] || 'Array<TraceSpan>'
1457
-
1458
- # auth_names
1459
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1460
-
1461
- new_options = opts.merge(
1462
- :operation => :"SandboxApi.get_sandbox_trace_spans",
1463
- :header_params => header_params,
1464
- :query_params => query_params,
1465
- :form_params => form_params,
1466
- :body => post_body,
1467
- :auth_names => auth_names,
1468
- :return_type => return_type
1469
- )
1470
-
1471
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1472
- if @api_client.config.debugging
1473
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_trace_spans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1474
- end
1475
- return data, status_code, headers
1476
- end
1477
-
1478
- # Get sandbox traces
1479
- # Retrieve OTEL traces for a sandbox within a time range
1480
- # @param sandbox_id [String] ID of the sandbox
1481
- # @param from [Time] Start of time range (ISO 8601)
1482
- # @param to [Time] End of time range (ISO 8601)
1483
- # @param [Hash] opts the optional parameters
1484
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1485
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1486
- # @option opts [Float] :limit Number of items per page (default to 100)
1487
- # @return [PaginatedTraces]
1488
- def get_sandbox_traces(sandbox_id, from, to, opts = {})
1489
- data, _status_code, _headers = get_sandbox_traces_with_http_info(sandbox_id, from, to, opts)
1490
- data
1491
- end
1492
-
1493
- # Get sandbox traces
1494
- # Retrieve OTEL traces for a sandbox within a time range
1495
- # @param sandbox_id [String] ID of the sandbox
1496
- # @param from [Time] Start of time range (ISO 8601)
1497
- # @param to [Time] End of time range (ISO 8601)
1498
- # @param [Hash] opts the optional parameters
1499
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1500
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1501
- # @option opts [Float] :limit Number of items per page (default to 100)
1502
- # @return [Array<(PaginatedTraces, Integer, Hash)>] PaginatedTraces data, response status code and response headers
1503
- def get_sandbox_traces_with_http_info(sandbox_id, from, to, opts = {})
1504
- if @api_client.config.debugging
1505
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_traces ...'
1506
- end
1507
- # verify the required parameter 'sandbox_id' is set
1508
- if @api_client.config.client_side_validation && sandbox_id.nil?
1509
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_traces"
1510
- end
1511
- # verify the required parameter 'from' is set
1512
- if @api_client.config.client_side_validation && from.nil?
1513
- fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_traces"
1514
- end
1515
- # verify the required parameter 'to' is set
1516
- if @api_client.config.client_side_validation && to.nil?
1517
- fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_traces"
1518
- end
1519
- # resource path
1520
- local_var_path = '/sandbox/{sandboxId}/telemetry/traces'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1521
-
1522
- # query parameters
1523
- query_params = opts[:query_params] || {}
1524
- query_params[:'from'] = from
1525
- query_params[:'to'] = to
1526
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1527
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1528
-
1529
- # header parameters
1530
- header_params = opts[:header_params] || {}
1531
- # HTTP header 'Accept' (if needed)
1532
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1533
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1534
-
1535
- # form parameters
1536
- form_params = opts[:form_params] || {}
1537
-
1538
- # http body (model)
1539
- post_body = opts[:debug_body]
1540
-
1541
- # return_type
1542
- return_type = opts[:debug_return_type] || 'PaginatedTraces'
1543
-
1544
- # auth_names
1545
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1546
-
1547
- new_options = opts.merge(
1548
- :operation => :"SandboxApi.get_sandbox_traces",
1549
- :header_params => header_params,
1550
- :query_params => query_params,
1551
- :form_params => form_params,
1552
- :body => post_body,
1553
- :auth_names => auth_names,
1554
- :return_type => return_type
1555
- )
1556
-
1557
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1558
- if @api_client.config.debugging
1559
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_traces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1560
- end
1561
- return data, status_code, headers
1562
- end
1563
-
1564
- # Get sandboxes for the authenticated runner
1565
- # @param [Hash] opts the optional parameters
1566
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1567
- # @option opts [String] :states Comma-separated list of sandbox states to filter by
1568
- # @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
1569
- # @return [Array<Sandbox>]
1570
- def get_sandboxes_for_runner(opts = {})
1571
- data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
1572
- data
1573
- end
1574
-
1575
- # Get sandboxes for the authenticated runner
1576
- # @param [Hash] opts the optional parameters
1577
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1578
- # @option opts [String] :states Comma-separated list of sandbox states to filter by
1579
- # @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
1580
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
1581
- def get_sandboxes_for_runner_with_http_info(opts = {})
1582
- if @api_client.config.debugging
1583
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
1584
- end
1585
- # resource path
1586
- local_var_path = '/sandbox/for-runner'
1587
-
1588
- # query parameters
1589
- query_params = opts[:query_params] || {}
1590
- query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
1591
- query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
1592
-
1593
- # header parameters
1594
- header_params = opts[:header_params] || {}
1595
- # HTTP header 'Accept' (if needed)
1596
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1597
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1598
-
1599
- # form parameters
1600
- form_params = opts[:form_params] || {}
1601
-
1602
- # http body (model)
1603
- post_body = opts[:debug_body]
1604
-
1605
- # return_type
1606
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1607
-
1608
- # auth_names
1609
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1610
-
1611
- new_options = opts.merge(
1612
- :operation => :"SandboxApi.get_sandboxes_for_runner",
1613
- :header_params => header_params,
1614
- :query_params => query_params,
1615
- :form_params => form_params,
1616
- :body => post_body,
1617
- :auth_names => auth_names,
1618
- :return_type => return_type
1619
- )
1620
-
1621
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1622
- if @api_client.config.debugging
1623
- @api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1624
- end
1625
- return data, status_code, headers
1626
- end
1627
-
1628
- # Get signed preview URL for a sandbox port
1629
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1630
- # @param port [Integer] Port number to get signed preview URL for
1631
- # @param [Hash] opts the optional parameters
1632
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1633
- # @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
1634
- # @return [SignedPortPreviewUrl]
1635
- def get_signed_port_preview_url(sandbox_id_or_name, port, opts = {})
1636
- data, _status_code, _headers = get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
1637
- data
1638
- end
1639
-
1640
- # Get signed preview URL for a sandbox port
1641
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1642
- # @param port [Integer] Port number to get signed preview URL for
1643
- # @param [Hash] opts the optional parameters
1644
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1645
- # @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
1646
- # @return [Array<(SignedPortPreviewUrl, Integer, Hash)>] SignedPortPreviewUrl data, response status code and response headers
1647
- def get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
1648
- if @api_client.config.debugging
1649
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_signed_port_preview_url ...'
1650
- end
1651
- # verify the required parameter 'sandbox_id_or_name' is set
1652
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1653
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_signed_port_preview_url"
1654
- end
1655
- # verify the required parameter 'port' is set
1656
- if @api_client.config.client_side_validation && port.nil?
1657
- fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_signed_port_preview_url"
1658
- end
1659
- # resource path
1660
- local_var_path = '/sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
1661
-
1662
- # query parameters
1663
- query_params = opts[:query_params] || {}
1664
- query_params[:'expiresInSeconds'] = opts[:'expires_in_seconds'] if !opts[:'expires_in_seconds'].nil?
1665
-
1666
- # header parameters
1667
- header_params = opts[:header_params] || {}
1668
- # HTTP header 'Accept' (if needed)
1669
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1670
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1671
-
1672
- # form parameters
1673
- form_params = opts[:form_params] || {}
1674
-
1675
- # http body (model)
1676
- post_body = opts[:debug_body]
1677
-
1678
- # return_type
1679
- return_type = opts[:debug_return_type] || 'SignedPortPreviewUrl'
1680
-
1681
- # auth_names
1682
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1683
-
1684
- new_options = opts.merge(
1685
- :operation => :"SandboxApi.get_signed_port_preview_url",
1686
- :header_params => header_params,
1687
- :query_params => query_params,
1688
- :form_params => form_params,
1689
- :body => post_body,
1690
- :auth_names => auth_names,
1691
- :return_type => return_type
1692
- )
1693
-
1694
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1695
- if @api_client.config.debugging
1696
- @api_client.config.logger.debug "API called: SandboxApi#get_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1697
- end
1698
- return data, status_code, headers
1699
- end
1700
-
1701
- # Get toolbox proxy URL for a sandbox
1702
- # @param sandbox_id [String] ID of the sandbox
1703
- # @param [Hash] opts the optional parameters
1704
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1705
- # @return [ToolboxProxyUrl]
1706
- def get_toolbox_proxy_url(sandbox_id, opts = {})
1707
- data, _status_code, _headers = get_toolbox_proxy_url_with_http_info(sandbox_id, opts)
1708
- data
1709
- end
1710
-
1711
- # Get toolbox proxy URL for a sandbox
1712
- # @param sandbox_id [String] ID of the sandbox
1713
- # @param [Hash] opts the optional parameters
1714
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1715
- # @return [Array<(ToolboxProxyUrl, Integer, Hash)>] ToolboxProxyUrl data, response status code and response headers
1716
- def get_toolbox_proxy_url_with_http_info(sandbox_id, opts = {})
1717
- if @api_client.config.debugging
1718
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_toolbox_proxy_url ...'
1719
- end
1720
- # verify the required parameter 'sandbox_id' is set
1721
- if @api_client.config.client_side_validation && sandbox_id.nil?
1722
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_toolbox_proxy_url"
1723
- end
1724
- # resource path
1725
- local_var_path = '/sandbox/{sandboxId}/toolbox-proxy-url'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1726
-
1727
- # query parameters
1728
- query_params = opts[:query_params] || {}
1729
-
1730
- # header parameters
1731
- header_params = opts[:header_params] || {}
1732
- # HTTP header 'Accept' (if needed)
1733
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1734
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1735
-
1736
- # form parameters
1737
- form_params = opts[:form_params] || {}
1738
-
1739
- # http body (model)
1740
- post_body = opts[:debug_body]
1741
-
1742
- # return_type
1743
- return_type = opts[:debug_return_type] || 'ToolboxProxyUrl'
1744
-
1745
- # auth_names
1746
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1747
-
1748
- new_options = opts.merge(
1749
- :operation => :"SandboxApi.get_toolbox_proxy_url",
1750
- :header_params => header_params,
1751
- :query_params => query_params,
1752
- :form_params => form_params,
1753
- :body => post_body,
1754
- :auth_names => auth_names,
1755
- :return_type => return_type
1756
- )
1757
-
1758
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1759
- if @api_client.config.debugging
1760
- @api_client.config.logger.debug "API called: SandboxApi#get_toolbox_proxy_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1761
- end
1762
- return data, status_code, headers
1763
- end
1764
-
1765
- # List sandboxes
1766
- # Advanced filtering and ordering. Eventually consistent.
1767
- # @param [Hash] opts the optional parameters
1768
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1769
- # @option opts [String] :cursor Pagination cursor from a previous response
1770
- # @option opts [Float] :limit Number of results per page (default to 100)
1771
- # @option opts [String] :id Filter by ID prefix (case-insensitive)
1772
- # @option opts [String] :name Filter by name prefix (case-insensitive)
1773
- # @option opts [String] :labels JSON encoded labels to filter by
1774
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1775
- # @option opts [Boolean] :include_warm Include unclaimed warm pool sandboxes (excluded by default) (default to false)
1776
- # @option opts [Array<SandboxState>] :states List of states to filter by.
1777
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1778
- # @option opts [Array<String>] :region_ids List of regions IDs to filter by
1779
- # @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
1780
- # @option opts [Float] :min_cpu Minimum CPU
1781
- # @option opts [Float] :max_cpu Maximum CPU
1782
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1783
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1784
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1785
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1786
- # @option opts [Boolean] :is_public Filter by public status
1787
- # @option opts [Boolean] :is_recoverable Filter by recoverable status
1788
- # @option opts [Time] :created_at_after Include items created after this timestamp
1789
- # @option opts [Time] :created_at_before Include items created before this timestamp
1790
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1791
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1792
- # @option opts [Time] :auto_destroy_at_after Include items scheduled for auto destroy after this timestamp
1793
- # @option opts [Time] :auto_destroy_at_before Include items scheduled for auto destroy before this timestamp
1794
- # @option opts [SandboxListSortField] :sort Field to sort by
1795
- # @option opts [SandboxListSortDirection] :order Direction to sort by
1796
- # @return [ListSandboxesResponse]
1797
- def list_sandboxes(opts = {})
1798
- data, _status_code, _headers = list_sandboxes_with_http_info(opts)
1799
- data
1800
- end
1801
-
1802
- # List sandboxes
1803
- # Advanced filtering and ordering. Eventually consistent.
1804
- # @param [Hash] opts the optional parameters
1805
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1806
- # @option opts [String] :cursor Pagination cursor from a previous response
1807
- # @option opts [Float] :limit Number of results per page (default to 100)
1808
- # @option opts [String] :id Filter by ID prefix (case-insensitive)
1809
- # @option opts [String] :name Filter by name prefix (case-insensitive)
1810
- # @option opts [String] :labels JSON encoded labels to filter by
1811
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1812
- # @option opts [Boolean] :include_warm Include unclaimed warm pool sandboxes (excluded by default) (default to false)
1813
- # @option opts [Array<SandboxState>] :states List of states to filter by.
1814
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1815
- # @option opts [Array<String>] :region_ids List of regions IDs to filter by
1816
- # @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
1817
- # @option opts [Float] :min_cpu Minimum CPU
1818
- # @option opts [Float] :max_cpu Maximum CPU
1819
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1820
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1821
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1822
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1823
- # @option opts [Boolean] :is_public Filter by public status
1824
- # @option opts [Boolean] :is_recoverable Filter by recoverable status
1825
- # @option opts [Time] :created_at_after Include items created after this timestamp
1826
- # @option opts [Time] :created_at_before Include items created before this timestamp
1827
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1828
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1829
- # @option opts [Time] :auto_destroy_at_after Include items scheduled for auto destroy after this timestamp
1830
- # @option opts [Time] :auto_destroy_at_before Include items scheduled for auto destroy before this timestamp
1831
- # @option opts [SandboxListSortField] :sort Field to sort by
1832
- # @option opts [SandboxListSortDirection] :order Direction to sort by
1833
- # @return [Array<(ListSandboxesResponse, Integer, Hash)>] ListSandboxesResponse data, response status code and response headers
1834
- def list_sandboxes_with_http_info(opts = {})
1835
- if @api_client.config.debugging
1836
- @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
1837
- end
1838
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
1839
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be smaller than or equal to 200.'
1840
- end
1841
-
1842
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1843
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1844
- end
1845
-
1846
- if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
1847
- fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1848
- end
1849
-
1850
- if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
1851
- fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1852
- end
1853
-
1854
- if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
1855
- fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1856
- end
1857
-
1858
- if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
1859
- fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1860
- end
1861
-
1862
- if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
1863
- fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1864
- end
1865
-
1866
- if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
1867
- fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1868
- end
1869
-
1870
- # resource path
1871
- local_var_path = '/sandbox'
1872
-
1873
- # query parameters
1874
- query_params = opts[:query_params] || {}
1875
- query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1876
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1877
- query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
1878
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1879
- query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
1880
- query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
1881
- query_params[:'includeWarm'] = opts[:'include_warm'] if !opts[:'include_warm'].nil?
1882
- query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
1883
- query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
1884
- query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
1885
- query_params[:'sandboxClasses'] = @api_client.build_collection_param(opts[:'sandbox_classes'], :multi) if !opts[:'sandbox_classes'].nil?
1886
- query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
1887
- query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
1888
- query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
1889
- query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
1890
- query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
1891
- query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
1892
- query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
1893
- query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
1894
- query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
1895
- query_params[:'createdAtBefore'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
1896
- query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
1897
- query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
1898
- query_params[:'autoDestroyAtAfter'] = opts[:'auto_destroy_at_after'] if !opts[:'auto_destroy_at_after'].nil?
1899
- query_params[:'autoDestroyAtBefore'] = opts[:'auto_destroy_at_before'] if !opts[:'auto_destroy_at_before'].nil?
1900
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1901
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1902
-
1903
- # header parameters
1904
- header_params = opts[:header_params] || {}
1905
- # HTTP header 'Accept' (if needed)
1906
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1907
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1908
-
1909
- # form parameters
1910
- form_params = opts[:form_params] || {}
1911
-
1912
- # http body (model)
1913
- post_body = opts[:debug_body]
1914
-
1915
- # return_type
1916
- return_type = opts[:debug_return_type] || 'ListSandboxesResponse'
1917
-
1918
- # auth_names
1919
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1920
-
1921
- new_options = opts.merge(
1922
- :operation => :"SandboxApi.list_sandboxes",
1923
- :header_params => header_params,
1924
- :query_params => query_params,
1925
- :form_params => form_params,
1926
- :body => post_body,
1927
- :auth_names => auth_names,
1928
- :return_type => return_type
1929
- )
1930
-
1931
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1932
- if @api_client.config.debugging
1933
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1934
- end
1935
- return data, status_code, headers
1936
- end
1937
-
1938
- # [DEPRECATED] List all sandboxes paginated
1939
- # @param [Hash] opts the optional parameters
1940
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1941
- # @option opts [Float] :page Page number of the results (default to 1)
1942
- # @option opts [Float] :limit Number of results per page (default to 100)
1943
- # @option opts [String] :id Filter by partial ID match
1944
- # @option opts [String] :name Filter by partial name match
1945
- # @option opts [String] :labels JSON encoded labels to filter by
1946
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1947
- # @option opts [Array<String>] :states List of states to filter by
1948
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1949
- # @option opts [Array<String>] :regions List of regions to filter by
1950
- # @option opts [Float] :min_cpu Minimum CPU
1951
- # @option opts [Float] :max_cpu Maximum CPU
1952
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1953
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1954
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1955
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1956
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1957
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1958
- # @option opts [String] :sort Field to sort by (default to 'createdAt')
1959
- # @option opts [String] :order Direction to sort by (default to 'desc')
1960
- # @return [PaginatedSandboxesDeprecated]
1961
- def list_sandboxes_paginated_deprecated(opts = {})
1962
- data, _status_code, _headers = list_sandboxes_paginated_deprecated_with_http_info(opts)
1963
- data
1964
- end
1965
-
1966
- # [DEPRECATED] List all sandboxes paginated
1967
- # @param [Hash] opts the optional parameters
1968
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1969
- # @option opts [Float] :page Page number of the results (default to 1)
1970
- # @option opts [Float] :limit Number of results per page (default to 100)
1971
- # @option opts [String] :id Filter by partial ID match
1972
- # @option opts [String] :name Filter by partial name match
1973
- # @option opts [String] :labels JSON encoded labels to filter by
1974
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1975
- # @option opts [Array<String>] :states List of states to filter by
1976
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1977
- # @option opts [Array<String>] :regions List of regions to filter by
1978
- # @option opts [Float] :min_cpu Minimum CPU
1979
- # @option opts [Float] :max_cpu Maximum CPU
1980
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1981
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1982
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1983
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1984
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1985
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1986
- # @option opts [String] :sort Field to sort by (default to 'createdAt')
1987
- # @option opts [String] :order Direction to sort by (default to 'desc')
1988
- # @return [Array<(PaginatedSandboxesDeprecated, Integer, Hash)>] PaginatedSandboxesDeprecated data, response status code and response headers
1989
- def list_sandboxes_paginated_deprecated_with_http_info(opts = {})
1990
- if @api_client.config.debugging
1991
- @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated_deprecated ...'
1992
- end
1993
- if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1994
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
1995
- end
1996
-
1997
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
1998
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be smaller than or equal to 200.'
1999
- end
2000
-
2001
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
2002
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2003
- end
2004
-
2005
- allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "pausing", "paused", "resuming", "unknown_default_open_api"]
2006
- if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
2007
- fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
2008
- end
2009
- if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
2010
- fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2011
- end
2012
-
2013
- if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
2014
- fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2015
- end
2016
-
2017
- if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
2018
- fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2019
- end
2020
-
2021
- if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
2022
- fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2023
- end
2024
-
2025
- if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
2026
- fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2027
- end
2028
-
2029
- if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
2030
- fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2031
- end
2032
-
2033
- allowable_values = ["id", "name", "state", "snapshot", "region", "updatedAt", "createdAt", "lastActivityAt", "unknown_default_open_api"]
2034
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
2035
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
2036
- end
2037
- allowable_values = ["asc", "desc", "unknown_default_open_api"]
2038
- if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
2039
- fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
2040
- end
2041
- # resource path
2042
- local_var_path = '/sandbox/paginated'
2043
-
2044
- # query parameters
2045
- query_params = opts[:query_params] || {}
2046
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2047
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2048
- query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
2049
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
2050
- query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
2051
- query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
2052
- query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
2053
- query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
2054
- query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
2055
- query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
2056
- query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
2057
- query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
2058
- query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
2059
- query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
2060
- query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
2061
- query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
2062
- query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
2063
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
2064
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
2065
-
2066
- # header parameters
2067
- header_params = opts[:header_params] || {}
2068
- # HTTP header 'Accept' (if needed)
2069
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2070
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2071
-
2072
- # form parameters
2073
- form_params = opts[:form_params] || {}
2074
-
2075
- # http body (model)
2076
- post_body = opts[:debug_body]
2077
-
2078
- # return_type
2079
- return_type = opts[:debug_return_type] || 'PaginatedSandboxesDeprecated'
2080
-
2081
- # auth_names
2082
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2083
-
2084
- new_options = opts.merge(
2085
- :operation => :"SandboxApi.list_sandboxes_paginated_deprecated",
2086
- :header_params => header_params,
2087
- :query_params => query_params,
2088
- :form_params => form_params,
2089
- :body => post_body,
2090
- :auth_names => auth_names,
2091
- :return_type => return_type
2092
- )
2093
-
2094
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2095
- if @api_client.config.debugging
2096
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2097
- end
2098
- return data, status_code, headers
2099
- end
2100
-
2101
- # Pause sandbox
2102
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2103
- # @param [Hash] opts the optional parameters
2104
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2105
- # @return [Sandbox]
2106
- def pause_sandbox(sandbox_id_or_name, opts = {})
2107
- data, _status_code, _headers = pause_sandbox_with_http_info(sandbox_id_or_name, opts)
2108
- data
2109
- end
2110
-
2111
- # Pause sandbox
2112
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2113
- # @param [Hash] opts the optional parameters
2114
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2115
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2116
- def pause_sandbox_with_http_info(sandbox_id_or_name, opts = {})
2117
- if @api_client.config.debugging
2118
- @api_client.config.logger.debug 'Calling API: SandboxApi.pause_sandbox ...'
2119
- end
2120
- # verify the required parameter 'sandbox_id_or_name' is set
2121
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2122
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.pause_sandbox"
2123
- end
2124
- # resource path
2125
- local_var_path = '/sandbox/{sandboxIdOrName}/pause'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2126
-
2127
- # query parameters
2128
- query_params = opts[:query_params] || {}
2129
-
2130
- # header parameters
2131
- header_params = opts[:header_params] || {}
2132
- # HTTP header 'Accept' (if needed)
2133
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2134
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2135
-
2136
- # form parameters
2137
- form_params = opts[:form_params] || {}
2138
-
2139
- # http body (model)
2140
- post_body = opts[:debug_body]
2141
-
2142
- # return_type
2143
- return_type = opts[:debug_return_type] || 'Sandbox'
2144
-
2145
- # auth_names
2146
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2147
-
2148
- new_options = opts.merge(
2149
- :operation => :"SandboxApi.pause_sandbox",
2150
- :header_params => header_params,
2151
- :query_params => query_params,
2152
- :form_params => form_params,
2153
- :body => post_body,
2154
- :auth_names => auth_names,
2155
- :return_type => return_type
2156
- )
2157
-
2158
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2159
- if @api_client.config.debugging
2160
- @api_client.config.logger.debug "API called: SandboxApi#pause_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2161
- end
2162
- return data, status_code, headers
2163
- end
2164
-
2165
- # Recover sandbox from error state
2166
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2167
- # @param [Hash] opts the optional parameters
2168
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2169
- # @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
2170
- # @return [Sandbox]
2171
- def recover_sandbox(sandbox_id_or_name, opts = {})
2172
- data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
2173
- data
2174
- end
2175
-
2176
- # Recover sandbox from error state
2177
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2178
- # @param [Hash] opts the optional parameters
2179
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2180
- # @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
2181
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2182
- def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
2183
- if @api_client.config.debugging
2184
- @api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
2185
- end
2186
- # verify the required parameter 'sandbox_id_or_name' is set
2187
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2188
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
2189
- end
2190
- # resource path
2191
- local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2192
-
2193
- # query parameters
2194
- query_params = opts[:query_params] || {}
2195
- query_params[:'skipStart'] = opts[:'skip_start'] if !opts[:'skip_start'].nil?
2196
-
2197
- # header parameters
2198
- header_params = opts[:header_params] || {}
2199
- # HTTP header 'Accept' (if needed)
2200
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2201
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2202
-
2203
- # form parameters
2204
- form_params = opts[:form_params] || {}
2205
-
2206
- # http body (model)
2207
- post_body = opts[:debug_body]
2208
-
2209
- # return_type
2210
- return_type = opts[:debug_return_type] || 'Sandbox'
2211
-
2212
- # auth_names
2213
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2214
-
2215
- new_options = opts.merge(
2216
- :operation => :"SandboxApi.recover_sandbox",
2217
- :header_params => header_params,
2218
- :query_params => query_params,
2219
- :form_params => form_params,
2220
- :body => post_body,
2221
- :auth_names => auth_names,
2222
- :return_type => return_type
2223
- )
2224
-
2225
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2226
- if @api_client.config.debugging
2227
- @api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2228
- end
2229
- return data, status_code, headers
2230
- end
2231
-
2232
- # Replace sandbox labels
2233
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2234
- # @param sandbox_labels [SandboxLabels]
2235
- # @param [Hash] opts the optional parameters
2236
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2237
- # @return [SandboxLabels]
2238
- def replace_labels(sandbox_id_or_name, sandbox_labels, opts = {})
2239
- data, _status_code, _headers = replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts)
2240
- data
2241
- end
2242
-
2243
- # Replace sandbox labels
2244
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2245
- # @param sandbox_labels [SandboxLabels]
2246
- # @param [Hash] opts the optional parameters
2247
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2248
- # @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
2249
- def replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts = {})
2250
- if @api_client.config.debugging
2251
- @api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
2252
- end
2253
- # verify the required parameter 'sandbox_id_or_name' is set
2254
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2255
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.replace_labels"
2256
- end
2257
- # verify the required parameter 'sandbox_labels' is set
2258
- if @api_client.config.client_side_validation && sandbox_labels.nil?
2259
- fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
2260
- end
2261
- # resource path
2262
- local_var_path = '/sandbox/{sandboxIdOrName}/labels'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2263
-
2264
- # query parameters
2265
- query_params = opts[:query_params] || {}
2266
-
2267
- # header parameters
2268
- header_params = opts[:header_params] || {}
2269
- # HTTP header 'Accept' (if needed)
2270
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2271
- # HTTP header 'Content-Type'
2272
- content_type = @api_client.select_header_content_type(['application/json'])
2273
- if !content_type.nil?
2274
- header_params['Content-Type'] = content_type
2275
- end
2276
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2277
-
2278
- # form parameters
2279
- form_params = opts[:form_params] || {}
2280
-
2281
- # http body (model)
2282
- post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
2283
-
2284
- # return_type
2285
- return_type = opts[:debug_return_type] || 'SandboxLabels'
2286
-
2287
- # auth_names
2288
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2289
-
2290
- new_options = opts.merge(
2291
- :operation => :"SandboxApi.replace_labels",
2292
- :header_params => header_params,
2293
- :query_params => query_params,
2294
- :form_params => form_params,
2295
- :body => post_body,
2296
- :auth_names => auth_names,
2297
- :return_type => return_type
2298
- )
2299
-
2300
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2301
- if @api_client.config.debugging
2302
- @api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2303
- end
2304
- return data, status_code, headers
2305
- end
2306
-
2307
- # Resize sandbox resources
2308
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2309
- # @param resize_sandbox [ResizeSandbox]
2310
- # @param [Hash] opts the optional parameters
2311
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2312
- # @return [Sandbox]
2313
- def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
2314
- data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
2315
- data
2316
- end
2317
-
2318
- # Resize sandbox resources
2319
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2320
- # @param resize_sandbox [ResizeSandbox]
2321
- # @param [Hash] opts the optional parameters
2322
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2323
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2324
- def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
2325
- if @api_client.config.debugging
2326
- @api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
2327
- end
2328
- # verify the required parameter 'sandbox_id_or_name' is set
2329
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2330
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
2331
- end
2332
- # verify the required parameter 'resize_sandbox' is set
2333
- if @api_client.config.client_side_validation && resize_sandbox.nil?
2334
- fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
2335
- end
2336
- # resource path
2337
- local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2338
-
2339
- # query parameters
2340
- query_params = opts[:query_params] || {}
2341
-
2342
- # header parameters
2343
- header_params = opts[:header_params] || {}
2344
- # HTTP header 'Accept' (if needed)
2345
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2346
- # HTTP header 'Content-Type'
2347
- content_type = @api_client.select_header_content_type(['application/json'])
2348
- if !content_type.nil?
2349
- header_params['Content-Type'] = content_type
2350
- end
2351
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2352
-
2353
- # form parameters
2354
- form_params = opts[:form_params] || {}
2355
-
2356
- # http body (model)
2357
- post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
2358
-
2359
- # return_type
2360
- return_type = opts[:debug_return_type] || 'Sandbox'
2361
-
2362
- # auth_names
2363
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2364
-
2365
- new_options = opts.merge(
2366
- :operation => :"SandboxApi.resize_sandbox",
2367
- :header_params => header_params,
2368
- :query_params => query_params,
2369
- :form_params => form_params,
2370
- :body => post_body,
2371
- :auth_names => auth_names,
2372
- :return_type => return_type
2373
- )
2374
-
2375
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2376
- if @api_client.config.debugging
2377
- @api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2378
- end
2379
- return data, status_code, headers
2380
- end
2381
-
2382
- # Resolve sandbox secrets
2383
- # @param sandbox_id [String] Sandbox ID
2384
- # @param [Hash] opts the optional parameters
2385
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2386
- # @return [Array<ResolveSandboxSecrets200ResponseInner>]
2387
- def resolve_sandbox_secrets(sandbox_id, opts = {})
2388
- data, _status_code, _headers = resolve_sandbox_secrets_with_http_info(sandbox_id, opts)
2389
- data
2390
- end
2391
-
2392
- # Resolve sandbox secrets
2393
- # @param sandbox_id [String] Sandbox ID
2394
- # @param [Hash] opts the optional parameters
2395
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2396
- # @return [Array<(Array<ResolveSandboxSecrets200ResponseInner>, Integer, Hash)>] Array<ResolveSandboxSecrets200ResponseInner> data, response status code and response headers
2397
- def resolve_sandbox_secrets_with_http_info(sandbox_id, opts = {})
2398
- if @api_client.config.debugging
2399
- @api_client.config.logger.debug 'Calling API: SandboxApi.resolve_sandbox_secrets ...'
2400
- end
2401
- # verify the required parameter 'sandbox_id' is set
2402
- if @api_client.config.client_side_validation && sandbox_id.nil?
2403
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.resolve_sandbox_secrets"
2404
- end
2405
- # resource path
2406
- local_var_path = '/sandbox/{sandboxId}/secrets'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2407
-
2408
- # query parameters
2409
- query_params = opts[:query_params] || {}
2410
-
2411
- # header parameters
2412
- header_params = opts[:header_params] || {}
2413
- # HTTP header 'Accept' (if needed)
2414
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2415
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2416
-
2417
- # form parameters
2418
- form_params = opts[:form_params] || {}
2419
-
2420
- # http body (model)
2421
- post_body = opts[:debug_body]
2422
-
2423
- # return_type
2424
- return_type = opts[:debug_return_type] || 'Array<ResolveSandboxSecrets200ResponseInner>'
2425
-
2426
- # auth_names
2427
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2428
-
2429
- new_options = opts.merge(
2430
- :operation => :"SandboxApi.resolve_sandbox_secrets",
2431
- :header_params => header_params,
2432
- :query_params => query_params,
2433
- :form_params => form_params,
2434
- :body => post_body,
2435
- :auth_names => auth_names,
2436
- :return_type => return_type
2437
- )
2438
-
2439
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2440
- if @api_client.config.debugging
2441
- @api_client.config.logger.debug "API called: SandboxApi#resolve_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2442
- end
2443
- return data, status_code, headers
2444
- end
2445
-
2446
- # Revoke SSH access for sandbox
2447
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2448
- # @param [Hash] opts the optional parameters
2449
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2450
- # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2451
- # @return [Sandbox]
2452
- def revoke_ssh_access(sandbox_id_or_name, opts = {})
2453
- data, _status_code, _headers = revoke_ssh_access_with_http_info(sandbox_id_or_name, opts)
2454
- data
2455
- end
2456
-
2457
- # Revoke SSH access for sandbox
2458
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2459
- # @param [Hash] opts the optional parameters
2460
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2461
- # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2462
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2463
- def revoke_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
767
+ # @option opts [Float] :page Page number of the results (default to 1)
768
+ # @option opts [Float] :limit Number of results per page (default to 100)
769
+ # @option opts [String] :id Filter by partial ID match
770
+ # @option opts [String] :labels JSON encoded labels to filter by
771
+ # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
772
+ # @option opts [Array<String>] :states List of states to filter by
773
+ # @option opts [Array<String>] :snapshots List of snapshot names to filter by
774
+ # @option opts [Array<String>] :regions List of regions to filter by
775
+ # @option opts [Float] :min_cpu Minimum CPU
776
+ # @option opts [Float] :max_cpu Maximum CPU
777
+ # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
778
+ # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
779
+ # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
780
+ # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
781
+ # @option opts [Time] :last_event_after Include items with last event after this timestamp
782
+ # @option opts [Time] :last_event_before Include items with last event before this timestamp
783
+ # @option opts [String] :sort Field to sort by (default to 'createdAt')
784
+ # @option opts [String] :order Direction to sort by (default to 'desc')
785
+ # @return [Array<(PaginatedSandboxes, Integer, Hash)>] PaginatedSandboxes data, response status code and response headers
786
+ def list_sandboxes_paginated_with_http_info(opts = {})
2464
787
  if @api_client.config.debugging
2465
- @api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
2466
- end
2467
- # verify the required parameter 'sandbox_id_or_name' is set
2468
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2469
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.revoke_ssh_access"
788
+ @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
2470
789
  end
2471
- # resource path
2472
- local_var_path = '/sandbox/{sandboxIdOrName}/ssh-access'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2473
-
2474
- # query parameters
2475
- query_params = opts[:query_params] || {}
2476
- query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
2477
-
2478
- # header parameters
2479
- header_params = opts[:header_params] || {}
2480
- # HTTP header 'Accept' (if needed)
2481
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2482
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2483
-
2484
- # form parameters
2485
- form_params = opts[:form_params] || {}
2486
-
2487
- # http body (model)
2488
- post_body = opts[:debug_body]
2489
-
2490
- # return_type
2491
- return_type = opts[:debug_return_type] || 'Sandbox'
2492
-
2493
- # auth_names
2494
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2495
-
2496
- new_options = opts.merge(
2497
- :operation => :"SandboxApi.revoke_ssh_access",
2498
- :header_params => header_params,
2499
- :query_params => query_params,
2500
- :form_params => form_params,
2501
- :body => post_body,
2502
- :auth_names => auth_names,
2503
- :return_type => return_type
2504
- )
2505
-
2506
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2507
- if @api_client.config.debugging
2508
- @api_client.config.logger.debug "API called: SandboxApi#revoke_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
790
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
791
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2509
792
  end
2510
- return data, status_code, headers
2511
- end
2512
-
2513
- # Rotate the signing key, invalidating all previously signed URLs
2514
- # @param sandbox_id [String] ID of the sandbox
2515
- # @param [Hash] opts the optional parameters
2516
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2517
- # @return [String]
2518
- def rotate_signing_key(sandbox_id, opts = {})
2519
- data, _status_code, _headers = rotate_signing_key_with_http_info(sandbox_id, opts)
2520
- data
2521
- end
2522
793
 
2523
- # Rotate the signing key, invalidating all previously signed URLs
2524
- # @param sandbox_id [String] ID of the sandbox
2525
- # @param [Hash] opts the optional parameters
2526
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2527
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
2528
- def rotate_signing_key_with_http_info(sandbox_id, opts = {})
2529
- if @api_client.config.debugging
2530
- @api_client.config.logger.debug 'Calling API: SandboxApi.rotate_signing_key ...'
2531
- end
2532
- # verify the required parameter 'sandbox_id' is set
2533
- if @api_client.config.client_side_validation && sandbox_id.nil?
2534
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.rotate_signing_key"
794
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
795
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be smaller than or equal to 200.'
2535
796
  end
2536
- # resource path
2537
- local_var_path = '/sandbox/{sandboxId}/signing-key/rotate'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2538
-
2539
- # query parameters
2540
- query_params = opts[:query_params] || {}
2541
-
2542
- # header parameters
2543
- header_params = opts[:header_params] || {}
2544
- # HTTP header 'Accept' (if needed)
2545
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2546
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2547
-
2548
- # form parameters
2549
- form_params = opts[:form_params] || {}
2550
-
2551
- # http body (model)
2552
- post_body = opts[:debug_body]
2553
-
2554
- # return_type
2555
- return_type = opts[:debug_return_type] || 'String'
2556
-
2557
- # auth_names
2558
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2559
-
2560
- new_options = opts.merge(
2561
- :operation => :"SandboxApi.rotate_signing_key",
2562
- :header_params => header_params,
2563
- :query_params => query_params,
2564
- :form_params => form_params,
2565
- :body => post_body,
2566
- :auth_names => auth_names,
2567
- :return_type => return_type
2568
- )
2569
797
 
2570
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2571
- if @api_client.config.debugging
2572
- @api_client.config.logger.debug "API called: SandboxApi#rotate_signing_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
798
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
799
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2573
800
  end
2574
- return data, status_code, headers
2575
- end
2576
-
2577
- # Set sandbox auto-archive interval
2578
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2579
- # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2580
- # @param [Hash] opts the optional parameters
2581
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2582
- # @return [Sandbox]
2583
- def set_auto_archive_interval(sandbox_id_or_name, interval, opts = {})
2584
- data, _status_code, _headers = set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts)
2585
- data
2586
- end
2587
801
 
2588
- # Set sandbox auto-archive interval
2589
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2590
- # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2591
- # @param [Hash] opts the optional parameters
2592
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2593
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2594
- def set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
2595
- if @api_client.config.debugging
2596
- @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
2597
- end
2598
- # verify the required parameter 'sandbox_id_or_name' is set
2599
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2600
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_archive_interval"
802
+ allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"]
803
+ if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
804
+ fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
2601
805
  end
2602
- # verify the required parameter 'interval' is set
2603
- if @api_client.config.client_side_validation && interval.nil?
2604
- fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
806
+ if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
807
+ fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2605
808
  end
2606
- # resource path
2607
- local_var_path = '/sandbox/{sandboxIdOrName}/autoarchive/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
2608
-
2609
- # query parameters
2610
- query_params = opts[:query_params] || {}
2611
-
2612
- # header parameters
2613
- header_params = opts[:header_params] || {}
2614
- # HTTP header 'Accept' (if needed)
2615
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2616
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2617
-
2618
- # form parameters
2619
- form_params = opts[:form_params] || {}
2620
-
2621
- # http body (model)
2622
- post_body = opts[:debug_body]
2623
-
2624
- # return_type
2625
- return_type = opts[:debug_return_type] || 'Sandbox'
2626
-
2627
- # auth_names
2628
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2629
-
2630
- new_options = opts.merge(
2631
- :operation => :"SandboxApi.set_auto_archive_interval",
2632
- :header_params => header_params,
2633
- :query_params => query_params,
2634
- :form_params => form_params,
2635
- :body => post_body,
2636
- :auth_names => auth_names,
2637
- :return_type => return_type
2638
- )
2639
809
 
2640
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2641
- if @api_client.config.debugging
2642
- @api_client.config.logger.debug "API called: SandboxApi#set_auto_archive_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
810
+ if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
811
+ fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2643
812
  end
2644
- return data, status_code, headers
2645
- end
2646
-
2647
- # Set sandbox auto-delete interval
2648
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2649
- # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2650
- # @param [Hash] opts the optional parameters
2651
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2652
- # @return [Sandbox]
2653
- def set_auto_delete_interval(sandbox_id_or_name, interval, opts = {})
2654
- data, _status_code, _headers = set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts)
2655
- data
2656
- end
2657
813
 
2658
- # Set sandbox auto-delete interval
2659
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2660
- # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2661
- # @param [Hash] opts the optional parameters
2662
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2663
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2664
- def set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
2665
- if @api_client.config.debugging
2666
- @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
2667
- end
2668
- # verify the required parameter 'sandbox_id_or_name' is set
2669
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2670
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_delete_interval"
2671
- end
2672
- # verify the required parameter 'interval' is set
2673
- if @api_client.config.client_side_validation && interval.nil?
2674
- fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
814
+ if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
815
+ fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2675
816
  end
2676
- # resource path
2677
- local_var_path = '/sandbox/{sandboxIdOrName}/autodelete/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
2678
-
2679
- # query parameters
2680
- query_params = opts[:query_params] || {}
2681
-
2682
- # header parameters
2683
- header_params = opts[:header_params] || {}
2684
- # HTTP header 'Accept' (if needed)
2685
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2686
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2687
-
2688
- # form parameters
2689
- form_params = opts[:form_params] || {}
2690
-
2691
- # http body (model)
2692
- post_body = opts[:debug_body]
2693
-
2694
- # return_type
2695
- return_type = opts[:debug_return_type] || 'Sandbox'
2696
-
2697
- # auth_names
2698
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2699
-
2700
- new_options = opts.merge(
2701
- :operation => :"SandboxApi.set_auto_delete_interval",
2702
- :header_params => header_params,
2703
- :query_params => query_params,
2704
- :form_params => form_params,
2705
- :body => post_body,
2706
- :auth_names => auth_names,
2707
- :return_type => return_type
2708
- )
2709
-
2710
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2711
- if @api_client.config.debugging
2712
- @api_client.config.logger.debug "API called: SandboxApi#set_auto_delete_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
817
+
818
+ if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
819
+ fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2713
820
  end
2714
- return data, status_code, headers
2715
- end
2716
821
 
2717
- # Set sandbox auto-pause interval
2718
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2719
- # @param interval [Float] Auto-pause interval in minutes (0 to disable)
2720
- # @param [Hash] opts the optional parameters
2721
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2722
- # @return [Sandbox]
2723
- def set_auto_pause_interval(sandbox_id_or_name, interval, opts = {})
2724
- data, _status_code, _headers = set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts)
2725
- data
2726
- end
822
+ if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
823
+ fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
824
+ end
2727
825
 
2728
- # Set sandbox auto-pause interval
2729
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2730
- # @param interval [Float] Auto-pause interval in minutes (0 to disable)
2731
- # @param [Hash] opts the optional parameters
2732
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2733
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2734
- def set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
2735
- if @api_client.config.debugging
2736
- @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_pause_interval ...'
826
+ if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
827
+ fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
2737
828
  end
2738
- # verify the required parameter 'sandbox_id_or_name' is set
2739
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2740
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_pause_interval"
829
+
830
+ allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
831
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
832
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
2741
833
  end
2742
- # verify the required parameter 'interval' is set
2743
- if @api_client.config.client_side_validation && interval.nil?
2744
- fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_pause_interval"
834
+ allowable_values = ["asc", "desc"]
835
+ if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
836
+ fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
2745
837
  end
2746
838
  # resource path
2747
- local_var_path = '/sandbox/{sandboxIdOrName}/autopause/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
839
+ local_var_path = '/sandbox/paginated'
2748
840
 
2749
841
  # query parameters
2750
842
  query_params = opts[:query_params] || {}
843
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
844
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
845
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
846
+ query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
847
+ query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
848
+ query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
849
+ query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
850
+ query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
851
+ query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
852
+ query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
853
+ query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
854
+ query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
855
+ query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
856
+ query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
857
+ query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
858
+ query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
859
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
860
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
2751
861
 
2752
862
  # header parameters
2753
863
  header_params = opts[:header_params] || {}
@@ -2762,13 +872,13 @@ module DaytonaApiClient
2762
872
  post_body = opts[:debug_body]
2763
873
 
2764
874
  # return_type
2765
- return_type = opts[:debug_return_type] || 'Sandbox'
875
+ return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
2766
876
 
2767
877
  # auth_names
2768
878
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2769
879
 
2770
880
  new_options = opts.merge(
2771
- :operation => :"SandboxApi.set_auto_pause_interval",
881
+ :operation => :"SandboxApi.list_sandboxes_paginated",
2772
882
  :header_params => header_params,
2773
883
  :query_params => query_params,
2774
884
  :form_params => form_params,
@@ -2777,44 +887,44 @@ module DaytonaApiClient
2777
887
  :return_type => return_type
2778
888
  )
2779
889
 
2780
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
890
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2781
891
  if @api_client.config.debugging
2782
- @api_client.config.logger.debug "API called: SandboxApi#set_auto_pause_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
892
+ @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2783
893
  end
2784
894
  return data, status_code, headers
2785
895
  end
2786
896
 
2787
- # Set sandbox auto-stop interval
2788
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2789
- # @param interval [Float] Auto-stop interval in minutes (0 to disable)
897
+ # Replace sandbox labels
898
+ # @param sandbox_id [String] ID of the sandbox
899
+ # @param sandbox_labels [SandboxLabels]
2790
900
  # @param [Hash] opts the optional parameters
2791
901
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2792
- # @return [Sandbox]
2793
- def set_autostop_interval(sandbox_id_or_name, interval, opts = {})
2794
- data, _status_code, _headers = set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts)
902
+ # @return [SandboxLabels]
903
+ def replace_labels(sandbox_id, sandbox_labels, opts = {})
904
+ data, _status_code, _headers = replace_labels_with_http_info(sandbox_id, sandbox_labels, opts)
2795
905
  data
2796
906
  end
2797
907
 
2798
- # Set sandbox auto-stop interval
2799
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2800
- # @param interval [Float] Auto-stop interval in minutes (0 to disable)
908
+ # Replace sandbox labels
909
+ # @param sandbox_id [String] ID of the sandbox
910
+ # @param sandbox_labels [SandboxLabels]
2801
911
  # @param [Hash] opts the optional parameters
2802
912
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2803
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2804
- def set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
913
+ # @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
914
+ def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
2805
915
  if @api_client.config.debugging
2806
- @api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
916
+ @api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
2807
917
  end
2808
- # verify the required parameter 'sandbox_id_or_name' is set
2809
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2810
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_autostop_interval"
918
+ # verify the required parameter 'sandbox_id' is set
919
+ if @api_client.config.client_side_validation && sandbox_id.nil?
920
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.replace_labels"
2811
921
  end
2812
- # verify the required parameter 'interval' is set
2813
- if @api_client.config.client_side_validation && interval.nil?
2814
- fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
922
+ # verify the required parameter 'sandbox_labels' is set
923
+ if @api_client.config.client_side_validation && sandbox_labels.nil?
924
+ fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
2815
925
  end
2816
926
  # resource path
2817
- local_var_path = '/sandbox/{sandboxIdOrName}/autostop/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
927
+ local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2818
928
 
2819
929
  # query parameters
2820
930
  query_params = opts[:query_params] || {}
@@ -2823,22 +933,27 @@ module DaytonaApiClient
2823
933
  header_params = opts[:header_params] || {}
2824
934
  # HTTP header 'Accept' (if needed)
2825
935
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
936
+ # HTTP header 'Content-Type'
937
+ content_type = @api_client.select_header_content_type(['application/json'])
938
+ if !content_type.nil?
939
+ header_params['Content-Type'] = content_type
940
+ end
2826
941
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2827
942
 
2828
943
  # form parameters
2829
944
  form_params = opts[:form_params] || {}
2830
945
 
2831
946
  # http body (model)
2832
- post_body = opts[:debug_body]
947
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
2833
948
 
2834
949
  # return_type
2835
- return_type = opts[:debug_return_type] || 'Sandbox'
950
+ return_type = opts[:debug_return_type] || 'SandboxLabels'
2836
951
 
2837
952
  # auth_names
2838
953
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2839
954
 
2840
955
  new_options = opts.merge(
2841
- :operation => :"SandboxApi.set_autostop_interval",
956
+ :operation => :"SandboxApi.replace_labels",
2842
957
  :header_params => header_params,
2843
958
  :query_params => query_params,
2844
959
  :form_params => form_params,
@@ -2847,52 +962,47 @@ module DaytonaApiClient
2847
962
  :return_type => return_type
2848
963
  )
2849
964
 
2850
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
965
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2851
966
  if @api_client.config.debugging
2852
- @api_client.config.logger.debug "API called: SandboxApi#set_autostop_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
967
+ @api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2853
968
  end
2854
969
  return data, status_code, headers
2855
970
  end
2856
971
 
2857
- # Set sandbox TTL
2858
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2859
- # @param ttl_minutes [Float] Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
972
+ # Revoke SSH access for sandbox
973
+ # @param sandbox_id [String] ID of the sandbox
2860
974
  # @param [Hash] opts the optional parameters
2861
975
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2862
- # @return [Sandbox]
2863
- def set_ttl(sandbox_id_or_name, ttl_minutes, opts = {})
2864
- data, _status_code, _headers = set_ttl_with_http_info(sandbox_id_or_name, ttl_minutes, opts)
2865
- data
976
+ # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
977
+ # @return [nil]
978
+ def revoke_ssh_access(sandbox_id, opts = {})
979
+ revoke_ssh_access_with_http_info(sandbox_id, opts)
980
+ nil
2866
981
  end
2867
982
 
2868
- # Set sandbox TTL
2869
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2870
- # @param ttl_minutes [Float] Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
983
+ # Revoke SSH access for sandbox
984
+ # @param sandbox_id [String] ID of the sandbox
2871
985
  # @param [Hash] opts the optional parameters
2872
986
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2873
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2874
- def set_ttl_with_http_info(sandbox_id_or_name, ttl_minutes, opts = {})
987
+ # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
988
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
989
+ def revoke_ssh_access_with_http_info(sandbox_id, opts = {})
2875
990
  if @api_client.config.debugging
2876
- @api_client.config.logger.debug 'Calling API: SandboxApi.set_ttl ...'
2877
- end
2878
- # verify the required parameter 'sandbox_id_or_name' is set
2879
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2880
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_ttl"
991
+ @api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
2881
992
  end
2882
- # verify the required parameter 'ttl_minutes' is set
2883
- if @api_client.config.client_side_validation && ttl_minutes.nil?
2884
- fail ArgumentError, "Missing the required parameter 'ttl_minutes' when calling SandboxApi.set_ttl"
993
+ # verify the required parameter 'sandbox_id' is set
994
+ if @api_client.config.client_side_validation && sandbox_id.nil?
995
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.revoke_ssh_access"
2885
996
  end
2886
997
  # resource path
2887
- local_var_path = '/sandbox/{sandboxIdOrName}/ttl/{ttlMinutes}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'ttlMinutes' + '}', CGI.escape(ttl_minutes.to_s))
998
+ local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2888
999
 
2889
1000
  # query parameters
2890
1001
  query_params = opts[:query_params] || {}
1002
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
2891
1003
 
2892
1004
  # header parameters
2893
1005
  header_params = opts[:header_params] || {}
2894
- # HTTP header 'Accept' (if needed)
2895
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2896
1006
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2897
1007
 
2898
1008
  # form parameters
@@ -2902,13 +1012,13 @@ module DaytonaApiClient
2902
1012
  post_body = opts[:debug_body]
2903
1013
 
2904
1014
  # return_type
2905
- return_type = opts[:debug_return_type] || 'Sandbox'
1015
+ return_type = opts[:debug_return_type]
2906
1016
 
2907
1017
  # auth_names
2908
1018
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2909
1019
 
2910
1020
  new_options = opts.merge(
2911
- :operation => :"SandboxApi.set_ttl",
1021
+ :operation => :"SandboxApi.revoke_ssh_access",
2912
1022
  :header_params => header_params,
2913
1023
  :query_params => query_params,
2914
1024
  :form_params => form_params,
@@ -2917,48 +1027,50 @@ module DaytonaApiClient
2917
1027
  :return_type => return_type
2918
1028
  )
2919
1029
 
2920
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1030
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2921
1031
  if @api_client.config.debugging
2922
- @api_client.config.logger.debug "API called: SandboxApi#set_ttl\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1032
+ @api_client.config.logger.debug "API called: SandboxApi#revoke_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2923
1033
  end
2924
1034
  return data, status_code, headers
2925
1035
  end
2926
1036
 
2927
- # Start or resume sandbox
2928
- # Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
2929
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1037
+ # Set sandbox auto-archive interval
1038
+ # @param sandbox_id [String] ID of the sandbox
1039
+ # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2930
1040
  # @param [Hash] opts the optional parameters
2931
1041
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2932
- # @return [Sandbox]
2933
- def start_sandbox(sandbox_id_or_name, opts = {})
2934
- data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id_or_name, opts)
2935
- data
1042
+ # @return [nil]
1043
+ def set_auto_archive_interval(sandbox_id, interval, opts = {})
1044
+ set_auto_archive_interval_with_http_info(sandbox_id, interval, opts)
1045
+ nil
2936
1046
  end
2937
1047
 
2938
- # Start or resume sandbox
2939
- # Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
2940
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1048
+ # Set sandbox auto-archive interval
1049
+ # @param sandbox_id [String] ID of the sandbox
1050
+ # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2941
1051
  # @param [Hash] opts the optional parameters
2942
1052
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2943
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2944
- def start_sandbox_with_http_info(sandbox_id_or_name, opts = {})
1053
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1054
+ def set_auto_archive_interval_with_http_info(sandbox_id, interval, opts = {})
2945
1055
  if @api_client.config.debugging
2946
- @api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
1056
+ @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
1057
+ end
1058
+ # verify the required parameter 'sandbox_id' is set
1059
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1060
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_auto_archive_interval"
2947
1061
  end
2948
- # verify the required parameter 'sandbox_id_or_name' is set
2949
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2950
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.start_sandbox"
1062
+ # verify the required parameter 'interval' is set
1063
+ if @api_client.config.client_side_validation && interval.nil?
1064
+ fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
2951
1065
  end
2952
1066
  # resource path
2953
- local_var_path = '/sandbox/{sandboxIdOrName}/start'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1067
+ local_var_path = '/sandbox/{sandboxId}/autoarchive/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
2954
1068
 
2955
1069
  # query parameters
2956
1070
  query_params = opts[:query_params] || {}
2957
1071
 
2958
1072
  # header parameters
2959
1073
  header_params = opts[:header_params] || {}
2960
- # HTTP header 'Accept' (if needed)
2961
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2962
1074
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2963
1075
 
2964
1076
  # form parameters
@@ -2968,13 +1080,13 @@ module DaytonaApiClient
2968
1080
  post_body = opts[:debug_body]
2969
1081
 
2970
1082
  # return_type
2971
- return_type = opts[:debug_return_type] || 'Sandbox'
1083
+ return_type = opts[:debug_return_type]
2972
1084
 
2973
1085
  # auth_names
2974
1086
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2975
1087
 
2976
1088
  new_options = opts.merge(
2977
- :operation => :"SandboxApi.start_sandbox",
1089
+ :operation => :"SandboxApi.set_auto_archive_interval",
2978
1090
  :header_params => header_params,
2979
1091
  :query_params => query_params,
2980
1092
  :form_params => form_params,
@@ -2985,47 +1097,48 @@ module DaytonaApiClient
2985
1097
 
2986
1098
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2987
1099
  if @api_client.config.debugging
2988
- @api_client.config.logger.debug "API called: SandboxApi#start_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1100
+ @api_client.config.logger.debug "API called: SandboxApi#set_auto_archive_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2989
1101
  end
2990
1102
  return data, status_code, headers
2991
1103
  end
2992
1104
 
2993
- # Stop sandbox
2994
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1105
+ # Set sandbox auto-delete interval
1106
+ # @param sandbox_id [String] ID of the sandbox
1107
+ # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2995
1108
  # @param [Hash] opts the optional parameters
2996
1109
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2997
- # @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
2998
- # @return [Sandbox]
2999
- def stop_sandbox(sandbox_id_or_name, opts = {})
3000
- data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
3001
- data
1110
+ # @return [nil]
1111
+ def set_auto_delete_interval(sandbox_id, interval, opts = {})
1112
+ set_auto_delete_interval_with_http_info(sandbox_id, interval, opts)
1113
+ nil
3002
1114
  end
3003
1115
 
3004
- # Stop sandbox
3005
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1116
+ # Set sandbox auto-delete interval
1117
+ # @param sandbox_id [String] ID of the sandbox
1118
+ # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
3006
1119
  # @param [Hash] opts the optional parameters
3007
1120
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3008
- # @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
3009
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
3010
- def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
1121
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1122
+ def set_auto_delete_interval_with_http_info(sandbox_id, interval, opts = {})
3011
1123
  if @api_client.config.debugging
3012
- @api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
1124
+ @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
3013
1125
  end
3014
- # verify the required parameter 'sandbox_id_or_name' is set
3015
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
3016
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
1126
+ # verify the required parameter 'sandbox_id' is set
1127
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1128
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_auto_delete_interval"
1129
+ end
1130
+ # verify the required parameter 'interval' is set
1131
+ if @api_client.config.client_side_validation && interval.nil?
1132
+ fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
3017
1133
  end
3018
1134
  # resource path
3019
- local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1135
+ local_var_path = '/sandbox/{sandboxId}/autodelete/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
3020
1136
 
3021
1137
  # query parameters
3022
1138
  query_params = opts[:query_params] || {}
3023
- query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
3024
1139
 
3025
1140
  # header parameters
3026
1141
  header_params = opts[:header_params] || {}
3027
- # HTTP header 'Accept' (if needed)
3028
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3029
1142
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3030
1143
 
3031
1144
  # form parameters
@@ -3035,13 +1148,13 @@ module DaytonaApiClient
3035
1148
  post_body = opts[:debug_body]
3036
1149
 
3037
1150
  # return_type
3038
- return_type = opts[:debug_return_type] || 'Sandbox'
1151
+ return_type = opts[:debug_return_type]
3039
1152
 
3040
1153
  # auth_names
3041
1154
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
3042
1155
 
3043
1156
  new_options = opts.merge(
3044
- :operation => :"SandboxApi.stop_sandbox",
1157
+ :operation => :"SandboxApi.set_auto_delete_interval",
3045
1158
  :header_params => header_params,
3046
1159
  :query_params => query_params,
3047
1160
  :form_params => form_params,
@@ -3052,56 +1165,55 @@ module DaytonaApiClient
3052
1165
 
3053
1166
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3054
1167
  if @api_client.config.debugging
3055
- @api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1168
+ @api_client.config.logger.debug "API called: SandboxApi#set_auto_delete_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3056
1169
  end
3057
1170
  return data, status_code, headers
3058
1171
  end
3059
1172
 
3060
- # Update sandbox last activity
1173
+ # Set sandbox auto-stop interval
3061
1174
  # @param sandbox_id [String] ID of the sandbox
1175
+ # @param interval [Float] Auto-stop interval in minutes (0 to disable)
3062
1176
  # @param [Hash] opts the optional parameters
3063
1177
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3064
- # @option opts [UpdateLastActivity] :update_last_activity
3065
1178
  # @return [nil]
3066
- def update_last_activity(sandbox_id, opts = {})
3067
- update_last_activity_with_http_info(sandbox_id, opts)
1179
+ def set_autostop_interval(sandbox_id, interval, opts = {})
1180
+ set_autostop_interval_with_http_info(sandbox_id, interval, opts)
3068
1181
  nil
3069
1182
  end
3070
1183
 
3071
- # Update sandbox last activity
1184
+ # Set sandbox auto-stop interval
3072
1185
  # @param sandbox_id [String] ID of the sandbox
1186
+ # @param interval [Float] Auto-stop interval in minutes (0 to disable)
3073
1187
  # @param [Hash] opts the optional parameters
3074
1188
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3075
- # @option opts [UpdateLastActivity] :update_last_activity
3076
1189
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3077
- def update_last_activity_with_http_info(sandbox_id, opts = {})
1190
+ def set_autostop_interval_with_http_info(sandbox_id, interval, opts = {})
3078
1191
  if @api_client.config.debugging
3079
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_last_activity ...'
1192
+ @api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
3080
1193
  end
3081
1194
  # verify the required parameter 'sandbox_id' is set
3082
1195
  if @api_client.config.client_side_validation && sandbox_id.nil?
3083
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_last_activity"
1196
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_autostop_interval"
1197
+ end
1198
+ # verify the required parameter 'interval' is set
1199
+ if @api_client.config.client_side_validation && interval.nil?
1200
+ fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
3084
1201
  end
3085
1202
  # resource path
3086
- local_var_path = '/sandbox/{sandboxId}/last-activity'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1203
+ local_var_path = '/sandbox/{sandboxId}/autostop/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
3087
1204
 
3088
1205
  # query parameters
3089
1206
  query_params = opts[:query_params] || {}
3090
1207
 
3091
1208
  # header parameters
3092
1209
  header_params = opts[:header_params] || {}
3093
- # HTTP header 'Content-Type'
3094
- content_type = @api_client.select_header_content_type(['application/json'])
3095
- if !content_type.nil?
3096
- header_params['Content-Type'] = content_type
3097
- end
3098
1210
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3099
1211
 
3100
1212
  # form parameters
3101
1213
  form_params = opts[:form_params] || {}
3102
1214
 
3103
1215
  # http body (model)
3104
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_last_activity'])
1216
+ post_body = opts[:debug_body]
3105
1217
 
3106
1218
  # return_type
3107
1219
  return_type = opts[:debug_return_type]
@@ -3110,7 +1222,7 @@ module DaytonaApiClient
3110
1222
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
3111
1223
 
3112
1224
  new_options = opts.merge(
3113
- :operation => :"SandboxApi.update_last_activity",
1225
+ :operation => :"SandboxApi.set_autostop_interval",
3114
1226
  :header_params => header_params,
3115
1227
  :query_params => query_params,
3116
1228
  :form_params => form_params,
@@ -3121,44 +1233,36 @@ module DaytonaApiClient
3121
1233
 
3122
1234
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3123
1235
  if @api_client.config.debugging
3124
- @api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1236
+ @api_client.config.logger.debug "API called: SandboxApi#set_autostop_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3125
1237
  end
3126
1238
  return data, status_code, headers
3127
1239
  end
3128
1240
 
3129
- # Update sandbox network settings
3130
- # Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
3131
- # @param sandbox_id_or_name [String] ID or name of the sandbox
3132
- # @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
1241
+ # Start sandbox
1242
+ # @param sandbox_id [String] ID of the sandbox
3133
1243
  # @param [Hash] opts the optional parameters
3134
1244
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3135
1245
  # @return [Sandbox]
3136
- def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
3137
- data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
1246
+ def start_sandbox(sandbox_id, opts = {})
1247
+ data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id, opts)
3138
1248
  data
3139
1249
  end
3140
1250
 
3141
- # Update sandbox network settings
3142
- # Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
3143
- # @param sandbox_id_or_name [String] ID or name of the sandbox
3144
- # @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
1251
+ # Start sandbox
1252
+ # @param sandbox_id [String] ID of the sandbox
3145
1253
  # @param [Hash] opts the optional parameters
3146
1254
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3147
1255
  # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
3148
- def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
1256
+ def start_sandbox_with_http_info(sandbox_id, opts = {})
3149
1257
  if @api_client.config.debugging
3150
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
3151
- end
3152
- # verify the required parameter 'sandbox_id_or_name' is set
3153
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
3154
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
1258
+ @api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
3155
1259
  end
3156
- # verify the required parameter 'update_sandbox_network_settings' is set
3157
- if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
3158
- fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
1260
+ # verify the required parameter 'sandbox_id' is set
1261
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1262
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.start_sandbox"
3159
1263
  end
3160
1264
  # resource path
3161
- local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1265
+ local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
3162
1266
 
3163
1267
  # query parameters
3164
1268
  query_params = opts[:query_params] || {}
@@ -3167,18 +1271,13 @@ module DaytonaApiClient
3167
1271
  header_params = opts[:header_params] || {}
3168
1272
  # HTTP header 'Accept' (if needed)
3169
1273
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3170
- # HTTP header 'Content-Type'
3171
- content_type = @api_client.select_header_content_type(['application/json'])
3172
- if !content_type.nil?
3173
- header_params['Content-Type'] = content_type
3174
- end
3175
1274
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3176
1275
 
3177
1276
  # form parameters
3178
1277
  form_params = opts[:form_params] || {}
3179
1278
 
3180
1279
  # http body (model)
3181
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
1280
+ post_body = opts[:debug_body]
3182
1281
 
3183
1282
  # return_type
3184
1283
  return_type = opts[:debug_return_type] || 'Sandbox'
@@ -3187,7 +1286,7 @@ module DaytonaApiClient
3187
1286
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
3188
1287
 
3189
1288
  new_options = opts.merge(
3190
- :operation => :"SandboxApi.update_network_settings",
1289
+ :operation => :"SandboxApi.start_sandbox",
3191
1290
  :header_params => header_params,
3192
1291
  :query_params => query_params,
3193
1292
  :form_params => form_params,
@@ -3198,50 +1297,42 @@ module DaytonaApiClient
3198
1297
 
3199
1298
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3200
1299
  if @api_client.config.debugging
3201
- @api_client.config.logger.debug "API called: SandboxApi#update_network_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1300
+ @api_client.config.logger.debug "API called: SandboxApi#start_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3202
1301
  end
3203
1302
  return data, status_code, headers
3204
1303
  end
3205
1304
 
3206
- # Update public status
3207
- # @param sandbox_id_or_name [String] ID or name of the sandbox
3208
- # @param is_public [Boolean] Public status to set
1305
+ # Stop sandbox
1306
+ # @param sandbox_id [String] ID of the sandbox
3209
1307
  # @param [Hash] opts the optional parameters
3210
1308
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3211
- # @return [Sandbox]
3212
- def update_public_status(sandbox_id_or_name, is_public, opts = {})
3213
- data, _status_code, _headers = update_public_status_with_http_info(sandbox_id_or_name, is_public, opts)
3214
- data
1309
+ # @return [nil]
1310
+ def stop_sandbox(sandbox_id, opts = {})
1311
+ stop_sandbox_with_http_info(sandbox_id, opts)
1312
+ nil
3215
1313
  end
3216
1314
 
3217
- # Update public status
3218
- # @param sandbox_id_or_name [String] ID or name of the sandbox
3219
- # @param is_public [Boolean] Public status to set
1315
+ # Stop sandbox
1316
+ # @param sandbox_id [String] ID of the sandbox
3220
1317
  # @param [Hash] opts the optional parameters
3221
1318
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3222
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
3223
- def update_public_status_with_http_info(sandbox_id_or_name, is_public, opts = {})
1319
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1320
+ def stop_sandbox_with_http_info(sandbox_id, opts = {})
3224
1321
  if @api_client.config.debugging
3225
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
3226
- end
3227
- # verify the required parameter 'sandbox_id_or_name' is set
3228
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
3229
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_public_status"
1322
+ @api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
3230
1323
  end
3231
- # verify the required parameter 'is_public' is set
3232
- if @api_client.config.client_side_validation && is_public.nil?
3233
- fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
1324
+ # verify the required parameter 'sandbox_id' is set
1325
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1326
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.stop_sandbox"
3234
1327
  end
3235
1328
  # resource path
3236
- local_var_path = '/sandbox/{sandboxIdOrName}/public/{isPublic}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'isPublic' + '}', CGI.escape(is_public.to_s))
1329
+ local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
3237
1330
 
3238
1331
  # query parameters
3239
1332
  query_params = opts[:query_params] || {}
3240
1333
 
3241
1334
  # header parameters
3242
1335
  header_params = opts[:header_params] || {}
3243
- # HTTP header 'Accept' (if needed)
3244
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3245
1336
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3246
1337
 
3247
1338
  # form parameters
@@ -3251,13 +1342,13 @@ module DaytonaApiClient
3251
1342
  post_body = opts[:debug_body]
3252
1343
 
3253
1344
  # return_type
3254
- return_type = opts[:debug_return_type] || 'Sandbox'
1345
+ return_type = opts[:debug_return_type]
3255
1346
 
3256
1347
  # auth_names
3257
1348
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
3258
1349
 
3259
1350
  new_options = opts.merge(
3260
- :operation => :"SandboxApi.update_public_status",
1351
+ :operation => :"SandboxApi.stop_sandbox",
3261
1352
  :header_params => header_params,
3262
1353
  :query_params => query_params,
3263
1354
  :form_params => form_params,
@@ -3268,73 +1359,64 @@ module DaytonaApiClient
3268
1359
 
3269
1360
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3270
1361
  if @api_client.config.debugging
3271
- @api_client.config.logger.debug "API called: SandboxApi#update_public_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1362
+ @api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3272
1363
  end
3273
1364
  return data, status_code, headers
3274
1365
  end
3275
1366
 
3276
- # Update sandbox secrets
3277
- # Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.
3278
- # @param sandbox_id_or_name [String] ID or name of the sandbox
3279
- # @param update_sandbox_secrets [UpdateSandboxSecrets]
1367
+ # Update public status
1368
+ # @param sandbox_id [String] ID of the sandbox
1369
+ # @param is_public [Boolean] Public status to set
3280
1370
  # @param [Hash] opts the optional parameters
3281
1371
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3282
- # @return [Sandbox]
3283
- def update_sandbox_secrets(sandbox_id_or_name, update_sandbox_secrets, opts = {})
3284
- data, _status_code, _headers = update_sandbox_secrets_with_http_info(sandbox_id_or_name, update_sandbox_secrets, opts)
3285
- data
1372
+ # @return [nil]
1373
+ def update_public_status(sandbox_id, is_public, opts = {})
1374
+ update_public_status_with_http_info(sandbox_id, is_public, opts)
1375
+ nil
3286
1376
  end
3287
1377
 
3288
- # Update sandbox secrets
3289
- # Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.
3290
- # @param sandbox_id_or_name [String] ID or name of the sandbox
3291
- # @param update_sandbox_secrets [UpdateSandboxSecrets]
1378
+ # Update public status
1379
+ # @param sandbox_id [String] ID of the sandbox
1380
+ # @param is_public [Boolean] Public status to set
3292
1381
  # @param [Hash] opts the optional parameters
3293
1382
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3294
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
3295
- def update_sandbox_secrets_with_http_info(sandbox_id_or_name, update_sandbox_secrets, opts = {})
1383
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1384
+ def update_public_status_with_http_info(sandbox_id, is_public, opts = {})
3296
1385
  if @api_client.config.debugging
3297
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_sandbox_secrets ...'
1386
+ @api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
3298
1387
  end
3299
- # verify the required parameter 'sandbox_id_or_name' is set
3300
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
3301
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_sandbox_secrets"
1388
+ # verify the required parameter 'sandbox_id' is set
1389
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1390
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_public_status"
3302
1391
  end
3303
- # verify the required parameter 'update_sandbox_secrets' is set
3304
- if @api_client.config.client_side_validation && update_sandbox_secrets.nil?
3305
- fail ArgumentError, "Missing the required parameter 'update_sandbox_secrets' when calling SandboxApi.update_sandbox_secrets"
1392
+ # verify the required parameter 'is_public' is set
1393
+ if @api_client.config.client_side_validation && is_public.nil?
1394
+ fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
3306
1395
  end
3307
1396
  # resource path
3308
- local_var_path = '/sandbox/{sandboxIdOrName}/secrets'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1397
+ local_var_path = '/sandbox/{sandboxId}/public/{isPublic}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'isPublic' + '}', CGI.escape(is_public.to_s))
3309
1398
 
3310
1399
  # query parameters
3311
1400
  query_params = opts[:query_params] || {}
3312
1401
 
3313
1402
  # header parameters
3314
1403
  header_params = opts[:header_params] || {}
3315
- # HTTP header 'Accept' (if needed)
3316
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3317
- # HTTP header 'Content-Type'
3318
- content_type = @api_client.select_header_content_type(['application/json'])
3319
- if !content_type.nil?
3320
- header_params['Content-Type'] = content_type
3321
- end
3322
1404
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3323
1405
 
3324
1406
  # form parameters
3325
1407
  form_params = opts[:form_params] || {}
3326
1408
 
3327
1409
  # http body (model)
3328
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_secrets)
1410
+ post_body = opts[:debug_body]
3329
1411
 
3330
1412
  # return_type
3331
- return_type = opts[:debug_return_type] || 'Sandbox'
1413
+ return_type = opts[:debug_return_type]
3332
1414
 
3333
1415
  # auth_names
3334
1416
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
3335
1417
 
3336
1418
  new_options = opts.merge(
3337
- :operation => :"SandboxApi.update_sandbox_secrets",
1419
+ :operation => :"SandboxApi.update_public_status",
3338
1420
  :header_params => header_params,
3339
1421
  :query_params => query_params,
3340
1422
  :form_params => form_params,
@@ -3343,9 +1425,9 @@ module DaytonaApiClient
3343
1425
  :return_type => return_type
3344
1426
  )
3345
1427
 
3346
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1428
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3347
1429
  if @api_client.config.debugging
3348
- @api_client.config.logger.debug "API called: SandboxApi#update_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1430
+ @api_client.config.logger.debug "API called: SandboxApi#update_public_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3349
1431
  end
3350
1432
  return data, status_code, headers
3351
1433
  end
@@ -3390,7 +1472,7 @@ module DaytonaApiClient
3390
1472
  # HTTP header 'Content-Type'
3391
1473
  content_type = @api_client.select_header_content_type(['application/json'])
3392
1474
  if !content_type.nil?
3393
- header_params['Content-Type'] = content_type
1475
+ header_params['Content-Type'] = content_type
3394
1476
  end
3395
1477
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3396
1478