daytona_api_client 0.126.0.pre.alpha.4 → 0.134.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 +23 -0
- data/.openapi-generator-ignore +0 -2
- data/daytona_api_client.gemspec +1 -1
- data/fix-gemspec.sh +1 -1
- data/lib/daytona_api_client/api/admin_api.rb +325 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +3 -0
- data/lib/daytona_api_client/api/jobs_api.rb +299 -0
- data/lib/daytona_api_client/api/organizations_api.rb +518 -0
- data/lib/daytona_api_client/api/preview_api.rb +67 -0
- data/lib/daytona_api_client/api/regions_api.rb +9 -15
- data/lib/daytona_api_client/api/runners_api.rb +291 -23
- data/lib/daytona_api_client/api/sandbox_api.rb +277 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +66 -0
- data/lib/daytona_api_client/models/admin_create_runner.rb +385 -0
- data/lib/daytona_api_client/models/build_info.rb +31 -4
- data/lib/daytona_api_client/models/create_region.rb +269 -0
- data/lib/daytona_api_client/models/create_region_response.rb +280 -0
- data/lib/daytona_api_client/models/create_runner.rb +31 -315
- data/lib/daytona_api_client/models/create_runner_response.rb +263 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +14 -4
- data/lib/daytona_api_client/models/{create_audit_log.rb → job.rb} +166 -79
- data/lib/daytona_api_client/models/job_status.rb +42 -0
- data/lib/daytona_api_client/models/job_type.rb +49 -0
- data/lib/daytona_api_client/models/{paginated_snapshots_dto.rb → paginated_jobs.rb} +4 -4
- data/lib/daytona_api_client/models/poll_jobs_response.rb +238 -0
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +236 -0
- data/lib/daytona_api_client/models/region.rb +86 -4
- data/lib/daytona_api_client/models/region_type.rb +41 -0
- data/lib/daytona_api_client/models/runner.rb +79 -117
- data/lib/daytona_api_client/models/runner_full.rb +779 -0
- data/lib/daytona_api_client/models/runner_health_metrics.rb +533 -0
- data/lib/daytona_api_client/models/runner_healthcheck.rb +276 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +0 -17
- data/lib/daytona_api_client/models/sandbox.rb +14 -4
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +317 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +36 -4
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +263 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +31 -4
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +236 -0
- data/lib/daytona_api_client/models/update_job_status.rb +278 -0
- data/lib/daytona_api_client/models/update_region.rb +242 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +14 -4
- data/lib/daytona_api_client/models/url.rb +236 -0
- data/lib/daytona_api_client/models/workspace.rb +11 -1
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +22 -0
- data/project.json +10 -4
- metadata +23 -5
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -101
|
@@ -42,6 +42,9 @@ module DaytonaApiClient
|
|
|
42
42
|
# Build information for the snapshot
|
|
43
43
|
attr_accessor :build_info
|
|
44
44
|
|
|
45
|
+
# ID of the region where the snapshot will be available. Defaults to organization default region if not specified.
|
|
46
|
+
attr_accessor :region_id
|
|
47
|
+
|
|
45
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
49
|
def self.attribute_map
|
|
47
50
|
{
|
|
@@ -53,7 +56,8 @@ module DaytonaApiClient
|
|
|
53
56
|
:'gpu' => :'gpu',
|
|
54
57
|
:'memory' => :'memory',
|
|
55
58
|
:'disk' => :'disk',
|
|
56
|
-
:'build_info' => :'buildInfo'
|
|
59
|
+
:'build_info' => :'buildInfo',
|
|
60
|
+
:'region_id' => :'regionId'
|
|
57
61
|
}
|
|
58
62
|
end
|
|
59
63
|
|
|
@@ -78,7 +82,8 @@ module DaytonaApiClient
|
|
|
78
82
|
:'gpu' => :'Integer',
|
|
79
83
|
:'memory' => :'Integer',
|
|
80
84
|
:'disk' => :'Integer',
|
|
81
|
-
:'build_info' => :'CreateBuildInfo'
|
|
85
|
+
:'build_info' => :'CreateBuildInfo',
|
|
86
|
+
:'region_id' => :'String'
|
|
82
87
|
}
|
|
83
88
|
end
|
|
84
89
|
|
|
@@ -143,6 +148,10 @@ module DaytonaApiClient
|
|
|
143
148
|
if attributes.key?(:'build_info')
|
|
144
149
|
self.build_info = attributes[:'build_info']
|
|
145
150
|
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'region_id')
|
|
153
|
+
self.region_id = attributes[:'region_id']
|
|
154
|
+
end
|
|
146
155
|
end
|
|
147
156
|
|
|
148
157
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -188,7 +197,8 @@ module DaytonaApiClient
|
|
|
188
197
|
gpu == o.gpu &&
|
|
189
198
|
memory == o.memory &&
|
|
190
199
|
disk == o.disk &&
|
|
191
|
-
build_info == o.build_info
|
|
200
|
+
build_info == o.build_info &&
|
|
201
|
+
region_id == o.region_id
|
|
192
202
|
end
|
|
193
203
|
|
|
194
204
|
# @see the `==` method
|
|
@@ -200,7 +210,7 @@ module DaytonaApiClient
|
|
|
200
210
|
# Calculates hash code according to all attributes.
|
|
201
211
|
# @return [Integer] Hash code
|
|
202
212
|
def hash
|
|
203
|
-
[name, image_name, entrypoint, general, cpu, gpu, memory, disk, build_info].hash
|
|
213
|
+
[name, image_name, entrypoint, general, cpu, gpu, memory, disk, build_info, region_id].hash
|
|
204
214
|
end
|
|
205
215
|
|
|
206
216
|
# Builds the object from hash
|
|
@@ -14,18 +14,36 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class Job
|
|
18
|
+
# The ID of the job
|
|
19
|
+
attr_accessor :id
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
# The type of the job
|
|
22
|
+
attr_accessor :type
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
# The status of the job
|
|
25
|
+
attr_accessor :status
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
# The type of resource this job operates on
|
|
28
|
+
attr_accessor :resource_type
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
# The ID of the resource this job operates on (sandboxId, snapshotRef, etc.)
|
|
31
|
+
attr_accessor :resource_id
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
# Job-specific JSON-encoded payload data (operational metadata)
|
|
34
|
+
attr_accessor :payload
|
|
35
|
+
|
|
36
|
+
# OpenTelemetry trace context for distributed tracing (W3C Trace Context format)
|
|
37
|
+
attr_accessor :trace_context
|
|
38
|
+
|
|
39
|
+
# Error message if the job failed
|
|
40
|
+
attr_accessor :error_message
|
|
41
|
+
|
|
42
|
+
# The creation timestamp of the job
|
|
43
|
+
attr_accessor :created_at
|
|
44
|
+
|
|
45
|
+
# The last update timestamp of the job
|
|
46
|
+
attr_accessor :updated_at
|
|
29
47
|
|
|
30
48
|
class EnumAttributeValidator
|
|
31
49
|
attr_reader :datatype
|
|
@@ -52,12 +70,16 @@ module DaytonaApiClient
|
|
|
52
70
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
71
|
def self.attribute_map
|
|
54
72
|
{
|
|
55
|
-
:'
|
|
56
|
-
:'
|
|
57
|
-
:'
|
|
58
|
-
:'
|
|
59
|
-
:'
|
|
60
|
-
:'
|
|
73
|
+
:'id' => :'id',
|
|
74
|
+
:'type' => :'type',
|
|
75
|
+
:'status' => :'status',
|
|
76
|
+
:'resource_type' => :'resourceType',
|
|
77
|
+
:'resource_id' => :'resourceId',
|
|
78
|
+
:'payload' => :'payload',
|
|
79
|
+
:'trace_context' => :'traceContext',
|
|
80
|
+
:'error_message' => :'errorMessage',
|
|
81
|
+
:'created_at' => :'createdAt',
|
|
82
|
+
:'updated_at' => :'updatedAt'
|
|
61
83
|
}
|
|
62
84
|
end
|
|
63
85
|
|
|
@@ -74,12 +96,16 @@ module DaytonaApiClient
|
|
|
74
96
|
# Attribute type mapping.
|
|
75
97
|
def self.openapi_types
|
|
76
98
|
{
|
|
77
|
-
:'
|
|
78
|
-
:'
|
|
79
|
-
:'
|
|
80
|
-
:'
|
|
81
|
-
:'
|
|
82
|
-
:'
|
|
99
|
+
:'id' => :'String',
|
|
100
|
+
:'type' => :'JobType',
|
|
101
|
+
:'status' => :'JobStatus',
|
|
102
|
+
:'resource_type' => :'String',
|
|
103
|
+
:'resource_id' => :'String',
|
|
104
|
+
:'payload' => :'String',
|
|
105
|
+
:'trace_context' => :'Hash<String, Object>',
|
|
106
|
+
:'error_message' => :'String',
|
|
107
|
+
:'created_at' => :'String',
|
|
108
|
+
:'updated_at' => :'String'
|
|
83
109
|
}
|
|
84
110
|
end
|
|
85
111
|
|
|
@@ -93,46 +119,70 @@ module DaytonaApiClient
|
|
|
93
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
120
|
def initialize(attributes = {})
|
|
95
121
|
if (!attributes.is_a?(Hash))
|
|
96
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
122
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::Job` initialize method"
|
|
97
123
|
end
|
|
98
124
|
|
|
99
125
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
126
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
127
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
128
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
103
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::Job`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
130
|
end
|
|
105
131
|
h[k.to_sym] = v
|
|
106
132
|
}
|
|
107
133
|
|
|
108
|
-
if attributes.key?(:'
|
|
109
|
-
self.
|
|
134
|
+
if attributes.key?(:'id')
|
|
135
|
+
self.id = attributes[:'id']
|
|
110
136
|
else
|
|
111
|
-
self.
|
|
137
|
+
self.id = nil
|
|
112
138
|
end
|
|
113
139
|
|
|
114
|
-
if attributes.key?(:'
|
|
115
|
-
self.
|
|
140
|
+
if attributes.key?(:'type')
|
|
141
|
+
self.type = attributes[:'type']
|
|
116
142
|
else
|
|
117
|
-
self.
|
|
143
|
+
self.type = nil
|
|
118
144
|
end
|
|
119
145
|
|
|
120
|
-
if attributes.key?(:'
|
|
121
|
-
self.
|
|
146
|
+
if attributes.key?(:'status')
|
|
147
|
+
self.status = attributes[:'status']
|
|
148
|
+
else
|
|
149
|
+
self.status = nil
|
|
122
150
|
end
|
|
123
151
|
|
|
124
|
-
if attributes.key?(:'
|
|
125
|
-
self.
|
|
152
|
+
if attributes.key?(:'resource_type')
|
|
153
|
+
self.resource_type = attributes[:'resource_type']
|
|
126
154
|
else
|
|
127
|
-
self.
|
|
155
|
+
self.resource_type = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'resource_id')
|
|
159
|
+
self.resource_id = attributes[:'resource_id']
|
|
160
|
+
else
|
|
161
|
+
self.resource_id = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'payload')
|
|
165
|
+
self.payload = attributes[:'payload']
|
|
128
166
|
end
|
|
129
167
|
|
|
130
|
-
if attributes.key?(:'
|
|
131
|
-
|
|
168
|
+
if attributes.key?(:'trace_context')
|
|
169
|
+
if (value = attributes[:'trace_context']).is_a?(Hash)
|
|
170
|
+
self.trace_context = value
|
|
171
|
+
end
|
|
132
172
|
end
|
|
133
173
|
|
|
134
|
-
if attributes.key?(:'
|
|
135
|
-
self.
|
|
174
|
+
if attributes.key?(:'error_message')
|
|
175
|
+
self.error_message = attributes[:'error_message']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'created_at')
|
|
179
|
+
self.created_at = attributes[:'created_at']
|
|
180
|
+
else
|
|
181
|
+
self.created_at = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'updated_at')
|
|
185
|
+
self.updated_at = attributes[:'updated_at']
|
|
136
186
|
end
|
|
137
187
|
end
|
|
138
188
|
|
|
@@ -141,16 +191,28 @@ module DaytonaApiClient
|
|
|
141
191
|
def list_invalid_properties
|
|
142
192
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
143
193
|
invalid_properties = Array.new
|
|
144
|
-
if @
|
|
145
|
-
invalid_properties.push('invalid value for "
|
|
194
|
+
if @id.nil?
|
|
195
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if @type.nil?
|
|
199
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
146
200
|
end
|
|
147
201
|
|
|
148
|
-
if @
|
|
149
|
-
invalid_properties.push('invalid value for "
|
|
202
|
+
if @status.nil?
|
|
203
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
150
204
|
end
|
|
151
205
|
|
|
152
|
-
if @
|
|
153
|
-
invalid_properties.push('invalid value for "
|
|
206
|
+
if @resource_type.nil?
|
|
207
|
+
invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if @resource_id.nil?
|
|
211
|
+
invalid_properties.push('invalid value for "resource_id", resource_id cannot be nil.')
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if @created_at.nil?
|
|
215
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
154
216
|
end
|
|
155
217
|
|
|
156
218
|
invalid_properties
|
|
@@ -160,54 +222,75 @@ module DaytonaApiClient
|
|
|
160
222
|
# @return true if the model is valid
|
|
161
223
|
def valid?
|
|
162
224
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
-
return false if @
|
|
164
|
-
return false if @
|
|
165
|
-
return false if @
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return false
|
|
225
|
+
return false if @id.nil?
|
|
226
|
+
return false if @type.nil?
|
|
227
|
+
return false if @status.nil?
|
|
228
|
+
return false if @resource_type.nil?
|
|
229
|
+
resource_type_validator = EnumAttributeValidator.new('String', ["SANDBOX", "SNAPSHOT", "BACKUP"])
|
|
230
|
+
return false unless resource_type_validator.valid?(@resource_type)
|
|
231
|
+
return false if @resource_id.nil?
|
|
232
|
+
return false if @created_at.nil?
|
|
170
233
|
true
|
|
171
234
|
end
|
|
172
235
|
|
|
173
236
|
# Custom attribute writer method with validation
|
|
174
|
-
# @param [Object]
|
|
175
|
-
def
|
|
176
|
-
if
|
|
177
|
-
fail ArgumentError, '
|
|
237
|
+
# @param [Object] id Value to be assigned
|
|
238
|
+
def id=(id)
|
|
239
|
+
if id.nil?
|
|
240
|
+
fail ArgumentError, 'id cannot be nil'
|
|
178
241
|
end
|
|
179
242
|
|
|
180
|
-
@
|
|
243
|
+
@id = id
|
|
181
244
|
end
|
|
182
245
|
|
|
183
246
|
# Custom attribute writer method with validation
|
|
184
|
-
# @param [Object]
|
|
185
|
-
def
|
|
186
|
-
if
|
|
187
|
-
fail ArgumentError, '
|
|
247
|
+
# @param [Object] type Value to be assigned
|
|
248
|
+
def type=(type)
|
|
249
|
+
if type.nil?
|
|
250
|
+
fail ArgumentError, 'type cannot be nil'
|
|
188
251
|
end
|
|
189
252
|
|
|
190
|
-
@
|
|
253
|
+
@type = type
|
|
191
254
|
end
|
|
192
255
|
|
|
193
|
-
# Custom attribute writer method
|
|
194
|
-
# @param [Object]
|
|
195
|
-
def
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
|
|
256
|
+
# Custom attribute writer method with validation
|
|
257
|
+
# @param [Object] status Value to be assigned
|
|
258
|
+
def status=(status)
|
|
259
|
+
if status.nil?
|
|
260
|
+
fail ArgumentError, 'status cannot be nil'
|
|
199
261
|
end
|
|
200
|
-
|
|
262
|
+
|
|
263
|
+
@status = status
|
|
201
264
|
end
|
|
202
265
|
|
|
203
266
|
# Custom attribute writer method checking allowed values (enum).
|
|
204
|
-
# @param [Object]
|
|
205
|
-
def
|
|
206
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
207
|
-
unless validator.valid?(
|
|
208
|
-
fail ArgumentError, "invalid value for \"
|
|
267
|
+
# @param [Object] resource_type Object to be assigned
|
|
268
|
+
def resource_type=(resource_type)
|
|
269
|
+
validator = EnumAttributeValidator.new('String', ["SANDBOX", "SNAPSHOT", "BACKUP"])
|
|
270
|
+
unless validator.valid?(resource_type)
|
|
271
|
+
fail ArgumentError, "invalid value for \"resource_type\", must be one of #{validator.allowable_values}."
|
|
209
272
|
end
|
|
210
|
-
@
|
|
273
|
+
@resource_type = resource_type
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] resource_id Value to be assigned
|
|
278
|
+
def resource_id=(resource_id)
|
|
279
|
+
if resource_id.nil?
|
|
280
|
+
fail ArgumentError, 'resource_id cannot be nil'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@resource_id = resource_id
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] created_at Value to be assigned
|
|
288
|
+
def created_at=(created_at)
|
|
289
|
+
if created_at.nil?
|
|
290
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@created_at = created_at
|
|
211
294
|
end
|
|
212
295
|
|
|
213
296
|
# Checks equality by comparing each attribute.
|
|
@@ -215,12 +298,16 @@ module DaytonaApiClient
|
|
|
215
298
|
def ==(o)
|
|
216
299
|
return true if self.equal?(o)
|
|
217
300
|
self.class == o.class &&
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
301
|
+
id == o.id &&
|
|
302
|
+
type == o.type &&
|
|
303
|
+
status == o.status &&
|
|
304
|
+
resource_type == o.resource_type &&
|
|
305
|
+
resource_id == o.resource_id &&
|
|
306
|
+
payload == o.payload &&
|
|
307
|
+
trace_context == o.trace_context &&
|
|
308
|
+
error_message == o.error_message &&
|
|
309
|
+
created_at == o.created_at &&
|
|
310
|
+
updated_at == o.updated_at
|
|
224
311
|
end
|
|
225
312
|
|
|
226
313
|
# @see the `==` method
|
|
@@ -232,7 +319,7 @@ module DaytonaApiClient
|
|
|
232
319
|
# Calculates hash code according to all attributes.
|
|
233
320
|
# @return [Integer] Hash code
|
|
234
321
|
def hash
|
|
235
|
-
[
|
|
322
|
+
[id, type, status, resource_type, resource_id, payload, trace_context, error_message, created_at, updated_at].hash
|
|
236
323
|
end
|
|
237
324
|
|
|
238
325
|
# Builds the object from hash
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class JobStatus
|
|
18
|
+
PENDING = "PENDING".freeze
|
|
19
|
+
IN_PROGRESS = "IN_PROGRESS".freeze
|
|
20
|
+
COMPLETED = "COMPLETED".freeze
|
|
21
|
+
FAILED = "FAILED".freeze
|
|
22
|
+
|
|
23
|
+
def self.all_vars
|
|
24
|
+
@all_vars ||= [PENDING, IN_PROGRESS, COMPLETED, FAILED].freeze
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the enum from string
|
|
28
|
+
# @param [String] The enum value in the form of the string
|
|
29
|
+
# @return [String] The enum value
|
|
30
|
+
def self.build_from_hash(value)
|
|
31
|
+
new.build_from_hash(value)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Builds the enum from string
|
|
35
|
+
# @param [String] The enum value in the form of the string
|
|
36
|
+
# @return [String] The enum value
|
|
37
|
+
def build_from_hash(value)
|
|
38
|
+
return value if JobStatus.all_vars.include?(value)
|
|
39
|
+
raise "Invalid ENUM value #{value} for class #JobStatus"
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class JobType
|
|
18
|
+
CREATE_SANDBOX = "CREATE_SANDBOX".freeze
|
|
19
|
+
START_SANDBOX = "START_SANDBOX".freeze
|
|
20
|
+
STOP_SANDBOX = "STOP_SANDBOX".freeze
|
|
21
|
+
DESTROY_SANDBOX = "DESTROY_SANDBOX".freeze
|
|
22
|
+
CREATE_BACKUP = "CREATE_BACKUP".freeze
|
|
23
|
+
BUILD_SNAPSHOT = "BUILD_SNAPSHOT".freeze
|
|
24
|
+
PULL_SNAPSHOT = "PULL_SNAPSHOT".freeze
|
|
25
|
+
RECOVER_SANDBOX = "RECOVER_SANDBOX".freeze
|
|
26
|
+
INSPECT_SNAPSHOT_IN_REGISTRY = "INSPECT_SNAPSHOT_IN_REGISTRY".freeze
|
|
27
|
+
REMOVE_SNAPSHOT = "REMOVE_SNAPSHOT".freeze
|
|
28
|
+
UPDATE_SANDBOX_NETWORK_SETTINGS = "UPDATE_SANDBOX_NETWORK_SETTINGS".freeze
|
|
29
|
+
|
|
30
|
+
def self.all_vars
|
|
31
|
+
@all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS].freeze
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Builds the enum from string
|
|
35
|
+
# @param [String] The enum value in the form of the string
|
|
36
|
+
# @return [String] The enum value
|
|
37
|
+
def self.build_from_hash(value)
|
|
38
|
+
new.build_from_hash(value)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Builds the enum from string
|
|
42
|
+
# @param [String] The enum value in the form of the string
|
|
43
|
+
# @return [String] The enum value
|
|
44
|
+
def build_from_hash(value)
|
|
45
|
+
return value if JobType.all_vars.include?(value)
|
|
46
|
+
raise "Invalid ENUM value #{value} for class #JobType"
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DaytonaApiClient
|
|
17
|
-
class
|
|
17
|
+
class PaginatedJobs
|
|
18
18
|
attr_accessor :items
|
|
19
19
|
|
|
20
20
|
attr_accessor :total
|
|
@@ -46,7 +46,7 @@ module DaytonaApiClient
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'items' => :'Array<
|
|
49
|
+
:'items' => :'Array<Job>',
|
|
50
50
|
:'total' => :'Float',
|
|
51
51
|
:'page' => :'Float',
|
|
52
52
|
:'total_pages' => :'Float'
|
|
@@ -63,14 +63,14 @@ module DaytonaApiClient
|
|
|
63
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
64
|
def initialize(attributes = {})
|
|
65
65
|
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::PaginatedJobs` initialize method"
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
70
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
71
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
72
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::PaginatedJobs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
74
|
end
|
|
75
75
|
h[k.to_sym] = v
|
|
76
76
|
}
|