daytona_api_client 0.134.0.alpha.1 → 1.0.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.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +2 -2
  5. data/lib/daytona_api_client/api/audit_api.rb +66 -18
  6. data/lib/daytona_api_client/api/docker_registry_api.rb +0 -3
  7. data/lib/daytona_api_client/api/organizations_api.rb +29 -754
  8. data/lib/daytona_api_client/api/preview_api.rb +5 -74
  9. data/lib/daytona_api_client/api/runners_api.rb +20 -343
  10. data/lib/daytona_api_client/api/sandbox_api.rb +194 -558
  11. data/lib/daytona_api_client/api/snapshots_api.rb +0 -66
  12. data/lib/daytona_api_client/api/toolbox_api.rb +711 -711
  13. data/lib/daytona_api_client/api/workspace_api.rb +3 -3
  14. data/lib/daytona_api_client/models/build_info.rb +4 -31
  15. data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -166
  16. data/lib/daytona_api_client/models/create_organization.rb +4 -31
  17. data/lib/daytona_api_client/models/create_runner.rb +315 -31
  18. data/lib/daytona_api_client/models/create_sandbox.rb +1 -11
  19. data/lib/daytona_api_client/models/create_snapshot.rb +4 -14
  20. data/lib/daytona_api_client/models/create_user.rb +1 -10
  21. data/lib/daytona_api_client/models/daytona_configuration.rb +4 -41
  22. data/lib/daytona_api_client/models/organization.rb +85 -53
  23. data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -18
  24. data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -14
  25. data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -4
  26. data/lib/daytona_api_client/models/port_preview_url.rb +14 -31
  27. data/lib/daytona_api_client/models/region.rb +4 -178
  28. data/lib/daytona_api_client/models/runner.rb +117 -79
  29. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -0
  30. data/lib/daytona_api_client/models/sandbox.rb +14 -51
  31. data/lib/daytona_api_client/models/sandbox_volume.rb +4 -14
  32. data/lib/daytona_api_client/models/snapshot_dto.rb +4 -36
  33. data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
  34. data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -31
  35. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -4
  36. data/lib/daytona_api_client/models/update_organization_quota.rb +41 -41
  37. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +4 -24
  38. data/lib/daytona_api_client/models/workspace.rb +35 -45
  39. data/lib/daytona_api_client/version.rb +1 -1
  40. data/lib/daytona_api_client.rb +1 -30
  41. data/project.json +6 -34
  42. metadata +5 -38
  43. data/.gitignore +0 -39
  44. data/.openapi-generator/FILES +0 -194
  45. data/.openapi-generator/VERSION +0 -1
  46. data/.openapi-generator-ignore +0 -31
  47. data/.rspec +0 -2
  48. data/.rubocop.yml +0 -148
  49. data/fix-gemspec.sh +0 -11
  50. data/lib/daytona_api_client/api/admin_api.rb +0 -325
  51. data/lib/daytona_api_client/api/jobs_api.rb +0 -299
  52. data/lib/daytona_api_client/api/regions_api.rb +0 -77
  53. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -385
  54. data/lib/daytona_api_client/models/create_region.rb +0 -269
  55. data/lib/daytona_api_client/models/create_region_response.rb +0 -280
  56. data/lib/daytona_api_client/models/create_runner_response.rb +0 -263
  57. data/lib/daytona_api_client/models/job_status.rb +0 -42
  58. data/lib/daytona_api_client/models/job_type.rb +0 -49
  59. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -238
  60. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -249
  61. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -229
  62. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -236
  63. data/lib/daytona_api_client/models/region_quota.rb +0 -339
  64. data/lib/daytona_api_client/models/region_type.rb +0 -41
  65. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -391
  66. data/lib/daytona_api_client/models/runner_full.rb +0 -779
  67. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -533
  68. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -276
  69. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -317
  70. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -263
  71. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -236
  72. data/lib/daytona_api_client/models/update_job_status.rb +0 -278
  73. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -236
  74. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -245
  75. data/lib/daytona_api_client/models/update_region.rb +0 -242
  76. data/lib/daytona_api_client/models/url.rb +0 -236
  77. data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -263
@@ -1,280 +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.12.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class CreateRegionResponse
18
- # ID of the created region
19
- attr_accessor :id
20
-
21
- # Proxy API key for the region
22
- attr_accessor :proxy_api_key
23
-
24
- # SSH Gateway API key for the region
25
- attr_accessor :ssh_gateway_api_key
26
-
27
- # Snapshot Manager username for the region
28
- attr_accessor :snapshot_manager_username
29
-
30
- # Snapshot Manager password for the region
31
- attr_accessor :snapshot_manager_password
32
-
33
- # Attribute mapping from ruby-style variable name to JSON key.
34
- def self.attribute_map
35
- {
36
- :'id' => :'id',
37
- :'proxy_api_key' => :'proxyApiKey',
38
- :'ssh_gateway_api_key' => :'sshGatewayApiKey',
39
- :'snapshot_manager_username' => :'snapshotManagerUsername',
40
- :'snapshot_manager_password' => :'snapshotManagerPassword'
41
- }
42
- end
43
-
44
- # Returns attribute mapping this model knows about
45
- def self.acceptable_attribute_map
46
- attribute_map
47
- end
48
-
49
- # Returns all the JSON keys this model knows about
50
- def self.acceptable_attributes
51
- acceptable_attribute_map.values
52
- end
53
-
54
- # Attribute type mapping.
55
- def self.openapi_types
56
- {
57
- :'id' => :'String',
58
- :'proxy_api_key' => :'String',
59
- :'ssh_gateway_api_key' => :'String',
60
- :'snapshot_manager_username' => :'String',
61
- :'snapshot_manager_password' => :'String'
62
- }
63
- end
64
-
65
- # List of attributes with nullable: true
66
- def self.openapi_nullable
67
- Set.new([
68
- :'proxy_api_key',
69
- :'ssh_gateway_api_key',
70
- :'snapshot_manager_username',
71
- :'snapshot_manager_password'
72
- ])
73
- end
74
-
75
- # Initializes the object
76
- # @param [Hash] attributes Model attributes in the form of hash
77
- def initialize(attributes = {})
78
- if (!attributes.is_a?(Hash))
79
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateRegionResponse` initialize method"
80
- end
81
-
82
- # check to see if the attribute exists and convert string to symbol for hash key
83
- acceptable_attribute_map = self.class.acceptable_attribute_map
84
- attributes = attributes.each_with_object({}) { |(k, v), h|
85
- if (!acceptable_attribute_map.key?(k.to_sym))
86
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CreateRegionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
- end
88
- h[k.to_sym] = v
89
- }
90
-
91
- if attributes.key?(:'id')
92
- self.id = attributes[:'id']
93
- else
94
- self.id = nil
95
- end
96
-
97
- if attributes.key?(:'proxy_api_key')
98
- self.proxy_api_key = attributes[:'proxy_api_key']
99
- end
100
-
101
- if attributes.key?(:'ssh_gateway_api_key')
102
- self.ssh_gateway_api_key = attributes[:'ssh_gateway_api_key']
103
- end
104
-
105
- if attributes.key?(:'snapshot_manager_username')
106
- self.snapshot_manager_username = attributes[:'snapshot_manager_username']
107
- end
108
-
109
- if attributes.key?(:'snapshot_manager_password')
110
- self.snapshot_manager_password = attributes[:'snapshot_manager_password']
111
- end
112
- end
113
-
114
- # Show invalid properties with the reasons. Usually used together with valid?
115
- # @return Array for valid properties with the reasons
116
- def list_invalid_properties
117
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
118
- invalid_properties = Array.new
119
- if @id.nil?
120
- invalid_properties.push('invalid value for "id", id cannot be nil.')
121
- end
122
-
123
- invalid_properties
124
- end
125
-
126
- # Check to see if the all the properties in the model are valid
127
- # @return true if the model is valid
128
- def valid?
129
- warn '[DEPRECATED] the `valid?` method is obsolete'
130
- return false if @id.nil?
131
- true
132
- end
133
-
134
- # Custom attribute writer method with validation
135
- # @param [Object] id Value to be assigned
136
- def id=(id)
137
- if id.nil?
138
- fail ArgumentError, 'id cannot be nil'
139
- end
140
-
141
- @id = id
142
- end
143
-
144
- # Checks equality by comparing each attribute.
145
- # @param [Object] Object to be compared
146
- def ==(o)
147
- return true if self.equal?(o)
148
- self.class == o.class &&
149
- id == o.id &&
150
- proxy_api_key == o.proxy_api_key &&
151
- ssh_gateway_api_key == o.ssh_gateway_api_key &&
152
- snapshot_manager_username == o.snapshot_manager_username &&
153
- snapshot_manager_password == o.snapshot_manager_password
154
- end
155
-
156
- # @see the `==` method
157
- # @param [Object] Object to be compared
158
- def eql?(o)
159
- self == o
160
- end
161
-
162
- # Calculates hash code according to all attributes.
163
- # @return [Integer] Hash code
164
- def hash
165
- [id, proxy_api_key, ssh_gateway_api_key, snapshot_manager_username, snapshot_manager_password].hash
166
- end
167
-
168
- # Builds the object from hash
169
- # @param [Hash] attributes Model attributes in the form of hash
170
- # @return [Object] Returns the model itself
171
- def self.build_from_hash(attributes)
172
- return nil unless attributes.is_a?(Hash)
173
- attributes = attributes.transform_keys(&:to_sym)
174
- transformed_hash = {}
175
- openapi_types.each_pair do |key, type|
176
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
177
- transformed_hash["#{key}"] = nil
178
- elsif type =~ /\AArray<(.*)>/i
179
- # check to ensure the input is an array given that the attribute
180
- # is documented as an array but the input is not
181
- if attributes[attribute_map[key]].is_a?(Array)
182
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
183
- end
184
- elsif !attributes[attribute_map[key]].nil?
185
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
186
- end
187
- end
188
- new(transformed_hash)
189
- end
190
-
191
- # Deserializes the data based on type
192
- # @param string type Data type
193
- # @param string value Value to be deserialized
194
- # @return [Object] Deserialized data
195
- def self._deserialize(type, value)
196
- case type.to_sym
197
- when :Time
198
- Time.parse(value)
199
- when :Date
200
- Date.parse(value)
201
- when :String
202
- value.to_s
203
- when :Integer
204
- value.to_i
205
- when :Float
206
- value.to_f
207
- when :Boolean
208
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
- true
210
- else
211
- false
212
- end
213
- when :Object
214
- # generic object (usually a Hash), return directly
215
- value
216
- when /\AArray<(?<inner_type>.+)>\z/
217
- inner_type = Regexp.last_match[:inner_type]
218
- value.map { |v| _deserialize(inner_type, v) }
219
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
- k_type = Regexp.last_match[:k_type]
221
- v_type = Regexp.last_match[:v_type]
222
- {}.tap do |hash|
223
- value.each do |k, v|
224
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
- end
226
- end
227
- else # model
228
- # models (e.g. Pet) or oneOf
229
- klass = DaytonaApiClient.const_get(type)
230
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
231
- end
232
- end
233
-
234
- # Returns the string representation of the object
235
- # @return [String] String presentation of the object
236
- def to_s
237
- to_hash.to_s
238
- end
239
-
240
- # to_body is an alias to to_hash (backward compatibility)
241
- # @return [Hash] Returns the object in the form of hash
242
- def to_body
243
- to_hash
244
- end
245
-
246
- # Returns the object in the form of hash
247
- # @return [Hash] Returns the object in the form of hash
248
- def to_hash
249
- hash = {}
250
- self.class.attribute_map.each_pair do |attr, param|
251
- value = self.send(attr)
252
- if value.nil?
253
- is_nullable = self.class.openapi_nullable.include?(attr)
254
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
- end
256
-
257
- hash[param] = _to_hash(value)
258
- end
259
- hash
260
- end
261
-
262
- # Outputs non-array value in the form of hash
263
- # For object, use to_hash. Otherwise, just return the value
264
- # @param [Object] value Any valid value
265
- # @return [Hash] Returns the value in the form of hash
266
- def _to_hash(value)
267
- if value.is_a?(Array)
268
- value.compact.map { |v| _to_hash(v) }
269
- elsif value.is_a?(Hash)
270
- {}.tap do |hash|
271
- value.each { |k, v| hash[k] = _to_hash(v) }
272
- end
273
- elsif value.respond_to? :to_hash
274
- value.to_hash
275
- else
276
- value
277
- end
278
- end
279
- end
280
- end
@@ -1,263 +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.12.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module DaytonaApiClient
17
- class CreateRunnerResponse
18
- # The ID of the runner
19
- attr_accessor :id
20
-
21
- # The API key for the runner
22
- attr_accessor :api_key
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'id' => :'id',
28
- :'api_key' => :'apiKey'
29
- }
30
- end
31
-
32
- # Returns attribute mapping this model knows about
33
- def self.acceptable_attribute_map
34
- attribute_map
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- acceptable_attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'id' => :'String',
46
- :'api_key' => :'String'
47
- }
48
- end
49
-
50
- # List of attributes with nullable: true
51
- def self.openapi_nullable
52
- Set.new([
53
- ])
54
- end
55
-
56
- # Initializes the object
57
- # @param [Hash] attributes Model attributes in the form of hash
58
- def initialize(attributes = {})
59
- if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateRunnerResponse` initialize method"
61
- end
62
-
63
- # check to see if the attribute exists and convert string to symbol for hash key
64
- acceptable_attribute_map = self.class.acceptable_attribute_map
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CreateRunnerResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'id')
73
- self.id = attributes[:'id']
74
- else
75
- self.id = nil
76
- end
77
-
78
- if attributes.key?(:'api_key')
79
- self.api_key = attributes[:'api_key']
80
- else
81
- self.api_key = nil
82
- end
83
- end
84
-
85
- # Show invalid properties with the reasons. Usually used together with valid?
86
- # @return Array for valid properties with the reasons
87
- def list_invalid_properties
88
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
- invalid_properties = Array.new
90
- if @id.nil?
91
- invalid_properties.push('invalid value for "id", id cannot be nil.')
92
- end
93
-
94
- if @api_key.nil?
95
- invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
96
- end
97
-
98
- invalid_properties
99
- end
100
-
101
- # Check to see if the all the properties in the model are valid
102
- # @return true if the model is valid
103
- def valid?
104
- warn '[DEPRECATED] the `valid?` method is obsolete'
105
- return false if @id.nil?
106
- return false if @api_key.nil?
107
- true
108
- end
109
-
110
- # Custom attribute writer method with validation
111
- # @param [Object] id Value to be assigned
112
- def id=(id)
113
- if id.nil?
114
- fail ArgumentError, 'id cannot be nil'
115
- end
116
-
117
- @id = id
118
- end
119
-
120
- # Custom attribute writer method with validation
121
- # @param [Object] api_key Value to be assigned
122
- def api_key=(api_key)
123
- if api_key.nil?
124
- fail ArgumentError, 'api_key cannot be nil'
125
- end
126
-
127
- @api_key = api_key
128
- end
129
-
130
- # Checks equality by comparing each attribute.
131
- # @param [Object] Object to be compared
132
- def ==(o)
133
- return true if self.equal?(o)
134
- self.class == o.class &&
135
- id == o.id &&
136
- api_key == o.api_key
137
- end
138
-
139
- # @see the `==` method
140
- # @param [Object] Object to be compared
141
- def eql?(o)
142
- self == o
143
- end
144
-
145
- # Calculates hash code according to all attributes.
146
- # @return [Integer] Hash code
147
- def hash
148
- [id, api_key].hash
149
- end
150
-
151
- # Builds the object from hash
152
- # @param [Hash] attributes Model attributes in the form of hash
153
- # @return [Object] Returns the model itself
154
- def self.build_from_hash(attributes)
155
- return nil unless attributes.is_a?(Hash)
156
- attributes = attributes.transform_keys(&:to_sym)
157
- transformed_hash = {}
158
- openapi_types.each_pair do |key, type|
159
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
- transformed_hash["#{key}"] = nil
161
- elsif type =~ /\AArray<(.*)>/i
162
- # check to ensure the input is an array given that the attribute
163
- # is documented as an array but the input is not
164
- if attributes[attribute_map[key]].is_a?(Array)
165
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
- end
167
- elsif !attributes[attribute_map[key]].nil?
168
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
- end
170
- end
171
- new(transformed_hash)
172
- end
173
-
174
- # Deserializes the data based on type
175
- # @param string type Data type
176
- # @param string value Value to be deserialized
177
- # @return [Object] Deserialized data
178
- def self._deserialize(type, value)
179
- case type.to_sym
180
- when :Time
181
- Time.parse(value)
182
- when :Date
183
- Date.parse(value)
184
- when :String
185
- value.to_s
186
- when :Integer
187
- value.to_i
188
- when :Float
189
- value.to_f
190
- when :Boolean
191
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
- true
193
- else
194
- false
195
- end
196
- when :Object
197
- # generic object (usually a Hash), return directly
198
- value
199
- when /\AArray<(?<inner_type>.+)>\z/
200
- inner_type = Regexp.last_match[:inner_type]
201
- value.map { |v| _deserialize(inner_type, v) }
202
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
- k_type = Regexp.last_match[:k_type]
204
- v_type = Regexp.last_match[:v_type]
205
- {}.tap do |hash|
206
- value.each do |k, v|
207
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
- end
209
- end
210
- else # model
211
- # models (e.g. Pet) or oneOf
212
- klass = DaytonaApiClient.const_get(type)
213
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
- end
215
- end
216
-
217
- # Returns the string representation of the object
218
- # @return [String] String presentation of the object
219
- def to_s
220
- to_hash.to_s
221
- end
222
-
223
- # to_body is an alias to to_hash (backward compatibility)
224
- # @return [Hash] Returns the object in the form of hash
225
- def to_body
226
- to_hash
227
- end
228
-
229
- # Returns the object in the form of hash
230
- # @return [Hash] Returns the object in the form of hash
231
- def to_hash
232
- hash = {}
233
- self.class.attribute_map.each_pair do |attr, param|
234
- value = self.send(attr)
235
- if value.nil?
236
- is_nullable = self.class.openapi_nullable.include?(attr)
237
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
- end
239
-
240
- hash[param] = _to_hash(value)
241
- end
242
- hash
243
- end
244
-
245
- # Outputs non-array value in the form of hash
246
- # For object, use to_hash. Otherwise, just return the value
247
- # @param [Object] value Any valid value
248
- # @return [Hash] Returns the value in the form of hash
249
- def _to_hash(value)
250
- if value.is_a?(Array)
251
- value.compact.map { |v| _to_hash(v) }
252
- elsif value.is_a?(Hash)
253
- {}.tap do |hash|
254
- value.each { |k, v| hash[k] = _to_hash(v) }
255
- end
256
- elsif value.respond_to? :to_hash
257
- value.to_hash
258
- else
259
- value
260
- end
261
- end
262
- end
263
- end
@@ -1,42 +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.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
@@ -1,49 +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.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