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,1433 @@
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 'cgi'
14
+
15
+ module Volcano::Generated
16
+ class SandboxesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a sandbox template from a verified preset
23
+ # @param id [String]
24
+ # @param idempotency_key [String]
25
+ # @param create_sandbox_template_request [CreateSandboxTemplateRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [SandboxTemplate]
28
+ def create_sandbox(id, idempotency_key, create_sandbox_template_request, opts = {})
29
+ data, _status_code, _headers = create_sandbox_with_http_info(id, idempotency_key, create_sandbox_template_request, opts)
30
+ data
31
+ end
32
+
33
+ # Create a sandbox template from a verified preset
34
+ # @param id [String]
35
+ # @param idempotency_key [String]
36
+ # @param create_sandbox_template_request [CreateSandboxTemplateRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(SandboxTemplate, Integer, Hash)>] SandboxTemplate data, response status code and response headers
39
+ def create_sandbox_with_http_info(id, idempotency_key, create_sandbox_template_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.create_sandbox ...'
42
+ end
43
+ # verify the required parameter 'id' is set
44
+ if @api_client.config.client_side_validation && id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.create_sandbox"
46
+ end
47
+ # verify the required parameter 'idempotency_key' is set
48
+ if @api_client.config.client_side_validation && idempotency_key.nil?
49
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SandboxesApi.create_sandbox"
50
+ end
51
+ # verify the required parameter 'create_sandbox_template_request' is set
52
+ if @api_client.config.client_side_validation && create_sandbox_template_request.nil?
53
+ fail ArgumentError, "Missing the required parameter 'create_sandbox_template_request' when calling SandboxesApi.create_sandbox"
54
+ end
55
+ # resource path
56
+ local_var_path = '/projects/{id}/sandboxes'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
65
+ # HTTP header 'Content-Type'
66
+ content_type = @api_client.select_header_content_type(['application/json'])
67
+ if !content_type.nil?
68
+ header_params['Content-Type'] = content_type
69
+ end
70
+ header_params[:'Idempotency-Key'] = idempotency_key
71
+
72
+ # form parameters
73
+ form_params = opts[:form_params] || {}
74
+
75
+ # http body (model)
76
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_template_request)
77
+
78
+ # return_type
79
+ return_type = opts[:debug_return_type] || 'SandboxTemplate'
80
+
81
+ # auth_names
82
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
83
+
84
+ new_options = opts.merge(
85
+ :operation => :"SandboxesApi.create_sandbox",
86
+ :header_params => header_params,
87
+ :query_params => query_params,
88
+ :form_params => form_params,
89
+ :body => post_body,
90
+ :auth_names => auth_names,
91
+ :return_type => return_type
92
+ )
93
+
94
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "API called: SandboxesApi#create_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
+ end
98
+ return data, status_code, headers
99
+ end
100
+
101
+ # Start a sandbox session
102
+ # @param id [String]
103
+ # @param idempotency_key [String]
104
+ # @param create_sandbox_session_request [CreateSandboxSessionRequest]
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [SandboxSession]
107
+ def create_sandbox_session(id, idempotency_key, create_sandbox_session_request, opts = {})
108
+ data, _status_code, _headers = create_sandbox_session_with_http_info(id, idempotency_key, create_sandbox_session_request, opts)
109
+ data
110
+ end
111
+
112
+ # Start a sandbox session
113
+ # @param id [String]
114
+ # @param idempotency_key [String]
115
+ # @param create_sandbox_session_request [CreateSandboxSessionRequest]
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [Array<(SandboxSession, Integer, Hash)>] SandboxSession data, response status code and response headers
118
+ def create_sandbox_session_with_http_info(id, idempotency_key, create_sandbox_session_request, opts = {})
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.create_sandbox_session ...'
121
+ end
122
+ # verify the required parameter 'id' is set
123
+ if @api_client.config.client_side_validation && id.nil?
124
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.create_sandbox_session"
125
+ end
126
+ # verify the required parameter 'idempotency_key' is set
127
+ if @api_client.config.client_side_validation && idempotency_key.nil?
128
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SandboxesApi.create_sandbox_session"
129
+ end
130
+ # resource path
131
+ local_var_path = '/projects/{id}/sandbox-sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
132
+
133
+ # query parameters
134
+ query_params = opts[:query_params] || {}
135
+
136
+ # header parameters
137
+ header_params = opts[:header_params] || {}
138
+ # HTTP header 'Accept' (if needed)
139
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
140
+ # HTTP header 'Content-Type'
141
+ content_type = @api_client.select_header_content_type(['application/json'])
142
+ if !content_type.nil?
143
+ header_params['Content-Type'] = content_type
144
+ end
145
+ header_params[:'Idempotency-Key'] = idempotency_key
146
+
147
+ # form parameters
148
+ form_params = opts[:form_params] || {}
149
+
150
+ # http body (model)
151
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_session_request)
152
+
153
+ # return_type
154
+ return_type = opts[:debug_return_type] || 'SandboxSession'
155
+
156
+ # auth_names
157
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
158
+
159
+ new_options = opts.merge(
160
+ :operation => :"SandboxesApi.create_sandbox_session",
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => return_type
167
+ )
168
+
169
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "API called: SandboxesApi#create_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
+ end
173
+ return data, status_code, headers
174
+ end
175
+
176
+ # Issue a short-lived port-scoped access credential
177
+ # @param session_id [String]
178
+ # @param sandbox_access_request [SandboxAccessRequest]
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [SandboxAccess]
181
+ def create_sandbox_session_access(session_id, sandbox_access_request, opts = {})
182
+ data, _status_code, _headers = create_sandbox_session_access_with_http_info(session_id, sandbox_access_request, opts)
183
+ data
184
+ end
185
+
186
+ # Issue a short-lived port-scoped access credential
187
+ # @param session_id [String]
188
+ # @param sandbox_access_request [SandboxAccessRequest]
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [Array<(SandboxAccess, Integer, Hash)>] SandboxAccess data, response status code and response headers
191
+ def create_sandbox_session_access_with_http_info(session_id, sandbox_access_request, opts = {})
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.create_sandbox_session_access ...'
194
+ end
195
+ # verify the required parameter 'session_id' is set
196
+ if @api_client.config.client_side_validation && session_id.nil?
197
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.create_sandbox_session_access"
198
+ end
199
+ # verify the required parameter 'sandbox_access_request' is set
200
+ if @api_client.config.client_side_validation && sandbox_access_request.nil?
201
+ fail ArgumentError, "Missing the required parameter 'sandbox_access_request' when calling SandboxesApi.create_sandbox_session_access"
202
+ end
203
+ # resource path
204
+ local_var_path = '/sandbox-sessions/{sessionId}/access'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
205
+
206
+ # query parameters
207
+ query_params = opts[:query_params] || {}
208
+
209
+ # header parameters
210
+ header_params = opts[:header_params] || {}
211
+ # HTTP header 'Accept' (if needed)
212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
213
+ # HTTP header 'Content-Type'
214
+ content_type = @api_client.select_header_content_type(['application/json'])
215
+ if !content_type.nil?
216
+ header_params['Content-Type'] = content_type
217
+ end
218
+
219
+ # form parameters
220
+ form_params = opts[:form_params] || {}
221
+
222
+ # http body (model)
223
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_access_request)
224
+
225
+ # return_type
226
+ return_type = opts[:debug_return_type] || 'SandboxAccess'
227
+
228
+ # auth_names
229
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken']
230
+
231
+ new_options = opts.merge(
232
+ :operation => :"SandboxesApi.create_sandbox_session_access",
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :auth_names => auth_names,
238
+ :return_type => return_type
239
+ )
240
+
241
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug "API called: SandboxesApi#create_sandbox_session_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
244
+ end
245
+ return data, status_code, headers
246
+ end
247
+
248
+ # Retire a template and terminate its sessions
249
+ # @param id [String]
250
+ # @param sandbox_id [String]
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [nil]
253
+ def delete_sandbox(id, sandbox_id, opts = {})
254
+ delete_sandbox_with_http_info(id, sandbox_id, opts)
255
+ nil
256
+ end
257
+
258
+ # Retire a template and terminate its sessions
259
+ # @param id [String]
260
+ # @param sandbox_id [String]
261
+ # @param [Hash] opts the optional parameters
262
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
263
+ def delete_sandbox_with_http_info(id, sandbox_id, opts = {})
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.delete_sandbox ...'
266
+ end
267
+ # verify the required parameter 'id' is set
268
+ if @api_client.config.client_side_validation && id.nil?
269
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.delete_sandbox"
270
+ end
271
+ # verify the required parameter 'sandbox_id' is set
272
+ if @api_client.config.client_side_validation && sandbox_id.nil?
273
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxesApi.delete_sandbox"
274
+ end
275
+ # resource path
276
+ local_var_path = '/projects/{id}/sandboxes/{sandboxId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
277
+
278
+ # query parameters
279
+ query_params = opts[:query_params] || {}
280
+
281
+ # header parameters
282
+ header_params = opts[:header_params] || {}
283
+ # HTTP header 'Accept' (if needed)
284
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
285
+
286
+ # form parameters
287
+ form_params = opts[:form_params] || {}
288
+
289
+ # http body (model)
290
+ post_body = opts[:debug_body]
291
+
292
+ # return_type
293
+ return_type = opts[:debug_return_type]
294
+
295
+ # auth_names
296
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
297
+
298
+ new_options = opts.merge(
299
+ :operation => :"SandboxesApi.delete_sandbox",
300
+ :header_params => header_params,
301
+ :query_params => query_params,
302
+ :form_params => form_params,
303
+ :body => post_body,
304
+ :auth_names => auth_names,
305
+ :return_type => return_type
306
+ )
307
+
308
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug "API called: SandboxesApi#delete_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
+ end
312
+ return data, status_code, headers
313
+ end
314
+
315
+ # Execute once and return after confirmed termination
316
+ # @param id [String]
317
+ # @param idempotency_key [String]
318
+ # @param sandbox_execution_request [SandboxExecutionRequest]
319
+ # @param [Hash] opts the optional parameters
320
+ # @return [SandboxExecutionResult]
321
+ def execute_sandbox(id, idempotency_key, sandbox_execution_request, opts = {})
322
+ data, _status_code, _headers = execute_sandbox_with_http_info(id, idempotency_key, sandbox_execution_request, opts)
323
+ data
324
+ end
325
+
326
+ # Execute once and return after confirmed termination
327
+ # @param id [String]
328
+ # @param idempotency_key [String]
329
+ # @param sandbox_execution_request [SandboxExecutionRequest]
330
+ # @param [Hash] opts the optional parameters
331
+ # @return [Array<(SandboxExecutionResult, Integer, Hash)>] SandboxExecutionResult data, response status code and response headers
332
+ def execute_sandbox_with_http_info(id, idempotency_key, sandbox_execution_request, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.execute_sandbox ...'
335
+ end
336
+ # verify the required parameter 'id' is set
337
+ if @api_client.config.client_side_validation && id.nil?
338
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.execute_sandbox"
339
+ end
340
+ # verify the required parameter 'idempotency_key' is set
341
+ if @api_client.config.client_side_validation && idempotency_key.nil?
342
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SandboxesApi.execute_sandbox"
343
+ end
344
+ # resource path
345
+ local_var_path = '/projects/{id}/sandbox-executions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
346
+
347
+ # query parameters
348
+ query_params = opts[:query_params] || {}
349
+
350
+ # header parameters
351
+ header_params = opts[:header_params] || {}
352
+ # HTTP header 'Accept' (if needed)
353
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
354
+ # HTTP header 'Content-Type'
355
+ content_type = @api_client.select_header_content_type(['application/json'])
356
+ if !content_type.nil?
357
+ header_params['Content-Type'] = content_type
358
+ end
359
+ header_params[:'Idempotency-Key'] = idempotency_key
360
+
361
+ # form parameters
362
+ form_params = opts[:form_params] || {}
363
+
364
+ # http body (model)
365
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_execution_request)
366
+
367
+ # return_type
368
+ return_type = opts[:debug_return_type] || 'SandboxExecutionResult'
369
+
370
+ # auth_names
371
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
372
+
373
+ new_options = opts.merge(
374
+ :operation => :"SandboxesApi.execute_sandbox",
375
+ :header_params => header_params,
376
+ :query_params => query_params,
377
+ :form_params => form_params,
378
+ :body => post_body,
379
+ :auth_names => auth_names,
380
+ :return_type => return_type
381
+ )
382
+
383
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug "API called: SandboxesApi#execute_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
386
+ end
387
+ return data, status_code, headers
388
+ end
389
+
390
+ # Execute a command within a session
391
+ # @param session_id [String]
392
+ # @param idempotency_key [String]
393
+ # @param sandbox_command_request [SandboxCommandRequest]
394
+ # @param [Hash] opts the optional parameters
395
+ # @return [SandboxCommandResult]
396
+ def execute_sandbox_session(session_id, idempotency_key, sandbox_command_request, opts = {})
397
+ data, _status_code, _headers = execute_sandbox_session_with_http_info(session_id, idempotency_key, sandbox_command_request, opts)
398
+ data
399
+ end
400
+
401
+ # Execute a command within a session
402
+ # @param session_id [String]
403
+ # @param idempotency_key [String]
404
+ # @param sandbox_command_request [SandboxCommandRequest]
405
+ # @param [Hash] opts the optional parameters
406
+ # @return [Array<(SandboxCommandResult, Integer, Hash)>] SandboxCommandResult data, response status code and response headers
407
+ def execute_sandbox_session_with_http_info(session_id, idempotency_key, sandbox_command_request, opts = {})
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.execute_sandbox_session ...'
410
+ end
411
+ # verify the required parameter 'session_id' is set
412
+ if @api_client.config.client_side_validation && session_id.nil?
413
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.execute_sandbox_session"
414
+ end
415
+ # verify the required parameter 'idempotency_key' is set
416
+ if @api_client.config.client_side_validation && idempotency_key.nil?
417
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SandboxesApi.execute_sandbox_session"
418
+ end
419
+ # verify the required parameter 'sandbox_command_request' is set
420
+ if @api_client.config.client_side_validation && sandbox_command_request.nil?
421
+ fail ArgumentError, "Missing the required parameter 'sandbox_command_request' when calling SandboxesApi.execute_sandbox_session"
422
+ end
423
+ # resource path
424
+ local_var_path = '/sandbox-sessions/{sessionId}/exec'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
425
+
426
+ # query parameters
427
+ query_params = opts[:query_params] || {}
428
+
429
+ # header parameters
430
+ header_params = opts[:header_params] || {}
431
+ # HTTP header 'Accept' (if needed)
432
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
433
+ # HTTP header 'Content-Type'
434
+ content_type = @api_client.select_header_content_type(['application/json'])
435
+ if !content_type.nil?
436
+ header_params['Content-Type'] = content_type
437
+ end
438
+ header_params[:'Idempotency-Key'] = idempotency_key
439
+
440
+ # form parameters
441
+ form_params = opts[:form_params] || {}
442
+
443
+ # http body (model)
444
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_command_request)
445
+
446
+ # return_type
447
+ return_type = opts[:debug_return_type] || 'SandboxCommandResult'
448
+
449
+ # auth_names
450
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken']
451
+
452
+ new_options = opts.merge(
453
+ :operation => :"SandboxesApi.execute_sandbox_session",
454
+ :header_params => header_params,
455
+ :query_params => query_params,
456
+ :form_params => form_params,
457
+ :body => post_body,
458
+ :auth_names => auth_names,
459
+ :return_type => return_type
460
+ )
461
+
462
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
463
+ if @api_client.config.debugging
464
+ @api_client.config.logger.debug "API called: SandboxesApi#execute_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
465
+ end
466
+ return data, status_code, headers
467
+ end
468
+
469
+ # Get a sandbox template
470
+ # @param id [String]
471
+ # @param sandbox_id [String]
472
+ # @param [Hash] opts the optional parameters
473
+ # @return [SandboxTemplate]
474
+ def get_sandbox(id, sandbox_id, opts = {})
475
+ data, _status_code, _headers = get_sandbox_with_http_info(id, sandbox_id, opts)
476
+ data
477
+ end
478
+
479
+ # Get a sandbox template
480
+ # @param id [String]
481
+ # @param sandbox_id [String]
482
+ # @param [Hash] opts the optional parameters
483
+ # @return [Array<(SandboxTemplate, Integer, Hash)>] SandboxTemplate data, response status code and response headers
484
+ def get_sandbox_with_http_info(id, sandbox_id, opts = {})
485
+ if @api_client.config.debugging
486
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.get_sandbox ...'
487
+ end
488
+ # verify the required parameter 'id' is set
489
+ if @api_client.config.client_side_validation && id.nil?
490
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.get_sandbox"
491
+ end
492
+ # verify the required parameter 'sandbox_id' is set
493
+ if @api_client.config.client_side_validation && sandbox_id.nil?
494
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxesApi.get_sandbox"
495
+ end
496
+ # resource path
497
+ local_var_path = '/projects/{id}/sandboxes/{sandboxId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
498
+
499
+ # query parameters
500
+ query_params = opts[:query_params] || {}
501
+
502
+ # header parameters
503
+ header_params = opts[:header_params] || {}
504
+ # HTTP header 'Accept' (if needed)
505
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
506
+
507
+ # form parameters
508
+ form_params = opts[:form_params] || {}
509
+
510
+ # http body (model)
511
+ post_body = opts[:debug_body]
512
+
513
+ # return_type
514
+ return_type = opts[:debug_return_type] || 'SandboxTemplate'
515
+
516
+ # auth_names
517
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
518
+
519
+ new_options = opts.merge(
520
+ :operation => :"SandboxesApi.get_sandbox",
521
+ :header_params => header_params,
522
+ :query_params => query_params,
523
+ :form_params => form_params,
524
+ :body => post_body,
525
+ :auth_names => auth_names,
526
+ :return_type => return_type
527
+ )
528
+
529
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug "API called: SandboxesApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
532
+ end
533
+ return data, status_code, headers
534
+ end
535
+
536
+ # Get a sandbox session
537
+ # @param session_id [String]
538
+ # @param [Hash] opts the optional parameters
539
+ # @return [SandboxSession]
540
+ def get_sandbox_session(session_id, opts = {})
541
+ data, _status_code, _headers = get_sandbox_session_with_http_info(session_id, opts)
542
+ data
543
+ end
544
+
545
+ # Get a sandbox session
546
+ # @param session_id [String]
547
+ # @param [Hash] opts the optional parameters
548
+ # @return [Array<(SandboxSession, Integer, Hash)>] SandboxSession data, response status code and response headers
549
+ def get_sandbox_session_with_http_info(session_id, opts = {})
550
+ if @api_client.config.debugging
551
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.get_sandbox_session ...'
552
+ end
553
+ # verify the required parameter 'session_id' is set
554
+ if @api_client.config.client_side_validation && session_id.nil?
555
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.get_sandbox_session"
556
+ end
557
+ # resource path
558
+ local_var_path = '/sandbox-sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
559
+
560
+ # query parameters
561
+ query_params = opts[:query_params] || {}
562
+
563
+ # header parameters
564
+ header_params = opts[:header_params] || {}
565
+ # HTTP header 'Accept' (if needed)
566
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
567
+
568
+ # form parameters
569
+ form_params = opts[:form_params] || {}
570
+
571
+ # http body (model)
572
+ post_body = opts[:debug_body]
573
+
574
+ # return_type
575
+ return_type = opts[:debug_return_type] || 'SandboxSession'
576
+
577
+ # auth_names
578
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken']
579
+
580
+ new_options = opts.merge(
581
+ :operation => :"SandboxesApi.get_sandbox_session",
582
+ :header_params => header_params,
583
+ :query_params => query_params,
584
+ :form_params => form_params,
585
+ :body => post_body,
586
+ :auth_names => auth_names,
587
+ :return_type => return_type
588
+ )
589
+
590
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
591
+ if @api_client.config.debugging
592
+ @api_client.config.logger.debug "API called: SandboxesApi#get_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
593
+ end
594
+ return data, status_code, headers
595
+ end
596
+
597
+ # Authorize an authenticated project user for this session
598
+ # @param session_id [String]
599
+ # @param subject_id [String]
600
+ # @param sandbox_subject_grant_request [SandboxSubjectGrantRequest]
601
+ # @param [Hash] opts the optional parameters
602
+ # @return [nil]
603
+ def grant_sandbox_session(session_id, subject_id, sandbox_subject_grant_request, opts = {})
604
+ grant_sandbox_session_with_http_info(session_id, subject_id, sandbox_subject_grant_request, opts)
605
+ nil
606
+ end
607
+
608
+ # Authorize an authenticated project user for this session
609
+ # @param session_id [String]
610
+ # @param subject_id [String]
611
+ # @param sandbox_subject_grant_request [SandboxSubjectGrantRequest]
612
+ # @param [Hash] opts the optional parameters
613
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
614
+ def grant_sandbox_session_with_http_info(session_id, subject_id, sandbox_subject_grant_request, opts = {})
615
+ if @api_client.config.debugging
616
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.grant_sandbox_session ...'
617
+ end
618
+ # verify the required parameter 'session_id' is set
619
+ if @api_client.config.client_side_validation && session_id.nil?
620
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.grant_sandbox_session"
621
+ end
622
+ # verify the required parameter 'subject_id' is set
623
+ if @api_client.config.client_side_validation && subject_id.nil?
624
+ fail ArgumentError, "Missing the required parameter 'subject_id' when calling SandboxesApi.grant_sandbox_session"
625
+ end
626
+ # verify the required parameter 'sandbox_subject_grant_request' is set
627
+ if @api_client.config.client_side_validation && sandbox_subject_grant_request.nil?
628
+ fail ArgumentError, "Missing the required parameter 'sandbox_subject_grant_request' when calling SandboxesApi.grant_sandbox_session"
629
+ end
630
+ # resource path
631
+ local_var_path = '/sandbox-sessions/{sessionId}/grants/{subjectId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'subjectId' + '}', CGI.escape(subject_id.to_s))
632
+
633
+ # query parameters
634
+ query_params = opts[:query_params] || {}
635
+
636
+ # header parameters
637
+ header_params = opts[:header_params] || {}
638
+ # HTTP header 'Accept' (if needed)
639
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
640
+ # HTTP header 'Content-Type'
641
+ content_type = @api_client.select_header_content_type(['application/json'])
642
+ if !content_type.nil?
643
+ header_params['Content-Type'] = content_type
644
+ end
645
+
646
+ # form parameters
647
+ form_params = opts[:form_params] || {}
648
+
649
+ # http body (model)
650
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_subject_grant_request)
651
+
652
+ # return_type
653
+ return_type = opts[:debug_return_type]
654
+
655
+ # auth_names
656
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
657
+
658
+ new_options = opts.merge(
659
+ :operation => :"SandboxesApi.grant_sandbox_session",
660
+ :header_params => header_params,
661
+ :query_params => query_params,
662
+ :form_params => form_params,
663
+ :body => post_body,
664
+ :auth_names => auth_names,
665
+ :return_type => return_type
666
+ )
667
+
668
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
669
+ if @api_client.config.debugging
670
+ @api_client.config.logger.debug "API called: SandboxesApi#grant_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
671
+ end
672
+ return data, status_code, headers
673
+ end
674
+
675
+ # List sandbox deployment history
676
+ # @param id [String]
677
+ # @param sandbox_id [String]
678
+ # @param [Hash] opts the optional parameters
679
+ # @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
680
+ # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response&#39;s &#x60;next_cursor&#x60; — pages forward. Mutually exclusive with &#x60;page&#x60; and &#x60;ending_before&#x60;; combining them returns 400. When supplied, the request&#39;s &#x60;search&#x60; and &#x60;limit&#x60; must match the values bound to the cursor or the request returns 400.
681
+ # @return [SandboxDeploymentPage]
682
+ def list_sandbox_deployments(id, sandbox_id, opts = {})
683
+ data, _status_code, _headers = list_sandbox_deployments_with_http_info(id, sandbox_id, opts)
684
+ data
685
+ end
686
+
687
+ # List sandbox deployment history
688
+ # @param id [String]
689
+ # @param sandbox_id [String]
690
+ # @param [Hash] opts the optional parameters
691
+ # @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
692
+ # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response&#39;s &#x60;next_cursor&#x60; — pages forward. Mutually exclusive with &#x60;page&#x60; and &#x60;ending_before&#x60;; combining them returns 400. When supplied, the request&#39;s &#x60;search&#x60; and &#x60;limit&#x60; must match the values bound to the cursor or the request returns 400.
693
+ # @return [Array<(SandboxDeploymentPage, Integer, Hash)>] SandboxDeploymentPage data, response status code and response headers
694
+ def list_sandbox_deployments_with_http_info(id, sandbox_id, opts = {})
695
+ if @api_client.config.debugging
696
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.list_sandbox_deployments ...'
697
+ end
698
+ # verify the required parameter 'id' is set
699
+ if @api_client.config.client_side_validation && id.nil?
700
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.list_sandbox_deployments"
701
+ end
702
+ # verify the required parameter 'sandbox_id' is set
703
+ if @api_client.config.client_side_validation && sandbox_id.nil?
704
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxesApi.list_sandbox_deployments"
705
+ end
706
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
707
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandbox_deployments, must be smaller than or equal to 100.'
708
+ end
709
+
710
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
711
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandbox_deployments, must be greater than or equal to 1.'
712
+ end
713
+
714
+ # resource path
715
+ local_var_path = '/projects/{id}/sandboxes/{sandboxId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
716
+
717
+ # query parameters
718
+ query_params = opts[:query_params] || {}
719
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
720
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
721
+
722
+ # header parameters
723
+ header_params = opts[:header_params] || {}
724
+ # HTTP header 'Accept' (if needed)
725
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
726
+
727
+ # form parameters
728
+ form_params = opts[:form_params] || {}
729
+
730
+ # http body (model)
731
+ post_body = opts[:debug_body]
732
+
733
+ # return_type
734
+ return_type = opts[:debug_return_type] || 'SandboxDeploymentPage'
735
+
736
+ # auth_names
737
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
738
+
739
+ new_options = opts.merge(
740
+ :operation => :"SandboxesApi.list_sandbox_deployments",
741
+ :header_params => header_params,
742
+ :query_params => query_params,
743
+ :form_params => form_params,
744
+ :body => post_body,
745
+ :auth_names => auth_names,
746
+ :return_type => return_type
747
+ )
748
+
749
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
750
+ if @api_client.config.debugging
751
+ @api_client.config.logger.debug "API called: SandboxesApi#list_sandbox_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
752
+ end
753
+ return data, status_code, headers
754
+ end
755
+
756
+ # List available sandbox presets
757
+ # @param [Hash] opts the optional parameters
758
+ # @return [SandboxPresetList]
759
+ def list_sandbox_presets(opts = {})
760
+ data, _status_code, _headers = list_sandbox_presets_with_http_info(opts)
761
+ data
762
+ end
763
+
764
+ # List available sandbox presets
765
+ # @param [Hash] opts the optional parameters
766
+ # @return [Array<(SandboxPresetList, Integer, Hash)>] SandboxPresetList data, response status code and response headers
767
+ def list_sandbox_presets_with_http_info(opts = {})
768
+ if @api_client.config.debugging
769
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.list_sandbox_presets ...'
770
+ end
771
+ # resource path
772
+ local_var_path = '/sandboxes/presets'
773
+
774
+ # query parameters
775
+ query_params = opts[:query_params] || {}
776
+
777
+ # header parameters
778
+ header_params = opts[:header_params] || {}
779
+ # HTTP header 'Accept' (if needed)
780
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
781
+
782
+ # form parameters
783
+ form_params = opts[:form_params] || {}
784
+
785
+ # http body (model)
786
+ post_body = opts[:debug_body]
787
+
788
+ # return_type
789
+ return_type = opts[:debug_return_type] || 'SandboxPresetList'
790
+
791
+ # auth_names
792
+ auth_names = opts[:debug_auth_names] || []
793
+
794
+ new_options = opts.merge(
795
+ :operation => :"SandboxesApi.list_sandbox_presets",
796
+ :header_params => header_params,
797
+ :query_params => query_params,
798
+ :form_params => form_params,
799
+ :body => post_body,
800
+ :auth_names => auth_names,
801
+ :return_type => return_type
802
+ )
803
+
804
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
805
+ if @api_client.config.debugging
806
+ @api_client.config.logger.debug "API called: SandboxesApi#list_sandbox_presets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
807
+ end
808
+ return data, status_code, headers
809
+ end
810
+
811
+ # List project sandbox sessions
812
+ # @param id [String]
813
+ # @param [Hash] opts the optional parameters
814
+ # @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
815
+ # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response&#39;s &#x60;next_cursor&#x60; — pages forward. Mutually exclusive with &#x60;page&#x60; and &#x60;ending_before&#x60;; combining them returns 400. When supplied, the request&#39;s &#x60;search&#x60; and &#x60;limit&#x60; must match the values bound to the cursor or the request returns 400.
816
+ # @return [SandboxSessionPage]
817
+ def list_sandbox_sessions(id, opts = {})
818
+ data, _status_code, _headers = list_sandbox_sessions_with_http_info(id, opts)
819
+ data
820
+ end
821
+
822
+ # List project sandbox sessions
823
+ # @param id [String]
824
+ # @param [Hash] opts the optional parameters
825
+ # @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
826
+ # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response&#39;s &#x60;next_cursor&#x60; — pages forward. Mutually exclusive with &#x60;page&#x60; and &#x60;ending_before&#x60;; combining them returns 400. When supplied, the request&#39;s &#x60;search&#x60; and &#x60;limit&#x60; must match the values bound to the cursor or the request returns 400.
827
+ # @return [Array<(SandboxSessionPage, Integer, Hash)>] SandboxSessionPage data, response status code and response headers
828
+ def list_sandbox_sessions_with_http_info(id, opts = {})
829
+ if @api_client.config.debugging
830
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.list_sandbox_sessions ...'
831
+ end
832
+ # verify the required parameter 'id' is set
833
+ if @api_client.config.client_side_validation && id.nil?
834
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.list_sandbox_sessions"
835
+ end
836
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
837
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandbox_sessions, must be smaller than or equal to 100.'
838
+ end
839
+
840
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
841
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandbox_sessions, must be greater than or equal to 1.'
842
+ end
843
+
844
+ # resource path
845
+ local_var_path = '/projects/{id}/sandbox-sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
846
+
847
+ # query parameters
848
+ query_params = opts[:query_params] || {}
849
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
850
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
851
+
852
+ # header parameters
853
+ header_params = opts[:header_params] || {}
854
+ # HTTP header 'Accept' (if needed)
855
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
856
+
857
+ # form parameters
858
+ form_params = opts[:form_params] || {}
859
+
860
+ # http body (model)
861
+ post_body = opts[:debug_body]
862
+
863
+ # return_type
864
+ return_type = opts[:debug_return_type] || 'SandboxSessionPage'
865
+
866
+ # auth_names
867
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
868
+
869
+ new_options = opts.merge(
870
+ :operation => :"SandboxesApi.list_sandbox_sessions",
871
+ :header_params => header_params,
872
+ :query_params => query_params,
873
+ :form_params => form_params,
874
+ :body => post_body,
875
+ :auth_names => auth_names,
876
+ :return_type => return_type
877
+ )
878
+
879
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
880
+ if @api_client.config.debugging
881
+ @api_client.config.logger.debug "API called: SandboxesApi#list_sandbox_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
882
+ end
883
+ return data, status_code, headers
884
+ end
885
+
886
+ # List sandbox templates
887
+ # @param id [String]
888
+ # @param [Hash] opts the optional parameters
889
+ # @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
890
+ # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response&#39;s &#x60;next_cursor&#x60; — pages forward. Mutually exclusive with &#x60;page&#x60; and &#x60;ending_before&#x60;; combining them returns 400. When supplied, the request&#39;s &#x60;search&#x60; and &#x60;limit&#x60; must match the values bound to the cursor or the request returns 400.
891
+ # @return [SandboxTemplatePage]
892
+ def list_sandboxes(id, opts = {})
893
+ data, _status_code, _headers = list_sandboxes_with_http_info(id, opts)
894
+ data
895
+ end
896
+
897
+ # List sandbox templates
898
+ # @param id [String]
899
+ # @param [Hash] opts the optional parameters
900
+ # @option opts [Integer] :limit Number of items per page (max 100) (default to 10)
901
+ # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response&#39;s &#x60;next_cursor&#x60; — pages forward. Mutually exclusive with &#x60;page&#x60; and &#x60;ending_before&#x60;; combining them returns 400. When supplied, the request&#39;s &#x60;search&#x60; and &#x60;limit&#x60; must match the values bound to the cursor or the request returns 400.
902
+ # @return [Array<(SandboxTemplatePage, Integer, Hash)>] SandboxTemplatePage data, response status code and response headers
903
+ def list_sandboxes_with_http_info(id, opts = {})
904
+ if @api_client.config.debugging
905
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.list_sandboxes ...'
906
+ end
907
+ # verify the required parameter 'id' is set
908
+ if @api_client.config.client_side_validation && id.nil?
909
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.list_sandboxes"
910
+ end
911
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
912
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandboxes, must be smaller than or equal to 100.'
913
+ end
914
+
915
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
916
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandboxes, must be greater than or equal to 1.'
917
+ end
918
+
919
+ # resource path
920
+ local_var_path = '/projects/{id}/sandboxes'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
921
+
922
+ # query parameters
923
+ query_params = opts[:query_params] || {}
924
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
925
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
926
+
927
+ # header parameters
928
+ header_params = opts[:header_params] || {}
929
+ # HTTP header 'Accept' (if needed)
930
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
931
+
932
+ # form parameters
933
+ form_params = opts[:form_params] || {}
934
+
935
+ # http body (model)
936
+ post_body = opts[:debug_body]
937
+
938
+ # return_type
939
+ return_type = opts[:debug_return_type] || 'SandboxTemplatePage'
940
+
941
+ # auth_names
942
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
943
+
944
+ new_options = opts.merge(
945
+ :operation => :"SandboxesApi.list_sandboxes",
946
+ :header_params => header_params,
947
+ :query_params => query_params,
948
+ :form_params => form_params,
949
+ :body => post_body,
950
+ :auth_names => auth_names,
951
+ :return_type => return_type
952
+ )
953
+
954
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
955
+ if @api_client.config.debugging
956
+ @api_client.config.logger.debug "API called: SandboxesApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
957
+ end
958
+ return data, status_code, headers
959
+ end
960
+
961
+ # Read a workspace file
962
+ # @param session_id [String]
963
+ # @param sandbox_file_read_request [SandboxFileReadRequest]
964
+ # @param [Hash] opts the optional parameters
965
+ # @return [SandboxFileResult]
966
+ def read_sandbox_session_file(session_id, sandbox_file_read_request, opts = {})
967
+ data, _status_code, _headers = read_sandbox_session_file_with_http_info(session_id, sandbox_file_read_request, opts)
968
+ data
969
+ end
970
+
971
+ # Read a workspace file
972
+ # @param session_id [String]
973
+ # @param sandbox_file_read_request [SandboxFileReadRequest]
974
+ # @param [Hash] opts the optional parameters
975
+ # @return [Array<(SandboxFileResult, Integer, Hash)>] SandboxFileResult data, response status code and response headers
976
+ def read_sandbox_session_file_with_http_info(session_id, sandbox_file_read_request, opts = {})
977
+ if @api_client.config.debugging
978
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.read_sandbox_session_file ...'
979
+ end
980
+ # verify the required parameter 'session_id' is set
981
+ if @api_client.config.client_side_validation && session_id.nil?
982
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.read_sandbox_session_file"
983
+ end
984
+ # verify the required parameter 'sandbox_file_read_request' is set
985
+ if @api_client.config.client_side_validation && sandbox_file_read_request.nil?
986
+ fail ArgumentError, "Missing the required parameter 'sandbox_file_read_request' when calling SandboxesApi.read_sandbox_session_file"
987
+ end
988
+ # resource path
989
+ local_var_path = '/sandbox-sessions/{sessionId}/files/read'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
990
+
991
+ # query parameters
992
+ query_params = opts[:query_params] || {}
993
+
994
+ # header parameters
995
+ header_params = opts[:header_params] || {}
996
+ # HTTP header 'Accept' (if needed)
997
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
998
+ # HTTP header 'Content-Type'
999
+ content_type = @api_client.select_header_content_type(['application/json'])
1000
+ if !content_type.nil?
1001
+ header_params['Content-Type'] = content_type
1002
+ end
1003
+
1004
+ # form parameters
1005
+ form_params = opts[:form_params] || {}
1006
+
1007
+ # http body (model)
1008
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_file_read_request)
1009
+
1010
+ # return_type
1011
+ return_type = opts[:debug_return_type] || 'SandboxFileResult'
1012
+
1013
+ # auth_names
1014
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken']
1015
+
1016
+ new_options = opts.merge(
1017
+ :operation => :"SandboxesApi.read_sandbox_session_file",
1018
+ :header_params => header_params,
1019
+ :query_params => query_params,
1020
+ :form_params => form_params,
1021
+ :body => post_body,
1022
+ :auth_names => auth_names,
1023
+ :return_type => return_type
1024
+ )
1025
+
1026
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1027
+ if @api_client.config.debugging
1028
+ @api_client.config.logger.debug "API called: SandboxesApi#read_sandbox_session_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1029
+ end
1030
+ return data, status_code, headers
1031
+ end
1032
+
1033
+ # Resume a sandbox session
1034
+ # @param session_id [String]
1035
+ # @param [Hash] opts the optional parameters
1036
+ # @return [SandboxSession]
1037
+ def resume_sandbox_session(session_id, opts = {})
1038
+ data, _status_code, _headers = resume_sandbox_session_with_http_info(session_id, opts)
1039
+ data
1040
+ end
1041
+
1042
+ # Resume a sandbox session
1043
+ # @param session_id [String]
1044
+ # @param [Hash] opts the optional parameters
1045
+ # @return [Array<(SandboxSession, Integer, Hash)>] SandboxSession data, response status code and response headers
1046
+ def resume_sandbox_session_with_http_info(session_id, opts = {})
1047
+ if @api_client.config.debugging
1048
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.resume_sandbox_session ...'
1049
+ end
1050
+ # verify the required parameter 'session_id' is set
1051
+ if @api_client.config.client_side_validation && session_id.nil?
1052
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.resume_sandbox_session"
1053
+ end
1054
+ # resource path
1055
+ local_var_path = '/sandbox-sessions/{sessionId}/resume'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
1056
+
1057
+ # query parameters
1058
+ query_params = opts[:query_params] || {}
1059
+
1060
+ # header parameters
1061
+ header_params = opts[:header_params] || {}
1062
+ # HTTP header 'Accept' (if needed)
1063
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1064
+
1065
+ # form parameters
1066
+ form_params = opts[:form_params] || {}
1067
+
1068
+ # http body (model)
1069
+ post_body = opts[:debug_body]
1070
+
1071
+ # return_type
1072
+ return_type = opts[:debug_return_type] || 'SandboxSession'
1073
+
1074
+ # auth_names
1075
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
1076
+
1077
+ new_options = opts.merge(
1078
+ :operation => :"SandboxesApi.resume_sandbox_session",
1079
+ :header_params => header_params,
1080
+ :query_params => query_params,
1081
+ :form_params => form_params,
1082
+ :body => post_body,
1083
+ :auth_names => auth_names,
1084
+ :return_type => return_type
1085
+ )
1086
+
1087
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1088
+ if @api_client.config.debugging
1089
+ @api_client.config.logger.debug "API called: SandboxesApi#resume_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1090
+ end
1091
+ return data, status_code, headers
1092
+ end
1093
+
1094
+ # Revoke a project user session grant
1095
+ # @param session_id [String]
1096
+ # @param subject_id [String]
1097
+ # @param [Hash] opts the optional parameters
1098
+ # @return [nil]
1099
+ def revoke_sandbox_session(session_id, subject_id, opts = {})
1100
+ revoke_sandbox_session_with_http_info(session_id, subject_id, opts)
1101
+ nil
1102
+ end
1103
+
1104
+ # Revoke a project user session grant
1105
+ # @param session_id [String]
1106
+ # @param subject_id [String]
1107
+ # @param [Hash] opts the optional parameters
1108
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1109
+ def revoke_sandbox_session_with_http_info(session_id, subject_id, opts = {})
1110
+ if @api_client.config.debugging
1111
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.revoke_sandbox_session ...'
1112
+ end
1113
+ # verify the required parameter 'session_id' is set
1114
+ if @api_client.config.client_side_validation && session_id.nil?
1115
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.revoke_sandbox_session"
1116
+ end
1117
+ # verify the required parameter 'subject_id' is set
1118
+ if @api_client.config.client_side_validation && subject_id.nil?
1119
+ fail ArgumentError, "Missing the required parameter 'subject_id' when calling SandboxesApi.revoke_sandbox_session"
1120
+ end
1121
+ # resource path
1122
+ local_var_path = '/sandbox-sessions/{sessionId}/grants/{subjectId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'subjectId' + '}', CGI.escape(subject_id.to_s))
1123
+
1124
+ # query parameters
1125
+ query_params = opts[:query_params] || {}
1126
+
1127
+ # header parameters
1128
+ header_params = opts[:header_params] || {}
1129
+ # HTTP header 'Accept' (if needed)
1130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1131
+
1132
+ # form parameters
1133
+ form_params = opts[:form_params] || {}
1134
+
1135
+ # http body (model)
1136
+ post_body = opts[:debug_body]
1137
+
1138
+ # return_type
1139
+ return_type = opts[:debug_return_type]
1140
+
1141
+ # auth_names
1142
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
1143
+
1144
+ new_options = opts.merge(
1145
+ :operation => :"SandboxesApi.revoke_sandbox_session",
1146
+ :header_params => header_params,
1147
+ :query_params => query_params,
1148
+ :form_params => form_params,
1149
+ :body => post_body,
1150
+ :auth_names => auth_names,
1151
+ :return_type => return_type
1152
+ )
1153
+
1154
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1155
+ if @api_client.config.debugging
1156
+ @api_client.config.logger.debug "API called: SandboxesApi#revoke_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1157
+ end
1158
+ return data, status_code, headers
1159
+ end
1160
+
1161
+ # Suspend a sandbox session
1162
+ # @param session_id [String]
1163
+ # @param [Hash] opts the optional parameters
1164
+ # @return [SandboxSession]
1165
+ def suspend_sandbox_session(session_id, opts = {})
1166
+ data, _status_code, _headers = suspend_sandbox_session_with_http_info(session_id, opts)
1167
+ data
1168
+ end
1169
+
1170
+ # Suspend a sandbox session
1171
+ # @param session_id [String]
1172
+ # @param [Hash] opts the optional parameters
1173
+ # @return [Array<(SandboxSession, Integer, Hash)>] SandboxSession data, response status code and response headers
1174
+ def suspend_sandbox_session_with_http_info(session_id, opts = {})
1175
+ if @api_client.config.debugging
1176
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.suspend_sandbox_session ...'
1177
+ end
1178
+ # verify the required parameter 'session_id' is set
1179
+ if @api_client.config.client_side_validation && session_id.nil?
1180
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.suspend_sandbox_session"
1181
+ end
1182
+ # resource path
1183
+ local_var_path = '/sandbox-sessions/{sessionId}/suspend'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
1184
+
1185
+ # query parameters
1186
+ query_params = opts[:query_params] || {}
1187
+
1188
+ # header parameters
1189
+ header_params = opts[:header_params] || {}
1190
+ # HTTP header 'Accept' (if needed)
1191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1192
+
1193
+ # form parameters
1194
+ form_params = opts[:form_params] || {}
1195
+
1196
+ # http body (model)
1197
+ post_body = opts[:debug_body]
1198
+
1199
+ # return_type
1200
+ return_type = opts[:debug_return_type] || 'SandboxSession'
1201
+
1202
+ # auth_names
1203
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
1204
+
1205
+ new_options = opts.merge(
1206
+ :operation => :"SandboxesApi.suspend_sandbox_session",
1207
+ :header_params => header_params,
1208
+ :query_params => query_params,
1209
+ :form_params => form_params,
1210
+ :body => post_body,
1211
+ :auth_names => auth_names,
1212
+ :return_type => return_type
1213
+ )
1214
+
1215
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1216
+ if @api_client.config.debugging
1217
+ @api_client.config.logger.debug "API called: SandboxesApi#suspend_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1218
+ end
1219
+ return data, status_code, headers
1220
+ end
1221
+
1222
+ # Request sandbox termination
1223
+ # @param session_id [String]
1224
+ # @param [Hash] opts the optional parameters
1225
+ # @return [SandboxSession]
1226
+ def terminate_sandbox_session(session_id, opts = {})
1227
+ data, _status_code, _headers = terminate_sandbox_session_with_http_info(session_id, opts)
1228
+ data
1229
+ end
1230
+
1231
+ # Request sandbox termination
1232
+ # @param session_id [String]
1233
+ # @param [Hash] opts the optional parameters
1234
+ # @return [Array<(SandboxSession, Integer, Hash)>] SandboxSession data, response status code and response headers
1235
+ def terminate_sandbox_session_with_http_info(session_id, opts = {})
1236
+ if @api_client.config.debugging
1237
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.terminate_sandbox_session ...'
1238
+ end
1239
+ # verify the required parameter 'session_id' is set
1240
+ if @api_client.config.client_side_validation && session_id.nil?
1241
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.terminate_sandbox_session"
1242
+ end
1243
+ # resource path
1244
+ local_var_path = '/sandbox-sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
1245
+
1246
+ # query parameters
1247
+ query_params = opts[:query_params] || {}
1248
+
1249
+ # header parameters
1250
+ header_params = opts[:header_params] || {}
1251
+ # HTTP header 'Accept' (if needed)
1252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1253
+
1254
+ # form parameters
1255
+ form_params = opts[:form_params] || {}
1256
+
1257
+ # http body (model)
1258
+ post_body = opts[:debug_body]
1259
+
1260
+ # return_type
1261
+ return_type = opts[:debug_return_type] || 'SandboxSession'
1262
+
1263
+ # auth_names
1264
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
1265
+
1266
+ new_options = opts.merge(
1267
+ :operation => :"SandboxesApi.terminate_sandbox_session",
1268
+ :header_params => header_params,
1269
+ :query_params => query_params,
1270
+ :form_params => form_params,
1271
+ :body => post_body,
1272
+ :auth_names => auth_names,
1273
+ :return_type => return_type
1274
+ )
1275
+
1276
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1277
+ if @api_client.config.debugging
1278
+ @api_client.config.logger.debug "API called: SandboxesApi#terminate_sandbox_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1279
+ end
1280
+ return data, status_code, headers
1281
+ end
1282
+
1283
+ # Rename a sandbox template
1284
+ # @param id [String]
1285
+ # @param sandbox_id [String]
1286
+ # @param update_sandbox_template_request [UpdateSandboxTemplateRequest]
1287
+ # @param [Hash] opts the optional parameters
1288
+ # @return [SandboxTemplate]
1289
+ def update_sandbox(id, sandbox_id, update_sandbox_template_request, opts = {})
1290
+ data, _status_code, _headers = update_sandbox_with_http_info(id, sandbox_id, update_sandbox_template_request, opts)
1291
+ data
1292
+ end
1293
+
1294
+ # Rename a sandbox template
1295
+ # @param id [String]
1296
+ # @param sandbox_id [String]
1297
+ # @param update_sandbox_template_request [UpdateSandboxTemplateRequest]
1298
+ # @param [Hash] opts the optional parameters
1299
+ # @return [Array<(SandboxTemplate, Integer, Hash)>] SandboxTemplate data, response status code and response headers
1300
+ def update_sandbox_with_http_info(id, sandbox_id, update_sandbox_template_request, opts = {})
1301
+ if @api_client.config.debugging
1302
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.update_sandbox ...'
1303
+ end
1304
+ # verify the required parameter 'id' is set
1305
+ if @api_client.config.client_side_validation && id.nil?
1306
+ fail ArgumentError, "Missing the required parameter 'id' when calling SandboxesApi.update_sandbox"
1307
+ end
1308
+ # verify the required parameter 'sandbox_id' is set
1309
+ if @api_client.config.client_side_validation && sandbox_id.nil?
1310
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxesApi.update_sandbox"
1311
+ end
1312
+ # verify the required parameter 'update_sandbox_template_request' is set
1313
+ if @api_client.config.client_side_validation && update_sandbox_template_request.nil?
1314
+ fail ArgumentError, "Missing the required parameter 'update_sandbox_template_request' when calling SandboxesApi.update_sandbox"
1315
+ end
1316
+ # resource path
1317
+ local_var_path = '/projects/{id}/sandboxes/{sandboxId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
1318
+
1319
+ # query parameters
1320
+ query_params = opts[:query_params] || {}
1321
+
1322
+ # header parameters
1323
+ header_params = opts[:header_params] || {}
1324
+ # HTTP header 'Accept' (if needed)
1325
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1326
+ # HTTP header 'Content-Type'
1327
+ content_type = @api_client.select_header_content_type(['application/json'])
1328
+ if !content_type.nil?
1329
+ header_params['Content-Type'] = content_type
1330
+ end
1331
+
1332
+ # form parameters
1333
+ form_params = opts[:form_params] || {}
1334
+
1335
+ # http body (model)
1336
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_template_request)
1337
+
1338
+ # return_type
1339
+ return_type = opts[:debug_return_type] || 'SandboxTemplate'
1340
+
1341
+ # auth_names
1342
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'UserToken']
1343
+
1344
+ new_options = opts.merge(
1345
+ :operation => :"SandboxesApi.update_sandbox",
1346
+ :header_params => header_params,
1347
+ :query_params => query_params,
1348
+ :form_params => form_params,
1349
+ :body => post_body,
1350
+ :auth_names => auth_names,
1351
+ :return_type => return_type
1352
+ )
1353
+
1354
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1355
+ if @api_client.config.debugging
1356
+ @api_client.config.logger.debug "API called: SandboxesApi#update_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1357
+ end
1358
+ return data, status_code, headers
1359
+ end
1360
+
1361
+ # Write a workspace file
1362
+ # @param session_id [String]
1363
+ # @param sandbox_file_write_request [SandboxFileWriteRequest]
1364
+ # @param [Hash] opts the optional parameters
1365
+ # @return [nil]
1366
+ def write_sandbox_session_file(session_id, sandbox_file_write_request, opts = {})
1367
+ write_sandbox_session_file_with_http_info(session_id, sandbox_file_write_request, opts)
1368
+ nil
1369
+ end
1370
+
1371
+ # Write a workspace file
1372
+ # @param session_id [String]
1373
+ # @param sandbox_file_write_request [SandboxFileWriteRequest]
1374
+ # @param [Hash] opts the optional parameters
1375
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1376
+ def write_sandbox_session_file_with_http_info(session_id, sandbox_file_write_request, opts = {})
1377
+ if @api_client.config.debugging
1378
+ @api_client.config.logger.debug 'Calling API: SandboxesApi.write_sandbox_session_file ...'
1379
+ end
1380
+ # verify the required parameter 'session_id' is set
1381
+ if @api_client.config.client_side_validation && session_id.nil?
1382
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.write_sandbox_session_file"
1383
+ end
1384
+ # verify the required parameter 'sandbox_file_write_request' is set
1385
+ if @api_client.config.client_side_validation && sandbox_file_write_request.nil?
1386
+ fail ArgumentError, "Missing the required parameter 'sandbox_file_write_request' when calling SandboxesApi.write_sandbox_session_file"
1387
+ end
1388
+ # resource path
1389
+ local_var_path = '/sandbox-sessions/{sessionId}/files/write'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
1390
+
1391
+ # query parameters
1392
+ query_params = opts[:query_params] || {}
1393
+
1394
+ # header parameters
1395
+ header_params = opts[:header_params] || {}
1396
+ # HTTP header 'Accept' (if needed)
1397
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1398
+ # HTTP header 'Content-Type'
1399
+ content_type = @api_client.select_header_content_type(['application/json'])
1400
+ if !content_type.nil?
1401
+ header_params['Content-Type'] = content_type
1402
+ end
1403
+
1404
+ # form parameters
1405
+ form_params = opts[:form_params] || {}
1406
+
1407
+ # http body (model)
1408
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_file_write_request)
1409
+
1410
+ # return_type
1411
+ return_type = opts[:debug_return_type]
1412
+
1413
+ # auth_names
1414
+ auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken']
1415
+
1416
+ new_options = opts.merge(
1417
+ :operation => :"SandboxesApi.write_sandbox_session_file",
1418
+ :header_params => header_params,
1419
+ :query_params => query_params,
1420
+ :form_params => form_params,
1421
+ :body => post_body,
1422
+ :auth_names => auth_names,
1423
+ :return_type => return_type
1424
+ )
1425
+
1426
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1427
+ if @api_client.config.debugging
1428
+ @api_client.config.logger.debug "API called: SandboxesApi#write_sandbox_session_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1429
+ end
1430
+ return data, status_code, headers
1431
+ end
1432
+ end
1433
+ end