daytona_api_client 0.134.0.alpha.1 → 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 (77) 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/audit_api.rb +66 -18
  6. data/lib/daytona_api_client/api/docker_registry_api.rb +0 -3
  7. data/lib/daytona_api_client/api/organizations_api.rb +29 -754
  8. data/lib/daytona_api_client/api/preview_api.rb +5 -74
  9. data/lib/daytona_api_client/api/runners_api.rb +20 -343
  10. data/lib/daytona_api_client/api/sandbox_api.rb +194 -558
  11. data/lib/daytona_api_client/api/snapshots_api.rb +0 -66
  12. data/lib/daytona_api_client/api/toolbox_api.rb +711 -711
  13. data/lib/daytona_api_client/api/workspace_api.rb +3 -3
  14. data/lib/daytona_api_client/models/build_info.rb +4 -31
  15. data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -166
  16. data/lib/daytona_api_client/models/create_organization.rb +4 -31
  17. data/lib/daytona_api_client/models/create_runner.rb +315 -31
  18. data/lib/daytona_api_client/models/create_sandbox.rb +1 -11
  19. data/lib/daytona_api_client/models/create_snapshot.rb +4 -14
  20. data/lib/daytona_api_client/models/create_user.rb +1 -10
  21. data/lib/daytona_api_client/models/daytona_configuration.rb +4 -41
  22. data/lib/daytona_api_client/models/organization.rb +85 -53
  23. data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -18
  24. data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -14
  25. data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -4
  26. data/lib/daytona_api_client/models/port_preview_url.rb +14 -31
  27. data/lib/daytona_api_client/models/region.rb +4 -178
  28. data/lib/daytona_api_client/models/runner.rb +117 -79
  29. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -0
  30. data/lib/daytona_api_client/models/sandbox.rb +14 -51
  31. data/lib/daytona_api_client/models/sandbox_volume.rb +4 -14
  32. data/lib/daytona_api_client/models/snapshot_dto.rb +4 -36
  33. data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
  34. data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -31
  35. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -4
  36. data/lib/daytona_api_client/models/update_organization_quota.rb +41 -41
  37. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +4 -24
  38. data/lib/daytona_api_client/models/workspace.rb +35 -45
  39. data/lib/daytona_api_client/version.rb +1 -1
  40. data/lib/daytona_api_client.rb +1 -30
  41. data/project.json +6 -34
  42. metadata +5 -38
  43. data/.gitignore +0 -39
  44. data/.openapi-generator/FILES +0 -194
  45. data/.openapi-generator/VERSION +0 -1
  46. data/.openapi-generator-ignore +0 -31
  47. data/.rspec +0 -2
  48. data/.rubocop.yml +0 -148
  49. data/fix-gemspec.sh +0 -11
  50. data/lib/daytona_api_client/api/admin_api.rb +0 -325
  51. data/lib/daytona_api_client/api/jobs_api.rb +0 -299
  52. data/lib/daytona_api_client/api/regions_api.rb +0 -77
  53. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -385
  54. data/lib/daytona_api_client/models/create_region.rb +0 -269
  55. data/lib/daytona_api_client/models/create_region_response.rb +0 -280
  56. data/lib/daytona_api_client/models/create_runner_response.rb +0 -263
  57. data/lib/daytona_api_client/models/job_status.rb +0 -42
  58. data/lib/daytona_api_client/models/job_type.rb +0 -49
  59. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -238
  60. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -249
  61. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -229
  62. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -236
  63. data/lib/daytona_api_client/models/region_quota.rb +0 -339
  64. data/lib/daytona_api_client/models/region_type.rb +0 -41
  65. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -391
  66. data/lib/daytona_api_client/models/runner_full.rb +0 -779
  67. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -533
  68. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -276
  69. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -317
  70. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -263
  71. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -236
  72. data/lib/daytona_api_client/models/update_job_status.rb +0 -278
  73. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -236
  74. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -245
  75. data/lib/daytona_api_client/models/update_region.rb +0 -242
  76. data/lib/daytona_api_client/models/url.rb +0 -236
  77. data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -263
@@ -1,236 +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
- end
236
- end
@@ -1,339 +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 RegionQuota
18
- attr_accessor :organization_id
19
-
20
- attr_accessor :region_id
21
-
22
- attr_accessor :total_cpu_quota
23
-
24
- attr_accessor :total_memory_quota
25
-
26
- attr_accessor :total_disk_quota
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'organization_id' => :'organizationId',
32
- :'region_id' => :'regionId',
33
- :'total_cpu_quota' => :'totalCpuQuota',
34
- :'total_memory_quota' => :'totalMemoryQuota',
35
- :'total_disk_quota' => :'totalDiskQuota'
36
- }
37
- end
38
-
39
- # Returns attribute mapping this model knows about
40
- def self.acceptable_attribute_map
41
- attribute_map
42
- end
43
-
44
- # Returns all the JSON keys this model knows about
45
- def self.acceptable_attributes
46
- acceptable_attribute_map.values
47
- end
48
-
49
- # Attribute type mapping.
50
- def self.openapi_types
51
- {
52
- :'organization_id' => :'String',
53
- :'region_id' => :'String',
54
- :'total_cpu_quota' => :'Float',
55
- :'total_memory_quota' => :'Float',
56
- :'total_disk_quota' => :'Float'
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::RegionQuota` 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::RegionQuota`. 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?(:'organization_id')
83
- self.organization_id = attributes[:'organization_id']
84
- else
85
- self.organization_id = nil
86
- end
87
-
88
- if attributes.key?(:'region_id')
89
- self.region_id = attributes[:'region_id']
90
- else
91
- self.region_id = nil
92
- end
93
-
94
- if attributes.key?(:'total_cpu_quota')
95
- self.total_cpu_quota = attributes[:'total_cpu_quota']
96
- else
97
- self.total_cpu_quota = nil
98
- end
99
-
100
- if attributes.key?(:'total_memory_quota')
101
- self.total_memory_quota = attributes[:'total_memory_quota']
102
- else
103
- self.total_memory_quota = nil
104
- end
105
-
106
- if attributes.key?(:'total_disk_quota')
107
- self.total_disk_quota = attributes[:'total_disk_quota']
108
- else
109
- self.total_disk_quota = nil
110
- end
111
- end
112
-
113
- # Show invalid properties with the reasons. Usually used together with valid?
114
- # @return Array for valid properties with the reasons
115
- def list_invalid_properties
116
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
- invalid_properties = Array.new
118
- if @organization_id.nil?
119
- invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
120
- end
121
-
122
- if @region_id.nil?
123
- invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
124
- end
125
-
126
- if @total_cpu_quota.nil?
127
- invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
128
- end
129
-
130
- if @total_memory_quota.nil?
131
- invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
132
- end
133
-
134
- if @total_disk_quota.nil?
135
- invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
136
- end
137
-
138
- invalid_properties
139
- end
140
-
141
- # Check to see if the all the properties in the model are valid
142
- # @return true if the model is valid
143
- def valid?
144
- warn '[DEPRECATED] the `valid?` method is obsolete'
145
- return false if @organization_id.nil?
146
- return false if @region_id.nil?
147
- return false if @total_cpu_quota.nil?
148
- return false if @total_memory_quota.nil?
149
- return false if @total_disk_quota.nil?
150
- true
151
- end
152
-
153
- # Custom attribute writer method with validation
154
- # @param [Object] organization_id Value to be assigned
155
- def organization_id=(organization_id)
156
- if organization_id.nil?
157
- fail ArgumentError, 'organization_id cannot be nil'
158
- end
159
-
160
- @organization_id = organization_id
161
- end
162
-
163
- # Custom attribute writer method with validation
164
- # @param [Object] region_id Value to be assigned
165
- def region_id=(region_id)
166
- if region_id.nil?
167
- fail ArgumentError, 'region_id cannot be nil'
168
- end
169
-
170
- @region_id = region_id
171
- end
172
-
173
- # Custom attribute writer method with validation
174
- # @param [Object] total_cpu_quota Value to be assigned
175
- def total_cpu_quota=(total_cpu_quota)
176
- if total_cpu_quota.nil?
177
- fail ArgumentError, 'total_cpu_quota cannot be nil'
178
- end
179
-
180
- @total_cpu_quota = total_cpu_quota
181
- end
182
-
183
- # Custom attribute writer method with validation
184
- # @param [Object] total_memory_quota Value to be assigned
185
- def total_memory_quota=(total_memory_quota)
186
- if total_memory_quota.nil?
187
- fail ArgumentError, 'total_memory_quota cannot be nil'
188
- end
189
-
190
- @total_memory_quota = total_memory_quota
191
- end
192
-
193
- # Custom attribute writer method with validation
194
- # @param [Object] total_disk_quota Value to be assigned
195
- def total_disk_quota=(total_disk_quota)
196
- if total_disk_quota.nil?
197
- fail ArgumentError, 'total_disk_quota cannot be nil'
198
- end
199
-
200
- @total_disk_quota = total_disk_quota
201
- end
202
-
203
- # Checks equality by comparing each attribute.
204
- # @param [Object] Object to be compared
205
- def ==(o)
206
- return true if self.equal?(o)
207
- self.class == o.class &&
208
- organization_id == o.organization_id &&
209
- region_id == o.region_id &&
210
- total_cpu_quota == o.total_cpu_quota &&
211
- total_memory_quota == o.total_memory_quota &&
212
- total_disk_quota == o.total_disk_quota
213
- end
214
-
215
- # @see the `==` method
216
- # @param [Object] Object to be compared
217
- def eql?(o)
218
- self == o
219
- end
220
-
221
- # Calculates hash code according to all attributes.
222
- # @return [Integer] Hash code
223
- def hash
224
- [organization_id, region_id, total_cpu_quota, total_memory_quota, total_disk_quota].hash
225
- end
226
-
227
- # Builds the object from hash
228
- # @param [Hash] attributes Model attributes in the form of hash
229
- # @return [Object] Returns the model itself
230
- def self.build_from_hash(attributes)
231
- return nil unless attributes.is_a?(Hash)
232
- attributes = attributes.transform_keys(&:to_sym)
233
- transformed_hash = {}
234
- openapi_types.each_pair do |key, type|
235
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
236
- transformed_hash["#{key}"] = nil
237
- elsif type =~ /\AArray<(.*)>/i
238
- # check to ensure the input is an array given that the attribute
239
- # is documented as an array but the input is not
240
- if attributes[attribute_map[key]].is_a?(Array)
241
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
242
- end
243
- elsif !attributes[attribute_map[key]].nil?
244
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
245
- end
246
- end
247
- new(transformed_hash)
248
- end
249
-
250
- # Deserializes the data based on type
251
- # @param string type Data type
252
- # @param string value Value to be deserialized
253
- # @return [Object] Deserialized data
254
- def self._deserialize(type, value)
255
- case type.to_sym
256
- when :Time
257
- Time.parse(value)
258
- when :Date
259
- Date.parse(value)
260
- when :String
261
- value.to_s
262
- when :Integer
263
- value.to_i
264
- when :Float
265
- value.to_f
266
- when :Boolean
267
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
268
- true
269
- else
270
- false
271
- end
272
- when :Object
273
- # generic object (usually a Hash), return directly
274
- value
275
- when /\AArray<(?<inner_type>.+)>\z/
276
- inner_type = Regexp.last_match[:inner_type]
277
- value.map { |v| _deserialize(inner_type, v) }
278
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
279
- k_type = Regexp.last_match[:k_type]
280
- v_type = Regexp.last_match[:v_type]
281
- {}.tap do |hash|
282
- value.each do |k, v|
283
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
284
- end
285
- end
286
- else # model
287
- # models (e.g. Pet) or oneOf
288
- klass = DaytonaApiClient.const_get(type)
289
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
290
- end
291
- end
292
-
293
- # Returns the string representation of the object
294
- # @return [String] String presentation of the object
295
- def to_s
296
- to_hash.to_s
297
- end
298
-
299
- # to_body is an alias to to_hash (backward compatibility)
300
- # @return [Hash] Returns the object in the form of hash
301
- def to_body
302
- to_hash
303
- end
304
-
305
- # Returns the object in the form of hash
306
- # @return [Hash] Returns the object in the form of hash
307
- def to_hash
308
- hash = {}
309
- self.class.attribute_map.each_pair do |attr, param|
310
- value = self.send(attr)
311
- if value.nil?
312
- is_nullable = self.class.openapi_nullable.include?(attr)
313
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
314
- end
315
-
316
- hash[param] = _to_hash(value)
317
- end
318
- hash
319
- end
320
-
321
- # Outputs non-array value in the form of hash
322
- # For object, use to_hash. Otherwise, just return the value
323
- # @param [Object] value Any valid value
324
- # @return [Hash] Returns the value in the form of hash
325
- def _to_hash(value)
326
- if value.is_a?(Array)
327
- value.compact.map { |v| _to_hash(v) }
328
- elsif value.is_a?(Hash)
329
- {}.tap do |hash|
330
- value.each { |k, v| hash[k] = _to_hash(v) }
331
- end
332
- elsif value.respond_to? :to_hash
333
- value.to_hash
334
- else
335
- value
336
- end
337
- end
338
- end
339
- end
@@ -1,41 +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 RegionType
18
- SHARED = "shared".freeze
19
- DEDICATED = "dedicated".freeze
20
- CUSTOM = "custom".freeze
21
-
22
- def self.all_vars
23
- @all_vars ||= [SHARED, DEDICATED, CUSTOM].freeze
24
- end
25
-
26
- # Builds the enum from string
27
- # @param [String] The enum value in the form of the string
28
- # @return [String] The enum value
29
- def self.build_from_hash(value)
30
- new.build_from_hash(value)
31
- end
32
-
33
- # Builds the enum from string
34
- # @param [String] The enum value in the form of the string
35
- # @return [String] The enum value
36
- def build_from_hash(value)
37
- return value if RegionType.all_vars.include?(value)
38
- raise "Invalid ENUM value #{value} for class #RegionType"
39
- end
40
- end
41
- end