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.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +1 -0
- data/lib/daytona_api_client/api/admin_api.rb +298 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +3 -0
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +360 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +13 -47
- data/lib/daytona_api_client/models/create_snapshot.rb +36 -4
- data/lib/daytona_api_client/models/region_quota.rb +49 -1
- data/lib/daytona_api_client/models/region_usage_overview.rb +49 -1
- data/lib/daytona_api_client/models/runner.rb +8 -25
- data/lib/daytona_api_client/models/runner_full.rb +8 -25
- data/lib/daytona_api_client/models/sandbox.rb +25 -15
- data/lib/daytona_api_client/models/sandbox_class.rb +4 -4
- data/lib/daytona_api_client/models/sandbox_list_item.rb +2 -2
- data/lib/daytona_api_client/models/snapshot_dto.rb +26 -4
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +32 -1
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +1 -0
- metadata +2 -1
|
@@ -17,6 +17,8 @@ module DaytonaApiClient
|
|
|
17
17
|
class RegionUsageOverview < ApiModelBase
|
|
18
18
|
attr_accessor :region_id
|
|
19
19
|
|
|
20
|
+
attr_accessor :sandbox_class
|
|
21
|
+
|
|
20
22
|
attr_accessor :total_cpu_quota
|
|
21
23
|
|
|
22
24
|
attr_accessor :current_cpu_usage
|
|
@@ -47,10 +49,33 @@ module DaytonaApiClient
|
|
|
47
49
|
|
|
48
50
|
attr_accessor :max_disk_per_gpu_sandbox
|
|
49
51
|
|
|
52
|
+
class EnumAttributeValidator
|
|
53
|
+
attr_reader :datatype
|
|
54
|
+
attr_reader :allowable_values
|
|
55
|
+
|
|
56
|
+
def initialize(datatype, allowable_values)
|
|
57
|
+
@allowable_values = allowable_values.map do |value|
|
|
58
|
+
case datatype.to_s
|
|
59
|
+
when /Integer/i
|
|
60
|
+
value.to_i
|
|
61
|
+
when /Float/i
|
|
62
|
+
value.to_f
|
|
63
|
+
else
|
|
64
|
+
value
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def valid?(value)
|
|
70
|
+
!value || allowable_values.include?(value)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
50
74
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
75
|
def self.attribute_map
|
|
52
76
|
{
|
|
53
77
|
:'region_id' => :'regionId',
|
|
78
|
+
:'sandbox_class' => :'sandboxClass',
|
|
54
79
|
:'total_cpu_quota' => :'totalCpuQuota',
|
|
55
80
|
:'current_cpu_usage' => :'currentCpuUsage',
|
|
56
81
|
:'total_memory_quota' => :'totalMemoryQuota',
|
|
@@ -83,6 +108,7 @@ module DaytonaApiClient
|
|
|
83
108
|
def self.openapi_types
|
|
84
109
|
{
|
|
85
110
|
:'region_id' => :'String',
|
|
111
|
+
:'sandbox_class' => :'SandboxClass',
|
|
86
112
|
:'total_cpu_quota' => :'Float',
|
|
87
113
|
:'current_cpu_usage' => :'Float',
|
|
88
114
|
:'total_memory_quota' => :'Float',
|
|
@@ -136,6 +162,12 @@ module DaytonaApiClient
|
|
|
136
162
|
self.region_id = nil
|
|
137
163
|
end
|
|
138
164
|
|
|
165
|
+
if attributes.key?(:'sandbox_class')
|
|
166
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
167
|
+
else
|
|
168
|
+
self.sandbox_class = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
139
171
|
if attributes.key?(:'total_cpu_quota')
|
|
140
172
|
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
141
173
|
else
|
|
@@ -236,6 +268,10 @@ module DaytonaApiClient
|
|
|
236
268
|
invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
|
|
237
269
|
end
|
|
238
270
|
|
|
271
|
+
if @sandbox_class.nil?
|
|
272
|
+
invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
|
|
273
|
+
end
|
|
274
|
+
|
|
239
275
|
if @total_cpu_quota.nil?
|
|
240
276
|
invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
|
|
241
277
|
end
|
|
@@ -276,6 +312,7 @@ module DaytonaApiClient
|
|
|
276
312
|
def valid?
|
|
277
313
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
278
314
|
return false if @region_id.nil?
|
|
315
|
+
return false if @sandbox_class.nil?
|
|
279
316
|
return false if @total_cpu_quota.nil?
|
|
280
317
|
return false if @current_cpu_usage.nil?
|
|
281
318
|
return false if @total_memory_quota.nil?
|
|
@@ -297,6 +334,16 @@ module DaytonaApiClient
|
|
|
297
334
|
@region_id = region_id
|
|
298
335
|
end
|
|
299
336
|
|
|
337
|
+
# Custom attribute writer method with validation
|
|
338
|
+
# @param [Object] sandbox_class Value to be assigned
|
|
339
|
+
def sandbox_class=(sandbox_class)
|
|
340
|
+
if sandbox_class.nil?
|
|
341
|
+
fail ArgumentError, 'sandbox_class cannot be nil'
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
@sandbox_class = sandbox_class
|
|
345
|
+
end
|
|
346
|
+
|
|
300
347
|
# Custom attribute writer method with validation
|
|
301
348
|
# @param [Object] total_cpu_quota Value to be assigned
|
|
302
349
|
def total_cpu_quota=(total_cpu_quota)
|
|
@@ -383,6 +430,7 @@ module DaytonaApiClient
|
|
|
383
430
|
return true if self.equal?(o)
|
|
384
431
|
self.class == o.class &&
|
|
385
432
|
region_id == o.region_id &&
|
|
433
|
+
sandbox_class == o.sandbox_class &&
|
|
386
434
|
total_cpu_quota == o.total_cpu_quota &&
|
|
387
435
|
current_cpu_usage == o.current_cpu_usage &&
|
|
388
436
|
total_memory_quota == o.total_memory_quota &&
|
|
@@ -409,7 +457,7 @@ module DaytonaApiClient
|
|
|
409
457
|
# Calculates hash code according to all attributes.
|
|
410
458
|
# @return [Integer] Hash code
|
|
411
459
|
def hash
|
|
412
|
-
[region_id, total_cpu_quota, current_cpu_usage, total_memory_quota, current_memory_usage, total_disk_quota, current_disk_usage, total_gpu_quota, current_gpu_usage, 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
|
|
460
|
+
[region_id, sandbox_class, total_cpu_quota, current_cpu_usage, total_memory_quota, current_memory_usage, total_disk_quota, current_disk_usage, total_gpu_quota, current_gpu_usage, 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
|
|
413
461
|
end
|
|
414
462
|
|
|
415
463
|
# Builds the object from hash
|
|
@@ -42,8 +42,8 @@ module DaytonaApiClient
|
|
|
42
42
|
# The type of GPU
|
|
43
43
|
attr_accessor :gpu_type
|
|
44
44
|
|
|
45
|
-
# The class
|
|
46
|
-
attr_accessor :
|
|
45
|
+
# The sandbox class supported by this runner
|
|
46
|
+
attr_accessor :sandbox_class
|
|
47
47
|
|
|
48
48
|
# Current CPU usage percentage
|
|
49
49
|
attr_accessor :current_cpu_usage_percentage
|
|
@@ -142,7 +142,7 @@ module DaytonaApiClient
|
|
|
142
142
|
:'disk' => :'disk',
|
|
143
143
|
:'gpu' => :'gpu',
|
|
144
144
|
:'gpu_type' => :'gpuType',
|
|
145
|
-
:'
|
|
145
|
+
:'sandbox_class' => :'sandboxClass',
|
|
146
146
|
:'current_cpu_usage_percentage' => :'currentCpuUsagePercentage',
|
|
147
147
|
:'current_memory_usage_percentage' => :'currentMemoryUsagePercentage',
|
|
148
148
|
:'current_disk_usage_percentage' => :'currentDiskUsagePercentage',
|
|
@@ -189,7 +189,7 @@ module DaytonaApiClient
|
|
|
189
189
|
:'disk' => :'Float',
|
|
190
190
|
:'gpu' => :'Float',
|
|
191
191
|
:'gpu_type' => :'String',
|
|
192
|
-
:'
|
|
192
|
+
:'sandbox_class' => :'SandboxClass',
|
|
193
193
|
:'current_cpu_usage_percentage' => :'Float',
|
|
194
194
|
:'current_memory_usage_percentage' => :'Float',
|
|
195
195
|
:'current_disk_usage_percentage' => :'Float',
|
|
@@ -280,10 +280,8 @@ module DaytonaApiClient
|
|
|
280
280
|
self.gpu_type = attributes[:'gpu_type']
|
|
281
281
|
end
|
|
282
282
|
|
|
283
|
-
if attributes.key?(:'
|
|
284
|
-
self.
|
|
285
|
-
else
|
|
286
|
-
self._class = nil
|
|
283
|
+
if attributes.key?(:'sandbox_class')
|
|
284
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
287
285
|
end
|
|
288
286
|
|
|
289
287
|
if attributes.key?(:'current_cpu_usage_percentage')
|
|
@@ -414,10 +412,6 @@ module DaytonaApiClient
|
|
|
414
412
|
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
415
413
|
end
|
|
416
414
|
|
|
417
|
-
if @_class.nil?
|
|
418
|
-
invalid_properties.push('invalid value for "_class", _class cannot be nil.')
|
|
419
|
-
end
|
|
420
|
-
|
|
421
415
|
if @region.nil?
|
|
422
416
|
invalid_properties.push('invalid value for "region", region cannot be nil.')
|
|
423
417
|
end
|
|
@@ -469,7 +463,6 @@ module DaytonaApiClient
|
|
|
469
463
|
return false if @cpu.nil?
|
|
470
464
|
return false if @memory.nil?
|
|
471
465
|
return false if @disk.nil?
|
|
472
|
-
return false if @_class.nil?
|
|
473
466
|
return false if @region.nil?
|
|
474
467
|
return false if @name.nil?
|
|
475
468
|
return false if @state.nil?
|
|
@@ -523,16 +516,6 @@ module DaytonaApiClient
|
|
|
523
516
|
@disk = disk
|
|
524
517
|
end
|
|
525
518
|
|
|
526
|
-
# Custom attribute writer method with validation
|
|
527
|
-
# @param [Object] _class Value to be assigned
|
|
528
|
-
def _class=(_class)
|
|
529
|
-
if _class.nil?
|
|
530
|
-
fail ArgumentError, '_class cannot be nil'
|
|
531
|
-
end
|
|
532
|
-
|
|
533
|
-
@_class = _class
|
|
534
|
-
end
|
|
535
|
-
|
|
536
519
|
# Custom attribute writer method with validation
|
|
537
520
|
# @param [Object] region Value to be assigned
|
|
538
521
|
def region=(region)
|
|
@@ -647,7 +630,7 @@ module DaytonaApiClient
|
|
|
647
630
|
disk == o.disk &&
|
|
648
631
|
gpu == o.gpu &&
|
|
649
632
|
gpu_type == o.gpu_type &&
|
|
650
|
-
|
|
633
|
+
sandbox_class == o.sandbox_class &&
|
|
651
634
|
current_cpu_usage_percentage == o.current_cpu_usage_percentage &&
|
|
652
635
|
current_memory_usage_percentage == o.current_memory_usage_percentage &&
|
|
653
636
|
current_disk_usage_percentage == o.current_disk_usage_percentage &&
|
|
@@ -680,7 +663,7 @@ module DaytonaApiClient
|
|
|
680
663
|
# Calculates hash code according to all attributes.
|
|
681
664
|
# @return [Integer] Hash code
|
|
682
665
|
def hash
|
|
683
|
-
[id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type,
|
|
666
|
+
[id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, sandbox_class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, tags, created_at, updated_at, version, api_version, runner_class, app_version].hash
|
|
684
667
|
end
|
|
685
668
|
|
|
686
669
|
# Builds the object from hash
|
|
@@ -42,8 +42,8 @@ module DaytonaApiClient
|
|
|
42
42
|
# The type of GPU
|
|
43
43
|
attr_accessor :gpu_type
|
|
44
44
|
|
|
45
|
-
# The class
|
|
46
|
-
attr_accessor :
|
|
45
|
+
# The sandbox class supported by this runner
|
|
46
|
+
attr_accessor :sandbox_class
|
|
47
47
|
|
|
48
48
|
# Current CPU usage percentage
|
|
49
49
|
attr_accessor :current_cpu_usage_percentage
|
|
@@ -148,7 +148,7 @@ module DaytonaApiClient
|
|
|
148
148
|
:'disk' => :'disk',
|
|
149
149
|
:'gpu' => :'gpu',
|
|
150
150
|
:'gpu_type' => :'gpuType',
|
|
151
|
-
:'
|
|
151
|
+
:'sandbox_class' => :'sandboxClass',
|
|
152
152
|
:'current_cpu_usage_percentage' => :'currentCpuUsagePercentage',
|
|
153
153
|
:'current_memory_usage_percentage' => :'currentMemoryUsagePercentage',
|
|
154
154
|
:'current_disk_usage_percentage' => :'currentDiskUsagePercentage',
|
|
@@ -197,7 +197,7 @@ module DaytonaApiClient
|
|
|
197
197
|
:'disk' => :'Float',
|
|
198
198
|
:'gpu' => :'Float',
|
|
199
199
|
:'gpu_type' => :'String',
|
|
200
|
-
:'
|
|
200
|
+
:'sandbox_class' => :'SandboxClass',
|
|
201
201
|
:'current_cpu_usage_percentage' => :'Float',
|
|
202
202
|
:'current_memory_usage_percentage' => :'Float',
|
|
203
203
|
:'current_disk_usage_percentage' => :'Float',
|
|
@@ -290,10 +290,8 @@ module DaytonaApiClient
|
|
|
290
290
|
self.gpu_type = attributes[:'gpu_type']
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
-
if attributes.key?(:'
|
|
294
|
-
self.
|
|
295
|
-
else
|
|
296
|
-
self._class = nil
|
|
293
|
+
if attributes.key?(:'sandbox_class')
|
|
294
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
297
295
|
end
|
|
298
296
|
|
|
299
297
|
if attributes.key?(:'current_cpu_usage_percentage')
|
|
@@ -434,10 +432,6 @@ module DaytonaApiClient
|
|
|
434
432
|
invalid_properties.push('invalid value for "disk", disk cannot be nil.')
|
|
435
433
|
end
|
|
436
434
|
|
|
437
|
-
if @_class.nil?
|
|
438
|
-
invalid_properties.push('invalid value for "_class", _class cannot be nil.')
|
|
439
|
-
end
|
|
440
|
-
|
|
441
435
|
if @region.nil?
|
|
442
436
|
invalid_properties.push('invalid value for "region", region cannot be nil.')
|
|
443
437
|
end
|
|
@@ -493,7 +487,6 @@ module DaytonaApiClient
|
|
|
493
487
|
return false if @cpu.nil?
|
|
494
488
|
return false if @memory.nil?
|
|
495
489
|
return false if @disk.nil?
|
|
496
|
-
return false if @_class.nil?
|
|
497
490
|
return false if @region.nil?
|
|
498
491
|
return false if @name.nil?
|
|
499
492
|
return false if @state.nil?
|
|
@@ -548,16 +541,6 @@ module DaytonaApiClient
|
|
|
548
541
|
@disk = disk
|
|
549
542
|
end
|
|
550
543
|
|
|
551
|
-
# Custom attribute writer method with validation
|
|
552
|
-
# @param [Object] _class Value to be assigned
|
|
553
|
-
def _class=(_class)
|
|
554
|
-
if _class.nil?
|
|
555
|
-
fail ArgumentError, '_class cannot be nil'
|
|
556
|
-
end
|
|
557
|
-
|
|
558
|
-
@_class = _class
|
|
559
|
-
end
|
|
560
|
-
|
|
561
544
|
# Custom attribute writer method with validation
|
|
562
545
|
# @param [Object] region Value to be assigned
|
|
563
546
|
def region=(region)
|
|
@@ -682,7 +665,7 @@ module DaytonaApiClient
|
|
|
682
665
|
disk == o.disk &&
|
|
683
666
|
gpu == o.gpu &&
|
|
684
667
|
gpu_type == o.gpu_type &&
|
|
685
|
-
|
|
668
|
+
sandbox_class == o.sandbox_class &&
|
|
686
669
|
current_cpu_usage_percentage == o.current_cpu_usage_percentage &&
|
|
687
670
|
current_memory_usage_percentage == o.current_memory_usage_percentage &&
|
|
688
671
|
current_disk_usage_percentage == o.current_disk_usage_percentage &&
|
|
@@ -717,7 +700,7 @@ module DaytonaApiClient
|
|
|
717
700
|
# Calculates hash code according to all attributes.
|
|
718
701
|
# @return [Integer] Hash code
|
|
719
702
|
def hash
|
|
720
|
-
[id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type,
|
|
703
|
+
[id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, sandbox_class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, tags, created_at, updated_at, version, api_version, runner_class, app_version, api_key, region_type].hash
|
|
721
704
|
end
|
|
722
705
|
|
|
723
706
|
# Builds the object from hash
|
|
@@ -103,7 +103,7 @@ module DaytonaApiClient
|
|
|
103
103
|
attr_accessor :last_activity_at
|
|
104
104
|
|
|
105
105
|
# The class of the sandbox
|
|
106
|
-
attr_accessor :
|
|
106
|
+
attr_accessor :sandbox_class
|
|
107
107
|
|
|
108
108
|
# The version of the daemon running in the sandbox
|
|
109
109
|
attr_accessor :daemon_version
|
|
@@ -111,6 +111,9 @@ module DaytonaApiClient
|
|
|
111
111
|
# The runner ID of the sandbox
|
|
112
112
|
attr_accessor :runner_id
|
|
113
113
|
|
|
114
|
+
# ID of the sandbox this sandbox is linked to. When set, the sandbox is co-located on the same runner as the linked sandbox.
|
|
115
|
+
attr_accessor :linked_sandbox_id
|
|
116
|
+
|
|
114
117
|
# The toolbox proxy URL for the sandbox
|
|
115
118
|
attr_accessor :toolbox_proxy_url
|
|
116
119
|
|
|
@@ -168,9 +171,10 @@ module DaytonaApiClient
|
|
|
168
171
|
:'created_at' => :'createdAt',
|
|
169
172
|
:'updated_at' => :'updatedAt',
|
|
170
173
|
:'last_activity_at' => :'lastActivityAt',
|
|
171
|
-
:'
|
|
174
|
+
:'sandbox_class' => :'sandboxClass',
|
|
172
175
|
:'daemon_version' => :'daemonVersion',
|
|
173
176
|
:'runner_id' => :'runnerId',
|
|
177
|
+
:'linked_sandbox_id' => :'linkedSandboxId',
|
|
174
178
|
:'toolbox_proxy_url' => :'toolboxProxyUrl'
|
|
175
179
|
}
|
|
176
180
|
end
|
|
@@ -217,9 +221,10 @@ module DaytonaApiClient
|
|
|
217
221
|
:'created_at' => :'String',
|
|
218
222
|
:'updated_at' => :'String',
|
|
219
223
|
:'last_activity_at' => :'String',
|
|
220
|
-
:'
|
|
224
|
+
:'sandbox_class' => :'String',
|
|
221
225
|
:'daemon_version' => :'String',
|
|
222
226
|
:'runner_id' => :'String',
|
|
227
|
+
:'linked_sandbox_id' => :'String',
|
|
223
228
|
:'toolbox_proxy_url' => :'String'
|
|
224
229
|
}
|
|
225
230
|
end
|
|
@@ -394,8 +399,8 @@ module DaytonaApiClient
|
|
|
394
399
|
self.last_activity_at = attributes[:'last_activity_at']
|
|
395
400
|
end
|
|
396
401
|
|
|
397
|
-
if attributes.key?(:'
|
|
398
|
-
self.
|
|
402
|
+
if attributes.key?(:'sandbox_class')
|
|
403
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
399
404
|
end
|
|
400
405
|
|
|
401
406
|
if attributes.key?(:'daemon_version')
|
|
@@ -406,6 +411,10 @@ module DaytonaApiClient
|
|
|
406
411
|
self.runner_id = attributes[:'runner_id']
|
|
407
412
|
end
|
|
408
413
|
|
|
414
|
+
if attributes.key?(:'linked_sandbox_id')
|
|
415
|
+
self.linked_sandbox_id = attributes[:'linked_sandbox_id']
|
|
416
|
+
end
|
|
417
|
+
|
|
409
418
|
if attributes.key?(:'toolbox_proxy_url')
|
|
410
419
|
self.toolbox_proxy_url = attributes[:'toolbox_proxy_url']
|
|
411
420
|
else
|
|
@@ -496,8 +505,8 @@ module DaytonaApiClient
|
|
|
496
505
|
return false if @disk.nil?
|
|
497
506
|
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error", "unknown_default_open_api"])
|
|
498
507
|
return false unless backup_state_validator.valid?(@backup_state)
|
|
499
|
-
|
|
500
|
-
return false unless
|
|
508
|
+
sandbox_class_validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "unknown_default_open_api"])
|
|
509
|
+
return false unless sandbox_class_validator.valid?(@sandbox_class)
|
|
501
510
|
return false if @toolbox_proxy_url.nil?
|
|
502
511
|
true
|
|
503
512
|
end
|
|
@@ -643,13 +652,13 @@ module DaytonaApiClient
|
|
|
643
652
|
end
|
|
644
653
|
|
|
645
654
|
# Custom attribute writer method checking allowed values (enum).
|
|
646
|
-
# @param [Object]
|
|
647
|
-
def
|
|
648
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
649
|
-
unless validator.valid?(
|
|
650
|
-
fail ArgumentError, "invalid value for \"
|
|
655
|
+
# @param [Object] sandbox_class Object to be assigned
|
|
656
|
+
def sandbox_class=(sandbox_class)
|
|
657
|
+
validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "unknown_default_open_api"])
|
|
658
|
+
unless validator.valid?(sandbox_class)
|
|
659
|
+
fail ArgumentError, "invalid value for \"sandbox_class\", must be one of #{validator.allowable_values}."
|
|
651
660
|
end
|
|
652
|
-
@
|
|
661
|
+
@sandbox_class = sandbox_class
|
|
653
662
|
end
|
|
654
663
|
|
|
655
664
|
# Custom attribute writer method with validation
|
|
@@ -696,9 +705,10 @@ module DaytonaApiClient
|
|
|
696
705
|
created_at == o.created_at &&
|
|
697
706
|
updated_at == o.updated_at &&
|
|
698
707
|
last_activity_at == o.last_activity_at &&
|
|
699
|
-
|
|
708
|
+
sandbox_class == o.sandbox_class &&
|
|
700
709
|
daemon_version == o.daemon_version &&
|
|
701
710
|
runner_id == o.runner_id &&
|
|
711
|
+
linked_sandbox_id == o.linked_sandbox_id &&
|
|
702
712
|
toolbox_proxy_url == o.toolbox_proxy_url
|
|
703
713
|
end
|
|
704
714
|
|
|
@@ -711,7 +721,7 @@ module DaytonaApiClient
|
|
|
711
721
|
# Calculates hash code according to all attributes.
|
|
712
722
|
# @return [Integer] Hash code
|
|
713
723
|
def hash
|
|
714
|
-
[id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, memory, disk, state, desired_state, error_reason, recoverable, backup_state, backup_created_at, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, created_at, updated_at, last_activity_at,
|
|
724
|
+
[id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, memory, disk, state, desired_state, error_reason, recoverable, backup_state, backup_created_at, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, created_at, updated_at, last_activity_at, sandbox_class, daemon_version, runner_id, linked_sandbox_id, toolbox_proxy_url].hash
|
|
715
725
|
end
|
|
716
726
|
|
|
717
727
|
# Builds the object from hash
|
|
@@ -15,13 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
17
|
class SandboxClass
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
LINUX_VM = "linux-vm".freeze
|
|
19
|
+
CONTAINER = "container".freeze
|
|
20
|
+
ANDROID = "android".freeze
|
|
21
21
|
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
22
22
|
|
|
23
23
|
def self.all_vars
|
|
24
|
-
@all_vars ||= [
|
|
24
|
+
@all_vars ||= [LINUX_VM, CONTAINER, ANDROID, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Builds the enum from string
|
|
@@ -415,7 +415,7 @@ module DaytonaApiClient
|
|
|
415
415
|
return false if @organization_id.nil?
|
|
416
416
|
return false if @name.nil?
|
|
417
417
|
return false if @target.nil?
|
|
418
|
-
sandbox_class_validator = EnumAttributeValidator.new('String', ["
|
|
418
|
+
sandbox_class_validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "unknown_default_open_api"])
|
|
419
419
|
return false unless sandbox_class_validator.valid?(@sandbox_class)
|
|
420
420
|
return false if @user.nil?
|
|
421
421
|
return false if @public.nil?
|
|
@@ -473,7 +473,7 @@ module DaytonaApiClient
|
|
|
473
473
|
# Custom attribute writer method checking allowed values (enum).
|
|
474
474
|
# @param [Object] sandbox_class Object to be assigned
|
|
475
475
|
def sandbox_class=(sandbox_class)
|
|
476
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
476
|
+
validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "unknown_default_open_api"])
|
|
477
477
|
unless validator.valid?(sandbox_class)
|
|
478
478
|
fail ArgumentError, "invalid value for \"sandbox_class\", must be one of #{validator.allowable_values}."
|
|
479
479
|
end
|
|
@@ -59,6 +59,9 @@ module DaytonaApiClient
|
|
|
59
59
|
# The snapshot reference
|
|
60
60
|
attr_accessor :ref
|
|
61
61
|
|
|
62
|
+
# The sandbox class of the snapshot
|
|
63
|
+
attr_accessor :sandbox_class
|
|
64
|
+
|
|
62
65
|
class EnumAttributeValidator
|
|
63
66
|
attr_reader :datatype
|
|
64
67
|
attr_reader :allowable_values
|
|
@@ -103,7 +106,8 @@ module DaytonaApiClient
|
|
|
103
106
|
:'build_info' => :'buildInfo',
|
|
104
107
|
:'region_ids' => :'regionIds',
|
|
105
108
|
:'initial_runner_id' => :'initialRunnerId',
|
|
106
|
-
:'ref' => :'ref'
|
|
109
|
+
:'ref' => :'ref',
|
|
110
|
+
:'sandbox_class' => :'sandboxClass'
|
|
107
111
|
}
|
|
108
112
|
end
|
|
109
113
|
|
|
@@ -139,7 +143,8 @@ module DaytonaApiClient
|
|
|
139
143
|
:'build_info' => :'BuildInfo',
|
|
140
144
|
:'region_ids' => :'Array<String>',
|
|
141
145
|
:'initial_runner_id' => :'String',
|
|
142
|
-
:'ref' => :'String'
|
|
146
|
+
:'ref' => :'String',
|
|
147
|
+
:'sandbox_class' => :'String'
|
|
143
148
|
}
|
|
144
149
|
end
|
|
145
150
|
|
|
@@ -280,6 +285,10 @@ module DaytonaApiClient
|
|
|
280
285
|
if attributes.key?(:'ref')
|
|
281
286
|
self.ref = attributes[:'ref']
|
|
282
287
|
end
|
|
288
|
+
|
|
289
|
+
if attributes.key?(:'sandbox_class')
|
|
290
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
291
|
+
end
|
|
283
292
|
end
|
|
284
293
|
|
|
285
294
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -344,6 +353,8 @@ module DaytonaApiClient
|
|
|
344
353
|
return false if @disk.nil?
|
|
345
354
|
return false if @created_at.nil?
|
|
346
355
|
return false if @updated_at.nil?
|
|
356
|
+
sandbox_class_validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "unknown_default_open_api"])
|
|
357
|
+
return false unless sandbox_class_validator.valid?(@sandbox_class)
|
|
347
358
|
true
|
|
348
359
|
end
|
|
349
360
|
|
|
@@ -447,6 +458,16 @@ module DaytonaApiClient
|
|
|
447
458
|
@updated_at = updated_at
|
|
448
459
|
end
|
|
449
460
|
|
|
461
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
462
|
+
# @param [Object] sandbox_class Object to be assigned
|
|
463
|
+
def sandbox_class=(sandbox_class)
|
|
464
|
+
validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "unknown_default_open_api"])
|
|
465
|
+
unless validator.valid?(sandbox_class)
|
|
466
|
+
fail ArgumentError, "invalid value for \"sandbox_class\", must be one of #{validator.allowable_values}."
|
|
467
|
+
end
|
|
468
|
+
@sandbox_class = sandbox_class
|
|
469
|
+
end
|
|
470
|
+
|
|
450
471
|
# Checks equality by comparing each attribute.
|
|
451
472
|
# @param [Object] Object to be compared
|
|
452
473
|
def ==(o)
|
|
@@ -471,7 +492,8 @@ module DaytonaApiClient
|
|
|
471
492
|
build_info == o.build_info &&
|
|
472
493
|
region_ids == o.region_ids &&
|
|
473
494
|
initial_runner_id == o.initial_runner_id &&
|
|
474
|
-
ref == o.ref
|
|
495
|
+
ref == o.ref &&
|
|
496
|
+
sandbox_class == o.sandbox_class
|
|
475
497
|
end
|
|
476
498
|
|
|
477
499
|
# @see the `==` method
|
|
@@ -483,7 +505,7 @@ module DaytonaApiClient
|
|
|
483
505
|
# Calculates hash code according to all attributes.
|
|
484
506
|
# @return [Integer] Hash code
|
|
485
507
|
def hash
|
|
486
|
-
[id, organization_id, general, name, image_name, state, size, entrypoint, cpu, gpu, mem, disk, error_reason, created_at, updated_at, last_used_at, build_info, region_ids, initial_runner_id, ref].hash
|
|
508
|
+
[id, organization_id, general, name, image_name, state, size, entrypoint, cpu, gpu, mem, disk, error_reason, created_at, updated_at, last_used_at, build_info, region_ids, initial_runner_id, ref, sandbox_class].hash
|
|
487
509
|
end
|
|
488
510
|
|
|
489
511
|
# Builds the object from hash
|
|
@@ -15,6 +15,8 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
17
|
class UpdateOrganizationRegionQuota < ApiModelBase
|
|
18
|
+
attr_accessor :sandbox_class
|
|
19
|
+
|
|
18
20
|
attr_accessor :total_cpu_quota
|
|
19
21
|
|
|
20
22
|
attr_accessor :total_memory_quota
|
|
@@ -37,9 +39,32 @@ module DaytonaApiClient
|
|
|
37
39
|
|
|
38
40
|
attr_accessor :max_disk_per_gpu_sandbox
|
|
39
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
|
+
|
|
40
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
65
|
def self.attribute_map
|
|
42
66
|
{
|
|
67
|
+
:'sandbox_class' => :'sandboxClass',
|
|
43
68
|
:'total_cpu_quota' => :'totalCpuQuota',
|
|
44
69
|
:'total_memory_quota' => :'totalMemoryQuota',
|
|
45
70
|
:'total_disk_quota' => :'totalDiskQuota',
|
|
@@ -67,6 +92,7 @@ module DaytonaApiClient
|
|
|
67
92
|
# Attribute type mapping.
|
|
68
93
|
def self.openapi_types
|
|
69
94
|
{
|
|
95
|
+
:'sandbox_class' => :'SandboxClass',
|
|
70
96
|
:'total_cpu_quota' => :'Float',
|
|
71
97
|
:'total_memory_quota' => :'Float',
|
|
72
98
|
:'total_disk_quota' => :'Float',
|
|
@@ -114,6 +140,10 @@ module DaytonaApiClient
|
|
|
114
140
|
h[k.to_sym] = v
|
|
115
141
|
}
|
|
116
142
|
|
|
143
|
+
if attributes.key?(:'sandbox_class')
|
|
144
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
145
|
+
end
|
|
146
|
+
|
|
117
147
|
if attributes.key?(:'total_cpu_quota')
|
|
118
148
|
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
119
149
|
else
|
|
@@ -187,6 +217,7 @@ module DaytonaApiClient
|
|
|
187
217
|
def ==(o)
|
|
188
218
|
return true if self.equal?(o)
|
|
189
219
|
self.class == o.class &&
|
|
220
|
+
sandbox_class == o.sandbox_class &&
|
|
190
221
|
total_cpu_quota == o.total_cpu_quota &&
|
|
191
222
|
total_memory_quota == o.total_memory_quota &&
|
|
192
223
|
total_disk_quota == o.total_disk_quota &&
|
|
@@ -209,7 +240,7 @@ module DaytonaApiClient
|
|
|
209
240
|
# Calculates hash code according to all attributes.
|
|
210
241
|
# @return [Integer] Hash code
|
|
211
242
|
def hash
|
|
212
|
-
[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
|
|
243
|
+
[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
|
|
213
244
|
end
|
|
214
245
|
|
|
215
246
|
# Builds the object from hash
|
data/lib/daytona_api_client.rb
CHANGED
|
@@ -41,6 +41,7 @@ require 'daytona_api_client/models/create_linked_account'
|
|
|
41
41
|
require 'daytona_api_client/models/create_organization'
|
|
42
42
|
require 'daytona_api_client/models/create_organization_invitation'
|
|
43
43
|
require 'daytona_api_client/models/create_organization_quota'
|
|
44
|
+
require 'daytona_api_client/models/create_organization_region_quota'
|
|
44
45
|
require 'daytona_api_client/models/create_organization_role'
|
|
45
46
|
require 'daytona_api_client/models/create_region'
|
|
46
47
|
require 'daytona_api_client/models/create_region_response'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: daytona_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.183.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- daytonaio
|
|
@@ -111,6 +111,7 @@ files:
|
|
|
111
111
|
- lib/daytona_api_client/models/create_organization.rb
|
|
112
112
|
- lib/daytona_api_client/models/create_organization_invitation.rb
|
|
113
113
|
- lib/daytona_api_client/models/create_organization_quota.rb
|
|
114
|
+
- lib/daytona_api_client/models/create_organization_region_quota.rb
|
|
114
115
|
- lib/daytona_api_client/models/create_organization_role.rb
|
|
115
116
|
- lib/daytona_api_client/models/create_region.rb
|
|
116
117
|
- lib/daytona_api_client/models/create_region_response.rb
|