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