volcano-sdk 0.32.6 → 0.33.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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/volcano/client.rb +3 -2
  4. data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +6 -6
  5. data/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +4 -4
  6. data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +2 -2
  7. data/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb +6 -6
  8. data/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb +1433 -0
  9. data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +1 -1
  10. data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb +294 -0
  11. data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_template_request.rb +247 -0
  12. data/lib/volcano/generated/lib/volcano-generated/models/project.rb +3 -3
  13. data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb +1 -1
  14. data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +1 -1
  15. data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb +2 -2
  16. data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb +1 -1
  17. data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb +1 -1
  18. data/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb +1 -1
  19. data/lib/volcano/generated/lib/volcano-generated/models/publish_sandbox_preset_request.rb +268 -0
  20. data/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb +1 -1
  21. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_access.rb +216 -0
  22. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_access_request.rb +221 -0
  23. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity.rb +199 -0
  24. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity_list.rb +166 -0
  25. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb +251 -0
  26. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_result.rb +294 -0
  27. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment.rb +242 -0
  28. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment_page.rb +192 -0
  29. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb +329 -0
  30. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_result.rb +381 -0
  31. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_read_request.rb +182 -0
  32. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_result.rb +164 -0
  33. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_write_request.rb +217 -0
  34. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_pagination.rb +199 -0
  35. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset.rb +294 -0
  36. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset_list.rb +166 -0
  37. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb +407 -0
  38. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_page.rb +192 -0
  39. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_subject_grant_request.rb +164 -0
  40. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_template.rb +321 -0
  41. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_template_page.rb +192 -0
  42. data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +1 -1
  43. data/lib/volcano/generated/lib/volcano-generated/models/update_sandbox_template_request.rb +175 -0
  44. data/lib/volcano/generated/lib/volcano-generated.rb +26 -0
  45. data/lib/volcano/generated_transport.rb +1 -0
  46. data/lib/volcano/generated_transport_sandbox.rb +69 -0
  47. data/lib/volcano/sandbox_files.rb +37 -0
  48. data/lib/volcano/sandbox_models.rb +24 -0
  49. data/lib/volcano/sandbox_request.rb +92 -0
  50. data/lib/volcano/sandbox_response.rb +74 -0
  51. data/lib/volcano/sandbox_session.rb +78 -0
  52. data/lib/volcano/sandboxes.rb +67 -0
  53. data/lib/volcano/version.rb +1 -1
  54. data/lib/volcano.rb +7 -0
  55. data/sig/client.rbs +1 -0
  56. data/sig/sandboxes.rbs +83 -0
  57. metadata +50 -2
@@ -0,0 +1,294 @@
1
+ =begin
2
+ #Volcano Hosting API
3
+
4
+ #Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Contact: support@volcano.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Volcano::Generated
17
+ class SandboxCommandResult < ApiModelBase
18
+ attr_accessor :stdout
19
+
20
+ attr_accessor :stderr
21
+
22
+ attr_accessor :exit_code
23
+
24
+ attr_accessor :stdout_truncated
25
+
26
+ attr_accessor :stderr_truncated
27
+
28
+ attr_accessor :timed_out
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'stdout' => :'stdout',
34
+ :'stderr' => :'stderr',
35
+ :'exit_code' => :'exit_code',
36
+ :'stdout_truncated' => :'stdout_truncated',
37
+ :'stderr_truncated' => :'stderr_truncated',
38
+ :'timed_out' => :'timed_out'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'stdout' => :'String',
56
+ :'stderr' => :'String',
57
+ :'exit_code' => :'Integer',
58
+ :'stdout_truncated' => :'Boolean',
59
+ :'stderr_truncated' => :'Boolean',
60
+ :'timed_out' => :'Boolean'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxCommandResult` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxCommandResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'stdout')
87
+ self.stdout = attributes[:'stdout']
88
+ else
89
+ self.stdout = nil
90
+ end
91
+
92
+ if attributes.key?(:'stderr')
93
+ self.stderr = attributes[:'stderr']
94
+ else
95
+ self.stderr = nil
96
+ end
97
+
98
+ if attributes.key?(:'exit_code')
99
+ self.exit_code = attributes[:'exit_code']
100
+ else
101
+ self.exit_code = nil
102
+ end
103
+
104
+ if attributes.key?(:'stdout_truncated')
105
+ self.stdout_truncated = attributes[:'stdout_truncated']
106
+ else
107
+ self.stdout_truncated = nil
108
+ end
109
+
110
+ if attributes.key?(:'stderr_truncated')
111
+ self.stderr_truncated = attributes[:'stderr_truncated']
112
+ else
113
+ self.stderr_truncated = nil
114
+ end
115
+
116
+ if attributes.key?(:'timed_out')
117
+ self.timed_out = attributes[:'timed_out']
118
+ else
119
+ self.timed_out = nil
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @stdout.nil?
129
+ invalid_properties.push('invalid value for "stdout", stdout cannot be nil.')
130
+ end
131
+
132
+ if @stderr.nil?
133
+ invalid_properties.push('invalid value for "stderr", stderr cannot be nil.')
134
+ end
135
+
136
+ if @exit_code.nil?
137
+ invalid_properties.push('invalid value for "exit_code", exit_code cannot be nil.')
138
+ end
139
+
140
+ if @stdout_truncated.nil?
141
+ invalid_properties.push('invalid value for "stdout_truncated", stdout_truncated cannot be nil.')
142
+ end
143
+
144
+ if @stderr_truncated.nil?
145
+ invalid_properties.push('invalid value for "stderr_truncated", stderr_truncated cannot be nil.')
146
+ end
147
+
148
+ if @timed_out.nil?
149
+ invalid_properties.push('invalid value for "timed_out", timed_out cannot be nil.')
150
+ end
151
+
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ warn '[DEPRECATED] the `valid?` method is obsolete'
159
+ return false if @stdout.nil?
160
+ return false if @stderr.nil?
161
+ return false if @exit_code.nil?
162
+ return false if @stdout_truncated.nil?
163
+ return false if @stderr_truncated.nil?
164
+ return false if @timed_out.nil?
165
+ true
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] stdout Value to be assigned
170
+ def stdout=(stdout)
171
+ if stdout.nil?
172
+ fail ArgumentError, 'stdout cannot be nil'
173
+ end
174
+
175
+ @stdout = stdout
176
+ end
177
+
178
+ # Custom attribute writer method with validation
179
+ # @param [Object] stderr Value to be assigned
180
+ def stderr=(stderr)
181
+ if stderr.nil?
182
+ fail ArgumentError, 'stderr cannot be nil'
183
+ end
184
+
185
+ @stderr = stderr
186
+ end
187
+
188
+ # Custom attribute writer method with validation
189
+ # @param [Object] exit_code Value to be assigned
190
+ def exit_code=(exit_code)
191
+ if exit_code.nil?
192
+ fail ArgumentError, 'exit_code cannot be nil'
193
+ end
194
+
195
+ @exit_code = exit_code
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] stdout_truncated Value to be assigned
200
+ def stdout_truncated=(stdout_truncated)
201
+ if stdout_truncated.nil?
202
+ fail ArgumentError, 'stdout_truncated cannot be nil'
203
+ end
204
+
205
+ @stdout_truncated = stdout_truncated
206
+ end
207
+
208
+ # Custom attribute writer method with validation
209
+ # @param [Object] stderr_truncated Value to be assigned
210
+ def stderr_truncated=(stderr_truncated)
211
+ if stderr_truncated.nil?
212
+ fail ArgumentError, 'stderr_truncated cannot be nil'
213
+ end
214
+
215
+ @stderr_truncated = stderr_truncated
216
+ end
217
+
218
+ # Custom attribute writer method with validation
219
+ # @param [Object] timed_out Value to be assigned
220
+ def timed_out=(timed_out)
221
+ if timed_out.nil?
222
+ fail ArgumentError, 'timed_out cannot be nil'
223
+ end
224
+
225
+ @timed_out = timed_out
226
+ end
227
+
228
+ # Checks equality by comparing each attribute.
229
+ # @param [Object] Object to be compared
230
+ def ==(o)
231
+ return true if self.equal?(o)
232
+ self.class == o.class &&
233
+ stdout == o.stdout &&
234
+ stderr == o.stderr &&
235
+ exit_code == o.exit_code &&
236
+ stdout_truncated == o.stdout_truncated &&
237
+ stderr_truncated == o.stderr_truncated &&
238
+ timed_out == o.timed_out
239
+ end
240
+
241
+ # @see the `==` method
242
+ # @param [Object] Object to be compared
243
+ def eql?(o)
244
+ self == o
245
+ end
246
+
247
+ # Calculates hash code according to all attributes.
248
+ # @return [Integer] Hash code
249
+ def hash
250
+ [stdout, stderr, exit_code, stdout_truncated, stderr_truncated, timed_out].hash
251
+ end
252
+
253
+ # Builds the object from hash
254
+ # @param [Hash] attributes Model attributes in the form of hash
255
+ # @return [Object] Returns the model itself
256
+ def self.build_from_hash(attributes)
257
+ return nil unless attributes.is_a?(Hash)
258
+ attributes = attributes.transform_keys(&:to_sym)
259
+ transformed_hash = {}
260
+ openapi_types.each_pair do |key, type|
261
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
262
+ transformed_hash["#{key}"] = nil
263
+ elsif type =~ /\AArray<(.*)>/i
264
+ # check to ensure the input is an array given that the attribute
265
+ # is documented as an array but the input is not
266
+ if attributes[attribute_map[key]].is_a?(Array)
267
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
268
+ end
269
+ elsif !attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
271
+ end
272
+ end
273
+ new(transformed_hash)
274
+ end
275
+
276
+ # Returns the object in the form of hash
277
+ # @return [Hash] Returns the object in the form of hash
278
+ def to_hash
279
+ hash = {}
280
+ self.class.attribute_map.each_pair do |attr, param|
281
+ value = self.send(attr)
282
+ if value.nil?
283
+ is_nullable = self.class.openapi_nullable.include?(attr)
284
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
285
+ end
286
+
287
+ hash[param] = _to_hash(value)
288
+ end
289
+ hash
290
+ end
291
+
292
+ end
293
+
294
+ end
@@ -0,0 +1,242 @@
1
+ =begin
2
+ #Volcano Hosting API
3
+
4
+ #Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Contact: support@volcano.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Volcano::Generated
17
+ class SandboxDeployment < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :status
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :updated_at
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'status' => :'status',
31
+ :'created_at' => :'created_at',
32
+ :'updated_at' => :'updated_at'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'status' => :'String',
51
+ :'created_at' => :'Time',
52
+ :'updated_at' => :'Time'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxDeployment` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxDeployment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'id')
79
+ self.id = attributes[:'id']
80
+ else
81
+ self.id = nil
82
+ end
83
+
84
+ if attributes.key?(:'status')
85
+ self.status = attributes[:'status']
86
+ else
87
+ self.status = nil
88
+ end
89
+
90
+ if attributes.key?(:'created_at')
91
+ self.created_at = attributes[:'created_at']
92
+ else
93
+ self.created_at = nil
94
+ end
95
+
96
+ if attributes.key?(:'updated_at')
97
+ self.updated_at = attributes[:'updated_at']
98
+ else
99
+ self.updated_at = nil
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ if @id.nil?
109
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
110
+ end
111
+
112
+ if @status.nil?
113
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
114
+ end
115
+
116
+ if @created_at.nil?
117
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
118
+ end
119
+
120
+ if @updated_at.nil?
121
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @id.nil?
132
+ return false if @status.nil?
133
+ return false if @created_at.nil?
134
+ return false if @updated_at.nil?
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] id Value to be assigned
140
+ def id=(id)
141
+ if id.nil?
142
+ fail ArgumentError, 'id cannot be nil'
143
+ end
144
+
145
+ @id = id
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] status Value to be assigned
150
+ def status=(status)
151
+ if status.nil?
152
+ fail ArgumentError, 'status cannot be nil'
153
+ end
154
+
155
+ @status = status
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] created_at Value to be assigned
160
+ def created_at=(created_at)
161
+ if created_at.nil?
162
+ fail ArgumentError, 'created_at cannot be nil'
163
+ end
164
+
165
+ @created_at = created_at
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] updated_at Value to be assigned
170
+ def updated_at=(updated_at)
171
+ if updated_at.nil?
172
+ fail ArgumentError, 'updated_at cannot be nil'
173
+ end
174
+
175
+ @updated_at = updated_at
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ id == o.id &&
184
+ status == o.status &&
185
+ created_at == o.created_at &&
186
+ updated_at == o.updated_at
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [id, status, created_at, updated_at].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ attributes = attributes.transform_keys(&:to_sym)
207
+ transformed_hash = {}
208
+ openapi_types.each_pair do |key, type|
209
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = nil
211
+ elsif type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[attribute_map[key]].is_a?(Array)
215
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
216
+ end
217
+ elsif !attributes[attribute_map[key]].nil?
218
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
219
+ end
220
+ end
221
+ new(transformed_hash)
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ end
241
+
242
+ end