daytona_api_client 0.202.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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +4 -4
  5. data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
  6. data/lib/daytona_api_client/api/audit_api.rb +140 -40
  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 +265 -1316
  12. data/lib/daytona_api_client/api/preview_api.rb +8 -202
  13. data/lib/daytona_api_client/api/runners_api.rb +22 -412
  14. data/lib/daytona_api_client/api/sandbox_api.rb +434 -2352
  15. data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
  16. data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
  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/{create_runner_response.rb → command.rb} +104 -23
  31. data/lib/daytona_api_client/models/completion_context.rb +244 -0
  32. data/lib/daytona_api_client/models/completion_item.rb +289 -0
  33. data/lib/daytona_api_client/models/{paginated_traces.rb → completion_list.rb} +106 -91
  34. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
  35. data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
  36. data/lib/daytona_api_client/models/{available_sandbox_class.rb → computer_use_status_response.rb} +97 -86
  37. data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
  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 +78 -26
  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 +117 -76
  49. data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
  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 -64
  55. data/lib/daytona_api_client/models/display_info_response.rb +238 -0
  56. data/lib/daytona_api_client/models/docker_registry.rb +76 -5
  57. data/lib/daytona_api_client/models/{paginated_jobs.rb → download_files.rb} +94 -100
  58. data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
  59. data/lib/daytona_api_client/models/execute_response.rb +263 -0
  60. data/lib/daytona_api_client/models/file_info.rb +417 -0
  61. data/lib/daytona_api_client/models/{secret.rb → file_status.rb} +122 -121
  62. data/lib/daytona_api_client/models/git_add_request.rb +264 -0
  63. data/lib/daytona_api_client/models/{admin_create_organization.rb → git_branch_request.rb} +95 -53
  64. data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
  65. data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
  66. data/lib/daytona_api_client/models/{trace_span.rb → git_commit_info.rb} +148 -141
  67. data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
  68. data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
  69. data/lib/daytona_api_client/models/{create_secret.rb → git_delete_branch_request.rb} +106 -59
  70. data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
  71. data/lib/daytona_api_client/models/git_status.rb +290 -0
  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/{create_sandbox_snapshot.rb → keyboard_hotkey_request.rb} +93 -34
  76. data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
  77. data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
  78. data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
  79. data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
  80. data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
  81. data/lib/daytona_api_client/models/lsp_location.rb +261 -0
  82. data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
  83. data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
  84. data/lib/daytona_api_client/models/match.rb +287 -0
  85. data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
  86. data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
  87. data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
  88. data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
  89. data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
  90. data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
  91. data/lib/daytona_api_client/models/mouse_position.rb +263 -0
  92. data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
  93. data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
  94. data/lib/daytona_api_client/models/oidc_config.rb +74 -3
  95. data/lib/daytona_api_client/models/organization.rb +159 -243
  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_logs.rb → paginated_snapshots_dto.rb} +77 -10
  106. data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
  107. data/lib/daytona_api_client/models/position.rb +261 -0
  108. data/lib/daytona_api_client/models/posthog_config.rb +74 -3
  109. data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
  110. data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
  111. data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
  112. data/lib/daytona_api_client/models/process_status_response.rb +263 -0
  113. data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
  114. data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
  115. data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
  116. data/lib/daytona_api_client/models/{metric_data_point.rb → pty_list_response.rb} +95 -49
  117. data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
  118. data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
  119. data/lib/daytona_api_client/models/range.rb +261 -0
  120. data/lib/daytona_api_client/models/region.rb +78 -181
  121. data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
  122. data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
  123. data/lib/daytona_api_client/models/replace_request.rb +289 -0
  124. data/lib/daytona_api_client/models/{resize_sandbox.rb → replace_result.rb} +95 -84
  125. data/lib/daytona_api_client/models/runner.rb +215 -155
  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 +101 -164
  129. data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
  130. data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
  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 -10
  134. data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
  135. data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
  136. data/lib/daytona_api_client/models/{runner_service_health.rb → search_files_response.rb} +94 -59
  137. data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
  138. data/lib/daytona_api_client/models/session.rb +251 -0
  139. data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
  140. data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
  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 -5
  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 +78 -34
  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 -131
  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/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
  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/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
  160. data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
  161. data/lib/daytona_api_client/models/windows_response.rb +265 -0
  162. data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
  163. data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +339 -193
  164. data/lib/daytona_api_client/version.rb +2 -2
  165. data/lib/daytona_api_client.rb +76 -74
  166. data/project.json +13 -38
  167. metadata +81 -83
  168. data/.gitignore +0 -39
  169. data/.openapi-generator/FILES +0 -163
  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 -1615
  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/secret_api.rb +0 -441
  179. data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
  180. data/lib/daytona_api_client/api_model_base.rb +0 -88
  181. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
  182. data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
  183. data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -375
  184. data/lib/daytona_api_client/models/date_filter.rb +0 -178
  185. data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
  186. data/lib/daytona_api_client/models/gpu_type.rb +0 -44
  187. data/lib/daytona_api_client/models/int_filter.rb +0 -222
  188. data/lib/daytona_api_client/models/job.rb +0 -366
  189. data/lib/daytona_api_client/models/job_status.rb +0 -43
  190. data/lib/daytona_api_client/models/job_type.rb +0 -55
  191. data/lib/daytona_api_client/models/log_entry.rb +0 -334
  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/organization_preview_warning.rb +0 -165
  195. data/lib/daytona_api_client/models/otel_config.rb +0 -188
  196. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
  197. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
  198. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
  199. data/lib/daytona_api_client/models/region_quota.rb +0 -440
  200. data/lib/daytona_api_client/models/region_type.rb +0 -42
  201. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
  202. data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
  203. data/lib/daytona_api_client/models/runner_class.rb +0 -40
  204. data/lib/daytona_api_client/models/runner_full.rb +0 -757
  205. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
  206. data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
  207. data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
  208. data/lib/daytona_api_client/models/string_filter.rb +0 -182
  209. data/lib/daytona_api_client/models/trace_summary.rb +0 -310
  210. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
  211. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -302
  212. data/lib/daytona_api_client/models/update_region.rb +0 -171
  213. data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
  214. data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
  215. data/lib/daytona_api_client/models/update_secret.rb +0 -170
  216. data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
  217. data/lib/daytona_api_client/models/url.rb +0 -165
  218. data/lib/daytona_api_client/models/warm_pool.rb +0 -490
  219. data/lib/daytona_api_client/models/webhook_event.rb +0 -46
@@ -1,147 +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 AdminGetWebhookStatus200Response < ApiModelBase
18
- attr_accessor :enabled
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'enabled' => :'enabled'
24
- }
25
- end
26
-
27
- # Returns attribute mapping this model knows about
28
- def self.acceptable_attribute_map
29
- attribute_map
30
- end
31
-
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- acceptable_attribute_map.values
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.openapi_types
39
- {
40
- :'enabled' => :'Boolean'
41
- }
42
- end
43
-
44
- # List of attributes with nullable: true
45
- def self.openapi_nullable
46
- Set.new([
47
- ])
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::AdminGetWebhookStatus200Response` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- acceptable_attribute_map = self.class.acceptable_attribute_map
59
- attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::AdminGetWebhookStatus200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
- end
63
- h[k.to_sym] = v
64
- }
65
-
66
- if attributes.key?(:'enabled')
67
- self.enabled = attributes[:'enabled']
68
- end
69
- end
70
-
71
- # Show invalid properties with the reasons. Usually used together with valid?
72
- # @return Array for valid properties with the reasons
73
- def list_invalid_properties
74
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
- invalid_properties = Array.new
76
- invalid_properties
77
- end
78
-
79
- # Check to see if the all the properties in the model are valid
80
- # @return true if the model is valid
81
- def valid?
82
- warn '[DEPRECATED] the `valid?` method is obsolete'
83
- true
84
- end
85
-
86
- # Checks equality by comparing each attribute.
87
- # @param [Object] Object to be compared
88
- def ==(o)
89
- return true if self.equal?(o)
90
- self.class == o.class &&
91
- enabled == o.enabled
92
- end
93
-
94
- # @see the `==` method
95
- # @param [Object] Object to be compared
96
- def eql?(o)
97
- self == o
98
- end
99
-
100
- # Calculates hash code according to all attributes.
101
- # @return [Integer] Hash code
102
- def hash
103
- [enabled].hash
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def self.build_from_hash(attributes)
110
- return nil unless attributes.is_a?(Hash)
111
- attributes = attributes.transform_keys(&:to_sym)
112
- transformed_hash = {}
113
- openapi_types.each_pair do |key, type|
114
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
- transformed_hash["#{key}"] = nil
116
- elsif type =~ /\AArray<(.*)>/i
117
- # check to ensure the input is an array given that the attribute
118
- # is documented as an array but the input is not
119
- if attributes[attribute_map[key]].is_a?(Array)
120
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
- end
122
- elsif !attributes[attribute_map[key]].nil?
123
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
- end
125
- end
126
- new(transformed_hash)
127
- end
128
-
129
- # Returns the object in the form of hash
130
- # @return [Hash] Returns the object in the form of hash
131
- def to_hash
132
- hash = {}
133
- self.class.attribute_map.each_pair do |attr, param|
134
- value = self.send(attr)
135
- if value.nil?
136
- is_nullable = self.class.openapi_nullable.include?(attr)
137
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
- end
139
-
140
- hash[param] = _to_hash(value)
141
- end
142
- hash
143
- end
144
-
145
- end
146
-
147
- end
@@ -1,375 +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
- # CPU maximum per requested GPU unit for GPU sandboxes.
39
- attr_accessor :max_cpu_per_gpu
40
-
41
- # Memory maximum per requested GPU unit for GPU sandboxes.
42
- attr_accessor :max_memory_per_gpu
43
-
44
- # Disk maximum per requested GPU unit for GPU sandboxes.
45
- attr_accessor :max_disk_per_gpu
46
-
47
- class EnumAttributeValidator
48
- attr_reader :datatype
49
- attr_reader :allowable_values
50
-
51
- def initialize(datatype, allowable_values)
52
- @allowable_values = allowable_values.map do |value|
53
- case datatype.to_s
54
- when /Integer/i
55
- value.to_i
56
- when /Float/i
57
- value.to_f
58
- else
59
- value
60
- end
61
- end
62
- end
63
-
64
- def valid?(value)
65
- !value || allowable_values.include?(value)
66
- end
67
- end
68
-
69
- # Attribute mapping from ruby-style variable name to JSON key.
70
- def self.attribute_map
71
- {
72
- :'sandbox_class' => :'sandboxClass',
73
- :'total_cpu_quota' => :'totalCpuQuota',
74
- :'total_memory_quota' => :'totalMemoryQuota',
75
- :'total_disk_quota' => :'totalDiskQuota',
76
- :'total_gpu_quota' => :'totalGpuQuota',
77
- :'allowed_gpu_types' => :'allowedGpuTypes',
78
- :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
79
- :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
80
- :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
81
- :'max_disk_per_non_ephemeral_sandbox' => :'maxDiskPerNonEphemeralSandbox',
82
- :'max_cpu_per_gpu' => :'maxCpuPerGpu',
83
- :'max_memory_per_gpu' => :'maxMemoryPerGpu',
84
- :'max_disk_per_gpu' => :'maxDiskPerGpu'
85
- }
86
- end
87
-
88
- # Returns attribute mapping this model knows about
89
- def self.acceptable_attribute_map
90
- attribute_map
91
- end
92
-
93
- # Returns all the JSON keys this model knows about
94
- def self.acceptable_attributes
95
- acceptable_attribute_map.values
96
- end
97
-
98
- # Attribute type mapping.
99
- def self.openapi_types
100
- {
101
- :'sandbox_class' => :'SandboxClass',
102
- :'total_cpu_quota' => :'Float',
103
- :'total_memory_quota' => :'Float',
104
- :'total_disk_quota' => :'Float',
105
- :'total_gpu_quota' => :'Float',
106
- :'allowed_gpu_types' => :'Array<GpuType>',
107
- :'max_cpu_per_sandbox' => :'Float',
108
- :'max_memory_per_sandbox' => :'Float',
109
- :'max_disk_per_sandbox' => :'Float',
110
- :'max_disk_per_non_ephemeral_sandbox' => :'Float',
111
- :'max_cpu_per_gpu' => :'Float',
112
- :'max_memory_per_gpu' => :'Float',
113
- :'max_disk_per_gpu' => :'Float'
114
- }
115
- end
116
-
117
- # List of attributes with nullable: true
118
- def self.openapi_nullable
119
- Set.new([
120
- :'allowed_gpu_types',
121
- :'max_cpu_per_sandbox',
122
- :'max_memory_per_sandbox',
123
- :'max_disk_per_sandbox',
124
- :'max_disk_per_non_ephemeral_sandbox',
125
- :'max_cpu_per_gpu',
126
- :'max_memory_per_gpu',
127
- :'max_disk_per_gpu'
128
- ])
129
- end
130
-
131
- # Initializes the object
132
- # @param [Hash] attributes Model attributes in the form of hash
133
- def initialize(attributes = {})
134
- if (!attributes.is_a?(Hash))
135
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateOrganizationRegionQuota` initialize method"
136
- end
137
-
138
- # check to see if the attribute exists and convert string to symbol for hash key
139
- acceptable_attribute_map = self.class.acceptable_attribute_map
140
- attributes = attributes.each_with_object({}) { |(k, v), h|
141
- if (!acceptable_attribute_map.key?(k.to_sym))
142
- 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
143
- end
144
- h[k.to_sym] = v
145
- }
146
-
147
- if attributes.key?(:'sandbox_class')
148
- self.sandbox_class = attributes[:'sandbox_class']
149
- else
150
- self.sandbox_class = nil
151
- end
152
-
153
- if attributes.key?(:'total_cpu_quota')
154
- self.total_cpu_quota = attributes[:'total_cpu_quota']
155
- else
156
- self.total_cpu_quota = nil
157
- end
158
-
159
- if attributes.key?(:'total_memory_quota')
160
- self.total_memory_quota = attributes[:'total_memory_quota']
161
- else
162
- self.total_memory_quota = nil
163
- end
164
-
165
- if attributes.key?(:'total_disk_quota')
166
- self.total_disk_quota = attributes[:'total_disk_quota']
167
- else
168
- self.total_disk_quota = nil
169
- end
170
-
171
- if attributes.key?(:'total_gpu_quota')
172
- self.total_gpu_quota = attributes[:'total_gpu_quota']
173
- else
174
- self.total_gpu_quota = nil
175
- end
176
-
177
- if attributes.key?(:'allowed_gpu_types')
178
- if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
179
- self.allowed_gpu_types = value
180
- end
181
- end
182
-
183
- if attributes.key?(:'max_cpu_per_sandbox')
184
- self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
185
- end
186
-
187
- if attributes.key?(:'max_memory_per_sandbox')
188
- self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
189
- end
190
-
191
- if attributes.key?(:'max_disk_per_sandbox')
192
- self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
193
- end
194
-
195
- if attributes.key?(:'max_disk_per_non_ephemeral_sandbox')
196
- self.max_disk_per_non_ephemeral_sandbox = attributes[:'max_disk_per_non_ephemeral_sandbox']
197
- end
198
-
199
- if attributes.key?(:'max_cpu_per_gpu')
200
- self.max_cpu_per_gpu = attributes[:'max_cpu_per_gpu']
201
- end
202
-
203
- if attributes.key?(:'max_memory_per_gpu')
204
- self.max_memory_per_gpu = attributes[:'max_memory_per_gpu']
205
- end
206
-
207
- if attributes.key?(:'max_disk_per_gpu')
208
- self.max_disk_per_gpu = attributes[:'max_disk_per_gpu']
209
- end
210
- end
211
-
212
- # Show invalid properties with the reasons. Usually used together with valid?
213
- # @return Array for valid properties with the reasons
214
- def list_invalid_properties
215
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
216
- invalid_properties = Array.new
217
- if @sandbox_class.nil?
218
- invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
219
- end
220
-
221
- if @total_cpu_quota.nil?
222
- invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
223
- end
224
-
225
- if @total_memory_quota.nil?
226
- invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
227
- end
228
-
229
- if @total_disk_quota.nil?
230
- invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
231
- end
232
-
233
- if @total_gpu_quota.nil?
234
- invalid_properties.push('invalid value for "total_gpu_quota", total_gpu_quota cannot be nil.')
235
- end
236
-
237
- invalid_properties
238
- end
239
-
240
- # Check to see if the all the properties in the model are valid
241
- # @return true if the model is valid
242
- def valid?
243
- warn '[DEPRECATED] the `valid?` method is obsolete'
244
- return false if @sandbox_class.nil?
245
- return false if @total_cpu_quota.nil?
246
- return false if @total_memory_quota.nil?
247
- return false if @total_disk_quota.nil?
248
- return false if @total_gpu_quota.nil?
249
- true
250
- end
251
-
252
- # Custom attribute writer method with validation
253
- # @param [Object] sandbox_class Value to be assigned
254
- def sandbox_class=(sandbox_class)
255
- if sandbox_class.nil?
256
- fail ArgumentError, 'sandbox_class cannot be nil'
257
- end
258
-
259
- @sandbox_class = sandbox_class
260
- end
261
-
262
- # Custom attribute writer method with validation
263
- # @param [Object] total_cpu_quota Value to be assigned
264
- def total_cpu_quota=(total_cpu_quota)
265
- if total_cpu_quota.nil?
266
- fail ArgumentError, 'total_cpu_quota cannot be nil'
267
- end
268
-
269
- @total_cpu_quota = total_cpu_quota
270
- end
271
-
272
- # Custom attribute writer method with validation
273
- # @param [Object] total_memory_quota Value to be assigned
274
- def total_memory_quota=(total_memory_quota)
275
- if total_memory_quota.nil?
276
- fail ArgumentError, 'total_memory_quota cannot be nil'
277
- end
278
-
279
- @total_memory_quota = total_memory_quota
280
- end
281
-
282
- # Custom attribute writer method with validation
283
- # @param [Object] total_disk_quota Value to be assigned
284
- def total_disk_quota=(total_disk_quota)
285
- if total_disk_quota.nil?
286
- fail ArgumentError, 'total_disk_quota cannot be nil'
287
- end
288
-
289
- @total_disk_quota = total_disk_quota
290
- end
291
-
292
- # Custom attribute writer method with validation
293
- # @param [Object] total_gpu_quota Value to be assigned
294
- def total_gpu_quota=(total_gpu_quota)
295
- if total_gpu_quota.nil?
296
- fail ArgumentError, 'total_gpu_quota cannot be nil'
297
- end
298
-
299
- @total_gpu_quota = total_gpu_quota
300
- end
301
-
302
- # Checks equality by comparing each attribute.
303
- # @param [Object] Object to be compared
304
- def ==(o)
305
- return true if self.equal?(o)
306
- self.class == o.class &&
307
- sandbox_class == o.sandbox_class &&
308
- total_cpu_quota == o.total_cpu_quota &&
309
- total_memory_quota == o.total_memory_quota &&
310
- total_disk_quota == o.total_disk_quota &&
311
- total_gpu_quota == o.total_gpu_quota &&
312
- allowed_gpu_types == o.allowed_gpu_types &&
313
- max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
314
- max_memory_per_sandbox == o.max_memory_per_sandbox &&
315
- max_disk_per_sandbox == o.max_disk_per_sandbox &&
316
- max_disk_per_non_ephemeral_sandbox == o.max_disk_per_non_ephemeral_sandbox &&
317
- max_cpu_per_gpu == o.max_cpu_per_gpu &&
318
- max_memory_per_gpu == o.max_memory_per_gpu &&
319
- max_disk_per_gpu == o.max_disk_per_gpu
320
- end
321
-
322
- # @see the `==` method
323
- # @param [Object] Object to be compared
324
- def eql?(o)
325
- self == o
326
- end
327
-
328
- # Calculates hash code according to all attributes.
329
- # @return [Integer] Hash code
330
- def hash
331
- [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, max_memory_per_gpu, max_disk_per_gpu].hash
332
- end
333
-
334
- # Builds the object from hash
335
- # @param [Hash] attributes Model attributes in the form of hash
336
- # @return [Object] Returns the model itself
337
- def self.build_from_hash(attributes)
338
- return nil unless attributes.is_a?(Hash)
339
- attributes = attributes.transform_keys(&:to_sym)
340
- transformed_hash = {}
341
- openapi_types.each_pair do |key, type|
342
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
343
- transformed_hash["#{key}"] = nil
344
- elsif type =~ /\AArray<(.*)>/i
345
- # check to ensure the input is an array given that the attribute
346
- # is documented as an array but the input is not
347
- if attributes[attribute_map[key]].is_a?(Array)
348
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
349
- end
350
- elsif !attributes[attribute_map[key]].nil?
351
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
352
- end
353
- end
354
- new(transformed_hash)
355
- end
356
-
357
- # Returns the object in the form of hash
358
- # @return [Hash] Returns the object in the form of hash
359
- def to_hash
360
- hash = {}
361
- self.class.attribute_map.each_pair do |attr, param|
362
- value = self.send(attr)
363
- if value.nil?
364
- is_nullable = self.class.openapi_nullable.include?(attr)
365
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
366
- end
367
-
368
- hash[param] = _to_hash(value)
369
- end
370
- hash
371
- end
372
-
373
- end
374
-
375
- end
@@ -1,178 +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 DateFilter < ApiModelBase
18
- # Match values greater than or equal to this timestamp (ISO 8601).
19
- attr_accessor :gte
20
-
21
- # Match values less than or equal to this timestamp (ISO 8601).
22
- attr_accessor :lte
23
-
24
- # Match values strictly greater than this timestamp (ISO 8601).
25
- attr_accessor :gt
26
-
27
- # Match values strictly less than this timestamp (ISO 8601).
28
- attr_accessor :lt
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'gte' => :'gte',
34
- :'lte' => :'lte',
35
- :'gt' => :'gt',
36
- :'lt' => :'lt'
37
- }
38
- end
39
-
40
- # Returns attribute mapping this model knows about
41
- def self.acceptable_attribute_map
42
- attribute_map
43
- end
44
-
45
- # Returns all the JSON keys this model knows about
46
- def self.acceptable_attributes
47
- acceptable_attribute_map.values
48
- end
49
-
50
- # Attribute type mapping.
51
- def self.openapi_types
52
- {
53
- :'gte' => :'Time',
54
- :'lte' => :'Time',
55
- :'gt' => :'Time',
56
- :'lt' => :'Time'
57
- }
58
- end
59
-
60
- # List of attributes with nullable: true
61
- def self.openapi_nullable
62
- Set.new([
63
- ])
64
- end
65
-
66
- # Initializes the object
67
- # @param [Hash] attributes Model attributes in the form of hash
68
- def initialize(attributes = {})
69
- if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::DateFilter` initialize method"
71
- end
72
-
73
- # check to see if the attribute exists and convert string to symbol for hash key
74
- acceptable_attribute_map = self.class.acceptable_attribute_map
75
- attributes = attributes.each_with_object({}) { |(k, v), h|
76
- if (!acceptable_attribute_map.key?(k.to_sym))
77
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::DateFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
- end
79
- h[k.to_sym] = v
80
- }
81
-
82
- if attributes.key?(:'gte')
83
- self.gte = attributes[:'gte']
84
- end
85
-
86
- if attributes.key?(:'lte')
87
- self.lte = attributes[:'lte']
88
- end
89
-
90
- if attributes.key?(:'gt')
91
- self.gt = attributes[:'gt']
92
- end
93
-
94
- if attributes.key?(:'lt')
95
- self.lt = attributes[:'lt']
96
- end
97
- end
98
-
99
- # Show invalid properties with the reasons. Usually used together with valid?
100
- # @return Array for valid properties with the reasons
101
- def list_invalid_properties
102
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
- invalid_properties = Array.new
104
- invalid_properties
105
- end
106
-
107
- # Check to see if the all the properties in the model are valid
108
- # @return true if the model is valid
109
- def valid?
110
- warn '[DEPRECATED] the `valid?` method is obsolete'
111
- true
112
- end
113
-
114
- # Checks equality by comparing each attribute.
115
- # @param [Object] Object to be compared
116
- def ==(o)
117
- return true if self.equal?(o)
118
- self.class == o.class &&
119
- gte == o.gte &&
120
- lte == o.lte &&
121
- gt == o.gt &&
122
- lt == o.lt
123
- end
124
-
125
- # @see the `==` method
126
- # @param [Object] Object to be compared
127
- def eql?(o)
128
- self == o
129
- end
130
-
131
- # Calculates hash code according to all attributes.
132
- # @return [Integer] Hash code
133
- def hash
134
- [gte, lte, gt, lt].hash
135
- end
136
-
137
- # Builds the object from hash
138
- # @param [Hash] attributes Model attributes in the form of hash
139
- # @return [Object] Returns the model itself
140
- def self.build_from_hash(attributes)
141
- return nil unless attributes.is_a?(Hash)
142
- attributes = attributes.transform_keys(&:to_sym)
143
- transformed_hash = {}
144
- openapi_types.each_pair do |key, type|
145
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
146
- transformed_hash["#{key}"] = nil
147
- elsif type =~ /\AArray<(.*)>/i
148
- # check to ensure the input is an array given that the attribute
149
- # is documented as an array but the input is not
150
- if attributes[attribute_map[key]].is_a?(Array)
151
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
- end
153
- elsif !attributes[attribute_map[key]].nil?
154
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
- end
156
- end
157
- new(transformed_hash)
158
- end
159
-
160
- # Returns the object in the form of hash
161
- # @return [Hash] Returns the object in the form of hash
162
- def to_hash
163
- hash = {}
164
- self.class.attribute_map.each_pair do |attr, param|
165
- value = self.send(attr)
166
- if value.nil?
167
- is_nullable = self.class.openapi_nullable.include?(attr)
168
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
169
- end
170
-
171
- hash[param] = _to_hash(value)
172
- end
173
- hash
174
- end
175
-
176
- end
177
-
178
- end