daytona_api_client 0.164.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 (207) 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 +1 -1
  6. data/lib/daytona_api_client/api/audit_api.rb +139 -9
  7. data/lib/daytona_api_client/api/docker_registry_api.rb +66 -5
  8. data/lib/daytona_api_client/api/health_api.rb +2 -53
  9. data/lib/daytona_api_client/api/organizations_api.rb +84 -814
  10. data/lib/daytona_api_client/api/preview_api.rb +7 -76
  11. data/lib/daytona_api_client/api/runners_api.rb +21 -408
  12. data/lib/daytona_api_client/api/sandbox_api.rb +200 -1103
  13. data/lib/daytona_api_client/api/snapshots_api.rb +110 -36
  14. data/lib/daytona_api_client/api/toolbox_api.rb +740 -740
  15. data/lib/daytona_api_client/api/users_api.rb +238 -1
  16. data/lib/daytona_api_client/api/volumes_api.rb +1 -1
  17. data/lib/daytona_api_client/api/webhooks_api.rb +267 -4
  18. data/lib/daytona_api_client/api/workspace_api.rb +5 -5
  19. data/lib/daytona_api_client/api_client.rb +1 -1
  20. data/lib/daytona_api_client/configuration.rb +1 -4
  21. data/lib/daytona_api_client/models/account_provider.rb +0 -2
  22. data/lib/daytona_api_client/models/announcement.rb +0 -2
  23. data/lib/daytona_api_client/models/api_key_list.rb +0 -2
  24. data/lib/daytona_api_client/models/api_key_response.rb +0 -2
  25. data/lib/daytona_api_client/models/audit_log.rb +1 -21
  26. data/lib/daytona_api_client/models/build_info.rb +4 -33
  27. data/lib/daytona_api_client/models/command.rb +0 -2
  28. data/lib/daytona_api_client/models/completion_context.rb +0 -2
  29. data/lib/daytona_api_client/models/completion_item.rb +0 -2
  30. data/lib/daytona_api_client/models/completion_list.rb +0 -2
  31. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +0 -2
  32. data/lib/daytona_api_client/models/computer_use_start_response.rb +0 -2
  33. data/lib/daytona_api_client/models/computer_use_status_response.rb +0 -2
  34. data/lib/daytona_api_client/models/computer_use_stop_response.rb +0 -2
  35. data/lib/daytona_api_client/models/create_api_key.rb +1 -3
  36. data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -168
  37. data/lib/daytona_api_client/models/create_build_info.rb +0 -2
  38. data/lib/daytona_api_client/models/create_docker_registry.rb +65 -6
  39. data/lib/daytona_api_client/models/create_linked_account.rb +0 -2
  40. data/lib/daytona_api_client/models/create_organization.rb +4 -33
  41. data/lib/daytona_api_client/models/create_organization_invitation.rb +0 -2
  42. data/lib/daytona_api_client/models/create_organization_quota.rb +0 -2
  43. data/lib/daytona_api_client/models/create_organization_role.rb +0 -2
  44. data/lib/daytona_api_client/models/create_runner.rb +315 -33
  45. data/lib/daytona_api_client/models/create_sandbox.rb +1 -13
  46. data/lib/daytona_api_client/models/create_session_request.rb +0 -2
  47. data/lib/daytona_api_client/models/create_snapshot.rb +14 -16
  48. data/lib/daytona_api_client/models/create_user.rb +1 -12
  49. data/lib/daytona_api_client/models/create_volume.rb +0 -2
  50. data/lib/daytona_api_client/models/create_workspace.rb +0 -2
  51. data/lib/daytona_api_client/models/daytona_configuration.rb +4 -53
  52. data/lib/daytona_api_client/models/display_info_response.rb +0 -2
  53. data/lib/daytona_api_client/models/docker_registry.rb +0 -2
  54. data/lib/daytona_api_client/models/download_files.rb +0 -2
  55. data/lib/daytona_api_client/models/execute_request.rb +0 -2
  56. data/lib/daytona_api_client/models/execute_response.rb +0 -2
  57. data/lib/daytona_api_client/models/file_info.rb +0 -2
  58. data/lib/daytona_api_client/models/file_status.rb +0 -2
  59. data/lib/daytona_api_client/models/git_add_request.rb +0 -2
  60. data/lib/daytona_api_client/models/git_branch_request.rb +0 -2
  61. data/lib/daytona_api_client/models/git_checkout_request.rb +0 -2
  62. data/lib/daytona_api_client/models/git_clone_request.rb +0 -2
  63. data/lib/daytona_api_client/models/git_commit_info.rb +0 -2
  64. data/lib/daytona_api_client/models/git_commit_request.rb +0 -2
  65. data/lib/daytona_api_client/models/git_commit_response.rb +0 -2
  66. data/lib/daytona_api_client/models/git_delete_branch_request.rb +0 -2
  67. data/lib/daytona_api_client/models/git_repo_request.rb +0 -2
  68. data/lib/daytona_api_client/models/git_status.rb +0 -2
  69. data/lib/daytona_api_client/models/health_controller_check200_response.rb +0 -2
  70. data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +0 -2
  71. data/lib/daytona_api_client/models/health_controller_check503_response.rb +0 -2
  72. data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +0 -2
  73. data/lib/daytona_api_client/models/keyboard_press_request.rb +0 -2
  74. data/lib/daytona_api_client/models/keyboard_type_request.rb +0 -2
  75. data/lib/daytona_api_client/models/list_branch_response.rb +0 -2
  76. data/lib/daytona_api_client/models/lsp_completion_params.rb +0 -2
  77. data/lib/daytona_api_client/models/lsp_document_request.rb +0 -2
  78. data/lib/daytona_api_client/models/lsp_location.rb +0 -2
  79. data/lib/daytona_api_client/models/lsp_server_request.rb +0 -2
  80. data/lib/daytona_api_client/models/lsp_symbol.rb +0 -2
  81. data/lib/daytona_api_client/models/match.rb +0 -2
  82. data/lib/daytona_api_client/models/mouse_click_request.rb +0 -2
  83. data/lib/daytona_api_client/models/mouse_click_response.rb +0 -2
  84. data/lib/daytona_api_client/models/mouse_drag_request.rb +0 -2
  85. data/lib/daytona_api_client/models/mouse_drag_response.rb +0 -2
  86. data/lib/daytona_api_client/models/mouse_move_request.rb +0 -2
  87. data/lib/daytona_api_client/models/mouse_move_response.rb +0 -2
  88. data/lib/daytona_api_client/models/mouse_position.rb +0 -2
  89. data/lib/daytona_api_client/models/mouse_scroll_request.rb +0 -2
  90. data/lib/daytona_api_client/models/mouse_scroll_response.rb +0 -2
  91. data/lib/daytona_api_client/models/oidc_config.rb +0 -2
  92. data/lib/daytona_api_client/models/organization.rb +85 -148
  93. data/lib/daytona_api_client/models/organization_invitation.rb +0 -2
  94. data/lib/daytona_api_client/models/organization_role.rb +0 -2
  95. data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +0 -2
  96. data/lib/daytona_api_client/models/organization_suspension.rb +5 -9
  97. data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -20
  98. data/lib/daytona_api_client/models/organization_user.rb +0 -2
  99. data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -16
  100. data/lib/daytona_api_client/models/paginated_sandboxes.rb +0 -2
  101. data/lib/daytona_api_client/models/paginated_snapshots.rb +0 -2
  102. data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -6
  103. data/lib/daytona_api_client/models/port_preview_url.rb +14 -33
  104. data/lib/daytona_api_client/models/position.rb +0 -2
  105. data/lib/daytona_api_client/models/posthog_config.rb +0 -2
  106. data/lib/daytona_api_client/models/process_errors_response.rb +0 -2
  107. data/lib/daytona_api_client/models/process_logs_response.rb +0 -2
  108. data/lib/daytona_api_client/models/process_restart_response.rb +0 -2
  109. data/lib/daytona_api_client/models/process_status_response.rb +0 -2
  110. data/lib/daytona_api_client/models/project_dir_response.rb +0 -2
  111. data/lib/daytona_api_client/models/pty_create_request.rb +0 -2
  112. data/lib/daytona_api_client/models/pty_create_response.rb +0 -2
  113. data/lib/daytona_api_client/models/pty_list_response.rb +0 -2
  114. data/lib/daytona_api_client/models/pty_resize_request.rb +0 -2
  115. data/lib/daytona_api_client/models/pty_session_info.rb +0 -2
  116. data/lib/daytona_api_client/models/range.rb +0 -2
  117. data/lib/daytona_api_client/models/region.rb +4 -180
  118. data/lib/daytona_api_client/models/region_screenshot_response.rb +0 -2
  119. data/lib/daytona_api_client/models/registry_push_access_dto.rb +0 -2
  120. data/lib/daytona_api_client/models/replace_request.rb +0 -2
  121. data/lib/daytona_api_client/models/replace_result.rb +0 -2
  122. data/lib/daytona_api_client/models/runner.rb +117 -81
  123. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -2
  124. data/lib/daytona_api_client/models/sandbox.rb +14 -80
  125. data/lib/daytona_api_client/models/sandbox_info.rb +0 -2
  126. data/lib/daytona_api_client/models/sandbox_labels.rb +0 -2
  127. data/lib/daytona_api_client/models/sandbox_state.rb +1 -2
  128. data/lib/daytona_api_client/models/sandbox_volume.rb +4 -16
  129. data/lib/daytona_api_client/models/screenshot_response.rb +0 -2
  130. data/lib/daytona_api_client/models/search_files_response.rb +0 -2
  131. data/lib/daytona_api_client/models/send_webhook_dto.rb +1 -25
  132. data/lib/daytona_api_client/models/session.rb +0 -2
  133. data/lib/daytona_api_client/models/session_execute_request.rb +0 -2
  134. data/lib/daytona_api_client/models/session_execute_response.rb +0 -2
  135. data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +0 -2
  136. data/lib/daytona_api_client/models/snapshot_dto.rb +4 -38
  137. data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
  138. data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -33
  139. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -6
  140. data/lib/daytona_api_client/models/storage_access_dto.rb +0 -2
  141. data/lib/daytona_api_client/models/update_docker_registry.rb +0 -2
  142. data/lib/daytona_api_client/models/update_organization_invitation.rb +0 -2
  143. data/lib/daytona_api_client/models/update_organization_member_access.rb +0 -2
  144. data/lib/daytona_api_client/models/update_organization_quota.rb +41 -92
  145. data/lib/daytona_api_client/models/update_organization_role.rb +0 -2
  146. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +6 -28
  147. data/lib/daytona_api_client/models/user.rb +0 -2
  148. data/lib/daytona_api_client/models/user_home_dir_response.rb +0 -2
  149. data/lib/daytona_api_client/models/user_public_key.rb +0 -2
  150. data/lib/daytona_api_client/models/volume_dto.rb +0 -2
  151. data/lib/daytona_api_client/models/webhook_app_portal_access.rb +1 -30
  152. data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +3 -5
  153. data/lib/daytona_api_client/models/webhook_initialization_status.rb +0 -2
  154. data/lib/daytona_api_client/models/windows_response.rb +0 -2
  155. data/lib/daytona_api_client/models/work_dir_response.rb +0 -2
  156. data/lib/daytona_api_client/models/workspace.rb +27 -66
  157. data/lib/daytona_api_client/version.rb +1 -1
  158. data/lib/daytona_api_client.rb +2 -43
  159. data/project.json +11 -38
  160. metadata +6 -51
  161. data/.gitignore +0 -39
  162. data/.openapi-generator/FILES +0 -206
  163. data/.openapi-generator/VERSION +0 -1
  164. data/.openapi-generator-ignore +0 -31
  165. data/.rspec +0 -2
  166. data/.rubocop.yml +0 -148
  167. data/fix-gemspec.sh +0 -11
  168. data/lib/daytona_api_client/api/admin_api.rb +0 -1151
  169. data/lib/daytona_api_client/api/jobs_api.rb +0 -299
  170. data/lib/daytona_api_client/api/regions_api.rb +0 -77
  171. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -387
  172. data/lib/daytona_api_client/models/create_region.rb +0 -271
  173. data/lib/daytona_api_client/models/create_region_response.rb +0 -282
  174. data/lib/daytona_api_client/models/create_runner_response.rb +0 -265
  175. data/lib/daytona_api_client/models/job_status.rb +0 -42
  176. data/lib/daytona_api_client/models/job_type.rb +0 -50
  177. data/lib/daytona_api_client/models/log_entry.rb +0 -407
  178. data/lib/daytona_api_client/models/metric_data_point.rb +0 -265
  179. data/lib/daytona_api_client/models/metric_series.rb +0 -267
  180. data/lib/daytona_api_client/models/metrics_response.rb +0 -240
  181. data/lib/daytona_api_client/models/otel_config.rb +0 -251
  182. data/lib/daytona_api_client/models/paginated_logs.rb +0 -321
  183. data/lib/daytona_api_client/models/paginated_traces.rb +0 -321
  184. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -240
  185. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -251
  186. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -231
  187. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -238
  188. data/lib/daytona_api_client/models/region_quota.rb +0 -341
  189. data/lib/daytona_api_client/models/region_type.rb +0 -41
  190. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -393
  191. data/lib/daytona_api_client/models/resize_sandbox.rb +0 -298
  192. data/lib/daytona_api_client/models/runner_full.rb +0 -781
  193. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -535
  194. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -290
  195. data/lib/daytona_api_client/models/runner_service_health.rb +0 -275
  196. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -319
  197. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -265
  198. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -238
  199. data/lib/daytona_api_client/models/trace_span.rb +0 -405
  200. data/lib/daytona_api_client/models/trace_summary.rb +0 -383
  201. data/lib/daytona_api_client/models/update_job_status.rb +0 -280
  202. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -238
  203. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -247
  204. data/lib/daytona_api_client/models/update_region.rb +0 -244
  205. data/lib/daytona_api_client/models/url.rb +0 -238
  206. data/lib/daytona_api_client/models/webhook_event.rb +0 -45
  207. data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -265
@@ -1,251 +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.12.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class RateLimitConfig
18
- # Failed authentication rate limit
19
- attr_accessor :failed_auth
20
-
21
- # Authenticated rate limit
22
- attr_accessor :authenticated
23
-
24
- # Sandbox create rate limit
25
- attr_accessor :sandbox_create
26
-
27
- # Sandbox lifecycle rate limit
28
- attr_accessor :sandbox_lifecycle
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'failed_auth' => :'failedAuth',
34
- :'authenticated' => :'authenticated',
35
- :'sandbox_create' => :'sandboxCreate',
36
- :'sandbox_lifecycle' => :'sandboxLifecycle'
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
- :'failed_auth' => :'RateLimitEntry',
54
- :'authenticated' => :'RateLimitEntry',
55
- :'sandbox_create' => :'RateLimitEntry',
56
- :'sandbox_lifecycle' => :'RateLimitEntry'
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::RateLimitConfig` 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::RateLimitConfig`. 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?(:'failed_auth')
83
- self.failed_auth = attributes[:'failed_auth']
84
- end
85
-
86
- if attributes.key?(:'authenticated')
87
- self.authenticated = attributes[:'authenticated']
88
- end
89
-
90
- if attributes.key?(:'sandbox_create')
91
- self.sandbox_create = attributes[:'sandbox_create']
92
- end
93
-
94
- if attributes.key?(:'sandbox_lifecycle')
95
- self.sandbox_lifecycle = attributes[:'sandbox_lifecycle']
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
- failed_auth == o.failed_auth &&
120
- authenticated == o.authenticated &&
121
- sandbox_create == o.sandbox_create &&
122
- sandbox_lifecycle == o.sandbox_lifecycle
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
- [failed_auth, authenticated, sandbox_create, sandbox_lifecycle].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
- # Deserializes the data based on type
161
- # @param string type Data type
162
- # @param string value Value to be deserialized
163
- # @return [Object] Deserialized data
164
- def self._deserialize(type, value)
165
- case type.to_sym
166
- when :Time
167
- Time.parse(value)
168
- when :Date
169
- Date.parse(value)
170
- when :String
171
- value.to_s
172
- when :Integer
173
- value.to_i
174
- when :Float
175
- value.to_f
176
- when :Boolean
177
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
- true
179
- else
180
- false
181
- end
182
- when :Object
183
- # generic object (usually a Hash), return directly
184
- value
185
- when /\AArray<(?<inner_type>.+)>\z/
186
- inner_type = Regexp.last_match[:inner_type]
187
- value.map { |v| _deserialize(inner_type, v) }
188
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
- k_type = Regexp.last_match[:k_type]
190
- v_type = Regexp.last_match[:v_type]
191
- {}.tap do |hash|
192
- value.each do |k, v|
193
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
- end
195
- end
196
- else # model
197
- # models (e.g. Pet) or oneOf
198
- klass = DaytonaApiClient.const_get(type)
199
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
200
- end
201
- end
202
-
203
- # Returns the string representation of the object
204
- # @return [String] String presentation of the object
205
- def to_s
206
- to_hash.to_s
207
- end
208
-
209
- # to_body is an alias to to_hash (backward compatibility)
210
- # @return [Hash] Returns the object in the form of hash
211
- def to_body
212
- to_hash
213
- end
214
-
215
- # Returns the object in the form of hash
216
- # @return [Hash] Returns the object in the form of hash
217
- def to_hash
218
- hash = {}
219
- self.class.attribute_map.each_pair do |attr, param|
220
- value = self.send(attr)
221
- if value.nil?
222
- is_nullable = self.class.openapi_nullable.include?(attr)
223
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
224
- end
225
-
226
- hash[param] = _to_hash(value)
227
- end
228
- hash
229
- end
230
-
231
- # Outputs non-array value in the form of hash
232
- # For object, use to_hash. Otherwise, just return the value
233
- # @param [Object] value Any valid value
234
- # @return [Hash] Returns the value in the form of hash
235
- def _to_hash(value)
236
- if value.is_a?(Array)
237
- value.compact.map { |v| _to_hash(v) }
238
- elsif value.is_a?(Hash)
239
- {}.tap do |hash|
240
- value.each { |k, v| hash[k] = _to_hash(v) }
241
- end
242
- elsif value.respond_to? :to_hash
243
- value.to_hash
244
- else
245
- value
246
- end
247
- end
248
-
249
- end
250
-
251
- end
@@ -1,231 +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.12.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class RateLimitEntry
18
- # Rate limit TTL in seconds
19
- attr_accessor :ttl
20
-
21
- # Rate limit max requests
22
- attr_accessor :limit
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'ttl' => :'ttl',
28
- :'limit' => :'limit'
29
- }
30
- end
31
-
32
- # Returns attribute mapping this model knows about
33
- def self.acceptable_attribute_map
34
- attribute_map
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- acceptable_attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'ttl' => :'Float',
46
- :'limit' => :'Float'
47
- }
48
- end
49
-
50
- # List of attributes with nullable: true
51
- def self.openapi_nullable
52
- Set.new([
53
- ])
54
- end
55
-
56
- # Initializes the object
57
- # @param [Hash] attributes Model attributes in the form of hash
58
- def initialize(attributes = {})
59
- if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RateLimitEntry` initialize method"
61
- end
62
-
63
- # check to see if the attribute exists and convert string to symbol for hash key
64
- acceptable_attribute_map = self.class.acceptable_attribute_map
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RateLimitEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'ttl')
73
- self.ttl = attributes[:'ttl']
74
- end
75
-
76
- if attributes.key?(:'limit')
77
- self.limit = attributes[:'limit']
78
- end
79
- end
80
-
81
- # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properties with the reasons
83
- def list_invalid_properties
84
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
- invalid_properties = Array.new
86
- invalid_properties
87
- end
88
-
89
- # Check to see if the all the properties in the model are valid
90
- # @return true if the model is valid
91
- def valid?
92
- warn '[DEPRECATED] the `valid?` method is obsolete'
93
- true
94
- end
95
-
96
- # Checks equality by comparing each attribute.
97
- # @param [Object] Object to be compared
98
- def ==(o)
99
- return true if self.equal?(o)
100
- self.class == o.class &&
101
- ttl == o.ttl &&
102
- limit == o.limit
103
- end
104
-
105
- # @see the `==` method
106
- # @param [Object] Object to be compared
107
- def eql?(o)
108
- self == o
109
- end
110
-
111
- # Calculates hash code according to all attributes.
112
- # @return [Integer] Hash code
113
- def hash
114
- [ttl, limit].hash
115
- end
116
-
117
- # Builds the object from hash
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- # @return [Object] Returns the model itself
120
- def self.build_from_hash(attributes)
121
- return nil unless attributes.is_a?(Hash)
122
- attributes = attributes.transform_keys(&:to_sym)
123
- transformed_hash = {}
124
- openapi_types.each_pair do |key, type|
125
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
- transformed_hash["#{key}"] = nil
127
- elsif type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the attribute
129
- # is documented as an array but the input is not
130
- if attributes[attribute_map[key]].is_a?(Array)
131
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
- end
133
- elsif !attributes[attribute_map[key]].nil?
134
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
- end
136
- end
137
- new(transformed_hash)
138
- end
139
-
140
- # Deserializes the data based on type
141
- # @param string type Data type
142
- # @param string value Value to be deserialized
143
- # @return [Object] Deserialized data
144
- def self._deserialize(type, value)
145
- case type.to_sym
146
- when :Time
147
- Time.parse(value)
148
- when :Date
149
- Date.parse(value)
150
- when :String
151
- value.to_s
152
- when :Integer
153
- value.to_i
154
- when :Float
155
- value.to_f
156
- when :Boolean
157
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
- true
159
- else
160
- false
161
- end
162
- when :Object
163
- # generic object (usually a Hash), return directly
164
- value
165
- when /\AArray<(?<inner_type>.+)>\z/
166
- inner_type = Regexp.last_match[:inner_type]
167
- value.map { |v| _deserialize(inner_type, v) }
168
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
- k_type = Regexp.last_match[:k_type]
170
- v_type = Regexp.last_match[:v_type]
171
- {}.tap do |hash|
172
- value.each do |k, v|
173
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
- end
175
- end
176
- else # model
177
- # models (e.g. Pet) or oneOf
178
- klass = DaytonaApiClient.const_get(type)
179
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
- end
181
- end
182
-
183
- # Returns the string representation of the object
184
- # @return [String] String presentation of the object
185
- def to_s
186
- to_hash.to_s
187
- end
188
-
189
- # to_body is an alias to to_hash (backward compatibility)
190
- # @return [Hash] Returns the object in the form of hash
191
- def to_body
192
- to_hash
193
- end
194
-
195
- # Returns the object in the form of hash
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_hash
198
- hash = {}
199
- self.class.attribute_map.each_pair do |attr, param|
200
- value = self.send(attr)
201
- if value.nil?
202
- is_nullable = self.class.openapi_nullable.include?(attr)
203
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
- end
205
-
206
- hash[param] = _to_hash(value)
207
- end
208
- hash
209
- end
210
-
211
- # Outputs non-array value in the form of hash
212
- # For object, use to_hash. Otherwise, just return the value
213
- # @param [Object] value Any valid value
214
- # @return [Hash] Returns the value in the form of hash
215
- def _to_hash(value)
216
- if value.is_a?(Array)
217
- value.compact.map { |v| _to_hash(v) }
218
- elsif value.is_a?(Hash)
219
- {}.tap do |hash|
220
- value.each { |k, v| hash[k] = _to_hash(v) }
221
- end
222
- elsif value.respond_to? :to_hash
223
- value.to_hash
224
- else
225
- value
226
- end
227
- end
228
-
229
- end
230
-
231
- end
@@ -1,238 +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.12.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class RegenerateApiKeyResponse
18
- # The newly generated API key
19
- attr_accessor :api_key
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'api_key' => :'apiKey'
25
- }
26
- end
27
-
28
- # Returns attribute mapping this model knows about
29
- def self.acceptable_attribute_map
30
- attribute_map
31
- end
32
-
33
- # Returns all the JSON keys this model knows about
34
- def self.acceptable_attributes
35
- acceptable_attribute_map.values
36
- end
37
-
38
- # Attribute type mapping.
39
- def self.openapi_types
40
- {
41
- :'api_key' => :'String'
42
- }
43
- end
44
-
45
- # List of attributes with nullable: true
46
- def self.openapi_nullable
47
- Set.new([
48
- ])
49
- end
50
-
51
- # Initializes the object
52
- # @param [Hash] attributes Model attributes in the form of hash
53
- def initialize(attributes = {})
54
- if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RegenerateApiKeyResponse` initialize method"
56
- end
57
-
58
- # check to see if the attribute exists and convert string to symbol for hash key
59
- acceptable_attribute_map = self.class.acceptable_attribute_map
60
- attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RegenerateApiKeyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
- end
64
- h[k.to_sym] = v
65
- }
66
-
67
- if attributes.key?(:'api_key')
68
- self.api_key = attributes[:'api_key']
69
- else
70
- self.api_key = nil
71
- end
72
- end
73
-
74
- # Show invalid properties with the reasons. Usually used together with valid?
75
- # @return Array for valid properties with the reasons
76
- def list_invalid_properties
77
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
- invalid_properties = Array.new
79
- if @api_key.nil?
80
- invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
81
- end
82
-
83
- invalid_properties
84
- end
85
-
86
- # Check to see if the all the properties in the model are valid
87
- # @return true if the model is valid
88
- def valid?
89
- warn '[DEPRECATED] the `valid?` method is obsolete'
90
- return false if @api_key.nil?
91
- true
92
- end
93
-
94
- # Custom attribute writer method with validation
95
- # @param [Object] api_key Value to be assigned
96
- def api_key=(api_key)
97
- if api_key.nil?
98
- fail ArgumentError, 'api_key cannot be nil'
99
- end
100
-
101
- @api_key = api_key
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- api_key == o.api_key
110
- end
111
-
112
- # @see the `==` method
113
- # @param [Object] Object to be compared
114
- def eql?(o)
115
- self == o
116
- end
117
-
118
- # Calculates hash code according to all attributes.
119
- # @return [Integer] Hash code
120
- def hash
121
- [api_key].hash
122
- end
123
-
124
- # Builds the object from hash
125
- # @param [Hash] attributes Model attributes in the form of hash
126
- # @return [Object] Returns the model itself
127
- def self.build_from_hash(attributes)
128
- return nil unless attributes.is_a?(Hash)
129
- attributes = attributes.transform_keys(&:to_sym)
130
- transformed_hash = {}
131
- openapi_types.each_pair do |key, type|
132
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
- transformed_hash["#{key}"] = nil
134
- elsif type =~ /\AArray<(.*)>/i
135
- # check to ensure the input is an array given that the attribute
136
- # is documented as an array but the input is not
137
- if attributes[attribute_map[key]].is_a?(Array)
138
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
- end
140
- elsif !attributes[attribute_map[key]].nil?
141
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
- end
143
- end
144
- new(transformed_hash)
145
- end
146
-
147
- # Deserializes the data based on type
148
- # @param string type Data type
149
- # @param string value Value to be deserialized
150
- # @return [Object] Deserialized data
151
- def self._deserialize(type, value)
152
- case type.to_sym
153
- when :Time
154
- Time.parse(value)
155
- when :Date
156
- Date.parse(value)
157
- when :String
158
- value.to_s
159
- when :Integer
160
- value.to_i
161
- when :Float
162
- value.to_f
163
- when :Boolean
164
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
- true
166
- else
167
- false
168
- end
169
- when :Object
170
- # generic object (usually a Hash), return directly
171
- value
172
- when /\AArray<(?<inner_type>.+)>\z/
173
- inner_type = Regexp.last_match[:inner_type]
174
- value.map { |v| _deserialize(inner_type, v) }
175
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
- k_type = Regexp.last_match[:k_type]
177
- v_type = Regexp.last_match[:v_type]
178
- {}.tap do |hash|
179
- value.each do |k, v|
180
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
- end
182
- end
183
- else # model
184
- # models (e.g. Pet) or oneOf
185
- klass = DaytonaApiClient.const_get(type)
186
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
- end
188
- end
189
-
190
- # Returns the string representation of the object
191
- # @return [String] String presentation of the object
192
- def to_s
193
- to_hash.to_s
194
- end
195
-
196
- # to_body is an alias to to_hash (backward compatibility)
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_body
199
- to_hash
200
- end
201
-
202
- # Returns the object in the form of hash
203
- # @return [Hash] Returns the object in the form of hash
204
- def to_hash
205
- hash = {}
206
- self.class.attribute_map.each_pair do |attr, param|
207
- value = self.send(attr)
208
- if value.nil?
209
- is_nullable = self.class.openapi_nullable.include?(attr)
210
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
- end
212
-
213
- hash[param] = _to_hash(value)
214
- end
215
- hash
216
- end
217
-
218
- # Outputs non-array value in the form of hash
219
- # For object, use to_hash. Otherwise, just return the value
220
- # @param [Object] value Any valid value
221
- # @return [Hash] Returns the value in the form of hash
222
- def _to_hash(value)
223
- if value.is_a?(Array)
224
- value.compact.map { |v| _to_hash(v) }
225
- elsif value.is_a?(Hash)
226
- {}.tap do |hash|
227
- value.each { |k, v| hash[k] = _to_hash(v) }
228
- end
229
- elsif value.respond_to? :to_hash
230
- value.to_hash
231
- else
232
- value
233
- end
234
- end
235
-
236
- end
237
-
238
- end