daytona_api_client 0.184.0.alpha.1 → 0.184.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 +2 -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 +372 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +25 -47
- data/lib/daytona_api_client/models/create_snapshot.rb +48 -4
- data/lib/daytona_api_client/models/gpu_type.rb +41 -0
- data/lib/daytona_api_client/models/region_quota.rb +60 -1
- data/lib/daytona_api_client/models/region_usage_overview.rb +60 -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 +35 -15
- data/lib/daytona_api_client/models/sandbox_class.rb +5 -4
- data/lib/daytona_api_client/models/sandbox_list_item.rb +13 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +36 -4
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +44 -1
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +2 -0
- metadata +3 -1
|
@@ -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
|
|
@@ -27,6 +29,8 @@ module DaytonaApiClient
|
|
|
27
29
|
|
|
28
30
|
attr_accessor :total_gpu_quota
|
|
29
31
|
|
|
32
|
+
attr_accessor :allowed_gpu_types
|
|
33
|
+
|
|
30
34
|
attr_accessor :max_cpu_per_sandbox
|
|
31
35
|
|
|
32
36
|
attr_accessor :max_memory_per_sandbox
|
|
@@ -41,15 +45,39 @@ module DaytonaApiClient
|
|
|
41
45
|
|
|
42
46
|
attr_accessor :max_disk_per_gpu_sandbox
|
|
43
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
|
+
|
|
44
70
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
71
|
def self.attribute_map
|
|
46
72
|
{
|
|
47
73
|
:'organization_id' => :'organizationId',
|
|
48
74
|
:'region_id' => :'regionId',
|
|
75
|
+
:'sandbox_class' => :'sandboxClass',
|
|
49
76
|
:'total_cpu_quota' => :'totalCpuQuota',
|
|
50
77
|
:'total_memory_quota' => :'totalMemoryQuota',
|
|
51
78
|
:'total_disk_quota' => :'totalDiskQuota',
|
|
52
79
|
:'total_gpu_quota' => :'totalGpuQuota',
|
|
80
|
+
:'allowed_gpu_types' => :'allowedGpuTypes',
|
|
53
81
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
54
82
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
55
83
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
@@ -75,10 +103,12 @@ module DaytonaApiClient
|
|
|
75
103
|
{
|
|
76
104
|
:'organization_id' => :'String',
|
|
77
105
|
:'region_id' => :'String',
|
|
106
|
+
:'sandbox_class' => :'SandboxClass',
|
|
78
107
|
:'total_cpu_quota' => :'Float',
|
|
79
108
|
:'total_memory_quota' => :'Float',
|
|
80
109
|
:'total_disk_quota' => :'Float',
|
|
81
110
|
:'total_gpu_quota' => :'Float',
|
|
111
|
+
:'allowed_gpu_types' => :'Array<GpuType>',
|
|
82
112
|
:'max_cpu_per_sandbox' => :'Float',
|
|
83
113
|
:'max_memory_per_sandbox' => :'Float',
|
|
84
114
|
:'max_disk_per_sandbox' => :'Float',
|
|
@@ -130,6 +160,12 @@ module DaytonaApiClient
|
|
|
130
160
|
self.region_id = nil
|
|
131
161
|
end
|
|
132
162
|
|
|
163
|
+
if attributes.key?(:'sandbox_class')
|
|
164
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
165
|
+
else
|
|
166
|
+
self.sandbox_class = nil
|
|
167
|
+
end
|
|
168
|
+
|
|
133
169
|
if attributes.key?(:'total_cpu_quota')
|
|
134
170
|
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
135
171
|
else
|
|
@@ -154,6 +190,12 @@ module DaytonaApiClient
|
|
|
154
190
|
self.total_gpu_quota = nil
|
|
155
191
|
end
|
|
156
192
|
|
|
193
|
+
if attributes.key?(:'allowed_gpu_types')
|
|
194
|
+
if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
|
|
195
|
+
self.allowed_gpu_types = value
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
157
199
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
158
200
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
159
201
|
else
|
|
@@ -210,6 +252,10 @@ module DaytonaApiClient
|
|
|
210
252
|
invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
|
|
211
253
|
end
|
|
212
254
|
|
|
255
|
+
if @sandbox_class.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
213
259
|
if @total_cpu_quota.nil?
|
|
214
260
|
invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
|
|
215
261
|
end
|
|
@@ -235,6 +281,7 @@ module DaytonaApiClient
|
|
|
235
281
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
236
282
|
return false if @organization_id.nil?
|
|
237
283
|
return false if @region_id.nil?
|
|
284
|
+
return false if @sandbox_class.nil?
|
|
238
285
|
return false if @total_cpu_quota.nil?
|
|
239
286
|
return false if @total_memory_quota.nil?
|
|
240
287
|
return false if @total_disk_quota.nil?
|
|
@@ -262,6 +309,16 @@ module DaytonaApiClient
|
|
|
262
309
|
@region_id = region_id
|
|
263
310
|
end
|
|
264
311
|
|
|
312
|
+
# Custom attribute writer method with validation
|
|
313
|
+
# @param [Object] sandbox_class Value to be assigned
|
|
314
|
+
def sandbox_class=(sandbox_class)
|
|
315
|
+
if sandbox_class.nil?
|
|
316
|
+
fail ArgumentError, 'sandbox_class cannot be nil'
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
@sandbox_class = sandbox_class
|
|
320
|
+
end
|
|
321
|
+
|
|
265
322
|
# Custom attribute writer method with validation
|
|
266
323
|
# @param [Object] total_cpu_quota Value to be assigned
|
|
267
324
|
def total_cpu_quota=(total_cpu_quota)
|
|
@@ -309,10 +366,12 @@ module DaytonaApiClient
|
|
|
309
366
|
self.class == o.class &&
|
|
310
367
|
organization_id == o.organization_id &&
|
|
311
368
|
region_id == o.region_id &&
|
|
369
|
+
sandbox_class == o.sandbox_class &&
|
|
312
370
|
total_cpu_quota == o.total_cpu_quota &&
|
|
313
371
|
total_memory_quota == o.total_memory_quota &&
|
|
314
372
|
total_disk_quota == o.total_disk_quota &&
|
|
315
373
|
total_gpu_quota == o.total_gpu_quota &&
|
|
374
|
+
allowed_gpu_types == o.allowed_gpu_types &&
|
|
316
375
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
317
376
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
318
377
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
@@ -331,7 +390,7 @@ module DaytonaApiClient
|
|
|
331
390
|
# Calculates hash code according to all attributes.
|
|
332
391
|
# @return [Integer] Hash code
|
|
333
392
|
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
|
|
393
|
+
[organization_id, region_id, sandbox_class, total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, allowed_gpu_types, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
|
|
335
394
|
end
|
|
336
395
|
|
|
337
396
|
# Builds the object from hash
|
|
@@ -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
|
|
@@ -33,6 +35,8 @@ module DaytonaApiClient
|
|
|
33
35
|
|
|
34
36
|
attr_accessor :current_gpu_usage
|
|
35
37
|
|
|
38
|
+
attr_accessor :allowed_gpu_types
|
|
39
|
+
|
|
36
40
|
attr_accessor :max_cpu_per_sandbox
|
|
37
41
|
|
|
38
42
|
attr_accessor :max_memory_per_sandbox
|
|
@@ -47,10 +51,33 @@ module DaytonaApiClient
|
|
|
47
51
|
|
|
48
52
|
attr_accessor :max_disk_per_gpu_sandbox
|
|
49
53
|
|
|
54
|
+
class EnumAttributeValidator
|
|
55
|
+
attr_reader :datatype
|
|
56
|
+
attr_reader :allowable_values
|
|
57
|
+
|
|
58
|
+
def initialize(datatype, allowable_values)
|
|
59
|
+
@allowable_values = allowable_values.map do |value|
|
|
60
|
+
case datatype.to_s
|
|
61
|
+
when /Integer/i
|
|
62
|
+
value.to_i
|
|
63
|
+
when /Float/i
|
|
64
|
+
value.to_f
|
|
65
|
+
else
|
|
66
|
+
value
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def valid?(value)
|
|
72
|
+
!value || allowable_values.include?(value)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
50
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
77
|
def self.attribute_map
|
|
52
78
|
{
|
|
53
79
|
:'region_id' => :'regionId',
|
|
80
|
+
:'sandbox_class' => :'sandboxClass',
|
|
54
81
|
:'total_cpu_quota' => :'totalCpuQuota',
|
|
55
82
|
:'current_cpu_usage' => :'currentCpuUsage',
|
|
56
83
|
:'total_memory_quota' => :'totalMemoryQuota',
|
|
@@ -59,6 +86,7 @@ module DaytonaApiClient
|
|
|
59
86
|
:'current_disk_usage' => :'currentDiskUsage',
|
|
60
87
|
:'total_gpu_quota' => :'totalGpuQuota',
|
|
61
88
|
:'current_gpu_usage' => :'currentGpuUsage',
|
|
89
|
+
:'allowed_gpu_types' => :'allowedGpuTypes',
|
|
62
90
|
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
63
91
|
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
64
92
|
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
@@ -83,6 +111,7 @@ module DaytonaApiClient
|
|
|
83
111
|
def self.openapi_types
|
|
84
112
|
{
|
|
85
113
|
:'region_id' => :'String',
|
|
114
|
+
:'sandbox_class' => :'SandboxClass',
|
|
86
115
|
:'total_cpu_quota' => :'Float',
|
|
87
116
|
:'current_cpu_usage' => :'Float',
|
|
88
117
|
:'total_memory_quota' => :'Float',
|
|
@@ -91,6 +120,7 @@ module DaytonaApiClient
|
|
|
91
120
|
:'current_disk_usage' => :'Float',
|
|
92
121
|
:'total_gpu_quota' => :'Float',
|
|
93
122
|
:'current_gpu_usage' => :'Float',
|
|
123
|
+
:'allowed_gpu_types' => :'Array<GpuType>',
|
|
94
124
|
:'max_cpu_per_sandbox' => :'Float',
|
|
95
125
|
:'max_memory_per_sandbox' => :'Float',
|
|
96
126
|
:'max_disk_per_sandbox' => :'Float',
|
|
@@ -136,6 +166,12 @@ module DaytonaApiClient
|
|
|
136
166
|
self.region_id = nil
|
|
137
167
|
end
|
|
138
168
|
|
|
169
|
+
if attributes.key?(:'sandbox_class')
|
|
170
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
171
|
+
else
|
|
172
|
+
self.sandbox_class = nil
|
|
173
|
+
end
|
|
174
|
+
|
|
139
175
|
if attributes.key?(:'total_cpu_quota')
|
|
140
176
|
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
141
177
|
else
|
|
@@ -184,6 +220,12 @@ module DaytonaApiClient
|
|
|
184
220
|
self.current_gpu_usage = nil
|
|
185
221
|
end
|
|
186
222
|
|
|
223
|
+
if attributes.key?(:'allowed_gpu_types')
|
|
224
|
+
if (value = attributes[:'allowed_gpu_types']).is_a?(Array)
|
|
225
|
+
self.allowed_gpu_types = value
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
187
229
|
if attributes.key?(:'max_cpu_per_sandbox')
|
|
188
230
|
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
189
231
|
else
|
|
@@ -236,6 +278,10 @@ module DaytonaApiClient
|
|
|
236
278
|
invalid_properties.push('invalid value for "region_id", region_id cannot be nil.')
|
|
237
279
|
end
|
|
238
280
|
|
|
281
|
+
if @sandbox_class.nil?
|
|
282
|
+
invalid_properties.push('invalid value for "sandbox_class", sandbox_class cannot be nil.')
|
|
283
|
+
end
|
|
284
|
+
|
|
239
285
|
if @total_cpu_quota.nil?
|
|
240
286
|
invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
|
|
241
287
|
end
|
|
@@ -276,6 +322,7 @@ module DaytonaApiClient
|
|
|
276
322
|
def valid?
|
|
277
323
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
278
324
|
return false if @region_id.nil?
|
|
325
|
+
return false if @sandbox_class.nil?
|
|
279
326
|
return false if @total_cpu_quota.nil?
|
|
280
327
|
return false if @current_cpu_usage.nil?
|
|
281
328
|
return false if @total_memory_quota.nil?
|
|
@@ -297,6 +344,16 @@ module DaytonaApiClient
|
|
|
297
344
|
@region_id = region_id
|
|
298
345
|
end
|
|
299
346
|
|
|
347
|
+
# Custom attribute writer method with validation
|
|
348
|
+
# @param [Object] sandbox_class Value to be assigned
|
|
349
|
+
def sandbox_class=(sandbox_class)
|
|
350
|
+
if sandbox_class.nil?
|
|
351
|
+
fail ArgumentError, 'sandbox_class cannot be nil'
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
@sandbox_class = sandbox_class
|
|
355
|
+
end
|
|
356
|
+
|
|
300
357
|
# Custom attribute writer method with validation
|
|
301
358
|
# @param [Object] total_cpu_quota Value to be assigned
|
|
302
359
|
def total_cpu_quota=(total_cpu_quota)
|
|
@@ -383,6 +440,7 @@ module DaytonaApiClient
|
|
|
383
440
|
return true if self.equal?(o)
|
|
384
441
|
self.class == o.class &&
|
|
385
442
|
region_id == o.region_id &&
|
|
443
|
+
sandbox_class == o.sandbox_class &&
|
|
386
444
|
total_cpu_quota == o.total_cpu_quota &&
|
|
387
445
|
current_cpu_usage == o.current_cpu_usage &&
|
|
388
446
|
total_memory_quota == o.total_memory_quota &&
|
|
@@ -391,6 +449,7 @@ module DaytonaApiClient
|
|
|
391
449
|
current_disk_usage == o.current_disk_usage &&
|
|
392
450
|
total_gpu_quota == o.total_gpu_quota &&
|
|
393
451
|
current_gpu_usage == o.current_gpu_usage &&
|
|
452
|
+
allowed_gpu_types == o.allowed_gpu_types &&
|
|
394
453
|
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
395
454
|
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
396
455
|
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
@@ -409,7 +468,7 @@ module DaytonaApiClient
|
|
|
409
468
|
# Calculates hash code according to all attributes.
|
|
410
469
|
# @return [Integer] Hash code
|
|
411
470
|
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
|
|
471
|
+
[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, allowed_gpu_types, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, max_disk_per_non_ephemeral_sandbox, max_cpu_per_gpu_sandbox, max_memory_per_gpu_sandbox, max_disk_per_gpu_sandbox].hash
|
|
413
472
|
end
|
|
414
473
|
|
|
415
474
|
# 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
|
|
@@ -54,6 +54,9 @@ module DaytonaApiClient
|
|
|
54
54
|
# The GPU quota for the sandbox
|
|
55
55
|
attr_accessor :gpu
|
|
56
56
|
|
|
57
|
+
# The GPU type assigned to the sandbox
|
|
58
|
+
attr_accessor :gpu_type
|
|
59
|
+
|
|
57
60
|
# The memory quota for the sandbox
|
|
58
61
|
attr_accessor :memory
|
|
59
62
|
|
|
@@ -103,7 +106,7 @@ module DaytonaApiClient
|
|
|
103
106
|
attr_accessor :last_activity_at
|
|
104
107
|
|
|
105
108
|
# The class of the sandbox
|
|
106
|
-
attr_accessor :
|
|
109
|
+
attr_accessor :sandbox_class
|
|
107
110
|
|
|
108
111
|
# The version of the daemon running in the sandbox
|
|
109
112
|
attr_accessor :daemon_version
|
|
@@ -111,6 +114,9 @@ module DaytonaApiClient
|
|
|
111
114
|
# The runner ID of the sandbox
|
|
112
115
|
attr_accessor :runner_id
|
|
113
116
|
|
|
117
|
+
# ID of the sandbox this sandbox is linked to. When set, the sandbox is co-located on the same runner as the linked sandbox.
|
|
118
|
+
attr_accessor :linked_sandbox_id
|
|
119
|
+
|
|
114
120
|
# The toolbox proxy URL for the sandbox
|
|
115
121
|
attr_accessor :toolbox_proxy_url
|
|
116
122
|
|
|
@@ -152,6 +158,7 @@ module DaytonaApiClient
|
|
|
152
158
|
:'target' => :'target',
|
|
153
159
|
:'cpu' => :'cpu',
|
|
154
160
|
:'gpu' => :'gpu',
|
|
161
|
+
:'gpu_type' => :'gpuType',
|
|
155
162
|
:'memory' => :'memory',
|
|
156
163
|
:'disk' => :'disk',
|
|
157
164
|
:'state' => :'state',
|
|
@@ -168,9 +175,10 @@ module DaytonaApiClient
|
|
|
168
175
|
:'created_at' => :'createdAt',
|
|
169
176
|
:'updated_at' => :'updatedAt',
|
|
170
177
|
:'last_activity_at' => :'lastActivityAt',
|
|
171
|
-
:'
|
|
178
|
+
:'sandbox_class' => :'sandboxClass',
|
|
172
179
|
:'daemon_version' => :'daemonVersion',
|
|
173
180
|
:'runner_id' => :'runnerId',
|
|
181
|
+
:'linked_sandbox_id' => :'linkedSandboxId',
|
|
174
182
|
:'toolbox_proxy_url' => :'toolboxProxyUrl'
|
|
175
183
|
}
|
|
176
184
|
end
|
|
@@ -201,6 +209,7 @@ module DaytonaApiClient
|
|
|
201
209
|
:'target' => :'String',
|
|
202
210
|
:'cpu' => :'Float',
|
|
203
211
|
:'gpu' => :'Float',
|
|
212
|
+
:'gpu_type' => :'GpuType',
|
|
204
213
|
:'memory' => :'Float',
|
|
205
214
|
:'disk' => :'Float',
|
|
206
215
|
:'state' => :'SandboxState',
|
|
@@ -217,9 +226,10 @@ module DaytonaApiClient
|
|
|
217
226
|
:'created_at' => :'String',
|
|
218
227
|
:'updated_at' => :'String',
|
|
219
228
|
:'last_activity_at' => :'String',
|
|
220
|
-
:'
|
|
229
|
+
:'sandbox_class' => :'String',
|
|
221
230
|
:'daemon_version' => :'String',
|
|
222
231
|
:'runner_id' => :'String',
|
|
232
|
+
:'linked_sandbox_id' => :'String',
|
|
223
233
|
:'toolbox_proxy_url' => :'String'
|
|
224
234
|
}
|
|
225
235
|
end
|
|
@@ -324,6 +334,10 @@ module DaytonaApiClient
|
|
|
324
334
|
self.gpu = nil
|
|
325
335
|
end
|
|
326
336
|
|
|
337
|
+
if attributes.key?(:'gpu_type')
|
|
338
|
+
self.gpu_type = attributes[:'gpu_type']
|
|
339
|
+
end
|
|
340
|
+
|
|
327
341
|
if attributes.key?(:'memory')
|
|
328
342
|
self.memory = attributes[:'memory']
|
|
329
343
|
else
|
|
@@ -394,8 +408,8 @@ module DaytonaApiClient
|
|
|
394
408
|
self.last_activity_at = attributes[:'last_activity_at']
|
|
395
409
|
end
|
|
396
410
|
|
|
397
|
-
if attributes.key?(:'
|
|
398
|
-
self.
|
|
411
|
+
if attributes.key?(:'sandbox_class')
|
|
412
|
+
self.sandbox_class = attributes[:'sandbox_class']
|
|
399
413
|
end
|
|
400
414
|
|
|
401
415
|
if attributes.key?(:'daemon_version')
|
|
@@ -406,6 +420,10 @@ module DaytonaApiClient
|
|
|
406
420
|
self.runner_id = attributes[:'runner_id']
|
|
407
421
|
end
|
|
408
422
|
|
|
423
|
+
if attributes.key?(:'linked_sandbox_id')
|
|
424
|
+
self.linked_sandbox_id = attributes[:'linked_sandbox_id']
|
|
425
|
+
end
|
|
426
|
+
|
|
409
427
|
if attributes.key?(:'toolbox_proxy_url')
|
|
410
428
|
self.toolbox_proxy_url = attributes[:'toolbox_proxy_url']
|
|
411
429
|
else
|
|
@@ -496,8 +514,8 @@ module DaytonaApiClient
|
|
|
496
514
|
return false if @disk.nil?
|
|
497
515
|
backup_state_validator = EnumAttributeValidator.new('String', ["None", "Pending", "InProgress", "Completed", "Error", "unknown_default_open_api"])
|
|
498
516
|
return false unless backup_state_validator.valid?(@backup_state)
|
|
499
|
-
|
|
500
|
-
return false unless
|
|
517
|
+
sandbox_class_validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "windows", "unknown_default_open_api"])
|
|
518
|
+
return false unless sandbox_class_validator.valid?(@sandbox_class)
|
|
501
519
|
return false if @toolbox_proxy_url.nil?
|
|
502
520
|
true
|
|
503
521
|
end
|
|
@@ -643,13 +661,13 @@ module DaytonaApiClient
|
|
|
643
661
|
end
|
|
644
662
|
|
|
645
663
|
# 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 \"
|
|
664
|
+
# @param [Object] sandbox_class Object to be assigned
|
|
665
|
+
def sandbox_class=(sandbox_class)
|
|
666
|
+
validator = EnumAttributeValidator.new('String', ["linux-vm", "container", "android", "windows", "unknown_default_open_api"])
|
|
667
|
+
unless validator.valid?(sandbox_class)
|
|
668
|
+
fail ArgumentError, "invalid value for \"sandbox_class\", must be one of #{validator.allowable_values}."
|
|
651
669
|
end
|
|
652
|
-
@
|
|
670
|
+
@sandbox_class = sandbox_class
|
|
653
671
|
end
|
|
654
672
|
|
|
655
673
|
# Custom attribute writer method with validation
|
|
@@ -680,6 +698,7 @@ module DaytonaApiClient
|
|
|
680
698
|
target == o.target &&
|
|
681
699
|
cpu == o.cpu &&
|
|
682
700
|
gpu == o.gpu &&
|
|
701
|
+
gpu_type == o.gpu_type &&
|
|
683
702
|
memory == o.memory &&
|
|
684
703
|
disk == o.disk &&
|
|
685
704
|
state == o.state &&
|
|
@@ -696,9 +715,10 @@ module DaytonaApiClient
|
|
|
696
715
|
created_at == o.created_at &&
|
|
697
716
|
updated_at == o.updated_at &&
|
|
698
717
|
last_activity_at == o.last_activity_at &&
|
|
699
|
-
|
|
718
|
+
sandbox_class == o.sandbox_class &&
|
|
700
719
|
daemon_version == o.daemon_version &&
|
|
701
720
|
runner_id == o.runner_id &&
|
|
721
|
+
linked_sandbox_id == o.linked_sandbox_id &&
|
|
702
722
|
toolbox_proxy_url == o.toolbox_proxy_url
|
|
703
723
|
end
|
|
704
724
|
|
|
@@ -711,7 +731,7 @@ module DaytonaApiClient
|
|
|
711
731
|
# Calculates hash code according to all attributes.
|
|
712
732
|
# @return [Integer] Hash code
|
|
713
733
|
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,
|
|
734
|
+
[id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, gpu_type, 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
735
|
end
|
|
716
736
|
|
|
717
737
|
# Builds the object from hash
|
|
@@ -15,13 +15,14 @@ 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
|
+
WINDOWS = "windows".freeze
|
|
21
22
|
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
22
23
|
|
|
23
24
|
def self.all_vars
|
|
24
|
-
@all_vars ||= [
|
|
25
|
+
@all_vars ||= [LINUX_VM, CONTAINER, ANDROID, WINDOWS, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
# Builds the enum from string
|