1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_sync_delimited {
	#[serde(rename = "id")]
pub id: isize,
}

impl crate::QgaCommand for guest_sync_delimited { }
impl ::qapi_spec::Command for guest_sync_delimited {
    const NAME: &'static str = "guest-sync-delimited";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_sync {
	#[serde(rename = "id")]
pub id: isize,
}

impl crate::QgaCommand for guest_sync { }
impl ::qapi_spec::Command for guest_sync {
    const NAME: &'static str = "guest-sync";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_ping {
}

impl crate::QgaCommand for guest_ping { }
impl ::qapi_spec::Command for guest_ping {
    const NAME: &'static str = "guest-ping";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_time {
}

impl crate::QgaCommand for guest_get_time { }
impl ::qapi_spec::Command for guest_get_time {
    const NAME: &'static str = "guest-get-time";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_set_time {
	#[serde(rename = "time", default, skip_serializing_if = "Option::is_none")]
pub time: Option<isize>,
}

impl crate::QgaCommand for guest_set_time { }
impl ::qapi_spec::Command for guest_set_time {
    const NAME: &'static str = "guest-set-time";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_info {
}

impl crate::QgaCommand for guest_info { }
impl ::qapi_spec::Command for guest_info {
    const NAME: &'static str = "guest-info";
    const ALLOW_OOB: bool = false;

    type Ok = GuestAgentInfo;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_shutdown {
	#[serde(rename = "mode", default, skip_serializing_if = "Option::is_none")]
pub mode: Option<GuestShutdownMode>,
}

impl crate::QgaCommand for guest_shutdown { }
impl ::qapi_spec::Command for guest_shutdown {
    const NAME: &'static str = "guest-shutdown";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_file_open {
	#[serde(rename = "mode", default, skip_serializing_if = "Option::is_none")]
pub mode: Option<::std::string::String>,
	#[serde(rename = "path")]
pub path: ::std::string::String,
}

impl crate::QgaCommand for guest_file_open { }
impl ::qapi_spec::Command for guest_file_open {
    const NAME: &'static str = "guest-file-open";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_file_close {
	#[serde(rename = "handle")]
pub handle: isize,
}

impl crate::QgaCommand for guest_file_close { }
impl ::qapi_spec::Command for guest_file_close {
    const NAME: &'static str = "guest-file-close";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_file_read {
	#[serde(rename = "handle")]
pub handle: isize,
	#[serde(rename = "count", default, skip_serializing_if = "Option::is_none")]
pub count: Option<isize>,
}

impl crate::QgaCommand for guest_file_read { }
impl ::qapi_spec::Command for guest_file_read {
    const NAME: &'static str = "guest-file-read";
    const ALLOW_OOB: bool = false;

    type Ok = GuestFileRead;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_file_write {
	#[serde(rename = "count", default, skip_serializing_if = "Option::is_none")]
pub count: Option<isize>,
	#[serde(rename = "buf-b64", with = "::qapi_spec::base64")]
pub buf_b64: Vec<u8>,
	#[serde(rename = "handle")]
pub handle: isize,
}

impl crate::QgaCommand for guest_file_write { }
impl ::qapi_spec::Command for guest_file_write {
    const NAME: &'static str = "guest-file-write";
    const ALLOW_OOB: bool = false;

    type Ok = GuestFileWrite;
}

#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum QGASeek {
	#[serde(rename = "set")] set,
	#[serde(rename = "cur")] cur,
	#[serde(rename = "end")] end,
}

impl ::core::str::FromStr for QGASeek {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        ::qapi_spec::Enum::from_name(s).ok_or(())
    }
}

unsafe impl ::qapi_spec::Enum for QGASeek {
    fn discriminant(&self) -> usize { *self as usize }

    const COUNT: usize = 3;
    const VARIANTS: &'static [Self] = &[

QGASeek::set,
QGASeek::cur,
QGASeek::end,

    ];
    const NAMES: &'static [&'static str] = &[

"set",
"cur",
"end",

    ];
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GuestFileWhence {
	#[serde(rename = "name")] name(QGASeek),
	#[serde(rename = "value")] value(isize),
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_file_seek {
	#[serde(rename = "whence")]
pub whence: GuestFileWhence,
	#[serde(rename = "handle")]
pub handle: isize,
	#[serde(rename = "offset")]
pub offset: isize,
}

impl crate::QgaCommand for guest_file_seek { }
impl ::qapi_spec::Command for guest_file_seek {
    const NAME: &'static str = "guest-file-seek";
    const ALLOW_OOB: bool = false;

    type Ok = GuestFileSeek;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_file_flush {
	#[serde(rename = "handle")]
pub handle: isize,
}

impl crate::QgaCommand for guest_file_flush { }
impl ::qapi_spec::Command for guest_file_flush {
    const NAME: &'static str = "guest-file-flush";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GuestFsfreezeStatus {
	#[serde(rename = "thawed")] thawed,
	#[serde(rename = "frozen")] frozen,
}

impl ::core::str::FromStr for GuestFsfreezeStatus {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        ::qapi_spec::Enum::from_name(s).ok_or(())
    }
}

unsafe impl ::qapi_spec::Enum for GuestFsfreezeStatus {
    fn discriminant(&self) -> usize { *self as usize }

    const COUNT: usize = 2;
    const VARIANTS: &'static [Self] = &[

GuestFsfreezeStatus::thawed,
GuestFsfreezeStatus::frozen,

    ];
    const NAMES: &'static [&'static str] = &[

"thawed",
"frozen",

    ];
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_fsfreeze_status {
}

impl crate::QgaCommand for guest_fsfreeze_status { }
impl ::qapi_spec::Command for guest_fsfreeze_status {
    const NAME: &'static str = "guest-fsfreeze-status";
    const ALLOW_OOB: bool = false;

    type Ok = GuestFsfreezeStatus;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_fsfreeze_freeze {
}

impl crate::QgaCommand for guest_fsfreeze_freeze { }
impl ::qapi_spec::Command for guest_fsfreeze_freeze {
    const NAME: &'static str = "guest-fsfreeze-freeze";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_fsfreeze_freeze_list {
	#[serde(rename = "mountpoints", default, skip_serializing_if = "Option::is_none")]
pub mountpoints: Option<Vec<::std::string::String>>,
}

impl crate::QgaCommand for guest_fsfreeze_freeze_list { }
impl ::qapi_spec::Command for guest_fsfreeze_freeze_list {
    const NAME: &'static str = "guest-fsfreeze-freeze-list";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_fsfreeze_thaw {
}

impl crate::QgaCommand for guest_fsfreeze_thaw { }
impl ::qapi_spec::Command for guest_fsfreeze_thaw {
    const NAME: &'static str = "guest-fsfreeze-thaw";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_fstrim {
	#[serde(rename = "minimum", default, skip_serializing_if = "Option::is_none")]
pub minimum: Option<isize>,
}

impl crate::QgaCommand for guest_fstrim { }
impl ::qapi_spec::Command for guest_fstrim {
    const NAME: &'static str = "guest-fstrim";
    const ALLOW_OOB: bool = false;

    type Ok = GuestFilesystemTrimResponse;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_suspend_disk {
}

impl crate::QgaCommand for guest_suspend_disk { }
impl ::qapi_spec::Command for guest_suspend_disk {
    const NAME: &'static str = "guest-suspend-disk";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_suspend_ram {
}

impl crate::QgaCommand for guest_suspend_ram { }
impl ::qapi_spec::Command for guest_suspend_ram {
    const NAME: &'static str = "guest-suspend-ram";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_suspend_hybrid {
}

impl crate::QgaCommand for guest_suspend_hybrid { }
impl ::qapi_spec::Command for guest_suspend_hybrid {
    const NAME: &'static str = "guest-suspend-hybrid";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GuestIpAddressType {
	#[serde(rename = "ipv4")] ipv4,
	#[serde(rename = "ipv6")] ipv6,
}

impl ::core::str::FromStr for GuestIpAddressType {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        ::qapi_spec::Enum::from_name(s).ok_or(())
    }
}

unsafe impl ::qapi_spec::Enum for GuestIpAddressType {
    fn discriminant(&self) -> usize { *self as usize }

    const COUNT: usize = 2;
    const VARIANTS: &'static [Self] = &[

GuestIpAddressType::ipv4,
GuestIpAddressType::ipv6,

    ];
    const NAMES: &'static [&'static str] = &[

"ipv4",
"ipv6",

    ];
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_network_get_interfaces {
}

impl crate::QgaCommand for guest_network_get_interfaces { }
impl ::qapi_spec::Command for guest_network_get_interfaces {
    const NAME: &'static str = "guest-network-get-interfaces";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestNetworkInterface>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_vcpus {
}

impl crate::QgaCommand for guest_get_vcpus { }
impl ::qapi_spec::Command for guest_get_vcpus {
    const NAME: &'static str = "guest-get-vcpus";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestLogicalProcessor>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_set_vcpus {
	#[serde(rename = "vcpus")]
pub vcpus: Vec<GuestLogicalProcessor>,
}

impl crate::QgaCommand for guest_set_vcpus { }
impl ::qapi_spec::Command for guest_set_vcpus {
    const NAME: &'static str = "guest-set-vcpus";
    const ALLOW_OOB: bool = false;

    type Ok = isize;
}

#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GuestDiskBusType {
	#[serde(rename = "ide")] ide,
	#[serde(rename = "fdc")] fdc,
	#[serde(rename = "scsi")] scsi,
	#[serde(rename = "virtio")] virtio,
	#[serde(rename = "xen")] xen,
	#[serde(rename = "usb")] usb,
	#[serde(rename = "uml")] uml,
	#[serde(rename = "sata")] sata,
	#[serde(rename = "sd")] sd,
	#[serde(rename = "unknown")] unknown,
	#[serde(rename = "ieee1394")] ieee1394,
	#[serde(rename = "ssa")] ssa,
	#[serde(rename = "fibre")] fibre,
	#[serde(rename = "raid")] raid,
	#[serde(rename = "iscsi")] iscsi,
	#[serde(rename = "sas")] sas,
	#[serde(rename = "mmc")] mmc,
	#[serde(rename = "virtual")] virtual_,
	#[serde(rename = "file-backed-virtual")] file_backed_virtual,
}

impl ::core::str::FromStr for GuestDiskBusType {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        ::qapi_spec::Enum::from_name(s).ok_or(())
    }
}

unsafe impl ::qapi_spec::Enum for GuestDiskBusType {
    fn discriminant(&self) -> usize { *self as usize }

    const COUNT: usize = 19;
    const VARIANTS: &'static [Self] = &[

GuestDiskBusType::ide,
GuestDiskBusType::fdc,
GuestDiskBusType::scsi,
GuestDiskBusType::virtio,
GuestDiskBusType::xen,
GuestDiskBusType::usb,
GuestDiskBusType::uml,
GuestDiskBusType::sata,
GuestDiskBusType::sd,
GuestDiskBusType::unknown,
GuestDiskBusType::ieee1394,
GuestDiskBusType::ssa,
GuestDiskBusType::fibre,
GuestDiskBusType::raid,
GuestDiskBusType::iscsi,
GuestDiskBusType::sas,
GuestDiskBusType::mmc,
GuestDiskBusType::virtual_,
GuestDiskBusType::file_backed_virtual,

    ];
    const NAMES: &'static [&'static str] = &[

"ide",
"fdc",
"scsi",
"virtio",
"xen",
"usb",
"uml",
"sata",
"sd",
"unknown",
"ieee1394",
"ssa",
"fibre",
"raid",
"iscsi",
"sas",
"mmc",
"virtual",
"file-backed-virtual",

    ];
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_disks {
}

impl crate::QgaCommand for guest_get_disks { }
impl ::qapi_spec::Command for guest_get_disks {
    const NAME: &'static str = "guest-get-disks";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestDiskInfo>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_fsinfo {
}

impl crate::QgaCommand for guest_get_fsinfo { }
impl ::qapi_spec::Command for guest_get_fsinfo {
    const NAME: &'static str = "guest-get-fsinfo";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestFilesystemInfo>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_set_user_password {
	#[serde(rename = "crypted")]
pub crypted: bool,
	#[serde(rename = "username")]
pub username: ::std::string::String,
	#[serde(rename = "password", with = "::qapi_spec::base64")]
pub password: Vec<u8>,
}

impl crate::QgaCommand for guest_set_user_password { }
impl ::qapi_spec::Command for guest_set_user_password {
    const NAME: &'static str = "guest-set-user-password";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_memory_blocks {
}

impl crate::QgaCommand for guest_get_memory_blocks { }
impl ::qapi_spec::Command for guest_get_memory_blocks {
    const NAME: &'static str = "guest-get-memory-blocks";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestMemoryBlock>;
}

#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GuestMemoryBlockResponseType {
	#[serde(rename = "success")] success,
	#[serde(rename = "not-found")] not_found,
	#[serde(rename = "operation-not-supported")] operation_not_supported,
	#[serde(rename = "operation-failed")] operation_failed,
}

impl ::core::str::FromStr for GuestMemoryBlockResponseType {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        ::qapi_spec::Enum::from_name(s).ok_or(())
    }
}

unsafe impl ::qapi_spec::Enum for GuestMemoryBlockResponseType {
    fn discriminant(&self) -> usize { *self as usize }

    const COUNT: usize = 4;
    const VARIANTS: &'static [Self] = &[

GuestMemoryBlockResponseType::success,
GuestMemoryBlockResponseType::not_found,
GuestMemoryBlockResponseType::operation_not_supported,
GuestMemoryBlockResponseType::operation_failed,

    ];
    const NAMES: &'static [&'static str] = &[

"success",
"not-found",
"operation-not-supported",
"operation-failed",

    ];
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_set_memory_blocks {
	#[serde(rename = "mem-blks")]
pub mem_blks: Vec<GuestMemoryBlock>,
}

impl crate::QgaCommand for guest_set_memory_blocks { }
impl ::qapi_spec::Command for guest_set_memory_blocks {
    const NAME: &'static str = "guest-set-memory-blocks";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestMemoryBlockResponse>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_memory_block_info {
}

impl crate::QgaCommand for guest_get_memory_block_info { }
impl ::qapi_spec::Command for guest_get_memory_block_info {
    const NAME: &'static str = "guest-get-memory-block-info";
    const ALLOW_OOB: bool = false;

    type Ok = GuestMemoryBlockInfo;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_exec_status {
	#[serde(rename = "pid")]
pub pid: isize,
}

impl crate::QgaCommand for guest_exec_status { }
impl ::qapi_spec::Command for guest_exec_status {
    const NAME: &'static str = "guest-exec-status";
    const ALLOW_OOB: bool = false;

    type Ok = GuestExecStatus;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_exec {
	#[serde(rename = "arg", default, skip_serializing_if = "Option::is_none")]
pub arg: Option<Vec<::std::string::String>>,
	#[serde(rename = "capture-output", default, skip_serializing_if = "Option::is_none")]
pub capture_output: Option<bool>,
	#[serde(rename = "path")]
pub path: ::std::string::String,
	#[serde(rename = "input-data", with = "::qapi_spec::base64_opt", default, skip_serializing_if = "Option::is_none")]
pub input_data: Option<Vec<u8>>,
	#[serde(rename = "env", default, skip_serializing_if = "Option::is_none")]
pub env: Option<Vec<::std::string::String>>,
}

impl crate::QgaCommand for guest_exec { }
impl ::qapi_spec::Command for guest_exec {
    const NAME: &'static str = "guest-exec";
    const ALLOW_OOB: bool = false;

    type Ok = GuestExec;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_host_name {
}

impl crate::QgaCommand for guest_get_host_name { }
impl ::qapi_spec::Command for guest_get_host_name {
    const NAME: &'static str = "guest-get-host-name";
    const ALLOW_OOB: bool = false;

    type Ok = GuestHostName;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_users {
}

impl crate::QgaCommand for guest_get_users { }
impl ::qapi_spec::Command for guest_get_users {
    const NAME: &'static str = "guest-get-users";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestUser>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_timezone {
}

impl crate::QgaCommand for guest_get_timezone { }
impl ::qapi_spec::Command for guest_get_timezone {
    const NAME: &'static str = "guest-get-timezone";
    const ALLOW_OOB: bool = false;

    type Ok = GuestTimezone;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_osinfo {
}

impl crate::QgaCommand for guest_get_osinfo { }
impl ::qapi_spec::Command for guest_get_osinfo {
    const NAME: &'static str = "guest-get-osinfo";
    const ALLOW_OOB: bool = false;

    type Ok = GuestOSInfo;
}

#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GuestDeviceType {
	#[serde(rename = "pci")] pci,
}

impl ::core::str::FromStr for GuestDeviceType {
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        ::qapi_spec::Enum::from_name(s).ok_or(())
    }
}

unsafe impl ::qapi_spec::Enum for GuestDeviceType {
    fn discriminant(&self) -> usize { *self as usize }

    const COUNT: usize = 1;
    const VARIANTS: &'static [Self] = &[

GuestDeviceType::pci,

    ];
    const NAMES: &'static [&'static str] = &[

"pci",

    ];
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_get_devices {
}

impl crate::QgaCommand for guest_get_devices { }
impl ::qapi_spec::Command for guest_get_devices {
    const NAME: &'static str = "guest-get-devices";
    const ALLOW_OOB: bool = false;

    type Ok = Vec<GuestDeviceInfo>;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_ssh_get_authorized_keys {
	#[serde(rename = "username")]
pub username: ::std::string::String,
}

impl crate::QgaCommand for guest_ssh_get_authorized_keys { }
impl ::qapi_spec::Command for guest_ssh_get_authorized_keys {
    const NAME: &'static str = "guest-ssh-get-authorized-keys";
    const ALLOW_OOB: bool = false;

    type Ok = GuestAuthorizedKeys;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_ssh_add_authorized_keys {
	#[serde(rename = "username")]
pub username: ::std::string::String,
	#[serde(rename = "reset", default, skip_serializing_if = "Option::is_none")]
pub reset: Option<bool>,
	#[serde(rename = "keys")]
pub keys: Vec<::std::string::String>,
}

impl crate::QgaCommand for guest_ssh_add_authorized_keys { }
impl ::qapi_spec::Command for guest_ssh_add_authorized_keys {
    const NAME: &'static str = "guest-ssh-add-authorized-keys";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct guest_ssh_remove_authorized_keys {
	#[serde(rename = "username")]
pub username: ::std::string::String,
	#[serde(rename = "keys")]
pub keys: Vec<::std::string::String>,
}

impl crate::QgaCommand for guest_ssh_remove_authorized_keys { }
impl ::qapi_spec::Command for guest_ssh_remove_authorized_keys {
    const NAME: &'static str = "guest-ssh-remove-authorized-keys";
    const ALLOW_OOB: bool = false;

    type Ok = ::qapi_spec::Empty;
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum GuestDeviceId {
	#[serde(rename = "pci")]
	pci {
		#[serde(flatten)] #[serde(rename = "pci")]
pci: GuestDeviceIdPCI,
	},
}

impl GuestDeviceId {
    pub fn type_(&self) -> GuestDeviceType {
        match *self {

            GuestDeviceId::pci { .. } => GuestDeviceType::pci,

        }
    }
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestMemoryBlock {
#[serde(rename = "can-offline", default, skip_serializing_if = "Option::is_none")]
pub can_offline: Option<bool>,
#[serde(rename = "phys-index")]
pub phys_index: u64,
#[serde(rename = "online")]
pub online: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestExec {
#[serde(rename = "pid")]
pub pid: isize,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestNetworkInterface {
#[serde(rename = "hardware-address", default, skip_serializing_if = "Option::is_none")]
pub hardware_address: Option<::std::string::String>,
#[serde(rename = "ip-addresses", default, skip_serializing_if = "Option::is_none")]
pub ip_addresses: Option<Vec<GuestIpAddress>>,
#[serde(rename = "statistics", default, skip_serializing_if = "Option::is_none")]
pub statistics: Option<GuestNetworkInterfaceStat>,
#[serde(rename = "name")]
pub name: ::std::string::String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestLogicalProcessor {
#[serde(rename = "logical-id")]
pub logical_id: isize,
#[serde(rename = "online")]
pub online: bool,
#[serde(rename = "can-offline", default, skip_serializing_if = "Option::is_none")]
pub can_offline: Option<bool>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestDiskInfo {
#[serde(rename = "dependencies", default, skip_serializing_if = "Option::is_none")]
pub dependencies: Option<Vec<::std::string::String>>,
#[serde(rename = "address", default, skip_serializing_if = "Option::is_none")]
pub address: Option<GuestDiskAddress>,
#[serde(rename = "partition")]
pub partition: bool,
#[serde(rename = "name")]
pub name: ::std::string::String,
#[serde(rename = "alias", default, skip_serializing_if = "Option::is_none")]
pub alias: Option<::std::string::String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestFilesystemInfo {
#[serde(rename = "mountpoint")]
pub mountpoint: ::std::string::String,
#[serde(rename = "used-bytes", default, skip_serializing_if = "Option::is_none")]
pub used_bytes: Option<u64>,
#[serde(rename = "name")]
pub name: ::std::string::String,
#[serde(rename = "disk")]
pub disk: Vec<GuestDiskAddress>,
#[serde(rename = "type")]
pub type_: ::std::string::String,
#[serde(rename = "total-bytes", default, skip_serializing_if = "Option::is_none")]
pub total_bytes: Option<u64>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestMemoryBlockInfo {
#[serde(rename = "size")]
pub size: u64,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestNetworkInterfaceStat {
#[serde(rename = "tx-packets")]
pub tx_packets: u64,
#[serde(rename = "rx-errs")]
pub rx_errs: u64,
#[serde(rename = "rx-bytes")]
pub rx_bytes: u64,
#[serde(rename = "rx-packets")]
pub rx_packets: u64,
#[serde(rename = "rx-dropped")]
pub rx_dropped: u64,
#[serde(rename = "tx-bytes")]
pub tx_bytes: u64,
#[serde(rename = "tx-errs")]
pub tx_errs: u64,
#[serde(rename = "tx-dropped")]
pub tx_dropped: u64,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestDiskAddress {
#[serde(rename = "serial", default, skip_serializing_if = "Option::is_none")]
pub serial: Option<::std::string::String>,
#[serde(rename = "dev", default, skip_serializing_if = "Option::is_none")]
pub dev: Option<::std::string::String>,
#[serde(rename = "bus")]
pub bus: isize,
#[serde(rename = "target")]
pub target: isize,
#[serde(rename = "unit")]
pub unit: isize,
#[serde(rename = "pci-controller")]
pub pci_controller: GuestPCIAddress,
#[serde(rename = "bus-type")]
pub bus_type: GuestDiskBusType,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestFilesystemTrimResponse {
#[serde(rename = "paths")]
pub paths: Vec<GuestFilesystemTrimResult>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestOSInfo {
#[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
pub name: Option<::std::string::String>,
#[serde(rename = "variant-id", default, skip_serializing_if = "Option::is_none")]
pub variant_id: Option<::std::string::String>,
#[serde(rename = "version", default, skip_serializing_if = "Option::is_none")]
pub version: Option<::std::string::String>,
#[serde(rename = "kernel-version", default, skip_serializing_if = "Option::is_none")]
pub kernel_version: Option<::std::string::String>,
#[serde(rename = "kernel-release", default, skip_serializing_if = "Option::is_none")]
pub kernel_release: Option<::std::string::String>,
#[serde(rename = "version-id", default, skip_serializing_if = "Option::is_none")]
pub version_id: Option<::std::string::String>,
#[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
pub id: Option<::std::string::String>,
#[serde(rename = "pretty-name", default, skip_serializing_if = "Option::is_none")]
pub pretty_name: Option<::std::string::String>,
#[serde(rename = "variant", default, skip_serializing_if = "Option::is_none")]
pub variant: Option<::std::string::String>,
#[serde(rename = "machine", default, skip_serializing_if = "Option::is_none")]
pub machine: Option<::std::string::String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestDeviceIdPCI {
#[serde(rename = "vendor-id")]
pub vendor_id: u16,
#[serde(rename = "device-id")]
pub device_id: u16,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestAuthorizedKeys {
#[serde(rename = "keys")]
pub keys: Vec<::std::string::String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestAgentInfo {
#[serde(rename = "supported_commands")]
pub supported_commands: Vec<GuestAgentCommandInfo>,
#[serde(rename = "version")]
pub version: ::std::string::String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestFileWrite {
#[serde(rename = "count")]
pub count: isize,
#[serde(rename = "eof")]
pub eof: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestPCIAddress {
#[serde(rename = "bus")]
pub bus: isize,
#[serde(rename = "function")]
pub function: isize,
#[serde(rename = "slot")]
pub slot: isize,
#[serde(rename = "domain")]
pub domain: isize,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestFileRead {
#[serde(rename = "count")]
pub count: isize,
#[serde(rename = "eof")]
pub eof: bool,
#[serde(rename = "buf-b64", with = "::qapi_spec::base64")]
pub buf_b64: Vec<u8>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestIpAddress {
#[serde(rename = "prefix")]
pub prefix: isize,
#[serde(rename = "ip-address")]
pub ip_address: ::std::string::String,
#[serde(rename = "ip-address-type")]
pub ip_address_type: GuestIpAddressType,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestExecStatus {
#[serde(rename = "err-data", with = "::qapi_spec::base64_opt", default, skip_serializing_if = "Option::is_none")]
pub err_data: Option<Vec<u8>>,
#[serde(rename = "exitcode", default, skip_serializing_if = "Option::is_none")]
pub exitcode: Option<isize>,
#[serde(rename = "signal", default, skip_serializing_if = "Option::is_none")]
pub signal: Option<isize>,
#[serde(rename = "out-truncated", default, skip_serializing_if = "Option::is_none")]
pub out_truncated: Option<bool>,
#[serde(rename = "err-truncated", default, skip_serializing_if = "Option::is_none")]
pub err_truncated: Option<bool>,
#[serde(rename = "out-data", with = "::qapi_spec::base64_opt", default, skip_serializing_if = "Option::is_none")]
pub out_data: Option<Vec<u8>>,
#[serde(rename = "exited")]
pub exited: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestHostName {
#[serde(rename = "host-name")]
pub host_name: ::std::string::String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestUser {
#[serde(rename = "user")]
pub user: ::std::string::String,
#[serde(rename = "domain", default, skip_serializing_if = "Option::is_none")]
pub domain: Option<::std::string::String>,
#[serde(rename = "login-time")]
pub login_time: f64,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestTimezone {
#[serde(rename = "offset")]
pub offset: isize,
#[serde(rename = "zone", default, skip_serializing_if = "Option::is_none")]
pub zone: Option<::std::string::String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestFileSeek {
#[serde(rename = "position")]
pub position: isize,
#[serde(rename = "eof")]
pub eof: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestDeviceInfo {
#[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
pub id: Option<GuestDeviceId>,
#[serde(rename = "driver-date", default, skip_serializing_if = "Option::is_none")]
pub driver_date: Option<isize>,
#[serde(rename = "driver-name")]
pub driver_name: ::std::string::String,
#[serde(rename = "driver-version", default, skip_serializing_if = "Option::is_none")]
pub driver_version: Option<::std::string::String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestMemoryBlockResponse {
#[serde(rename = "error-code", default, skip_serializing_if = "Option::is_none")]
pub error_code: Option<isize>,
#[serde(rename = "response")]
pub response: GuestMemoryBlockResponseType,
#[serde(rename = "phys-index")]
pub phys_index: u64,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestFilesystemTrimResult {
#[serde(rename = "error", default, skip_serializing_if = "Option::is_none")]
pub error: Option<::std::string::String>,
#[serde(rename = "path")]
pub path: ::std::string::String,
#[serde(rename = "minimum", default, skip_serializing_if = "Option::is_none")]
pub minimum: Option<isize>,
#[serde(rename = "trimmed", default, skip_serializing_if = "Option::is_none")]
pub trimmed: Option<isize>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GuestAgentCommandInfo {
#[serde(rename = "enabled")]
pub enabled: bool,
#[serde(rename = "name")]
pub name: ::std::string::String,
#[serde(rename = "success-response")]
pub success_response: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "event")]
pub enum Event {
}

impl Event {
    pub fn timestamp(&self) -> ::qapi_spec::Timestamp {
        match *self {

        }
    }
}