daytona_api_client 0.171.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 (220) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +2 -2
  5. data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
  6. data/lib/daytona_api_client/api/audit_api.rb +140 -10
  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 +163 -954
  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 +292 -1620
  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 +268 -5
  20. data/lib/daytona_api_client/api/workspace_api.rb +6 -6
  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 +74 -3
  46. data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
  47. data/lib/daytona_api_client/models/create_runner.rb +389 -34
  48. data/lib/daytona_api_client/models/create_sandbox.rb +77 -16
  49. data/lib/daytona_api_client/models/create_session_request.rb +74 -3
  50. data/lib/daytona_api_client/models/create_snapshot.rb +88 -17
  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 +78 -7
  54. data/lib/daytona_api_client/models/daytona_configuration.rb +78 -54
  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 -149
  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.rb +74 -3
  104. data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
  105. data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +77 -10
  106. data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
  107. data/lib/daytona_api_client/models/position.rb +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 +191 -109
  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 +92 -95
  129. data/lib/daytona_api_client/models/sandbox_class.rb +3 -4
  130. data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
  131. data/lib/daytona_api_client/models/sandbox_info.rb +74 -3
  132. data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
  133. data/lib/daytona_api_client/models/sandbox_state.rb +3 -7
  134. data/lib/daytona_api_client/models/sandbox_volume.rb +78 -17
  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 -39
  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 -93
  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/workspace.rb +107 -83
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +3 -49
  166. data/project.json +11 -42
  167. metadata +6 -56
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -211
  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 -1151
  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_model_base.rb +0 -88
  179. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -314
  180. data/lib/daytona_api_client/models/create_region.rb +0 -198
  181. data/lib/daytona_api_client/models/create_region_response.rb +0 -209
  182. data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
  183. data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -165
  184. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  185. data/lib/daytona_api_client/models/job.rb +0 -366
  186. data/lib/daytona_api_client/models/job_status.rb +0 -43
  187. data/lib/daytona_api_client/models/job_type.rb +0 -53
  188. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  189. data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
  190. data/lib/daytona_api_client/models/metric_series.rb +0 -194
  191. data/lib/daytona_api_client/models/metrics_response.rb +0 -167
  192. data/lib/daytona_api_client/models/otel_config.rb +0 -178
  193. data/lib/daytona_api_client/models/paginated_jobs.rb +0 -244
  194. data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
  195. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  196. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
  197. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  198. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
  199. data/lib/daytona_api_client/models/region_quota.rb +0 -316
  200. data/lib/daytona_api_client/models/region_type.rb +0 -42
  201. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -368
  202. data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
  203. data/lib/daytona_api_client/models/runner_class.rb +0 -41
  204. data/lib/daytona_api_client/models/runner_full.rb +0 -735
  205. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -462
  206. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
  207. data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
  208. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
  209. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
  210. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
  211. data/lib/daytona_api_client/models/trace_span.rb +0 -332
  212. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  213. data/lib/daytona_api_client/models/update_job_status.rb +0 -207
  214. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  215. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -214
  216. data/lib/daytona_api_client/models/update_region.rb +0 -171
  217. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
  218. data/lib/daytona_api_client/models/url.rb +0 -165
  219. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
  220. data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -192
@@ -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,973 +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 all sandboxes
1700
- # @param [Hash] opts the optional parameters
1701
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1702
- # @option opts [Boolean] :verbose Include verbose output
1703
- # @option opts [String] :labels JSON encoded labels to filter by
1704
- # @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
1705
- # @return [Array<Sandbox>]
1706
- def list_sandboxes(opts = {})
1707
- data, _status_code, _headers = list_sandboxes_with_http_info(opts)
1708
- data
1709
- end
1710
-
1711
- # List all sandboxes
1712
- # @param [Hash] opts the optional parameters
1713
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1714
- # @option opts [Boolean] :verbose Include verbose output
1715
- # @option opts [String] :labels JSON encoded labels to filter by
1716
- # @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
1717
- # @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
1718
- def list_sandboxes_with_http_info(opts = {})
1719
- if @api_client.config.debugging
1720
- @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
1721
- end
1722
- # resource path
1723
- local_var_path = '/sandbox'
1724
-
1725
- # query parameters
1726
- query_params = opts[:query_params] || {}
1727
- query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
1728
- query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
1729
- query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
1730
-
1731
- # header parameters
1732
- header_params = opts[:header_params] || {}
1733
- # HTTP header 'Accept' (if needed)
1734
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1735
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1736
-
1737
- # form parameters
1738
- form_params = opts[:form_params] || {}
1739
-
1740
- # http body (model)
1741
- post_body = opts[:debug_body]
1742
-
1743
- # return_type
1744
- return_type = opts[:debug_return_type] || 'Array<Sandbox>'
1745
-
1746
- # auth_names
1747
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1748
-
1749
- new_options = opts.merge(
1750
- :operation => :"SandboxApi.list_sandboxes",
1751
- :header_params => header_params,
1752
- :query_params => query_params,
1753
- :form_params => form_params,
1754
- :body => post_body,
1755
- :auth_names => auth_names,
1756
- :return_type => return_type
1757
- )
1758
-
1759
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1760
- if @api_client.config.debugging
1761
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1762
- end
1763
- return data, status_code, headers
1764
- end
1765
-
1766
- # List all sandboxes paginated
1767
- # @param [Hash] opts the optional parameters
1768
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1769
- # @option opts [Float] :page Page number of the results (default to 1)
1770
- # @option opts [Float] :limit Number of results per page (default to 100)
1771
- # @option opts [String] :id Filter by partial ID match
1772
- # @option opts [String] :name Filter by partial name match
1773
- # @option opts [String] :labels JSON encoded labels to filter by
1774
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1775
- # @option opts [Array<String>] :states List of states to filter by
1776
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1777
- # @option opts [Array<String>] :regions List of regions to filter by
1778
- # @option opts [Float] :min_cpu Minimum CPU
1779
- # @option opts [Float] :max_cpu Maximum CPU
1780
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1781
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1782
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1783
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1784
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1785
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1786
- # @option opts [String] :sort Field to sort by (default to 'createdAt')
1787
- # @option opts [String] :order Direction to sort by (default to 'desc')
1788
- # @return [PaginatedSandboxes]
1789
- def list_sandboxes_paginated(opts = {})
1790
- data, _status_code, _headers = list_sandboxes_paginated_with_http_info(opts)
1791
- data
1792
- end
1793
-
1794
- # List all sandboxes paginated
764
+ # List all sandboxes paginated
1795
765
  # @param [Hash] opts the optional parameters
1796
766
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1797
767
  # @option opts [Float] :page Page number of the results (default to 1)
1798
768
  # @option opts [Float] :limit Number of results per page (default to 100)
1799
769
  # @option opts [String] :id Filter by partial ID match
1800
- # @option opts [String] :name Filter by partial name match
1801
770
  # @option opts [String] :labels JSON encoded labels to filter by
1802
771
  # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1803
772
  # @option opts [Array<String>] :states List of states to filter by
@@ -1830,7 +799,7 @@ module DaytonaApiClient
1830
799
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
1831
800
  end
1832
801
 
1833
- allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "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"]
1834
803
  if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
1835
804
  fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
1836
805
  end
@@ -1858,11 +827,11 @@ module DaytonaApiClient
1858
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.'
1859
828
  end
1860
829
 
1861
- allowable_values = ["id", "name", "state", "snapshot", "region", "updatedAt", "createdAt", "lastActivityAt", "unknown_default_open_api"]
830
+ allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
1862
831
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1863
832
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1864
833
  end
1865
- allowable_values = ["asc", "desc", "unknown_default_open_api"]
834
+ allowable_values = ["asc", "desc"]
1866
835
  if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
1867
836
  fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
1868
837
  end
@@ -1874,7 +843,6 @@ module DaytonaApiClient
1874
843
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1875
844
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1876
845
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
1877
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1878
846
  query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
1879
847
  query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
1880
848
  query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
@@ -1884,79 +852,12 @@ module DaytonaApiClient
1884
852
  query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
1885
853
  query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
1886
854
  query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
1887
- query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
1888
- query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
1889
- query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
1890
- query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
1891
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1892
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1893
-
1894
- # header parameters
1895
- header_params = opts[:header_params] || {}
1896
- # HTTP header 'Accept' (if needed)
1897
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1898
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
1899
-
1900
- # form parameters
1901
- form_params = opts[:form_params] || {}
1902
-
1903
- # http body (model)
1904
- post_body = opts[:debug_body]
1905
-
1906
- # return_type
1907
- return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
1908
-
1909
- # auth_names
1910
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1911
-
1912
- new_options = opts.merge(
1913
- :operation => :"SandboxApi.list_sandboxes_paginated",
1914
- :header_params => header_params,
1915
- :query_params => query_params,
1916
- :form_params => form_params,
1917
- :body => post_body,
1918
- :auth_names => auth_names,
1919
- :return_type => return_type
1920
- )
1921
-
1922
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1923
- if @api_client.config.debugging
1924
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1925
- end
1926
- return data, status_code, headers
1927
- end
1928
-
1929
- # Recover sandbox from error state
1930
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1931
- # @param [Hash] opts the optional parameters
1932
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1933
- # @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
1934
- # @return [Sandbox]
1935
- def recover_sandbox(sandbox_id_or_name, opts = {})
1936
- data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
1937
- data
1938
- end
1939
-
1940
- # Recover sandbox from error state
1941
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1942
- # @param [Hash] opts the optional parameters
1943
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1944
- # @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
1945
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
1946
- def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
1947
- if @api_client.config.debugging
1948
- @api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
1949
- end
1950
- # verify the required parameter 'sandbox_id_or_name' is set
1951
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
1952
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
1953
- end
1954
- # resource path
1955
- local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
1956
-
1957
- # query parameters
1958
- query_params = opts[:query_params] || {}
1959
- query_params[:'skipStart'] = opts[:'skip_start'] if !opts[:'skip_start'].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?
1960
861
 
1961
862
  # header parameters
1962
863
  header_params = opts[:header_params] || {}
@@ -1971,13 +872,13 @@ module DaytonaApiClient
1971
872
  post_body = opts[:debug_body]
1972
873
 
1973
874
  # return_type
1974
- return_type = opts[:debug_return_type] || 'Sandbox'
875
+ return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
1975
876
 
1976
877
  # auth_names
1977
878
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1978
879
 
1979
880
  new_options = opts.merge(
1980
- :operation => :"SandboxApi.recover_sandbox",
881
+ :operation => :"SandboxApi.list_sandboxes_paginated",
1981
882
  :header_params => header_params,
1982
883
  :query_params => query_params,
1983
884
  :form_params => form_params,
@@ -1986,44 +887,44 @@ module DaytonaApiClient
1986
887
  :return_type => return_type
1987
888
  )
1988
889
 
1989
- 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)
1990
891
  if @api_client.config.debugging
1991
- @api_client.config.logger.debug "API called: SandboxApi#recover_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}"
1992
893
  end
1993
894
  return data, status_code, headers
1994
895
  end
1995
896
 
1996
897
  # Replace sandbox labels
1997
- # @param sandbox_id_or_name [String] ID or name of the sandbox
898
+ # @param sandbox_id [String] ID of the sandbox
1998
899
  # @param sandbox_labels [SandboxLabels]
1999
900
  # @param [Hash] opts the optional parameters
2000
901
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2001
902
  # @return [SandboxLabels]
2002
- def replace_labels(sandbox_id_or_name, sandbox_labels, opts = {})
2003
- data, _status_code, _headers = replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts)
903
+ def replace_labels(sandbox_id, sandbox_labels, opts = {})
904
+ data, _status_code, _headers = replace_labels_with_http_info(sandbox_id, sandbox_labels, opts)
2004
905
  data
2005
906
  end
2006
907
 
2007
908
  # Replace sandbox labels
2008
- # @param sandbox_id_or_name [String] ID or name of the sandbox
909
+ # @param sandbox_id [String] ID of the sandbox
2009
910
  # @param sandbox_labels [SandboxLabels]
2010
911
  # @param [Hash] opts the optional parameters
2011
912
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2012
913
  # @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
2013
- def replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts = {})
914
+ def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
2014
915
  if @api_client.config.debugging
2015
916
  @api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
2016
917
  end
2017
- # verify the required parameter 'sandbox_id_or_name' is set
2018
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2019
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.replace_labels"
918
+ # verify the required parameter 'sandbox_id' is set
919
+ if @api_client.config.client_side_validation && sandbox_id.nil?
920
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.replace_labels"
2020
921
  end
2021
922
  # verify the required parameter 'sandbox_labels' is set
2022
923
  if @api_client.config.client_side_validation && sandbox_labels.nil?
2023
924
  fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
2024
925
  end
2025
926
  # resource path
2026
- local_var_path = '/sandbox/{sandboxIdOrName}/labels'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
927
+ local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
2027
928
 
2028
929
  # query parameters
2029
930
  query_params = opts[:query_params] || {}
@@ -2035,7 +936,7 @@ module DaytonaApiClient
2035
936
  # HTTP header 'Content-Type'
2036
937
  content_type = @api_client.select_header_content_type(['application/json'])
2037
938
  if !content_type.nil?
2038
- header_params['Content-Type'] = content_type
939
+ header_params['Content-Type'] = content_type
2039
940
  end
2040
941
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2041
942
 
@@ -2068,108 +969,33 @@ module DaytonaApiClient
2068
969
  return data, status_code, headers
2069
970
  end
2070
971
 
2071
- # Resize sandbox resources
2072
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2073
- # @param resize_sandbox [ResizeSandbox]
2074
- # @param [Hash] opts the optional parameters
2075
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2076
- # @return [Sandbox]
2077
- def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
2078
- data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
2079
- data
2080
- end
2081
-
2082
- # Resize sandbox resources
2083
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2084
- # @param resize_sandbox [ResizeSandbox]
2085
- # @param [Hash] opts the optional parameters
2086
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2087
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2088
- def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
2089
- if @api_client.config.debugging
2090
- @api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
2091
- end
2092
- # verify the required parameter 'sandbox_id_or_name' is set
2093
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2094
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
2095
- end
2096
- # verify the required parameter 'resize_sandbox' is set
2097
- if @api_client.config.client_side_validation && resize_sandbox.nil?
2098
- fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
2099
- end
2100
- # resource path
2101
- local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2102
-
2103
- # query parameters
2104
- query_params = opts[:query_params] || {}
2105
-
2106
- # header parameters
2107
- header_params = opts[:header_params] || {}
2108
- # HTTP header 'Accept' (if needed)
2109
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2110
- # HTTP header 'Content-Type'
2111
- content_type = @api_client.select_header_content_type(['application/json'])
2112
- if !content_type.nil?
2113
- header_params['Content-Type'] = content_type
2114
- end
2115
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2116
-
2117
- # form parameters
2118
- form_params = opts[:form_params] || {}
2119
-
2120
- # http body (model)
2121
- post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
2122
-
2123
- # return_type
2124
- return_type = opts[:debug_return_type] || 'Sandbox'
2125
-
2126
- # auth_names
2127
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2128
-
2129
- new_options = opts.merge(
2130
- :operation => :"SandboxApi.resize_sandbox",
2131
- :header_params => header_params,
2132
- :query_params => query_params,
2133
- :form_params => form_params,
2134
- :body => post_body,
2135
- :auth_names => auth_names,
2136
- :return_type => return_type
2137
- )
2138
-
2139
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2140
- if @api_client.config.debugging
2141
- @api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2142
- end
2143
- return data, status_code, headers
2144
- end
2145
-
2146
972
  # Revoke SSH access for sandbox
2147
- # @param sandbox_id_or_name [String] ID or name of the sandbox
973
+ # @param sandbox_id [String] ID of the sandbox
2148
974
  # @param [Hash] opts the optional parameters
2149
975
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2150
976
  # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2151
- # @return [Sandbox]
2152
- def revoke_ssh_access(sandbox_id_or_name, opts = {})
2153
- data, _status_code, _headers = revoke_ssh_access_with_http_info(sandbox_id_or_name, opts)
2154
- data
977
+ # @return [nil]
978
+ def revoke_ssh_access(sandbox_id, opts = {})
979
+ revoke_ssh_access_with_http_info(sandbox_id, opts)
980
+ nil
2155
981
  end
2156
982
 
2157
983
  # Revoke SSH access for sandbox
2158
- # @param sandbox_id_or_name [String] ID or name of the sandbox
984
+ # @param sandbox_id [String] ID of the sandbox
2159
985
  # @param [Hash] opts the optional parameters
2160
986
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2161
987
  # @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
2162
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2163
- 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 = {})
2164
990
  if @api_client.config.debugging
2165
991
  @api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
2166
992
  end
2167
- # verify the required parameter 'sandbox_id_or_name' is set
2168
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2169
- 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"
2170
996
  end
2171
997
  # resource path
2172
- 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))
2173
999
 
2174
1000
  # query parameters
2175
1001
  query_params = opts[:query_params] || {}
@@ -2177,8 +1003,6 @@ module DaytonaApiClient
2177
1003
 
2178
1004
  # header parameters
2179
1005
  header_params = opts[:header_params] || {}
2180
- # HTTP header 'Accept' (if needed)
2181
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2182
1006
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2183
1007
 
2184
1008
  # form parameters
@@ -2188,7 +1012,7 @@ module DaytonaApiClient
2188
1012
  post_body = opts[:debug_body]
2189
1013
 
2190
1014
  # return_type
2191
- return_type = opts[:debug_return_type] || 'Sandbox'
1015
+ return_type = opts[:debug_return_type]
2192
1016
 
2193
1017
  # auth_names
2194
1018
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2211,44 +1035,42 @@ module DaytonaApiClient
2211
1035
  end
2212
1036
 
2213
1037
  # Set sandbox auto-archive interval
2214
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1038
+ # @param sandbox_id [String] ID of the sandbox
2215
1039
  # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2216
1040
  # @param [Hash] opts the optional parameters
2217
1041
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2218
- # @return [Sandbox]
2219
- def set_auto_archive_interval(sandbox_id_or_name, interval, opts = {})
2220
- data, _status_code, _headers = set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts)
2221
- 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
2222
1046
  end
2223
1047
 
2224
1048
  # Set sandbox auto-archive interval
2225
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1049
+ # @param sandbox_id [String] ID of the sandbox
2226
1050
  # @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
2227
1051
  # @param [Hash] opts the optional parameters
2228
1052
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2229
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2230
- 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 = {})
2231
1055
  if @api_client.config.debugging
2232
1056
  @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
2233
1057
  end
2234
- # verify the required parameter 'sandbox_id_or_name' is set
2235
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2236
- 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"
2237
1061
  end
2238
1062
  # verify the required parameter 'interval' is set
2239
1063
  if @api_client.config.client_side_validation && interval.nil?
2240
1064
  fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
2241
1065
  end
2242
1066
  # resource path
2243
- 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))
2244
1068
 
2245
1069
  # query parameters
2246
1070
  query_params = opts[:query_params] || {}
2247
1071
 
2248
1072
  # header parameters
2249
1073
  header_params = opts[:header_params] || {}
2250
- # HTTP header 'Accept' (if needed)
2251
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2252
1074
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2253
1075
 
2254
1076
  # form parameters
@@ -2258,7 +1080,7 @@ module DaytonaApiClient
2258
1080
  post_body = opts[:debug_body]
2259
1081
 
2260
1082
  # return_type
2261
- return_type = opts[:debug_return_type] || 'Sandbox'
1083
+ return_type = opts[:debug_return_type]
2262
1084
 
2263
1085
  # auth_names
2264
1086
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2281,44 +1103,42 @@ module DaytonaApiClient
2281
1103
  end
2282
1104
 
2283
1105
  # Set sandbox auto-delete interval
2284
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1106
+ # @param sandbox_id [String] ID of the sandbox
2285
1107
  # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2286
1108
  # @param [Hash] opts the optional parameters
2287
1109
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2288
- # @return [Sandbox]
2289
- def set_auto_delete_interval(sandbox_id_or_name, interval, opts = {})
2290
- data, _status_code, _headers = set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts)
2291
- 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
2292
1114
  end
2293
1115
 
2294
1116
  # Set sandbox auto-delete interval
2295
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1117
+ # @param sandbox_id [String] ID of the sandbox
2296
1118
  # @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
2297
1119
  # @param [Hash] opts the optional parameters
2298
1120
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2299
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2300
- 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 = {})
2301
1123
  if @api_client.config.debugging
2302
1124
  @api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
2303
1125
  end
2304
- # verify the required parameter 'sandbox_id_or_name' is set
2305
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2306
- 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"
2307
1129
  end
2308
1130
  # verify the required parameter 'interval' is set
2309
1131
  if @api_client.config.client_side_validation && interval.nil?
2310
1132
  fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
2311
1133
  end
2312
1134
  # resource path
2313
- 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))
2314
1136
 
2315
1137
  # query parameters
2316
1138
  query_params = opts[:query_params] || {}
2317
1139
 
2318
1140
  # header parameters
2319
1141
  header_params = opts[:header_params] || {}
2320
- # HTTP header 'Accept' (if needed)
2321
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2322
1142
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2323
1143
 
2324
1144
  # form parameters
@@ -2328,7 +1148,7 @@ module DaytonaApiClient
2328
1148
  post_body = opts[:debug_body]
2329
1149
 
2330
1150
  # return_type
2331
- return_type = opts[:debug_return_type] || 'Sandbox'
1151
+ return_type = opts[:debug_return_type]
2332
1152
 
2333
1153
  # auth_names
2334
1154
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2351,44 +1171,42 @@ module DaytonaApiClient
2351
1171
  end
2352
1172
 
2353
1173
  # Set sandbox auto-stop interval
2354
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1174
+ # @param sandbox_id [String] ID of the sandbox
2355
1175
  # @param interval [Float] Auto-stop interval in minutes (0 to disable)
2356
1176
  # @param [Hash] opts the optional parameters
2357
1177
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2358
- # @return [Sandbox]
2359
- def set_autostop_interval(sandbox_id_or_name, interval, opts = {})
2360
- data, _status_code, _headers = set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts)
2361
- 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
2362
1182
  end
2363
1183
 
2364
1184
  # Set sandbox auto-stop interval
2365
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1185
+ # @param sandbox_id [String] ID of the sandbox
2366
1186
  # @param interval [Float] Auto-stop interval in minutes (0 to disable)
2367
1187
  # @param [Hash] opts the optional parameters
2368
1188
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2369
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2370
- 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 = {})
2371
1191
  if @api_client.config.debugging
2372
1192
  @api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
2373
1193
  end
2374
- # verify the required parameter 'sandbox_id_or_name' is set
2375
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2376
- 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"
2377
1197
  end
2378
1198
  # verify the required parameter 'interval' is set
2379
1199
  if @api_client.config.client_side_validation && interval.nil?
2380
1200
  fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
2381
1201
  end
2382
1202
  # resource path
2383
- 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))
2384
1204
 
2385
1205
  # query parameters
2386
1206
  query_params = opts[:query_params] || {}
2387
1207
 
2388
1208
  # header parameters
2389
1209
  header_params = opts[:header_params] || {}
2390
- # HTTP header 'Accept' (if needed)
2391
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2392
1210
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2393
1211
 
2394
1212
  # form parameters
@@ -2398,7 +1216,7 @@ module DaytonaApiClient
2398
1216
  post_body = opts[:debug_body]
2399
1217
 
2400
1218
  # return_type
2401
- return_type = opts[:debug_return_type] || 'Sandbox'
1219
+ return_type = opts[:debug_return_type]
2402
1220
 
2403
1221
  # auth_names
2404
1222
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2421,30 +1239,30 @@ module DaytonaApiClient
2421
1239
  end
2422
1240
 
2423
1241
  # Start sandbox
2424
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1242
+ # @param sandbox_id [String] ID of the sandbox
2425
1243
  # @param [Hash] opts the optional parameters
2426
1244
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2427
1245
  # @return [Sandbox]
2428
- def start_sandbox(sandbox_id_or_name, opts = {})
2429
- 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)
2430
1248
  data
2431
1249
  end
2432
1250
 
2433
1251
  # Start sandbox
2434
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1252
+ # @param sandbox_id [String] ID of the sandbox
2435
1253
  # @param [Hash] opts the optional parameters
2436
1254
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2437
1255
  # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2438
- def start_sandbox_with_http_info(sandbox_id_or_name, opts = {})
1256
+ def start_sandbox_with_http_info(sandbox_id, opts = {})
2439
1257
  if @api_client.config.debugging
2440
1258
  @api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
2441
1259
  end
2442
- # verify the required parameter 'sandbox_id_or_name' is set
2443
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2444
- 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"
2445
1263
  end
2446
1264
  # resource path
2447
- 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))
2448
1266
 
2449
1267
  # query parameters
2450
1268
  query_params = opts[:query_params] || {}
@@ -2485,97 +1303,30 @@ module DaytonaApiClient
2485
1303
  end
2486
1304
 
2487
1305
  # Stop sandbox
2488
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2489
- # @param [Hash] opts the optional parameters
2490
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2491
- # @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
2492
- # @return [Sandbox]
2493
- def stop_sandbox(sandbox_id_or_name, opts = {})
2494
- data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
2495
- data
2496
- end
2497
-
2498
- # Stop sandbox
2499
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2500
- # @param [Hash] opts the optional parameters
2501
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2502
- # @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
2503
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2504
- def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
2505
- if @api_client.config.debugging
2506
- @api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
2507
- end
2508
- # verify the required parameter 'sandbox_id_or_name' is set
2509
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2510
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
2511
- end
2512
- # resource path
2513
- local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2514
-
2515
- # query parameters
2516
- query_params = opts[:query_params] || {}
2517
- query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
2518
-
2519
- # header parameters
2520
- header_params = opts[:header_params] || {}
2521
- # HTTP header 'Accept' (if needed)
2522
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2523
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2524
-
2525
- # form parameters
2526
- form_params = opts[:form_params] || {}
2527
-
2528
- # http body (model)
2529
- post_body = opts[:debug_body]
2530
-
2531
- # return_type
2532
- return_type = opts[:debug_return_type] || 'Sandbox'
2533
-
2534
- # auth_names
2535
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2536
-
2537
- new_options = opts.merge(
2538
- :operation => :"SandboxApi.stop_sandbox",
2539
- :header_params => header_params,
2540
- :query_params => query_params,
2541
- :form_params => form_params,
2542
- :body => post_body,
2543
- :auth_names => auth_names,
2544
- :return_type => return_type
2545
- )
2546
-
2547
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2548
- if @api_client.config.debugging
2549
- @api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2550
- end
2551
- return data, status_code, headers
2552
- end
2553
-
2554
- # Update sandbox last activity
2555
1306
  # @param sandbox_id [String] ID of the sandbox
2556
1307
  # @param [Hash] opts the optional parameters
2557
1308
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2558
1309
  # @return [nil]
2559
- def update_last_activity(sandbox_id, opts = {})
2560
- 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)
2561
1312
  nil
2562
1313
  end
2563
1314
 
2564
- # Update sandbox last activity
1315
+ # Stop sandbox
2565
1316
  # @param sandbox_id [String] ID of the sandbox
2566
1317
  # @param [Hash] opts the optional parameters
2567
1318
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2568
1319
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2569
- def update_last_activity_with_http_info(sandbox_id, opts = {})
1320
+ def stop_sandbox_with_http_info(sandbox_id, opts = {})
2570
1321
  if @api_client.config.debugging
2571
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_last_activity ...'
1322
+ @api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
2572
1323
  end
2573
1324
  # verify the required parameter 'sandbox_id' is set
2574
1325
  if @api_client.config.client_side_validation && sandbox_id.nil?
2575
- 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"
2576
1327
  end
2577
1328
  # resource path
2578
- 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))
2579
1330
 
2580
1331
  # query parameters
2581
1332
  query_params = opts[:query_params] || {}
@@ -2597,84 +1348,7 @@ module DaytonaApiClient
2597
1348
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2598
1349
 
2599
1350
  new_options = opts.merge(
2600
- :operation => :"SandboxApi.update_last_activity",
2601
- :header_params => header_params,
2602
- :query_params => query_params,
2603
- :form_params => form_params,
2604
- :body => post_body,
2605
- :auth_names => auth_names,
2606
- :return_type => return_type
2607
- )
2608
-
2609
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2610
- if @api_client.config.debugging
2611
- @api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2612
- end
2613
- return data, status_code, headers
2614
- end
2615
-
2616
- # Update sandbox network settings
2617
- # Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
2618
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2619
- # @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
2620
- # @param [Hash] opts the optional parameters
2621
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2622
- # @return [Sandbox]
2623
- def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
2624
- data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
2625
- data
2626
- end
2627
-
2628
- # Update sandbox network settings
2629
- # Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
2630
- # @param sandbox_id_or_name [String] ID or name of the sandbox
2631
- # @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
2632
- # @param [Hash] opts the optional parameters
2633
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2634
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2635
- def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
2636
- if @api_client.config.debugging
2637
- @api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
2638
- end
2639
- # verify the required parameter 'sandbox_id_or_name' is set
2640
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2641
- fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
2642
- end
2643
- # verify the required parameter 'update_sandbox_network_settings' is set
2644
- if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
2645
- fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
2646
- end
2647
- # resource path
2648
- local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
2649
-
2650
- # query parameters
2651
- query_params = opts[:query_params] || {}
2652
-
2653
- # header parameters
2654
- header_params = opts[:header_params] || {}
2655
- # HTTP header 'Accept' (if needed)
2656
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2657
- # HTTP header 'Content-Type'
2658
- content_type = @api_client.select_header_content_type(['application/json'])
2659
- if !content_type.nil?
2660
- header_params['Content-Type'] = content_type
2661
- end
2662
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2663
-
2664
- # form parameters
2665
- form_params = opts[:form_params] || {}
2666
-
2667
- # http body (model)
2668
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
2669
-
2670
- # return_type
2671
- return_type = opts[:debug_return_type] || 'Sandbox'
2672
-
2673
- # auth_names
2674
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2675
-
2676
- new_options = opts.merge(
2677
- :operation => :"SandboxApi.update_network_settings",
1351
+ :operation => :"SandboxApi.stop_sandbox",
2678
1352
  :header_params => header_params,
2679
1353
  :query_params => query_params,
2680
1354
  :form_params => form_params,
@@ -2685,50 +1359,48 @@ module DaytonaApiClient
2685
1359
 
2686
1360
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2687
1361
  if @api_client.config.debugging
2688
- @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}"
2689
1363
  end
2690
1364
  return data, status_code, headers
2691
1365
  end
2692
1366
 
2693
1367
  # Update public status
2694
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1368
+ # @param sandbox_id [String] ID of the sandbox
2695
1369
  # @param is_public [Boolean] Public status to set
2696
1370
  # @param [Hash] opts the optional parameters
2697
1371
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2698
- # @return [Sandbox]
2699
- def update_public_status(sandbox_id_or_name, is_public, opts = {})
2700
- data, _status_code, _headers = update_public_status_with_http_info(sandbox_id_or_name, is_public, opts)
2701
- 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
2702
1376
  end
2703
1377
 
2704
1378
  # Update public status
2705
- # @param sandbox_id_or_name [String] ID or name of the sandbox
1379
+ # @param sandbox_id [String] ID of the sandbox
2706
1380
  # @param is_public [Boolean] Public status to set
2707
1381
  # @param [Hash] opts the optional parameters
2708
1382
  # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2709
- # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
2710
- 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 = {})
2711
1385
  if @api_client.config.debugging
2712
1386
  @api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
2713
1387
  end
2714
- # verify the required parameter 'sandbox_id_or_name' is set
2715
- if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
2716
- 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"
2717
1391
  end
2718
1392
  # verify the required parameter 'is_public' is set
2719
1393
  if @api_client.config.client_side_validation && is_public.nil?
2720
1394
  fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
2721
1395
  end
2722
1396
  # resource path
2723
- 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))
2724
1398
 
2725
1399
  # query parameters
2726
1400
  query_params = opts[:query_params] || {}
2727
1401
 
2728
1402
  # header parameters
2729
1403
  header_params = opts[:header_params] || {}
2730
- # HTTP header 'Accept' (if needed)
2731
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2732
1404
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2733
1405
 
2734
1406
  # form parameters
@@ -2738,7 +1410,7 @@ module DaytonaApiClient
2738
1410
  post_body = opts[:debug_body]
2739
1411
 
2740
1412
  # return_type
2741
- return_type = opts[:debug_return_type] || 'Sandbox'
1413
+ return_type = opts[:debug_return_type]
2742
1414
 
2743
1415
  # auth_names
2744
1416
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
@@ -2800,7 +1472,7 @@ module DaytonaApiClient
2800
1472
  # HTTP header 'Content-Type'
2801
1473
  content_type = @api_client.select_header_content_type(['application/json'])
2802
1474
  if !content_type.nil?
2803
- header_params['Content-Type'] = content_type
1475
+ header_params['Content-Type'] = content_type
2804
1476
  end
2805
1477
  header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2806
1478