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,482 +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 RunnerHealthMetrics < ApiModelBase
18
- # Current CPU load average
19
- attr_accessor :current_cpu_load_average
20
-
21
- # Current CPU usage percentage
22
- attr_accessor :current_cpu_usage_percentage
23
-
24
- # Current memory usage percentage
25
- attr_accessor :current_memory_usage_percentage
26
-
27
- # Current disk usage percentage
28
- attr_accessor :current_disk_usage_percentage
29
-
30
- # Currently allocated CPU cores
31
- attr_accessor :current_allocated_cpu
32
-
33
- # Currently allocated memory in GiB
34
- attr_accessor :current_allocated_memory_gi_b
35
-
36
- # Currently allocated disk in GiB
37
- attr_accessor :current_allocated_disk_gi_b
38
-
39
- # Number of snapshots currently stored
40
- attr_accessor :current_snapshot_count
41
-
42
- # Number of started sandboxes
43
- attr_accessor :current_started_sandboxes
44
-
45
- # Total CPU cores on the runner
46
- attr_accessor :cpu
47
-
48
- # Total RAM in GiB on the runner
49
- attr_accessor :memory_gi_b
50
-
51
- # Total disk space in GiB on the runner
52
- attr_accessor :disk_gi_b
53
-
54
- # Total number of GPUs on the runner
55
- attr_accessor :gpu
56
-
57
- # GPU model name
58
- attr_accessor :gpu_type
59
-
60
- # Attribute mapping from ruby-style variable name to JSON key.
61
- def self.attribute_map
62
- {
63
- :'current_cpu_load_average' => :'currentCpuLoadAverage',
64
- :'current_cpu_usage_percentage' => :'currentCpuUsagePercentage',
65
- :'current_memory_usage_percentage' => :'currentMemoryUsagePercentage',
66
- :'current_disk_usage_percentage' => :'currentDiskUsagePercentage',
67
- :'current_allocated_cpu' => :'currentAllocatedCpu',
68
- :'current_allocated_memory_gi_b' => :'currentAllocatedMemoryGiB',
69
- :'current_allocated_disk_gi_b' => :'currentAllocatedDiskGiB',
70
- :'current_snapshot_count' => :'currentSnapshotCount',
71
- :'current_started_sandboxes' => :'currentStartedSandboxes',
72
- :'cpu' => :'cpu',
73
- :'memory_gi_b' => :'memoryGiB',
74
- :'disk_gi_b' => :'diskGiB',
75
- :'gpu' => :'gpu',
76
- :'gpu_type' => :'gpuType'
77
- }
78
- end
79
-
80
- # Returns attribute mapping this model knows about
81
- def self.acceptable_attribute_map
82
- attribute_map
83
- end
84
-
85
- # Returns all the JSON keys this model knows about
86
- def self.acceptable_attributes
87
- acceptable_attribute_map.values
88
- end
89
-
90
- # Attribute type mapping.
91
- def self.openapi_types
92
- {
93
- :'current_cpu_load_average' => :'Float',
94
- :'current_cpu_usage_percentage' => :'Float',
95
- :'current_memory_usage_percentage' => :'Float',
96
- :'current_disk_usage_percentage' => :'Float',
97
- :'current_allocated_cpu' => :'Float',
98
- :'current_allocated_memory_gi_b' => :'Float',
99
- :'current_allocated_disk_gi_b' => :'Float',
100
- :'current_snapshot_count' => :'Float',
101
- :'current_started_sandboxes' => :'Float',
102
- :'cpu' => :'Float',
103
- :'memory_gi_b' => :'Float',
104
- :'disk_gi_b' => :'Float',
105
- :'gpu' => :'Float',
106
- :'gpu_type' => :'String'
107
- }
108
- end
109
-
110
- # List of attributes with nullable: true
111
- def self.openapi_nullable
112
- Set.new([
113
- ])
114
- end
115
-
116
- # Initializes the object
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- def initialize(attributes = {})
119
- if (!attributes.is_a?(Hash))
120
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RunnerHealthMetrics` initialize method"
121
- end
122
-
123
- # check to see if the attribute exists and convert string to symbol for hash key
124
- acceptable_attribute_map = self.class.acceptable_attribute_map
125
- attributes = attributes.each_with_object({}) { |(k, v), h|
126
- if (!acceptable_attribute_map.key?(k.to_sym))
127
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RunnerHealthMetrics`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
128
- end
129
- h[k.to_sym] = v
130
- }
131
-
132
- if attributes.key?(:'current_cpu_load_average')
133
- self.current_cpu_load_average = attributes[:'current_cpu_load_average']
134
- else
135
- self.current_cpu_load_average = nil
136
- end
137
-
138
- if attributes.key?(:'current_cpu_usage_percentage')
139
- self.current_cpu_usage_percentage = attributes[:'current_cpu_usage_percentage']
140
- else
141
- self.current_cpu_usage_percentage = nil
142
- end
143
-
144
- if attributes.key?(:'current_memory_usage_percentage')
145
- self.current_memory_usage_percentage = attributes[:'current_memory_usage_percentage']
146
- else
147
- self.current_memory_usage_percentage = nil
148
- end
149
-
150
- if attributes.key?(:'current_disk_usage_percentage')
151
- self.current_disk_usage_percentage = attributes[:'current_disk_usage_percentage']
152
- else
153
- self.current_disk_usage_percentage = nil
154
- end
155
-
156
- if attributes.key?(:'current_allocated_cpu')
157
- self.current_allocated_cpu = attributes[:'current_allocated_cpu']
158
- else
159
- self.current_allocated_cpu = nil
160
- end
161
-
162
- if attributes.key?(:'current_allocated_memory_gi_b')
163
- self.current_allocated_memory_gi_b = attributes[:'current_allocated_memory_gi_b']
164
- else
165
- self.current_allocated_memory_gi_b = nil
166
- end
167
-
168
- if attributes.key?(:'current_allocated_disk_gi_b')
169
- self.current_allocated_disk_gi_b = attributes[:'current_allocated_disk_gi_b']
170
- else
171
- self.current_allocated_disk_gi_b = nil
172
- end
173
-
174
- if attributes.key?(:'current_snapshot_count')
175
- self.current_snapshot_count = attributes[:'current_snapshot_count']
176
- else
177
- self.current_snapshot_count = nil
178
- end
179
-
180
- if attributes.key?(:'current_started_sandboxes')
181
- self.current_started_sandboxes = attributes[:'current_started_sandboxes']
182
- else
183
- self.current_started_sandboxes = nil
184
- end
185
-
186
- if attributes.key?(:'cpu')
187
- self.cpu = attributes[:'cpu']
188
- else
189
- self.cpu = nil
190
- end
191
-
192
- if attributes.key?(:'memory_gi_b')
193
- self.memory_gi_b = attributes[:'memory_gi_b']
194
- else
195
- self.memory_gi_b = nil
196
- end
197
-
198
- if attributes.key?(:'disk_gi_b')
199
- self.disk_gi_b = attributes[:'disk_gi_b']
200
- else
201
- self.disk_gi_b = nil
202
- end
203
-
204
- if attributes.key?(:'gpu')
205
- self.gpu = attributes[:'gpu']
206
- end
207
-
208
- if attributes.key?(:'gpu_type')
209
- self.gpu_type = attributes[:'gpu_type']
210
- end
211
- end
212
-
213
- # Show invalid properties with the reasons. Usually used together with valid?
214
- # @return Array for valid properties with the reasons
215
- def list_invalid_properties
216
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
217
- invalid_properties = Array.new
218
- if @current_cpu_load_average.nil?
219
- invalid_properties.push('invalid value for "current_cpu_load_average", current_cpu_load_average cannot be nil.')
220
- end
221
-
222
- if @current_cpu_usage_percentage.nil?
223
- invalid_properties.push('invalid value for "current_cpu_usage_percentage", current_cpu_usage_percentage cannot be nil.')
224
- end
225
-
226
- if @current_memory_usage_percentage.nil?
227
- invalid_properties.push('invalid value for "current_memory_usage_percentage", current_memory_usage_percentage cannot be nil.')
228
- end
229
-
230
- if @current_disk_usage_percentage.nil?
231
- invalid_properties.push('invalid value for "current_disk_usage_percentage", current_disk_usage_percentage cannot be nil.')
232
- end
233
-
234
- if @current_allocated_cpu.nil?
235
- invalid_properties.push('invalid value for "current_allocated_cpu", current_allocated_cpu cannot be nil.')
236
- end
237
-
238
- if @current_allocated_memory_gi_b.nil?
239
- invalid_properties.push('invalid value for "current_allocated_memory_gi_b", current_allocated_memory_gi_b cannot be nil.')
240
- end
241
-
242
- if @current_allocated_disk_gi_b.nil?
243
- invalid_properties.push('invalid value for "current_allocated_disk_gi_b", current_allocated_disk_gi_b cannot be nil.')
244
- end
245
-
246
- if @current_snapshot_count.nil?
247
- invalid_properties.push('invalid value for "current_snapshot_count", current_snapshot_count cannot be nil.')
248
- end
249
-
250
- if @current_started_sandboxes.nil?
251
- invalid_properties.push('invalid value for "current_started_sandboxes", current_started_sandboxes cannot be nil.')
252
- end
253
-
254
- if @cpu.nil?
255
- invalid_properties.push('invalid value for "cpu", cpu cannot be nil.')
256
- end
257
-
258
- if @memory_gi_b.nil?
259
- invalid_properties.push('invalid value for "memory_gi_b", memory_gi_b cannot be nil.')
260
- end
261
-
262
- if @disk_gi_b.nil?
263
- invalid_properties.push('invalid value for "disk_gi_b", disk_gi_b cannot be nil.')
264
- end
265
-
266
- invalid_properties
267
- end
268
-
269
- # Check to see if the all the properties in the model are valid
270
- # @return true if the model is valid
271
- def valid?
272
- warn '[DEPRECATED] the `valid?` method is obsolete'
273
- return false if @current_cpu_load_average.nil?
274
- return false if @current_cpu_usage_percentage.nil?
275
- return false if @current_memory_usage_percentage.nil?
276
- return false if @current_disk_usage_percentage.nil?
277
- return false if @current_allocated_cpu.nil?
278
- return false if @current_allocated_memory_gi_b.nil?
279
- return false if @current_allocated_disk_gi_b.nil?
280
- return false if @current_snapshot_count.nil?
281
- return false if @current_started_sandboxes.nil?
282
- return false if @cpu.nil?
283
- return false if @memory_gi_b.nil?
284
- return false if @disk_gi_b.nil?
285
- true
286
- end
287
-
288
- # Custom attribute writer method with validation
289
- # @param [Object] current_cpu_load_average Value to be assigned
290
- def current_cpu_load_average=(current_cpu_load_average)
291
- if current_cpu_load_average.nil?
292
- fail ArgumentError, 'current_cpu_load_average cannot be nil'
293
- end
294
-
295
- @current_cpu_load_average = current_cpu_load_average
296
- end
297
-
298
- # Custom attribute writer method with validation
299
- # @param [Object] current_cpu_usage_percentage Value to be assigned
300
- def current_cpu_usage_percentage=(current_cpu_usage_percentage)
301
- if current_cpu_usage_percentage.nil?
302
- fail ArgumentError, 'current_cpu_usage_percentage cannot be nil'
303
- end
304
-
305
- @current_cpu_usage_percentage = current_cpu_usage_percentage
306
- end
307
-
308
- # Custom attribute writer method with validation
309
- # @param [Object] current_memory_usage_percentage Value to be assigned
310
- def current_memory_usage_percentage=(current_memory_usage_percentage)
311
- if current_memory_usage_percentage.nil?
312
- fail ArgumentError, 'current_memory_usage_percentage cannot be nil'
313
- end
314
-
315
- @current_memory_usage_percentage = current_memory_usage_percentage
316
- end
317
-
318
- # Custom attribute writer method with validation
319
- # @param [Object] current_disk_usage_percentage Value to be assigned
320
- def current_disk_usage_percentage=(current_disk_usage_percentage)
321
- if current_disk_usage_percentage.nil?
322
- fail ArgumentError, 'current_disk_usage_percentage cannot be nil'
323
- end
324
-
325
- @current_disk_usage_percentage = current_disk_usage_percentage
326
- end
327
-
328
- # Custom attribute writer method with validation
329
- # @param [Object] current_allocated_cpu Value to be assigned
330
- def current_allocated_cpu=(current_allocated_cpu)
331
- if current_allocated_cpu.nil?
332
- fail ArgumentError, 'current_allocated_cpu cannot be nil'
333
- end
334
-
335
- @current_allocated_cpu = current_allocated_cpu
336
- end
337
-
338
- # Custom attribute writer method with validation
339
- # @param [Object] current_allocated_memory_gi_b Value to be assigned
340
- def current_allocated_memory_gi_b=(current_allocated_memory_gi_b)
341
- if current_allocated_memory_gi_b.nil?
342
- fail ArgumentError, 'current_allocated_memory_gi_b cannot be nil'
343
- end
344
-
345
- @current_allocated_memory_gi_b = current_allocated_memory_gi_b
346
- end
347
-
348
- # Custom attribute writer method with validation
349
- # @param [Object] current_allocated_disk_gi_b Value to be assigned
350
- def current_allocated_disk_gi_b=(current_allocated_disk_gi_b)
351
- if current_allocated_disk_gi_b.nil?
352
- fail ArgumentError, 'current_allocated_disk_gi_b cannot be nil'
353
- end
354
-
355
- @current_allocated_disk_gi_b = current_allocated_disk_gi_b
356
- end
357
-
358
- # Custom attribute writer method with validation
359
- # @param [Object] current_snapshot_count Value to be assigned
360
- def current_snapshot_count=(current_snapshot_count)
361
- if current_snapshot_count.nil?
362
- fail ArgumentError, 'current_snapshot_count cannot be nil'
363
- end
364
-
365
- @current_snapshot_count = current_snapshot_count
366
- end
367
-
368
- # Custom attribute writer method with validation
369
- # @param [Object] current_started_sandboxes Value to be assigned
370
- def current_started_sandboxes=(current_started_sandboxes)
371
- if current_started_sandboxes.nil?
372
- fail ArgumentError, 'current_started_sandboxes cannot be nil'
373
- end
374
-
375
- @current_started_sandboxes = current_started_sandboxes
376
- end
377
-
378
- # Custom attribute writer method with validation
379
- # @param [Object] cpu Value to be assigned
380
- def cpu=(cpu)
381
- if cpu.nil?
382
- fail ArgumentError, 'cpu cannot be nil'
383
- end
384
-
385
- @cpu = cpu
386
- end
387
-
388
- # Custom attribute writer method with validation
389
- # @param [Object] memory_gi_b Value to be assigned
390
- def memory_gi_b=(memory_gi_b)
391
- if memory_gi_b.nil?
392
- fail ArgumentError, 'memory_gi_b cannot be nil'
393
- end
394
-
395
- @memory_gi_b = memory_gi_b
396
- end
397
-
398
- # Custom attribute writer method with validation
399
- # @param [Object] disk_gi_b Value to be assigned
400
- def disk_gi_b=(disk_gi_b)
401
- if disk_gi_b.nil?
402
- fail ArgumentError, 'disk_gi_b cannot be nil'
403
- end
404
-
405
- @disk_gi_b = disk_gi_b
406
- end
407
-
408
- # Checks equality by comparing each attribute.
409
- # @param [Object] Object to be compared
410
- def ==(o)
411
- return true if self.equal?(o)
412
- self.class == o.class &&
413
- current_cpu_load_average == o.current_cpu_load_average &&
414
- current_cpu_usage_percentage == o.current_cpu_usage_percentage &&
415
- current_memory_usage_percentage == o.current_memory_usage_percentage &&
416
- current_disk_usage_percentage == o.current_disk_usage_percentage &&
417
- current_allocated_cpu == o.current_allocated_cpu &&
418
- current_allocated_memory_gi_b == o.current_allocated_memory_gi_b &&
419
- current_allocated_disk_gi_b == o.current_allocated_disk_gi_b &&
420
- current_snapshot_count == o.current_snapshot_count &&
421
- current_started_sandboxes == o.current_started_sandboxes &&
422
- cpu == o.cpu &&
423
- memory_gi_b == o.memory_gi_b &&
424
- disk_gi_b == o.disk_gi_b &&
425
- gpu == o.gpu &&
426
- gpu_type == o.gpu_type
427
- end
428
-
429
- # @see the `==` method
430
- # @param [Object] Object to be compared
431
- def eql?(o)
432
- self == o
433
- end
434
-
435
- # Calculates hash code according to all attributes.
436
- # @return [Integer] Hash code
437
- def hash
438
- [current_cpu_load_average, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, cpu, memory_gi_b, disk_gi_b, gpu, gpu_type].hash
439
- end
440
-
441
- # Builds the object from hash
442
- # @param [Hash] attributes Model attributes in the form of hash
443
- # @return [Object] Returns the model itself
444
- def self.build_from_hash(attributes)
445
- return nil unless attributes.is_a?(Hash)
446
- attributes = attributes.transform_keys(&:to_sym)
447
- transformed_hash = {}
448
- openapi_types.each_pair do |key, type|
449
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
450
- transformed_hash["#{key}"] = nil
451
- elsif type =~ /\AArray<(.*)>/i
452
- # check to ensure the input is an array given that the attribute
453
- # is documented as an array but the input is not
454
- if attributes[attribute_map[key]].is_a?(Array)
455
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
456
- end
457
- elsif !attributes[attribute_map[key]].nil?
458
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
459
- end
460
- end
461
- new(transformed_hash)
462
- end
463
-
464
- # Returns the object in the form of hash
465
- # @return [Hash] Returns the object in the form of hash
466
- def to_hash
467
- hash = {}
468
- self.class.attribute_map.each_pair do |attr, param|
469
- value = self.send(attr)
470
- if value.nil?
471
- is_nullable = self.class.openapi_nullable.include?(attr)
472
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
473
- end
474
-
475
- hash[param] = _to_hash(value)
476
- end
477
- hash
478
- end
479
-
480
- end
481
-
482
- end
@@ -1,217 +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 RunnerHealthcheck < ApiModelBase
18
- # Runner metrics
19
- attr_accessor :metrics
20
-
21
- # Health status of individual services on the runner
22
- attr_accessor :service_health
23
-
24
- # Runner domain
25
- attr_accessor :domain
26
-
27
- # Runner proxy URL
28
- attr_accessor :proxy_url
29
-
30
- # Runner API URL
31
- attr_accessor :api_url
32
-
33
- # Runner app version
34
- attr_accessor :app_version
35
-
36
- # Attribute mapping from ruby-style variable name to JSON key.
37
- def self.attribute_map
38
- {
39
- :'metrics' => :'metrics',
40
- :'service_health' => :'serviceHealth',
41
- :'domain' => :'domain',
42
- :'proxy_url' => :'proxyUrl',
43
- :'api_url' => :'apiUrl',
44
- :'app_version' => :'appVersion'
45
- }
46
- end
47
-
48
- # Returns attribute mapping this model knows about
49
- def self.acceptable_attribute_map
50
- attribute_map
51
- end
52
-
53
- # Returns all the JSON keys this model knows about
54
- def self.acceptable_attributes
55
- acceptable_attribute_map.values
56
- end
57
-
58
- # Attribute type mapping.
59
- def self.openapi_types
60
- {
61
- :'metrics' => :'RunnerHealthMetrics',
62
- :'service_health' => :'Array<RunnerServiceHealth>',
63
- :'domain' => :'String',
64
- :'proxy_url' => :'String',
65
- :'api_url' => :'String',
66
- :'app_version' => :'String'
67
- }
68
- end
69
-
70
- # List of attributes with nullable: true
71
- def self.openapi_nullable
72
- Set.new([
73
- ])
74
- end
75
-
76
- # Initializes the object
77
- # @param [Hash] attributes Model attributes in the form of hash
78
- def initialize(attributes = {})
79
- if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RunnerHealthcheck` initialize method"
81
- end
82
-
83
- # check to see if the attribute exists and convert string to symbol for hash key
84
- acceptable_attribute_map = self.class.acceptable_attribute_map
85
- attributes = attributes.each_with_object({}) { |(k, v), h|
86
- if (!acceptable_attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RunnerHealthcheck`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
- end
89
- h[k.to_sym] = v
90
- }
91
-
92
- if attributes.key?(:'metrics')
93
- self.metrics = attributes[:'metrics']
94
- end
95
-
96
- if attributes.key?(:'service_health')
97
- if (value = attributes[:'service_health']).is_a?(Array)
98
- self.service_health = value
99
- end
100
- end
101
-
102
- if attributes.key?(:'domain')
103
- self.domain = attributes[:'domain']
104
- end
105
-
106
- if attributes.key?(:'proxy_url')
107
- self.proxy_url = attributes[:'proxy_url']
108
- end
109
-
110
- if attributes.key?(:'api_url')
111
- self.api_url = attributes[:'api_url']
112
- end
113
-
114
- if attributes.key?(:'app_version')
115
- self.app_version = attributes[:'app_version']
116
- else
117
- self.app_version = nil
118
- end
119
- end
120
-
121
- # Show invalid properties with the reasons. Usually used together with valid?
122
- # @return Array for valid properties with the reasons
123
- def list_invalid_properties
124
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
125
- invalid_properties = Array.new
126
- if @app_version.nil?
127
- invalid_properties.push('invalid value for "app_version", app_version cannot be nil.')
128
- end
129
-
130
- invalid_properties
131
- end
132
-
133
- # Check to see if the all the properties in the model are valid
134
- # @return true if the model is valid
135
- def valid?
136
- warn '[DEPRECATED] the `valid?` method is obsolete'
137
- return false if @app_version.nil?
138
- true
139
- end
140
-
141
- # Custom attribute writer method with validation
142
- # @param [Object] app_version Value to be assigned
143
- def app_version=(app_version)
144
- if app_version.nil?
145
- fail ArgumentError, 'app_version cannot be nil'
146
- end
147
-
148
- @app_version = app_version
149
- end
150
-
151
- # Checks equality by comparing each attribute.
152
- # @param [Object] Object to be compared
153
- def ==(o)
154
- return true if self.equal?(o)
155
- self.class == o.class &&
156
- metrics == o.metrics &&
157
- service_health == o.service_health &&
158
- domain == o.domain &&
159
- proxy_url == o.proxy_url &&
160
- api_url == o.api_url &&
161
- app_version == o.app_version
162
- end
163
-
164
- # @see the `==` method
165
- # @param [Object] Object to be compared
166
- def eql?(o)
167
- self == o
168
- end
169
-
170
- # Calculates hash code according to all attributes.
171
- # @return [Integer] Hash code
172
- def hash
173
- [metrics, service_health, domain, proxy_url, api_url, app_version].hash
174
- end
175
-
176
- # Builds the object from hash
177
- # @param [Hash] attributes Model attributes in the form of hash
178
- # @return [Object] Returns the model itself
179
- def self.build_from_hash(attributes)
180
- return nil unless attributes.is_a?(Hash)
181
- attributes = attributes.transform_keys(&:to_sym)
182
- transformed_hash = {}
183
- openapi_types.each_pair do |key, type|
184
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
185
- transformed_hash["#{key}"] = nil
186
- elsif type =~ /\AArray<(.*)>/i
187
- # check to ensure the input is an array given that the attribute
188
- # is documented as an array but the input is not
189
- if attributes[attribute_map[key]].is_a?(Array)
190
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
- end
192
- elsif !attributes[attribute_map[key]].nil?
193
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
194
- end
195
- end
196
- new(transformed_hash)
197
- end
198
-
199
- # Returns the object in the form of hash
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_hash
202
- hash = {}
203
- self.class.attribute_map.each_pair do |attr, param|
204
- value = self.send(attr)
205
- if value.nil?
206
- is_nullable = self.class.openapi_nullable.include?(attr)
207
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
- end
209
-
210
- hash[param] = _to_hash(value)
211
- end
212
- hash
213
- end
214
-
215
- end
216
-
217
- end