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