vers-sdk 0.1.8 → 0.1.9

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.
@@ -6,16 +6,745 @@
6
6
  require "json"
7
7
 
8
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,
9
+ # Response body for GET /env_vars and PUT /env_vars.
10
+ class EnvVarsResponse
11
+ attr_accessor :env_vars_response,
12
+
13
+ def initialize(attrs = {})
14
+ @env_vars_response = attrs["vars"] || attrs[:env_vars_response]
15
+ end
16
+
17
+ def self.from_json(json_str)
18
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
19
+ new(obj)
20
+ end
21
+
22
+ def to_h
23
+ {
24
+ "vars" => @env_vars_response,
25
+ }
26
+ end
27
+
28
+ def to_json(*args)
29
+ to_h.to_json(*args)
30
+ end
31
+
32
+ end
33
+
34
+ # Response body for POST /api/v1/repositories
35
+ class CreateRepositoryResponse
36
+ attr_accessor :create_repository_response, :create_repository_response,
37
+
38
+ def initialize(attrs = {})
39
+ @create_repository_response = attrs["name"] || attrs[:create_repository_response]
40
+ @create_repository_response = attrs["repo_id"] || attrs[:create_repository_response]
41
+ end
42
+
43
+ def self.from_json(json_str)
44
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
45
+ new(obj)
46
+ end
47
+
48
+ def to_h
49
+ {
50
+ "name" => @create_repository_response,
51
+ "repo_id" => @create_repository_response,
52
+ }
53
+ end
54
+
55
+ def to_json(*args)
56
+ to_h.to_json(*args)
57
+ end
58
+
59
+ end
60
+
61
+ # Public repository information (includes owner org name for namespacing)
62
+ class PublicRepositoryInfo
63
+ attr_accessor :public_repository_info, :public_repository_info, :public_repository_info, :public_repository_info, :public_repository_info, :public_repository_info,
64
+
65
+ def initialize(attrs = {})
66
+ @public_repository_info = attrs["created_at"] || attrs[:public_repository_info]
67
+ @public_repository_info = attrs["description"] || attrs[:public_repository_info]
68
+ @public_repository_info = attrs["full_name"] || attrs[:public_repository_info]
69
+ @public_repository_info = attrs["name"] || attrs[:public_repository_info]
70
+ @public_repository_info = attrs["org_name"] || attrs[:public_repository_info]
71
+ @public_repository_info = attrs["repo_id"] || attrs[:public_repository_info]
72
+ end
73
+
74
+ def self.from_json(json_str)
75
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
76
+ new(obj)
77
+ end
78
+
79
+ def to_h
80
+ {
81
+ "created_at" => @public_repository_info,
82
+ "description" => @public_repository_info,
83
+ "full_name" => @public_repository_info,
84
+ "name" => @public_repository_info,
85
+ "org_name" => @public_repository_info,
86
+ "repo_id" => @public_repository_info,
87
+ }
88
+ end
89
+
90
+ def to_json(*args)
91
+ to_h.to_json(*args)
92
+ end
93
+
94
+ end
95
+
96
+ #
97
+ class WhoamiOrg
98
+ attr_accessor :whoami_org, :whoami_org,
99
+
100
+ def initialize(attrs = {})
101
+ @whoami_org = attrs["id"] || attrs[:whoami_org]
102
+ @whoami_org = attrs["name"] || attrs[:whoami_org]
103
+ end
104
+
105
+ def self.from_json(json_str)
106
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
107
+ new(obj)
108
+ end
109
+
110
+ def to_h
111
+ {
112
+ "id" => @whoami_org,
113
+ "name" => @whoami_org,
114
+ }
115
+ end
116
+
117
+ def to_json(*args)
118
+ to_h.to_json(*args)
119
+ end
120
+
121
+ end
122
+
123
+ # Response body for GET /api/v1/commit_tags
124
+ class ListTagsResponse
125
+ attr_accessor :list_tags_response,
126
+
127
+ def initialize(attrs = {})
128
+ @list_tags_response = attrs["tags"] || attrs[:list_tags_response]
129
+ end
130
+
131
+ def self.from_json(json_str)
132
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
133
+ new(obj)
134
+ end
135
+
136
+ def to_h
137
+ {
138
+ "tags" => @list_tags_response,
139
+ }
140
+ end
141
+
142
+ def to_json(*args)
143
+ to_h.to_json(*args)
144
+ end
145
+
146
+ end
147
+
148
+ # Request body for creating a tag within a repository: POST /api/v1/repositories/{repo_name}/tags
149
+ class CreateRepoTagRequest
150
+ attr_accessor :create_repo_tag_request, :create_repo_tag_request, :create_repo_tag_request,
151
+
152
+ def initialize(attrs = {})
153
+ @create_repo_tag_request = attrs["commit_id"] || attrs[:create_repo_tag_request]
154
+ @create_repo_tag_request = attrs["description"] || attrs[:create_repo_tag_request]
155
+ @create_repo_tag_request = attrs["tag_name"] || attrs[:create_repo_tag_request]
156
+ end
157
+
158
+ def self.from_json(json_str)
159
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
160
+ new(obj)
161
+ end
162
+
163
+ def to_h
164
+ {
165
+ "commit_id" => @create_repo_tag_request,
166
+ "description" => @create_repo_tag_request,
167
+ "tag_name" => @create_repo_tag_request,
168
+ }
169
+ end
170
+
171
+ def to_json(*args)
172
+ to_h.to_json(*args)
173
+ end
174
+
175
+ end
176
+
177
+ # Response struct for GET api/v1/system/version
178
+ class OrchestratorVersion
179
+ attr_accessor :orchestrator_version, :orchestrator_version, :orchestrator_version,
180
+
181
+ def initialize(attrs = {})
182
+ @orchestrator_version = attrs["executable_name"] || attrs[:orchestrator_version]
183
+ @orchestrator_version = attrs["git_hash"] || attrs[:orchestrator_version]
184
+ @orchestrator_version = attrs["workspace_version"] || attrs[:orchestrator_version]
185
+ end
186
+
187
+ def self.from_json(json_str)
188
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
189
+ new(obj)
190
+ end
191
+
192
+ def to_h
193
+ {
194
+ "executable_name" => @orchestrator_version,
195
+ "git_hash" => @orchestrator_version,
196
+ "workspace_version" => @orchestrator_version,
197
+ }
198
+ end
199
+
200
+ def to_json(*args)
201
+ to_h.to_json(*args)
202
+ end
203
+
204
+ end
205
+
206
+ #
207
+ class WhoamiApiKey
208
+ attr_accessor :whoami_api_key, :whoami_api_key, :whoami_api_key, :whoami_api_key, :whoami_api_key, :whoami_api_key,
209
+
210
+ def initialize(attrs = {})
211
+ @whoami_api_key = attrs["created_at"] || attrs[:whoami_api_key]
212
+ @whoami_api_key = attrs["expires_at"] || attrs[:whoami_api_key]
213
+ @whoami_api_key = attrs["id"] || attrs[:whoami_api_key]
214
+ @whoami_api_key = attrs["label"] || attrs[:whoami_api_key]
215
+ @whoami_api_key = attrs["max_memory_mib"] || attrs[:whoami_api_key]
216
+ @whoami_api_key = attrs["max_vcpus"] || attrs[:whoami_api_key]
217
+ end
218
+
219
+ def self.from_json(json_str)
220
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
221
+ new(obj)
222
+ end
223
+
224
+ def to_h
225
+ {
226
+ "created_at" => @whoami_api_key,
227
+ "expires_at" => @whoami_api_key,
228
+ "id" => @whoami_api_key,
229
+ "label" => @whoami_api_key,
230
+ "max_memory_mib" => @whoami_api_key,
231
+ "max_vcpus" => @whoami_api_key,
232
+ }
233
+ end
234
+
235
+ def to_json(*args)
236
+ to_h.to_json(*args)
237
+ end
238
+
239
+ end
240
+
241
+ # Request body for POST /vm/{vm_id}/commit
242
+ class CommitVmRequest
243
+ attr_accessor :commit_vm_request, :commit_vm_request,
244
+
245
+ def initialize(attrs = {})
246
+ @commit_vm_request = attrs["description"] || attrs[:commit_vm_request]
247
+ @commit_vm_request = attrs["name"] || attrs[:commit_vm_request]
248
+ end
249
+
250
+ def self.from_json(json_str)
251
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
252
+ new(obj)
253
+ end
254
+
255
+ def to_h
256
+ {
257
+ "description" => @commit_vm_request,
258
+ "name" => @commit_vm_request,
259
+ }
260
+ end
261
+
262
+ def to_json(*args)
263
+ to_h.to_json(*args)
264
+ end
265
+
266
+ end
267
+
268
+ #
269
+ class ListCommitsResponse
270
+ attr_accessor :list_commits_response, :list_commits_response, :list_commits_response, :list_commits_response,
271
+
272
+ def initialize(attrs = {})
273
+ @list_commits_response = attrs["commits"] || attrs[:list_commits_response]
274
+ @list_commits_response = attrs["limit"] || attrs[:list_commits_response]
275
+ @list_commits_response = attrs["offset"] || attrs[:list_commits_response]
276
+ @list_commits_response = attrs["total"] || attrs[:list_commits_response]
277
+ end
278
+
279
+ def self.from_json(json_str)
280
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
281
+ new(obj)
282
+ end
283
+
284
+ def to_h
285
+ {
286
+ "commits" => @list_commits_response,
287
+ "limit" => @list_commits_response,
288
+ "offset" => @list_commits_response,
289
+ "total" => @list_commits_response,
290
+ }
291
+ end
292
+
293
+ def to_json(*args)
294
+ to_h.to_json(*args)
295
+ end
296
+
297
+ end
298
+
299
+ # Response body for `POST /api/v1/deploy`.
300
+ class DeployResponse
301
+ attr_accessor :deploy_response, :deploy_response, :deploy_response,
302
+
303
+ def initialize(attrs = {})
304
+ @deploy_response = attrs["project_id"] || attrs[:deploy_response]
305
+ @deploy_response = attrs["status"] || attrs[:deploy_response]
306
+ @deploy_response = attrs["vm_id"] || attrs[:deploy_response]
307
+ end
308
+
309
+ def self.from_json(json_str)
310
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
311
+ new(obj)
312
+ end
313
+
314
+ def to_h
315
+ {
316
+ "project_id" => @deploy_response,
317
+ "status" => @deploy_response,
318
+ "vm_id" => @deploy_response,
319
+ }
320
+ end
321
+
322
+ def to_json(*args)
323
+ to_h.to_json(*args)
324
+ end
325
+
326
+ end
327
+
328
+ # Response body for GET /api/v1/repositories/{repo_name}/tags
329
+ class ListRepoTagsResponse
330
+ attr_accessor :list_repo_tags_response, :list_repo_tags_response,
331
+
332
+ def initialize(attrs = {})
333
+ @list_repo_tags_response = attrs["repository"] || attrs[:list_repo_tags_response]
334
+ @list_repo_tags_response = attrs["tags"] || attrs[:list_repo_tags_response]
335
+ end
336
+
337
+ def self.from_json(json_str)
338
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
339
+ new(obj)
340
+ end
341
+
342
+ def to_h
343
+ {
344
+ "repository" => @list_repo_tags_response,
345
+ "tags" => @list_repo_tags_response,
346
+ }
347
+ end
348
+
349
+ def to_json(*args)
350
+ to_h.to_json(*args)
351
+ end
352
+
353
+ end
354
+
355
+ #
356
+ class BaseImageInfo
357
+ attr_accessor :base_image_info, :base_image_info, :base_image_info, :base_image_info, :base_image_info, :base_image_info, :base_image_info, :base_image_info,
358
+
359
+ def initialize(attrs = {})
360
+ @base_image_info = attrs["base_image_id"] || attrs[:base_image_info]
361
+ @base_image_info = attrs["created_at"] || attrs[:base_image_info]
362
+ @base_image_info = attrs["description"] || attrs[:base_image_info]
363
+ @base_image_info = attrs["image_name"] || attrs[:base_image_info]
364
+ @base_image_info = attrs["is_public"] || attrs[:base_image_info]
365
+ @base_image_info = attrs["owner_id"] || attrs[:base_image_info]
366
+ @base_image_info = attrs["size_mib"] || attrs[:base_image_info]
367
+ @base_image_info = attrs["source_type"] || attrs[:base_image_info]
368
+ end
369
+
370
+ def self.from_json(json_str)
371
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
372
+ new(obj)
373
+ end
374
+
375
+ def to_h
376
+ {
377
+ "base_image_id" => @base_image_info,
378
+ "created_at" => @base_image_info,
379
+ "description" => @base_image_info,
380
+ "image_name" => @base_image_info,
381
+ "is_public" => @base_image_info,
382
+ "owner_id" => @base_image_info,
383
+ "size_mib" => @base_image_info,
384
+ "source_type" => @base_image_info,
385
+ }
386
+ end
387
+
388
+ def to_json(*args)
389
+ to_h.to_json(*args)
390
+ end
391
+
392
+ end
393
+
394
+ # Response body for POST /api/vm/{vm_id}/exec
395
+ class VmExecResponse
396
+ attr_accessor :vm_exec_response, :vm_exec_response, :vm_exec_response, :vm_exec_response,
397
+
398
+ def initialize(attrs = {})
399
+ @vm_exec_response = attrs["exec_id"] || attrs[:vm_exec_response]
400
+ @vm_exec_response = attrs["exit_code"] || attrs[:vm_exec_response]
401
+ @vm_exec_response = attrs["stderr"] || attrs[:vm_exec_response]
402
+ @vm_exec_response = attrs["stdout"] || attrs[:vm_exec_response]
403
+ end
404
+
405
+ def self.from_json(json_str)
406
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
407
+ new(obj)
408
+ end
409
+
410
+ def to_h
411
+ {
412
+ "exec_id" => @vm_exec_response,
413
+ "exit_code" => @vm_exec_response,
414
+ "stderr" => @vm_exec_response,
415
+ "stdout" => @vm_exec_response,
416
+ }
417
+ end
418
+
419
+ def to_json(*args)
420
+ to_h.to_json(*args)
421
+ end
422
+
423
+ end
424
+
425
+ #
426
+ class CreateBaseImageResponse
427
+ attr_accessor :create_base_image_response, :create_base_image_response, :create_base_image_response,
428
+
429
+ def initialize(attrs = {})
430
+ @create_base_image_response = attrs["image_name"] || attrs[:create_base_image_response]
431
+ @create_base_image_response = attrs["job_id"] || attrs[:create_base_image_response]
432
+ @create_base_image_response = attrs["status"] || attrs[:create_base_image_response]
433
+ end
434
+
435
+ def self.from_json(json_str)
436
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
437
+ new(obj)
438
+ end
439
+
440
+ def to_h
441
+ {
442
+ "image_name" => @create_base_image_response,
443
+ "job_id" => @create_base_image_response,
444
+ "status" => @create_base_image_response,
445
+ }
446
+ end
447
+
448
+ def to_json(*args)
449
+ to_h.to_json(*args)
450
+ end
451
+
452
+ end
453
+
454
+ # Request body for POST /api/vm/{vm_id}/exec
455
+ class VmExecRequest
456
+ attr_accessor :vm_exec_request, :vm_exec_request, :vm_exec_request, :vm_exec_request, :vm_exec_request, :vm_exec_request,
457
+
458
+ def initialize(attrs = {})
459
+ @vm_exec_request = attrs["command"] || attrs[:vm_exec_request]
460
+ @vm_exec_request = attrs["env"] || attrs[:vm_exec_request]
461
+ @vm_exec_request = attrs["exec_id"] || attrs[:vm_exec_request]
462
+ @vm_exec_request = attrs["stdin"] || attrs[:vm_exec_request]
463
+ @vm_exec_request = attrs["timeout_secs"] || attrs[:vm_exec_request]
464
+ @vm_exec_request = attrs["working_dir"] || attrs[:vm_exec_request]
465
+ end
466
+
467
+ def self.from_json(json_str)
468
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
469
+ new(obj)
470
+ end
471
+
472
+ def to_h
473
+ {
474
+ "command" => @vm_exec_request,
475
+ "env" => @vm_exec_request,
476
+ "exec_id" => @vm_exec_request,
477
+ "stdin" => @vm_exec_request,
478
+ "timeout_secs" => @vm_exec_request,
479
+ "working_dir" => @vm_exec_request,
480
+ }
481
+ end
482
+
483
+ def to_json(*args)
484
+ to_h.to_json(*args)
485
+ end
486
+
487
+ end
488
+
489
+ #
490
+ class NewVmsResponse
491
+ attr_accessor :new_vms_response,
492
+
493
+ def initialize(attrs = {})
494
+ @new_vms_response = attrs["vms"] || attrs[:new_vms_response]
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
+ "vms" => @new_vms_response,
505
+ }
506
+ end
507
+
508
+ def to_json(*args)
509
+ to_h.to_json(*args)
510
+ end
511
+
512
+ end
513
+
514
+ # Request body for POST /api/vm/{vm_id}/exec/stream/attach
515
+ class VmExecStreamAttachRequest
516
+ attr_accessor :vm_exec_stream_attach_request, :vm_exec_stream_attach_request, :vm_exec_stream_attach_request,
517
+
518
+ def initialize(attrs = {})
519
+ @vm_exec_stream_attach_request = attrs["cursor"] || attrs[:vm_exec_stream_attach_request]
520
+ @vm_exec_stream_attach_request = attrs["exec_id"] || attrs[:vm_exec_stream_attach_request]
521
+ @vm_exec_stream_attach_request = attrs["from_latest"] || attrs[:vm_exec_stream_attach_request]
522
+ end
523
+
524
+ def self.from_json(json_str)
525
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
526
+ new(obj)
527
+ end
528
+
529
+ def to_h
530
+ {
531
+ "cursor" => @vm_exec_stream_attach_request,
532
+ "exec_id" => @vm_exec_stream_attach_request,
533
+ "from_latest" => @vm_exec_stream_attach_request,
534
+ }
535
+ end
536
+
537
+ def to_json(*args)
538
+ to_h.to_json(*args)
539
+ end
540
+
541
+ end
542
+
543
+ # Request body for PATCH /api/vm/{vm_id}/state
544
+ class VmUpdateStateRequest
545
+ attr_accessor :vm_update_state_request,
546
+
547
+ def initialize(attrs = {})
548
+ @vm_update_state_request = attrs["state"] || attrs[:vm_update_state_request]
549
+ end
550
+
551
+ def self.from_json(json_str)
552
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
553
+ new(obj)
554
+ end
555
+
556
+ def to_h
557
+ {
558
+ "state" => @vm_update_state_request,
559
+ }
560
+ end
561
+
562
+ def to_json(*args)
563
+ to_h.to_json(*args)
564
+ end
565
+
566
+ end
567
+
568
+ #
569
+ class DeleteBaseImageResponse
570
+ attr_accessor :delete_base_image_response, :delete_base_image_response,
571
+
572
+ def initialize(attrs = {})
573
+ @delete_base_image_response = attrs["base_image_id"] || attrs[:delete_base_image_response]
574
+ @delete_base_image_response = attrs["deleted"] || attrs[:delete_base_image_response]
575
+ end
576
+
577
+ def self.from_json(json_str)
578
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
579
+ new(obj)
580
+ end
581
+
582
+ def to_h
583
+ {
584
+ "base_image_id" => @delete_base_image_response,
585
+ "deleted" => @delete_base_image_response,
586
+ }
587
+ end
588
+
589
+ def to_json(*args)
590
+ to_h.to_json(*args)
591
+ end
592
+
593
+ end
594
+
595
+ # Response body for GET /api/v1/public/repositories
596
+ class ListPublicRepositoriesResponse
597
+ attr_accessor :list_public_repositories_response,
598
+
599
+ def initialize(attrs = {})
600
+ @list_public_repositories_response = attrs["repositories"] || attrs[:list_public_repositories_response]
601
+ end
602
+
603
+ def self.from_json(json_str)
604
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
605
+ new(obj)
606
+ end
607
+
608
+ def to_h
609
+ {
610
+ "repositories" => @list_public_repositories_response,
611
+ }
612
+ end
613
+
614
+ def to_json(*args)
615
+ to_h.to_json(*args)
616
+ end
617
+
618
+ end
619
+
620
+ # Request body for POST /api/v1/commit_tags
621
+ class CreateTagRequest
622
+ attr_accessor :create_tag_request, :create_tag_request, :create_tag_request,
623
+
624
+ def initialize(attrs = {})
625
+ @create_tag_request = attrs["commit_id"] || attrs[:create_tag_request]
626
+ @create_tag_request = attrs["description"] || attrs[:create_tag_request]
627
+ @create_tag_request = attrs["tag_name"] || attrs[:create_tag_request]
628
+ end
629
+
630
+ def self.from_json(json_str)
631
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
632
+ new(obj)
633
+ end
634
+
635
+ def to_h
636
+ {
637
+ "commit_id" => @create_tag_request,
638
+ "description" => @create_tag_request,
639
+ "tag_name" => @create_tag_request,
640
+ }
641
+ end
642
+
643
+ def to_json(*args)
644
+ to_h.to_json(*args)
645
+ end
646
+
647
+ end
648
+
649
+ # Response body for GET /api/v1/repositories
650
+ class ListRepositoriesResponse
651
+ attr_accessor :list_repositories_response,
652
+
653
+ def initialize(attrs = {})
654
+ @list_repositories_response = attrs["repositories"] || attrs[:list_repositories_response]
655
+ end
656
+
657
+ def self.from_json(json_str)
658
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
659
+ new(obj)
660
+ end
661
+
662
+ def to_h
663
+ {
664
+ "repositories" => @list_repositories_response,
665
+ }
666
+ end
667
+
668
+ def to_json(*args)
669
+ to_h.to_json(*args)
670
+ end
671
+
672
+ end
673
+
674
+ # Response body for POST /api/v1/repositories/{repo_name}/tags
675
+ class CreateRepoTagResponse
676
+ attr_accessor :create_repo_tag_response, :create_repo_tag_response, :create_repo_tag_response,
677
+
678
+ def initialize(attrs = {})
679
+ @create_repo_tag_response = attrs["commit_id"] || attrs[:create_repo_tag_response]
680
+ @create_repo_tag_response = attrs["reference"] || attrs[:create_repo_tag_response]
681
+ @create_repo_tag_response = attrs["tag_id"] || attrs[:create_repo_tag_response]
682
+ end
683
+
684
+ def self.from_json(json_str)
685
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
686
+ new(obj)
687
+ end
688
+
689
+ def to_h
690
+ {
691
+ "commit_id" => @create_repo_tag_response,
692
+ "reference" => @create_repo_tag_response,
693
+ "tag_id" => @create_repo_tag_response,
694
+ }
695
+ end
696
+
697
+ def to_json(*args)
698
+ to_h.to_json(*args)
699
+ end
700
+
701
+ end
702
+
703
+ #
704
+ class CommitInfo
705
+ attr_accessor :commit_info, :commit_info, :commit_info, :commit_info, :commit_info, :commit_info, :commit_info, :commit_info,
706
+
707
+ def initialize(attrs = {})
708
+ @commit_info = attrs["commit_id"] || attrs[:commit_info]
709
+ @commit_info = attrs["created_at"] || attrs[:commit_info]
710
+ @commit_info = attrs["description"] || attrs[:commit_info]
711
+ @commit_info = attrs["grandparent_commit_id"] || attrs[:commit_info]
712
+ @commit_info = attrs["is_public"] || attrs[:commit_info]
713
+ @commit_info = attrs["name"] || attrs[:commit_info]
714
+ @commit_info = attrs["owner_id"] || attrs[:commit_info]
715
+ @commit_info = attrs["parent_vm_id"] || attrs[:commit_info]
716
+ end
717
+
718
+ def self.from_json(json_str)
719
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
720
+ new(obj)
721
+ end
722
+
723
+ def to_h
724
+ {
725
+ "commit_id" => @commit_info,
726
+ "created_at" => @commit_info,
727
+ "description" => @commit_info,
728
+ "grandparent_commit_id" => @commit_info,
729
+ "is_public" => @commit_info,
730
+ "name" => @commit_info,
731
+ "owner_id" => @commit_info,
732
+ "parent_vm_id" => @commit_info,
733
+ }
734
+ end
735
+
736
+ def to_json(*args)
737
+ to_h.to_json(*args)
738
+ end
739
+
740
+ end
741
+
742
+ # Response body for DELETE /api/v1/domains/{domain_id}
743
+ class DeleteDomainResponse
744
+ attr_accessor :delete_domain_response,
12
745
 
13
746
  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]
747
+ @delete_domain_response = attrs["domain_id"] || attrs[:delete_domain_response]
19
748
  end
20
749
 
21
750
  def self.from_json(json_str)
@@ -25,11 +754,67 @@ module VersSdk
25
754
 
26
755
  def to_h
27
756
  {
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,
757
+ "domain_id" => @delete_domain_response,
758
+ }
759
+ end
760
+
761
+ def to_json(*args)
762
+ to_h.to_json(*args)
763
+ end
764
+
765
+ end
766
+
767
+ # Repository information returned in list and get operations
768
+ class RepositoryInfo
769
+ attr_accessor :repository_info, :repository_info, :repository_info, :repository_info, :repository_info,
770
+
771
+ def initialize(attrs = {})
772
+ @repository_info = attrs["created_at"] || attrs[:repository_info]
773
+ @repository_info = attrs["description"] || attrs[:repository_info]
774
+ @repository_info = attrs["is_public"] || attrs[:repository_info]
775
+ @repository_info = attrs["name"] || attrs[:repository_info]
776
+ @repository_info = attrs["repo_id"] || attrs[:repository_info]
777
+ end
778
+
779
+ def self.from_json(json_str)
780
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
781
+ new(obj)
782
+ end
783
+
784
+ def to_h
785
+ {
786
+ "created_at" => @repository_info,
787
+ "description" => @repository_info,
788
+ "is_public" => @repository_info,
789
+ "name" => @repository_info,
790
+ "repo_id" => @repository_info,
791
+ }
792
+ end
793
+
794
+ def to_json(*args)
795
+ to_h.to_json(*args)
796
+ end
797
+
798
+ end
799
+
800
+ # Response body for POST /api/keys/validate
801
+ class ValidateKeyResponse
802
+ attr_accessor :validate_key_response, :validate_key_response,
803
+
804
+ def initialize(attrs = {})
805
+ @validate_key_response = attrs["message"] || attrs[:validate_key_response]
806
+ @validate_key_response = attrs["valid"] || attrs[:validate_key_response]
807
+ end
808
+
809
+ def self.from_json(json_str)
810
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
811
+ new(obj)
812
+ end
813
+
814
+ def to_h
815
+ {
816
+ "message" => @validate_key_response,
817
+ "valid" => @validate_key_response,
33
818
  }
34
819
  end
35
820
 
@@ -87,27 +872,38 @@ module VersSdk
87
872
  end
88
873
  end
89
874
 
90
- # Possible options for the state requested in PATCH /api/vm/{vm_id}/state
91
- module VmUpdateStateEnum
92
- PAUSED = "Paused"
93
- RUNNING = "Running"
875
+ # Response body for GET /api/vm/{vm_id}/files
876
+ class VmReadFileResponse
877
+ attr_accessor :vm_read_file_response,
94
878
 
95
- ALL = [
96
- PAUSED,
97
- RUNNING
98
- ].freeze
879
+ def initialize(attrs = {})
880
+ @vm_read_file_response = attrs["content_b64"] || attrs[:vm_read_file_response]
881
+ end
99
882
 
100
- def self.values
101
- ALL
883
+ def self.from_json(json_str)
884
+ obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
885
+ new(obj)
886
+ end
887
+
888
+ def to_h
889
+ {
890
+ "content_b64" => @vm_read_file_response,
891
+ }
892
+ end
893
+
894
+ def to_json(*args)
895
+ to_h.to_json(*args)
102
896
  end
897
+
103
898
  end
104
899
 
105
- # Request body for PATCH /api/vm/{vm_id}/state
106
- class VmUpdateStateRequest
107
- attr_accessor :vm_update_state_request,
900
+ # 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.
901
+ class SetEnvVarsRequest
902
+ attr_accessor :set_env_vars_request, :set_env_vars_request,
108
903
 
109
904
  def initialize(attrs = {})
110
- @vm_update_state_request = attrs["state"] || attrs[:vm_update_state_request]
905
+ @set_env_vars_request = attrs["replace"] || attrs[:set_env_vars_request]
906
+ @set_env_vars_request = attrs["vars"] || attrs[:set_env_vars_request]
111
907
  end
112
908
 
113
909
  def self.from_json(json_str)
@@ -117,7 +913,8 @@ module VersSdk
117
913
 
118
914
  def to_h
119
915
  {
120
- "state" => @vm_update_state_request,
916
+ "replace" => @set_env_vars_request,
917
+ "vars" => @set_env_vars_request,
121
918
  }
122
919
  end
123
920
 
@@ -127,13 +924,12 @@ module VersSdk
127
924
 
128
925
  end
129
926
 
130
- #
131
- class ErrorResponse
132
- attr_accessor :error_response, :error_response,
927
+ # The response body for POST /api/vm/{vm_id}/commit
928
+ class VmCommitResponse
929
+ attr_accessor :vm_commit_response,
133
930
 
134
931
  def initialize(attrs = {})
135
- @error_response = attrs["error"] || attrs[:error_response]
136
- @error_response = attrs["success"] || attrs[:error_response]
932
+ @vm_commit_response = attrs["commit_id"] || attrs[:vm_commit_response]
137
933
  end
138
934
 
139
935
  def self.from_json(json_str)
@@ -143,8 +939,7 @@ module VersSdk
143
939
 
144
940
  def to_h
145
941
  {
146
- "error" => @error_response,
147
- "success" => @error_response,
942
+ "commit_id" => @vm_commit_response,
148
943
  }
149
944
  end
150
945
 
@@ -154,12 +949,16 @@ module VersSdk
154
949
 
155
950
  end
156
951
 
157
- # Request body for PATCH /commits/{commit_id}
158
- class UpdateCommitRequest
159
- attr_accessor :update_commit_request,
952
+ # Response body for POST /api/v1/repositories/fork
953
+ class ForkRepositoryResponse
954
+ attr_accessor :fork_repository_response, :fork_repository_response, :fork_repository_response, :fork_repository_response, :fork_repository_response,
160
955
 
161
956
  def initialize(attrs = {})
162
- @update_commit_request = attrs["is_public"] || attrs[:update_commit_request]
957
+ @fork_repository_response = attrs["commit_id"] || attrs[:fork_repository_response]
958
+ @fork_repository_response = attrs["reference"] || attrs[:fork_repository_response]
959
+ @fork_repository_response = attrs["repo_name"] || attrs[:fork_repository_response]
960
+ @fork_repository_response = attrs["tag_name"] || attrs[:fork_repository_response]
961
+ @fork_repository_response = attrs["vm_id"] || attrs[:fork_repository_response]
163
962
  end
164
963
 
165
964
  def self.from_json(json_str)
@@ -169,7 +968,11 @@ module VersSdk
169
968
 
170
969
  def to_h
171
970
  {
172
- "is_public" => @update_commit_request,
971
+ "commit_id" => @fork_repository_response,
972
+ "reference" => @fork_repository_response,
973
+ "repo_name" => @fork_repository_response,
974
+ "tag_name" => @fork_repository_response,
975
+ "vm_id" => @fork_repository_response,
173
976
  }
174
977
  end
175
978
 
@@ -179,12 +982,72 @@ module VersSdk
179
982
 
180
983
  end
181
984
 
182
- # Response body for GET /env_vars and PUT /env_vars.
183
- class EnvVarsResponse
184
- attr_accessor :env_vars_response,
985
+ #
986
+ module ImageSourceRequest
987
+ class ImageRefVariant
988
+ attr_accessor :data
989
+
990
+ def initialize(data = {})
991
+ @data = data
992
+ end
993
+
994
+ def self.from_json(obj)
995
+ new(obj)
996
+ end
997
+
998
+ def to_h
999
+ @data
1000
+ end
1001
+ end
1002
+
1003
+ class BucketVariant
1004
+ attr_accessor :data
1005
+
1006
+ def initialize(data = {})
1007
+ @data = data
1008
+ end
1009
+
1010
+ def self.from_json(obj)
1011
+ new(obj)
1012
+ end
1013
+
1014
+ def to_h
1015
+ @data
1016
+ end
1017
+ end
1018
+
1019
+ VARIANT_CLASSES = [ImageRefVariant, BucketVariant].freeze
1020
+
1021
+ def self.from_json(obj)
1022
+ return nil unless obj.is_a?(Hash)
1023
+ return ImageRefVariant.from_json(obj) if obj.key?("image_ref")
1024
+ return BucketVariant.from_json(obj) if obj.key?("bucket")
1025
+ nil
1026
+ end
1027
+ end
1028
+
1029
+ # Possible options for the state requested in PATCH /api/vm/{vm_id}/state
1030
+ module VmUpdateStateEnum
1031
+ SLEEPING = "Sleeping"
1032
+ RUNNING = "Running"
1033
+
1034
+ ALL = [
1035
+ SLEEPING,
1036
+ RUNNING
1037
+ ].freeze
1038
+
1039
+ def self.values
1040
+ ALL
1041
+ end
1042
+ end
1043
+
1044
+ #
1045
+ class ErrorResponse
1046
+ attr_accessor :error_response, :error_response,
185
1047
 
186
1048
  def initialize(attrs = {})
187
- @env_vars_response = attrs["vars"] || attrs[:env_vars_response]
1049
+ @error_response = attrs["error"] || attrs[:error_response]
1050
+ @error_response = attrs["success"] || attrs[:error_response]
188
1051
  end
189
1052
 
190
1053
  def self.from_json(json_str)
@@ -194,7 +1057,8 @@ module VersSdk
194
1057
 
195
1058
  def to_h
196
1059
  {
197
- "vars" => @env_vars_response,
1060
+ "error" => @error_response,
1061
+ "success" => @error_response,
198
1062
  }
199
1063
  end
200
1064
 
@@ -204,13 +1068,14 @@ module VersSdk
204
1068
 
205
1069
  end
206
1070
 
207
- # Response body for POST /api/v1/repositories
208
- class CreateRepositoryResponse
209
- attr_accessor :create_repository_response, :create_repository_response,
1071
+ # Request body for PATCH /commits/{commit_id}
1072
+ class UpdateCommitRequest
1073
+ attr_accessor :update_commit_request, :update_commit_request, :update_commit_request,
210
1074
 
211
1075
  def initialize(attrs = {})
212
- @create_repository_response = attrs["name"] || attrs[:create_repository_response]
213
- @create_repository_response = attrs["repo_id"] || attrs[:create_repository_response]
1076
+ @update_commit_request = attrs["description"] || attrs[:update_commit_request]
1077
+ @update_commit_request = attrs["is_public"] || attrs[:update_commit_request]
1078
+ @update_commit_request = attrs["name"] || attrs[:update_commit_request]
214
1079
  end
215
1080
 
216
1081
  def self.from_json(json_str)
@@ -220,8 +1085,9 @@ module VersSdk
220
1085
 
221
1086
  def to_h
222
1087
  {
223
- "name" => @create_repository_response,
224
- "repo_id" => @create_repository_response,
1088
+ "description" => @update_commit_request,
1089
+ "is_public" => @update_commit_request,
1090
+ "name" => @update_commit_request,
225
1091
  }
226
1092
  end
227
1093
 
@@ -289,47 +1155,15 @@ module VersSdk
289
1155
 
290
1156
  end
291
1157
 
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,
1158
+ # Settings for the deploy build pipeline.
1159
+ class DeploySettings
1160
+ attr_accessor :deploy_settings, :deploy_settings, :deploy_settings, :deploy_settings,
330
1161
 
331
1162
  def initialize(attrs = {})
332
- @list_tags_response = attrs["tags"] || attrs[:list_tags_response]
1163
+ @deploy_settings = attrs["build_command"] || attrs[:deploy_settings]
1164
+ @deploy_settings = attrs["install_command"] || attrs[:deploy_settings]
1165
+ @deploy_settings = attrs["run_command"] || attrs[:deploy_settings]
1166
+ @deploy_settings = attrs["working_directory"] || attrs[:deploy_settings]
333
1167
  end
334
1168
 
335
1169
  def self.from_json(json_str)
@@ -339,7 +1173,10 @@ module VersSdk
339
1173
 
340
1174
  def to_h
341
1175
  {
342
- "tags" => @list_tags_response,
1176
+ "build_command" => @deploy_settings,
1177
+ "install_command" => @deploy_settings,
1178
+ "run_command" => @deploy_settings,
1179
+ "working_directory" => @deploy_settings,
343
1180
  }
344
1181
  end
345
1182
 
@@ -349,14 +1186,15 @@ module VersSdk
349
1186
 
350
1187
  end
351
1188
 
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,
1189
+ #
1190
+ class CreateBaseImageRequest
1191
+ attr_accessor :create_base_image_request, :create_base_image_request, :create_base_image_request, :create_base_image_request,
355
1192
 
356
1193
  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]
1194
+ @create_base_image_request = attrs["description"] || attrs[:create_base_image_request]
1195
+ @create_base_image_request = attrs["image_name"] || attrs[:create_base_image_request]
1196
+ @create_base_image_request = attrs["size_mib"] || attrs[:create_base_image_request]
1197
+ @create_base_image_request = attrs["source"] || attrs[:create_base_image_request]
360
1198
  end
361
1199
 
362
1200
  def self.from_json(json_str)
@@ -365,10 +1203,11 @@ module VersSdk
365
1203
  end
366
1204
 
367
1205
  def to_h
368
- {
369
- "commit_id" => @create_repo_tag_request,
370
- "description" => @create_repo_tag_request,
371
- "tag_name" => @create_repo_tag_request,
1206
+ {
1207
+ "description" => @create_base_image_request,
1208
+ "image_name" => @create_base_image_request,
1209
+ "size_mib" => @create_base_image_request,
1210
+ "source" => @create_base_image_request,
372
1211
  }
373
1212
  end
374
1213
 
@@ -450,37 +1289,6 @@ module VersSdk
450
1289
 
451
1290
  end
452
1291
 
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
1292
  # Tag information returned in list and get operations
485
1293
  class TagInfo
486
1294
  attr_accessor :tag_info, :tag_info, :tag_info, :tag_info, :tag_info, :tag_info,
@@ -516,15 +1324,15 @@ module VersSdk
516
1324
 
517
1325
  end
518
1326
 
519
- #
520
- class ListCommitsResponse
521
- attr_accessor :list_commits_response, :list_commits_response, :list_commits_response, :list_commits_response,
1327
+ # Request body for PUT /api/vm/{vm_id}/files
1328
+ class VmWriteFileRequest
1329
+ attr_accessor :vm_write_file_request, :vm_write_file_request, :vm_write_file_request, :vm_write_file_request,
522
1330
 
523
1331
  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]
1332
+ @vm_write_file_request = attrs["content_b64"] || attrs[:vm_write_file_request]
1333
+ @vm_write_file_request = attrs["create_dirs"] || attrs[:vm_write_file_request]
1334
+ @vm_write_file_request = attrs["mode"] || attrs[:vm_write_file_request]
1335
+ @vm_write_file_request = attrs["path"] || attrs[:vm_write_file_request]
528
1336
  end
529
1337
 
530
1338
  def self.from_json(json_str)
@@ -534,10 +1342,10 @@ module VersSdk
534
1342
 
535
1343
  def to_h
536
1344
  {
537
- "commits" => @list_commits_response,
538
- "limit" => @list_commits_response,
539
- "offset" => @list_commits_response,
540
- "total" => @list_commits_response,
1345
+ "content_b64" => @vm_write_file_request,
1346
+ "create_dirs" => @vm_write_file_request,
1347
+ "mode" => @vm_write_file_request,
1348
+ "path" => @vm_write_file_request,
541
1349
  }
542
1350
  end
543
1351
 
@@ -547,31 +1355,19 @@ module VersSdk
547
1355
 
548
1356
  end
549
1357
 
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
1358
+ # Streams available for exec logging.
1359
+ module VmExecLogStream
1360
+ STDOUT = "stdout"
1361
+ STDERR = "stderr"
563
1362
 
564
- def to_h
565
- {
566
- "repository" => @list_repo_tags_response,
567
- "tags" => @list_repo_tags_response,
568
- }
569
- end
1363
+ ALL = [
1364
+ STDOUT,
1365
+ STDERR
1366
+ ].freeze
570
1367
 
571
- def to_json(*args)
572
- to_h.to_json(*args)
1368
+ def self.values
1369
+ ALL
573
1370
  end
574
-
575
1371
  end
576
1372
 
577
1373
  # Individual log entry describing emitted stdout/stderr chunk.
@@ -605,60 +1401,12 @@ module VersSdk
605
1401
 
606
1402
  end
607
1403
 
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,
1404
+ # Request body for `PATCH /vm/{vm_id}/label` (upsert) and `PUT /vm/{vm_id}/labels` (replace). `labels` is **required** on both endpoints. Sending a body without the field deserializes to a 400 — this is deliberate: the previous `Option<HashMap<…>>` shape silently no-op'd PATCH and (worse) silently wiped every label on PUT. An empty map (`{ 'labels': {} }`) is still accepted as an explicit 'clear all' for PUT and an explicit 'no-op' for PATCH.
1405
+ class LabelVmRequest
1406
+ attr_accessor :label_vm_request,
657
1407
 
658
1408
  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]
1409
+ @label_vm_request = attrs["labels"] || attrs[:label_vm_request]
662
1410
  end
663
1411
 
664
1412
  def self.from_json(json_str)
@@ -668,9 +1416,7 @@ module VersSdk
668
1416
 
669
1417
  def to_h
670
1418
  {
671
- "cursor" => @vm_exec_stream_attach_request,
672
- "exec_id" => @vm_exec_stream_attach_request,
673
- "from_latest" => @vm_exec_stream_attach_request,
1419
+ "labels" => @label_vm_request,
674
1420
  }
675
1421
  end
676
1422
 
@@ -680,17 +1426,21 @@ module VersSdk
680
1426
 
681
1427
  end
682
1428
 
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,
1429
+ # Response for GET /api/v1/vm/{vm_id}/metadata
1430
+ class VmMetadataResponse
1431
+ 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, :vm_metadata_response, :vm_metadata_response,
686
1432
 
687
1433
  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]
1434
+ @vm_metadata_response = attrs["created_at"] || attrs[:vm_metadata_response]
1435
+ @vm_metadata_response = attrs["deleted_at"] || attrs[:vm_metadata_response]
1436
+ @vm_metadata_response = attrs["grandparent_vm_id"] || attrs[:vm_metadata_response]
1437
+ @vm_metadata_response = attrs["ip"] || attrs[:vm_metadata_response]
1438
+ @vm_metadata_response = attrs["mem_size_mib"] || attrs[:vm_metadata_response]
1439
+ @vm_metadata_response = attrs["owner_id"] || attrs[:vm_metadata_response]
1440
+ @vm_metadata_response = attrs["parent_commit_id"] || attrs[:vm_metadata_response]
1441
+ @vm_metadata_response = attrs["state"] || attrs[:vm_metadata_response]
1442
+ @vm_metadata_response = attrs["vcpu_count"] || attrs[:vm_metadata_response]
1443
+ @vm_metadata_response = attrs["vm_id"] || attrs[:vm_metadata_response]
694
1444
  end
695
1445
 
696
1446
  def self.from_json(json_str)
@@ -700,12 +1450,16 @@ module VersSdk
700
1450
 
701
1451
  def to_h
702
1452
  {
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,
1453
+ "created_at" => @vm_metadata_response,
1454
+ "deleted_at" => @vm_metadata_response,
1455
+ "grandparent_vm_id" => @vm_metadata_response,
1456
+ "ip" => @vm_metadata_response,
1457
+ "mem_size_mib" => @vm_metadata_response,
1458
+ "owner_id" => @vm_metadata_response,
1459
+ "parent_commit_id" => @vm_metadata_response,
1460
+ "state" => @vm_metadata_response,
1461
+ "vcpu_count" => @vm_metadata_response,
1462
+ "vm_id" => @vm_metadata_response,
709
1463
  }
710
1464
  end
711
1465
 
@@ -715,12 +1469,14 @@ module VersSdk
715
1469
 
716
1470
  end
717
1471
 
718
- #
719
- class NewVmsResponse
720
- attr_accessor :new_vms_response,
1472
+ # Response body for `GET /api/v1/whoami`. Identifies the principal (user + organization) behind the bearer token used for the request, plus minimal metadata about the API key itself. The endpoint is read-only and requires only a valid API key — useful for answering questions like 'whose account does this key belong to?' without needing direct database access. Modeled after GitHub's `GET /user`.
1473
+ class WhoamiResponse
1474
+ attr_accessor :whoami_response, :whoami_response, :whoami_response,
721
1475
 
722
1476
  def initialize(attrs = {})
723
- @new_vms_response = attrs["vms"] || attrs[:new_vms_response]
1477
+ @whoami_response = attrs["api_key"] || attrs[:whoami_response]
1478
+ @whoami_response = attrs["org"] || attrs[:whoami_response]
1479
+ @whoami_response = attrs["user"] || attrs[:whoami_response]
724
1480
  end
725
1481
 
726
1482
  def self.from_json(json_str)
@@ -730,7 +1486,9 @@ module VersSdk
730
1486
 
731
1487
  def to_h
732
1488
  {
733
- "vms" => @new_vms_response,
1489
+ "api_key" => @whoami_response,
1490
+ "org" => @whoami_response,
1491
+ "user" => @whoami_response,
734
1492
  }
735
1493
  end
736
1494
 
@@ -792,37 +1550,17 @@ module VersSdk
792
1550
 
793
1551
  end
794
1552
 
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,
1553
+ # Struct representing configuration options common to all VMs
1554
+ class VmCreateVmConfig
1555
+ attr_accessor :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config, :vm_create_vm_config,
823
1556
 
824
1557
  def initialize(attrs = {})
825
- @list_public_repositories_response = attrs["repositories"] || attrs[:list_public_repositories_response]
1558
+ @vm_create_vm_config = attrs["fs_size_mib"] || attrs[:vm_create_vm_config]
1559
+ @vm_create_vm_config = attrs["image_name"] || attrs[:vm_create_vm_config]
1560
+ @vm_create_vm_config = attrs["kernel_name"] || attrs[:vm_create_vm_config]
1561
+ @vm_create_vm_config = attrs["labels"] || attrs[:vm_create_vm_config]
1562
+ @vm_create_vm_config = attrs["mem_size_mib"] || attrs[:vm_create_vm_config]
1563
+ @vm_create_vm_config = attrs["vcpu_count"] || attrs[:vm_create_vm_config]
826
1564
  end
827
1565
 
828
1566
  def self.from_json(json_str)
@@ -832,7 +1570,12 @@ module VersSdk
832
1570
 
833
1571
  def to_h
834
1572
  {
835
- "repositories" => @list_public_repositories_response,
1573
+ "fs_size_mib" => @vm_create_vm_config,
1574
+ "image_name" => @vm_create_vm_config,
1575
+ "kernel_name" => @vm_create_vm_config,
1576
+ "labels" => @vm_create_vm_config,
1577
+ "mem_size_mib" => @vm_create_vm_config,
1578
+ "vcpu_count" => @vm_create_vm_config,
836
1579
  }
837
1580
  end
838
1581
 
@@ -842,14 +1585,12 @@ module VersSdk
842
1585
 
843
1586
  end
844
1587
 
845
- # Request body for POST /api/v1/commit_tags
846
- class CreateTagRequest
847
- attr_accessor :create_tag_request, :create_tag_request, :create_tag_request,
1588
+ # Response body for new VM requests (new_root, from_commit, branch)
1589
+ class NewVmResponse
1590
+ attr_accessor :new_vm_response,
848
1591
 
849
1592
  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]
1593
+ @new_vm_response = attrs["vm_id"] || attrs[:new_vm_response]
853
1594
  end
854
1595
 
855
1596
  def self.from_json(json_str)
@@ -859,9 +1600,7 @@ module VersSdk
859
1600
 
860
1601
  def to_h
861
1602
  {
862
- "commit_id" => @create_tag_request,
863
- "description" => @create_tag_request,
864
- "tag_name" => @create_tag_request,
1603
+ "vm_id" => @new_vm_response,
865
1604
  }
866
1605
  end
867
1606
 
@@ -931,49 +1670,17 @@ module VersSdk
931
1670
  nil
932
1671
  end
933
1672
  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]
1673
+
1674
+ #
1675
+ class VM
1676
+ attr_accessor :v_m, :v_m, :v_m, :v_m, :v_m,
1677
+
1678
+ def initialize(attrs = {})
1679
+ @v_m = attrs["created_at"] || attrs[:v_m]
1680
+ @v_m = attrs["labels"] || attrs[:v_m]
1681
+ @v_m = attrs["owner_id"] || attrs[:v_m]
1682
+ @v_m = attrs["state"] || attrs[:v_m]
1683
+ @v_m = attrs["vm_id"] || attrs[:v_m]
977
1684
  end
978
1685
 
979
1686
  def self.from_json(json_str)
@@ -983,14 +1690,11 @@ module VersSdk
983
1690
 
984
1691
  def to_h
985
1692
  {
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,
1693
+ "created_at" => @v_m,
1694
+ "labels" => @v_m,
1695
+ "owner_id" => @v_m,
1696
+ "state" => @v_m,
1697
+ "vm_id" => @v_m,
994
1698
  }
995
1699
  end
996
1700
 
@@ -1027,12 +1731,13 @@ module VersSdk
1027
1731
 
1028
1732
  end
1029
1733
 
1030
- # Response body for DELETE /api/v1/domains/{domain_id}
1031
- class DeleteDomainResponse
1032
- attr_accessor :delete_domain_response,
1734
+ # 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'
1735
+ class UpdateTagRequest
1736
+ attr_accessor :update_tag_request, :update_tag_request,
1033
1737
 
1034
1738
  def initialize(attrs = {})
1035
- @delete_domain_response = attrs["domain_id"] || attrs[:delete_domain_response]
1739
+ @update_tag_request = attrs["commit_id"] || attrs[:update_tag_request]
1740
+ @update_tag_request = attrs["description"] || attrs[:update_tag_request]
1036
1741
  end
1037
1742
 
1038
1743
  def self.from_json(json_str)
@@ -1042,7 +1747,8 @@ module VersSdk
1042
1747
 
1043
1748
  def to_h
1044
1749
  {
1045
- "domain_id" => @delete_domain_response,
1750
+ "commit_id" => @update_tag_request,
1751
+ "description" => @update_tag_request,
1046
1752
  }
1047
1753
  end
1048
1754
 
@@ -1052,12 +1758,14 @@ module VersSdk
1052
1758
 
1053
1759
  end
1054
1760
 
1055
- # Response body for GET /api/v1/repositories
1056
- class ListRepositoriesResponse
1057
- attr_accessor :list_repositories_response,
1761
+ #
1762
+ class UploadBaseImageResponse
1763
+ attr_accessor :upload_base_image_response, :upload_base_image_response, :upload_base_image_response,
1058
1764
 
1059
1765
  def initialize(attrs = {})
1060
- @list_repositories_response = attrs["repositories"] || attrs[:list_repositories_response]
1766
+ @upload_base_image_response = attrs["image_name"] || attrs[:upload_base_image_response]
1767
+ @upload_base_image_response = attrs["job_id"] || attrs[:upload_base_image_response]
1768
+ @upload_base_image_response = attrs["status"] || attrs[:upload_base_image_response]
1061
1769
  end
1062
1770
 
1063
1771
  def self.from_json(json_str)
@@ -1067,7 +1775,9 @@ module VersSdk
1067
1775
 
1068
1776
  def to_h
1069
1777
  {
1070
- "repositories" => @list_repositories_response,
1778
+ "image_name" => @upload_base_image_response,
1779
+ "job_id" => @upload_base_image_response,
1780
+ "status" => @upload_base_image_response,
1071
1781
  }
1072
1782
  end
1073
1783
 
@@ -1077,16 +1787,14 @@ module VersSdk
1077
1787
 
1078
1788
  end
1079
1789
 
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,
1790
+ #
1791
+ class WhoamiUser
1792
+ attr_accessor :whoami_user, :whoami_user, :whoami_user,
1083
1793
 
1084
1794
  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]
1795
+ @whoami_user = attrs["email"] || attrs[:whoami_user]
1796
+ @whoami_user = attrs["id"] || attrs[:whoami_user]
1797
+ @whoami_user = attrs["user_name"] || attrs[:whoami_user]
1090
1798
  end
1091
1799
 
1092
1800
  def self.from_json(json_str)
@@ -1096,11 +1804,9 @@ module VersSdk
1096
1804
 
1097
1805
  def to_h
1098
1806
  {
1099
- "created_at" => @repository_info,
1100
- "description" => @repository_info,
1101
- "is_public" => @repository_info,
1102
- "name" => @repository_info,
1103
- "repo_id" => @repository_info,
1807
+ "email" => @whoami_user,
1808
+ "id" => @whoami_user,
1809
+ "user_name" => @whoami_user,
1104
1810
  }
1105
1811
  end
1106
1812
 
@@ -1110,13 +1816,15 @@ module VersSdk
1110
1816
 
1111
1817
  end
1112
1818
 
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,
1819
+ #
1820
+ class BaseImageStatusResponse
1821
+ attr_accessor :base_image_status_response, :base_image_status_response, :base_image_status_response, :base_image_status_response,
1116
1822
 
1117
1823
  def initialize(attrs = {})
1118
- @update_tag_request = attrs["commit_id"] || attrs[:update_tag_request]
1119
- @update_tag_request = attrs["description"] || attrs[:update_tag_request]
1824
+ @base_image_status_response = attrs["error_message"] || attrs[:base_image_status_response]
1825
+ @base_image_status_response = attrs["image_name"] || attrs[:base_image_status_response]
1826
+ @base_image_status_response = attrs["size_mib"] || attrs[:base_image_status_response]
1827
+ @base_image_status_response = attrs["status"] || attrs[:base_image_status_response]
1120
1828
  end
1121
1829
 
1122
1830
  def self.from_json(json_str)
@@ -1126,8 +1834,10 @@ module VersSdk
1126
1834
 
1127
1835
  def to_h
1128
1836
  {
1129
- "commit_id" => @update_tag_request,
1130
- "description" => @update_tag_request,
1837
+ "error_message" => @base_image_status_response,
1838
+ "image_name" => @base_image_status_response,
1839
+ "size_mib" => @base_image_status_response,
1840
+ "status" => @base_image_status_response,
1131
1841
  }
1132
1842
  end
1133
1843
 
@@ -1138,11 +1848,14 @@ module VersSdk
1138
1848
  end
1139
1849
 
1140
1850
  #
1141
- class NewRootRequest
1142
- attr_accessor :new_root_request,
1851
+ class ListBaseImagesResponse
1852
+ attr_accessor :list_base_images_response, :list_base_images_response, :list_base_images_response, :list_base_images_response,
1143
1853
 
1144
1854
  def initialize(attrs = {})
1145
- @new_root_request = attrs["vm_config"] || attrs[:new_root_request]
1855
+ @list_base_images_response = attrs["images"] || attrs[:list_base_images_response]
1856
+ @list_base_images_response = attrs["limit"] || attrs[:list_base_images_response]
1857
+ @list_base_images_response = attrs["offset"] || attrs[:list_base_images_response]
1858
+ @list_base_images_response = attrs["total"] || attrs[:list_base_images_response]
1146
1859
  end
1147
1860
 
1148
1861
  def self.from_json(json_str)
@@ -1152,7 +1865,10 @@ module VersSdk
1152
1865
 
1153
1866
  def to_h
1154
1867
  {
1155
- "vm_config" => @new_root_request,
1868
+ "images" => @list_base_images_response,
1869
+ "limit" => @list_base_images_response,
1870
+ "offset" => @list_base_images_response,
1871
+ "total" => @list_base_images_response,
1156
1872
  }
1157
1873
  end
1158
1874
 
@@ -1162,13 +1878,12 @@ module VersSdk
1162
1878
 
1163
1879
  end
1164
1880
 
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,
1881
+ #
1882
+ class NewRootRequest
1883
+ attr_accessor :new_root_request,
1168
1884
 
1169
1885
  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]
1886
+ @new_root_request = attrs["vm_config"] || attrs[:new_root_request]
1172
1887
  end
1173
1888
 
1174
1889
  def self.from_json(json_str)
@@ -1178,8 +1893,7 @@ module VersSdk
1178
1893
 
1179
1894
  def to_h
1180
1895
  {
1181
- "replace" => @set_env_vars_request,
1182
- "vars" => @set_env_vars_request,
1896
+ "vm_config" => @new_root_request,
1183
1897
  }
1184
1898
  end
1185
1899
 
@@ -1189,15 +1903,12 @@ module VersSdk
1189
1903
 
1190
1904
  end
1191
1905
 
1192
- #
1193
- class VM
1194
- attr_accessor :v_m, :v_m, :v_m, :v_m,
1906
+ # Request body for PATCH /api/vm/{vm_id}/disk
1907
+ class VmResizeDiskRequest
1908
+ attr_accessor :vm_resize_disk_request,
1195
1909
 
1196
1910
  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]
1911
+ @vm_resize_disk_request = attrs["fs_size_mib"] || attrs[:vm_resize_disk_request]
1201
1912
  end
1202
1913
 
1203
1914
  def self.from_json(json_str)
@@ -1207,10 +1918,7 @@ module VersSdk
1207
1918
 
1208
1919
  def to_h
1209
1920
  {
1210
- "created_at" => @v_m,
1211
- "owner_id" => @v_m,
1212
- "state" => @v_m,
1213
- "vm_id" => @v_m,
1921
+ "fs_size_mib" => @vm_resize_disk_request,
1214
1922
  }
1215
1923
  end
1216
1924
 
@@ -1220,16 +1928,12 @@ module VersSdk
1220
1928
 
1221
1929
  end
1222
1930
 
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,
1931
+ # Response body for DELETE /api/vm/{vm_id}
1932
+ class VmDeleteResponse
1933
+ attr_accessor :vm_delete_response,
1226
1934
 
1227
1935
  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]
1936
+ @vm_delete_response = attrs["vm_id"] || attrs[:vm_delete_response]
1233
1937
  end
1234
1938
 
1235
1939
  def self.from_json(json_str)
@@ -1239,11 +1943,7 @@ module VersSdk
1239
1943
 
1240
1944
  def to_h
1241
1945
  {
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,
1946
+ "vm_id" => @vm_delete_response,
1247
1947
  }
1248
1948
  end
1249
1949
 
@@ -1253,12 +1953,14 @@ module VersSdk
1253
1953
 
1254
1954
  end
1255
1955
 
1256
- # Response body for DELETE /api/vm/{vm_id}
1257
- class VmDeleteResponse
1258
- attr_accessor :vm_delete_response,
1956
+ # Response body for POST /api/v1/commit_tags
1957
+ class CreateTagResponse
1958
+ attr_accessor :create_tag_response, :create_tag_response, :create_tag_response,
1259
1959
 
1260
1960
  def initialize(attrs = {})
1261
- @vm_delete_response = attrs["vm_id"] || attrs[:vm_delete_response]
1961
+ @create_tag_response = attrs["commit_id"] || attrs[:create_tag_response]
1962
+ @create_tag_response = attrs["tag_id"] || attrs[:create_tag_response]
1963
+ @create_tag_response = attrs["tag_name"] || attrs[:create_tag_response]
1262
1964
  end
1263
1965
 
1264
1966
  def self.from_json(json_str)
@@ -1268,7 +1970,9 @@ module VersSdk
1268
1970
 
1269
1971
  def to_h
1270
1972
  {
1271
- "vm_id" => @vm_delete_response,
1973
+ "commit_id" => @create_tag_response,
1974
+ "tag_id" => @create_tag_response,
1975
+ "tag_name" => @create_tag_response,
1272
1976
  }
1273
1977
  end
1274
1978
 
@@ -1278,14 +1982,15 @@ module VersSdk
1278
1982
 
1279
1983
  end
1280
1984
 
1281
- # Response body for POST /api/v1/commit_tags
1282
- class CreateTagResponse
1283
- attr_accessor :create_tag_response, :create_tag_response, :create_tag_response,
1985
+ # Request body for `POST /api/v1/deploy`.
1986
+ class DeployRequest
1987
+ attr_accessor :deploy_request, :deploy_request, :deploy_request, :deploy_request,
1284
1988
 
1285
1989
  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]
1990
+ @deploy_request = attrs["branch"] || attrs[:deploy_request]
1991
+ @deploy_request = attrs["name"] || attrs[:deploy_request]
1992
+ @deploy_request = attrs["repo"] || attrs[:deploy_request]
1993
+ @deploy_request = attrs["settings"] || attrs[:deploy_request]
1289
1994
  end
1290
1995
 
1291
1996
  def self.from_json(json_str)
@@ -1295,9 +2000,10 @@ module VersSdk
1295
2000
 
1296
2001
  def to_h
1297
2002
  {
1298
- "commit_id" => @create_tag_response,
1299
- "tag_id" => @create_tag_response,
1300
- "tag_name" => @create_tag_response,
2003
+ "branch" => @deploy_request,
2004
+ "name" => @deploy_request,
2005
+ "repo" => @deploy_request,
2006
+ "settings" => @deploy_request,
1301
2007
  }
1302
2008
  end
1303
2009
 
@@ -1373,98 +2079,58 @@ module VersSdk
1373
2079
 
1374
2080
  end
1375
2081
 
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
2082
 
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
2083
+ # ── Params types for operations with query parameters ───────────────
1390
2084
 
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
2085
+ # Query parameters for VmLogsParams
2086
+ class VmLogsParams
2087
+ attr_accessor :offset, :max_entries, :stream,
1395
2088
 
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
- }
2089
+ def initialize(attrs = {})
2090
+ @offset = attrs[:offset] || attrs["offset"]
2091
+ @max_entries = attrs[:max_entries] || attrs["max_entries"]
2092
+ @stream = attrs[:stream] || attrs["stream"]
1407
2093
  end
1408
2094
 
1409
- def to_json(*args)
1410
- to_h.to_json(*args)
2095
+ def to_h
2096
+ h = {}
2097
+ h["offset"] = @offset unless @offset.nil?
2098
+ h["max_entries"] = @max_entries unless @max_entries.nil?
2099
+ h["stream"] = @stream unless @stream.nil?
2100
+ h
1411
2101
  end
1412
-
1413
2102
  end
1414
2103
 
1415
- # Request body for PATCH /api/vm/{vm_id}/disk
1416
- class VmResizeDiskRequest
1417
- attr_accessor :vm_resize_disk_request,
2104
+ # Query parameters for UpdateVmStateParams
2105
+ class UpdateVmStateParams
2106
+ attr_accessor :skip_wait_boot,
1418
2107
 
1419
2108
  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)
2109
+ @skip_wait_boot = attrs[:skip_wait_boot] || attrs["skip_wait_boot"]
1426
2110
  end
1427
2111
 
1428
2112
  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)
2113
+ h = {}
2114
+ h["skip_wait_boot"] = @skip_wait_boot unless @skip_wait_boot.nil?
2115
+ h
1436
2116
  end
1437
-
1438
2117
  end
1439
2118
 
1440
- # The response body for POST /api/vm/{vm_id}/commit
1441
- class VmCommitResponse
1442
- attr_accessor :vm_commit_response,
2119
+ # Query parameters for ReadFileVmParams
2120
+ class ReadFileVmParams
2121
+ attr_accessor :path,
1443
2122
 
1444
2123
  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)
2124
+ @path = attrs[:path] || attrs["path"]
1451
2125
  end
1452
2126
 
1453
2127
  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)
2128
+ h = {}
2129
+ h["path"] = @path unless @path.nil?
2130
+ h
1461
2131
  end
1462
-
1463
2132
  end
1464
2133
 
1465
-
1466
- # ── Params types for operations with query parameters ───────────────
1467
-
1468
2134
  # Query parameters for ResizeVmDiskParams
1469
2135
  class ResizeVmDiskParams
1470
2136
  attr_accessor :skip_wait_boot,
@@ -1495,25 +2161,6 @@ module VersSdk
1495
2161
  end
1496
2162
  end
1497
2163
 
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
2164
  # Query parameters for BranchByRefParams
1518
2165
  class BranchByRefParams
1519
2166
  attr_accessor :count,
@@ -1563,21 +2210,6 @@ module VersSdk
1563
2210
  end
1564
2211
  end
1565
2212
 
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
2213
  # Query parameters for DeleteVmParams
1582
2214
  class DeleteVmParams
1583
2215
  attr_accessor :skip_wait_boot,