daytona_api_client 0.183.0 → 0.184.0.alpha.1
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 +0 -1
- data/lib/daytona_api_client/api/admin_api.rb +0 -298
- data/lib/daytona_api_client/api/sandbox_api.rb +0 -3
- data/lib/daytona_api_client/models/create_sandbox.rb +47 -13
- data/lib/daytona_api_client/models/create_snapshot.rb +4 -36
- data/lib/daytona_api_client/models/region_quota.rb +1 -49
- data/lib/daytona_api_client/models/region_usage_overview.rb +1 -49
- data/lib/daytona_api_client/models/runner.rb +25 -8
- data/lib/daytona_api_client/models/runner_full.rb +25 -8
- data/lib/daytona_api_client/models/sandbox.rb +15 -25
- 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 +4 -26
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +1 -32
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +0 -1
- metadata +1 -2
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -360
|
@@ -15,8 +15,6 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
17
|
class UpdateOrganizationRegionQuota < ApiModelBase
|
|
18
|
-
attr_accessor :sandbox_class
|
|
19
|
-
|
|
20
18
|
attr_accessor :total_cpu_quota
|
|
21
19
|
|
|
22
20
|
attr_accessor :total_memory_quota
|
|
@@ -39,32 +37,9 @@ module DaytonaApiClient
|
|
|
39
37
|
|
|
40
38
|
attr_accessor :max_disk_per_gpu_sandbox
|
|
41
39
|
|
|
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
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
41
|
def self.attribute_map
|
|
66
42
|
{
|
|
67
|
-
:'sandbox_class' => :'sandboxClass',
|
|
68
43
|
:'total_cpu_quota' => :'totalCpuQuota',
|
|
69
44
|
:'total_memory_quota' => :'totalMemoryQuota',
|
|
70
45
|
:'total_disk_quota' => :'totalDiskQuota',
|
|
@@ -92,7 +67,6 @@ module DaytonaApiClient
|
|
|
92
67
|
# Attribute type mapping.
|
|
93
68
|
def self.openapi_types
|
|
94
69
|
{
|
|
95
|
-
:'sandbox_class' => :'SandboxClass',
|
|
96
70
|
:'total_cpu_quota' => :'Float',
|
|
97
71
|
:'total_memory_quota' => :'Float',
|
|
98
72
|
:'total_disk_quota' => :'Float',
|
|
@@ -140,10 +114,6 @@ module DaytonaApiClient
|
|
|
140
114
|
h[k.to_sym] = v
|
|
141
115
|
}
|
|
142
116
|
|
|
143
|
-
if attributes.key?(:'sandbox_class')
|
|
144
|
-
self.sandbox_class = attributes[:'sandbox_class']
|
|
145
|
-
end
|
|
146
|
-
|
|
147
117
|
if attributes.key?(:'total_cpu_quota')
|
|
148
118
|
self.total_cpu_quota = attributes[:'total_cpu_quota']
|
|
149
119
|
else
|
|
@@ -217,7 +187,6 @@ module DaytonaApiClient
|
|
|
217
187
|
def ==(o)
|
|
218
188
|
return true if self.equal?(o)
|
|
219
189
|
self.class == o.class &&
|
|
220
|
-
sandbox_class == o.sandbox_class &&
|
|
221
190
|
total_cpu_quota == o.total_cpu_quota &&
|
|
222
191
|
total_memory_quota == o.total_memory_quota &&
|
|
223
192
|
total_disk_quota == o.total_disk_quota &&
|
|
@@ -240,7 +209,7 @@ module DaytonaApiClient
|
|
|
240
209
|
# Calculates hash code according to all attributes.
|
|
241
210
|
# @return [Integer] Hash code
|
|
242
211
|
def hash
|
|
243
|
-
[
|
|
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
|
|
244
213
|
end
|
|
245
214
|
|
|
246
215
|
# Builds the object from hash
|
data/lib/daytona_api_client.rb
CHANGED
|
@@ -41,7 +41,6 @@ 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'
|
|
45
44
|
require 'daytona_api_client/models/create_organization_role'
|
|
46
45
|
require 'daytona_api_client/models/create_region'
|
|
47
46
|
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.184.0.alpha.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- daytonaio
|
|
@@ -111,7 +111,6 @@ 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
|
|
115
114
|
- lib/daytona_api_client/models/create_organization_role.rb
|
|
116
115
|
- lib/daytona_api_client/models/create_region.rb
|
|
117
116
|
- lib/daytona_api_client/models/create_region_response.rb
|
|
@@ -1,360 +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.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
|