daytona_api_client 0.182.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 (221) 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 +155 -1075
  12. data/lib/daytona_api_client/api/preview_api.rb +8 -77
  13. data/lib/daytona_api_client/api/runners_api.rb +22 -412
  14. data/lib/daytona_api_client/api/sandbox_api.rb +307 -1729
  15. data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
  16. data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
  17. data/lib/daytona_api_client/api/users_api.rb +239 -2
  18. data/lib/daytona_api_client/api/volumes_api.rb +2 -2
  19. data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
  20. data/lib/daytona_api_client/api/workspace_api.rb +955 -0
  21. data/lib/daytona_api_client/api_client.rb +4 -8
  22. data/lib/daytona_api_client/api_error.rb +1 -1
  23. data/lib/daytona_api_client/configuration.rb +2 -5
  24. data/lib/daytona_api_client/models/account_provider.rb +74 -3
  25. data/lib/daytona_api_client/models/announcement.rb +74 -3
  26. data/lib/daytona_api_client/models/api_key_list.rb +74 -3
  27. data/lib/daytona_api_client/models/api_key_response.rb +74 -3
  28. data/lib/daytona_api_client/models/audit_log.rb +75 -22
  29. data/lib/daytona_api_client/models/build_info.rb +78 -34
  30. data/lib/daytona_api_client/models/command.rb +74 -3
  31. data/lib/daytona_api_client/models/completion_context.rb +74 -3
  32. data/lib/daytona_api_client/models/completion_item.rb +74 -3
  33. data/lib/daytona_api_client/models/completion_list.rb +74 -3
  34. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
  35. data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
  36. data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
  37. data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
  38. data/lib/daytona_api_client/models/create_api_key.rb +75 -4
  39. data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
  40. data/lib/daytona_api_client/models/create_build_info.rb +74 -3
  41. data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
  42. data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
  43. data/lib/daytona_api_client/models/create_organization.rb +78 -34
  44. data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
  45. data/lib/daytona_api_client/models/create_organization_quota.rb +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 +386 -43
  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 +411 -0
  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 -162
  96. data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
  97. data/lib/daytona_api_client/models/organization_role.rb +74 -3
  98. data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
  99. data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
  100. data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
  101. data/lib/daytona_api_client/models/organization_user.rb +76 -5
  102. data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
  103. data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
  104. data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
  105. data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
  106. data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
  107. data/lib/daytona_api_client/models/position.rb +74 -3
  108. data/lib/daytona_api_client/models/posthog_config.rb +74 -3
  109. data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
  110. data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
  111. data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
  112. data/lib/daytona_api_client/models/process_status_response.rb +74 -3
  113. data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
  114. data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
  115. data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
  116. data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
  117. data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
  118. data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
  119. data/lib/daytona_api_client/models/range.rb +74 -3
  120. data/lib/daytona_api_client/models/region.rb +78 -181
  121. data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
  122. data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
  123. data/lib/daytona_api_client/models/replace_request.rb +74 -3
  124. data/lib/daytona_api_client/models/replace_result.rb +74 -3
  125. data/lib/daytona_api_client/models/runner.rb +191 -138
  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/{create_region.rb → sandbox_info.rb} +113 -38
  132. data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
  133. data/lib/daytona_api_client/models/sandbox_state.rb +3 -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/{sandbox_list_item.rb → workspace.rb} +344 -170
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +8 -53
  166. data/project.json +11 -42
  167. metadata +11 -60
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -210
  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 -326
  180. data/lib/daytona_api_client/models/create_region_response.rb +0 -209
  181. data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
  182. data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -165
  183. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  184. data/lib/daytona_api_client/models/job.rb +0 -366
  185. data/lib/daytona_api_client/models/job_status.rb +0 -43
  186. data/lib/daytona_api_client/models/job_type.rb +0 -53
  187. data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
  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_logs.rb +0 -248
  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 -378
  200. data/lib/daytona_api_client/models/region_type.rb +0 -42
  201. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -456
  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 -764
  205. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
  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/sandbox_list_sort_direction.rb +0 -41
  209. data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
  210. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
  211. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
  212. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
  213. data/lib/daytona_api_client/models/trace_span.rb +0 -332
  214. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  215. data/lib/daytona_api_client/models/update_job_status.rb +0 -207
  216. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  217. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -256
  218. data/lib/daytona_api_client/models/update_region.rb +0 -171
  219. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
  220. data/lib/daytona_api_client/models/url.rb +0 -165
  221. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
@@ -1,456 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class RegionUsageOverview < ApiModelBase
18
- attr_accessor :region_id
19
-
20
- attr_accessor :total_cpu_quota
21
-
22
- attr_accessor :current_cpu_usage
23
-
24
- attr_accessor :total_memory_quota
25
-
26
- attr_accessor :current_memory_usage
27
-
28
- attr_accessor :total_disk_quota
29
-
30
- attr_accessor :current_disk_usage
31
-
32
- attr_accessor :total_gpu_quota
33
-
34
- attr_accessor :current_gpu_usage
35
-
36
- attr_accessor :max_cpu_per_sandbox
37
-
38
- attr_accessor :max_memory_per_sandbox
39
-
40
- attr_accessor :max_disk_per_sandbox
41
-
42
- attr_accessor :max_disk_per_non_ephemeral_sandbox
43
-
44
- attr_accessor :max_cpu_per_gpu_sandbox
45
-
46
- attr_accessor :max_memory_per_gpu_sandbox
47
-
48
- attr_accessor :max_disk_per_gpu_sandbox
49
-
50
- # Attribute mapping from ruby-style variable name to JSON key.
51
- def self.attribute_map
52
- {
53
- :'region_id' => :'regionId',
54
- :'total_cpu_quota' => :'totalCpuQuota',
55
- :'current_cpu_usage' => :'currentCpuUsage',
56
- :'total_memory_quota' => :'totalMemoryQuota',
57
- :'current_memory_usage' => :'currentMemoryUsage',
58
- :'total_disk_quota' => :'totalDiskQuota',
59
- :'current_disk_usage' => :'currentDiskUsage',
60
- :'total_gpu_quota' => :'totalGpuQuota',
61
- :'current_gpu_usage' => :'currentGpuUsage',
62
- :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
63
- :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
64
- :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
65
- :'max_disk_per_non_ephemeral_sandbox' => :'maxDiskPerNonEphemeralSandbox',
66
- :'max_cpu_per_gpu_sandbox' => :'maxCpuPerGpuSandbox',
67
- :'max_memory_per_gpu_sandbox' => :'maxMemoryPerGpuSandbox',
68
- :'max_disk_per_gpu_sandbox' => :'maxDiskPerGpuSandbox'
69
- }
70
- end
71
-
72
- # Returns attribute mapping this model knows about
73
- def self.acceptable_attribute_map
74
- attribute_map
75
- end
76
-
77
- # Returns all the JSON keys this model knows about
78
- def self.acceptable_attributes
79
- acceptable_attribute_map.values
80
- end
81
-
82
- # Attribute type mapping.
83
- def self.openapi_types
84
- {
85
- :'region_id' => :'String',
86
- :'total_cpu_quota' => :'Float',
87
- :'current_cpu_usage' => :'Float',
88
- :'total_memory_quota' => :'Float',
89
- :'current_memory_usage' => :'Float',
90
- :'total_disk_quota' => :'Float',
91
- :'current_disk_usage' => :'Float',
92
- :'total_gpu_quota' => :'Float',
93
- :'current_gpu_usage' => :'Float',
94
- :'max_cpu_per_sandbox' => :'Float',
95
- :'max_memory_per_sandbox' => :'Float',
96
- :'max_disk_per_sandbox' => :'Float',
97
- :'max_disk_per_non_ephemeral_sandbox' => :'Float',
98
- :'max_cpu_per_gpu_sandbox' => :'Float',
99
- :'max_memory_per_gpu_sandbox' => :'Float',
100
- :'max_disk_per_gpu_sandbox' => :'Float'
101
- }
102
- end
103
-
104
- # List of attributes with nullable: true
105
- def self.openapi_nullable
106
- Set.new([
107
- :'max_cpu_per_sandbox',
108
- :'max_memory_per_sandbox',
109
- :'max_disk_per_sandbox',
110
- :'max_disk_per_non_ephemeral_sandbox',
111
- :'max_cpu_per_gpu_sandbox',
112
- :'max_memory_per_gpu_sandbox',
113
- :'max_disk_per_gpu_sandbox'
114
- ])
115
- end
116
-
117
- # Initializes the object
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- def initialize(attributes = {})
120
- if (!attributes.is_a?(Hash))
121
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RegionUsageOverview` initialize method"
122
- end
123
-
124
- # check to see if the attribute exists and convert string to symbol for hash key
125
- acceptable_attribute_map = self.class.acceptable_attribute_map
126
- attributes = attributes.each_with_object({}) { |(k, v), h|
127
- if (!acceptable_attribute_map.key?(k.to_sym))
128
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RegionUsageOverview`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
129
- end
130
- h[k.to_sym] = v
131
- }
132
-
133
- if attributes.key?(:'region_id')
134
- self.region_id = attributes[:'region_id']
135
- else
136
- self.region_id = nil
137
- end
138
-
139
- if attributes.key?(:'total_cpu_quota')
140
- self.total_cpu_quota = attributes[:'total_cpu_quota']
141
- else
142
- self.total_cpu_quota = nil
143
- end
144
-
145
- if attributes.key?(:'current_cpu_usage')
146
- self.current_cpu_usage = attributes[:'current_cpu_usage']
147
- else
148
- self.current_cpu_usage = nil
149
- end
150
-
151
- if attributes.key?(:'total_memory_quota')
152
- self.total_memory_quota = attributes[:'total_memory_quota']
153
- else
154
- self.total_memory_quota = nil
155
- end
156
-
157
- if attributes.key?(:'current_memory_usage')
158
- self.current_memory_usage = attributes[:'current_memory_usage']
159
- else
160
- self.current_memory_usage = nil
161
- end
162
-
163
- if attributes.key?(:'total_disk_quota')
164
- self.total_disk_quota = attributes[:'total_disk_quota']
165
- else
166
- self.total_disk_quota = nil
167
- end
168
-
169
- if attributes.key?(:'current_disk_usage')
170
- self.current_disk_usage = attributes[:'current_disk_usage']
171
- else
172
- self.current_disk_usage = nil
173
- end
174
-
175
- if attributes.key?(:'total_gpu_quota')
176
- self.total_gpu_quota = attributes[:'total_gpu_quota']
177
- else
178
- self.total_gpu_quota = nil
179
- end
180
-
181
- if attributes.key?(:'current_gpu_usage')
182
- self.current_gpu_usage = attributes[:'current_gpu_usage']
183
- else
184
- self.current_gpu_usage = nil
185
- end
186
-
187
- if attributes.key?(:'max_cpu_per_sandbox')
188
- self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
189
- else
190
- self.max_cpu_per_sandbox = nil
191
- end
192
-
193
- if attributes.key?(:'max_memory_per_sandbox')
194
- self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
195
- else
196
- self.max_memory_per_sandbox = nil
197
- end
198
-
199
- if attributes.key?(:'max_disk_per_sandbox')
200
- self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
201
- else
202
- self.max_disk_per_sandbox = nil
203
- end
204
-
205
- if attributes.key?(:'max_disk_per_non_ephemeral_sandbox')
206
- self.max_disk_per_non_ephemeral_sandbox = attributes[:'max_disk_per_non_ephemeral_sandbox']
207
- else
208
- self.max_disk_per_non_ephemeral_sandbox = nil
209
- end
210
-
211
- if attributes.key?(:'max_cpu_per_gpu_sandbox')
212
- self.max_cpu_per_gpu_sandbox = attributes[:'max_cpu_per_gpu_sandbox']
213
- else
214
- self.max_cpu_per_gpu_sandbox = nil
215
- end
216
-
217
- if attributes.key?(:'max_memory_per_gpu_sandbox')
218
- self.max_memory_per_gpu_sandbox = attributes[:'max_memory_per_gpu_sandbox']
219
- else
220
- self.max_memory_per_gpu_sandbox = nil
221
- end
222
-
223
- if attributes.key?(:'max_disk_per_gpu_sandbox')
224
- self.max_disk_per_gpu_sandbox = attributes[:'max_disk_per_gpu_sandbox']
225
- else
226
- self.max_disk_per_gpu_sandbox = nil
227
- end
228
- end
229
-
230
- # Show invalid properties with the reasons. Usually used together with valid?
231
- # @return Array for valid properties with the reasons
232
- def list_invalid_properties
233
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
234
- invalid_properties = Array.new
235
- if @region_id.nil?
236
- invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
237
- end
238
-
239
- if @total_cpu_quota.nil?
240
- invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
241
- end
242
-
243
- if @current_cpu_usage.nil?
244
- invalid_properties.push('invalid value for "current_cpu_usage", current_cpu_usage cannot be nil.')
245
- end
246
-
247
- if @total_memory_quota.nil?
248
- invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
249
- end
250
-
251
- if @current_memory_usage.nil?
252
- invalid_properties.push('invalid value for "current_memory_usage", current_memory_usage cannot be nil.')
253
- end
254
-
255
- if @total_disk_quota.nil?
256
- invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
257
- end
258
-
259
- if @current_disk_usage.nil?
260
- invalid_properties.push('invalid value for "current_disk_usage", current_disk_usage cannot be nil.')
261
- end
262
-
263
- if @total_gpu_quota.nil?
264
- invalid_properties.push('invalid value for "total_gpu_quota", total_gpu_quota cannot be nil.')
265
- end
266
-
267
- if @current_gpu_usage.nil?
268
- invalid_properties.push('invalid value for "current_gpu_usage", current_gpu_usage cannot be nil.')
269
- end
270
-
271
- invalid_properties
272
- end
273
-
274
- # Check to see if the all the properties in the model are valid
275
- # @return true if the model is valid
276
- def valid?
277
- warn '[DEPRECATED] the `valid?` method is obsolete'
278
- return false if @region_id.nil?
279
- return false if @total_cpu_quota.nil?
280
- return false if @current_cpu_usage.nil?
281
- return false if @total_memory_quota.nil?
282
- return false if @current_memory_usage.nil?
283
- return false if @total_disk_quota.nil?
284
- return false if @current_disk_usage.nil?
285
- return false if @total_gpu_quota.nil?
286
- return false if @current_gpu_usage.nil?
287
- true
288
- end
289
-
290
- # Custom attribute writer method with validation
291
- # @param [Object] region_id Value to be assigned
292
- def region_id=(region_id)
293
- if region_id.nil?
294
- fail ArgumentError, 'region_id cannot be nil'
295
- end
296
-
297
- @region_id = region_id
298
- end
299
-
300
- # Custom attribute writer method with validation
301
- # @param [Object] total_cpu_quota Value to be assigned
302
- def total_cpu_quota=(total_cpu_quota)
303
- if total_cpu_quota.nil?
304
- fail ArgumentError, 'total_cpu_quota cannot be nil'
305
- end
306
-
307
- @total_cpu_quota = total_cpu_quota
308
- end
309
-
310
- # Custom attribute writer method with validation
311
- # @param [Object] current_cpu_usage Value to be assigned
312
- def current_cpu_usage=(current_cpu_usage)
313
- if current_cpu_usage.nil?
314
- fail ArgumentError, 'current_cpu_usage cannot be nil'
315
- end
316
-
317
- @current_cpu_usage = current_cpu_usage
318
- end
319
-
320
- # Custom attribute writer method with validation
321
- # @param [Object] total_memory_quota Value to be assigned
322
- def total_memory_quota=(total_memory_quota)
323
- if total_memory_quota.nil?
324
- fail ArgumentError, 'total_memory_quota cannot be nil'
325
- end
326
-
327
- @total_memory_quota = total_memory_quota
328
- end
329
-
330
- # Custom attribute writer method with validation
331
- # @param [Object] current_memory_usage Value to be assigned
332
- def current_memory_usage=(current_memory_usage)
333
- if current_memory_usage.nil?
334
- fail ArgumentError, 'current_memory_usage cannot be nil'
335
- end
336
-
337
- @current_memory_usage = current_memory_usage
338
- end
339
-
340
- # Custom attribute writer method with validation
341
- # @param [Object] total_disk_quota Value to be assigned
342
- def total_disk_quota=(total_disk_quota)
343
- if total_disk_quota.nil?
344
- fail ArgumentError, 'total_disk_quota cannot be nil'
345
- end
346
-
347
- @total_disk_quota = total_disk_quota
348
- end
349
-
350
- # Custom attribute writer method with validation
351
- # @param [Object] current_disk_usage Value to be assigned
352
- def current_disk_usage=(current_disk_usage)
353
- if current_disk_usage.nil?
354
- fail ArgumentError, 'current_disk_usage cannot be nil'
355
- end
356
-
357
- @current_disk_usage = current_disk_usage
358
- end
359
-
360
- # Custom attribute writer method with validation
361
- # @param [Object] total_gpu_quota Value to be assigned
362
- def total_gpu_quota=(total_gpu_quota)
363
- if total_gpu_quota.nil?
364
- fail ArgumentError, 'total_gpu_quota cannot be nil'
365
- end
366
-
367
- @total_gpu_quota = total_gpu_quota
368
- end
369
-
370
- # Custom attribute writer method with validation
371
- # @param [Object] current_gpu_usage Value to be assigned
372
- def current_gpu_usage=(current_gpu_usage)
373
- if current_gpu_usage.nil?
374
- fail ArgumentError, 'current_gpu_usage cannot be nil'
375
- end
376
-
377
- @current_gpu_usage = current_gpu_usage
378
- end
379
-
380
- # Checks equality by comparing each attribute.
381
- # @param [Object] Object to be compared
382
- def ==(o)
383
- return true if self.equal?(o)
384
- self.class == o.class &&
385
- region_id == o.region_id &&
386
- total_cpu_quota == o.total_cpu_quota &&
387
- current_cpu_usage == o.current_cpu_usage &&
388
- total_memory_quota == o.total_memory_quota &&
389
- current_memory_usage == o.current_memory_usage &&
390
- total_disk_quota == o.total_disk_quota &&
391
- current_disk_usage == o.current_disk_usage &&
392
- total_gpu_quota == o.total_gpu_quota &&
393
- current_gpu_usage == o.current_gpu_usage &&
394
- max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
395
- max_memory_per_sandbox == o.max_memory_per_sandbox &&
396
- max_disk_per_sandbox == o.max_disk_per_sandbox &&
397
- max_disk_per_non_ephemeral_sandbox == o.max_disk_per_non_ephemeral_sandbox &&
398
- max_cpu_per_gpu_sandbox == o.max_cpu_per_gpu_sandbox &&
399
- max_memory_per_gpu_sandbox == o.max_memory_per_gpu_sandbox &&
400
- max_disk_per_gpu_sandbox == o.max_disk_per_gpu_sandbox
401
- end
402
-
403
- # @see the `==` method
404
- # @param [Object] Object to be compared
405
- def eql?(o)
406
- self == o
407
- end
408
-
409
- # Calculates hash code according to all attributes.
410
- # @return [Integer] Hash code
411
- def hash
412
- [region_id, total_cpu_quota, current_cpu_usage, total_memory_quota, current_memory_usage, total_disk_quota, current_disk_usage, total_gpu_quota, current_gpu_usage, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
413
- end
414
-
415
- # Builds the object from hash
416
- # @param [Hash] attributes Model attributes in the form of hash
417
- # @return [Object] Returns the model itself
418
- def self.build_from_hash(attributes)
419
- return nil unless attributes.is_a?(Hash)
420
- attributes = attributes.transform_keys(&:to_sym)
421
- transformed_hash = {}
422
- openapi_types.each_pair do |key, type|
423
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
424
- transformed_hash["#{key}"] = nil
425
- elsif type =~ /\AArray<(.*)>/i
426
- # check to ensure the input is an array given that the attribute
427
- # is documented as an array but the input is not
428
- if attributes[attribute_map[key]].is_a?(Array)
429
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
430
- end
431
- elsif !attributes[attribute_map[key]].nil?
432
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
433
- end
434
- end
435
- new(transformed_hash)
436
- end
437
-
438
- # Returns the object in the form of hash
439
- # @return [Hash] Returns the object in the form of hash
440
- def to_hash
441
- hash = {}
442
- self.class.attribute_map.each_pair do |attr, param|
443
- value = self.send(attr)
444
- if value.nil?
445
- is_nullable = self.class.openapi_nullable.include?(attr)
446
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
447
- end
448
-
449
- hash[param] = _to_hash(value)
450
- end
451
- hash
452
- end
453
-
454
- end
455
-
456
- end
@@ -1,225 +0,0 @@
1
- =begin
2
- #Daytona
3
-
4
- #Daytona AI platform API Docs
5
-
6
- The version of the OpenAPI document: 1.0
7
- Contact: support@daytona.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class ResizeSandbox < ApiModelBase
18
- # CPU cores to allocate to the sandbox (minimum: 1)
19
- attr_accessor :cpu
20
-
21
- # Memory in GB to allocate to the sandbox (minimum: 1)
22
- attr_accessor :memory
23
-
24
- # Disk space in GB to allocate to the sandbox (can only be increased)
25
- attr_accessor :disk
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'cpu' => :'cpu',
31
- :'memory' => :'memory',
32
- :'disk' => :'disk'
33
- }
34
- end
35
-
36
- # Returns attribute mapping this model knows about
37
- def self.acceptable_attribute_map
38
- attribute_map
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- acceptable_attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'cpu' => :'Integer',
50
- :'memory' => :'Integer',
51
- :'disk' => :'Integer'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::ResizeSandbox` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::ResizeSandbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'cpu')
78
- self.cpu = attributes[:'cpu']
79
- end
80
-
81
- if attributes.key?(:'memory')
82
- self.memory = attributes[:'memory']
83
- end
84
-
85
- if attributes.key?(:'disk')
86
- self.disk = attributes[:'disk']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- invalid_properties = Array.new
95
- if !@cpu.nil? && @cpu < 1
96
- invalid_properties.push('invalid value for "cpu", must be greater than or equal to 1.')
97
- end
98
-
99
- if !@memory.nil? && @memory < 1
100
- invalid_properties.push('invalid value for "memory", must be greater than or equal to 1.')
101
- end
102
-
103
- if !@disk.nil? && @disk < 1
104
- invalid_properties.push('invalid value for "disk", must be greater than or equal to 1.')
105
- end
106
-
107
- invalid_properties
108
- end
109
-
110
- # Check to see if the all the properties in the model are valid
111
- # @return true if the model is valid
112
- def valid?
113
- warn '[DEPRECATED] the `valid?` method is obsolete'
114
- return false if !@cpu.nil? && @cpu < 1
115
- return false if !@memory.nil? && @memory < 1
116
- return false if !@disk.nil? && @disk < 1
117
- true
118
- end
119
-
120
- # Custom attribute writer method with validation
121
- # @param [Object] cpu Value to be assigned
122
- def cpu=(cpu)
123
- if cpu.nil?
124
- fail ArgumentError, 'cpu cannot be nil'
125
- end
126
-
127
- if cpu < 1
128
- fail ArgumentError, 'invalid value for "cpu", must be greater than or equal to 1.'
129
- end
130
-
131
- @cpu = cpu
132
- end
133
-
134
- # Custom attribute writer method with validation
135
- # @param [Object] memory Value to be assigned
136
- def memory=(memory)
137
- if memory.nil?
138
- fail ArgumentError, 'memory cannot be nil'
139
- end
140
-
141
- if memory < 1
142
- fail ArgumentError, 'invalid value for "memory", must be greater than or equal to 1.'
143
- end
144
-
145
- @memory = memory
146
- end
147
-
148
- # Custom attribute writer method with validation
149
- # @param [Object] disk Value to be assigned
150
- def disk=(disk)
151
- if disk.nil?
152
- fail ArgumentError, 'disk cannot be nil'
153
- end
154
-
155
- if disk < 1
156
- fail ArgumentError, 'invalid value for "disk", must be greater than or equal to 1.'
157
- end
158
-
159
- @disk = disk
160
- end
161
-
162
- # Checks equality by comparing each attribute.
163
- # @param [Object] Object to be compared
164
- def ==(o)
165
- return true if self.equal?(o)
166
- self.class == o.class &&
167
- cpu == o.cpu &&
168
- memory == o.memory &&
169
- disk == o.disk
170
- end
171
-
172
- # @see the `==` method
173
- # @param [Object] Object to be compared
174
- def eql?(o)
175
- self == o
176
- end
177
-
178
- # Calculates hash code according to all attributes.
179
- # @return [Integer] Hash code
180
- def hash
181
- [cpu, memory, disk].hash
182
- end
183
-
184
- # Builds the object from hash
185
- # @param [Hash] attributes Model attributes in the form of hash
186
- # @return [Object] Returns the model itself
187
- def self.build_from_hash(attributes)
188
- return nil unless attributes.is_a?(Hash)
189
- attributes = attributes.transform_keys(&:to_sym)
190
- transformed_hash = {}
191
- openapi_types.each_pair do |key, type|
192
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
193
- transformed_hash["#{key}"] = nil
194
- elsif type =~ /\AArray<(.*)>/i
195
- # check to ensure the input is an array given that the attribute
196
- # is documented as an array but the input is not
197
- if attributes[attribute_map[key]].is_a?(Array)
198
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
199
- end
200
- elsif !attributes[attribute_map[key]].nil?
201
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
202
- end
203
- end
204
- new(transformed_hash)
205
- end
206
-
207
- # Returns the object in the form of hash
208
- # @return [Hash] Returns the object in the form of hash
209
- def to_hash
210
- hash = {}
211
- self.class.attribute_map.each_pair do |attr, param|
212
- value = self.send(attr)
213
- if value.nil?
214
- is_nullable = self.class.openapi_nullable.include?(attr)
215
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
- end
217
-
218
- hash[param] = _to_hash(value)
219
- end
220
- hash
221
- end
222
-
223
- end
224
-
225
- end