vers-sdk 0.1.1

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.
@@ -0,0 +1,1662 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by Sterling SDK Generator
4
+ # Orchestrator Control Plane API v0.1.0
5
+
6
+ require "json"
7
+
8
+ module VersSdk
9
+ # Response body for POST /api/v1/repositories/fork
10
+ class ForkRepositoryResponse
11
+ attr_accessor :fork_repository_response, :fork_repository_response, :fork_repository_response, :fork_repository_response, :fork_repository_response,
12
+
13
+ def initialize(attrs = {})
14
+ @fork_repository_response = attrs["commit_id"] || attrs[:fork_repository_response]
15
+ @fork_repository_response = attrs["reference"] || attrs[:fork_repository_response]
16
+ @fork_repository_response = attrs["repo_name"] || attrs[:fork_repository_response]
17
+ @fork_repository_response = attrs["tag_name"] || attrs[:fork_repository_response]
18
+ @fork_repository_response = attrs["vm_id"] || attrs[:fork_repository_response]
19
+ end
20
+
21
+ def self.from_json(json_str)
22
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
23
+ new(obj)
24
+ end
25
+
26
+ def to_h
27
+ {
28
+ "commit_id" => @fork_repository_response,
29
+ "reference" => @fork_repository_response,
30
+ "repo_name" => @fork_repository_response,
31
+ "tag_name" => @fork_repository_response,
32
+ "vm_id" => @fork_repository_response,
33
+ }
34
+ end
35
+
36
+ def to_json(*args)
37
+ to_h.to_json(*args)
38
+ end
39
+
40
+ end
41
+
42
+ # Response body for GET /api/vm/{vm_id}/ssh_key
43
+ class VmSshKeyResponse
44
+ attr_accessor :vm_ssh_key_response, :vm_ssh_key_response,
45
+
46
+ def initialize(attrs = {})
47
+ @vm_ssh_key_response = attrs["ssh_port"] || attrs[:vm_ssh_key_response]
48
+ @vm_ssh_key_response = attrs["ssh_private_key"] || attrs[:vm_ssh_key_response]
49
+ end
50
+
51
+ def self.from_json(json_str)
52
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
53
+ new(obj)
54
+ end
55
+
56
+ def to_h
57
+ {
58
+ "ssh_port" => @vm_ssh_key_response,
59
+ "ssh_private_key" => @vm_ssh_key_response,
60
+ }
61
+ end
62
+
63
+ def to_json(*args)
64
+ to_h.to_json(*args)
65
+ end
66
+
67
+ end
68
+
69
+ # The state of a VM
70
+ module VmState
71
+ BOOTING = "booting"
72
+ RUNNING = "running"
73
+ PAUSED = "paused"
74
+ SLEEPING = "sleeping"
75
+ DEAD = "dead"
76
+
77
+ ALL = [
78
+ BOOTING,
79
+ RUNNING,
80
+ PAUSED,
81
+ SLEEPING,
82
+ DEAD
83
+ ].freeze
84
+
85
+ def self.values
86
+ ALL
87
+ end
88
+ end
89
+
90
+ # Possible options for the state requested in PATCH /api/vm/{vm_id}/state
91
+ module VmUpdateStateEnum
92
+ PAUSED = "Paused"
93
+ RUNNING = "Running"
94
+
95
+ ALL = [
96
+ PAUSED,
97
+ RUNNING
98
+ ].freeze
99
+
100
+ def self.values
101
+ ALL
102
+ end
103
+ end
104
+
105
+ # Request body for PATCH /api/vm/{vm_id}/state
106
+ class VmUpdateStateRequest
107
+ attr_accessor :vm_update_state_request,
108
+
109
+ def initialize(attrs = {})
110
+ @vm_update_state_request = attrs["state"] || attrs[:vm_update_state_request]
111
+ end
112
+
113
+ def self.from_json(json_str)
114
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
115
+ new(obj)
116
+ end
117
+
118
+ def to_h
119
+ {
120
+ "state" => @vm_update_state_request,
121
+ }
122
+ end
123
+
124
+ def to_json(*args)
125
+ to_h.to_json(*args)
126
+ end
127
+
128
+ end
129
+
130
+ #
131
+ class ErrorResponse
132
+ attr_accessor :error_response, :error_response,
133
+
134
+ def initialize(attrs = {})
135
+ @error_response = attrs["error"] || attrs[:error_response]
136
+ @error_response = attrs["success"] || attrs[:error_response]
137
+ end
138
+
139
+ def self.from_json(json_str)
140
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
141
+ new(obj)
142
+ end
143
+
144
+ def to_h
145
+ {
146
+ "error" => @error_response,
147
+ "success" => @error_response,
148
+ }
149
+ end
150
+
151
+ def to_json(*args)
152
+ to_h.to_json(*args)
153
+ end
154
+
155
+ end
156
+
157
+ # Request body for PATCH /commits/{commit_id}
158
+ class UpdateCommitRequest
159
+ attr_accessor :update_commit_request,
160
+
161
+ def initialize(attrs = {})
162
+ @update_commit_request = attrs["is_public"] || attrs[:update_commit_request]
163
+ end
164
+
165
+ def self.from_json(json_str)
166
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
167
+ new(obj)
168
+ end
169
+
170
+ def to_h
171
+ {
172
+ "is_public" => @update_commit_request,
173
+ }
174
+ end
175
+
176
+ def to_json(*args)
177
+ to_h.to_json(*args)
178
+ end
179
+
180
+ end
181
+
182
+ # Response body for GET /env_vars and PUT /env_vars.
183
+ class EnvVarsResponse
184
+ attr_accessor :env_vars_response,
185
+
186
+ def initialize(attrs = {})
187
+ @env_vars_response = attrs["vars"] || attrs[:env_vars_response]
188
+ end
189
+
190
+ def self.from_json(json_str)
191
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
192
+ new(obj)
193
+ end
194
+
195
+ def to_h
196
+ {
197
+ "vars" => @env_vars_response,
198
+ }
199
+ end
200
+
201
+ def to_json(*args)
202
+ to_h.to_json(*args)
203
+ end
204
+
205
+ end
206
+
207
+ # Response body for POST /api/v1/repositories
208
+ class CreateRepositoryResponse
209
+ attr_accessor :create_repository_response, :create_repository_response,
210
+
211
+ def initialize(attrs = {})
212
+ @create_repository_response = attrs["name"] || attrs[:create_repository_response]
213
+ @create_repository_response = attrs["repo_id"] || attrs[:create_repository_response]
214
+ end
215
+
216
+ def self.from_json(json_str)
217
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
218
+ new(obj)
219
+ end
220
+
221
+ def to_h
222
+ {
223
+ "name" => @create_repository_response,
224
+ "repo_id" => @create_repository_response,
225
+ }
226
+ end
227
+
228
+ def to_json(*args)
229
+ to_h.to_json(*args)
230
+ end
231
+
232
+ end
233
+
234
+ # Request body for POST /api/v1/repositories
235
+ class CreateRepositoryRequest
236
+ attr_accessor :create_repository_request, :create_repository_request,
237
+
238
+ def initialize(attrs = {})
239
+ @create_repository_request = attrs["description"] || attrs[:create_repository_request]
240
+ @create_repository_request = attrs["name"] || attrs[:create_repository_request]
241
+ end
242
+
243
+ def self.from_json(json_str)
244
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
245
+ new(obj)
246
+ end
247
+
248
+ def to_h
249
+ {
250
+ "description" => @create_repository_request,
251
+ "name" => @create_repository_request,
252
+ }
253
+ end
254
+
255
+ def to_json(*args)
256
+ to_h.to_json(*args)
257
+ end
258
+
259
+ end
260
+
261
+ # Response type for domain operations.
262
+ class DomainResponse
263
+ attr_accessor :domain_response, :domain_response, :domain_response, :domain_response,
264
+
265
+ def initialize(attrs = {})
266
+ @domain_response = attrs["created_at"] || attrs[:domain_response]
267
+ @domain_response = attrs["domain"] || attrs[:domain_response]
268
+ @domain_response = attrs["domain_id"] || attrs[:domain_response]
269
+ @domain_response = attrs["vm_id"] || attrs[:domain_response]
270
+ end
271
+
272
+ def self.from_json(json_str)
273
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
274
+ new(obj)
275
+ end
276
+
277
+ def to_h
278
+ {
279
+ "created_at" => @domain_response,
280
+ "domain" => @domain_response,
281
+ "domain_id" => @domain_response,
282
+ "vm_id" => @domain_response,
283
+ }
284
+ end
285
+
286
+ def to_json(*args)
287
+ to_h.to_json(*args)
288
+ end
289
+
290
+ end
291
+
292
+ # Public repository information (includes owner org name for namespacing)
293
+ class PublicRepositoryInfo
294
+ attr_accessor :public_repository_info, :public_repository_info, :public_repository_info, :public_repository_info, :public_repository_info, :public_repository_info,
295
+
296
+ def initialize(attrs = {})
297
+ @public_repository_info = attrs["created_at"] || attrs[:public_repository_info]
298
+ @public_repository_info = attrs["description"] || attrs[:public_repository_info]
299
+ @public_repository_info = attrs["full_name"] || attrs[:public_repository_info]
300
+ @public_repository_info = attrs["name"] || attrs[:public_repository_info]
301
+ @public_repository_info = attrs["org_name"] || attrs[:public_repository_info]
302
+ @public_repository_info = attrs["repo_id"] || attrs[:public_repository_info]
303
+ end
304
+
305
+ def self.from_json(json_str)
306
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
307
+ new(obj)
308
+ end
309
+
310
+ def to_h
311
+ {
312
+ "created_at" => @public_repository_info,
313
+ "description" => @public_repository_info,
314
+ "full_name" => @public_repository_info,
315
+ "name" => @public_repository_info,
316
+ "org_name" => @public_repository_info,
317
+ "repo_id" => @public_repository_info,
318
+ }
319
+ end
320
+
321
+ def to_json(*args)
322
+ to_h.to_json(*args)
323
+ end
324
+
325
+ end
326
+
327
+ # Response body for GET /api/v1/commit_tags
328
+ class ListTagsResponse
329
+ attr_accessor :list_tags_response,
330
+
331
+ def initialize(attrs = {})
332
+ @list_tags_response = attrs["tags"] || attrs[:list_tags_response]
333
+ end
334
+
335
+ def self.from_json(json_str)
336
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
337
+ new(obj)
338
+ end
339
+
340
+ def to_h
341
+ {
342
+ "tags" => @list_tags_response,
343
+ }
344
+ end
345
+
346
+ def to_json(*args)
347
+ to_h.to_json(*args)
348
+ end
349
+
350
+ end
351
+
352
+ # Request body for creating a tag within a repository: POST /api/v1/repositories/{repo_name}/tags
353
+ class CreateRepoTagRequest
354
+ attr_accessor :create_repo_tag_request, :create_repo_tag_request, :create_repo_tag_request,
355
+
356
+ def initialize(attrs = {})
357
+ @create_repo_tag_request = attrs["commit_id"] || attrs[:create_repo_tag_request]
358
+ @create_repo_tag_request = attrs["description"] || attrs[:create_repo_tag_request]
359
+ @create_repo_tag_request = attrs["tag_name"] || attrs[:create_repo_tag_request]
360
+ end
361
+
362
+ def self.from_json(json_str)
363
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
364
+ new(obj)
365
+ end
366
+
367
+ def to_h
368
+ {
369
+ "commit_id" => @create_repo_tag_request,
370
+ "description" => @create_repo_tag_request,
371
+ "tag_name" => @create_repo_tag_request,
372
+ }
373
+ end
374
+
375
+ def to_json(*args)
376
+ to_h.to_json(*args)
377
+ end
378
+
379
+ end
380
+
381
+ # Request body for POST /api/v1/repositories/fork
382
+ class ForkRepositoryRequest
383
+ attr_accessor :fork_repository_request, :fork_repository_request, :fork_repository_request, :fork_repository_request, :fork_repository_request,
384
+
385
+ def initialize(attrs = {})
386
+ @fork_repository_request = attrs["repo_name"] || attrs[:fork_repository_request]
387
+ @fork_repository_request = attrs["source_org"] || attrs[:fork_repository_request]
388
+ @fork_repository_request = attrs["source_repo"] || attrs[:fork_repository_request]
389
+ @fork_repository_request = attrs["source_tag"] || attrs[:fork_repository_request]
390
+ @fork_repository_request = attrs["tag_name"] || attrs[:fork_repository_request]
391
+ end
392
+
393
+ def self.from_json(json_str)
394
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
395
+ new(obj)
396
+ end
397
+
398
+ def to_h
399
+ {
400
+ "repo_name" => @fork_repository_request,
401
+ "source_org" => @fork_repository_request,
402
+ "source_repo" => @fork_repository_request,
403
+ "source_tag" => @fork_repository_request,
404
+ "tag_name" => @fork_repository_request,
405
+ }
406
+ end
407
+
408
+ def to_json(*args)
409
+ to_h.to_json(*args)
410
+ end
411
+
412
+ end
413
+
414
+ #
415
+ class VmCommitEntity
416
+ attr_accessor :vm_commit_entity, :vm_commit_entity, :vm_commit_entity, :vm_commit_entity, :vm_commit_entity, :vm_commit_entity, :vm_commit_entity, :vm_commit_entity,
417
+
418
+ def initialize(attrs = {})
419
+ @vm_commit_entity = attrs["created_at"] || attrs[:vm_commit_entity]
420
+ @vm_commit_entity = attrs["description"] || attrs[:vm_commit_entity]
421
+ @vm_commit_entity = attrs["grandparent_commit_id"] || attrs[:vm_commit_entity]
422
+ @vm_commit_entity = attrs["id"] || attrs[:vm_commit_entity]
423
+ @vm_commit_entity = attrs["is_public"] || attrs[:vm_commit_entity]
424
+ @vm_commit_entity = attrs["name"] || attrs[:vm_commit_entity]
425
+ @vm_commit_entity = attrs["owner_id"] || attrs[:vm_commit_entity]
426
+ @vm_commit_entity = attrs["parent_vm_id"] || attrs[:vm_commit_entity]
427
+ end
428
+
429
+ def self.from_json(json_str)
430
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
431
+ new(obj)
432
+ end
433
+
434
+ def to_h
435
+ {
436
+ "created_at" => @vm_commit_entity,
437
+ "description" => @vm_commit_entity,
438
+ "grandparent_commit_id" => @vm_commit_entity,
439
+ "id" => @vm_commit_entity,
440
+ "is_public" => @vm_commit_entity,
441
+ "name" => @vm_commit_entity,
442
+ "owner_id" => @vm_commit_entity,
443
+ "parent_vm_id" => @vm_commit_entity,
444
+ }
445
+ end
446
+
447
+ def to_json(*args)
448
+ to_h.to_json(*args)
449
+ end
450
+
451
+ end
452
+
453
+ # Query params for GET /api/vm/{vm_id}/exec/logs
454
+ class VmExecLogQuery
455
+ attr_accessor :vm_exec_log_query, :vm_exec_log_query, :vm_exec_log_query, :vm_exec_log_query,
456
+
457
+ def initialize(attrs = {})
458
+ @vm_exec_log_query = attrs["max_entries"] || attrs[:vm_exec_log_query]
459
+ @vm_exec_log_query = attrs["offset"] || attrs[:vm_exec_log_query]
460
+ @vm_exec_log_query = attrs["skip_wait_boot"] || attrs[:vm_exec_log_query]
461
+ @vm_exec_log_query = attrs["stream"] || attrs[:vm_exec_log_query]
462
+ end
463
+
464
+ def self.from_json(json_str)
465
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
466
+ new(obj)
467
+ end
468
+
469
+ def to_h
470
+ {
471
+ "max_entries" => @vm_exec_log_query,
472
+ "offset" => @vm_exec_log_query,
473
+ "skip_wait_boot" => @vm_exec_log_query,
474
+ "stream" => @vm_exec_log_query,
475
+ }
476
+ end
477
+
478
+ def to_json(*args)
479
+ to_h.to_json(*args)
480
+ end
481
+
482
+ end
483
+
484
+ # Tag information returned in list and get operations
485
+ class TagInfo
486
+ attr_accessor :tag_info, :tag_info, :tag_info, :tag_info, :tag_info, :tag_info,
487
+
488
+ def initialize(attrs = {})
489
+ @tag_info = attrs["commit_id"] || attrs[:tag_info]
490
+ @tag_info = attrs["created_at"] || attrs[:tag_info]
491
+ @tag_info = attrs["description"] || attrs[:tag_info]
492
+ @tag_info = attrs["tag_id"] || attrs[:tag_info]
493
+ @tag_info = attrs["tag_name"] || attrs[:tag_info]
494
+ @tag_info = attrs["updated_at"] || attrs[:tag_info]
495
+ end
496
+
497
+ def self.from_json(json_str)
498
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
499
+ new(obj)
500
+ end
501
+
502
+ def to_h
503
+ {
504
+ "commit_id" => @tag_info,
505
+ "created_at" => @tag_info,
506
+ "description" => @tag_info,
507
+ "tag_id" => @tag_info,
508
+ "tag_name" => @tag_info,
509
+ "updated_at" => @tag_info,
510
+ }
511
+ end
512
+
513
+ def to_json(*args)
514
+ to_h.to_json(*args)
515
+ end
516
+
517
+ end
518
+
519
+ #
520
+ class ListCommitsResponse
521
+ attr_accessor :list_commits_response, :list_commits_response, :list_commits_response, :list_commits_response,
522
+
523
+ def initialize(attrs = {})
524
+ @list_commits_response = attrs["commits"] || attrs[:list_commits_response]
525
+ @list_commits_response = attrs["limit"] || attrs[:list_commits_response]
526
+ @list_commits_response = attrs["offset"] || attrs[:list_commits_response]
527
+ @list_commits_response = attrs["total"] || attrs[:list_commits_response]
528
+ end
529
+
530
+ def self.from_json(json_str)
531
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
532
+ new(obj)
533
+ end
534
+
535
+ def to_h
536
+ {
537
+ "commits" => @list_commits_response,
538
+ "limit" => @list_commits_response,
539
+ "offset" => @list_commits_response,
540
+ "total" => @list_commits_response,
541
+ }
542
+ end
543
+
544
+ def to_json(*args)
545
+ to_h.to_json(*args)
546
+ end
547
+
548
+ end
549
+
550
+ # Response body for GET /api/v1/repositories/{repo_name}/tags
551
+ class ListRepoTagsResponse
552
+ attr_accessor :list_repo_tags_response, :list_repo_tags_response,
553
+
554
+ def initialize(attrs = {})
555
+ @list_repo_tags_response = attrs["repository"] || attrs[:list_repo_tags_response]
556
+ @list_repo_tags_response = attrs["tags"] || attrs[:list_repo_tags_response]
557
+ end
558
+
559
+ def self.from_json(json_str)
560
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
561
+ new(obj)
562
+ end
563
+
564
+ def to_h
565
+ {
566
+ "repository" => @list_repo_tags_response,
567
+ "tags" => @list_repo_tags_response,
568
+ }
569
+ end
570
+
571
+ def to_json(*args)
572
+ to_h.to_json(*args)
573
+ end
574
+
575
+ end
576
+
577
+ # Individual log entry describing emitted stdout/stderr chunk.
578
+ class VmExecLogEntry
579
+ attr_accessor :vm_exec_log_entry, :vm_exec_log_entry, :vm_exec_log_entry, :vm_exec_log_entry,
580
+
581
+ def initialize(attrs = {})
582
+ @vm_exec_log_entry = attrs["data_b64"] || attrs[:vm_exec_log_entry]
583
+ @vm_exec_log_entry = attrs["exec_id"] || attrs[:vm_exec_log_entry]
584
+ @vm_exec_log_entry = attrs["stream"] || attrs[:vm_exec_log_entry]
585
+ @vm_exec_log_entry = attrs["timestamp"] || attrs[:vm_exec_log_entry]
586
+ end
587
+
588
+ def self.from_json(json_str)
589
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
590
+ new(obj)
591
+ end
592
+
593
+ def to_h
594
+ {
595
+ "data_b64" => @vm_exec_log_entry,
596
+ "exec_id" => @vm_exec_log_entry,
597
+ "stream" => @vm_exec_log_entry,
598
+ "timestamp" => @vm_exec_log_entry,
599
+ }
600
+ end
601
+
602
+ def to_json(*args)
603
+ to_h.to_json(*args)
604
+ end
605
+
606
+ end
607
+
608
+ # Streams available for exec logging.
609
+ module VmExecLogStream
610
+ STDOUT = "stdout"
611
+ STDERR = "stderr"
612
+
613
+ ALL = [
614
+ STDOUT,
615
+ STDERR
616
+ ].freeze
617
+
618
+ def self.values
619
+ ALL
620
+ end
621
+ end
622
+
623
+ # Response body for POST /api/vm/{vm_id}/exec
624
+ class VmExecResponse
625
+ attr_accessor :vm_exec_response, :vm_exec_response, :vm_exec_response, :vm_exec_response,
626
+
627
+ def initialize(attrs = {})
628
+ @vm_exec_response = attrs["exec_id"] || attrs[:vm_exec_response]
629
+ @vm_exec_response = attrs["exit_code"] || attrs[:vm_exec_response]
630
+ @vm_exec_response = attrs["stderr"] || attrs[:vm_exec_response]
631
+ @vm_exec_response = attrs["stdout"] || attrs[:vm_exec_response]
632
+ end
633
+
634
+ def self.from_json(json_str)
635
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
636
+ new(obj)
637
+ end
638
+
639
+ def to_h
640
+ {
641
+ "exec_id" => @vm_exec_response,
642
+ "exit_code" => @vm_exec_response,
643
+ "stderr" => @vm_exec_response,
644
+ "stdout" => @vm_exec_response,
645
+ }
646
+ end
647
+
648
+ def to_json(*args)
649
+ to_h.to_json(*args)
650
+ end
651
+
652
+ end
653
+
654
+ # Request body for POST /api/vm/{vm_id}/exec/stream/attach
655
+ class VmExecStreamAttachRequest
656
+ attr_accessor :vm_exec_stream_attach_request, :vm_exec_stream_attach_request, :vm_exec_stream_attach_request,
657
+
658
+ def initialize(attrs = {})
659
+ @vm_exec_stream_attach_request = attrs["cursor"] || attrs[:vm_exec_stream_attach_request]
660
+ @vm_exec_stream_attach_request = attrs["exec_id"] || attrs[:vm_exec_stream_attach_request]
661
+ @vm_exec_stream_attach_request = attrs["from_latest"] || attrs[:vm_exec_stream_attach_request]
662
+ end
663
+
664
+ def self.from_json(json_str)
665
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
666
+ new(obj)
667
+ end
668
+
669
+ def to_h
670
+ {
671
+ "cursor" => @vm_exec_stream_attach_request,
672
+ "exec_id" => @vm_exec_stream_attach_request,
673
+ "from_latest" => @vm_exec_stream_attach_request,
674
+ }
675
+ end
676
+
677
+ def to_json(*args)
678
+ to_h.to_json(*args)
679
+ end
680
+
681
+ end
682
+
683
+ # Request body for POST /api/vm/{vm_id}/exec
684
+ class VmExecRequest
685
+ attr_accessor :vm_exec_request, :vm_exec_request, :vm_exec_request, :vm_exec_request, :vm_exec_request, :vm_exec_request,
686
+
687
+ def initialize(attrs = {})
688
+ @vm_exec_request = attrs["command"] || attrs[:vm_exec_request]
689
+ @vm_exec_request = attrs["env"] || attrs[:vm_exec_request]
690
+ @vm_exec_request = attrs["exec_id"] || attrs[:vm_exec_request]
691
+ @vm_exec_request = attrs["stdin"] || attrs[:vm_exec_request]
692
+ @vm_exec_request = attrs["timeout_secs"] || attrs[:vm_exec_request]
693
+ @vm_exec_request = attrs["working_dir"] || attrs[:vm_exec_request]
694
+ end
695
+
696
+ def self.from_json(json_str)
697
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
698
+ new(obj)
699
+ end
700
+
701
+ def to_h
702
+ {
703
+ "command" => @vm_exec_request,
704
+ "env" => @vm_exec_request,
705
+ "exec_id" => @vm_exec_request,
706
+ "stdin" => @vm_exec_request,
707
+ "timeout_secs" => @vm_exec_request,
708
+ "working_dir" => @vm_exec_request,
709
+ }
710
+ end
711
+
712
+ def to_json(*args)
713
+ to_h.to_json(*args)
714
+ end
715
+
716
+ end
717
+
718
+ #
719
+ class NewVmsResponse
720
+ attr_accessor :new_vms_response,
721
+
722
+ def initialize(attrs = {})
723
+ @new_vms_response = attrs["vms"] || attrs[:new_vms_response]
724
+ end
725
+
726
+ def self.from_json(json_str)
727
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
728
+ new(obj)
729
+ end
730
+
731
+ def to_h
732
+ {
733
+ "vms" => @new_vms_response,
734
+ }
735
+ end
736
+
737
+ def to_json(*args)
738
+ to_h.to_json(*args)
739
+ end
740
+
741
+ end
742
+
743
+ # Request body for PATCH /api/v1/repositories/{repo_name}/visibility
744
+ class SetRepositoryVisibilityRequest
745
+ attr_accessor :set_repository_visibility_request,
746
+
747
+ def initialize(attrs = {})
748
+ @set_repository_visibility_request = attrs["is_public"] || attrs[:set_repository_visibility_request]
749
+ end
750
+
751
+ def self.from_json(json_str)
752
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
753
+ new(obj)
754
+ end
755
+
756
+ def to_h
757
+ {
758
+ "is_public" => @set_repository_visibility_request,
759
+ }
760
+ end
761
+
762
+ def to_json(*args)
763
+ to_h.to_json(*args)
764
+ end
765
+
766
+ end
767
+
768
+ # Request body for PATCH /api/v1/repositories/{repo_name}/tags/{tag_name}
769
+ class UpdateRepoTagRequest
770
+ attr_accessor :update_repo_tag_request, :update_repo_tag_request,
771
+
772
+ def initialize(attrs = {})
773
+ @update_repo_tag_request = attrs["commit_id"] || attrs[:update_repo_tag_request]
774
+ @update_repo_tag_request = attrs["description"] || attrs[:update_repo_tag_request]
775
+ end
776
+
777
+ def self.from_json(json_str)
778
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
779
+ new(obj)
780
+ end
781
+
782
+ def to_h
783
+ {
784
+ "commit_id" => @update_repo_tag_request,
785
+ "description" => @update_repo_tag_request,
786
+ }
787
+ end
788
+
789
+ def to_json(*args)
790
+ to_h.to_json(*args)
791
+ end
792
+
793
+ end
794
+
795
+ # Response body for new VM requests (new_root, from_commit, branch)
796
+ class NewVmResponse
797
+ attr_accessor :new_vm_response,
798
+
799
+ def initialize(attrs = {})
800
+ @new_vm_response = attrs["vm_id"] || attrs[:new_vm_response]
801
+ end
802
+
803
+ def self.from_json(json_str)
804
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
805
+ new(obj)
806
+ end
807
+
808
+ def to_h
809
+ {
810
+ "vm_id" => @new_vm_response,
811
+ }
812
+ end
813
+
814
+ def to_json(*args)
815
+ to_h.to_json(*args)
816
+ end
817
+
818
+ end
819
+
820
+ # Response body for GET /api/v1/public/repositories
821
+ class ListPublicRepositoriesResponse
822
+ attr_accessor :list_public_repositories_response,
823
+
824
+ def initialize(attrs = {})
825
+ @list_public_repositories_response = attrs["repositories"] || attrs[:list_public_repositories_response]
826
+ end
827
+
828
+ def self.from_json(json_str)
829
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
830
+ new(obj)
831
+ end
832
+
833
+ def to_h
834
+ {
835
+ "repositories" => @list_public_repositories_response,
836
+ }
837
+ end
838
+
839
+ def to_json(*args)
840
+ to_h.to_json(*args)
841
+ end
842
+
843
+ end
844
+
845
+ # Request body for POST /api/v1/commit_tags
846
+ class CreateTagRequest
847
+ attr_accessor :create_tag_request, :create_tag_request, :create_tag_request,
848
+
849
+ def initialize(attrs = {})
850
+ @create_tag_request = attrs["commit_id"] || attrs[:create_tag_request]
851
+ @create_tag_request = attrs["description"] || attrs[:create_tag_request]
852
+ @create_tag_request = attrs["tag_name"] || attrs[:create_tag_request]
853
+ end
854
+
855
+ def self.from_json(json_str)
856
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
857
+ new(obj)
858
+ end
859
+
860
+ def to_h
861
+ {
862
+ "commit_id" => @create_tag_request,
863
+ "description" => @create_tag_request,
864
+ "tag_name" => @create_tag_request,
865
+ }
866
+ end
867
+
868
+ def to_json(*args)
869
+ to_h.to_json(*args)
870
+ end
871
+
872
+ end
873
+
874
+ # Request body for POST /api/v1/vm/from_commit
875
+ module FromCommitVmRequest
876
+ class CommitIdVariant
877
+ attr_accessor :data
878
+
879
+ def initialize(data = {})
880
+ @data = data
881
+ end
882
+
883
+ def self.from_json(obj)
884
+ new(obj)
885
+ end
886
+
887
+ def to_h
888
+ @data
889
+ end
890
+ end
891
+
892
+ class TagNameVariant
893
+ attr_accessor :data
894
+
895
+ def initialize(data = {})
896
+ @data = data
897
+ end
898
+
899
+ def self.from_json(obj)
900
+ new(obj)
901
+ end
902
+
903
+ def to_h
904
+ @data
905
+ end
906
+ end
907
+
908
+ class RefVariant
909
+ attr_accessor :data
910
+
911
+ def initialize(data = {})
912
+ @data = data
913
+ end
914
+
915
+ def self.from_json(obj)
916
+ new(obj)
917
+ end
918
+
919
+ def to_h
920
+ @data
921
+ end
922
+ end
923
+
924
+ VARIANT_CLASSES = [CommitIdVariant, TagNameVariant, RefVariant].freeze
925
+
926
+ def self.from_json(obj)
927
+ return nil unless obj.is_a?(Hash)
928
+ return CommitIdVariant.from_json(obj) if obj.key?("commit_id")
929
+ return TagNameVariant.from_json(obj) if obj.key?("tag_name")
930
+ return RefVariant.from_json(obj) if obj.key?("ref")
931
+ nil
932
+ end
933
+ end
934
+
935
+ # Response body for POST /api/v1/repositories/{repo_name}/tags
936
+ class CreateRepoTagResponse
937
+ attr_accessor :create_repo_tag_response, :create_repo_tag_response, :create_repo_tag_response,
938
+
939
+ def initialize(attrs = {})
940
+ @create_repo_tag_response = attrs["commit_id"] || attrs[:create_repo_tag_response]
941
+ @create_repo_tag_response = attrs["reference"] || attrs[:create_repo_tag_response]
942
+ @create_repo_tag_response = attrs["tag_id"] || attrs[:create_repo_tag_response]
943
+ end
944
+
945
+ def self.from_json(json_str)
946
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
947
+ new(obj)
948
+ end
949
+
950
+ def to_h
951
+ {
952
+ "commit_id" => @create_repo_tag_response,
953
+ "reference" => @create_repo_tag_response,
954
+ "tag_id" => @create_repo_tag_response,
955
+ }
956
+ end
957
+
958
+ def to_json(*args)
959
+ to_h.to_json(*args)
960
+ end
961
+
962
+ end
963
+
964
+ #
965
+ class CommitInfo
966
+ attr_accessor :commit_info, :commit_info, :commit_info, :commit_info, :commit_info, :commit_info, :commit_info, :commit_info,
967
+
968
+ def initialize(attrs = {})
969
+ @commit_info = attrs["commit_id"] || attrs[:commit_info]
970
+ @commit_info = attrs["created_at"] || attrs[:commit_info]
971
+ @commit_info = attrs["description"] || attrs[:commit_info]
972
+ @commit_info = attrs["grandparent_commit_id"] || attrs[:commit_info]
973
+ @commit_info = attrs["is_public"] || attrs[:commit_info]
974
+ @commit_info = attrs["name"] || attrs[:commit_info]
975
+ @commit_info = attrs["owner_id"] || attrs[:commit_info]
976
+ @commit_info = attrs["parent_vm_id"] || attrs[:commit_info]
977
+ end
978
+
979
+ def self.from_json(json_str)
980
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
981
+ new(obj)
982
+ end
983
+
984
+ def to_h
985
+ {
986
+ "commit_id" => @commit_info,
987
+ "created_at" => @commit_info,
988
+ "description" => @commit_info,
989
+ "grandparent_commit_id" => @commit_info,
990
+ "is_public" => @commit_info,
991
+ "name" => @commit_info,
992
+ "owner_id" => @commit_info,
993
+ "parent_vm_id" => @commit_info,
994
+ }
995
+ end
996
+
997
+ def to_json(*args)
998
+ to_h.to_json(*args)
999
+ end
1000
+
1001
+ end
1002
+
1003
+ # Request body for POST /api/v1/domains
1004
+ class CreateDomainRequest
1005
+ attr_accessor :create_domain_request, :create_domain_request,
1006
+
1007
+ def initialize(attrs = {})
1008
+ @create_domain_request = attrs["domain"] || attrs[:create_domain_request]
1009
+ @create_domain_request = attrs["vm_id"] || attrs[:create_domain_request]
1010
+ end
1011
+
1012
+ def self.from_json(json_str)
1013
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1014
+ new(obj)
1015
+ end
1016
+
1017
+ def to_h
1018
+ {
1019
+ "domain" => @create_domain_request,
1020
+ "vm_id" => @create_domain_request,
1021
+ }
1022
+ end
1023
+
1024
+ def to_json(*args)
1025
+ to_h.to_json(*args)
1026
+ end
1027
+
1028
+ end
1029
+
1030
+ # Response body for DELETE /api/v1/domains/{domain_id}
1031
+ class DeleteDomainResponse
1032
+ attr_accessor :delete_domain_response,
1033
+
1034
+ def initialize(attrs = {})
1035
+ @delete_domain_response = attrs["domain_id"] || attrs[:delete_domain_response]
1036
+ end
1037
+
1038
+ def self.from_json(json_str)
1039
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1040
+ new(obj)
1041
+ end
1042
+
1043
+ def to_h
1044
+ {
1045
+ "domain_id" => @delete_domain_response,
1046
+ }
1047
+ end
1048
+
1049
+ def to_json(*args)
1050
+ to_h.to_json(*args)
1051
+ end
1052
+
1053
+ end
1054
+
1055
+ # Response body for GET /api/v1/repositories
1056
+ class ListRepositoriesResponse
1057
+ attr_accessor :list_repositories_response,
1058
+
1059
+ def initialize(attrs = {})
1060
+ @list_repositories_response = attrs["repositories"] || attrs[:list_repositories_response]
1061
+ end
1062
+
1063
+ def self.from_json(json_str)
1064
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1065
+ new(obj)
1066
+ end
1067
+
1068
+ def to_h
1069
+ {
1070
+ "repositories" => @list_repositories_response,
1071
+ }
1072
+ end
1073
+
1074
+ def to_json(*args)
1075
+ to_h.to_json(*args)
1076
+ end
1077
+
1078
+ end
1079
+
1080
+ # Repository information returned in list and get operations
1081
+ class RepositoryInfo
1082
+ attr_accessor :repository_info, :repository_info, :repository_info, :repository_info, :repository_info,
1083
+
1084
+ def initialize(attrs = {})
1085
+ @repository_info = attrs["created_at"] || attrs[:repository_info]
1086
+ @repository_info = attrs["description"] || attrs[:repository_info]
1087
+ @repository_info = attrs["is_public"] || attrs[:repository_info]
1088
+ @repository_info = attrs["name"] || attrs[:repository_info]
1089
+ @repository_info = attrs["repo_id"] || attrs[:repository_info]
1090
+ end
1091
+
1092
+ def self.from_json(json_str)
1093
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1094
+ new(obj)
1095
+ end
1096
+
1097
+ def to_h
1098
+ {
1099
+ "created_at" => @repository_info,
1100
+ "description" => @repository_info,
1101
+ "is_public" => @repository_info,
1102
+ "name" => @repository_info,
1103
+ "repo_id" => @repository_info,
1104
+ }
1105
+ end
1106
+
1107
+ def to_json(*args)
1108
+ to_h.to_json(*args)
1109
+ end
1110
+
1111
+ end
1112
+
1113
+ # Request body for PATCH /api/v1/commit_tags/{tag_name} For `description`: - Field absent from JSON → don't change the description - Field present as `null` → clear the description - Field present as `'text'` → set the description to 'text'
1114
+ class UpdateTagRequest
1115
+ attr_accessor :update_tag_request, :update_tag_request,
1116
+
1117
+ def initialize(attrs = {})
1118
+ @update_tag_request = attrs["commit_id"] || attrs[:update_tag_request]
1119
+ @update_tag_request = attrs["description"] || attrs[:update_tag_request]
1120
+ end
1121
+
1122
+ def self.from_json(json_str)
1123
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1124
+ new(obj)
1125
+ end
1126
+
1127
+ def to_h
1128
+ {
1129
+ "commit_id" => @update_tag_request,
1130
+ "description" => @update_tag_request,
1131
+ }
1132
+ end
1133
+
1134
+ def to_json(*args)
1135
+ to_h.to_json(*args)
1136
+ end
1137
+
1138
+ end
1139
+
1140
+ #
1141
+ class NewRootRequest
1142
+ attr_accessor :new_root_request,
1143
+
1144
+ def initialize(attrs = {})
1145
+ @new_root_request = attrs["vm_config"] || attrs[:new_root_request]
1146
+ end
1147
+
1148
+ def self.from_json(json_str)
1149
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1150
+ new(obj)
1151
+ end
1152
+
1153
+ def to_h
1154
+ {
1155
+ "vm_config" => @new_root_request,
1156
+ }
1157
+ end
1158
+
1159
+ def to_json(*args)
1160
+ to_h.to_json(*args)
1161
+ end
1162
+
1163
+ end
1164
+
1165
+ # Request body for PUT /env_vars — sets (upserts) one or more environment variables. # Lifecycle model Environment variables are written to `/etc/environment` inside a VM **once at boot time** via a vsock `WriteFile` request. They are **not** live-synced to running VMs. This is intentional: VMs are ephemeral (create → use → destroy/branch), so env var changes naturally take effect on the next VM. The `replace` flag exists so callers can atomically express 'I want exactly these variables and nothing else' without having to DELETE each stale key individually. Without it, the only way to remove a variable from future VMs is a separate `DELETE /env_vars/{key}` call per key.
1166
+ class SetEnvVarsRequest
1167
+ attr_accessor :set_env_vars_request, :set_env_vars_request,
1168
+
1169
+ def initialize(attrs = {})
1170
+ @set_env_vars_request = attrs["replace"] || attrs[:set_env_vars_request]
1171
+ @set_env_vars_request = attrs["vars"] || attrs[:set_env_vars_request]
1172
+ end
1173
+
1174
+ def self.from_json(json_str)
1175
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1176
+ new(obj)
1177
+ end
1178
+
1179
+ def to_h
1180
+ {
1181
+ "replace" => @set_env_vars_request,
1182
+ "vars" => @set_env_vars_request,
1183
+ }
1184
+ end
1185
+
1186
+ def to_json(*args)
1187
+ to_h.to_json(*args)
1188
+ end
1189
+
1190
+ end
1191
+
1192
+ #
1193
+ class VM
1194
+ attr_accessor :v_m, :v_m, :v_m, :v_m,
1195
+
1196
+ def initialize(attrs = {})
1197
+ @v_m = attrs["created_at"] || attrs[:v_m]
1198
+ @v_m = attrs["owner_id"] || attrs[:v_m]
1199
+ @v_m = attrs["state"] || attrs[:v_m]
1200
+ @v_m = attrs["vm_id"] || attrs[:v_m]
1201
+ end
1202
+
1203
+ def self.from_json(json_str)
1204
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1205
+ new(obj)
1206
+ end
1207
+
1208
+ def to_h
1209
+ {
1210
+ "created_at" => @v_m,
1211
+ "owner_id" => @v_m,
1212
+ "state" => @v_m,
1213
+ "vm_id" => @v_m,
1214
+ }
1215
+ end
1216
+
1217
+ def to_json(*args)
1218
+ to_h.to_json(*args)
1219
+ end
1220
+
1221
+ end
1222
+
1223
+ # Struct representing configuration options common to all VMs
1224
+ class VmCreateVmConfig
1225
+ attr_accessor :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config,
1226
+
1227
+ def initialize(attrs = {})
1228
+ @vm_create_vm_config = attrs["fs_size_mib"] || attrs[:vm_create_vm_config]
1229
+ @vm_create_vm_config = attrs["image_name"] || attrs[:vm_create_vm_config]
1230
+ @vm_create_vm_config = attrs["kernel_name"] || attrs[:vm_create_vm_config]
1231
+ @vm_create_vm_config = attrs["mem_size_mib"] || attrs[:vm_create_vm_config]
1232
+ @vm_create_vm_config = attrs["vcpu_count"] || attrs[:vm_create_vm_config]
1233
+ end
1234
+
1235
+ def self.from_json(json_str)
1236
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1237
+ new(obj)
1238
+ end
1239
+
1240
+ def to_h
1241
+ {
1242
+ "fs_size_mib" => @vm_create_vm_config,
1243
+ "image_name" => @vm_create_vm_config,
1244
+ "kernel_name" => @vm_create_vm_config,
1245
+ "mem_size_mib" => @vm_create_vm_config,
1246
+ "vcpu_count" => @vm_create_vm_config,
1247
+ }
1248
+ end
1249
+
1250
+ def to_json(*args)
1251
+ to_h.to_json(*args)
1252
+ end
1253
+
1254
+ end
1255
+
1256
+ # Response body for DELETE /api/vm/{vm_id}
1257
+ class VmDeleteResponse
1258
+ attr_accessor :vm_delete_response,
1259
+
1260
+ def initialize(attrs = {})
1261
+ @vm_delete_response = attrs["vm_id"] || attrs[:vm_delete_response]
1262
+ end
1263
+
1264
+ def self.from_json(json_str)
1265
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1266
+ new(obj)
1267
+ end
1268
+
1269
+ def to_h
1270
+ {
1271
+ "vm_id" => @vm_delete_response,
1272
+ }
1273
+ end
1274
+
1275
+ def to_json(*args)
1276
+ to_h.to_json(*args)
1277
+ end
1278
+
1279
+ end
1280
+
1281
+ # Response body for POST /api/v1/commit_tags
1282
+ class CreateTagResponse
1283
+ attr_accessor :create_tag_response, :create_tag_response, :create_tag_response,
1284
+
1285
+ def initialize(attrs = {})
1286
+ @create_tag_response = attrs["commit_id"] || attrs[:create_tag_response]
1287
+ @create_tag_response = attrs["tag_id"] || attrs[:create_tag_response]
1288
+ @create_tag_response = attrs["tag_name"] || attrs[:create_tag_response]
1289
+ end
1290
+
1291
+ def self.from_json(json_str)
1292
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1293
+ new(obj)
1294
+ end
1295
+
1296
+ def to_h
1297
+ {
1298
+ "commit_id" => @create_tag_response,
1299
+ "tag_id" => @create_tag_response,
1300
+ "tag_name" => @create_tag_response,
1301
+ }
1302
+ end
1303
+
1304
+ def to_json(*args)
1305
+ to_h.to_json(*args)
1306
+ end
1307
+
1308
+ end
1309
+
1310
+ # Tag information within a repository context
1311
+ class RepoTagInfo
1312
+ attr_accessor :repo_tag_info, :repo_tag_info, :repo_tag_info, :repo_tag_info, :repo_tag_info, :repo_tag_info, :repo_tag_info,
1313
+
1314
+ def initialize(attrs = {})
1315
+ @repo_tag_info = attrs["commit_id"] || attrs[:repo_tag_info]
1316
+ @repo_tag_info = attrs["created_at"] || attrs[:repo_tag_info]
1317
+ @repo_tag_info = attrs["description"] || attrs[:repo_tag_info]
1318
+ @repo_tag_info = attrs["reference"] || attrs[:repo_tag_info]
1319
+ @repo_tag_info = attrs["tag_id"] || attrs[:repo_tag_info]
1320
+ @repo_tag_info = attrs["tag_name"] || attrs[:repo_tag_info]
1321
+ @repo_tag_info = attrs["updated_at"] || attrs[:repo_tag_info]
1322
+ end
1323
+
1324
+ def self.from_json(json_str)
1325
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1326
+ new(obj)
1327
+ end
1328
+
1329
+ def to_h
1330
+ {
1331
+ "commit_id" => @repo_tag_info,
1332
+ "created_at" => @repo_tag_info,
1333
+ "description" => @repo_tag_info,
1334
+ "reference" => @repo_tag_info,
1335
+ "tag_id" => @repo_tag_info,
1336
+ "tag_name" => @repo_tag_info,
1337
+ "updated_at" => @repo_tag_info,
1338
+ }
1339
+ end
1340
+
1341
+ def to_json(*args)
1342
+ to_h.to_json(*args)
1343
+ end
1344
+
1345
+ end
1346
+
1347
+ # Response for exec log tail requests.
1348
+ class VmExecLogResponse
1349
+ attr_accessor :vm_exec_log_response, :vm_exec_log_response, :vm_exec_log_response,
1350
+
1351
+ def initialize(attrs = {})
1352
+ @vm_exec_log_response = attrs["entries"] || attrs[:vm_exec_log_response]
1353
+ @vm_exec_log_response = attrs["eof"] || attrs[:vm_exec_log_response]
1354
+ @vm_exec_log_response = attrs["next_offset"] || attrs[:vm_exec_log_response]
1355
+ end
1356
+
1357
+ def self.from_json(json_str)
1358
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1359
+ new(obj)
1360
+ end
1361
+
1362
+ def to_h
1363
+ {
1364
+ "entries" => @vm_exec_log_response,
1365
+ "eof" => @vm_exec_log_response,
1366
+ "next_offset" => @vm_exec_log_response,
1367
+ }
1368
+ end
1369
+
1370
+ def to_json(*args)
1371
+ to_h.to_json(*args)
1372
+ end
1373
+
1374
+ end
1375
+
1376
+ # Response for GET /api/v1/vm/{vm_id}/metadata
1377
+ class VmMetadataResponse
1378
+ attr_accessor :vm_metadata_response, :vm_metadata_response, :vm_metadata_response, :vm_metadata_response, :vm_metadata_response, :vm_metadata_response, :vm_metadata_response, :vm_metadata_response,
1379
+
1380
+ def initialize(attrs = {})
1381
+ @vm_metadata_response = attrs["created_at"] || attrs[:vm_metadata_response]
1382
+ @vm_metadata_response = attrs["deleted_at"] || attrs[:vm_metadata_response]
1383
+ @vm_metadata_response = attrs["grandparent_vm_id"] || attrs[:vm_metadata_response]
1384
+ @vm_metadata_response = attrs["ip"] || attrs[:vm_metadata_response]
1385
+ @vm_metadata_response = attrs["owner_id"] || attrs[:vm_metadata_response]
1386
+ @vm_metadata_response = attrs["parent_commit_id"] || attrs[:vm_metadata_response]
1387
+ @vm_metadata_response = attrs["state"] || attrs[:vm_metadata_response]
1388
+ @vm_metadata_response = attrs["vm_id"] || attrs[:vm_metadata_response]
1389
+ end
1390
+
1391
+ def self.from_json(json_str)
1392
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1393
+ new(obj)
1394
+ end
1395
+
1396
+ def to_h
1397
+ {
1398
+ "created_at" => @vm_metadata_response,
1399
+ "deleted_at" => @vm_metadata_response,
1400
+ "grandparent_vm_id" => @vm_metadata_response,
1401
+ "ip" => @vm_metadata_response,
1402
+ "owner_id" => @vm_metadata_response,
1403
+ "parent_commit_id" => @vm_metadata_response,
1404
+ "state" => @vm_metadata_response,
1405
+ "vm_id" => @vm_metadata_response,
1406
+ }
1407
+ end
1408
+
1409
+ def to_json(*args)
1410
+ to_h.to_json(*args)
1411
+ end
1412
+
1413
+ end
1414
+
1415
+ # Request body for PATCH /api/vm/{vm_id}/disk
1416
+ class VmResizeDiskRequest
1417
+ attr_accessor :vm_resize_disk_request,
1418
+
1419
+ def initialize(attrs = {})
1420
+ @vm_resize_disk_request = attrs["fs_size_mib"] || attrs[:vm_resize_disk_request]
1421
+ end
1422
+
1423
+ def self.from_json(json_str)
1424
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1425
+ new(obj)
1426
+ end
1427
+
1428
+ def to_h
1429
+ {
1430
+ "fs_size_mib" => @vm_resize_disk_request,
1431
+ }
1432
+ end
1433
+
1434
+ def to_json(*args)
1435
+ to_h.to_json(*args)
1436
+ end
1437
+
1438
+ end
1439
+
1440
+ # The response body for POST /api/vm/{vm_id}/commit
1441
+ class VmCommitResponse
1442
+ attr_accessor :vm_commit_response,
1443
+
1444
+ def initialize(attrs = {})
1445
+ @vm_commit_response = attrs["commit_id"] || attrs[:vm_commit_response]
1446
+ end
1447
+
1448
+ def self.from_json(json_str)
1449
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
1450
+ new(obj)
1451
+ end
1452
+
1453
+ def to_h
1454
+ {
1455
+ "commit_id" => @vm_commit_response,
1456
+ }
1457
+ end
1458
+
1459
+ def to_json(*args)
1460
+ to_h.to_json(*args)
1461
+ end
1462
+
1463
+ end
1464
+
1465
+
1466
+ # ── Params types for operations with query parameters ───────────────
1467
+
1468
+ # Query parameters for ResizeVmDiskParams
1469
+ class ResizeVmDiskParams
1470
+ attr_accessor :skip_wait_boot,
1471
+
1472
+ def initialize(attrs = {})
1473
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1474
+ end
1475
+
1476
+ def to_h
1477
+ h = {}
1478
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
1479
+ h
1480
+ end
1481
+ end
1482
+
1483
+ # Query parameters for CreateNewRootVmParams
1484
+ class CreateNewRootVmParams
1485
+ attr_accessor :wait_boot,
1486
+
1487
+ def initialize(attrs = {})
1488
+ @wait_boot = attrs[:wait_boot] || attrs["wait_boot"]
1489
+ end
1490
+
1491
+ def to_h
1492
+ h = {}
1493
+ h["wait_boot"] = @wait_boot unless @wait_boot.nil?
1494
+ h
1495
+ end
1496
+ end
1497
+
1498
+ # Query parameters for VmLogsParams
1499
+ class VmLogsParams
1500
+ attr_accessor :offset, :max_entries, :stream,
1501
+
1502
+ def initialize(attrs = {})
1503
+ @offset = attrs[:offset] || attrs["offset"]
1504
+ @max_entries = attrs[:max_entries] || attrs["max_entries"]
1505
+ @stream = attrs[:stream] || attrs["stream"]
1506
+ end
1507
+
1508
+ def to_h
1509
+ h = {}
1510
+ h["offset"] = @offset unless @offset.nil?
1511
+ h["max_entries"] = @max_entries unless @max_entries.nil?
1512
+ h["stream"] = @stream unless @stream.nil?
1513
+ h
1514
+ end
1515
+ end
1516
+
1517
+ # Query parameters for BranchByRefParams
1518
+ class BranchByRefParams
1519
+ attr_accessor :count,
1520
+
1521
+ def initialize(attrs = {})
1522
+ @count = attrs[:count] || attrs["count"]
1523
+ end
1524
+
1525
+ def to_h
1526
+ h = {}
1527
+ h["count"] = @count unless @count.nil?
1528
+ h
1529
+ end
1530
+ end
1531
+
1532
+ # Query parameters for BranchByTagParams
1533
+ class BranchByTagParams
1534
+ attr_accessor :count,
1535
+
1536
+ def initialize(attrs = {})
1537
+ @count = attrs[:count] || attrs["count"]
1538
+ end
1539
+
1540
+ def to_h
1541
+ h = {}
1542
+ h["count"] = @count unless @count.nil?
1543
+ h
1544
+ end
1545
+ end
1546
+
1547
+ # Query parameters for BranchVmParams
1548
+ class BranchVmParams
1549
+ attr_accessor :keep_paused, :skip_wait_boot, :count,
1550
+
1551
+ def initialize(attrs = {})
1552
+ @keep_paused = attrs[:keep_paused] || attrs["keep_paused"]
1553
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1554
+ @count = attrs[:count] || attrs["count"]
1555
+ end
1556
+
1557
+ def to_h
1558
+ h = {}
1559
+ h["keep_paused"] = @keep_paused unless @keep_paused.nil?
1560
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
1561
+ h["count"] = @count unless @count.nil?
1562
+ h
1563
+ end
1564
+ end
1565
+
1566
+ # Query parameters for UpdateVmStateParams
1567
+ class UpdateVmStateParams
1568
+ attr_accessor :skip_wait_boot,
1569
+
1570
+ def initialize(attrs = {})
1571
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1572
+ end
1573
+
1574
+ def to_h
1575
+ h = {}
1576
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
1577
+ h
1578
+ end
1579
+ end
1580
+
1581
+ # Query parameters for DeleteVmParams
1582
+ class DeleteVmParams
1583
+ attr_accessor :skip_wait_boot,
1584
+
1585
+ def initialize(attrs = {})
1586
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1587
+ end
1588
+
1589
+ def to_h
1590
+ h = {}
1591
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
1592
+ h
1593
+ end
1594
+ end
1595
+
1596
+ # Query parameters for BranchByVmParams
1597
+ class BranchByVmParams
1598
+ attr_accessor :keep_paused, :skip_wait_boot, :count,
1599
+
1600
+ def initialize(attrs = {})
1601
+ @keep_paused = attrs[:keep_paused] || attrs["keep_paused"]
1602
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1603
+ @count = attrs[:count] || attrs["count"]
1604
+ end
1605
+
1606
+ def to_h
1607
+ h = {}
1608
+ h["keep_paused"] = @keep_paused unless @keep_paused.nil?
1609
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
1610
+ h["count"] = @count unless @count.nil?
1611
+ h
1612
+ end
1613
+ end
1614
+
1615
+ # Query parameters for CommitVmParams
1616
+ class CommitVmParams
1617
+ attr_accessor :keep_paused, :skip_wait_boot,
1618
+
1619
+ def initialize(attrs = {})
1620
+ @keep_paused = attrs[:keep_paused] || attrs["keep_paused"]
1621
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1622
+ end
1623
+
1624
+ def to_h
1625
+ h = {}
1626
+ h["keep_paused"] = @keep_paused unless @keep_paused.nil?
1627
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
1628
+ h
1629
+ end
1630
+ end
1631
+
1632
+ # Query parameters for ListDomainsParams
1633
+ class ListDomainsParams
1634
+ attr_accessor :vm_id,
1635
+
1636
+ def initialize(attrs = {})
1637
+ @vm_id = attrs[:vm_id] || attrs["vm_id"]
1638
+ end
1639
+
1640
+ def to_h
1641
+ h = {}
1642
+ h["vm_id"] = @vm_id unless @vm_id.nil?
1643
+ h
1644
+ end
1645
+ end
1646
+
1647
+ # Query parameters for BranchByCommitParams
1648
+ class BranchByCommitParams
1649
+ attr_accessor :count,
1650
+
1651
+ def initialize(attrs = {})
1652
+ @count = attrs[:count] || attrs["count"]
1653
+ end
1654
+
1655
+ def to_h
1656
+ h = {}
1657
+ h["count"] = @count unless @count.nil?
1658
+ h
1659
+ end
1660
+ end
1661
+
1662
+ end