daytona_api_client 0.182.0 → 0.183.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.
@@ -0,0 +1,360 @@
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 :max_cpu_per_sandbox
29
+
30
+ attr_accessor :max_memory_per_sandbox
31
+
32
+ attr_accessor :max_disk_per_sandbox
33
+
34
+ attr_accessor :max_disk_per_non_ephemeral_sandbox
35
+
36
+ attr_accessor :max_cpu_per_gpu_sandbox
37
+
38
+ attr_accessor :max_memory_per_gpu_sandbox
39
+
40
+ attr_accessor :max_disk_per_gpu_sandbox
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'sandbox_class' => :'sandboxClass',
68
+ :'total_cpu_quota' => :'totalCpuQuota',
69
+ :'total_memory_quota' => :'totalMemoryQuota',
70
+ :'total_disk_quota' => :'totalDiskQuota',
71
+ :'total_gpu_quota' => :'totalGpuQuota',
72
+ :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
73
+ :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
74
+ :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
75
+ :'max_disk_per_non_ephemeral_sandbox' => :'maxDiskPerNonEphemeralSandbox',
76
+ :'max_cpu_per_gpu_sandbox' => :'maxCpuPerGpuSandbox',
77
+ :'max_memory_per_gpu_sandbox' => :'maxMemoryPerGpuSandbox',
78
+ :'max_disk_per_gpu_sandbox' => :'maxDiskPerGpuSandbox'
79
+ }
80
+ end
81
+
82
+ # Returns attribute mapping this model knows about
83
+ def self.acceptable_attribute_map
84
+ attribute_map
85
+ end
86
+
87
+ # Returns all the JSON keys this model knows about
88
+ def self.acceptable_attributes
89
+ acceptable_attribute_map.values
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.openapi_types
94
+ {
95
+ :'sandbox_class' => :'SandboxClass',
96
+ :'total_cpu_quota' => :'Float',
97
+ :'total_memory_quota' => :'Float',
98
+ :'total_disk_quota' => :'Float',
99
+ :'total_gpu_quota' => :'Float',
100
+ :'max_cpu_per_sandbox' => :'Float',
101
+ :'max_memory_per_sandbox' => :'Float',
102
+ :'max_disk_per_sandbox' => :'Float',
103
+ :'max_disk_per_non_ephemeral_sandbox' => :'Float',
104
+ :'max_cpu_per_gpu_sandbox' => :'Float',
105
+ :'max_memory_per_gpu_sandbox' => :'Float',
106
+ :'max_disk_per_gpu_sandbox' => :'Float'
107
+ }
108
+ end
109
+
110
+ # List of attributes with nullable: true
111
+ def self.openapi_nullable
112
+ Set.new([
113
+ :'max_cpu_per_sandbox',
114
+ :'max_memory_per_sandbox',
115
+ :'max_disk_per_sandbox',
116
+ :'max_disk_per_non_ephemeral_sandbox',
117
+ :'max_cpu_per_gpu_sandbox',
118
+ :'max_memory_per_gpu_sandbox',
119
+ :'max_disk_per_gpu_sandbox'
120
+ ])
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ def initialize(attributes = {})
126
+ if (!attributes.is_a?(Hash))
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateOrganizationRegionQuota` initialize method"
128
+ end
129
+
130
+ # check to see if the attribute exists and convert string to symbol for hash key
131
+ acceptable_attribute_map = self.class.acceptable_attribute_map
132
+ attributes = attributes.each_with_object({}) { |(k, v), h|
133
+ if (!acceptable_attribute_map.key?(k.to_sym))
134
+ 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
135
+ end
136
+ h[k.to_sym] = v
137
+ }
138
+
139
+ if attributes.key?(:'sandbox_class')
140
+ self.sandbox_class = attributes[:'sandbox_class']
141
+ else
142
+ self.sandbox_class = nil
143
+ end
144
+
145
+ if attributes.key?(:'total_cpu_quota')
146
+ self.total_cpu_quota = attributes[:'total_cpu_quota']
147
+ else
148
+ self.total_cpu_quota = nil
149
+ end
150
+
151
+ if attributes.key?(:'total_memory_quota')
152
+ self.total_memory_quota = attributes[:'total_memory_quota']
153
+ else
154
+ self.total_memory_quota = nil
155
+ end
156
+
157
+ if attributes.key?(:'total_disk_quota')
158
+ self.total_disk_quota = attributes[:'total_disk_quota']
159
+ else
160
+ self.total_disk_quota = nil
161
+ end
162
+
163
+ if attributes.key?(:'total_gpu_quota')
164
+ self.total_gpu_quota = attributes[:'total_gpu_quota']
165
+ else
166
+ self.total_gpu_quota = nil
167
+ end
168
+
169
+ if attributes.key?(:'max_cpu_per_sandbox')
170
+ self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
171
+ end
172
+
173
+ if attributes.key?(:'max_memory_per_sandbox')
174
+ self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
175
+ end
176
+
177
+ if attributes.key?(:'max_disk_per_sandbox')
178
+ self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
179
+ end
180
+
181
+ if attributes.key?(:'max_disk_per_non_ephemeral_sandbox')
182
+ self.max_disk_per_non_ephemeral_sandbox = attributes[:'max_disk_per_non_ephemeral_sandbox']
183
+ end
184
+
185
+ if attributes.key?(:'max_cpu_per_gpu_sandbox')
186
+ self.max_cpu_per_gpu_sandbox = attributes[:'max_cpu_per_gpu_sandbox']
187
+ end
188
+
189
+ if attributes.key?(:'max_memory_per_gpu_sandbox')
190
+ self.max_memory_per_gpu_sandbox = attributes[:'max_memory_per_gpu_sandbox']
191
+ end
192
+
193
+ if attributes.key?(:'max_disk_per_gpu_sandbox')
194
+ self.max_disk_per_gpu_sandbox = attributes[:'max_disk_per_gpu_sandbox']
195
+ end
196
+ end
197
+
198
+ # Show invalid properties with the reasons. Usually used together with valid?
199
+ # @return Array for valid properties with the reasons
200
+ def list_invalid_properties
201
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
202
+ invalid_properties = Array.new
203
+ if @sandbox_class.nil?
204
+ invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
205
+ end
206
+
207
+ if @total_cpu_quota.nil?
208
+ invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
209
+ end
210
+
211
+ if @total_memory_quota.nil?
212
+ invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
213
+ end
214
+
215
+ if @total_disk_quota.nil?
216
+ invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
217
+ end
218
+
219
+ if @total_gpu_quota.nil?
220
+ invalid_properties.push('invalid value for "total_gpu_quota", total_gpu_quota cannot be nil.')
221
+ end
222
+
223
+ invalid_properties
224
+ end
225
+
226
+ # Check to see if the all the properties in the model are valid
227
+ # @return true if the model is valid
228
+ def valid?
229
+ warn '[DEPRECATED] the `valid?` method is obsolete'
230
+ return false if @sandbox_class.nil?
231
+ return false if @total_cpu_quota.nil?
232
+ return false if @total_memory_quota.nil?
233
+ return false if @total_disk_quota.nil?
234
+ return false if @total_gpu_quota.nil?
235
+ true
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] sandbox_class Value to be assigned
240
+ def sandbox_class=(sandbox_class)
241
+ if sandbox_class.nil?
242
+ fail ArgumentError, 'sandbox_class cannot be nil'
243
+ end
244
+
245
+ @sandbox_class = sandbox_class
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] total_cpu_quota Value to be assigned
250
+ def total_cpu_quota=(total_cpu_quota)
251
+ if total_cpu_quota.nil?
252
+ fail ArgumentError, 'total_cpu_quota cannot be nil'
253
+ end
254
+
255
+ @total_cpu_quota = total_cpu_quota
256
+ end
257
+
258
+ # Custom attribute writer method with validation
259
+ # @param [Object] total_memory_quota Value to be assigned
260
+ def total_memory_quota=(total_memory_quota)
261
+ if total_memory_quota.nil?
262
+ fail ArgumentError, 'total_memory_quota cannot be nil'
263
+ end
264
+
265
+ @total_memory_quota = total_memory_quota
266
+ end
267
+
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] total_disk_quota Value to be assigned
270
+ def total_disk_quota=(total_disk_quota)
271
+ if total_disk_quota.nil?
272
+ fail ArgumentError, 'total_disk_quota cannot be nil'
273
+ end
274
+
275
+ @total_disk_quota = total_disk_quota
276
+ end
277
+
278
+ # Custom attribute writer method with validation
279
+ # @param [Object] total_gpu_quota Value to be assigned
280
+ def total_gpu_quota=(total_gpu_quota)
281
+ if total_gpu_quota.nil?
282
+ fail ArgumentError, 'total_gpu_quota cannot be nil'
283
+ end
284
+
285
+ @total_gpu_quota = total_gpu_quota
286
+ end
287
+
288
+ # Checks equality by comparing each attribute.
289
+ # @param [Object] Object to be compared
290
+ def ==(o)
291
+ return true if self.equal?(o)
292
+ self.class == o.class &&
293
+ sandbox_class == o.sandbox_class &&
294
+ total_cpu_quota == o.total_cpu_quota &&
295
+ total_memory_quota == o.total_memory_quota &&
296
+ total_disk_quota == o.total_disk_quota &&
297
+ total_gpu_quota == o.total_gpu_quota &&
298
+ max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
299
+ max_memory_per_sandbox == o.max_memory_per_sandbox &&
300
+ max_disk_per_sandbox == o.max_disk_per_sandbox &&
301
+ max_disk_per_non_ephemeral_sandbox == o.max_disk_per_non_ephemeral_sandbox &&
302
+ max_cpu_per_gpu_sandbox == o.max_cpu_per_gpu_sandbox &&
303
+ max_memory_per_gpu_sandbox == o.max_memory_per_gpu_sandbox &&
304
+ max_disk_per_gpu_sandbox == o.max_disk_per_gpu_sandbox
305
+ end
306
+
307
+ # @see the `==` method
308
+ # @param [Object] Object to be compared
309
+ def eql?(o)
310
+ self == o
311
+ end
312
+
313
+ # Calculates hash code according to all attributes.
314
+ # @return [Integer] Hash code
315
+ def hash
316
+ [sandbox_class, total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
317
+ end
318
+
319
+ # Builds the object from hash
320
+ # @param [Hash] attributes Model attributes in the form of hash
321
+ # @return [Object] Returns the model itself
322
+ def self.build_from_hash(attributes)
323
+ return nil unless attributes.is_a?(Hash)
324
+ attributes = attributes.transform_keys(&:to_sym)
325
+ transformed_hash = {}
326
+ openapi_types.each_pair do |key, type|
327
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
328
+ transformed_hash["#{key}"] = nil
329
+ elsif type =~ /\AArray<(.*)>/i
330
+ # check to ensure the input is an array given that the attribute
331
+ # is documented as an array but the input is not
332
+ if attributes[attribute_map[key]].is_a?(Array)
333
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
334
+ end
335
+ elsif !attributes[attribute_map[key]].nil?
336
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
337
+ end
338
+ end
339
+ new(transformed_hash)
340
+ end
341
+
342
+ # Returns the object in the form of hash
343
+ # @return [Hash] Returns the object in the form of hash
344
+ def to_hash
345
+ hash = {}
346
+ self.class.attribute_map.each_pair do |attr, param|
347
+ value = self.send(attr)
348
+ if value.nil?
349
+ is_nullable = self.class.openapi_nullable.include?(attr)
350
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
351
+ end
352
+
353
+ hash[param] = _to_hash(value)
354
+ end
355
+ hash
356
+ end
357
+
358
+ end
359
+
360
+ end
@@ -39,9 +39,6 @@ module DaytonaApiClient
39
39
  # Comma-separated list of allowed CIDR network addresses for the sandbox
40
40
  attr_accessor :network_allow_list
41
41
 
42
- # The sandbox class type
43
- attr_accessor :_class
44
-
45
42
  # The target (region) where the sandbox will be created
46
43
  attr_accessor :target
47
44
 
@@ -72,27 +69,8 @@ module DaytonaApiClient
72
69
  # Build information for the sandbox
73
70
  attr_accessor :build_info
74
71
 
75
- class EnumAttributeValidator
76
- attr_reader :datatype
77
- attr_reader :allowable_values
78
-
79
- def initialize(datatype, allowable_values)
80
- @allowable_values = allowable_values.map do |value|
81
- case datatype.to_s
82
- when /Integer/i
83
- value.to_i
84
- when /Float/i
85
- value.to_f
86
- else
87
- value
88
- end
89
- end
90
- end
91
-
92
- def valid?(value)
93
- !value || allowable_values.include?(value)
94
- end
95
- end
72
+ # ID or name of an existing sandbox to link the new sandbox to. The new sandbox will be scheduled on the same runner as the linked sandbox so a local network can be established between them. Linked sandboxes must be ephemeral (autoDeleteInterval=0) and cannot themselves be linked to another sandbox.
73
+ attr_accessor :linked_sandbox
96
74
 
97
75
  # Attribute mapping from ruby-style variable name to JSON key.
98
76
  def self.attribute_map
@@ -105,7 +83,6 @@ module DaytonaApiClient
105
83
  :'public' => :'public',
106
84
  :'network_block_all' => :'networkBlockAll',
107
85
  :'network_allow_list' => :'networkAllowList',
108
- :'_class' => :'class',
109
86
  :'target' => :'target',
110
87
  :'cpu' => :'cpu',
111
88
  :'gpu' => :'gpu',
@@ -115,7 +92,8 @@ module DaytonaApiClient
115
92
  :'auto_archive_interval' => :'autoArchiveInterval',
116
93
  :'auto_delete_interval' => :'autoDeleteInterval',
117
94
  :'volumes' => :'volumes',
118
- :'build_info' => :'buildInfo'
95
+ :'build_info' => :'buildInfo',
96
+ :'linked_sandbox' => :'linkedSandbox'
119
97
  }
120
98
  end
121
99
 
@@ -140,7 +118,6 @@ module DaytonaApiClient
140
118
  :'public' => :'Boolean',
141
119
  :'network_block_all' => :'Boolean',
142
120
  :'network_allow_list' => :'String',
143
- :'_class' => :'String',
144
121
  :'target' => :'String',
145
122
  :'cpu' => :'Integer',
146
123
  :'gpu' => :'Integer',
@@ -150,7 +127,8 @@ module DaytonaApiClient
150
127
  :'auto_archive_interval' => :'Integer',
151
128
  :'auto_delete_interval' => :'Integer',
152
129
  :'volumes' => :'Array<SandboxVolume>',
153
- :'build_info' => :'CreateBuildInfo'
130
+ :'build_info' => :'CreateBuildInfo',
131
+ :'linked_sandbox' => :'String'
154
132
  }
155
133
  end
156
134
 
@@ -212,10 +190,6 @@ module DaytonaApiClient
212
190
  self.network_allow_list = attributes[:'network_allow_list']
213
191
  end
214
192
 
215
- if attributes.key?(:'_class')
216
- self._class = attributes[:'_class']
217
- end
218
-
219
193
  if attributes.key?(:'target')
220
194
  self.target = attributes[:'target']
221
195
  end
@@ -257,6 +231,10 @@ module DaytonaApiClient
257
231
  if attributes.key?(:'build_info')
258
232
  self.build_info = attributes[:'build_info']
259
233
  end
234
+
235
+ if attributes.key?(:'linked_sandbox')
236
+ self.linked_sandbox = attributes[:'linked_sandbox']
237
+ end
260
238
  end
261
239
 
262
240
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -271,21 +249,9 @@ module DaytonaApiClient
271
249
  # @return true if the model is valid
272
250
  def valid?
273
251
  warn '[DEPRECATED] the `valid?` method is obsolete'
274
- _class_validator = EnumAttributeValidator.new('String', ["small", "medium", "large", "unknown_default_open_api"])
275
- return false unless _class_validator.valid?(@_class)
276
252
  true
277
253
  end
278
254
 
279
- # Custom attribute writer method checking allowed values (enum).
280
- # @param [Object] _class Object to be assigned
281
- def _class=(_class)
282
- validator = EnumAttributeValidator.new('String', ["small", "medium", "large", "unknown_default_open_api"])
283
- unless validator.valid?(_class)
284
- fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
285
- end
286
- @_class = _class
287
- end
288
-
289
255
  # Checks equality by comparing each attribute.
290
256
  # @param [Object] Object to be compared
291
257
  def ==(o)
@@ -299,7 +265,6 @@ module DaytonaApiClient
299
265
  public == o.public &&
300
266
  network_block_all == o.network_block_all &&
301
267
  network_allow_list == o.network_allow_list &&
302
- _class == o._class &&
303
268
  target == o.target &&
304
269
  cpu == o.cpu &&
305
270
  gpu == o.gpu &&
@@ -309,7 +274,8 @@ module DaytonaApiClient
309
274
  auto_archive_interval == o.auto_archive_interval &&
310
275
  auto_delete_interval == o.auto_delete_interval &&
311
276
  volumes == o.volumes &&
312
- build_info == o.build_info
277
+ build_info == o.build_info &&
278
+ linked_sandbox == o.linked_sandbox
313
279
  end
314
280
 
315
281
  # @see the `==` method
@@ -321,7 +287,7 @@ module DaytonaApiClient
321
287
  # Calculates hash code according to all attributes.
322
288
  # @return [Integer] Hash code
323
289
  def hash
324
- [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, _class, target, cpu, gpu, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info].hash
290
+ [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox].hash
325
291
  end
326
292
 
327
293
  # Builds the object from hash
@@ -42,6 +42,31 @@ module DaytonaApiClient
42
42
  # ID of the region where the snapshot will be available. Defaults to organization default region if not specified.
43
43
  attr_accessor :region_id
44
44
 
45
+ # Target sandbox class. Determines which runners can host sandboxes created from this snapshot.
46
+ attr_accessor :sandbox_class
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
45
70
  # Attribute mapping from ruby-style variable name to JSON key.
46
71
  def self.attribute_map
47
72
  {
@@ -53,7 +78,8 @@ module DaytonaApiClient
53
78
  :'memory' => :'memory',
54
79
  :'disk' => :'disk',
55
80
  :'build_info' => :'buildInfo',
56
- :'region_id' => :'regionId'
81
+ :'region_id' => :'regionId',
82
+ :'sandbox_class' => :'sandboxClass'
57
83
  }
58
84
  end
59
85
 
@@ -78,7 +104,8 @@ module DaytonaApiClient
78
104
  :'memory' => :'Integer',
79
105
  :'disk' => :'Integer',
80
106
  :'build_info' => :'CreateBuildInfo',
81
- :'region_id' => :'String'
107
+ :'region_id' => :'String',
108
+ :'sandbox_class' => :'SandboxClass'
82
109
  }
83
110
  end
84
111
 
@@ -143,6 +170,10 @@ module DaytonaApiClient
143
170
  if attributes.key?(:'region_id')
144
171
  self.region_id = attributes[:'region_id']
145
172
  end
173
+
174
+ if attributes.key?(:'sandbox_class')
175
+ self.sandbox_class = attributes[:'sandbox_class']
176
+ end
146
177
  end
147
178
 
148
179
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -188,7 +219,8 @@ module DaytonaApiClient
188
219
  memory == o.memory &&
189
220
  disk == o.disk &&
190
221
  build_info == o.build_info &&
191
- region_id == o.region_id
222
+ region_id == o.region_id &&
223
+ sandbox_class == o.sandbox_class
192
224
  end
193
225
 
194
226
  # @see the `==` method
@@ -200,7 +232,7 @@ module DaytonaApiClient
200
232
  # Calculates hash code according to all attributes.
201
233
  # @return [Integer] Hash code
202
234
  def hash
203
- [name, image_name, entrypoint, cpu, gpu, memory, disk, build_info, region_id].hash
235
+ [name, image_name, entrypoint, cpu, gpu, memory, disk, build_info, region_id, sandbox_class].hash
204
236
  end
205
237
 
206
238
  # Builds the object from hash
@@ -19,6 +19,8 @@ module DaytonaApiClient
19
19
 
20
20
  attr_accessor :region_id
21
21
 
22
+ attr_accessor :sandbox_class
23
+
22
24
  attr_accessor :total_cpu_quota
23
25
 
24
26
  attr_accessor :total_memory_quota
@@ -41,11 +43,34 @@ module DaytonaApiClient
41
43
 
42
44
  attr_accessor :max_disk_per_gpu_sandbox
43
45
 
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
44
68
  # Attribute mapping from ruby-style variable name to JSON key.
45
69
  def self.attribute_map
46
70
  {
47
71
  :'organization_id' => :'organizationId',
48
72
  :'region_id' => :'regionId',
73
+ :'sandbox_class' => :'sandboxClass',
49
74
  :'total_cpu_quota' => :'totalCpuQuota',
50
75
  :'total_memory_quota' => :'totalMemoryQuota',
51
76
  :'total_disk_quota' => :'totalDiskQuota',
@@ -75,6 +100,7 @@ module DaytonaApiClient
75
100
  {
76
101
  :'organization_id' => :'String',
77
102
  :'region_id' => :'String',
103
+ :'sandbox_class' => :'SandboxClass',
78
104
  :'total_cpu_quota' => :'Float',
79
105
  :'total_memory_quota' => :'Float',
80
106
  :'total_disk_quota' => :'Float',
@@ -130,6 +156,12 @@ module DaytonaApiClient
130
156
  self.region_id = nil
131
157
  end
132
158
 
159
+ if attributes.key?(:'sandbox_class')
160
+ self.sandbox_class = attributes[:'sandbox_class']
161
+ else
162
+ self.sandbox_class = nil
163
+ end
164
+
133
165
  if attributes.key?(:'total_cpu_quota')
134
166
  self.total_cpu_quota = attributes[:'total_cpu_quota']
135
167
  else
@@ -210,6 +242,10 @@ module DaytonaApiClient
210
242
  invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
211
243
  end
212
244
 
245
+ if @sandbox_class.nil?
246
+ invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
247
+ end
248
+
213
249
  if @total_cpu_quota.nil?
214
250
  invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
215
251
  end
@@ -235,6 +271,7 @@ module DaytonaApiClient
235
271
  warn '[DEPRECATED] the `valid?` method is obsolete'
236
272
  return false if @organization_id.nil?
237
273
  return false if @region_id.nil?
274
+ return false if @sandbox_class.nil?
238
275
  return false if @total_cpu_quota.nil?
239
276
  return false if @total_memory_quota.nil?
240
277
  return false if @total_disk_quota.nil?
@@ -262,6 +299,16 @@ module DaytonaApiClient
262
299
  @region_id = region_id
263
300
  end
264
301
 
302
+ # Custom attribute writer method with validation
303
+ # @param [Object] sandbox_class Value to be assigned
304
+ def sandbox_class=(sandbox_class)
305
+ if sandbox_class.nil?
306
+ fail ArgumentError, 'sandbox_class cannot be nil'
307
+ end
308
+
309
+ @sandbox_class = sandbox_class
310
+ end
311
+
265
312
  # Custom attribute writer method with validation
266
313
  # @param [Object] total_cpu_quota Value to be assigned
267
314
  def total_cpu_quota=(total_cpu_quota)
@@ -309,6 +356,7 @@ module DaytonaApiClient
309
356
  self.class == o.class &&
310
357
  organization_id == o.organization_id &&
311
358
  region_id == o.region_id &&
359
+ sandbox_class == o.sandbox_class &&
312
360
  total_cpu_quota == o.total_cpu_quota &&
313
361
  total_memory_quota == o.total_memory_quota &&
314
362
  total_disk_quota == o.total_disk_quota &&
@@ -331,7 +379,7 @@ module DaytonaApiClient
331
379
  # Calculates hash code according to all attributes.
332
380
  # @return [Integer] Hash code
333
381
  def hash
334
- [organization_id, region_id, total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
382
+ [organization_id, region_id, sandbox_class, total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
335
383
  end
336
384
 
337
385
  # Builds the object from hash