daytona_api_client 0.195.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 (233) 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 +155 -1075
  12. data/lib/daytona_api_client/api/preview_api.rb +8 -77
  13. data/lib/daytona_api_client/api/runners_api.rb +22 -412
  14. data/lib/daytona_api_client/api/sandbox_api.rb +346 -1901
  15. data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
  16. data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
  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/command.rb +74 -3
  31. data/lib/daytona_api_client/models/completion_context.rb +74 -3
  32. data/lib/daytona_api_client/models/completion_item.rb +74 -3
  33. data/lib/daytona_api_client/models/completion_list.rb +74 -3
  34. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
  35. data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
  36. data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
  37. data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
  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 -17
  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 -56
  49. data/lib/daytona_api_client/models/create_session_request.rb +74 -3
  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 +74 -3
  56. data/lib/daytona_api_client/models/docker_registry.rb +76 -5
  57. data/lib/daytona_api_client/models/download_files.rb +74 -3
  58. data/lib/daytona_api_client/models/execute_request.rb +74 -3
  59. data/lib/daytona_api_client/models/execute_response.rb +74 -3
  60. data/lib/daytona_api_client/models/file_info.rb +74 -3
  61. data/lib/daytona_api_client/models/file_status.rb +74 -3
  62. data/lib/daytona_api_client/models/git_add_request.rb +74 -3
  63. data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
  64. data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
  65. data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
  66. data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
  67. data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
  68. data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
  69. data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
  70. data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
  71. data/lib/daytona_api_client/models/git_status.rb +74 -3
  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/keyboard_hotkey_request.rb +74 -3
  76. data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
  77. data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
  78. data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
  79. data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
  80. data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
  81. data/lib/daytona_api_client/models/lsp_location.rb +74 -3
  82. data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
  83. data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
  84. data/lib/daytona_api_client/models/match.rb +74 -3
  85. data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
  86. data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
  87. data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
  88. data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
  89. data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
  90. data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
  91. data/lib/daytona_api_client/models/mouse_position.rb +74 -3
  92. data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
  93. data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
  94. data/lib/daytona_api_client/models/oidc_config.rb +74 -3
  95. data/lib/daytona_api_client/models/organization.rb +159 -216
  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_jobs.rb → paginated_snapshots_dto.rb} +77 -6
  106. data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
  107. data/lib/daytona_api_client/models/position.rb +74 -3
  108. data/lib/daytona_api_client/models/posthog_config.rb +74 -3
  109. data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
  110. data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
  111. data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
  112. data/lib/daytona_api_client/models/process_status_response.rb +74 -3
  113. data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
  114. data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
  115. data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
  116. data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
  117. data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
  118. data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
  119. data/lib/daytona_api_client/models/range.rb +74 -3
  120. data/lib/daytona_api_client/models/region.rb +78 -181
  121. data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
  122. data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
  123. data/lib/daytona_api_client/models/replace_request.rb +74 -3
  124. data/lib/daytona_api_client/models/replace_result.rb +74 -3
  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 +104 -137
  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/{admin_create_organization.rb → sandbox_info.rb} +102 -48
  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 +74 -3
  136. data/lib/daytona_api_client/models/search_files_response.rb +74 -3
  137. data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
  138. data/lib/daytona_api_client/models/session.rb +74 -3
  139. data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
  140. data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
  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 -4
  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 +74 -3
  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/user_home_dir_response.rb +74 -3
  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/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
  160. data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
  161. data/lib/daytona_api_client/models/windows_response.rb +74 -3
  162. data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
  163. data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +344 -168
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +8 -65
  166. data/project.json +13 -38
  167. metadata +15 -76
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -222
  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 -1545
  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_model_base.rb +0 -88
  180. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
  181. data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -372
  182. data/lib/daytona_api_client/models/create_region.rb +0 -198
  183. data/lib/daytona_api_client/models/create_region_response.rb +0 -209
  184. data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
  185. data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -177
  186. data/lib/daytona_api_client/models/create_secret.rb +0 -214
  187. data/lib/daytona_api_client/models/date_filter.rb +0 -178
  188. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  189. data/lib/daytona_api_client/models/gpu_type.rb +0 -44
  190. data/lib/daytona_api_client/models/int_filter.rb +0 -222
  191. data/lib/daytona_api_client/models/job.rb +0 -366
  192. data/lib/daytona_api_client/models/job_status.rb +0 -43
  193. data/lib/daytona_api_client/models/job_type.rb +0 -54
  194. data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
  195. data/lib/daytona_api_client/models/list_secrets_response.rb +0 -207
  196. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  197. data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
  198. data/lib/daytona_api_client/models/metric_series.rb +0 -194
  199. data/lib/daytona_api_client/models/metrics_response.rb +0 -167
  200. data/lib/daytona_api_client/models/otel_config.rb +0 -188
  201. data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
  202. data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
  203. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  204. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
  205. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  206. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
  207. data/lib/daytona_api_client/models/region_quota.rb +0 -437
  208. data/lib/daytona_api_client/models/region_type.rb +0 -42
  209. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -515
  210. data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
  211. data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
  212. data/lib/daytona_api_client/models/runner_class.rb +0 -40
  213. data/lib/daytona_api_client/models/runner_full.rb +0 -757
  214. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
  215. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
  216. data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
  217. data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
  218. data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
  219. data/lib/daytona_api_client/models/secret.rb +0 -312
  220. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
  221. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
  222. data/lib/daytona_api_client/models/string_filter.rb +0 -182
  223. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
  224. data/lib/daytona_api_client/models/trace_span.rb +0 -332
  225. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  226. data/lib/daytona_api_client/models/update_job_status.rb +0 -207
  227. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  228. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -299
  229. data/lib/daytona_api_client/models/update_region.rb +0 -171
  230. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
  231. data/lib/daytona_api_client/models/update_secret.rb +0 -170
  232. data/lib/daytona_api_client/models/url.rb +0 -165
  233. 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,30 +82,30 @@ module DaytonaApiClient
84
82
  end
85
83
 
86
84
  # Create sandbox backup
87
- # @param sandbox_id_or_name [String] ID or name of the sandbox
85
+ # @param sandbox_id [String] ID of the sandbox
88
86
  # @param [Hash] opts the optional parameters
89
87
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
90
88
  # @return [Sandbox]
91
- def create_backup(sandbox_id_or_name, opts = {})
92
- 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)
93
91
  data
94
92
  end
95
93
 
96
94
  # Create sandbox backup
97
- # @param sandbox_id_or_name [String] ID or name of the sandbox
95
+ # @param sandbox_id [String] ID of the sandbox
98
96
  # @param [Hash] opts the optional parameters
99
97
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
100
98
  # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
101
- def create_backup_with_http_info(sandbox_id_or_name, opts = {})
99
+ def create_backup_with_http_info(sandbox_id, opts = {})
102
100
  if @api_client.config.debugging
103
101
  @api_client.config.logger.debug 'Calling API: SandboxApi.create_backup ...'
104
102
  end
105
- # verify the required parameter 'sandbox_id_or_name' is set
106
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
107
- 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"
108
106
  end
109
107
  # resource path
110
- 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))
111
109
 
112
110
  # query parameters
113
111
  query_params = opts[:query_params] || {}
@@ -183,7 +181,7 @@ module DaytonaApiClient
183
181
  # HTTP header 'Content-Type'
184
182
  content_type = @api_client.select_header_content_type(['application/json'])
185
183
  if !content_type.nil?
186
- header_params['Content-Type'] = content_type
184
+ header_params['Content-Type'] = content_type
187
185
  end
188
186
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
189
187
 
@@ -216,108 +214,33 @@ module DaytonaApiClient
216
214
  return data, status_code, headers
217
215
  end
218
216
 
219
- # Create a snapshot from a sandbox
220
- # @param sandbox_id_or_name [String]
221
- # @param create_sandbox_snapshot [CreateSandboxSnapshot]
222
- # @param [Hash] opts the optional parameters
223
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
224
- # @return [Sandbox]
225
- def create_sandbox_snapshot(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
226
- data, _status_code, _headers = create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts)
227
- data
228
- end
229
-
230
- # Create a snapshot from a sandbox
231
- # @param sandbox_id_or_name [String]
232
- # @param create_sandbox_snapshot [CreateSandboxSnapshot]
233
- # @param [Hash] opts the optional parameters
234
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
235
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
236
- def create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
237
- if @api_client.config.debugging
238
- @api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox_snapshot ...'
239
- end
240
- # verify the required parameter 'sandbox_id_or_name' is set
241
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
242
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_sandbox_snapshot"
243
- end
244
- # verify the required parameter 'create_sandbox_snapshot' is set
245
- if @api_client.config.client_side_validation && create_sandbox_snapshot.nil?
246
- fail ArgumentError, "Missing the required parameter 'create_sandbox_snapshot' when calling SandboxApi.create_sandbox_snapshot"
247
- end
248
- # resource path
249
- local_var_path = '/sandbox/{sandboxIdOrName}/snapshot'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
250
-
251
- # query parameters
252
- query_params = opts[:query_params] || {}
253
-
254
- # header parameters
255
- header_params = opts[:header_params] || {}
256
- # HTTP header 'Accept' (if needed)
257
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
258
- # HTTP header 'Content-Type'
259
- content_type = @api_client.select_header_content_type(['application/json'])
260
- if !content_type.nil?
261
- header_params['Content-Type'] = content_type
262
- end
263
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
264
-
265
- # form parameters
266
- form_params = opts[:form_params] || {}
267
-
268
- # http body (model)
269
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_snapshot)
270
-
271
- # return_type
272
- return_type = opts[:debug_return_type] || 'Sandbox'
273
-
274
- # auth_names
275
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
276
-
277
- new_options = opts.merge(
278
- :operation => :"SandboxApi.create_sandbox_snapshot",
279
- :header_params => header_params,
280
- :query_params => query_params,
281
- :form_params => form_params,
282
- :body => post_body,
283
- :auth_names => auth_names,
284
- :return_type => return_type
285
- )
286
-
287
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
288
- if @api_client.config.debugging
289
- @api_client.config.logger.debug "API called: SandboxApi#create_sandbox_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
- end
291
- return data, status_code, headers
292
- end
293
-
294
217
  # Create SSH access for sandbox
295
- # @param sandbox_id_or_name [String] ID or name of the sandbox
218
+ # @param sandbox_id [String] ID of the sandbox
296
219
  # @param [Hash] opts the optional parameters
297
220
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
298
221
  # @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
299
222
  # @return [SshAccessDto]
300
- def create_ssh_access(sandbox_id_or_name, opts = {})
301
- 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)
302
225
  data
303
226
  end
304
227
 
305
228
  # Create SSH access for sandbox
306
- # @param sandbox_id_or_name [String] ID or name of the sandbox
229
+ # @param sandbox_id [String] ID of the sandbox
307
230
  # @param [Hash] opts the optional parameters
308
231
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
309
232
  # @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
310
233
  # @return [Array<(SshAccessDto, Integer, Hash)>] SshAccessDto data, response status code and response headers
311
- def create_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
234
+ def create_ssh_access_with_http_info(sandbox_id, opts = {})
312
235
  if @api_client.config.debugging
313
236
  @api_client.config.logger.debug 'Calling API: SandboxApi.create_ssh_access ...'
314
237
  end
315
- # verify the required parameter 'sandbox_id_or_name' is set
316
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
317
- 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"
318
241
  end
319
242
  # resource path
320
- 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))
321
244
 
322
245
  # query parameters
323
246
  query_params = opts[:query_params] || {}
@@ -359,38 +282,36 @@ module DaytonaApiClient
359
282
  end
360
283
 
361
284
  # Delete sandbox
362
- # @param sandbox_id_or_name [String] ID or name of the sandbox
285
+ # @param sandbox_id [String] ID of the sandbox
363
286
  # @param [Hash] opts the optional parameters
364
287
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
365
- # @return [Sandbox]
366
- def delete_sandbox(sandbox_id_or_name, opts = {})
367
- data, _status_code, _headers = delete_sandbox_with_http_info(sandbox_id_or_name, opts)
368
- data
288
+ # @return [nil]
289
+ def delete_sandbox(sandbox_id, opts = {})
290
+ delete_sandbox_with_http_info(sandbox_id, opts)
291
+ nil
369
292
  end
370
293
 
371
294
  # Delete sandbox
372
- # @param sandbox_id_or_name [String] ID or name of the sandbox
295
+ # @param sandbox_id [String] ID of the sandbox
373
296
  # @param [Hash] opts the optional parameters
374
297
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
375
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
376
- 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 = {})
377
300
  if @api_client.config.debugging
378
301
  @api_client.config.logger.debug 'Calling API: SandboxApi.delete_sandbox ...'
379
302
  end
380
- # verify the required parameter 'sandbox_id_or_name' is set
381
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
382
- 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"
383
306
  end
384
307
  # resource path
385
- 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))
386
309
 
387
310
  # query parameters
388
311
  query_params = opts[:query_params] || {}
389
312
 
390
313
  # header parameters
391
314
  header_params = opts[:header_params] || {}
392
- # HTTP header 'Accept' (if needed)
393
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
394
315
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
395
316
 
396
317
  # form parameters
@@ -400,7 +321,7 @@ module DaytonaApiClient
400
321
  post_body = opts[:debug_body]
401
322
 
402
323
  # return_type
403
- return_type = opts[:debug_return_type] || 'Sandbox'
324
+ return_type = opts[:debug_return_type]
404
325
 
405
326
  # auth_names
406
327
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -422,46 +343,37 @@ module DaytonaApiClient
422
343
  return data, status_code, headers
423
344
  end
424
345
 
425
- # Expire signed preview URL for a sandbox port
426
- # @param sandbox_id_or_name [String] ID or name of the sandbox
427
- # @param port [Integer] Port number to expire signed preview URL for
428
- # @param token [String] Token to expire signed preview URL for
346
+ # Get build logs
347
+ # @param sandbox_id [String] ID of the sandbox
429
348
  # @param [Hash] opts the optional parameters
430
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
431
351
  # @return [nil]
432
- def expire_signed_port_preview_url(sandbox_id_or_name, port, token, opts = {})
433
- 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)
434
354
  nil
435
355
  end
436
356
 
437
- # Expire signed preview URL for a sandbox port
438
- # @param sandbox_id_or_name [String] ID or name of the sandbox
439
- # @param port [Integer] Port number to expire signed preview URL for
440
- # @param token [String] Token to expire signed preview URL for
357
+ # Get build logs
358
+ # @param sandbox_id [String] ID of the sandbox
441
359
  # @param [Hash] opts the optional parameters
442
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
443
362
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
444
- 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 = {})
445
364
  if @api_client.config.debugging
446
- @api_client.config.logger.debug 'Calling API: SandboxApi.expire_signed_port_preview_url ...'
447
- end
448
- # verify the required parameter 'sandbox_id_or_name' is set
449
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
450
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.expire_signed_port_preview_url"
451
- end
452
- # verify the required parameter 'port' is set
453
- if @api_client.config.client_side_validation && port.nil?
454
- 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 ...'
455
366
  end
456
- # verify the required parameter 'token' is set
457
- if @api_client.config.client_side_validation && token.nil?
458
- 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"
459
370
  end
460
371
  # resource path
461
- 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))
462
373
 
463
374
  # query parameters
464
375
  query_params = opts[:query_params] || {}
376
+ query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
465
377
 
466
378
  # header parameters
467
379
  header_params = opts[:header_params] || {}
@@ -480,7 +392,7 @@ module DaytonaApiClient
480
392
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
481
393
 
482
394
  new_options = opts.merge(
483
- :operation => :"SandboxApi.expire_signed_port_preview_url",
395
+ :operation => :"SandboxApi.get_build_logs",
484
396
  :header_params => header_params,
485
397
  :query_params => query_params,
486
398
  :form_params => form_params,
@@ -489,44 +401,44 @@ module DaytonaApiClient
489
401
  :return_type => return_type
490
402
  )
491
403
 
492
- 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)
493
405
  if @api_client.config.debugging
494
- @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}"
495
407
  end
496
408
  return data, status_code, headers
497
409
  end
498
410
 
499
- # Fork a sandbox
500
- # @param sandbox_id_or_name [String]
501
- # @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
502
414
  # @param [Hash] opts the optional parameters
503
415
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
504
- # @return [Sandbox]
505
- def fork_sandbox(sandbox_id_or_name, fork_sandbox, opts = {})
506
- 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)
507
419
  data
508
420
  end
509
421
 
510
- # Fork a sandbox
511
- # @param sandbox_id_or_name [String]
512
- # @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
513
425
  # @param [Hash] opts the optional parameters
514
426
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
515
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
516
- 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 = {})
517
429
  if @api_client.config.debugging
518
- @api_client.config.logger.debug 'Calling API: SandboxApi.fork_sandbox ...'
430
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
519
431
  end
520
- # verify the required parameter 'sandbox_id_or_name' is set
521
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
522
- 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"
523
435
  end
524
- # verify the required parameter 'fork_sandbox' is set
525
- if @api_client.config.client_side_validation && fork_sandbox.nil?
526
- 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"
527
439
  end
528
440
  # resource path
529
- 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))
530
442
 
531
443
  # query parameters
532
444
  query_params = opts[:query_params] || {}
@@ -535,27 +447,22 @@ module DaytonaApiClient
535
447
  header_params = opts[:header_params] || {}
536
448
  # HTTP header 'Accept' (if needed)
537
449
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
538
- # HTTP header 'Content-Type'
539
- content_type = @api_client.select_header_content_type(['application/json'])
540
- if !content_type.nil?
541
- header_params['Content-Type'] = content_type
542
- end
543
450
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
544
451
 
545
452
  # form parameters
546
453
  form_params = opts[:form_params] || {}
547
454
 
548
455
  # http body (model)
549
- post_body = opts[:debug_body] || @api_client.object_to_http_body(fork_sandbox)
456
+ post_body = opts[:debug_body]
550
457
 
551
458
  # return_type
552
- return_type = opts[:debug_return_type] || 'Sandbox'
459
+ return_type = opts[:debug_return_type] || 'PortPreviewUrl'
553
460
 
554
461
  # auth_names
555
462
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
556
463
 
557
464
  new_options = opts.merge(
558
- :operation => :"SandboxApi.fork_sandbox",
465
+ :operation => :"SandboxApi.get_port_preview_url",
559
466
  :header_params => header_params,
560
467
  :query_params => query_params,
561
468
  :form_params => form_params,
@@ -564,49 +471,49 @@ module DaytonaApiClient
564
471
  :return_type => return_type
565
472
  )
566
473
 
567
- 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)
568
475
  if @api_client.config.debugging
569
- @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}"
570
477
  end
571
478
  return data, status_code, headers
572
479
  end
573
480
 
574
- # Get build logs
575
- # This endpoint is deprecated. Use `getBuildLogsUrl` instead.
576
- # @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
577
483
  # @param [Hash] opts the optional parameters
578
484
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
579
- # @option opts [Boolean] :follow Whether to follow the logs stream
580
- # @return [nil]
581
- def get_build_logs(sandbox_id_or_name, opts = {})
582
- get_build_logs_with_http_info(sandbox_id_or_name, opts)
583
- 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
584
490
  end
585
491
 
586
- # Get build logs
587
- # This endpoint is deprecated. Use &#x60;getBuildLogsUrl&#x60; instead.
588
- # @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
589
494
  # @param [Hash] opts the optional parameters
590
495
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
591
- # @option opts [Boolean] :follow Whether to follow the logs stream
592
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
593
- 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 = {})
594
499
  if @api_client.config.debugging
595
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
500
+ @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
596
501
  end
597
- # verify the required parameter 'sandbox_id_or_name' is set
598
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
599
- 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"
600
505
  end
601
506
  # resource path
602
- 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))
603
508
 
604
509
  # query parameters
605
510
  query_params = opts[:query_params] || {}
606
- query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
511
+ query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
607
512
 
608
513
  # header parameters
609
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']
610
517
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
611
518
 
612
519
  # form parameters
@@ -616,13 +523,13 @@ module DaytonaApiClient
616
523
  post_body = opts[:debug_body]
617
524
 
618
525
  # return_type
619
- return_type = opts[:debug_return_type]
526
+ return_type = opts[:debug_return_type] || 'Sandbox'
620
527
 
621
528
  # auth_names
622
529
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
623
530
 
624
531
  new_options = opts.merge(
625
- :operation => :"SandboxApi.get_build_logs",
532
+ :operation => :"SandboxApi.get_sandbox",
626
533
  :header_params => header_params,
627
534
  :query_params => query_params,
628
535
  :form_params => form_params,
@@ -633,36 +540,30 @@ module DaytonaApiClient
633
540
 
634
541
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
635
542
  if @api_client.config.debugging
636
- @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}"
637
544
  end
638
545
  return data, status_code, headers
639
546
  end
640
547
 
641
- # Get build logs URL
642
- # @param sandbox_id_or_name [String] ID or name of the sandbox
548
+ # List all regions where sandboxes have been created
643
549
  # @param [Hash] opts the optional parameters
644
550
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
645
- # @return [Url]
646
- def get_build_logs_url(sandbox_id_or_name, opts = {})
647
- 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)
648
554
  data
649
555
  end
650
556
 
651
- # Get build logs URL
652
- # @param sandbox_id_or_name [String] ID or name of the sandbox
557
+ # List all regions where sandboxes have been created
653
558
  # @param [Hash] opts the optional parameters
654
559
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
655
- # @return [Array<(Url, Integer, Hash)>] Url data, response status code and response headers
656
- 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 = {})
657
562
  if @api_client.config.debugging
658
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs_url ...'
659
- end
660
- # verify the required parameter 'sandbox_id_or_name' is set
661
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
662
- 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 ...'
663
564
  end
664
565
  # resource path
665
- local_var_path = '/sandbox/{sandboxIdOrName}/build-logs-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
566
+ local_var_path = '/sandbox/regions'
666
567
 
667
568
  # query parameters
668
569
  query_params = opts[:query_params] || {}
@@ -680,13 +581,13 @@ module DaytonaApiClient
680
581
  post_body = opts[:debug_body]
681
582
 
682
583
  # return_type
683
- return_type = opts[:debug_return_type] || 'Url'
584
+ return_type = opts[:debug_return_type] || 'Array<Region>'
684
585
 
685
586
  # auth_names
686
587
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
687
588
 
688
589
  new_options = opts.merge(
689
- :operation => :"SandboxApi.get_build_logs_url",
590
+ :operation => :"SandboxApi.get_sandbox_regions",
690
591
  :header_params => header_params,
691
592
  :query_params => query_params,
692
593
  :form_params => form_params,
@@ -697,39 +598,39 @@ module DaytonaApiClient
697
598
 
698
599
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
699
600
  if @api_client.config.debugging
700
- @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}"
701
602
  end
702
603
  return data, status_code, headers
703
604
  end
704
605
 
705
- # Get organization by sandbox ID
706
- # @param sandbox_id [String] ID of the sandbox
606
+ # Get sandboxes for the authenticated runner
707
607
  # @param [Hash] opts the optional parameters
708
608
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
709
- # @return [Organization]
710
- def get_organization_by_sandbox_id(sandbox_id, opts = {})
711
- 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)
712
614
  data
713
615
  end
714
616
 
715
- # Get organization by sandbox ID
716
- # @param sandbox_id [String] ID of the sandbox
617
+ # Get sandboxes for the authenticated runner
717
618
  # @param [Hash] opts the optional parameters
718
619
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
719
- # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
720
- 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 = {})
721
624
  if @api_client.config.debugging
722
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_organization_by_sandbox_id ...'
723
- end
724
- # verify the required parameter 'sandbox_id' is set
725
- if @api_client.config.client_side_validation && sandbox_id.nil?
726
- 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 ...'
727
626
  end
728
627
  # resource path
729
- local_var_path = '/sandbox/{sandboxId}/organization'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
628
+ local_var_path = '/sandbox/for-runner'
730
629
 
731
630
  # query parameters
732
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?
733
634
 
734
635
  # header parameters
735
636
  header_params = opts[:header_params] || {}
@@ -744,13 +645,13 @@ module DaytonaApiClient
744
645
  post_body = opts[:debug_body]
745
646
 
746
647
  # return_type
747
- return_type = opts[:debug_return_type] || 'Organization'
648
+ return_type = opts[:debug_return_type] || 'Array<Sandbox>'
748
649
 
749
650
  # auth_names
750
651
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
751
652
 
752
653
  new_options = opts.merge(
753
- :operation => :"SandboxApi.get_organization_by_sandbox_id",
654
+ :operation => :"SandboxApi.get_sandboxes_for_runner",
754
655
  :header_params => header_params,
755
656
  :query_params => query_params,
756
657
  :form_params => form_params,
@@ -761,45 +662,42 @@ module DaytonaApiClient
761
662
 
762
663
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
763
664
  if @api_client.config.debugging
764
- @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}"
765
666
  end
766
667
  return data, status_code, headers
767
668
  end
768
669
 
769
- # Get preview URL for a sandbox port
770
- # @param sandbox_id_or_name [String] ID or name of the sandbox
771
- # @param port [Float] Port number to get preview URL for
670
+ # List all sandboxes
772
671
  # @param [Hash] opts the optional parameters
773
672
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
774
- # @return [PortPreviewUrl]
775
- def get_port_preview_url(sandbox_id_or_name, port, opts = {})
776
- 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)
777
679
  data
778
680
  end
779
681
 
780
- # Get preview URL for a sandbox port
781
- # @param sandbox_id_or_name [String] ID or name of the sandbox
782
- # @param port [Float] Port number to get preview URL for
682
+ # List all sandboxes
783
683
  # @param [Hash] opts the optional parameters
784
684
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
785
- # @return [Array<(PortPreviewUrl, Integer, Hash)>] PortPreviewUrl data, response status code and response headers
786
- 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 = {})
787
690
  if @api_client.config.debugging
788
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
789
- end
790
- # verify the required parameter 'sandbox_id_or_name' is set
791
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
792
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_port_preview_url"
793
- end
794
- # verify the required parameter 'port' is set
795
- if @api_client.config.client_side_validation && port.nil?
796
- 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 ...'
797
692
  end
798
693
  # resource path
799
- 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'
800
695
 
801
696
  # query parameters
802
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?
803
701
 
804
702
  # header parameters
805
703
  header_params = opts[:header_params] || {}
@@ -814,13 +712,13 @@ module DaytonaApiClient
814
712
  post_body = opts[:debug_body]
815
713
 
816
714
  # return_type
817
- return_type = opts[:debug_return_type] || 'PortPreviewUrl'
715
+ return_type = opts[:debug_return_type] || 'Array<Sandbox>'
818
716
 
819
717
  # auth_names
820
718
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
821
719
 
822
720
  new_options = opts.merge(
823
- :operation => :"SandboxApi.get_port_preview_url",
721
+ :operation => :"SandboxApi.list_sandboxes",
824
722
  :header_params => header_params,
825
723
  :query_params => query_params,
826
724
  :form_params => form_params,
@@ -831,1070 +729,44 @@ module DaytonaApiClient
831
729
 
832
730
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
833
731
  if @api_client.config.debugging
834
- @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}"
835
733
  end
836
734
  return data, status_code, headers
837
735
  end
838
736
 
839
- # Get region quota by sandbox ID
840
- # @param sandbox_id [String] ID of the sandbox
737
+ # List all sandboxes paginated
841
738
  # @param [Hash] opts the optional parameters
842
739
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
843
- # @return [RegionQuota]
844
- def get_region_quota_by_sandbox_id(sandbox_id, opts = {})
845
- 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)
846
761
  data
847
762
  end
848
763
 
849
- # Get region quota by sandbox ID
850
- # @param sandbox_id [String] ID of the sandbox
851
- # @param [Hash] opts the optional parameters
852
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
853
- # @return [Array<(RegionQuota, Integer, Hash)>] RegionQuota data, response status code and response headers
854
- def get_region_quota_by_sandbox_id_with_http_info(sandbox_id, opts = {})
855
- if @api_client.config.debugging
856
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_region_quota_by_sandbox_id ...'
857
- end
858
- # verify the required parameter 'sandbox_id' is set
859
- if @api_client.config.client_side_validation && sandbox_id.nil?
860
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_region_quota_by_sandbox_id"
861
- end
862
- # resource path
863
- local_var_path = '/sandbox/{sandboxId}/region-quota'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
864
-
865
- # query parameters
866
- query_params = opts[:query_params] || {}
867
-
868
- # header parameters
869
- header_params = opts[:header_params] || {}
870
- # HTTP header 'Accept' (if needed)
871
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
872
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
873
-
874
- # form parameters
875
- form_params = opts[:form_params] || {}
876
-
877
- # http body (model)
878
- post_body = opts[:debug_body]
879
-
880
- # return_type
881
- return_type = opts[:debug_return_type] || 'RegionQuota'
882
-
883
- # auth_names
884
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
885
-
886
- new_options = opts.merge(
887
- :operation => :"SandboxApi.get_region_quota_by_sandbox_id",
888
- :header_params => header_params,
889
- :query_params => query_params,
890
- :form_params => form_params,
891
- :body => post_body,
892
- :auth_names => auth_names,
893
- :return_type => return_type
894
- )
895
-
896
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
897
- if @api_client.config.debugging
898
- @api_client.config.logger.debug "API called: SandboxApi#get_region_quota_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
899
- end
900
- return data, status_code, headers
901
- end
902
-
903
- # Get sandbox details
904
- # @param sandbox_id_or_name [String] ID or name of the sandbox
905
- # @param [Hash] opts the optional parameters
906
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
907
- # @option opts [Boolean] :verbose Include verbose output
908
- # @return [Sandbox]
909
- def get_sandbox(sandbox_id_or_name, opts = {})
910
- data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id_or_name, opts)
911
- data
912
- end
913
-
914
- # Get sandbox details
915
- # @param sandbox_id_or_name [String] ID or name of the sandbox
916
- # @param [Hash] opts the optional parameters
917
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
918
- # @option opts [Boolean] :verbose Include verbose output
919
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
920
- def get_sandbox_with_http_info(sandbox_id_or_name, opts = {})
921
- if @api_client.config.debugging
922
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
923
- end
924
- # verify the required parameter 'sandbox_id_or_name' is set
925
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
926
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox"
927
- end
928
- # resource path
929
- local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
930
-
931
- # query parameters
932
- query_params = opts[:query_params] || {}
933
- query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
934
-
935
- # header parameters
936
- header_params = opts[:header_params] || {}
937
- # HTTP header 'Accept' (if needed)
938
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
939
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
940
-
941
- # form parameters
942
- form_params = opts[:form_params] || {}
943
-
944
- # http body (model)
945
- post_body = opts[:debug_body]
946
-
947
- # return_type
948
- return_type = opts[:debug_return_type] || 'Sandbox'
949
-
950
- # auth_names
951
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
952
-
953
- new_options = opts.merge(
954
- :operation => :"SandboxApi.get_sandbox",
955
- :header_params => header_params,
956
- :query_params => query_params,
957
- :form_params => form_params,
958
- :body => post_body,
959
- :auth_names => auth_names,
960
- :return_type => return_type
961
- )
962
-
963
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
964
- if @api_client.config.debugging
965
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
966
- end
967
- return data, status_code, headers
968
- end
969
-
970
- # Get sandbox fork ancestor chain
971
- # @param sandbox_id_or_name [String]
972
- # @param [Hash] opts the optional parameters
973
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
974
- # @return [Array<Sandbox>]
975
- def get_sandbox_ancestors(sandbox_id_or_name, opts = {})
976
- data, _status_code, _headers = get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts)
977
- data
978
- end
979
-
980
- # Get sandbox fork ancestor chain
981
- # @param sandbox_id_or_name [String]
982
- # @param [Hash] opts the optional parameters
983
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
984
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
985
- def get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts = {})
986
- if @api_client.config.debugging
987
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_ancestors ...'
988
- end
989
- # verify the required parameter 'sandbox_id_or_name' is set
990
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
991
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_ancestors"
992
- end
993
- # resource path
994
- local_var_path = '/sandbox/{sandboxIdOrName}/ancestors'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
995
-
996
- # query parameters
997
- query_params = opts[:query_params] || {}
998
-
999
- # header parameters
1000
- header_params = opts[:header_params] || {}
1001
- # HTTP header 'Accept' (if needed)
1002
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1003
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1004
-
1005
- # form parameters
1006
- form_params = opts[:form_params] || {}
1007
-
1008
- # http body (model)
1009
- post_body = opts[:debug_body]
1010
-
1011
- # return_type
1012
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1013
-
1014
- # auth_names
1015
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1016
-
1017
- new_options = opts.merge(
1018
- :operation => :"SandboxApi.get_sandbox_ancestors",
1019
- :header_params => header_params,
1020
- :query_params => query_params,
1021
- :form_params => form_params,
1022
- :body => post_body,
1023
- :auth_names => auth_names,
1024
- :return_type => return_type
1025
- )
1026
-
1027
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1028
- if @api_client.config.debugging
1029
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_ancestors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1030
- end
1031
- return data, status_code, headers
1032
- end
1033
-
1034
- # Get sandbox fork children
1035
- # @param sandbox_id_or_name [String]
1036
- # @param [Hash] opts the optional parameters
1037
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1038
- # @option opts [Boolean] :include_destroyed
1039
- # @return [Array<Sandbox>]
1040
- def get_sandbox_forks(sandbox_id_or_name, opts = {})
1041
- data, _status_code, _headers = get_sandbox_forks_with_http_info(sandbox_id_or_name, opts)
1042
- data
1043
- end
1044
-
1045
- # Get sandbox fork children
1046
- # @param sandbox_id_or_name [String]
1047
- # @param [Hash] opts the optional parameters
1048
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1049
- # @option opts [Boolean] :include_destroyed
1050
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
1051
- def get_sandbox_forks_with_http_info(sandbox_id_or_name, opts = {})
1052
- if @api_client.config.debugging
1053
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_forks ...'
1054
- end
1055
- # verify the required parameter 'sandbox_id_or_name' is set
1056
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1057
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_forks"
1058
- end
1059
- # resource path
1060
- local_var_path = '/sandbox/{sandboxIdOrName}/forks'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1061
-
1062
- # query parameters
1063
- query_params = opts[:query_params] || {}
1064
- query_params[:'includeDestroyed'] = opts[:'include_destroyed'] if !opts[:'include_destroyed'].nil?
1065
-
1066
- # header parameters
1067
- header_params = opts[:header_params] || {}
1068
- # HTTP header 'Accept' (if needed)
1069
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1070
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1071
-
1072
- # form parameters
1073
- form_params = opts[:form_params] || {}
1074
-
1075
- # http body (model)
1076
- post_body = opts[:debug_body]
1077
-
1078
- # return_type
1079
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1080
-
1081
- # auth_names
1082
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1083
-
1084
- new_options = opts.merge(
1085
- :operation => :"SandboxApi.get_sandbox_forks",
1086
- :header_params => header_params,
1087
- :query_params => query_params,
1088
- :form_params => form_params,
1089
- :body => post_body,
1090
- :auth_names => auth_names,
1091
- :return_type => return_type
1092
- )
1093
-
1094
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1095
- if @api_client.config.debugging
1096
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_forks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1097
- end
1098
- return data, status_code, headers
1099
- end
1100
-
1101
- # Get sandbox logs
1102
- # Retrieve OTEL logs for a sandbox within a time range
1103
- # @param sandbox_id [String] ID of the sandbox
1104
- # @param from [Time] Start of time range (ISO 8601)
1105
- # @param to [Time] End of time range (ISO 8601)
1106
- # @param [Hash] opts the optional parameters
1107
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1108
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1109
- # @option opts [Float] :limit Number of items per page (default to 100)
1110
- # @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
1111
- # @option opts [String] :search Search in log body
1112
- # @return [PaginatedLogs]
1113
- def get_sandbox_logs(sandbox_id, from, to, opts = {})
1114
- data, _status_code, _headers = get_sandbox_logs_with_http_info(sandbox_id, from, to, opts)
1115
- data
1116
- end
1117
-
1118
- # Get sandbox logs
1119
- # Retrieve OTEL logs for a sandbox within a time range
1120
- # @param sandbox_id [String] ID of the sandbox
1121
- # @param from [Time] Start of time range (ISO 8601)
1122
- # @param to [Time] End of time range (ISO 8601)
1123
- # @param [Hash] opts the optional parameters
1124
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1125
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1126
- # @option opts [Float] :limit Number of items per page (default to 100)
1127
- # @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
1128
- # @option opts [String] :search Search in log body
1129
- # @return [Array<(PaginatedLogs, Integer, Hash)>] PaginatedLogs data, response status code and response headers
1130
- def get_sandbox_logs_with_http_info(sandbox_id, from, to, opts = {})
1131
- if @api_client.config.debugging
1132
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_logs ...'
1133
- end
1134
- # verify the required parameter 'sandbox_id' is set
1135
- if @api_client.config.client_side_validation && sandbox_id.nil?
1136
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_logs"
1137
- end
1138
- # verify the required parameter 'from' is set
1139
- if @api_client.config.client_side_validation && from.nil?
1140
- fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_logs"
1141
- end
1142
- # verify the required parameter 'to' is set
1143
- if @api_client.config.client_side_validation && to.nil?
1144
- fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_logs"
1145
- end
1146
- # resource path
1147
- local_var_path = '/sandbox/{sandboxId}/telemetry/logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1148
-
1149
- # query parameters
1150
- query_params = opts[:query_params] || {}
1151
- query_params[:'from'] = from
1152
- query_params[:'to'] = to
1153
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1154
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1155
- query_params[:'severities'] = @api_client.build_collection_param(opts[:'severities'], :multi) if !opts[:'severities'].nil?
1156
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1157
-
1158
- # header parameters
1159
- header_params = opts[:header_params] || {}
1160
- # HTTP header 'Accept' (if needed)
1161
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1162
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1163
-
1164
- # form parameters
1165
- form_params = opts[:form_params] || {}
1166
-
1167
- # http body (model)
1168
- post_body = opts[:debug_body]
1169
-
1170
- # return_type
1171
- return_type = opts[:debug_return_type] || 'PaginatedLogs'
1172
-
1173
- # auth_names
1174
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1175
-
1176
- new_options = opts.merge(
1177
- :operation => :"SandboxApi.get_sandbox_logs",
1178
- :header_params => header_params,
1179
- :query_params => query_params,
1180
- :form_params => form_params,
1181
- :body => post_body,
1182
- :auth_names => auth_names,
1183
- :return_type => return_type
1184
- )
1185
-
1186
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1187
- if @api_client.config.debugging
1188
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1189
- end
1190
- return data, status_code, headers
1191
- end
1192
-
1193
- # Get sandbox metrics
1194
- # Retrieve OTEL metrics for a sandbox within a time range
1195
- # @param sandbox_id [String] ID of the sandbox
1196
- # @param from [Time] Start of time range (ISO 8601)
1197
- # @param to [Time] End of time range (ISO 8601)
1198
- # @param [Hash] opts the optional parameters
1199
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1200
- # @option opts [Array<String>] :metric_names Filter by metric names
1201
- # @return [MetricsResponse]
1202
- def get_sandbox_metrics(sandbox_id, from, to, opts = {})
1203
- data, _status_code, _headers = get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts)
1204
- data
1205
- end
1206
-
1207
- # Get sandbox metrics
1208
- # Retrieve OTEL metrics for a sandbox within a time range
1209
- # @param sandbox_id [String] ID of the sandbox
1210
- # @param from [Time] Start of time range (ISO 8601)
1211
- # @param to [Time] End of time range (ISO 8601)
1212
- # @param [Hash] opts the optional parameters
1213
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1214
- # @option opts [Array<String>] :metric_names Filter by metric names
1215
- # @return [Array<(MetricsResponse, Integer, Hash)>] MetricsResponse data, response status code and response headers
1216
- def get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts = {})
1217
- if @api_client.config.debugging
1218
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_metrics ...'
1219
- end
1220
- # verify the required parameter 'sandbox_id' is set
1221
- if @api_client.config.client_side_validation && sandbox_id.nil?
1222
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_metrics"
1223
- end
1224
- # verify the required parameter 'from' is set
1225
- if @api_client.config.client_side_validation && from.nil?
1226
- fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_metrics"
1227
- end
1228
- # verify the required parameter 'to' is set
1229
- if @api_client.config.client_side_validation && to.nil?
1230
- fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_metrics"
1231
- end
1232
- # resource path
1233
- local_var_path = '/sandbox/{sandboxId}/telemetry/metrics'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1234
-
1235
- # query parameters
1236
- query_params = opts[:query_params] || {}
1237
- query_params[:'from'] = from
1238
- query_params[:'to'] = to
1239
- query_params[:'metricNames'] = @api_client.build_collection_param(opts[:'metric_names'], :multi) if !opts[:'metric_names'].nil?
1240
-
1241
- # header parameters
1242
- header_params = opts[:header_params] || {}
1243
- # HTTP header 'Accept' (if needed)
1244
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1245
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1246
-
1247
- # form parameters
1248
- form_params = opts[:form_params] || {}
1249
-
1250
- # http body (model)
1251
- post_body = opts[:debug_body]
1252
-
1253
- # return_type
1254
- return_type = opts[:debug_return_type] || 'MetricsResponse'
1255
-
1256
- # auth_names
1257
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1258
-
1259
- new_options = opts.merge(
1260
- :operation => :"SandboxApi.get_sandbox_metrics",
1261
- :header_params => header_params,
1262
- :query_params => query_params,
1263
- :form_params => form_params,
1264
- :body => post_body,
1265
- :auth_names => auth_names,
1266
- :return_type => return_type
1267
- )
1268
-
1269
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1270
- if @api_client.config.debugging
1271
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1272
- end
1273
- return data, status_code, headers
1274
- end
1275
-
1276
- # Get sandbox fork parent
1277
- # @param sandbox_id_or_name [String]
1278
- # @param [Hash] opts the optional parameters
1279
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1280
- # @return [Sandbox]
1281
- def get_sandbox_parent(sandbox_id_or_name, opts = {})
1282
- data, _status_code, _headers = get_sandbox_parent_with_http_info(sandbox_id_or_name, opts)
1283
- data
1284
- end
1285
-
1286
- # Get sandbox fork parent
1287
- # @param sandbox_id_or_name [String]
1288
- # @param [Hash] opts the optional parameters
1289
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1290
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
1291
- def get_sandbox_parent_with_http_info(sandbox_id_or_name, opts = {})
1292
- if @api_client.config.debugging
1293
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_parent ...'
1294
- end
1295
- # verify the required parameter 'sandbox_id_or_name' is set
1296
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1297
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_parent"
1298
- end
1299
- # resource path
1300
- local_var_path = '/sandbox/{sandboxIdOrName}/parent'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1301
-
1302
- # query parameters
1303
- query_params = opts[:query_params] || {}
1304
-
1305
- # header parameters
1306
- header_params = opts[:header_params] || {}
1307
- # HTTP header 'Accept' (if needed)
1308
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1309
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1310
-
1311
- # form parameters
1312
- form_params = opts[:form_params] || {}
1313
-
1314
- # http body (model)
1315
- post_body = opts[:debug_body]
1316
-
1317
- # return_type
1318
- return_type = opts[:debug_return_type] || 'Sandbox'
1319
-
1320
- # auth_names
1321
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1322
-
1323
- new_options = opts.merge(
1324
- :operation => :"SandboxApi.get_sandbox_parent",
1325
- :header_params => header_params,
1326
- :query_params => query_params,
1327
- :form_params => form_params,
1328
- :body => post_body,
1329
- :auth_names => auth_names,
1330
- :return_type => return_type
1331
- )
1332
-
1333
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1334
- if @api_client.config.debugging
1335
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_parent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1336
- end
1337
- return data, status_code, headers
1338
- end
1339
-
1340
- # Get trace spans
1341
- # Retrieve all spans for a specific trace
1342
- # @param sandbox_id [String] ID of the sandbox
1343
- # @param trace_id [String] ID of the trace
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 [Array<TraceSpan>]
1347
- def get_sandbox_trace_spans(sandbox_id, trace_id, opts = {})
1348
- data, _status_code, _headers = get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts)
1349
- data
1350
- end
1351
-
1352
- # Get trace spans
1353
- # Retrieve all spans for a specific trace
1354
- # @param sandbox_id [String] ID of the sandbox
1355
- # @param trace_id [String] ID of the trace
1356
- # @param [Hash] opts the optional parameters
1357
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1358
- # @return [Array<(Array<TraceSpan>, Integer, Hash)>] Array<TraceSpan> data, response status code and response headers
1359
- def get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts = {})
1360
- if @api_client.config.debugging
1361
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_trace_spans ...'
1362
- end
1363
- # verify the required parameter 'sandbox_id' is set
1364
- if @api_client.config.client_side_validation && sandbox_id.nil?
1365
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_trace_spans"
1366
- end
1367
- # verify the required parameter 'trace_id' is set
1368
- if @api_client.config.client_side_validation && trace_id.nil?
1369
- fail ArgumentError, "Missing the required parameter 'trace_id' when calling SandboxApi.get_sandbox_trace_spans"
1370
- end
1371
- # resource path
1372
- local_var_path = '/sandbox/{sandboxId}/telemetry/traces/{traceId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'traceId' + '}', CGI.escape(trace_id.to_s))
1373
-
1374
- # query parameters
1375
- query_params = opts[:query_params] || {}
1376
-
1377
- # header parameters
1378
- header_params = opts[:header_params] || {}
1379
- # HTTP header 'Accept' (if needed)
1380
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1381
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1382
-
1383
- # form parameters
1384
- form_params = opts[:form_params] || {}
1385
-
1386
- # http body (model)
1387
- post_body = opts[:debug_body]
1388
-
1389
- # return_type
1390
- return_type = opts[:debug_return_type] || 'Array<TraceSpan>'
1391
-
1392
- # auth_names
1393
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1394
-
1395
- new_options = opts.merge(
1396
- :operation => :"SandboxApi.get_sandbox_trace_spans",
1397
- :header_params => header_params,
1398
- :query_params => query_params,
1399
- :form_params => form_params,
1400
- :body => post_body,
1401
- :auth_names => auth_names,
1402
- :return_type => return_type
1403
- )
1404
-
1405
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1406
- if @api_client.config.debugging
1407
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_trace_spans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1408
- end
1409
- return data, status_code, headers
1410
- end
1411
-
1412
- # Get sandbox traces
1413
- # Retrieve OTEL traces for a sandbox within a time range
1414
- # @param sandbox_id [String] ID of the sandbox
1415
- # @param from [Time] Start of time range (ISO 8601)
1416
- # @param to [Time] End of time range (ISO 8601)
1417
- # @param [Hash] opts the optional parameters
1418
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1419
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1420
- # @option opts [Float] :limit Number of items per page (default to 100)
1421
- # @return [PaginatedTraces]
1422
- def get_sandbox_traces(sandbox_id, from, to, opts = {})
1423
- data, _status_code, _headers = get_sandbox_traces_with_http_info(sandbox_id, from, to, opts)
1424
- data
1425
- end
1426
-
1427
- # Get sandbox traces
1428
- # Retrieve OTEL traces for a sandbox within a time range
1429
- # @param sandbox_id [String] ID of the sandbox
1430
- # @param from [Time] Start of time range (ISO 8601)
1431
- # @param to [Time] End of time range (ISO 8601)
1432
- # @param [Hash] opts the optional parameters
1433
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1434
- # @option opts [Float] :page Page number (1-indexed) (default to 1)
1435
- # @option opts [Float] :limit Number of items per page (default to 100)
1436
- # @return [Array<(PaginatedTraces, Integer, Hash)>] PaginatedTraces data, response status code and response headers
1437
- def get_sandbox_traces_with_http_info(sandbox_id, from, to, opts = {})
1438
- if @api_client.config.debugging
1439
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_traces ...'
1440
- end
1441
- # verify the required parameter 'sandbox_id' is set
1442
- if @api_client.config.client_side_validation && sandbox_id.nil?
1443
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_traces"
1444
- end
1445
- # verify the required parameter 'from' is set
1446
- if @api_client.config.client_side_validation && from.nil?
1447
- fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_traces"
1448
- end
1449
- # verify the required parameter 'to' is set
1450
- if @api_client.config.client_side_validation && to.nil?
1451
- fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_traces"
1452
- end
1453
- # resource path
1454
- local_var_path = '/sandbox/{sandboxId}/telemetry/traces'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1455
-
1456
- # query parameters
1457
- query_params = opts[:query_params] || {}
1458
- query_params[:'from'] = from
1459
- query_params[:'to'] = to
1460
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1461
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1462
-
1463
- # header parameters
1464
- header_params = opts[:header_params] || {}
1465
- # HTTP header 'Accept' (if needed)
1466
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1467
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1468
-
1469
- # form parameters
1470
- form_params = opts[:form_params] || {}
1471
-
1472
- # http body (model)
1473
- post_body = opts[:debug_body]
1474
-
1475
- # return_type
1476
- return_type = opts[:debug_return_type] || 'PaginatedTraces'
1477
-
1478
- # auth_names
1479
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1480
-
1481
- new_options = opts.merge(
1482
- :operation => :"SandboxApi.get_sandbox_traces",
1483
- :header_params => header_params,
1484
- :query_params => query_params,
1485
- :form_params => form_params,
1486
- :body => post_body,
1487
- :auth_names => auth_names,
1488
- :return_type => return_type
1489
- )
1490
-
1491
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1492
- if @api_client.config.debugging
1493
- @api_client.config.logger.debug "API called: SandboxApi#get_sandbox_traces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1494
- end
1495
- return data, status_code, headers
1496
- end
1497
-
1498
- # Get sandboxes for the authenticated runner
1499
- # @param [Hash] opts the optional parameters
1500
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1501
- # @option opts [String] :states Comma-separated list of sandbox states to filter by
1502
- # @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
1503
- # @return [Array<Sandbox>]
1504
- def get_sandboxes_for_runner(opts = {})
1505
- data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
1506
- data
1507
- end
1508
-
1509
- # Get sandboxes for the authenticated runner
1510
- # @param [Hash] opts the optional parameters
1511
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1512
- # @option opts [String] :states Comma-separated list of sandbox states to filter by
1513
- # @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
1514
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
1515
- def get_sandboxes_for_runner_with_http_info(opts = {})
1516
- if @api_client.config.debugging
1517
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
1518
- end
1519
- # resource path
1520
- local_var_path = '/sandbox/for-runner'
1521
-
1522
- # query parameters
1523
- query_params = opts[:query_params] || {}
1524
- query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
1525
- query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
1526
-
1527
- # header parameters
1528
- header_params = opts[:header_params] || {}
1529
- # HTTP header 'Accept' (if needed)
1530
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1531
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1532
-
1533
- # form parameters
1534
- form_params = opts[:form_params] || {}
1535
-
1536
- # http body (model)
1537
- post_body = opts[:debug_body]
1538
-
1539
- # return_type
1540
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1541
-
1542
- # auth_names
1543
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1544
-
1545
- new_options = opts.merge(
1546
- :operation => :"SandboxApi.get_sandboxes_for_runner",
1547
- :header_params => header_params,
1548
- :query_params => query_params,
1549
- :form_params => form_params,
1550
- :body => post_body,
1551
- :auth_names => auth_names,
1552
- :return_type => return_type
1553
- )
1554
-
1555
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1556
- if @api_client.config.debugging
1557
- @api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1558
- end
1559
- return data, status_code, headers
1560
- end
1561
-
1562
- # Get signed preview URL for a sandbox port
1563
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1564
- # @param port [Integer] Port number to get signed preview URL for
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 [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
1568
- # @return [SignedPortPreviewUrl]
1569
- def get_signed_port_preview_url(sandbox_id_or_name, port, opts = {})
1570
- data, _status_code, _headers = get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
1571
- data
1572
- end
1573
-
1574
- # Get signed preview URL for a sandbox port
1575
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1576
- # @param port [Integer] Port number to get signed preview URL for
1577
- # @param [Hash] opts the optional parameters
1578
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1579
- # @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
1580
- # @return [Array<(SignedPortPreviewUrl, Integer, Hash)>] SignedPortPreviewUrl data, response status code and response headers
1581
- def get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
1582
- if @api_client.config.debugging
1583
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_signed_port_preview_url ...'
1584
- end
1585
- # verify the required parameter 'sandbox_id_or_name' is set
1586
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1587
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_signed_port_preview_url"
1588
- end
1589
- # verify the required parameter 'port' is set
1590
- if @api_client.config.client_side_validation && port.nil?
1591
- fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_signed_port_preview_url"
1592
- end
1593
- # resource path
1594
- 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))
1595
-
1596
- # query parameters
1597
- query_params = opts[:query_params] || {}
1598
- query_params[:'expiresInSeconds'] = opts[:'expires_in_seconds'] if !opts[:'expires_in_seconds'].nil?
1599
-
1600
- # header parameters
1601
- header_params = opts[:header_params] || {}
1602
- # HTTP header 'Accept' (if needed)
1603
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1604
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1605
-
1606
- # form parameters
1607
- form_params = opts[:form_params] || {}
1608
-
1609
- # http body (model)
1610
- post_body = opts[:debug_body]
1611
-
1612
- # return_type
1613
- return_type = opts[:debug_return_type] || 'SignedPortPreviewUrl'
1614
-
1615
- # auth_names
1616
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1617
-
1618
- new_options = opts.merge(
1619
- :operation => :"SandboxApi.get_signed_port_preview_url",
1620
- :header_params => header_params,
1621
- :query_params => query_params,
1622
- :form_params => form_params,
1623
- :body => post_body,
1624
- :auth_names => auth_names,
1625
- :return_type => return_type
1626
- )
1627
-
1628
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1629
- if @api_client.config.debugging
1630
- @api_client.config.logger.debug "API called: SandboxApi#get_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1631
- end
1632
- return data, status_code, headers
1633
- end
1634
-
1635
- # Get toolbox proxy URL for a sandbox
1636
- # @param sandbox_id [String] ID of the sandbox
1637
- # @param [Hash] opts the optional parameters
1638
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1639
- # @return [ToolboxProxyUrl]
1640
- def get_toolbox_proxy_url(sandbox_id, opts = {})
1641
- data, _status_code, _headers = get_toolbox_proxy_url_with_http_info(sandbox_id, opts)
1642
- data
1643
- end
1644
-
1645
- # Get toolbox proxy URL for a sandbox
1646
- # @param sandbox_id [String] ID of the sandbox
1647
- # @param [Hash] opts the optional parameters
1648
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1649
- # @return [Array<(ToolboxProxyUrl, Integer, Hash)>] ToolboxProxyUrl data, response status code and response headers
1650
- def get_toolbox_proxy_url_with_http_info(sandbox_id, opts = {})
1651
- if @api_client.config.debugging
1652
- @api_client.config.logger.debug 'Calling API: SandboxApi.get_toolbox_proxy_url ...'
1653
- end
1654
- # verify the required parameter 'sandbox_id' is set
1655
- if @api_client.config.client_side_validation && sandbox_id.nil?
1656
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_toolbox_proxy_url"
1657
- end
1658
- # resource path
1659
- local_var_path = '/sandbox/{sandboxId}/toolbox-proxy-url'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1660
-
1661
- # query parameters
1662
- query_params = opts[:query_params] || {}
1663
-
1664
- # header parameters
1665
- header_params = opts[:header_params] || {}
1666
- # HTTP header 'Accept' (if needed)
1667
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1668
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1669
-
1670
- # form parameters
1671
- form_params = opts[:form_params] || {}
1672
-
1673
- # http body (model)
1674
- post_body = opts[:debug_body]
1675
-
1676
- # return_type
1677
- return_type = opts[:debug_return_type] || 'ToolboxProxyUrl'
1678
-
1679
- # auth_names
1680
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1681
-
1682
- new_options = opts.merge(
1683
- :operation => :"SandboxApi.get_toolbox_proxy_url",
1684
- :header_params => header_params,
1685
- :query_params => query_params,
1686
- :form_params => form_params,
1687
- :body => post_body,
1688
- :auth_names => auth_names,
1689
- :return_type => return_type
1690
- )
1691
-
1692
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1693
- if @api_client.config.debugging
1694
- @api_client.config.logger.debug "API called: SandboxApi#get_toolbox_proxy_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1695
- end
1696
- return data, status_code, headers
1697
- end
1698
-
1699
- # List sandboxes
1700
- # Advanced filtering and ordering. Eventually consistent.
1701
- # @param [Hash] opts the optional parameters
1702
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1703
- # @option opts [String] :cursor Pagination cursor from a previous response
1704
- # @option opts [Float] :limit Number of results per page (default to 100)
1705
- # @option opts [String] :id Filter by ID prefix (case-insensitive)
1706
- # @option opts [String] :name Filter by name prefix (case-insensitive)
1707
- # @option opts [String] :labels JSON encoded labels to filter by
1708
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1709
- # @option opts [Array<SandboxState>] :states List of states to filter by.
1710
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1711
- # @option opts [Array<String>] :region_ids List of regions IDs to filter by
1712
- # @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
1713
- # @option opts [Float] :min_cpu Minimum CPU
1714
- # @option opts [Float] :max_cpu Maximum CPU
1715
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1716
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1717
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1718
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1719
- # @option opts [Boolean] :is_public Filter by public status
1720
- # @option opts [Boolean] :is_recoverable Filter by recoverable status
1721
- # @option opts [Time] :created_at_after Include items created after this timestamp
1722
- # @option opts [Time] :created_at_before Include items created before this timestamp
1723
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1724
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1725
- # @option opts [SandboxListSortField] :sort Field to sort by
1726
- # @option opts [SandboxListSortDirection] :order Direction to sort by
1727
- # @return [ListSandboxesResponse]
1728
- def list_sandboxes(opts = {})
1729
- data, _status_code, _headers = list_sandboxes_with_http_info(opts)
1730
- data
1731
- end
1732
-
1733
- # List sandboxes
1734
- # Advanced filtering and ordering. Eventually consistent.
1735
- # @param [Hash] opts the optional parameters
1736
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1737
- # @option opts [String] :cursor Pagination cursor from a previous response
1738
- # @option opts [Float] :limit Number of results per page (default to 100)
1739
- # @option opts [String] :id Filter by ID prefix (case-insensitive)
1740
- # @option opts [String] :name Filter by name prefix (case-insensitive)
1741
- # @option opts [String] :labels JSON encoded labels to filter by
1742
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1743
- # @option opts [Array<SandboxState>] :states List of states to filter by.
1744
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1745
- # @option opts [Array<String>] :region_ids List of regions IDs to filter by
1746
- # @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
1747
- # @option opts [Float] :min_cpu Minimum CPU
1748
- # @option opts [Float] :max_cpu Maximum CPU
1749
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1750
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1751
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1752
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1753
- # @option opts [Boolean] :is_public Filter by public status
1754
- # @option opts [Boolean] :is_recoverable Filter by recoverable status
1755
- # @option opts [Time] :created_at_after Include items created after this timestamp
1756
- # @option opts [Time] :created_at_before Include items created before this timestamp
1757
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1758
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1759
- # @option opts [SandboxListSortField] :sort Field to sort by
1760
- # @option opts [SandboxListSortDirection] :order Direction to sort by
1761
- # @return [Array<(ListSandboxesResponse, Integer, Hash)>] ListSandboxesResponse data, response status code and response headers
1762
- def list_sandboxes_with_http_info(opts = {})
1763
- if @api_client.config.debugging
1764
- @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
1765
- end
1766
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
1767
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be smaller than or equal to 200.'
1768
- end
1769
-
1770
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1771
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1772
- end
1773
-
1774
- if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
1775
- fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1776
- end
1777
-
1778
- if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
1779
- fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1780
- end
1781
-
1782
- if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
1783
- fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1784
- end
1785
-
1786
- if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
1787
- fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1788
- end
1789
-
1790
- if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
1791
- fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1792
- end
1793
-
1794
- if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
1795
- fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1796
- end
1797
-
1798
- # resource path
1799
- local_var_path = '/sandbox'
1800
-
1801
- # query parameters
1802
- query_params = opts[:query_params] || {}
1803
- query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1804
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1805
- query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
1806
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1807
- query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
1808
- query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
1809
- query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
1810
- query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
1811
- query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
1812
- query_params[:'sandboxClasses'] = @api_client.build_collection_param(opts[:'sandbox_classes'], :multi) if !opts[:'sandbox_classes'].nil?
1813
- query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
1814
- query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
1815
- query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
1816
- query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
1817
- query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
1818
- query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
1819
- query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
1820
- query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
1821
- query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
1822
- query_params[:'createdAtBefore'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
1823
- query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
1824
- query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
1825
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1826
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1827
-
1828
- # header parameters
1829
- header_params = opts[:header_params] || {}
1830
- # HTTP header 'Accept' (if needed)
1831
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1832
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1833
-
1834
- # form parameters
1835
- form_params = opts[:form_params] || {}
1836
-
1837
- # http body (model)
1838
- post_body = opts[:debug_body]
1839
-
1840
- # return_type
1841
- return_type = opts[:debug_return_type] || 'ListSandboxesResponse'
1842
-
1843
- # auth_names
1844
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1845
-
1846
- new_options = opts.merge(
1847
- :operation => :"SandboxApi.list_sandboxes",
1848
- :header_params => header_params,
1849
- :query_params => query_params,
1850
- :form_params => form_params,
1851
- :body => post_body,
1852
- :auth_names => auth_names,
1853
- :return_type => return_type
1854
- )
1855
-
1856
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1857
- if @api_client.config.debugging
1858
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1859
- end
1860
- return data, status_code, headers
1861
- end
1862
-
1863
- # [DEPRECATED] List all sandboxes paginated
1864
- # @param [Hash] opts the optional parameters
1865
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1866
- # @option opts [Float] :page Page number of the results (default to 1)
1867
- # @option opts [Float] :limit Number of results per page (default to 100)
1868
- # @option opts [String] :id Filter by partial ID match
1869
- # @option opts [String] :name Filter by partial name match
1870
- # @option opts [String] :labels JSON encoded labels to filter by
1871
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1872
- # @option opts [Array<String>] :states List of states to filter by
1873
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1874
- # @option opts [Array<String>] :regions List of regions to filter by
1875
- # @option opts [Float] :min_cpu Minimum CPU
1876
- # @option opts [Float] :max_cpu Maximum CPU
1877
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1878
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1879
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1880
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1881
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1882
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1883
- # @option opts [String] :sort Field to sort by (default to 'createdAt')
1884
- # @option opts [String] :order Direction to sort by (default to 'desc')
1885
- # @return [PaginatedSandboxesDeprecated]
1886
- def list_sandboxes_paginated_deprecated(opts = {})
1887
- data, _status_code, _headers = list_sandboxes_paginated_deprecated_with_http_info(opts)
1888
- data
1889
- end
1890
-
1891
- # [DEPRECATED] List all sandboxes paginated
764
+ # List all sandboxes paginated
1892
765
  # @param [Hash] opts the optional parameters
1893
766
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1894
767
  # @option opts [Float] :page Page number of the results (default to 1)
1895
768
  # @option opts [Float] :limit Number of results per page (default to 100)
1896
769
  # @option opts [String] :id Filter by partial ID match
1897
- # @option opts [String] :name Filter by partial name match
1898
770
  # @option opts [String] :labels JSON encoded labels to filter by
1899
771
  # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1900
772
  # @option opts [Array<String>] :states List of states to filter by
@@ -1910,385 +782,103 @@ module DaytonaApiClient
1910
782
  # @option opts [Time] :last_event_before Include items with last event before this timestamp
1911
783
  # @option opts [String] :sort Field to sort by (default to 'createdAt')
1912
784
  # @option opts [String] :order Direction to sort by (default to 'desc')
1913
- # @return [Array<(PaginatedSandboxesDeprecated, Integer, Hash)>] PaginatedSandboxesDeprecated data, response status code and response headers
1914
- def list_sandboxes_paginated_deprecated_with_http_info(opts = {})
785
+ # @return [Array<(PaginatedSandboxes, Integer, Hash)>] PaginatedSandboxes data, response status code and response headers
786
+ def list_sandboxes_paginated_with_http_info(opts = {})
1915
787
  if @api_client.config.debugging
1916
- @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated_deprecated ...'
788
+ @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
1917
789
  end
1918
790
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1919
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
791
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
1920
792
  end
1921
793
 
1922
794
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
1923
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be smaller than or equal to 200.'
795
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be smaller than or equal to 200.'
1924
796
  end
1925
797
 
1926
798
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1927
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
799
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
1928
800
  end
1929
801
 
1930
- 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"]
802
+ allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"]
1931
803
  if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
1932
804
  fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
1933
805
  end
1934
806
  if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
1935
- fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
807
+ fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
1936
808
  end
1937
809
 
1938
810
  if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
1939
- fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
811
+ fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
1940
812
  end
1941
813
 
1942
814
  if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
1943
- 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.'
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.'
1944
816
  end
1945
817
 
1946
818
  if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
1947
- 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.'
1948
- end
1949
-
1950
- if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
1951
- 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.'
1952
- end
1953
-
1954
- if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
1955
- 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.'
1956
- end
1957
-
1958
- allowable_values = ["id", "name", "state", "snapshot", "region", "updatedAt", "createdAt", "lastActivityAt", "unknown_default_open_api"]
1959
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1960
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1961
- end
1962
- allowable_values = ["asc", "desc", "unknown_default_open_api"]
1963
- if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
1964
- fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
1965
- end
1966
- # resource path
1967
- local_var_path = '/sandbox/paginated'
1968
-
1969
- # query parameters
1970
- query_params = opts[:query_params] || {}
1971
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1972
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1973
- query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
1974
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1975
- query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
1976
- query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
1977
- query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
1978
- query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
1979
- query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
1980
- query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
1981
- query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
1982
- query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
1983
- query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
1984
- query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
1985
- query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
1986
- query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
1987
- query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
1988
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1989
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1990
-
1991
- # header parameters
1992
- header_params = opts[:header_params] || {}
1993
- # HTTP header 'Accept' (if needed)
1994
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1995
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1996
-
1997
- # form parameters
1998
- form_params = opts[:form_params] || {}
1999
-
2000
- # http body (model)
2001
- post_body = opts[:debug_body]
2002
-
2003
- # return_type
2004
- return_type = opts[:debug_return_type] || 'PaginatedSandboxesDeprecated'
2005
-
2006
- # auth_names
2007
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2008
-
2009
- new_options = opts.merge(
2010
- :operation => :"SandboxApi.list_sandboxes_paginated_deprecated",
2011
- :header_params => header_params,
2012
- :query_params => query_params,
2013
- :form_params => form_params,
2014
- :body => post_body,
2015
- :auth_names => auth_names,
2016
- :return_type => return_type
2017
- )
2018
-
2019
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2020
- if @api_client.config.debugging
2021
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2022
- end
2023
- return data, status_code, headers
2024
- end
2025
-
2026
- # Pause sandbox
2027
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2028
- # @param [Hash] opts the optional parameters
2029
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2030
- # @return [Sandbox]
2031
- def pause_sandbox(sandbox_id_or_name, opts = {})
2032
- data, _status_code, _headers = pause_sandbox_with_http_info(sandbox_id_or_name, opts)
2033
- data
2034
- end
2035
-
2036
- # Pause sandbox
2037
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2038
- # @param [Hash] opts the optional parameters
2039
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2040
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2041
- def pause_sandbox_with_http_info(sandbox_id_or_name, opts = {})
2042
- if @api_client.config.debugging
2043
- @api_client.config.logger.debug 'Calling API: SandboxApi.pause_sandbox ...'
2044
- end
2045
- # verify the required parameter 'sandbox_id_or_name' is set
2046
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2047
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.pause_sandbox"
2048
- end
2049
- # resource path
2050
- local_var_path = '/sandbox/{sandboxIdOrName}/pause'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2051
-
2052
- # query parameters
2053
- query_params = opts[:query_params] || {}
2054
-
2055
- # header parameters
2056
- header_params = opts[:header_params] || {}
2057
- # HTTP header 'Accept' (if needed)
2058
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2059
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2060
-
2061
- # form parameters
2062
- form_params = opts[:form_params] || {}
2063
-
2064
- # http body (model)
2065
- post_body = opts[:debug_body]
2066
-
2067
- # return_type
2068
- return_type = opts[:debug_return_type] || 'Sandbox'
2069
-
2070
- # auth_names
2071
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2072
-
2073
- new_options = opts.merge(
2074
- :operation => :"SandboxApi.pause_sandbox",
2075
- :header_params => header_params,
2076
- :query_params => query_params,
2077
- :form_params => form_params,
2078
- :body => post_body,
2079
- :auth_names => auth_names,
2080
- :return_type => return_type
2081
- )
2082
-
2083
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2084
- if @api_client.config.debugging
2085
- @api_client.config.logger.debug "API called: SandboxApi#pause_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2086
- end
2087
- return data, status_code, headers
2088
- end
2089
-
2090
- # Recover sandbox from error state
2091
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2092
- # @param [Hash] opts the optional parameters
2093
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2094
- # @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
2095
- # @return [Sandbox]
2096
- def recover_sandbox(sandbox_id_or_name, opts = {})
2097
- data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
2098
- data
2099
- end
2100
-
2101
- # Recover sandbox from error state
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
- # @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
2106
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2107
- def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
2108
- if @api_client.config.debugging
2109
- @api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
2110
- end
2111
- # verify the required parameter 'sandbox_id_or_name' is set
2112
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2113
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
2114
- end
2115
- # resource path
2116
- local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2117
-
2118
- # query parameters
2119
- query_params = opts[:query_params] || {}
2120
- query_params[:'skipStart'] = opts[:'skip_start'] if !opts[:'skip_start'].nil?
2121
-
2122
- # header parameters
2123
- header_params = opts[:header_params] || {}
2124
- # HTTP header 'Accept' (if needed)
2125
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2126
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2127
-
2128
- # form parameters
2129
- form_params = opts[:form_params] || {}
2130
-
2131
- # http body (model)
2132
- post_body = opts[:debug_body]
2133
-
2134
- # return_type
2135
- return_type = opts[:debug_return_type] || 'Sandbox'
2136
-
2137
- # auth_names
2138
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2139
-
2140
- new_options = opts.merge(
2141
- :operation => :"SandboxApi.recover_sandbox",
2142
- :header_params => header_params,
2143
- :query_params => query_params,
2144
- :form_params => form_params,
2145
- :body => post_body,
2146
- :auth_names => auth_names,
2147
- :return_type => return_type
2148
- )
2149
-
2150
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2151
- if @api_client.config.debugging
2152
- @api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2153
- end
2154
- return data, status_code, headers
2155
- end
2156
-
2157
- # Replace sandbox labels
2158
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2159
- # @param sandbox_labels [SandboxLabels]
2160
- # @param [Hash] opts the optional parameters
2161
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2162
- # @return [SandboxLabels]
2163
- def replace_labels(sandbox_id_or_name, sandbox_labels, opts = {})
2164
- data, _status_code, _headers = replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts)
2165
- data
2166
- end
2167
-
2168
- # Replace sandbox labels
2169
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2170
- # @param sandbox_labels [SandboxLabels]
2171
- # @param [Hash] opts the optional parameters
2172
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2173
- # @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
2174
- def replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts = {})
2175
- if @api_client.config.debugging
2176
- @api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
2177
- end
2178
- # verify the required parameter 'sandbox_id_or_name' is set
2179
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2180
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.replace_labels"
2181
- end
2182
- # verify the required parameter 'sandbox_labels' is set
2183
- if @api_client.config.client_side_validation && sandbox_labels.nil?
2184
- fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
2185
- end
2186
- # resource path
2187
- local_var_path = '/sandbox/{sandboxIdOrName}/labels'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2188
-
2189
- # query parameters
2190
- query_params = opts[:query_params] || {}
2191
-
2192
- # header parameters
2193
- header_params = opts[:header_params] || {}
2194
- # HTTP header 'Accept' (if needed)
2195
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2196
- # HTTP header 'Content-Type'
2197
- content_type = @api_client.select_header_content_type(['application/json'])
2198
- if !content_type.nil?
2199
- header_params['Content-Type'] = content_type
2200
- end
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] || @api_client.object_to_http_body(sandbox_labels)
2208
-
2209
- # return_type
2210
- return_type = opts[:debug_return_type] || 'SandboxLabels'
2211
-
2212
- # auth_names
2213
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2214
-
2215
- new_options = opts.merge(
2216
- :operation => :"SandboxApi.replace_labels",
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(:PUT, local_var_path, new_options)
2226
- if @api_client.config.debugging
2227
- @api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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.'
2228
820
  end
2229
- return data, status_code, headers
2230
- end
2231
821
 
2232
- # Resize sandbox resources
2233
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2234
- # @param resize_sandbox [ResizeSandbox]
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 [Sandbox]
2238
- def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
2239
- data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
2240
- data
2241
- 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
2242
825
 
2243
- # Resize sandbox resources
2244
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2245
- # @param resize_sandbox [ResizeSandbox]
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<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2249
- def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
2250
- if @api_client.config.debugging
2251
- @api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
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.'
2252
828
  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.resize_sandbox"
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}"
2256
833
  end
2257
- # verify the required parameter 'resize_sandbox' is set
2258
- if @api_client.config.client_side_validation && resize_sandbox.nil?
2259
- fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
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}"
2260
837
  end
2261
838
  # resource path
2262
- local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
839
+ local_var_path = '/sandbox/paginated'
2263
840
 
2264
841
  # query parameters
2265
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?
2266
861
 
2267
862
  # header parameters
2268
863
  header_params = opts[:header_params] || {}
2269
864
  # HTTP header 'Accept' (if needed)
2270
865
  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
866
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2277
867
 
2278
868
  # form parameters
2279
869
  form_params = opts[:form_params] || {}
2280
870
 
2281
871
  # http body (model)
2282
- post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
872
+ post_body = opts[:debug_body]
2283
873
 
2284
874
  # return_type
2285
- return_type = opts[:debug_return_type] || 'Sandbox'
875
+ return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
2286
876
 
2287
877
  # auth_names
2288
878
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2289
879
 
2290
880
  new_options = opts.merge(
2291
- :operation => :"SandboxApi.resize_sandbox",
881
+ :operation => :"SandboxApi.list_sandboxes_paginated",
2292
882
  :header_params => header_params,
2293
883
  :query_params => query_params,
2294
884
  :form_params => form_params,
@@ -2297,38 +887,44 @@ module DaytonaApiClient
2297
887
  :return_type => return_type
2298
888
  )
2299
889
 
2300
- 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)
2301
891
  if @api_client.config.debugging
2302
- @api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\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}"
2303
893
  end
2304
894
  return data, status_code, headers
2305
895
  end
2306
896
 
2307
- # Resolve sandbox secrets
2308
- # @param sandbox_id [String] Sandbox ID
897
+ # Replace sandbox labels
898
+ # @param sandbox_id [String] ID of the sandbox
899
+ # @param sandbox_labels [SandboxLabels]
2309
900
  # @param [Hash] opts the optional parameters
2310
901
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2311
- # @return [Array<ResolveSandboxSecrets200ResponseInner>]
2312
- def resolve_sandbox_secrets(sandbox_id, opts = {})
2313
- data, _status_code, _headers = resolve_sandbox_secrets_with_http_info(sandbox_id, 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)
2314
905
  data
2315
906
  end
2316
907
 
2317
- # Resolve sandbox secrets
2318
- # @param sandbox_id [String] Sandbox ID
908
+ # Replace sandbox labels
909
+ # @param sandbox_id [String] ID of the sandbox
910
+ # @param sandbox_labels [SandboxLabels]
2319
911
  # @param [Hash] opts the optional parameters
2320
912
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2321
- # @return [Array<(Array<ResolveSandboxSecrets200ResponseInner>, Integer, Hash)>] Array<ResolveSandboxSecrets200ResponseInner> data, response status code and response headers
2322
- def resolve_sandbox_secrets_with_http_info(sandbox_id, 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 = {})
2323
915
  if @api_client.config.debugging
2324
- @api_client.config.logger.debug 'Calling API: SandboxApi.resolve_sandbox_secrets ...'
916
+ @api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
2325
917
  end
2326
918
  # verify the required parameter 'sandbox_id' is set
2327
919
  if @api_client.config.client_side_validation && sandbox_id.nil?
2328
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.resolve_sandbox_secrets"
920
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.replace_labels"
921
+ end
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"
2329
925
  end
2330
926
  # resource path
2331
- local_var_path = '/sandbox/{sandboxId}/secrets'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
927
+ local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2332
928
 
2333
929
  # query parameters
2334
930
  query_params = opts[:query_params] || {}
@@ -2337,22 +933,27 @@ module DaytonaApiClient
2337
933
  header_params = opts[:header_params] || {}
2338
934
  # HTTP header 'Accept' (if needed)
2339
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
2340
941
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2341
942
 
2342
943
  # form parameters
2343
944
  form_params = opts[:form_params] || {}
2344
945
 
2345
946
  # http body (model)
2346
- post_body = opts[:debug_body]
947
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
2347
948
 
2348
949
  # return_type
2349
- return_type = opts[:debug_return_type] || 'Array<ResolveSandboxSecrets200ResponseInner>'
950
+ return_type = opts[:debug_return_type] || 'SandboxLabels'
2350
951
 
2351
952
  # auth_names
2352
953
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2353
954
 
2354
955
  new_options = opts.merge(
2355
- :operation => :"SandboxApi.resolve_sandbox_secrets",
956
+ :operation => :"SandboxApi.replace_labels",
2356
957
  :header_params => header_params,
2357
958
  :query_params => query_params,
2358
959
  :form_params => form_params,
@@ -2361,40 +962,40 @@ module DaytonaApiClient
2361
962
  :return_type => return_type
2362
963
  )
2363
964
 
2364
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
965
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2365
966
  if @api_client.config.debugging
2366
- @api_client.config.logger.debug "API called: SandboxApi#resolve_sandbox_secrets\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}"
2367
968
  end
2368
969
  return data, status_code, headers
2369
970
  end
2370
971
 
2371
972
  # Revoke SSH access for sandbox
2372
- # @param sandbox_id_or_name [String] ID or name of the sandbox
973
+ # @param sandbox_id [String] ID of the sandbox
2373
974
  # @param [Hash] opts the optional parameters
2374
975
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2375
976
  # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2376
- # @return [Sandbox]
2377
- def revoke_ssh_access(sandbox_id_or_name, opts = {})
2378
- data, _status_code, _headers = revoke_ssh_access_with_http_info(sandbox_id_or_name, opts)
2379
- data
977
+ # @return [nil]
978
+ def revoke_ssh_access(sandbox_id, opts = {})
979
+ revoke_ssh_access_with_http_info(sandbox_id, opts)
980
+ nil
2380
981
  end
2381
982
 
2382
983
  # Revoke SSH access for sandbox
2383
- # @param sandbox_id_or_name [String] ID or name of the sandbox
984
+ # @param sandbox_id [String] ID of the sandbox
2384
985
  # @param [Hash] opts the optional parameters
2385
986
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2386
987
  # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2387
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2388
- def revoke_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
988
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
989
+ def revoke_ssh_access_with_http_info(sandbox_id, opts = {})
2389
990
  if @api_client.config.debugging
2390
991
  @api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
2391
992
  end
2392
- # verify the required parameter 'sandbox_id_or_name' is set
2393
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2394
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.revoke_ssh_access"
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"
2395
996
  end
2396
997
  # resource path
2397
- local_var_path = '/sandbox/{sandboxIdOrName}/ssh-access'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
998
+ local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2398
999
 
2399
1000
  # query parameters
2400
1001
  query_params = opts[:query_params] || {}
@@ -2402,8 +1003,6 @@ module DaytonaApiClient
2402
1003
 
2403
1004
  # header parameters
2404
1005
  header_params = opts[:header_params] || {}
2405
- # HTTP header 'Accept' (if needed)
2406
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2407
1006
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2408
1007
 
2409
1008
  # form parameters
@@ -2413,7 +1012,7 @@ module DaytonaApiClient
2413
1012
  post_body = opts[:debug_body]
2414
1013
 
2415
1014
  # return_type
2416
- return_type = opts[:debug_return_type] || 'Sandbox'
1015
+ return_type = opts[:debug_return_type]
2417
1016
 
2418
1017
  # auth_names
2419
1018
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2436,44 +1035,42 @@ module DaytonaApiClient
2436
1035
  end
2437
1036
 
2438
1037
  # Set sandbox auto-archive interval
2439
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1038
+ # @param sandbox_id [String] ID of the sandbox
2440
1039
  # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2441
1040
  # @param [Hash] opts the optional parameters
2442
1041
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2443
- # @return [Sandbox]
2444
- def set_auto_archive_interval(sandbox_id_or_name, interval, opts = {})
2445
- data, _status_code, _headers = set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts)
2446
- 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
2447
1046
  end
2448
1047
 
2449
1048
  # Set sandbox auto-archive interval
2450
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1049
+ # @param sandbox_id [String] ID of the sandbox
2451
1050
  # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2452
1051
  # @param [Hash] opts the optional parameters
2453
1052
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2454
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2455
- def set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, 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 = {})
2456
1055
  if @api_client.config.debugging
2457
1056
  @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
2458
1057
  end
2459
- # verify the required parameter 'sandbox_id_or_name' is set
2460
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2461
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_archive_interval"
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"
2462
1061
  end
2463
1062
  # verify the required parameter 'interval' is set
2464
1063
  if @api_client.config.client_side_validation && interval.nil?
2465
1064
  fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
2466
1065
  end
2467
1066
  # resource path
2468
- local_var_path = '/sandbox/{sandboxIdOrName}/autoarchive/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.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))
2469
1068
 
2470
1069
  # query parameters
2471
1070
  query_params = opts[:query_params] || {}
2472
1071
 
2473
1072
  # header parameters
2474
1073
  header_params = opts[:header_params] || {}
2475
- # HTTP header 'Accept' (if needed)
2476
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2477
1074
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2478
1075
 
2479
1076
  # form parameters
@@ -2483,7 +1080,7 @@ module DaytonaApiClient
2483
1080
  post_body = opts[:debug_body]
2484
1081
 
2485
1082
  # return_type
2486
- return_type = opts[:debug_return_type] || 'Sandbox'
1083
+ return_type = opts[:debug_return_type]
2487
1084
 
2488
1085
  # auth_names
2489
1086
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2506,44 +1103,42 @@ module DaytonaApiClient
2506
1103
  end
2507
1104
 
2508
1105
  # Set sandbox auto-delete interval
2509
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1106
+ # @param sandbox_id [String] ID of the sandbox
2510
1107
  # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2511
1108
  # @param [Hash] opts the optional parameters
2512
1109
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2513
- # @return [Sandbox]
2514
- def set_auto_delete_interval(sandbox_id_or_name, interval, opts = {})
2515
- data, _status_code, _headers = set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts)
2516
- 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
2517
1114
  end
2518
1115
 
2519
1116
  # Set sandbox auto-delete interval
2520
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1117
+ # @param sandbox_id [String] ID of the sandbox
2521
1118
  # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2522
1119
  # @param [Hash] opts the optional parameters
2523
1120
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2524
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2525
- def set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, 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 = {})
2526
1123
  if @api_client.config.debugging
2527
1124
  @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
2528
1125
  end
2529
- # verify the required parameter 'sandbox_id_or_name' is set
2530
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2531
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_delete_interval"
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"
2532
1129
  end
2533
1130
  # verify the required parameter 'interval' is set
2534
1131
  if @api_client.config.client_side_validation && interval.nil?
2535
1132
  fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
2536
1133
  end
2537
1134
  # resource path
2538
- local_var_path = '/sandbox/{sandboxIdOrName}/autodelete/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.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))
2539
1136
 
2540
1137
  # query parameters
2541
1138
  query_params = opts[:query_params] || {}
2542
1139
 
2543
1140
  # header parameters
2544
1141
  header_params = opts[:header_params] || {}
2545
- # HTTP header 'Accept' (if needed)
2546
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2547
1142
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2548
1143
 
2549
1144
  # form parameters
@@ -2553,7 +1148,7 @@ module DaytonaApiClient
2553
1148
  post_body = opts[:debug_body]
2554
1149
 
2555
1150
  # return_type
2556
- return_type = opts[:debug_return_type] || 'Sandbox'
1151
+ return_type = opts[:debug_return_type]
2557
1152
 
2558
1153
  # auth_names
2559
1154
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2576,44 +1171,42 @@ module DaytonaApiClient
2576
1171
  end
2577
1172
 
2578
1173
  # Set sandbox auto-stop interval
2579
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1174
+ # @param sandbox_id [String] ID of the sandbox
2580
1175
  # @param interval [Float] Auto-stop interval in minutes (0 to disable)
2581
1176
  # @param [Hash] opts the optional parameters
2582
1177
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2583
- # @return [Sandbox]
2584
- def set_autostop_interval(sandbox_id_or_name, interval, opts = {})
2585
- data, _status_code, _headers = set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts)
2586
- data
1178
+ # @return [nil]
1179
+ def set_autostop_interval(sandbox_id, interval, opts = {})
1180
+ set_autostop_interval_with_http_info(sandbox_id, interval, opts)
1181
+ nil
2587
1182
  end
2588
1183
 
2589
1184
  # Set sandbox auto-stop interval
2590
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1185
+ # @param sandbox_id [String] ID of the sandbox
2591
1186
  # @param interval [Float] Auto-stop interval in minutes (0 to disable)
2592
1187
  # @param [Hash] opts the optional parameters
2593
1188
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2594
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2595
- def set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
1189
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1190
+ def set_autostop_interval_with_http_info(sandbox_id, interval, opts = {})
2596
1191
  if @api_client.config.debugging
2597
1192
  @api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
2598
1193
  end
2599
- # verify the required parameter 'sandbox_id_or_name' is set
2600
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2601
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_autostop_interval"
1194
+ # verify the required parameter 'sandbox_id' is set
1195
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1196
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_autostop_interval"
2602
1197
  end
2603
1198
  # verify the required parameter 'interval' is set
2604
1199
  if @api_client.config.client_side_validation && interval.nil?
2605
1200
  fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
2606
1201
  end
2607
1202
  # resource path
2608
- local_var_path = '/sandbox/{sandboxIdOrName}/autostop/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.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))
2609
1204
 
2610
1205
  # query parameters
2611
1206
  query_params = opts[:query_params] || {}
2612
1207
 
2613
1208
  # header parameters
2614
1209
  header_params = opts[:header_params] || {}
2615
- # HTTP header 'Accept' (if needed)
2616
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2617
1210
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2618
1211
 
2619
1212
  # form parameters
@@ -2623,7 +1216,7 @@ module DaytonaApiClient
2623
1216
  post_body = opts[:debug_body]
2624
1217
 
2625
1218
  # return_type
2626
- return_type = opts[:debug_return_type] || 'Sandbox'
1219
+ return_type = opts[:debug_return_type]
2627
1220
 
2628
1221
  # auth_names
2629
1222
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2645,33 +1238,31 @@ module DaytonaApiClient
2645
1238
  return data, status_code, headers
2646
1239
  end
2647
1240
 
2648
- # Start or resume sandbox
2649
- # Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
2650
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1241
+ # Start sandbox
1242
+ # @param sandbox_id [String] ID of the sandbox
2651
1243
  # @param [Hash] opts the optional parameters
2652
1244
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2653
1245
  # @return [Sandbox]
2654
- def start_sandbox(sandbox_id_or_name, opts = {})
2655
- data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id_or_name, opts)
1246
+ def start_sandbox(sandbox_id, opts = {})
1247
+ data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id, opts)
2656
1248
  data
2657
1249
  end
2658
1250
 
2659
- # Start or resume sandbox
2660
- # Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
2661
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1251
+ # Start sandbox
1252
+ # @param sandbox_id [String] ID of the sandbox
2662
1253
  # @param [Hash] opts the optional parameters
2663
1254
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2664
1255
  # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2665
- def start_sandbox_with_http_info(sandbox_id_or_name, opts = {})
1256
+ def start_sandbox_with_http_info(sandbox_id, opts = {})
2666
1257
  if @api_client.config.debugging
2667
1258
  @api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
2668
1259
  end
2669
- # verify the required parameter 'sandbox_id_or_name' is set
2670
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2671
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.start_sandbox"
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"
2672
1263
  end
2673
1264
  # resource path
2674
- local_var_path = '/sandbox/{sandboxIdOrName}/start'.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))
2675
1266
 
2676
1267
  # query parameters
2677
1268
  query_params = opts[:query_params] || {}
@@ -2712,97 +1303,30 @@ module DaytonaApiClient
2712
1303
  end
2713
1304
 
2714
1305
  # Stop sandbox
2715
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2716
- # @param [Hash] opts the optional parameters
2717
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2718
- # @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
2719
- # @return [Sandbox]
2720
- def stop_sandbox(sandbox_id_or_name, opts = {})
2721
- data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
2722
- data
2723
- end
2724
-
2725
- # Stop sandbox
2726
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2727
- # @param [Hash] opts the optional parameters
2728
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2729
- # @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
2730
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2731
- def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
2732
- if @api_client.config.debugging
2733
- @api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
2734
- end
2735
- # verify the required parameter 'sandbox_id_or_name' is set
2736
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2737
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
2738
- end
2739
- # resource path
2740
- local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2741
-
2742
- # query parameters
2743
- query_params = opts[:query_params] || {}
2744
- query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
2745
-
2746
- # header parameters
2747
- header_params = opts[:header_params] || {}
2748
- # HTTP header 'Accept' (if needed)
2749
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2750
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2751
-
2752
- # form parameters
2753
- form_params = opts[:form_params] || {}
2754
-
2755
- # http body (model)
2756
- post_body = opts[:debug_body]
2757
-
2758
- # return_type
2759
- return_type = opts[:debug_return_type] || 'Sandbox'
2760
-
2761
- # auth_names
2762
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2763
-
2764
- new_options = opts.merge(
2765
- :operation => :"SandboxApi.stop_sandbox",
2766
- :header_params => header_params,
2767
- :query_params => query_params,
2768
- :form_params => form_params,
2769
- :body => post_body,
2770
- :auth_names => auth_names,
2771
- :return_type => return_type
2772
- )
2773
-
2774
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2775
- if @api_client.config.debugging
2776
- @api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2777
- end
2778
- return data, status_code, headers
2779
- end
2780
-
2781
- # Update sandbox last activity
2782
1306
  # @param sandbox_id [String] ID of the sandbox
2783
1307
  # @param [Hash] opts the optional parameters
2784
1308
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2785
1309
  # @return [nil]
2786
- def update_last_activity(sandbox_id, opts = {})
2787
- update_last_activity_with_http_info(sandbox_id, opts)
1310
+ def stop_sandbox(sandbox_id, opts = {})
1311
+ stop_sandbox_with_http_info(sandbox_id, opts)
2788
1312
  nil
2789
1313
  end
2790
1314
 
2791
- # Update sandbox last activity
1315
+ # Stop sandbox
2792
1316
  # @param sandbox_id [String] ID of the sandbox
2793
1317
  # @param [Hash] opts the optional parameters
2794
1318
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2795
1319
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2796
- def update_last_activity_with_http_info(sandbox_id, opts = {})
1320
+ def stop_sandbox_with_http_info(sandbox_id, opts = {})
2797
1321
  if @api_client.config.debugging
2798
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_last_activity ...'
1322
+ @api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
2799
1323
  end
2800
1324
  # verify the required parameter 'sandbox_id' is set
2801
1325
  if @api_client.config.client_side_validation && sandbox_id.nil?
2802
- fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_last_activity"
1326
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.stop_sandbox"
2803
1327
  end
2804
1328
  # resource path
2805
- local_var_path = '/sandbox/{sandboxId}/last-activity'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1329
+ local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2806
1330
 
2807
1331
  # query parameters
2808
1332
  query_params = opts[:query_params] || {}
@@ -2824,84 +1348,7 @@ module DaytonaApiClient
2824
1348
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2825
1349
 
2826
1350
  new_options = opts.merge(
2827
- :operation => :"SandboxApi.update_last_activity",
2828
- :header_params => header_params,
2829
- :query_params => query_params,
2830
- :form_params => form_params,
2831
- :body => post_body,
2832
- :auth_names => auth_names,
2833
- :return_type => return_type
2834
- )
2835
-
2836
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2837
- if @api_client.config.debugging
2838
- @api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2839
- end
2840
- return data, status_code, headers
2841
- end
2842
-
2843
- # Update sandbox network settings
2844
- # Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
2845
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2846
- # @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
2847
- # @param [Hash] opts the optional parameters
2848
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2849
- # @return [Sandbox]
2850
- def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
2851
- data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
2852
- data
2853
- end
2854
-
2855
- # Update sandbox network settings
2856
- # Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
2857
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2858
- # @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
2859
- # @param [Hash] opts the optional parameters
2860
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2861
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2862
- def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
2863
- if @api_client.config.debugging
2864
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
2865
- end
2866
- # verify the required parameter 'sandbox_id_or_name' is set
2867
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2868
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
2869
- end
2870
- # verify the required parameter 'update_sandbox_network_settings' is set
2871
- if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
2872
- fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
2873
- end
2874
- # resource path
2875
- local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2876
-
2877
- # query parameters
2878
- query_params = opts[:query_params] || {}
2879
-
2880
- # header parameters
2881
- header_params = opts[:header_params] || {}
2882
- # HTTP header 'Accept' (if needed)
2883
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2884
- # HTTP header 'Content-Type'
2885
- content_type = @api_client.select_header_content_type(['application/json'])
2886
- if !content_type.nil?
2887
- header_params['Content-Type'] = content_type
2888
- end
2889
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2890
-
2891
- # form parameters
2892
- form_params = opts[:form_params] || {}
2893
-
2894
- # http body (model)
2895
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
2896
-
2897
- # return_type
2898
- return_type = opts[:debug_return_type] || 'Sandbox'
2899
-
2900
- # auth_names
2901
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2902
-
2903
- new_options = opts.merge(
2904
- :operation => :"SandboxApi.update_network_settings",
1351
+ :operation => :"SandboxApi.stop_sandbox",
2905
1352
  :header_params => header_params,
2906
1353
  :query_params => query_params,
2907
1354
  :form_params => form_params,
@@ -2912,50 +1359,48 @@ module DaytonaApiClient
2912
1359
 
2913
1360
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2914
1361
  if @api_client.config.debugging
2915
- @api_client.config.logger.debug "API called: SandboxApi#update_network_settings\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}"
2916
1363
  end
2917
1364
  return data, status_code, headers
2918
1365
  end
2919
1366
 
2920
1367
  # Update public status
2921
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1368
+ # @param sandbox_id [String] ID of the sandbox
2922
1369
  # @param is_public [Boolean] Public status to set
2923
1370
  # @param [Hash] opts the optional parameters
2924
1371
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2925
- # @return [Sandbox]
2926
- def update_public_status(sandbox_id_or_name, is_public, opts = {})
2927
- data, _status_code, _headers = update_public_status_with_http_info(sandbox_id_or_name, is_public, opts)
2928
- 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
2929
1376
  end
2930
1377
 
2931
1378
  # Update public status
2932
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1379
+ # @param sandbox_id [String] ID of the sandbox
2933
1380
  # @param is_public [Boolean] Public status to set
2934
1381
  # @param [Hash] opts the optional parameters
2935
1382
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2936
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2937
- def update_public_status_with_http_info(sandbox_id_or_name, is_public, 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 = {})
2938
1385
  if @api_client.config.debugging
2939
1386
  @api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
2940
1387
  end
2941
- # verify the required parameter 'sandbox_id_or_name' is set
2942
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2943
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_public_status"
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"
2944
1391
  end
2945
1392
  # verify the required parameter 'is_public' is set
2946
1393
  if @api_client.config.client_side_validation && is_public.nil?
2947
1394
  fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
2948
1395
  end
2949
1396
  # resource path
2950
- 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))
1397
+ local_var_path = '/sandbox/{sandboxId}/public/{isPublic}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'isPublic' + '}', CGI.escape(is_public.to_s))
2951
1398
 
2952
1399
  # query parameters
2953
1400
  query_params = opts[:query_params] || {}
2954
1401
 
2955
1402
  # header parameters
2956
1403
  header_params = opts[:header_params] || {}
2957
- # HTTP header 'Accept' (if needed)
2958
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2959
1404
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2960
1405
 
2961
1406
  # form parameters
@@ -2965,7 +1410,7 @@ module DaytonaApiClient
2965
1410
  post_body = opts[:debug_body]
2966
1411
 
2967
1412
  # return_type
2968
- return_type = opts[:debug_return_type] || 'Sandbox'
1413
+ return_type = opts[:debug_return_type]
2969
1414
 
2970
1415
  # auth_names
2971
1416
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -3027,7 +1472,7 @@ module DaytonaApiClient
3027
1472
  # HTTP header 'Content-Type'
3028
1473
  content_type = @api_client.select_header_content_type(['application/json'])
3029
1474
  if !content_type.nil?
3030
- header_params['Content-Type'] = content_type
1475
+ header_params['Content-Type'] = content_type
3031
1476
  end
3032
1477
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3033
1478