daytona_api_client 0.184.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 (223) 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 -1732
  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 +121 -38
  49. data/lib/daytona_api_client/models/create_session_request.rb +74 -3
  50. data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
  51. data/lib/daytona_api_client/models/create_user.rb +77 -15
  52. data/lib/daytona_api_client/models/create_volume.rb +74 -3
  53. data/lib/daytona_api_client/models/create_workspace.rb +411 -0
  54. data/lib/daytona_api_client/models/daytona_configuration.rb +78 -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 +215 -145
  126. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
  127. data/lib/daytona_api_client/models/runner_state.rb +3 -4
  128. data/lib/daytona_api_client/models/sandbox.rb +104 -127
  129. data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
  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 -71
  143. data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
  144. data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
  145. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
  146. data/lib/daytona_api_client/models/storage_access_dto.rb +74 -3
  147. data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
  148. data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
  149. data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
  150. data/lib/daytona_api_client/models/update_organization_quota.rb +115 -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 -180
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +8 -55
  166. data/project.json +11 -42
  167. metadata +11 -62
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -212
  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 -1449
  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_organization_region_quota.rb +0 -372
  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/gpu_type.rb +0 -41
  186. data/lib/daytona_api_client/models/job.rb +0 -366
  187. data/lib/daytona_api_client/models/job_status.rb +0 -43
  188. data/lib/daytona_api_client/models/job_type.rb +0 -53
  189. data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
  190. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  191. data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
  192. data/lib/daytona_api_client/models/metric_series.rb +0 -194
  193. data/lib/daytona_api_client/models/metrics_response.rb +0 -167
  194. data/lib/daytona_api_client/models/otel_config.rb +0 -178
  195. data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
  196. data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
  197. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  198. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
  199. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  200. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
  201. data/lib/daytona_api_client/models/region_quota.rb +0 -437
  202. data/lib/daytona_api_client/models/region_type.rb +0 -42
  203. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -515
  204. data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
  205. data/lib/daytona_api_client/models/runner_class.rb +0 -41
  206. data/lib/daytona_api_client/models/runner_full.rb +0 -747
  207. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
  208. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
  209. data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
  210. data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
  211. data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
  212. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
  213. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
  214. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
  215. data/lib/daytona_api_client/models/trace_span.rb +0 -332
  216. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  217. data/lib/daytona_api_client/models/update_job_status.rb +0 -207
  218. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  219. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -299
  220. data/lib/daytona_api_client/models/update_region.rb +0 -171
  221. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
  222. data/lib/daytona_api_client/models/url.rb +0 -165
  223. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
@@ -1,515 +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 :sandbox_class
21
-
22
- attr_accessor :total_cpu_quota
23
-
24
- attr_accessor :current_cpu_usage
25
-
26
- attr_accessor :total_memory_quota
27
-
28
- attr_accessor :current_memory_usage
29
-
30
- attr_accessor :total_disk_quota
31
-
32
- attr_accessor :current_disk_usage
33
-
34
- attr_accessor :total_gpu_quota
35
-
36
- attr_accessor :current_gpu_usage
37
-
38
- attr_accessor :allowed_gpu_types
39
-
40
- attr_accessor :max_cpu_per_sandbox
41
-
42
- attr_accessor :max_memory_per_sandbox
43
-
44
- attr_accessor :max_disk_per_sandbox
45
-
46
- attr_accessor :max_disk_per_non_ephemeral_sandbox
47
-
48
- attr_accessor :max_cpu_per_gpu_sandbox
49
-
50
- attr_accessor :max_memory_per_gpu_sandbox
51
-
52
- attr_accessor :max_disk_per_gpu_sandbox
53
-
54
- class EnumAttributeValidator
55
- attr_reader :datatype
56
- attr_reader :allowable_values
57
-
58
- def initialize(datatype, allowable_values)
59
- @allowable_values = allowable_values.map do |value|
60
- case datatype.to_s
61
- when /Integer/i
62
- value.to_i
63
- when /Float/i
64
- value.to_f
65
- else
66
- value
67
- end
68
- end
69
- end
70
-
71
- def valid?(value)
72
- !value || allowable_values.include?(value)
73
- end
74
- end
75
-
76
- # Attribute mapping from ruby-style variable name to JSON key.
77
- def self.attribute_map
78
- {
79
- :'region_id' => :'regionId',
80
- :'sandbox_class' => :'sandboxClass',
81
- :'total_cpu_quota' => :'totalCpuQuota',
82
- :'current_cpu_usage' => :'currentCpuUsage',
83
- :'total_memory_quota' => :'totalMemoryQuota',
84
- :'current_memory_usage' => :'currentMemoryUsage',
85
- :'total_disk_quota' => :'totalDiskQuota',
86
- :'current_disk_usage' => :'currentDiskUsage',
87
- :'total_gpu_quota' => :'totalGpuQuota',
88
- :'current_gpu_usage' => :'currentGpuUsage',
89
- :'allowed_gpu_types' => :'allowedGpuTypes',
90
- :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
91
- :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
92
- :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
93
- :'max_disk_per_non_ephemeral_sandbox' => :'maxDiskPerNonEphemeralSandbox',
94
- :'max_cpu_per_gpu_sandbox' => :'maxCpuPerGpuSandbox',
95
- :'max_memory_per_gpu_sandbox' => :'maxMemoryPerGpuSandbox',
96
- :'max_disk_per_gpu_sandbox' => :'maxDiskPerGpuSandbox'
97
- }
98
- end
99
-
100
- # Returns attribute mapping this model knows about
101
- def self.acceptable_attribute_map
102
- attribute_map
103
- end
104
-
105
- # Returns all the JSON keys this model knows about
106
- def self.acceptable_attributes
107
- acceptable_attribute_map.values
108
- end
109
-
110
- # Attribute type mapping.
111
- def self.openapi_types
112
- {
113
- :'region_id' => :'String',
114
- :'sandbox_class' => :'SandboxClass',
115
- :'total_cpu_quota' => :'Float',
116
- :'current_cpu_usage' => :'Float',
117
- :'total_memory_quota' => :'Float',
118
- :'current_memory_usage' => :'Float',
119
- :'total_disk_quota' => :'Float',
120
- :'current_disk_usage' => :'Float',
121
- :'total_gpu_quota' => :'Float',
122
- :'current_gpu_usage' => :'Float',
123
- :'allowed_gpu_types' => :'Array<GpuType>',
124
- :'max_cpu_per_sandbox' => :'Float',
125
- :'max_memory_per_sandbox' => :'Float',
126
- :'max_disk_per_sandbox' => :'Float',
127
- :'max_disk_per_non_ephemeral_sandbox' => :'Float',
128
- :'max_cpu_per_gpu_sandbox' => :'Float',
129
- :'max_memory_per_gpu_sandbox' => :'Float',
130
- :'max_disk_per_gpu_sandbox' => :'Float'
131
- }
132
- end
133
-
134
- # List of attributes with nullable: true
135
- def self.openapi_nullable
136
- Set.new([
137
- :'max_cpu_per_sandbox',
138
- :'max_memory_per_sandbox',
139
- :'max_disk_per_sandbox',
140
- :'max_disk_per_non_ephemeral_sandbox',
141
- :'max_cpu_per_gpu_sandbox',
142
- :'max_memory_per_gpu_sandbox',
143
- :'max_disk_per_gpu_sandbox'
144
- ])
145
- end
146
-
147
- # Initializes the object
148
- # @param [Hash] attributes Model attributes in the form of hash
149
- def initialize(attributes = {})
150
- if (!attributes.is_a?(Hash))
151
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RegionUsageOverview` initialize method"
152
- end
153
-
154
- # check to see if the attribute exists and convert string to symbol for hash key
155
- acceptable_attribute_map = self.class.acceptable_attribute_map
156
- attributes = attributes.each_with_object({}) { |(k, v), h|
157
- if (!acceptable_attribute_map.key?(k.to_sym))
158
- 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
159
- end
160
- h[k.to_sym] = v
161
- }
162
-
163
- if attributes.key?(:'region_id')
164
- self.region_id = attributes[:'region_id']
165
- else
166
- self.region_id = nil
167
- end
168
-
169
- if attributes.key?(:'sandbox_class')
170
- self.sandbox_class = attributes[:'sandbox_class']
171
- else
172
- self.sandbox_class = nil
173
- end
174
-
175
- if attributes.key?(:'total_cpu_quota')
176
- self.total_cpu_quota = attributes[:'total_cpu_quota']
177
- else
178
- self.total_cpu_quota = nil
179
- end
180
-
181
- if attributes.key?(:'current_cpu_usage')
182
- self.current_cpu_usage = attributes[:'current_cpu_usage']
183
- else
184
- self.current_cpu_usage = nil
185
- end
186
-
187
- if attributes.key?(:'total_memory_quota')
188
- self.total_memory_quota = attributes[:'total_memory_quota']
189
- else
190
- self.total_memory_quota = nil
191
- end
192
-
193
- if attributes.key?(:'current_memory_usage')
194
- self.current_memory_usage = attributes[:'current_memory_usage']
195
- else
196
- self.current_memory_usage = nil
197
- end
198
-
199
- if attributes.key?(:'total_disk_quota')
200
- self.total_disk_quota = attributes[:'total_disk_quota']
201
- else
202
- self.total_disk_quota = nil
203
- end
204
-
205
- if attributes.key?(:'current_disk_usage')
206
- self.current_disk_usage = attributes[:'current_disk_usage']
207
- else
208
- self.current_disk_usage = nil
209
- end
210
-
211
- if attributes.key?(:'total_gpu_quota')
212
- self.total_gpu_quota = attributes[:'total_gpu_quota']
213
- else
214
- self.total_gpu_quota = nil
215
- end
216
-
217
- if attributes.key?(:'current_gpu_usage')
218
- self.current_gpu_usage = attributes[:'current_gpu_usage']
219
- else
220
- self.current_gpu_usage = nil
221
- end
222
-
223
- if attributes.key?(:'allowed_gpu_types')
224
- if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
225
- self.allowed_gpu_types = value
226
- end
227
- end
228
-
229
- if attributes.key?(:'max_cpu_per_sandbox')
230
- self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
231
- else
232
- self.max_cpu_per_sandbox = nil
233
- end
234
-
235
- if attributes.key?(:'max_memory_per_sandbox')
236
- self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
237
- else
238
- self.max_memory_per_sandbox = nil
239
- end
240
-
241
- if attributes.key?(:'max_disk_per_sandbox')
242
- self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
243
- else
244
- self.max_disk_per_sandbox = nil
245
- end
246
-
247
- if attributes.key?(:'max_disk_per_non_ephemeral_sandbox')
248
- self.max_disk_per_non_ephemeral_sandbox = attributes[:'max_disk_per_non_ephemeral_sandbox']
249
- else
250
- self.max_disk_per_non_ephemeral_sandbox = nil
251
- end
252
-
253
- if attributes.key?(:'max_cpu_per_gpu_sandbox')
254
- self.max_cpu_per_gpu_sandbox = attributes[:'max_cpu_per_gpu_sandbox']
255
- else
256
- self.max_cpu_per_gpu_sandbox = nil
257
- end
258
-
259
- if attributes.key?(:'max_memory_per_gpu_sandbox')
260
- self.max_memory_per_gpu_sandbox = attributes[:'max_memory_per_gpu_sandbox']
261
- else
262
- self.max_memory_per_gpu_sandbox = nil
263
- end
264
-
265
- if attributes.key?(:'max_disk_per_gpu_sandbox')
266
- self.max_disk_per_gpu_sandbox = attributes[:'max_disk_per_gpu_sandbox']
267
- else
268
- self.max_disk_per_gpu_sandbox = nil
269
- end
270
- end
271
-
272
- # Show invalid properties with the reasons. Usually used together with valid?
273
- # @return Array for valid properties with the reasons
274
- def list_invalid_properties
275
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
276
- invalid_properties = Array.new
277
- if @region_id.nil?
278
- invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
279
- end
280
-
281
- if @sandbox_class.nil?
282
- invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
283
- end
284
-
285
- if @total_cpu_quota.nil?
286
- invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
287
- end
288
-
289
- if @current_cpu_usage.nil?
290
- invalid_properties.push('invalid value for "current_cpu_usage", current_cpu_usage cannot be nil.')
291
- end
292
-
293
- if @total_memory_quota.nil?
294
- invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
295
- end
296
-
297
- if @current_memory_usage.nil?
298
- invalid_properties.push('invalid value for "current_memory_usage", current_memory_usage cannot be nil.')
299
- end
300
-
301
- if @total_disk_quota.nil?
302
- invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
303
- end
304
-
305
- if @current_disk_usage.nil?
306
- invalid_properties.push('invalid value for "current_disk_usage", current_disk_usage cannot be nil.')
307
- end
308
-
309
- if @total_gpu_quota.nil?
310
- invalid_properties.push('invalid value for "total_gpu_quota", total_gpu_quota cannot be nil.')
311
- end
312
-
313
- if @current_gpu_usage.nil?
314
- invalid_properties.push('invalid value for "current_gpu_usage", current_gpu_usage cannot be nil.')
315
- end
316
-
317
- invalid_properties
318
- end
319
-
320
- # Check to see if the all the properties in the model are valid
321
- # @return true if the model is valid
322
- def valid?
323
- warn '[DEPRECATED] the `valid?` method is obsolete'
324
- return false if @region_id.nil?
325
- return false if @sandbox_class.nil?
326
- return false if @total_cpu_quota.nil?
327
- return false if @current_cpu_usage.nil?
328
- return false if @total_memory_quota.nil?
329
- return false if @current_memory_usage.nil?
330
- return false if @total_disk_quota.nil?
331
- return false if @current_disk_usage.nil?
332
- return false if @total_gpu_quota.nil?
333
- return false if @current_gpu_usage.nil?
334
- true
335
- end
336
-
337
- # Custom attribute writer method with validation
338
- # @param [Object] region_id Value to be assigned
339
- def region_id=(region_id)
340
- if region_id.nil?
341
- fail ArgumentError, 'region_id cannot be nil'
342
- end
343
-
344
- @region_id = region_id
345
- end
346
-
347
- # Custom attribute writer method with validation
348
- # @param [Object] sandbox_class Value to be assigned
349
- def sandbox_class=(sandbox_class)
350
- if sandbox_class.nil?
351
- fail ArgumentError, 'sandbox_class cannot be nil'
352
- end
353
-
354
- @sandbox_class = sandbox_class
355
- end
356
-
357
- # Custom attribute writer method with validation
358
- # @param [Object] total_cpu_quota Value to be assigned
359
- def total_cpu_quota=(total_cpu_quota)
360
- if total_cpu_quota.nil?
361
- fail ArgumentError, 'total_cpu_quota cannot be nil'
362
- end
363
-
364
- @total_cpu_quota = total_cpu_quota
365
- end
366
-
367
- # Custom attribute writer method with validation
368
- # @param [Object] current_cpu_usage Value to be assigned
369
- def current_cpu_usage=(current_cpu_usage)
370
- if current_cpu_usage.nil?
371
- fail ArgumentError, 'current_cpu_usage cannot be nil'
372
- end
373
-
374
- @current_cpu_usage = current_cpu_usage
375
- end
376
-
377
- # Custom attribute writer method with validation
378
- # @param [Object] total_memory_quota Value to be assigned
379
- def total_memory_quota=(total_memory_quota)
380
- if total_memory_quota.nil?
381
- fail ArgumentError, 'total_memory_quota cannot be nil'
382
- end
383
-
384
- @total_memory_quota = total_memory_quota
385
- end
386
-
387
- # Custom attribute writer method with validation
388
- # @param [Object] current_memory_usage Value to be assigned
389
- def current_memory_usage=(current_memory_usage)
390
- if current_memory_usage.nil?
391
- fail ArgumentError, 'current_memory_usage cannot be nil'
392
- end
393
-
394
- @current_memory_usage = current_memory_usage
395
- end
396
-
397
- # Custom attribute writer method with validation
398
- # @param [Object] total_disk_quota Value to be assigned
399
- def total_disk_quota=(total_disk_quota)
400
- if total_disk_quota.nil?
401
- fail ArgumentError, 'total_disk_quota cannot be nil'
402
- end
403
-
404
- @total_disk_quota = total_disk_quota
405
- end
406
-
407
- # Custom attribute writer method with validation
408
- # @param [Object] current_disk_usage Value to be assigned
409
- def current_disk_usage=(current_disk_usage)
410
- if current_disk_usage.nil?
411
- fail ArgumentError, 'current_disk_usage cannot be nil'
412
- end
413
-
414
- @current_disk_usage = current_disk_usage
415
- end
416
-
417
- # Custom attribute writer method with validation
418
- # @param [Object] total_gpu_quota Value to be assigned
419
- def total_gpu_quota=(total_gpu_quota)
420
- if total_gpu_quota.nil?
421
- fail ArgumentError, 'total_gpu_quota cannot be nil'
422
- end
423
-
424
- @total_gpu_quota = total_gpu_quota
425
- end
426
-
427
- # Custom attribute writer method with validation
428
- # @param [Object] current_gpu_usage Value to be assigned
429
- def current_gpu_usage=(current_gpu_usage)
430
- if current_gpu_usage.nil?
431
- fail ArgumentError, 'current_gpu_usage cannot be nil'
432
- end
433
-
434
- @current_gpu_usage = current_gpu_usage
435
- end
436
-
437
- # Checks equality by comparing each attribute.
438
- # @param [Object] Object to be compared
439
- def ==(o)
440
- return true if self.equal?(o)
441
- self.class == o.class &&
442
- region_id == o.region_id &&
443
- sandbox_class == o.sandbox_class &&
444
- total_cpu_quota == o.total_cpu_quota &&
445
- current_cpu_usage == o.current_cpu_usage &&
446
- total_memory_quota == o.total_memory_quota &&
447
- current_memory_usage == o.current_memory_usage &&
448
- total_disk_quota == o.total_disk_quota &&
449
- current_disk_usage == o.current_disk_usage &&
450
- total_gpu_quota == o.total_gpu_quota &&
451
- current_gpu_usage == o.current_gpu_usage &&
452
- allowed_gpu_types == o.allowed_gpu_types &&
453
- max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
454
- max_memory_per_sandbox == o.max_memory_per_sandbox &&
455
- max_disk_per_sandbox == o.max_disk_per_sandbox &&
456
- max_disk_per_non_ephemeral_sandbox == o.max_disk_per_non_ephemeral_sandbox &&
457
- max_cpu_per_gpu_sandbox == o.max_cpu_per_gpu_sandbox &&
458
- max_memory_per_gpu_sandbox == o.max_memory_per_gpu_sandbox &&
459
- max_disk_per_gpu_sandbox == o.max_disk_per_gpu_sandbox
460
- end
461
-
462
- # @see the `==` method
463
- # @param [Object] Object to be compared
464
- def eql?(o)
465
- self == o
466
- end
467
-
468
- # Calculates hash code according to all attributes.
469
- # @return [Integer] Hash code
470
- def hash
471
- [region_id, sandbox_class, total_cpu_quota, current_cpu_usage, total_memory_quota, current_memory_usage, total_disk_quota, current_disk_usage, total_gpu_quota, current_gpu_usage, allowed_gpu_types, 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
472
- end
473
-
474
- # Builds the object from hash
475
- # @param [Hash] attributes Model attributes in the form of hash
476
- # @return [Object] Returns the model itself
477
- def self.build_from_hash(attributes)
478
- return nil unless attributes.is_a?(Hash)
479
- attributes = attributes.transform_keys(&:to_sym)
480
- transformed_hash = {}
481
- openapi_types.each_pair do |key, type|
482
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
483
- transformed_hash["#{key}"] = nil
484
- elsif type =~ /\AArray<(.*)>/i
485
- # check to ensure the input is an array given that the attribute
486
- # is documented as an array but the input is not
487
- if attributes[attribute_map[key]].is_a?(Array)
488
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
489
- end
490
- elsif !attributes[attribute_map[key]].nil?
491
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
492
- end
493
- end
494
- new(transformed_hash)
495
- end
496
-
497
- # Returns the object in the form of hash
498
- # @return [Hash] Returns the object in the form of hash
499
- def to_hash
500
- hash = {}
501
- self.class.attribute_map.each_pair do |attr, param|
502
- value = self.send(attr)
503
- if value.nil?
504
- is_nullable = self.class.openapi_nullable.include?(attr)
505
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
506
- end
507
-
508
- hash[param] = _to_hash(value)
509
- end
510
- hash
511
- end
512
-
513
- end
514
-
515
- end