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,326 +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 AdminCreateRunner < ApiModelBase
18
- attr_accessor :region_id
19
-
20
- attr_accessor :name
21
-
22
- # Tags to associate with the runner
23
- attr_accessor :tags
24
-
25
- attr_accessor :api_key
26
-
27
- # The api version of the runner to create
28
- attr_accessor :api_version
29
-
30
- # The domain of the runner
31
- attr_accessor :domain
32
-
33
- # The API URL of the runner
34
- attr_accessor :api_url
35
-
36
- # The proxy URL of the runner
37
- attr_accessor :proxy_url
38
-
39
- # The CPU capacity of the runner
40
- attr_accessor :cpu
41
-
42
- # The memory capacity of the runner in GiB
43
- attr_accessor :memory_gi_b
44
-
45
- # The disk capacity of the runner in GiB
46
- attr_accessor :disk_gi_b
47
-
48
- # Attribute mapping from ruby-style variable name to JSON key.
49
- def self.attribute_map
50
- {
51
- :'region_id' => :'regionId',
52
- :'name' => :'name',
53
- :'tags' => :'tags',
54
- :'api_key' => :'apiKey',
55
- :'api_version' => :'apiVersion',
56
- :'domain' => :'domain',
57
- :'api_url' => :'apiUrl',
58
- :'proxy_url' => :'proxyUrl',
59
- :'cpu' => :'cpu',
60
- :'memory_gi_b' => :'memoryGiB',
61
- :'disk_gi_b' => :'diskGiB'
62
- }
63
- end
64
-
65
- # Returns attribute mapping this model knows about
66
- def self.acceptable_attribute_map
67
- attribute_map
68
- end
69
-
70
- # Returns all the JSON keys this model knows about
71
- def self.acceptable_attributes
72
- acceptable_attribute_map.values
73
- end
74
-
75
- # Attribute type mapping.
76
- def self.openapi_types
77
- {
78
- :'region_id' => :'String',
79
- :'name' => :'String',
80
- :'tags' => :'Array<String>',
81
- :'api_key' => :'String',
82
- :'api_version' => :'String',
83
- :'domain' => :'String',
84
- :'api_url' => :'String',
85
- :'proxy_url' => :'String',
86
- :'cpu' => :'Float',
87
- :'memory_gi_b' => :'Float',
88
- :'disk_gi_b' => :'Float'
89
- }
90
- end
91
-
92
- # List of attributes with nullable: true
93
- def self.openapi_nullable
94
- Set.new([
95
- ])
96
- end
97
-
98
- # Initializes the object
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- def initialize(attributes = {})
101
- if (!attributes.is_a?(Hash))
102
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::AdminCreateRunner` initialize method"
103
- end
104
-
105
- # check to see if the attribute exists and convert string to symbol for hash key
106
- acceptable_attribute_map = self.class.acceptable_attribute_map
107
- attributes = attributes.each_with_object({}) { |(k, v), h|
108
- if (!acceptable_attribute_map.key?(k.to_sym))
109
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::AdminCreateRunner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
110
- end
111
- h[k.to_sym] = v
112
- }
113
-
114
- if attributes.key?(:'region_id')
115
- self.region_id = attributes[:'region_id']
116
- else
117
- self.region_id = nil
118
- end
119
-
120
- if attributes.key?(:'name')
121
- self.name = attributes[:'name']
122
- else
123
- self.name = nil
124
- end
125
-
126
- if attributes.key?(:'tags')
127
- if (value = attributes[:'tags']).is_a?(Array)
128
- self.tags = value
129
- end
130
- end
131
-
132
- if attributes.key?(:'api_key')
133
- self.api_key = attributes[:'api_key']
134
- else
135
- self.api_key = nil
136
- end
137
-
138
- if attributes.key?(:'api_version')
139
- self.api_version = attributes[:'api_version']
140
- else
141
- self.api_version = nil
142
- end
143
-
144
- if attributes.key?(:'domain')
145
- self.domain = attributes[:'domain']
146
- end
147
-
148
- if attributes.key?(:'api_url')
149
- self.api_url = attributes[:'api_url']
150
- end
151
-
152
- if attributes.key?(:'proxy_url')
153
- self.proxy_url = attributes[:'proxy_url']
154
- end
155
-
156
- if attributes.key?(:'cpu')
157
- self.cpu = attributes[:'cpu']
158
- end
159
-
160
- if attributes.key?(:'memory_gi_b')
161
- self.memory_gi_b = attributes[:'memory_gi_b']
162
- end
163
-
164
- if attributes.key?(:'disk_gi_b')
165
- self.disk_gi_b = attributes[:'disk_gi_b']
166
- end
167
- end
168
-
169
- # Show invalid properties with the reasons. Usually used together with valid?
170
- # @return Array for valid properties with the reasons
171
- def list_invalid_properties
172
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
173
- invalid_properties = Array.new
174
- if @region_id.nil?
175
- invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
176
- end
177
-
178
- if @name.nil?
179
- invalid_properties.push('invalid value for "name", name cannot be nil.')
180
- end
181
-
182
- if @api_key.nil?
183
- invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
184
- end
185
-
186
- if @api_version.nil?
187
- invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
188
- end
189
-
190
- pattern = Regexp.new(/^(0|2)$/)
191
- if @api_version !~ pattern
192
- invalid_properties.push("invalid value for \"api_version\", must conform to the pattern #{pattern}.")
193
- end
194
-
195
- invalid_properties
196
- end
197
-
198
- # Check to see if the all the properties in the model are valid
199
- # @return true if the model is valid
200
- def valid?
201
- warn '[DEPRECATED] the `valid?` method is obsolete'
202
- return false if @region_id.nil?
203
- return false if @name.nil?
204
- return false if @api_key.nil?
205
- return false if @api_version.nil?
206
- return false if @api_version !~ Regexp.new(/^(0|2)$/)
207
- true
208
- end
209
-
210
- # Custom attribute writer method with validation
211
- # @param [Object] region_id Value to be assigned
212
- def region_id=(region_id)
213
- if region_id.nil?
214
- fail ArgumentError, 'region_id cannot be nil'
215
- end
216
-
217
- @region_id = region_id
218
- end
219
-
220
- # Custom attribute writer method with validation
221
- # @param [Object] name Value to be assigned
222
- def name=(name)
223
- if name.nil?
224
- fail ArgumentError, 'name cannot be nil'
225
- end
226
-
227
- @name = name
228
- end
229
-
230
- # Custom attribute writer method with validation
231
- # @param [Object] api_key Value to be assigned
232
- def api_key=(api_key)
233
- if api_key.nil?
234
- fail ArgumentError, 'api_key cannot be nil'
235
- end
236
-
237
- @api_key = api_key
238
- end
239
-
240
- # Custom attribute writer method with validation
241
- # @param [Object] api_version Value to be assigned
242
- def api_version=(api_version)
243
- if api_version.nil?
244
- fail ArgumentError, 'api_version cannot be nil'
245
- end
246
-
247
- pattern = Regexp.new(/^(0|2)$/)
248
- if api_version !~ pattern
249
- fail ArgumentError, "invalid value for \"api_version\", must conform to the pattern #{pattern}."
250
- end
251
-
252
- @api_version = api_version
253
- end
254
-
255
- # Checks equality by comparing each attribute.
256
- # @param [Object] Object to be compared
257
- def ==(o)
258
- return true if self.equal?(o)
259
- self.class == o.class &&
260
- region_id == o.region_id &&
261
- name == o.name &&
262
- tags == o.tags &&
263
- api_key == o.api_key &&
264
- api_version == o.api_version &&
265
- domain == o.domain &&
266
- api_url == o.api_url &&
267
- proxy_url == o.proxy_url &&
268
- cpu == o.cpu &&
269
- memory_gi_b == o.memory_gi_b &&
270
- disk_gi_b == o.disk_gi_b
271
- end
272
-
273
- # @see the `==` method
274
- # @param [Object] Object to be compared
275
- def eql?(o)
276
- self == o
277
- end
278
-
279
- # Calculates hash code according to all attributes.
280
- # @return [Integer] Hash code
281
- def hash
282
- [region_id, name, tags, api_key, api_version, domain, api_url, proxy_url, cpu, memory_gi_b, disk_gi_b].hash
283
- end
284
-
285
- # Builds the object from hash
286
- # @param [Hash] attributes Model attributes in the form of hash
287
- # @return [Object] Returns the model itself
288
- def self.build_from_hash(attributes)
289
- return nil unless attributes.is_a?(Hash)
290
- attributes = attributes.transform_keys(&:to_sym)
291
- transformed_hash = {}
292
- openapi_types.each_pair do |key, type|
293
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
294
- transformed_hash["#{key}"] = nil
295
- elsif type =~ /\AArray<(.*)>/i
296
- # check to ensure the input is an array given that the attribute
297
- # is documented as an array but the input is not
298
- if attributes[attribute_map[key]].is_a?(Array)
299
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
300
- end
301
- elsif !attributes[attribute_map[key]].nil?
302
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
303
- end
304
- end
305
- new(transformed_hash)
306
- end
307
-
308
- # Returns the object in the form of hash
309
- # @return [Hash] Returns the object in the form of hash
310
- def to_hash
311
- hash = {}
312
- self.class.attribute_map.each_pair do |attr, param|
313
- value = self.send(attr)
314
- if value.nil?
315
- is_nullable = self.class.openapi_nullable.include?(attr)
316
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
317
- end
318
-
319
- hash[param] = _to_hash(value)
320
- end
321
- hash
322
- end
323
-
324
- end
325
-
326
- end
@@ -1,372 +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 CreateOrganizationRegionQuota < ApiModelBase
18
- attr_accessor :sandbox_class
19
-
20
- attr_accessor :total_cpu_quota
21
-
22
- attr_accessor :total_memory_quota
23
-
24
- attr_accessor :total_disk_quota
25
-
26
- attr_accessor :total_gpu_quota
27
-
28
- attr_accessor :allowed_gpu_types
29
-
30
- attr_accessor :max_cpu_per_sandbox
31
-
32
- attr_accessor :max_memory_per_sandbox
33
-
34
- attr_accessor :max_disk_per_sandbox
35
-
36
- attr_accessor :max_disk_per_non_ephemeral_sandbox
37
-
38
- attr_accessor :max_cpu_per_gpu_sandbox
39
-
40
- attr_accessor :max_memory_per_gpu_sandbox
41
-
42
- attr_accessor :max_disk_per_gpu_sandbox
43
-
44
- class EnumAttributeValidator
45
- attr_reader :datatype
46
- attr_reader :allowable_values
47
-
48
- def initialize(datatype, allowable_values)
49
- @allowable_values = allowable_values.map do |value|
50
- case datatype.to_s
51
- when /Integer/i
52
- value.to_i
53
- when /Float/i
54
- value.to_f
55
- else
56
- value
57
- end
58
- end
59
- end
60
-
61
- def valid?(value)
62
- !value || allowable_values.include?(value)
63
- end
64
- end
65
-
66
- # Attribute mapping from ruby-style variable name to JSON key.
67
- def self.attribute_map
68
- {
69
- :'sandbox_class' => :'sandboxClass',
70
- :'total_cpu_quota' => :'totalCpuQuota',
71
- :'total_memory_quota' => :'totalMemoryQuota',
72
- :'total_disk_quota' => :'totalDiskQuota',
73
- :'total_gpu_quota' => :'totalGpuQuota',
74
- :'allowed_gpu_types' => :'allowedGpuTypes',
75
- :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
76
- :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
77
- :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
78
- :'max_disk_per_non_ephemeral_sandbox' => :'maxDiskPerNonEphemeralSandbox',
79
- :'max_cpu_per_gpu_sandbox' => :'maxCpuPerGpuSandbox',
80
- :'max_memory_per_gpu_sandbox' => :'maxMemoryPerGpuSandbox',
81
- :'max_disk_per_gpu_sandbox' => :'maxDiskPerGpuSandbox'
82
- }
83
- end
84
-
85
- # Returns attribute mapping this model knows about
86
- def self.acceptable_attribute_map
87
- attribute_map
88
- end
89
-
90
- # Returns all the JSON keys this model knows about
91
- def self.acceptable_attributes
92
- acceptable_attribute_map.values
93
- end
94
-
95
- # Attribute type mapping.
96
- def self.openapi_types
97
- {
98
- :'sandbox_class' => :'SandboxClass',
99
- :'total_cpu_quota' => :'Float',
100
- :'total_memory_quota' => :'Float',
101
- :'total_disk_quota' => :'Float',
102
- :'total_gpu_quota' => :'Float',
103
- :'allowed_gpu_types' => :'Array<GpuType>',
104
- :'max_cpu_per_sandbox' => :'Float',
105
- :'max_memory_per_sandbox' => :'Float',
106
- :'max_disk_per_sandbox' => :'Float',
107
- :'max_disk_per_non_ephemeral_sandbox' => :'Float',
108
- :'max_cpu_per_gpu_sandbox' => :'Float',
109
- :'max_memory_per_gpu_sandbox' => :'Float',
110
- :'max_disk_per_gpu_sandbox' => :'Float'
111
- }
112
- end
113
-
114
- # List of attributes with nullable: true
115
- def self.openapi_nullable
116
- Set.new([
117
- :'allowed_gpu_types',
118
- :'max_cpu_per_sandbox',
119
- :'max_memory_per_sandbox',
120
- :'max_disk_per_sandbox',
121
- :'max_disk_per_non_ephemeral_sandbox',
122
- :'max_cpu_per_gpu_sandbox',
123
- :'max_memory_per_gpu_sandbox',
124
- :'max_disk_per_gpu_sandbox'
125
- ])
126
- end
127
-
128
- # Initializes the object
129
- # @param [Hash] attributes Model attributes in the form of hash
130
- def initialize(attributes = {})
131
- if (!attributes.is_a?(Hash))
132
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateOrganizationRegionQuota` initialize method"
133
- end
134
-
135
- # check to see if the attribute exists and convert string to symbol for hash key
136
- acceptable_attribute_map = self.class.acceptable_attribute_map
137
- attributes = attributes.each_with_object({}) { |(k, v), h|
138
- if (!acceptable_attribute_map.key?(k.to_sym))
139
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CreateOrganizationRegionQuota`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
140
- end
141
- h[k.to_sym] = v
142
- }
143
-
144
- if attributes.key?(:'sandbox_class')
145
- self.sandbox_class = attributes[:'sandbox_class']
146
- else
147
- self.sandbox_class = nil
148
- end
149
-
150
- if attributes.key?(:'total_cpu_quota')
151
- self.total_cpu_quota = attributes[:'total_cpu_quota']
152
- else
153
- self.total_cpu_quota = nil
154
- end
155
-
156
- if attributes.key?(:'total_memory_quota')
157
- self.total_memory_quota = attributes[:'total_memory_quota']
158
- else
159
- self.total_memory_quota = nil
160
- end
161
-
162
- if attributes.key?(:'total_disk_quota')
163
- self.total_disk_quota = attributes[:'total_disk_quota']
164
- else
165
- self.total_disk_quota = nil
166
- end
167
-
168
- if attributes.key?(:'total_gpu_quota')
169
- self.total_gpu_quota = attributes[:'total_gpu_quota']
170
- else
171
- self.total_gpu_quota = nil
172
- end
173
-
174
- if attributes.key?(:'allowed_gpu_types')
175
- if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
176
- self.allowed_gpu_types = value
177
- end
178
- end
179
-
180
- if attributes.key?(:'max_cpu_per_sandbox')
181
- self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
182
- end
183
-
184
- if attributes.key?(:'max_memory_per_sandbox')
185
- self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
186
- end
187
-
188
- if attributes.key?(:'max_disk_per_sandbox')
189
- self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
190
- end
191
-
192
- if attributes.key?(:'max_disk_per_non_ephemeral_sandbox')
193
- self.max_disk_per_non_ephemeral_sandbox = attributes[:'max_disk_per_non_ephemeral_sandbox']
194
- end
195
-
196
- if attributes.key?(:'max_cpu_per_gpu_sandbox')
197
- self.max_cpu_per_gpu_sandbox = attributes[:'max_cpu_per_gpu_sandbox']
198
- end
199
-
200
- if attributes.key?(:'max_memory_per_gpu_sandbox')
201
- self.max_memory_per_gpu_sandbox = attributes[:'max_memory_per_gpu_sandbox']
202
- end
203
-
204
- if attributes.key?(:'max_disk_per_gpu_sandbox')
205
- self.max_disk_per_gpu_sandbox = attributes[:'max_disk_per_gpu_sandbox']
206
- end
207
- end
208
-
209
- # Show invalid properties with the reasons. Usually used together with valid?
210
- # @return Array for valid properties with the reasons
211
- def list_invalid_properties
212
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
213
- invalid_properties = Array.new
214
- if @sandbox_class.nil?
215
- invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
216
- end
217
-
218
- if @total_cpu_quota.nil?
219
- invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
220
- end
221
-
222
- if @total_memory_quota.nil?
223
- invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
224
- end
225
-
226
- if @total_disk_quota.nil?
227
- invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
228
- end
229
-
230
- if @total_gpu_quota.nil?
231
- invalid_properties.push('invalid value for "total_gpu_quota", total_gpu_quota cannot be nil.')
232
- end
233
-
234
- invalid_properties
235
- end
236
-
237
- # Check to see if the all the properties in the model are valid
238
- # @return true if the model is valid
239
- def valid?
240
- warn '[DEPRECATED] the `valid?` method is obsolete'
241
- return false if @sandbox_class.nil?
242
- return false if @total_cpu_quota.nil?
243
- return false if @total_memory_quota.nil?
244
- return false if @total_disk_quota.nil?
245
- return false if @total_gpu_quota.nil?
246
- true
247
- end
248
-
249
- # Custom attribute writer method with validation
250
- # @param [Object] sandbox_class Value to be assigned
251
- def sandbox_class=(sandbox_class)
252
- if sandbox_class.nil?
253
- fail ArgumentError, 'sandbox_class cannot be nil'
254
- end
255
-
256
- @sandbox_class = sandbox_class
257
- end
258
-
259
- # Custom attribute writer method with validation
260
- # @param [Object] total_cpu_quota Value to be assigned
261
- def total_cpu_quota=(total_cpu_quota)
262
- if total_cpu_quota.nil?
263
- fail ArgumentError, 'total_cpu_quota cannot be nil'
264
- end
265
-
266
- @total_cpu_quota = total_cpu_quota
267
- end
268
-
269
- # Custom attribute writer method with validation
270
- # @param [Object] total_memory_quota Value to be assigned
271
- def total_memory_quota=(total_memory_quota)
272
- if total_memory_quota.nil?
273
- fail ArgumentError, 'total_memory_quota cannot be nil'
274
- end
275
-
276
- @total_memory_quota = total_memory_quota
277
- end
278
-
279
- # Custom attribute writer method with validation
280
- # @param [Object] total_disk_quota Value to be assigned
281
- def total_disk_quota=(total_disk_quota)
282
- if total_disk_quota.nil?
283
- fail ArgumentError, 'total_disk_quota cannot be nil'
284
- end
285
-
286
- @total_disk_quota = total_disk_quota
287
- end
288
-
289
- # Custom attribute writer method with validation
290
- # @param [Object] total_gpu_quota Value to be assigned
291
- def total_gpu_quota=(total_gpu_quota)
292
- if total_gpu_quota.nil?
293
- fail ArgumentError, 'total_gpu_quota cannot be nil'
294
- end
295
-
296
- @total_gpu_quota = total_gpu_quota
297
- end
298
-
299
- # Checks equality by comparing each attribute.
300
- # @param [Object] Object to be compared
301
- def ==(o)
302
- return true if self.equal?(o)
303
- self.class == o.class &&
304
- sandbox_class == o.sandbox_class &&
305
- total_cpu_quota == o.total_cpu_quota &&
306
- total_memory_quota == o.total_memory_quota &&
307
- total_disk_quota == o.total_disk_quota &&
308
- total_gpu_quota == o.total_gpu_quota &&
309
- allowed_gpu_types == o.allowed_gpu_types &&
310
- max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
311
- max_memory_per_sandbox == o.max_memory_per_sandbox &&
312
- max_disk_per_sandbox == o.max_disk_per_sandbox &&
313
- max_disk_per_non_ephemeral_sandbox == o.max_disk_per_non_ephemeral_sandbox &&
314
- max_cpu_per_gpu_sandbox == o.max_cpu_per_gpu_sandbox &&
315
- max_memory_per_gpu_sandbox == o.max_memory_per_gpu_sandbox &&
316
- max_disk_per_gpu_sandbox == o.max_disk_per_gpu_sandbox
317
- end
318
-
319
- # @see the `==` method
320
- # @param [Object] Object to be compared
321
- def eql?(o)
322
- self == o
323
- end
324
-
325
- # Calculates hash code according to all attributes.
326
- # @return [Integer] Hash code
327
- def hash
328
- [sandbox_class, total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, 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
329
- end
330
-
331
- # Builds the object from hash
332
- # @param [Hash] attributes Model attributes in the form of hash
333
- # @return [Object] Returns the model itself
334
- def self.build_from_hash(attributes)
335
- return nil unless attributes.is_a?(Hash)
336
- attributes = attributes.transform_keys(&:to_sym)
337
- transformed_hash = {}
338
- openapi_types.each_pair do |key, type|
339
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
340
- transformed_hash["#{key}"] = nil
341
- elsif type =~ /\AArray<(.*)>/i
342
- # check to ensure the input is an array given that the attribute
343
- # is documented as an array but the input is not
344
- if attributes[attribute_map[key]].is_a?(Array)
345
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
346
- end
347
- elsif !attributes[attribute_map[key]].nil?
348
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
349
- end
350
- end
351
- new(transformed_hash)
352
- end
353
-
354
- # Returns the object in the form of hash
355
- # @return [Hash] Returns the object in the form of hash
356
- def to_hash
357
- hash = {}
358
- self.class.attribute_map.each_pair do |attr, param|
359
- value = self.send(attr)
360
- if value.nil?
361
- is_nullable = self.class.openapi_nullable.include?(attr)
362
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
363
- end
364
-
365
- hash[param] = _to_hash(value)
366
- end
367
- hash
368
- end
369
-
370
- end
371
-
372
- end