...

Source file src/victortoso.com/qapi-go/pkg/qapi/commands.go

Documentation: victortoso.com/qapi-go/pkg/qapi

     1  package qapi
     2  
     3  import (
     4  	"encoding/json"
     5  	"fmt"
     6  )
     7  
     8  // Query the run status of all VCPUs
     9  //
    10  // Returns: @StatusInfo reflecting all VCPUs
    11  //
    12  // Since: 0.14
    13  //
    14  // Example: -> { "execute": "query-status" }
    15  // <- { "return": { "running": true,
    16  //                  "singlestep": false,
    17  //                  "status": "running" } }
    18  type QueryStatusCommand struct{}
    19  
    20  // Set watchdog action
    21  //
    22  // Since: 2.11
    23  type WatchdogSetActionCommand struct {
    24  	Action WatchdogAction `json:"action"`
    25  }
    26  
    27  // Set the actions that will be taken by the emulator in response to guest
    28  // events.
    29  //
    30  // Returns: Nothing on success.
    31  //
    32  // Since: 6.0
    33  //
    34  // Example: -> { "execute": "set-action",
    35  //      "arguments": { "reboot": "shutdown",
    36  //                     "shutdown" : "pause",
    37  //                     "panic": "pause",
    38  //                     "watchdog": "inject-nmi" } }
    39  // <- { "return": {} }
    40  type SetActionCommand struct {
    41  	Reboot   *RebootAction   `json:"reboot,omitempty"`   // @RebootAction action taken on guest reboot.
    42  	Shutdown *ShutdownAction `json:"shutdown,omitempty"` // @ShutdownAction action taken on guest shutdown.
    43  	Panic    *PanicAction    `json:"panic,omitempty"`    // @PanicAction action taken on guest panic.
    44  	Watchdog *WatchdogAction `json:"watchdog,omitempty"` // @WatchdogAction action taken when watchdog timer expires .
    45  }
    46  
    47  // Returns a list of information about each persistent reservation manager.
    48  //
    49  // Returns: a list of @PRManagerInfo for each persistent reservation manager
    50  //
    51  // Since: 3.0
    52  type QueryPrManagersCommand struct{}
    53  
    54  // Ejects the medium from a removable drive.
    55  //
    56  // Returns: - Nothing on success
    57  // - If @device is not a valid block device, DeviceNotFound
    58  //
    59  // Notes: Ejecting a device with no media results in success
    60  //
    61  // Since: 0.14
    62  //
    63  // Example: -> { "execute": "eject", "arguments": { "id": "ide1-0-1" } }
    64  // <- { "return": {} }
    65  type EjectCommand struct {
    66  	Device *string `json:"device,omitempty"` // Block device name
    67  	Id     *string `json:"id,omitempty"`     // The name or QOM path of the guest device (since: 2.8)
    68  	Force  *bool   `json:"force,omitempty"`  // If true, eject regardless of whether the drive is locked. If not specified, the default value is false.
    69  }
    70  
    71  // Opens a block device's tray. If there is a block driver state tree inserted as
    72  // a medium, it will become inaccessible to the guest (but it will remain
    73  // associated to the block device, so closing the tray will make it accessible
    74  // again).
    75  //
    76  // If the tray was already open before, this will be a no-op.
    77  //
    78  // Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
    79  // which no such event will be generated, these include:
    80  //
    81  // - if the guest has locked the tray, @force is false and the guest does not
    82  //   respond to the eject request
    83  // - if the BlockBackend denoted by @device does not have a guest device attached
    84  //   to it
    85  // - if the guest device does not have an actual tray
    86  //
    87  // Since: 2.5
    88  //
    89  // Example: -> { "execute": "blockdev-open-tray",
    90  //      "arguments": { "id": "ide0-1-0" } }
    91  //
    92  // <- { "timestamp": { "seconds": 1418751016,
    93  //                     "microseconds": 716996 },
    94  //      "event": "DEVICE_TRAY_MOVED",
    95  //      "data": { "device": "ide1-cd0",
    96  //                "id": "ide0-1-0",
    97  //                "tray-open": true } }
    98  //
    99  // <- { "return": {} }
   100  type BlockdevOpenTrayCommand struct {
   101  	Device *string `json:"device,omitempty"` // Block device name
   102  	Id     *string `json:"id,omitempty"`     // The name or QOM path of the guest device (since: 2.8)
   103  	Force  *bool   `json:"force,omitempty"`  // if false (the default), an eject request will be sent to the guest if it has locked the tray (and the tray will not be opened immediately); if true, the tray will be opened regardless of whether it is locked
   104  }
   105  
   106  // Closes a block device's tray. If there is a block driver state tree associated
   107  // with the block device (which is currently ejected), that tree will be loaded
   108  // as the medium.
   109  //
   110  // If the tray was already closed before, this will be a no-op.
   111  //
   112  // Since: 2.5
   113  //
   114  // Example: -> { "execute": "blockdev-close-tray",
   115  //      "arguments": { "id": "ide0-1-0" } }
   116  //
   117  // <- { "timestamp": { "seconds": 1418751345,
   118  //                     "microseconds": 272147 },
   119  //      "event": "DEVICE_TRAY_MOVED",
   120  //      "data": { "device": "ide1-cd0",
   121  //                "id": "ide0-1-0",
   122  //                "tray-open": false } }
   123  //
   124  // <- { "return": {} }
   125  type BlockdevCloseTrayCommand struct {
   126  	Device *string `json:"device,omitempty"` // Block device name
   127  	Id     *string `json:"id,omitempty"`     // The name or QOM path of the guest device (since: 2.8)
   128  }
   129  
   130  // Removes a medium (a block driver state tree) from a block device. That block
   131  // device's tray must currently be open (unless there is no attached guest
   132  // device).
   133  //
   134  // If the tray is open and there is no medium inserted, this will be a no-op.
   135  //
   136  // Since: 2.12
   137  //
   138  // Example: -> { "execute": "blockdev-remove-medium",
   139  //      "arguments": { "id": "ide0-1-0" } }
   140  //
   141  // <- { "error": { "class": "GenericError",
   142  //                 "desc": "Tray of device 'ide0-1-0' is not open" } }
   143  //
   144  // -> { "execute": "blockdev-open-tray",
   145  //      "arguments": { "id": "ide0-1-0" } }
   146  //
   147  // <- { "timestamp": { "seconds": 1418751627,
   148  //                     "microseconds": 549958 },
   149  //      "event": "DEVICE_TRAY_MOVED",
   150  //      "data": { "device": "ide1-cd0",
   151  //                "id": "ide0-1-0",
   152  //                "tray-open": true } }
   153  //
   154  // <- { "return": {} }
   155  //
   156  // -> { "execute": "blockdev-remove-medium",
   157  //      "arguments": { "id": "ide0-1-0" } }
   158  //
   159  // <- { "return": {} }
   160  type BlockdevRemoveMediumCommand struct {
   161  	Id string `json:"id"` // The name or QOM path of the guest device
   162  }
   163  
   164  // Inserts a medium (a block driver state tree) into a block device. That block
   165  // device's tray must currently be open (unless there is no attached guest
   166  // device) and there must be no medium inserted already.
   167  //
   168  // Since: 2.12
   169  //
   170  // Example: -> { "execute": "blockdev-add",
   171  //      "arguments": {
   172  //          "node-name": "node0",
   173  //          "driver": "raw",
   174  //          "file": { "driver": "file",
   175  //                    "filename": "fedora.iso" } } }
   176  // <- { "return": {} }
   177  //
   178  // -> { "execute": "blockdev-insert-medium",
   179  //      "arguments": { "id": "ide0-1-0",
   180  //                     "node-name": "node0" } }
   181  //
   182  // <- { "return": {} }
   183  type BlockdevInsertMediumCommand struct {
   184  	Id       string `json:"id"`        // The name or QOM path of the guest device
   185  	NodeName string `json:"node-name"` // name of a node in the block driver state graph
   186  }
   187  
   188  // Changes the medium inserted into a block device by ejecting the current medium
   189  // and loading a new image file which is inserted as the new medium (this command
   190  // combines blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium
   191  // and blockdev-close-tray).
   192  //
   193  // Since: 2.5
   194  //
   195  // Examples: 1. Change a removable medium
   196  //
   197  // -> { "execute": "blockdev-change-medium",
   198  //      "arguments": { "id": "ide0-1-0",
   199  //                     "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
   200  //                     "format": "raw" } }
   201  // <- { "return": {} }
   202  //
   203  // 2. Load a read-only medium into a writable drive
   204  //
   205  // -> { "execute": "blockdev-change-medium",
   206  //      "arguments": { "id": "floppyA",
   207  //                     "filename": "/srv/images/ro.img",
   208  //                     "format": "raw",
   209  //                     "read-only-mode": "retain" } }
   210  //
   211  // <- { "error":
   212  //      { "class": "GenericError",
   213  //        "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
   214  //
   215  // -> { "execute": "blockdev-change-medium",
   216  //      "arguments": { "id": "floppyA",
   217  //                     "filename": "/srv/images/ro.img",
   218  //                     "format": "raw",
   219  //                     "read-only-mode": "read-only" } }
   220  //
   221  // <- { "return": {} }
   222  type BlockdevChangeMediumCommand struct {
   223  	Device       *string                     `json:"device,omitempty"`         // Block device name
   224  	Id           *string                     `json:"id,omitempty"`             // The name or QOM path of the guest device (since: 2.8)
   225  	Filename     string                      `json:"filename"`                 // filename of the new image to be loaded
   226  	Format       *string                     `json:"format,omitempty"`         // format to open the new image with (defaults to the probed format)
   227  	ReadOnlyMode *BlockdevChangeReadOnlyMode `json:"read-only-mode,omitempty"` // change the read-only mode of the device; defaults to 'retain'
   228  }
   229  
   230  // Change I/O throttle limits for a block drive.
   231  //
   232  // Since QEMU 2.4, each device with I/O limits is member of a throttle
   233  // group.
   234  //
   235  // If two or more devices are members of the same group, the limits
   236  // will apply to the combined I/O of the whole group in a round-robin
   237  // fashion. Therefore, setting new I/O limits to a device will affect
   238  // the whole group.
   239  //
   240  // The name of the group can be specified using the 'group' parameter.
   241  // If the parameter is unset, it is assumed to be the current group of
   242  // that device. If it's not in any group yet, the name of the device
   243  // will be used as the name for its group.
   244  //
   245  // The 'group' parameter can also be used to move a device to a
   246  // different group. In this case the limits specified in the parameters
   247  // will be applied to the new group only.
   248  //
   249  // I/O limits can be disabled by setting all of them to 0. In this case
   250  // the device will be removed from its group and the rest of its
   251  // members will not be affected. The 'group' parameter is ignored.
   252  //
   253  // Returns: - Nothing on success
   254  // - If @device is not a valid block device, DeviceNotFound
   255  //
   256  // Since: 1.1
   257  //
   258  // Example: -> { "execute": "block_set_io_throttle",
   259  //      "arguments": { "id": "virtio-blk-pci0/virtio-backend",
   260  //                     "bps": 0,
   261  //                     "bps_rd": 0,
   262  //                     "bps_wr": 0,
   263  //                     "iops": 512,
   264  //                     "iops_rd": 0,
   265  //                     "iops_wr": 0,
   266  //                     "bps_max": 0,
   267  //                     "bps_rd_max": 0,
   268  //                     "bps_wr_max": 0,
   269  //                     "iops_max": 0,
   270  //                     "iops_rd_max": 0,
   271  //                     "iops_wr_max": 0,
   272  //                     "bps_max_length": 0,
   273  //                     "iops_size": 0 } }
   274  // <- { "return": {} }
   275  //
   276  // -> { "execute": "block_set_io_throttle",
   277  //      "arguments": { "id": "ide0-1-0",
   278  //                     "bps": 1000000,
   279  //                     "bps_rd": 0,
   280  //                     "bps_wr": 0,
   281  //                     "iops": 0,
   282  //                     "iops_rd": 0,
   283  //                     "iops_wr": 0,
   284  //                     "bps_max": 8000000,
   285  //                     "bps_rd_max": 0,
   286  //                     "bps_wr_max": 0,
   287  //                     "iops_max": 0,
   288  //                     "iops_rd_max": 0,
   289  //                     "iops_wr_max": 0,
   290  //                     "bps_max_length": 60,
   291  //                     "iops_size": 0 } }
   292  // <- { "return": {} }
   293  type BlockSetIoThrottleCommand struct {
   294  	BlockIOThrottle
   295  }
   296  
   297  // Manage read, write and flush latency histograms for the device.
   298  //
   299  // If only @id parameter is specified, remove all present latency histograms
   300  // for the device. Otherwise, add/reset some of (or all) latency histograms.
   301  //
   302  // Returns: error if device is not found or any boundary arrays are invalid.
   303  //
   304  // Since: 4.0
   305  //
   306  // Example: set new histograms for all io types with intervals
   307  // [0, 10), [10, 50), [50, 100), [100, +inf):
   308  //
   309  // -> { "execute": "block-latency-histogram-set",
   310  //      "arguments": { "id": "drive0",
   311  //                     "boundaries": [10, 50, 100] } }
   312  // <- { "return": {} }
   313  //
   314  // Example: set new histogram only for write, other histograms will remain
   315  // not changed (or not created):
   316  //
   317  // -> { "execute": "block-latency-histogram-set",
   318  //      "arguments": { "id": "drive0",
   319  //                     "boundaries-write": [10, 50, 100] } }
   320  // <- { "return": {} }
   321  //
   322  // Example: set new histograms with the following intervals:
   323  //   read, flush: [0, 10), [10, 50), [50, 100), [100, +inf)
   324  //   write: [0, 1000), [1000, 5000), [5000, +inf)
   325  //
   326  // -> { "execute": "block-latency-histogram-set",
   327  //      "arguments": { "id": "drive0",
   328  //                     "boundaries": [10, 50, 100],
   329  //                     "boundaries-write": [1000, 5000] } }
   330  // <- { "return": {} }
   331  //
   332  // Example: remove all latency histograms:
   333  //
   334  // -> { "execute": "block-latency-histogram-set",
   335  //      "arguments": { "id": "drive0" } }
   336  // <- { "return": {} }
   337  type BlockLatencyHistogramSetCommand struct {
   338  	Id              string   `json:"id"`                         // The name or QOM path of the guest device.
   339  	Boundaries      []uint64 `json:"boundaries,omitempty"`       // list of interval boundary values (see description in BlockLatencyHistogramInfo definition). If specified, all latency histograms are removed, and empty ones created for all io types with intervals corresponding to @boundaries (except for io types, for which specific boundaries are set through the following parameters).
   340  	BoundariesRead  []uint64 `json:"boundaries-read,omitempty"`  // list of interval boundary values for read latency histogram. If specified, old read latency histogram is removed, and empty one created with intervals corresponding to @boundaries-read. The parameter has higher priority then @boundaries.
   341  	BoundariesWrite []uint64 `json:"boundaries-write,omitempty"` // list of interval boundary values for write latency histogram.
   342  	BoundariesFlush []uint64 `json:"boundaries-flush,omitempty"` // list of interval boundary values for flush latency histogram.
   343  }
   344  
   345  // Get a list of BlockInfo for all virtual block devices.
   346  //
   347  // Returns: a list of @BlockInfo describing each virtual block device. Filter
   348  // nodes that were created implicitly are skipped over.
   349  //
   350  // Since: 0.14
   351  //
   352  // Example: -> { "execute": "query-block" }
   353  // <- {
   354  //       "return":[
   355  //          {
   356  //             "io-status": "ok",
   357  //             "device":"ide0-hd0",
   358  //             "locked":false,
   359  //             "removable":false,
   360  //             "inserted":{
   361  //                "ro":false,
   362  //                "drv":"qcow2",
   363  //                "encrypted":false,
   364  //                "file":"disks/test.qcow2",
   365  //                "backing_file_depth":1,
   366  //                "bps":1000000,
   367  //                "bps_rd":0,
   368  //                "bps_wr":0,
   369  //                "iops":1000000,
   370  //                "iops_rd":0,
   371  //                "iops_wr":0,
   372  //                "bps_max": 8000000,
   373  //                "bps_rd_max": 0,
   374  //                "bps_wr_max": 0,
   375  //                "iops_max": 0,
   376  //                "iops_rd_max": 0,
   377  //                "iops_wr_max": 0,
   378  //                "iops_size": 0,
   379  //                "detect_zeroes": "on",
   380  //                "write_threshold": 0,
   381  //                "image":{
   382  //                   "filename":"disks/test.qcow2",
   383  //                   "format":"qcow2",
   384  //                   "virtual-size":2048000,
   385  //                   "backing_file":"base.qcow2",
   386  //                   "full-backing-filename":"disks/base.qcow2",
   387  //                   "backing-filename-format":"qcow2",
   388  //                   "snapshots":[
   389  //                      {
   390  //                         "id": "1",
   391  //                         "name": "snapshot1",
   392  //                         "vm-state-size": 0,
   393  //                         "date-sec": 10000200,
   394  //                         "date-nsec": 12,
   395  //                         "vm-clock-sec": 206,
   396  //                         "vm-clock-nsec": 30
   397  //                      }
   398  //                   ],
   399  //                   "backing-image":{
   400  //                       "filename":"disks/base.qcow2",
   401  //                       "format":"qcow2",
   402  //                       "virtual-size":2048000
   403  //                   }
   404  //                }
   405  //             },
   406  //             "qdev": "ide_disk",
   407  //             "type":"unknown"
   408  //          },
   409  //          {
   410  //             "io-status": "ok",
   411  //             "device":"ide1-cd0",
   412  //             "locked":false,
   413  //             "removable":true,
   414  //             "qdev": "/machine/unattached/device[23]",
   415  //             "tray_open": false,
   416  //             "type":"unknown"
   417  //          },
   418  //          {
   419  //             "device":"floppy0",
   420  //             "locked":false,
   421  //             "removable":true,
   422  //             "qdev": "/machine/unattached/device[20]",
   423  //             "type":"unknown"
   424  //          },
   425  //          {
   426  //             "device":"sd0",
   427  //             "locked":false,
   428  //             "removable":true,
   429  //             "type":"unknown"
   430  //          }
   431  //       ]
   432  //    }
   433  type QueryBlockCommand struct{}
   434  
   435  // Query the @BlockStats for all virtual block devices.
   436  //
   437  // Returns: A list of @BlockStats for each virtual block devices.
   438  //
   439  // Since: 0.14
   440  //
   441  // Example: -> { "execute": "query-blockstats" }
   442  // <- {
   443  //       "return":[
   444  //          {
   445  //             "device":"ide0-hd0",
   446  //             "parent":{
   447  //                "stats":{
   448  //                   "wr_highest_offset":3686448128,
   449  //                   "wr_bytes":9786368,
   450  //                   "wr_operations":751,
   451  //                   "rd_bytes":122567168,
   452  //                   "rd_operations":36772
   453  //                   "wr_total_times_ns":313253456
   454  //                   "rd_total_times_ns":3465673657
   455  //                   "flush_total_times_ns":49653
   456  //                   "flush_operations":61,
   457  //                   "rd_merged":0,
   458  //                   "wr_merged":0,
   459  //                   "idle_time_ns":2953431879,
   460  //                   "account_invalid":true,
   461  //                   "account_failed":false
   462  //                }
   463  //             },
   464  //             "stats":{
   465  //                "wr_highest_offset":2821110784,
   466  //                "wr_bytes":9786368,
   467  //                "wr_operations":692,
   468  //                "rd_bytes":122739200,
   469  //                "rd_operations":36604
   470  //                "flush_operations":51,
   471  //                "wr_total_times_ns":313253456
   472  //                "rd_total_times_ns":3465673657
   473  //                "flush_total_times_ns":49653,
   474  //                "rd_merged":0,
   475  //                "wr_merged":0,
   476  //                "idle_time_ns":2953431879,
   477  //                "account_invalid":true,
   478  //                "account_failed":false
   479  //             },
   480  //             "qdev": "/machine/unattached/device[23]"
   481  //          },
   482  //          {
   483  //             "device":"ide1-cd0",
   484  //             "stats":{
   485  //                "wr_highest_offset":0,
   486  //                "wr_bytes":0,
   487  //                "wr_operations":0,
   488  //                "rd_bytes":0,
   489  //                "rd_operations":0
   490  //                "flush_operations":0,
   491  //                "wr_total_times_ns":0
   492  //                "rd_total_times_ns":0
   493  //                "flush_total_times_ns":0,
   494  //                "rd_merged":0,
   495  //                "wr_merged":0,
   496  //                "account_invalid":false,
   497  //                "account_failed":false
   498  //             },
   499  //             "qdev": "/machine/unattached/device[24]"
   500  //          },
   501  //          {
   502  //             "device":"floppy0",
   503  //             "stats":{
   504  //                "wr_highest_offset":0,
   505  //                "wr_bytes":0,
   506  //                "wr_operations":0,
   507  //                "rd_bytes":0,
   508  //                "rd_operations":0
   509  //                "flush_operations":0,
   510  //                "wr_total_times_ns":0
   511  //                "rd_total_times_ns":0
   512  //                "flush_total_times_ns":0,
   513  //                "rd_merged":0,
   514  //                "wr_merged":0,
   515  //                "account_invalid":false,
   516  //                "account_failed":false
   517  //             },
   518  //             "qdev": "/machine/unattached/device[16]"
   519  //          },
   520  //          {
   521  //             "device":"sd0",
   522  //             "stats":{
   523  //                "wr_highest_offset":0,
   524  //                "wr_bytes":0,
   525  //                "wr_operations":0,
   526  //                "rd_bytes":0,
   527  //                "rd_operations":0
   528  //                "flush_operations":0,
   529  //                "wr_total_times_ns":0
   530  //                "rd_total_times_ns":0
   531  //                "flush_total_times_ns":0,
   532  //                "rd_merged":0,
   533  //                "wr_merged":0,
   534  //                "account_invalid":false,
   535  //                "account_failed":false
   536  //             }
   537  //          }
   538  //       ]
   539  //    }
   540  type QueryBlockstatsCommand struct {
   541  	QueryNodes *bool `json:"query-nodes,omitempty"` // If true, the command will query all the block nodes that have a node name, in a list which will include "parent" information, but not "backing". If false or omitted, the behavior is as before - query all the device backends, recursively including their "parent" and "backing". Filter nodes that were created implicitly are skipped over in this mode. (Since 2.3)
   542  }
   543  
   544  // Return information about long-running block device operations.
   545  //
   546  // Returns: a list of @BlockJobInfo for each active block job
   547  //
   548  // Since: 1.1
   549  type QueryBlockJobsCommand struct{}
   550  
   551  // Resize a block image while a guest is running.
   552  //
   553  // Either @device or @node-name must be set but not both.
   554  //
   555  // Returns: - nothing on success
   556  // - If @device is not a valid block device, DeviceNotFound
   557  //
   558  // Since: 0.14
   559  //
   560  // Example: -> { "execute": "block_resize",
   561  //      "arguments": { "device": "scratch", "size": 1073741824 } }
   562  // <- { "return": {} }
   563  type BlockResizeCommand struct {
   564  	Device   *string `json:"device,omitempty"`    // the name of the device to get the image resized
   565  	NodeName *string `json:"node-name,omitempty"` // graph node name to get the image resized (Since 2.0)
   566  	Size     int64   `json:"size"`                // new image size in bytes
   567  }
   568  
   569  // Takes a synchronous snapshot of a block device.
   570  //
   571  // For the arguments, see the documentation of BlockdevSnapshotSync.
   572  //
   573  // Returns: - nothing on success
   574  // - If @device is not a valid block device, DeviceNotFound
   575  //
   576  // Since: 0.14
   577  //
   578  // Example: -> { "execute": "blockdev-snapshot-sync",
   579  //      "arguments": { "device": "ide-hd0",
   580  //                     "snapshot-file":
   581  //                     "/some/place/my-image",
   582  //                     "format": "qcow2" } }
   583  // <- { "return": {} }
   584  type BlockdevSnapshotSyncCommand struct {
   585  	BlockdevSnapshotSync
   586  }
   587  
   588  // Takes a snapshot of a block device.
   589  //
   590  // Take a snapshot, by installing 'node' as the backing image of
   591  // 'overlay'. Additionally, if 'node' is associated with a block
   592  // device, the block device changes to using 'overlay' as its new active
   593  // image.
   594  //
   595  // For the arguments, see the documentation of BlockdevSnapshot.
   596  //
   597  // Since: 2.5
   598  //
   599  // Example: -> { "execute": "blockdev-add",
   600  //      "arguments": { "driver": "qcow2",
   601  //                     "node-name": "node1534",
   602  //                     "file": { "driver": "file",
   603  //                               "filename": "hd1.qcow2" },
   604  //                     "backing": null } }
   605  //
   606  // <- { "return": {} }
   607  //
   608  // -> { "execute": "blockdev-snapshot",
   609  //      "arguments": { "node": "ide-hd0",
   610  //                     "overlay": "node1534" } }
   611  // <- { "return": {} }
   612  type BlockdevSnapshotCommand struct {
   613  	BlockdevSnapshot
   614  }
   615  
   616  // Change the backing file in the image file metadata.  This does not
   617  // cause QEMU to reopen the image file to reparse the backing filename
   618  // (it may, however, perform a reopen to change permissions from
   619  // r/o -> r/w -> r/o, if needed). The new backing file string is written
   620  // into the image file metadata, and the QEMU internal strings are
   621  // updated.
   622  //
   623  // Returns: - Nothing on success
   624  // - If "device" does not exist or cannot be determined, DeviceNotFound
   625  //
   626  // Since: 2.1
   627  type ChangeBackingFileCommand struct {
   628  	Device        string `json:"device"`          // The device name or node-name of the root node that owns image-node-name.
   629  	ImageNodeName string `json:"image-node-name"` // The name of the block driver state node of the image to modify. The "device" argument is used to verify "image-node-name" is in the chain described by "device".
   630  	BackingFile   string `json:"backing-file"`    // The string to write as the backing file. This string is not validated, so care should be taken when specifying the string or the image chain may not be able to be reopened again.
   631  }
   632  
   633  // Live commit of data from overlay image nodes into backing nodes - i.e.,
   634  // writes data between 'top' and 'base' into 'base'.
   635  //
   636  // If top == base, that is an error.
   637  // If top has no overlays on top of it, or if it is in use by a writer,
   638  // the job will not be completed by itself.  The user needs to complete
   639  // the job with the block-job-complete command after getting the ready
   640  // event. (Since 2.0)
   641  //
   642  // If the base image is smaller than top, then the base image will be
   643  // resized to be the same size as top.  If top is smaller than the base
   644  // image, the base will not be truncated.  If you want the base image
   645  // size to match the size of the smaller top, you can safely truncate
   646  // it yourself once the commit operation successfully completes.
   647  //
   648  // Returns: - Nothing on success
   649  // - If @device does not exist, DeviceNotFound
   650  // - Any other error returns a GenericError.
   651  //
   652  // Since: 1.3
   653  //
   654  // Example: -> { "execute": "block-commit",
   655  //      "arguments": { "device": "virtio0",
   656  //                     "top": "/tmp/snap1.qcow2" } }
   657  // <- { "return": {} }
   658  type BlockCommitCommand struct {
   659  	JobId          *string          `json:"job-id,omitempty"`           // identifier for the newly-created block job. If omitted, the device name will be used. (Since 2.7)
   660  	Device         string           `json:"device"`                     // the device name or node-name of a root node
   661  	BaseNode       *string          `json:"base-node,omitempty"`        // The node name of the backing image to write data into. If not specified, this is the deepest backing image. (since: 3.1)
   662  	Base           *string          `json:"base,omitempty"`             // Same as @base-node, except that it is a file name rather than a node name. This must be the exact filename string that was used to open the node; other strings, even if addressing the same file, are not accepted
   663  	TopNode        *string          `json:"top-node,omitempty"`         // The node name of the backing image within the image chain which contains the topmost data to be committed down. If not specified, this is the active layer. (since: 3.1)
   664  	Top            *string          `json:"top,omitempty"`              // Same as @top-node, except that it is a file name rather than a node name. This must be the exact filename string that was used to open the node; other strings, even if addressing the same file, are not accepted
   665  	BackingFile    *string          `json:"backing-file,omitempty"`     // The backing file string to write into the overlay image of 'top'. If 'top' does not have an overlay image, or if 'top' is in use by a writer, specifying a backing file string is an error. This filename is not validated. If a pathname string is such that it cannot be resolved by QEMU, that means that subsequent QMP or HMP commands must use node-names for the image in question, as filename lookup methods will fail. If not specified, QEMU will automatically determine the backing file string to use, or error out if there is no obvious choice. Care should be taken when specifying the string, to specify a valid filename or protocol. (Since 2.1)
   666  	Speed          *int64           `json:"speed,omitempty"`            // the maximum speed, in bytes per second
   667  	OnError        *BlockdevOnError `json:"on-error,omitempty"`         // the action to take on an error. 'ignore' means that the request should be retried. (default: report; Since: 5.0)
   668  	FilterNodeName *string          `json:"filter-node-name,omitempty"` // the node name that should be assigned to the filter driver that the commit job inserts into the graph above @top. If this option is not given, a node name is autogenerated. (Since: 2.9)
   669  	AutoFinalize   *bool            `json:"auto-finalize,omitempty"`    // When false, this job will wait in a PENDING state after it has finished its work, waiting for @block-job-finalize before making any block graph changes. When true, this job will automatically perform its abort or commit actions. Defaults to true. (Since 3.1)
   670  	AutoDismiss    *bool            `json:"auto-dismiss,omitempty"`     // When false, this job will wait in a CONCLUDED state after it has completely ceased all work, and awaits @block-job-dismiss. When true, this job will automatically disappear from the query list without user intervention. Defaults to true. (Since 3.1)
   671  }
   672  
   673  // Start a point-in-time copy of a block device to a new destination.  The
   674  // status of ongoing drive-backup operations can be checked with
   675  // query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
   676  // The operation can be stopped before it has completed using the
   677  // block-job-cancel command.
   678  //
   679  // Returns: - nothing on success
   680  // - If @device is not a valid block device, GenericError
   681  //
   682  // Since: 1.6
   683  //
   684  // Example: -> { "execute": "drive-backup",
   685  //      "arguments": { "device": "drive0",
   686  //                     "sync": "full",
   687  //                     "target": "backup.img" } }
   688  // <- { "return": {} }
   689  type DriveBackupCommand struct {
   690  	DriveBackup
   691  }
   692  
   693  // Start a point-in-time copy of a block device to a new destination.  The
   694  // status of ongoing blockdev-backup operations can be checked with
   695  // query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
   696  // The operation can be stopped before it has completed using the
   697  // block-job-cancel command.
   698  //
   699  // Returns: - nothing on success
   700  // - If @device is not a valid block device, DeviceNotFound
   701  //
   702  // Since: 2.3
   703  //
   704  // Example: -> { "execute": "blockdev-backup",
   705  //      "arguments": { "device": "src-id",
   706  //                     "sync": "full",
   707  //                     "target": "tgt-id" } }
   708  // <- { "return": {} }
   709  type BlockdevBackupCommand struct {
   710  	BlockdevBackup
   711  }
   712  
   713  // Get the named block driver list
   714  //
   715  // Returns: the list of BlockDeviceInfo
   716  //
   717  // Since: 2.0
   718  //
   719  // Example: -> { "execute": "query-named-block-nodes" }
   720  // <- { "return": [ { "ro":false,
   721  //                    "drv":"qcow2",
   722  //                    "encrypted":false,
   723  //                    "file":"disks/test.qcow2",
   724  //                    "node-name": "my-node",
   725  //                    "backing_file_depth":1,
   726  //                    "bps":1000000,
   727  //                    "bps_rd":0,
   728  //                    "bps_wr":0,
   729  //                    "iops":1000000,
   730  //                    "iops_rd":0,
   731  //                    "iops_wr":0,
   732  //                    "bps_max": 8000000,
   733  //                    "bps_rd_max": 0,
   734  //                    "bps_wr_max": 0,
   735  //                    "iops_max": 0,
   736  //                    "iops_rd_max": 0,
   737  //                    "iops_wr_max": 0,
   738  //                    "iops_size": 0,
   739  //                    "write_threshold": 0,
   740  //                    "image":{
   741  //                       "filename":"disks/test.qcow2",
   742  //                       "format":"qcow2",
   743  //                       "virtual-size":2048000,
   744  //                       "backing_file":"base.qcow2",
   745  //                       "full-backing-filename":"disks/base.qcow2",
   746  //                       "backing-filename-format":"qcow2",
   747  //                       "snapshots":[
   748  //                          {
   749  //                             "id": "1",
   750  //                             "name": "snapshot1",
   751  //                             "vm-state-size": 0,
   752  //                             "date-sec": 10000200,
   753  //                             "date-nsec": 12,
   754  //                             "vm-clock-sec": 206,
   755  //                             "vm-clock-nsec": 30
   756  //                          }
   757  //                       ],
   758  //                       "backing-image":{
   759  //                           "filename":"disks/base.qcow2",
   760  //                           "format":"qcow2",
   761  //                           "virtual-size":2048000
   762  //                       }
   763  //                    } } ] }
   764  type QueryNamedBlockNodesCommand struct {
   765  	Flat *bool `json:"flat,omitempty"` // Omit the nested data about backing image ("backing-image" key) if true. Default is false (Since 5.0)
   766  }
   767  
   768  // Get the block graph.
   769  //
   770  // Since: 4.0
   771  type XDebugQueryBlockGraphCommand struct{}
   772  
   773  // Start mirroring a block device's writes to a new destination. target
   774  // specifies the target of the new image. If the file exists, or if it
   775  // is a device, it will be used as the new destination for writes. If
   776  // it does not exist, a new file will be created. format specifies the
   777  // format of the mirror image, default is to probe if mode='existing',
   778  // else the format of the source.
   779  //
   780  // Returns: - nothing on success
   781  // - If @device is not a valid block device, GenericError
   782  //
   783  // Since: 1.3
   784  //
   785  // Example: -> { "execute": "drive-mirror",
   786  //      "arguments": { "device": "ide-hd0",
   787  //                     "target": "/some/place/my-image",
   788  //                     "sync": "full",
   789  //                     "format": "qcow2" } }
   790  // <- { "return": {} }
   791  type DriveMirrorCommand struct {
   792  	DriveMirror
   793  }
   794  
   795  // Create a dirty bitmap with a name on the node, and start tracking the writes.
   796  //
   797  // Returns: - nothing on success
   798  // - If @node is not a valid block device or node, DeviceNotFound
   799  // - If @name is already taken, GenericError with an explanation
   800  //
   801  // Since: 2.4
   802  //
   803  // Example: -> { "execute": "block-dirty-bitmap-add",
   804  //      "arguments": { "node": "drive0", "name": "bitmap0" } }
   805  // <- { "return": {} }
   806  type BlockDirtyBitmapAddCommand struct {
   807  	BlockDirtyBitmapAdd
   808  }
   809  
   810  // Stop write tracking and remove the dirty bitmap that was created
   811  // with block-dirty-bitmap-add. If the bitmap is persistent, remove it from its
   812  // storage too.
   813  //
   814  // Returns: - nothing on success
   815  // - If @node is not a valid block device or node, DeviceNotFound
   816  // - If @name is not found, GenericError with an explanation
   817  // - if @name is frozen by an operation, GenericError
   818  //
   819  // Since: 2.4
   820  //
   821  // Example: -> { "execute": "block-dirty-bitmap-remove",
   822  //      "arguments": { "node": "drive0", "name": "bitmap0" } }
   823  // <- { "return": {} }
   824  type BlockDirtyBitmapRemoveCommand struct {
   825  	BlockDirtyBitmap
   826  }
   827  
   828  // Clear (reset) a dirty bitmap on the device, so that an incremental
   829  // backup from this point in time forward will only backup clusters
   830  // modified after this clear operation.
   831  //
   832  // Returns: - nothing on success
   833  // - If @node is not a valid block device, DeviceNotFound
   834  // - If @name is not found, GenericError with an explanation
   835  //
   836  // Since: 2.4
   837  //
   838  // Example: -> { "execute": "block-dirty-bitmap-clear",
   839  //      "arguments": { "node": "drive0", "name": "bitmap0" } }
   840  // <- { "return": {} }
   841  type BlockDirtyBitmapClearCommand struct {
   842  	BlockDirtyBitmap
   843  }
   844  
   845  // Enables a dirty bitmap so that it will begin tracking disk changes.
   846  //
   847  // Returns: - nothing on success
   848  // - If @node is not a valid block device, DeviceNotFound
   849  // - If @name is not found, GenericError with an explanation
   850  //
   851  // Since: 4.0
   852  //
   853  // Example: -> { "execute": "block-dirty-bitmap-enable",
   854  //      "arguments": { "node": "drive0", "name": "bitmap0" } }
   855  // <- { "return": {} }
   856  type BlockDirtyBitmapEnableCommand struct {
   857  	BlockDirtyBitmap
   858  }
   859  
   860  // Disables a dirty bitmap so that it will stop tracking disk changes.
   861  //
   862  // Returns: - nothing on success
   863  // - If @node is not a valid block device, DeviceNotFound
   864  // - If @name is not found, GenericError with an explanation
   865  //
   866  // Since: 4.0
   867  //
   868  // Example: -> { "execute": "block-dirty-bitmap-disable",
   869  //      "arguments": { "node": "drive0", "name": "bitmap0" } }
   870  // <- { "return": {} }
   871  type BlockDirtyBitmapDisableCommand struct {
   872  	BlockDirtyBitmap
   873  }
   874  
   875  // Merge dirty bitmaps listed in @bitmaps to the @target dirty bitmap.
   876  // Dirty bitmaps in @bitmaps will be unchanged, except if it also appears
   877  // as the @target bitmap. Any bits already set in @target will still be
   878  // set after the merge, i.e., this operation does not clear the target.
   879  // On error, @target is unchanged.
   880  //
   881  // The resulting bitmap will count as dirty any clusters that were dirty in any
   882  // of the source bitmaps. This can be used to achieve backup checkpoints, or in
   883  // simpler usages, to copy bitmaps.
   884  //
   885  // Returns: - nothing on success
   886  // - If @node is not a valid block device, DeviceNotFound
   887  // - If any bitmap in @bitmaps or @target is not found, GenericError
   888  // - If any of the bitmaps have different sizes or granularities,
   889  //   GenericError
   890  //
   891  // Since: 4.0
   892  //
   893  // Example: -> { "execute": "block-dirty-bitmap-merge",
   894  //      "arguments": { "node": "drive0", "target": "bitmap0",
   895  //                     "bitmaps": ["bitmap1"] } }
   896  // <- { "return": {} }
   897  type BlockDirtyBitmapMergeCommand struct {
   898  	BlockDirtyBitmapMerge
   899  }
   900  
   901  // Get bitmap SHA256.
   902  //
   903  // Returns: - BlockDirtyBitmapSha256 on success
   904  // - If @node is not a valid block device, DeviceNotFound
   905  // - If @name is not found or if hashing has failed, GenericError with an
   906  //   explanation
   907  //
   908  // Since: 2.10
   909  type XDebugBlockDirtyBitmapSha256Command struct {
   910  	BlockDirtyBitmap
   911  }
   912  
   913  // Start mirroring a block device's writes to a new destination.
   914  //
   915  // Returns: nothing on success.
   916  //
   917  // Since: 2.6
   918  //
   919  // Example: -> { "execute": "blockdev-mirror",
   920  //      "arguments": { "device": "ide-hd0",
   921  //                     "target": "target0",
   922  //                     "sync": "full" } }
   923  // <- { "return": {} }
   924  type BlockdevMirrorCommand struct {
   925  	JobId          *string          `json:"job-id,omitempty"`           // identifier for the newly-created block job. If omitted, the device name will be used. (Since 2.7)
   926  	Device         string           `json:"device"`                     // The device name or node-name of a root node whose writes should be mirrored.
   927  	Target         string           `json:"target"`                     // the id or node-name of the block device to mirror to. This mustn't be attached to guest.
   928  	Replaces       *string          `json:"replaces,omitempty"`         // with sync=full graph node name to be replaced by the new image when a whole image copy is done. This can be used to repair broken Quorum files. By default, @device is replaced, although implicitly created filters on it are kept.
   929  	Sync           MirrorSyncMode   `json:"sync"`                       // what parts of the disk image should be copied to the destination (all the disk, only the sectors allocated in the topmost image, or only new I/O).
   930  	Speed          *int64           `json:"speed,omitempty"`            // the maximum speed, in bytes per second
   931  	Granularity    *uint32          `json:"granularity,omitempty"`      // granularity of the dirty bitmap, default is 64K if the image format doesn't have clusters, 4K if the clusters are smaller than that, else the cluster size. Must be a power of 2 between 512 and 64M
   932  	BufSize        *int64           `json:"buf-size,omitempty"`         // maximum amount of data in flight from source to target
   933  	OnSourceError  *BlockdevOnError `json:"on-source-error,omitempty"`  // the action to take on an error on the source, default 'report'. 'stop' and 'enospc' can only be used if the block device supports io-status (see BlockInfo).
   934  	OnTargetError  *BlockdevOnError `json:"on-target-error,omitempty"`  // the action to take on an error on the target, default 'report' (no limitations, since this applies to a different block device than @device).
   935  	FilterNodeName *string          `json:"filter-node-name,omitempty"` // the node name that should be assigned to the filter driver that the mirror job inserts into the graph above @device. If this option is not given, a node name is autogenerated. (Since: 2.9)
   936  	CopyMode       *MirrorCopyMode  `json:"copy-mode,omitempty"`        // when to copy data to the destination; defaults to 'background' (Since: 3.0)
   937  	AutoFinalize   *bool            `json:"auto-finalize,omitempty"`    // When false, this job will wait in a PENDING state after it has finished its work, waiting for @block-job-finalize before making any block graph changes. When true, this job will automatically perform its abort or commit actions. Defaults to true. (Since 3.1)
   938  	AutoDismiss    *bool            `json:"auto-dismiss,omitempty"`     // When false, this job will wait in a CONCLUDED state after it has completely ceased all work, and awaits @block-job-dismiss. When true, this job will automatically disappear from the query list without user intervention. Defaults to true. (Since 3.1)
   939  }
   940  
   941  // Copy data from a backing file into a block device.
   942  //
   943  // The block streaming operation is performed in the background until the entire
   944  // backing file has been copied.  This command returns immediately once streaming
   945  // has started.  The status of ongoing block streaming operations can be checked
   946  // with query-block-jobs.  The operation can be stopped before it has completed
   947  // using the block-job-cancel command.
   948  //
   949  // The node that receives the data is called the top image, can be located in
   950  // any part of the chain (but always above the base image; see below) and can be
   951  // specified using its device or node name. Earlier qemu versions only allowed
   952  // 'device' to name the top level node; presence of the 'base-node' parameter
   953  // during introspection can be used as a witness of the enhanced semantics
   954  // of 'device'.
   955  //
   956  // If a base file is specified then sectors are not copied from that base file and
   957  // its backing chain.  This can be used to stream a subset of the backing file
   958  // chain instead of flattening the entire image.
   959  // When streaming completes the image file will have the base file as its backing
   960  // file, unless that node was changed while the job was running.  In that case,
   961  // base's parent's backing (or filtered, whichever exists) child (i.e., base at
   962  // the beginning of the job) will be the new backing file.
   963  //
   964  // On successful completion the image file is updated to drop the backing file
   965  // and the BLOCK_JOB_COMPLETED event is emitted.
   966  //
   967  // In case @device is a filter node, block-stream modifies the first non-filter
   968  // overlay node below it to point to the new backing node instead of modifying
   969  // @device itself.
   970  //
   971  // Returns: - Nothing on success.
   972  // - If @device does not exist, DeviceNotFound.
   973  //
   974  // Since: 1.1
   975  //
   976  // Example: -> { "execute": "block-stream",
   977  //      "arguments": { "device": "virtio0",
   978  //                     "base": "/tmp/master.qcow2" } }
   979  // <- { "return": {} }
   980  type BlockStreamCommand struct {
   981  	JobId          *string          `json:"job-id,omitempty"`           // identifier for the newly-created block job. If omitted, the device name will be used. (Since 2.7)
   982  	Device         string           `json:"device"`                     // the device or node name of the top image
   983  	Base           *string          `json:"base,omitempty"`             // the common backing file name. It cannot be set if @base-node or @bottom is also set.
   984  	BaseNode       *string          `json:"base-node,omitempty"`        // the node name of the backing file. It cannot be set if @base or @bottom is also set. (Since 2.8)
   985  	BackingFile    *string          `json:"backing-file,omitempty"`     // The backing file string to write into the top image. This filename is not validated. If a pathname string is such that it cannot be resolved by QEMU, that means that subsequent QMP or HMP commands must use node-names for the image in question, as filename lookup methods will fail. If not specified, QEMU will automatically determine the backing file string to use, or error out if there is no obvious choice. Care should be taken when specifying the string, to specify a valid filename or protocol. (Since 2.1)
   986  	Bottom         *string          `json:"bottom,omitempty"`           // the last node in the chain that should be streamed into top. It cannot be set if @base or @base-node is also set. It cannot be filter node. (Since 6.0)
   987  	Speed          *int64           `json:"speed,omitempty"`            // the maximum speed, in bytes per second
   988  	OnError        *BlockdevOnError `json:"on-error,omitempty"`         // the action to take on an error (default report). 'stop' and 'enospc' can only be used if the block device supports io-status (see BlockInfo). Since 1.3.
   989  	FilterNodeName *string          `json:"filter-node-name,omitempty"` // the node name that should be assigned to the filter driver that the stream job inserts into the graph above @device. If this option is not given, a node name is autogenerated. (Since: 6.0)
   990  	AutoFinalize   *bool            `json:"auto-finalize,omitempty"`    // When false, this job will wait in a PENDING state after it has finished its work, waiting for @block-job-finalize before making any block graph changes. When true, this job will automatically perform its abort or commit actions. Defaults to true. (Since 3.1)
   991  	AutoDismiss    *bool            `json:"auto-dismiss,omitempty"`     // When false, this job will wait in a CONCLUDED state after it has completely ceased all work, and awaits @block-job-dismiss. When true, this job will automatically disappear from the query list without user intervention. Defaults to true. (Since 3.1)
   992  }
   993  
   994  // Set maximum speed for a background block operation.
   995  //
   996  // This command can only be issued when there is an active block job.
   997  //
   998  // Throttling can be disabled by setting the speed to 0.
   999  //
  1000  // Returns: - Nothing on success
  1001  // - If no background operation is active on this device, DeviceNotActive
  1002  //
  1003  // Since: 1.1
  1004  type BlockJobSetSpeedCommand struct {
  1005  	Device string `json:"device"` // The job identifier. This used to be a device name (hence the name of the parameter), but since QEMU 2.7 it can have other values.
  1006  	Speed  int64  `json:"speed"`  // the maximum speed, in bytes per second, or 0 for unlimited. Defaults to 0.
  1007  }
  1008  
  1009  // Stop an active background block operation.
  1010  //
  1011  // This command returns immediately after marking the active background block
  1012  // operation for cancellation.  It is an error to call this command if no
  1013  // operation is in progress.
  1014  //
  1015  // The operation will cancel as soon as possible and then emit the
  1016  // BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
  1017  // enumerated using query-block-jobs.
  1018  //
  1019  // Note that if you issue 'block-job-cancel' after 'drive-mirror' has indicated
  1020  // (via the event BLOCK_JOB_READY) that the source and destination are
  1021  // synchronized, then the event triggered by this command changes to
  1022  // BLOCK_JOB_COMPLETED, to indicate that the mirroring has ended and the
  1023  // destination now has a point-in-time copy tied to the time of the cancellation.
  1024  //
  1025  // For streaming, the image file retains its backing file unless the streaming
  1026  // operation happens to complete just as it is being cancelled.  A new streaming
  1027  // operation can be started at a later time to finish copying all data from the
  1028  // backing file.
  1029  //
  1030  // Returns: - Nothing on success
  1031  // - If no background operation is active on this device, DeviceNotActive
  1032  //
  1033  // Since: 1.1
  1034  type BlockJobCancelCommand struct {
  1035  	Device string `json:"device"`          // The job identifier. This used to be a device name (hence the name of the parameter), but since QEMU 2.7 it can have other values.
  1036  	Force  *bool  `json:"force,omitempty"` // If true, and the job has already emitted the event BLOCK_JOB_READY, abandon the job immediately (even if it is paused) instead of waiting for the destination to complete its final synchronization (since 1.3)
  1037  }
  1038  
  1039  // Pause an active background block operation.
  1040  //
  1041  // This command returns immediately after marking the active background block
  1042  // operation for pausing.  It is an error to call this command if no
  1043  // operation is in progress or if the job is already paused.
  1044  //
  1045  // The operation will pause as soon as possible.  No event is emitted when
  1046  // the operation is actually paused.  Cancelling a paused job automatically
  1047  // resumes it.
  1048  //
  1049  // Returns: - Nothing on success
  1050  // - If no background operation is active on this device, DeviceNotActive
  1051  //
  1052  // Since: 1.3
  1053  type BlockJobPauseCommand struct {
  1054  	Device string `json:"device"` // The job identifier. This used to be a device name (hence the name of the parameter), but since QEMU 2.7 it can have other values.
  1055  }
  1056  
  1057  // Resume an active background block operation.
  1058  //
  1059  // This command returns immediately after resuming a paused background block
  1060  // operation.  It is an error to call this command if no operation is in
  1061  // progress or if the job is not paused.
  1062  //
  1063  // This command also clears the error status of the job.
  1064  //
  1065  // Returns: - Nothing on success
  1066  // - If no background operation is active on this device, DeviceNotActive
  1067  //
  1068  // Since: 1.3
  1069  type BlockJobResumeCommand struct {
  1070  	Device string `json:"device"` // The job identifier. This used to be a device name (hence the name of the parameter), but since QEMU 2.7 it can have other values.
  1071  }
  1072  
  1073  // Manually trigger completion of an active background block operation.  This
  1074  // is supported for drive mirroring, where it also switches the device to
  1075  // write to the target path only.  The ability to complete is signaled with
  1076  // a BLOCK_JOB_READY event.
  1077  //
  1078  // This command completes an active background block operation synchronously.
  1079  // The ordering of this command's return with the BLOCK_JOB_COMPLETED event
  1080  // is not defined.  Note that if an I/O error occurs during the processing of
  1081  // this command: 1) the command itself will fail; 2) the error will be processed
  1082  // according to the rerror/werror arguments that were specified when starting
  1083  // the operation.
  1084  //
  1085  // A cancelled or paused job cannot be completed.
  1086  //
  1087  // Returns: - Nothing on success
  1088  // - If no background operation is active on this device, DeviceNotActive
  1089  //
  1090  // Since: 1.3
  1091  type BlockJobCompleteCommand struct {
  1092  	Device string `json:"device"` // The job identifier. This used to be a device name (hence the name of the parameter), but since QEMU 2.7 it can have other values.
  1093  }
  1094  
  1095  // For jobs that have already concluded, remove them from the block-job-query
  1096  // list. This command only needs to be run for jobs which were started with
  1097  // QEMU 2.12+ job lifetime management semantics.
  1098  //
  1099  // This command will refuse to operate on any job that has not yet reached
  1100  // its terminal state, JOB_STATUS_CONCLUDED. For jobs that make use of the
  1101  // BLOCK_JOB_READY event, block-job-cancel or block-job-complete will still need
  1102  // to be used as appropriate.
  1103  //
  1104  // Returns: Nothing on success
  1105  //
  1106  // Since: 2.12
  1107  type BlockJobDismissCommand struct {
  1108  	Id string `json:"id"` // The job identifier.
  1109  }
  1110  
  1111  // Once a job that has manual=true reaches the pending state, it can be
  1112  // instructed to finalize any graph changes and do any necessary cleanup
  1113  // via this command.
  1114  // For jobs in a transaction, instructing one job to finalize will force
  1115  // ALL jobs in the transaction to finalize, so it is only necessary to instruct
  1116  // a single member job to finalize.
  1117  //
  1118  // Returns: Nothing on success
  1119  //
  1120  // Since: 2.12
  1121  type BlockJobFinalizeCommand struct {
  1122  	Id string `json:"id"` // The job identifier.
  1123  }
  1124  
  1125  // Creates a new block device.
  1126  //
  1127  // Since: 2.9
  1128  //
  1129  // Example: 1.
  1130  // -> { "execute": "blockdev-add",
  1131  //      "arguments": {
  1132  //           "driver": "qcow2",
  1133  //           "node-name": "test1",
  1134  //           "file": {
  1135  //               "driver": "file",
  1136  //               "filename": "test.qcow2"
  1137  //            }
  1138  //       }
  1139  //     }
  1140  // <- { "return": {} }
  1141  //
  1142  // 2.
  1143  // -> { "execute": "blockdev-add",
  1144  //      "arguments": {
  1145  //           "driver": "qcow2",
  1146  //           "node-name": "node0",
  1147  //           "discard": "unmap",
  1148  //           "cache": {
  1149  //              "direct": true
  1150  //            },
  1151  //            "file": {
  1152  //              "driver": "file",
  1153  //              "filename": "/tmp/test.qcow2"
  1154  //            },
  1155  //            "backing": {
  1156  //               "driver": "raw",
  1157  //               "file": {
  1158  //                  "driver": "file",
  1159  //                  "filename": "/dev/fdset/4"
  1160  //                }
  1161  //            }
  1162  //        }
  1163  //      }
  1164  //
  1165  // <- { "return": {} }
  1166  type BlockdevAddCommand struct {
  1167  	BlockdevOptions
  1168  }
  1169  
  1170  // Reopens one or more block devices using the given set of options.
  1171  // Any option not specified will be reset to its default value regardless
  1172  // of its previous status. If an option cannot be changed or a particular
  1173  // driver does not support reopening then the command will return an
  1174  // error. All devices in the list are reopened in one transaction, so
  1175  // if one of them fails then the whole transaction is cancelled.
  1176  //
  1177  // The command receives a list of block devices to reopen. For each one
  1178  // of them, the top-level @node-name option (from BlockdevOptions) must be
  1179  // specified and is used to select the block device to be reopened.
  1180  // Other @node-name options must be either omitted or set to the
  1181  // current name of the appropriate node. This command won't change any
  1182  // node name and any attempt to do it will result in an error.
  1183  //
  1184  // In the case of options that refer to child nodes, the behavior of
  1185  // this command depends on the value:
  1186  //
  1187  //  1) A set of options (BlockdevOptions): the child is reopened with
  1188  //     the specified set of options.
  1189  //
  1190  //  2) A reference to the current child: the child is reopened using
  1191  //     its existing set of options.
  1192  //
  1193  //  3) A reference to a different node: the current child is replaced
  1194  //     with the specified one.
  1195  //
  1196  //  4) NULL: the current child (if any) is detached.
  1197  //
  1198  // Options (1) and (2) are supported in all cases. Option (3) is
  1199  // supported for @file and @backing, and option (4) for @backing only.
  1200  //
  1201  // Unlike with blockdev-add, the @backing option must always be present
  1202  // unless the node being reopened does not have a backing file and its
  1203  // image does not have a default backing file name as part of its
  1204  // metadata.
  1205  //
  1206  // Since: 6.1
  1207  type BlockdevReopenCommand struct {
  1208  	Options []BlockdevOptions `json:"options"`
  1209  }
  1210  
  1211  // Deletes a block device that has been added using blockdev-add.
  1212  // The command will fail if the node is attached to a device or is
  1213  // otherwise being used.
  1214  //
  1215  // Since: 2.9
  1216  //
  1217  // Example: -> { "execute": "blockdev-add",
  1218  //      "arguments": {
  1219  //           "driver": "qcow2",
  1220  //           "node-name": "node0",
  1221  //           "file": {
  1222  //               "driver": "file",
  1223  //               "filename": "test.qcow2"
  1224  //           }
  1225  //      }
  1226  //    }
  1227  // <- { "return": {} }
  1228  //
  1229  // -> { "execute": "blockdev-del",
  1230  //      "arguments": { "node-name": "node0" }
  1231  //    }
  1232  // <- { "return": {} }
  1233  type BlockdevDelCommand struct {
  1234  	NodeName string `json:"node-name"` // Name of the graph node to delete.
  1235  }
  1236  
  1237  // Starts a job to create an image format on a given node. The job is
  1238  // automatically finalized, but a manual job-dismiss is required.
  1239  //
  1240  // Since: 3.0
  1241  type BlockdevCreateCommand struct {
  1242  	JobId   string                `json:"job-id"`  // Identifier for the newly created job.
  1243  	Options BlockdevCreateOptions `json:"options"` // Options for the image creation.
  1244  }
  1245  
  1246  // Starts a job to amend format specific options of an existing open block device
  1247  // The job is automatically finalized, but a manual job-dismiss is required.
  1248  //
  1249  // Since: 5.1
  1250  type XBlockdevAmendCommand struct {
  1251  	JobId    string               `json:"job-id"`          // Identifier for the newly created job.
  1252  	NodeName string               `json:"node-name"`       // Name of the block node to work on
  1253  	Options  BlockdevAmendOptions `json:"options"`         // Options (driver specific)
  1254  	Force    *bool                `json:"force,omitempty"` // Allow unsafe operations, format specific For luks that allows erase of the last active keyslot (permanent loss of data), and replacement of an active keyslot (possible loss of data if IO error happens)
  1255  }
  1256  
  1257  // Change the write threshold for a block drive. An event will be
  1258  // delivered if a write to this block drive crosses the configured
  1259  // threshold.  The threshold is an offset, thus must be
  1260  // non-negative. Default is no write threshold. Setting the threshold
  1261  // to zero disables it.
  1262  //
  1263  // This is useful to transparently resize thin-provisioned drives without
  1264  // the guest OS noticing.
  1265  //
  1266  // Since: 2.3
  1267  //
  1268  // Example: -> { "execute": "block-set-write-threshold",
  1269  //      "arguments": { "node-name": "mydev",
  1270  //                     "write-threshold": 17179869184 } }
  1271  // <- { "return": {} }
  1272  type BlockSetWriteThresholdCommand struct {
  1273  	NodeName       string `json:"node-name"`       // graph node name on which the threshold must be set.
  1274  	WriteThreshold uint64 `json:"write-threshold"` // configured threshold for the block device, bytes. Use 0 to disable the threshold.
  1275  }
  1276  
  1277  // Dynamically reconfigure the block driver state graph. It can be used
  1278  // to add, remove, insert or replace a graph node. Currently only the
  1279  // Quorum driver implements this feature to add or remove its child. This
  1280  // is useful to fix a broken quorum child.
  1281  //
  1282  // If @node is specified, it will be inserted under @parent. @child
  1283  // may not be specified in this case. If both @parent and @child are
  1284  // specified but @node is not, @child will be detached from @parent.
  1285  //
  1286  // Since: 2.7
  1287  //
  1288  // Example: 1. Add a new node to a quorum
  1289  // -> { "execute": "blockdev-add",
  1290  //      "arguments": {
  1291  //          "driver": "raw",
  1292  //          "node-name": "new_node",
  1293  //          "file": { "driver": "file",
  1294  //                    "filename": "test.raw" } } }
  1295  // <- { "return": {} }
  1296  // -> { "execute": "x-blockdev-change",
  1297  //      "arguments": { "parent": "disk1",
  1298  //                     "node": "new_node" } }
  1299  // <- { "return": {} }
  1300  //
  1301  // 2. Delete a quorum's node
  1302  // -> { "execute": "x-blockdev-change",
  1303  //      "arguments": { "parent": "disk1",
  1304  //                     "child": "children.1" } }
  1305  // <- { "return": {} }
  1306  type XBlockdevChangeCommand struct {
  1307  	Parent string  `json:"parent"`          // the id or name of the parent node.
  1308  	Child  *string `json:"child,omitempty"` // the name of a child under the given parent node.
  1309  	Node   *string `json:"node,omitempty"`  // the name of the node that will be added.
  1310  }
  1311  
  1312  // Move @node and its children into the @iothread.  If @iothread is null then
  1313  // move @node and its children into the main loop.
  1314  //
  1315  // The node must not be attached to a BlockBackend.
  1316  //
  1317  // Since: 2.12
  1318  //
  1319  // Example: 1. Move a node into an IOThread
  1320  // -> { "execute": "x-blockdev-set-iothread",
  1321  //      "arguments": { "node-name": "disk1",
  1322  //                     "iothread": "iothread0" } }
  1323  // <- { "return": {} }
  1324  //
  1325  // 2. Move a node into the main loop
  1326  // -> { "execute": "x-blockdev-set-iothread",
  1327  //      "arguments": { "node-name": "disk1",
  1328  //                     "iothread": null } }
  1329  // <- { "return": {} }
  1330  type XBlockdevSetIothreadCommand struct {
  1331  	NodeName string    `json:"node-name"`       // the name of the block driver node
  1332  	Iothread StrOrNull `json:"iothread"`        // the name of the IOThread object or null for the main loop
  1333  	Force    *bool     `json:"force,omitempty"` // true if the node and its children should be moved when a BlockBackend is already attached
  1334  }
  1335  
  1336  // Synchronously take an internal snapshot of a block device, when the
  1337  // format of the image used supports it. If the name is an empty
  1338  // string, or a snapshot with name already exists, the operation will
  1339  // fail.
  1340  //
  1341  // For the arguments, see the documentation of BlockdevSnapshotInternal.
  1342  //
  1343  // Returns: - nothing on success
  1344  // - If @device is not a valid block device, GenericError
  1345  // - If any snapshot matching @name exists, or @name is empty,
  1346  //   GenericError
  1347  // - If the format of the image used does not support it,
  1348  //   BlockFormatFeatureNotSupported
  1349  //
  1350  // Since: 1.7
  1351  //
  1352  // Example: -> { "execute": "blockdev-snapshot-internal-sync",
  1353  //      "arguments": { "device": "ide-hd0",
  1354  //                     "name": "snapshot0" }
  1355  //    }
  1356  // <- { "return": {} }
  1357  type BlockdevSnapshotInternalSyncCommand struct {
  1358  	BlockdevSnapshotInternal
  1359  }
  1360  
  1361  // Synchronously delete an internal snapshot of a block device, when the format
  1362  // of the image used support it. The snapshot is identified by name or id or
  1363  // both. One of the name or id is required. Return SnapshotInfo for the
  1364  // successfully deleted snapshot.
  1365  //
  1366  // Returns: - SnapshotInfo on success
  1367  // - If @device is not a valid block device, GenericError
  1368  // - If snapshot not found, GenericError
  1369  // - If the format of the image used does not support it,
  1370  //   BlockFormatFeatureNotSupported
  1371  // - If @id and @name are both not specified, GenericError
  1372  //
  1373  // Since: 1.7
  1374  //
  1375  // Example: -> { "execute": "blockdev-snapshot-delete-internal-sync",
  1376  //      "arguments": { "device": "ide-hd0",
  1377  //                     "name": "snapshot0" }
  1378  //    }
  1379  // <- { "return": {
  1380  //                    "id": "1",
  1381  //                    "name": "snapshot0",
  1382  //                    "vm-state-size": 0,
  1383  //                    "date-sec": 1000012,
  1384  //                    "date-nsec": 10,
  1385  //                    "vm-clock-sec": 100,
  1386  //                    "vm-clock-nsec": 20,
  1387  //                    "icount": 220414
  1388  //      }
  1389  //    }
  1390  type BlockdevSnapshotDeleteInternalSyncCommand struct {
  1391  	Device string  `json:"device"`         // the device name or node-name of a root node to delete the snapshot from
  1392  	Id     *string `json:"id,omitempty"`   // optional the snapshot's ID to be deleted
  1393  	Name   *string `json:"name,omitempty"` // optional the snapshot's name to be deleted
  1394  }
  1395  
  1396  // Pause an active job.
  1397  //
  1398  // This command returns immediately after marking the active job for pausing.
  1399  // Pausing an already paused job is an error.
  1400  //
  1401  // The job will pause as soon as possible, which means transitioning into the
  1402  // PAUSED state if it was RUNNING, or into STANDBY if it was READY. The
  1403  // corresponding JOB_STATUS_CHANGE event will be emitted.
  1404  //
  1405  // Cancelling a paused job automatically resumes it.
  1406  //
  1407  // Since: 3.0
  1408  type JobPauseCommand struct {
  1409  	Id string `json:"id"` // The job identifier.
  1410  }
  1411  
  1412  // Resume a paused job.
  1413  //
  1414  // This command returns immediately after resuming a paused job. Resuming an
  1415  // already running job is an error.
  1416  //
  1417  // @id : The job identifier.
  1418  //
  1419  // Since: 3.0
  1420  type JobResumeCommand struct {
  1421  	Id string `json:"id"`
  1422  }
  1423  
  1424  // Instruct an active background job to cancel at the next opportunity.
  1425  // This command returns immediately after marking the active job for
  1426  // cancellation.
  1427  //
  1428  // The job will cancel as soon as possible and then emit a JOB_STATUS_CHANGE
  1429  // event. Usually, the status will change to ABORTING, but it is possible that
  1430  // a job successfully completes (e.g. because it was almost done and there was
  1431  // no opportunity to cancel earlier than completing the job) and transitions to
  1432  // PENDING instead.
  1433  //
  1434  // Since: 3.0
  1435  type JobCancelCommand struct {
  1436  	Id string `json:"id"` // The job identifier.
  1437  }
  1438  
  1439  // Manually trigger completion of an active job in the READY state.
  1440  //
  1441  // Since: 3.0
  1442  type JobCompleteCommand struct {
  1443  	Id string `json:"id"` // The job identifier.
  1444  }
  1445  
  1446  // Deletes a job that is in the CONCLUDED state. This command only needs to be
  1447  // run explicitly for jobs that don't have automatic dismiss enabled.
  1448  //
  1449  // This command will refuse to operate on any job that has not yet reached its
  1450  // terminal state, JOB_STATUS_CONCLUDED. For jobs that make use of JOB_READY
  1451  // event, job-cancel or job-complete will still need to be used as appropriate.
  1452  //
  1453  // Since: 3.0
  1454  type JobDismissCommand struct {
  1455  	Id string `json:"id"` // The job identifier.
  1456  }
  1457  
  1458  // Instructs all jobs in a transaction (or a single job if it is not part of any
  1459  // transaction) to finalize any graph changes and do any necessary cleanup. This
  1460  // command requires that all involved jobs are in the PENDING state.
  1461  //
  1462  // For jobs in a transaction, instructing one job to finalize will force
  1463  // ALL jobs in the transaction to finalize, so it is only necessary to instruct
  1464  // a single member job to finalize.
  1465  //
  1466  // Since: 3.0
  1467  type JobFinalizeCommand struct {
  1468  	Id string `json:"id"` // The identifier of any job in the transaction, or of a job that is not part of any transaction.
  1469  }
  1470  
  1471  // Return information about jobs.
  1472  //
  1473  // Returns: a list with a @JobInfo for each active job
  1474  //
  1475  // Since: 3.0
  1476  type QueryJobsCommand struct{}
  1477  
  1478  // Start an NBD server listening on the given host and port.  Block
  1479  // devices can then be exported using @nbd-server-add.  The NBD
  1480  // server will present them as named exports; for example, another
  1481  // QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
  1482  //
  1483  // Keep this type consistent with the NbdServerOptions type. The only intended
  1484  // difference is using SocketAddressLegacy instead of SocketAddress.
  1485  //
  1486  // Returns: error if the server is already running.
  1487  //
  1488  // Since: 1.3
  1489  type NbdServerStartCommand struct {
  1490  	Addr           SocketAddressLegacy `json:"addr"`                      // Address on which to listen.
  1491  	TlsCreds       *string             `json:"tls-creds,omitempty"`       // ID of the TLS credentials object (since 2.6).
  1492  	TlsAuthz       *string             `json:"tls-authz,omitempty"`       // ID of the QAuthZ authorization object used to validate the client's x509 distinguished name. This object is is only resolved at time of use, so can be deleted and recreated on the fly while the NBD server is active. If missing, it will default to denying access (since 4.0).
  1493  	MaxConnections *uint32             `json:"max-connections,omitempty"` // The maximum number of connections to allow at the same time, 0 for unlimited. (since 5.2; default: 0)
  1494  }
  1495  
  1496  // Export a block node to QEMU's embedded NBD server.
  1497  //
  1498  // The export name will be used as the id for the resulting block export.
  1499  //
  1500  // Returns: error if the server is not running, or export with the same name
  1501  // already exists.
  1502  //
  1503  // Since: 1.3
  1504  type NbdServerAddCommand struct {
  1505  	NbdServerAddOptions
  1506  }
  1507  
  1508  // Remove NBD export by name.
  1509  //
  1510  // Returns: error if
  1511  //   - the server is not running
  1512  //   - export is not found
  1513  //   - mode is 'safe' and there are existing connections
  1514  //
  1515  // Since: 2.12
  1516  type NbdServerRemoveCommand struct {
  1517  	Name string                 `json:"name"`           // Block export id.
  1518  	Mode *BlockExportRemoveMode `json:"mode,omitempty"` // Mode of command operation. See @BlockExportRemoveMode description. Default is 'safe'.
  1519  }
  1520  
  1521  // Stop QEMU's embedded NBD server, and unregister all devices previously
  1522  // added via @nbd-server-add.
  1523  //
  1524  // Since: 1.3
  1525  type NbdServerStopCommand struct{}
  1526  
  1527  // Creates a new block export.
  1528  //
  1529  // Since: 5.2
  1530  type BlockExportAddCommand struct {
  1531  	BlockExportOptions
  1532  }
  1533  
  1534  // Request to remove a block export. This drops the user's reference to the
  1535  // export, but the export may still stay around after this command returns until
  1536  // the shutdown of the export has completed.
  1537  //
  1538  // Returns: Error if the export is not found or @mode is 'safe' and the export
  1539  // is still in use (e.g. by existing client connections)
  1540  //
  1541  // Since: 5.2
  1542  type BlockExportDelCommand struct {
  1543  	Id   string                 `json:"id"`             // Block export id.
  1544  	Mode *BlockExportRemoveMode `json:"mode,omitempty"` // Mode of command operation. See @BlockExportRemoveMode description. Default is 'safe'.
  1545  }
  1546  
  1547  // Returns: A list of BlockExportInfo describing all block exports
  1548  //
  1549  // Since: 5.2
  1550  type QueryBlockExportsCommand struct{}
  1551  
  1552  // Returns information about current character devices.
  1553  //
  1554  // Returns: a list of @ChardevInfo
  1555  //
  1556  // Since: 0.14
  1557  //
  1558  // Example: -> { "execute": "query-chardev" }
  1559  // <- {
  1560  //       "return": [
  1561  //          {
  1562  //             "label": "charchannel0",
  1563  //             "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server=on",
  1564  //             "frontend-open": false
  1565  //          },
  1566  //          {
  1567  //             "label": "charmonitor",
  1568  //             "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server=on",
  1569  //             "frontend-open": true
  1570  //          },
  1571  //          {
  1572  //             "label": "charserial0",
  1573  //             "filename": "pty:/dev/pts/2",
  1574  //             "frontend-open": true
  1575  //          }
  1576  //       ]
  1577  //    }
  1578  type QueryChardevCommand struct{}
  1579  
  1580  // Returns information about character device backends.
  1581  //
  1582  // Returns: a list of @ChardevBackendInfo
  1583  //
  1584  // Since: 2.0
  1585  //
  1586  // Example: -> { "execute": "query-chardev-backends" }
  1587  // <- {
  1588  //       "return":[
  1589  //          {
  1590  //             "name":"udp"
  1591  //          },
  1592  //          {
  1593  //             "name":"tcp"
  1594  //          },
  1595  //          {
  1596  //             "name":"unix"
  1597  //          },
  1598  //          {
  1599  //             "name":"spiceport"
  1600  //          }
  1601  //       ]
  1602  //    }
  1603  type QueryChardevBackendsCommand struct{}
  1604  
  1605  // Write to a ring buffer character device.
  1606  //
  1607  // Returns: Nothing on success
  1608  //
  1609  // Since: 1.4
  1610  //
  1611  // Example: -> { "execute": "ringbuf-write",
  1612  //      "arguments": { "device": "foo",
  1613  //                     "data": "abcdefgh",
  1614  //                     "format": "utf8" } }
  1615  // <- { "return": {} }
  1616  type RingbufWriteCommand struct {
  1617  	Device string      `json:"device"`           // the ring buffer character device name
  1618  	Data   string      `json:"data"`             // data to write
  1619  	Format *DataFormat `json:"format,omitempty"` // data encoding (default 'utf8'). - base64: data must be base64 encoded text. Its binary decoding gets written. - utf8: data's UTF-8 encoding is written - data itself is always Unicode regardless of format, like any other string.
  1620  }
  1621  
  1622  // Read from a ring buffer character device.
  1623  //
  1624  // Returns: data read from the device
  1625  //
  1626  // Since: 1.4
  1627  //
  1628  // Example: -> { "execute": "ringbuf-read",
  1629  //      "arguments": { "device": "foo",
  1630  //                     "size": 1000,
  1631  //                     "format": "utf8" } }
  1632  // <- { "return": "abcdefgh" }
  1633  type RingbufReadCommand struct {
  1634  	Device string      `json:"device"`           // the ring buffer character device name
  1635  	Size   int64       `json:"size"`             // how many bytes to read at most
  1636  	Format *DataFormat `json:"format,omitempty"` // data encoding (default 'utf8'). - base64: the data read is returned in base64 encoding. - utf8: the data read is interpreted as UTF-8. Bug: can screw up when the buffer contains invalid UTF-8 sequences, NUL characters, after the ring buffer lost data, and when reading stops because the size limit is reached. - The return value is always Unicode regardless of format, like any other string.
  1637  }
  1638  
  1639  // Add a character device backend
  1640  //
  1641  // Returns: ChardevReturn.
  1642  //
  1643  // Since: 1.4
  1644  //
  1645  // Example: -> { "execute" : "chardev-add",
  1646  //      "arguments" : { "id" : "foo",
  1647  //                      "backend" : { "type" : "null", "data" : {} } } }
  1648  // <- { "return": {} }
  1649  //
  1650  // -> { "execute" : "chardev-add",
  1651  //      "arguments" : { "id" : "bar",
  1652  //                      "backend" : { "type" : "file",
  1653  //                                    "data" : { "out" : "/tmp/bar.log" } } } }
  1654  // <- { "return": {} }
  1655  //
  1656  // -> { "execute" : "chardev-add",
  1657  //      "arguments" : { "id" : "baz",
  1658  //                      "backend" : { "type" : "pty", "data" : {} } } }
  1659  // <- { "return": { "pty" : "/dev/pty/42" } }
  1660  type ChardevAddCommand struct {
  1661  	Id      string         `json:"id"`      // the chardev's ID, must be unique
  1662  	Backend ChardevBackend `json:"backend"` // backend type and parameters
  1663  }
  1664  
  1665  // Change a character device backend
  1666  //
  1667  // Returns: ChardevReturn.
  1668  //
  1669  // Since: 2.10
  1670  //
  1671  // Example: -> { "execute" : "chardev-change",
  1672  //      "arguments" : { "id" : "baz",
  1673  //                      "backend" : { "type" : "pty", "data" : {} } } }
  1674  // <- { "return": { "pty" : "/dev/pty/42" } }
  1675  //
  1676  // -> {"execute" : "chardev-change",
  1677  //     "arguments" : {
  1678  //         "id" : "charchannel2",
  1679  //         "backend" : {
  1680  //             "type" : "socket",
  1681  //             "data" : {
  1682  //                 "addr" : {
  1683  //                     "type" : "unix" ,
  1684  //                     "data" : {
  1685  //                         "path" : "/tmp/charchannel2.socket"
  1686  //                     }
  1687  //                  },
  1688  //                  "server" : true,
  1689  //                  "wait" : false }}}}
  1690  // <- {"return": {}}
  1691  type ChardevChangeCommand struct {
  1692  	Id      string         `json:"id"`      // the chardev's ID, must exist
  1693  	Backend ChardevBackend `json:"backend"` // new backend type and parameters
  1694  }
  1695  
  1696  // Remove a character device backend
  1697  //
  1698  // Returns: Nothing on success
  1699  //
  1700  // Since: 1.4
  1701  //
  1702  // Example: -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
  1703  // <- { "return": {} }
  1704  type ChardevRemoveCommand struct {
  1705  	Id string `json:"id"` // the chardev's ID, must exist and not be in use
  1706  }
  1707  
  1708  // Send a break to a character device
  1709  //
  1710  // Returns: Nothing on success
  1711  //
  1712  // Since: 2.10
  1713  //
  1714  // Example: -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } }
  1715  // <- { "return": {} }
  1716  type ChardevSendBreakCommand struct {
  1717  	Id string `json:"id"` // the chardev's ID, must exist
  1718  }
  1719  
  1720  // Dump guest's memory to vmcore. It is a synchronous operation that can take
  1721  // very long depending on the amount of guest memory.
  1722  //
  1723  // Note: All boolean arguments default to false
  1724  //
  1725  // Returns: nothing on success
  1726  //
  1727  // Since: 1.2
  1728  //
  1729  // Example: -> { "execute": "dump-guest-memory",
  1730  //      "arguments": { "protocol": "fd:dump" } }
  1731  // <- { "return": {} }
  1732  type DumpGuestMemoryCommand struct {
  1733  	Paging   bool                   `json:"paging"`           // if true, do paging to get guest's memory mapping. This allows using gdb to process the core file. IMPORTANT: this option can make QEMU allocate several gigabytes of RAM. This can happen for a large guest, or a malicious guest pretending to be large. Also, paging=true has the following limitations: 1. The guest may be in a catastrophic state or can have corrupted memory, which cannot be trusted 2. The guest can be in real-mode even if paging is enabled. For example, the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode 3. Currently only supported on i386 and x86_64.
  1734  	Protocol string                 `json:"protocol"`         // the filename or file descriptor of the vmcore. The supported protocols are: 1. file: the protocol starts with "file:", and the following string is the file's path. 2. fd: the protocol starts with "fd:", and the following string is the fd's name.
  1735  	Detach   *bool                  `json:"detach,omitempty"` // if true, QMP will return immediately rather than waiting for the dump to finish. The user can track progress using "query-dump". (since 2.6).
  1736  	Begin    *int64                 `json:"begin,omitempty"`  // if specified, the starting physical address.
  1737  	Length   *int64                 `json:"length,omitempty"` // if specified, the memory size, in bytes. If you don't want to dump all guest's memory, please specify the start @begin and @length
  1738  	Format   *DumpGuestMemoryFormat `json:"format,omitempty"` // if specified, the format of guest memory dump. But non-elf format is conflict with paging and filter, ie. @paging, @begin and @length is not allowed to be specified with non-elf @format at the same time (since 2.0)
  1739  }
  1740  
  1741  // Query latest dump status.
  1742  //
  1743  // Returns: A @DumpStatus object showing the dump status.
  1744  //
  1745  // Since: 2.6
  1746  //
  1747  // Example: -> { "execute": "query-dump" }
  1748  // <- { "return": { "status": "active", "completed": 1024000,
  1749  //                  "total": 2048000 } }
  1750  type QueryDumpCommand struct{}
  1751  
  1752  // Returns the available formats for dump-guest-memory
  1753  //
  1754  // Returns: A @DumpGuestMemoryCapability object listing available formats for
  1755  // dump-guest-memory
  1756  //
  1757  // Since: 2.0
  1758  //
  1759  // Example: -> { "execute": "query-dump-guest-memory-capability" }
  1760  // <- { "return": { "formats":
  1761  //                  ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
  1762  type QueryDumpGuestMemoryCapabilityCommand struct{}
  1763  
  1764  // Sets the link status of a virtual network adapter.
  1765  //
  1766  // Returns: Nothing on success
  1767  // If @name is not a valid network device, DeviceNotFound
  1768  //
  1769  // Since: 0.14
  1770  //
  1771  // Notes: Not all network adapters support setting link status.  This command
  1772  // will succeed even if the network adapter does not support link status
  1773  // notification.
  1774  //
  1775  // Example: -> { "execute": "set_link",
  1776  //      "arguments": { "name": "e1000.0", "up": false } }
  1777  // <- { "return": {} }
  1778  type SetLinkCommand struct {
  1779  	Name string `json:"name"` // the device name of the virtual network adapter
  1780  	Up   bool   `json:"up"`   // true to set the link status to be up
  1781  }
  1782  
  1783  // Add a network backend.
  1784  //
  1785  // Additional arguments depend on the type.
  1786  //
  1787  // Since: 0.14
  1788  //
  1789  // Returns: Nothing on success
  1790  // If @type is not a valid network backend, DeviceNotFound
  1791  //
  1792  // Example: -> { "execute": "netdev_add",
  1793  //      "arguments": { "type": "user", "id": "netdev1",
  1794  //                     "dnssearch": "example.org" } }
  1795  // <- { "return": {} }
  1796  type NetdevAddCommand struct {
  1797  	Netdev
  1798  }
  1799  
  1800  // Remove a network backend.
  1801  //
  1802  // Returns: Nothing on success
  1803  // If @id is not a valid network backend, DeviceNotFound
  1804  //
  1805  // Since: 0.14
  1806  //
  1807  // Example: -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
  1808  // <- { "return": {} }
  1809  type NetdevDelCommand struct {
  1810  	Id string `json:"id"` // the name of the network backend to remove
  1811  }
  1812  
  1813  // Return rx-filter information for all NICs (or for the given NIC).
  1814  //
  1815  // Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
  1816  // Returns an error if the given @name doesn't exist, or given
  1817  // NIC doesn't support rx-filter querying, or given net client
  1818  // isn't a NIC.
  1819  //
  1820  // Since: 1.6
  1821  //
  1822  // Example: -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
  1823  // <- { "return": [
  1824  //         {
  1825  //             "promiscuous": true,
  1826  //             "name": "vnet0",
  1827  //             "main-mac": "52:54:00:12:34:56",
  1828  //             "unicast": "normal",
  1829  //             "vlan": "normal",
  1830  //             "vlan-table": [
  1831  //                 4,
  1832  //                 0
  1833  //             ],
  1834  //             "unicast-table": [
  1835  //             ],
  1836  //             "multicast": "normal",
  1837  //             "multicast-overflow": false,
  1838  //             "unicast-overflow": false,
  1839  //             "multicast-table": [
  1840  //                 "01:00:5e:00:00:01",
  1841  //                 "33:33:00:00:00:01",
  1842  //                 "33:33:ff:12:34:56"
  1843  //             ],
  1844  //             "broadcast-allowed": false
  1845  //         }
  1846  //       ]
  1847  //    }
  1848  type QueryRxFilterCommand struct {
  1849  	Name *string `json:"name,omitempty"` // net client name
  1850  }
  1851  
  1852  // Trigger generation of broadcast RARP frames to update network switches.
  1853  // This can be useful when network bonds fail-over the active slave.
  1854  //
  1855  // Example: -> { "execute": "announce-self",
  1856  //      "arguments": {
  1857  //          "initial": 50, "max": 550, "rounds": 10, "step": 50,
  1858  //          "interfaces": ["vn2", "vn3"], "id": "bob" } }
  1859  // <- { "return": {} }
  1860  //
  1861  // Since: 4.0
  1862  type AnnounceSelfCommand struct {
  1863  	AnnounceParameters
  1864  }
  1865  
  1866  // Return rocker switch information.
  1867  //
  1868  // Returns: @Rocker information
  1869  //
  1870  // Since: 2.4
  1871  //
  1872  // Example: -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
  1873  // <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
  1874  type QueryRockerCommand struct {
  1875  	Name string `json:"name"`
  1876  }
  1877  
  1878  // Return rocker switch port information.
  1879  //
  1880  // Returns: a list of @RockerPort information
  1881  //
  1882  // Since: 2.4
  1883  //
  1884  // Example: -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
  1885  // <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
  1886  //                   "autoneg": "off", "link-up": true, "speed": 10000},
  1887  //                  {"duplex": "full", "enabled": true, "name": "sw1.2",
  1888  //                   "autoneg": "off", "link-up": true, "speed": 10000}
  1889  //    ]}
  1890  type QueryRockerPortsCommand struct {
  1891  	Name string `json:"name"`
  1892  }
  1893  
  1894  // Return rocker OF-DPA flow information.
  1895  //
  1896  // Returns: rocker OF-DPA flow information
  1897  //
  1898  // Since: 2.4
  1899  //
  1900  // Example: -> { "execute": "query-rocker-of-dpa-flows",
  1901  //      "arguments": { "name": "sw1" } }
  1902  // <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
  1903  //                   "hits": 138,
  1904  //                   "cookie": 0,
  1905  //                   "action": {"goto-tbl": 10},
  1906  //                   "mask": {"in-pport": 4294901760}
  1907  //                  },
  1908  //                  {...more...},
  1909  //    ]}
  1910  type QueryRockerOfDpaFlowsCommand struct {
  1911  	Name  string  `json:"name"`             // switch name
  1912  	TblId *uint32 `json:"tbl-id,omitempty"` // flow table ID. If tbl-id is not specified, returns flow information for all tables.
  1913  }
  1914  
  1915  // Return rocker OF-DPA group information.
  1916  //
  1917  // Returns: rocker OF-DPA group information
  1918  //
  1919  // Since: 2.4
  1920  //
  1921  // Example: -> { "execute": "query-rocker-of-dpa-groups",
  1922  //      "arguments": { "name": "sw1" } }
  1923  // <- { "return": [ {"type": 0, "out-pport": 2,
  1924  //                   "pport": 2, "vlan-id": 3841,
  1925  //                   "pop-vlan": 1, "id": 251723778},
  1926  //                  {"type": 0, "out-pport": 0,
  1927  //                   "pport": 0, "vlan-id": 3841,
  1928  //                   "pop-vlan": 1, "id": 251723776},
  1929  //                  {"type": 0, "out-pport": 1,
  1930  //                   "pport": 1, "vlan-id": 3840,
  1931  //                   "pop-vlan": 1, "id": 251658241},
  1932  //                  {"type": 0, "out-pport": 0,
  1933  //                   "pport": 0, "vlan-id": 3840,
  1934  //                   "pop-vlan": 1, "id": 251658240}
  1935  //    ]}
  1936  type QueryRockerOfDpaGroupsCommand struct {
  1937  	Name string `json:"name"`           // switch name
  1938  	Type *uint8 `json:"type,omitempty"` // group type. If type is not specified, returns group information for all group types.
  1939  }
  1940  
  1941  // Return a list of supported TPM models
  1942  //
  1943  // Returns: a list of TpmModel
  1944  //
  1945  // Since: 1.5
  1946  //
  1947  // Example: -> { "execute": "query-tpm-models" }
  1948  // <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
  1949  type QueryTpmModelsCommand struct{}
  1950  
  1951  // Return a list of supported TPM types
  1952  //
  1953  // Returns: a list of TpmType
  1954  //
  1955  // Since: 1.5
  1956  //
  1957  // Example: -> { "execute": "query-tpm-types" }
  1958  // <- { "return": [ "passthrough", "emulator" ] }
  1959  type QueryTpmTypesCommand struct{}
  1960  
  1961  // Return information about the TPM device
  1962  //
  1963  // Returns: @TPMInfo on success
  1964  //
  1965  // Since: 1.5
  1966  //
  1967  // Example: -> { "execute": "query-tpm" }
  1968  // <- { "return":
  1969  //      [
  1970  //        { "model": "tpm-tis",
  1971  //          "options":
  1972  //            { "type": "passthrough",
  1973  //              "data":
  1974  //                { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
  1975  //                  "path": "/dev/tpm0"
  1976  //                }
  1977  //            },
  1978  //          "id": "tpm0"
  1979  //        }
  1980  //      ]
  1981  //    }
  1982  type QueryTpmCommand struct{}
  1983  
  1984  // Set the password of a remote display server.
  1985  //
  1986  // Returns: - Nothing on success
  1987  // - If Spice is not enabled, DeviceNotFound
  1988  //
  1989  // Since: 0.14
  1990  //
  1991  // Example: -> { "execute": "set_password", "arguments": { "protocol": "vnc",
  1992  //                                                "password": "secret" } }
  1993  // <- { "return": {} }
  1994  type SetPasswordCommand struct {
  1995  	SetPasswordOptions
  1996  }
  1997  
  1998  // Expire the password of a remote display server.
  1999  //
  2000  // Returns: - Nothing on success
  2001  // - If @protocol is 'spice' and Spice is not active, DeviceNotFound
  2002  //
  2003  // Since: 0.14
  2004  //
  2005  // Example: -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
  2006  //                                                   "time": "+60" } }
  2007  // <- { "return": {} }
  2008  type ExpirePasswordCommand struct {
  2009  	ExpirePasswordOptions
  2010  }
  2011  
  2012  // Write a PPM of the VGA screen to a file.
  2013  //
  2014  // Returns: Nothing on success
  2015  //
  2016  // Since: 0.14
  2017  //
  2018  // Example: -> { "execute": "screendump",
  2019  //      "arguments": { "filename": "/tmp/image" } }
  2020  // <- { "return": {} }
  2021  type ScreendumpCommand struct {
  2022  	Filename string  `json:"filename"`         // the path of a new PPM file to store the image
  2023  	Device   *string `json:"device,omitempty"` // ID of the display device that should be dumped. If this parameter is missing, the primary display will be used. (Since 2.12)
  2024  	Head     *int64  `json:"head,omitempty"`   // head to use in case the device supports multiple heads. If this parameter is missing, head #0 will be used. Also note that the head can only be specified in conjunction with the device ID. (Since 2.12)
  2025  }
  2026  
  2027  // Returns information about the current SPICE server
  2028  //
  2029  // Returns: @SpiceInfo
  2030  //
  2031  // Since: 0.14
  2032  //
  2033  // Example: -> { "execute": "query-spice" }
  2034  // <- { "return": {
  2035  //          "enabled": true,
  2036  //          "auth": "spice",
  2037  //          "port": 5920,
  2038  //          "tls-port": 5921,
  2039  //          "host": "0.0.0.0",
  2040  //          "channels": [
  2041  //             {
  2042  //                "port": "54924",
  2043  //                "family": "ipv4",
  2044  //                "channel-type": 1,
  2045  //                "connection-id": 1804289383,
  2046  //                "host": "127.0.0.1",
  2047  //                "channel-id": 0,
  2048  //                "tls": true
  2049  //             },
  2050  //             {
  2051  //                "port": "36710",
  2052  //                "family": "ipv4",
  2053  //                "channel-type": 4,
  2054  //                "connection-id": 1804289383,
  2055  //                "host": "127.0.0.1",
  2056  //                "channel-id": 0,
  2057  //                "tls": false
  2058  //             },
  2059  //             [ ... more channels follow ... ]
  2060  //          ]
  2061  //       }
  2062  //    }
  2063  type QuerySpiceCommand struct{}
  2064  
  2065  // Returns information about the current VNC server
  2066  //
  2067  // Returns: @VncInfo
  2068  //
  2069  // Since: 0.14
  2070  //
  2071  // Example: -> { "execute": "query-vnc" }
  2072  // <- { "return": {
  2073  //          "enabled":true,
  2074  //          "host":"0.0.0.0",
  2075  //          "service":"50402",
  2076  //          "auth":"vnc",
  2077  //          "family":"ipv4",
  2078  //          "clients":[
  2079  //             {
  2080  //                "host":"127.0.0.1",
  2081  //                "service":"50401",
  2082  //                "family":"ipv4"
  2083  //             }
  2084  //          ]
  2085  //       }
  2086  //    }
  2087  type QueryVncCommand struct{}
  2088  
  2089  // Returns a list of vnc servers.  The list can be empty.
  2090  //
  2091  // Returns: a list of @VncInfo2
  2092  //
  2093  // Since: 2.3
  2094  type QueryVncServersCommand struct{}
  2095  
  2096  // Change the VNC server password.
  2097  //
  2098  // Since: 1.1
  2099  //
  2100  // Notes: An empty password in this command will set the password to the empty
  2101  // string.  Existing clients are unaffected by executing this command.
  2102  type ChangeVncPasswordCommand struct {
  2103  	Password string `json:"password"` // the new password to use with VNC authentication
  2104  }
  2105  
  2106  // Returns information about each active mouse device
  2107  //
  2108  // Returns: a list of @MouseInfo for each device
  2109  //
  2110  // Since: 0.14
  2111  //
  2112  // Example: -> { "execute": "query-mice" }
  2113  // <- { "return": [
  2114  //          {
  2115  //             "name":"QEMU Microsoft Mouse",
  2116  //             "index":0,
  2117  //             "current":false,
  2118  //             "absolute":false
  2119  //          },
  2120  //          {
  2121  //             "name":"QEMU PS/2 Mouse",
  2122  //             "index":1,
  2123  //             "current":true,
  2124  //             "absolute":true
  2125  //          }
  2126  //       ]
  2127  //    }
  2128  type QueryMiceCommand struct{}
  2129  
  2130  // Send keys to guest.
  2131  //
  2132  // Returns: - Nothing on success
  2133  // - If key is unknown or redundant, InvalidParameter
  2134  //
  2135  // Since: 1.3
  2136  //
  2137  // Example: -> { "execute": "send-key",
  2138  //      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
  2139  //                               { "type": "qcode", "data": "alt" },
  2140  //                               { "type": "qcode", "data": "delete" } ] } }
  2141  // <- { "return": {} }
  2142  type SendKeyCommand struct {
  2143  	Keys     []KeyValue `json:"keys"`                // An array of @KeyValue elements. All @KeyValues in this array are simultaneously sent to the guest. A @KeyValue.number value is sent directly to the guest, while @KeyValue.qcode must be a valid @QKeyCode value
  2144  	HoldTime *int64     `json:"hold-time,omitempty"` // time to delay key up events, milliseconds. Defaults to 100
  2145  }
  2146  
  2147  // Send input event(s) to guest.
  2148  //
  2149  // The @device and @head parameters can be used to send the input event
  2150  // to specific input devices in case (a) multiple input devices of the
  2151  // same kind are added to the virtual machine and (b) you have
  2152  // configured input routing (see docs/multiseat.txt) for those input
  2153  // devices.  The parameters work exactly like the device and head
  2154  // properties of input devices.  If @device is missing, only devices
  2155  // that have no input routing config are admissible.  If @device is
  2156  // specified, both input devices with and without input routing config
  2157  // are admissible, but devices with input routing config take
  2158  // precedence.
  2159  //
  2160  // Returns: Nothing on success.
  2161  //
  2162  // Since: 2.6
  2163  //
  2164  // Note: The consoles are visible in the qom tree, under
  2165  // /backend/console[$index]. They have a device link and head property,
  2166  // so it is possible to map which console belongs to which device and
  2167  // display.
  2168  //
  2169  // Example: 1. Press left mouse button.
  2170  //
  2171  // -> { "execute": "input-send-event",
  2172  //     "arguments": { "device": "video0",
  2173  //                    "events": [ { "type": "btn",
  2174  //                    "data" : { "down": true, "button": "left" } } ] } }
  2175  // <- { "return": {} }
  2176  //
  2177  // -> { "execute": "input-send-event",
  2178  //     "arguments": { "device": "video0",
  2179  //                    "events": [ { "type": "btn",
  2180  //                    "data" : { "down": false, "button": "left" } } ] } }
  2181  // <- { "return": {} }
  2182  //
  2183  // 2. Press ctrl-alt-del.
  2184  //
  2185  // -> { "execute": "input-send-event",
  2186  //      "arguments": { "events": [
  2187  //         { "type": "key", "data" : { "down": true,
  2188  //           "key": {"type": "qcode", "data": "ctrl" } } },
  2189  //         { "type": "key", "data" : { "down": true,
  2190  //           "key": {"type": "qcode", "data": "alt" } } },
  2191  //         { "type": "key", "data" : { "down": true,
  2192  //           "key": {"type": "qcode", "data": "delete" } } } ] } }
  2193  // <- { "return": {} }
  2194  //
  2195  // 3. Move mouse pointer to absolute coordinates (20000, 400).
  2196  //
  2197  // -> { "execute": "input-send-event" ,
  2198  //   "arguments": { "events": [
  2199  //                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
  2200  //                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
  2201  // <- { "return": {} }
  2202  type InputSendEventCommand struct {
  2203  	Device *string      `json:"device,omitempty"` // display device to send event(s) to.
  2204  	Head   *int64       `json:"head,omitempty"`   // head to send event(s) to, in case the display device supports multiple scanouts.
  2205  	Events []InputEvent `json:"events"`           // List of InputEvent union.
  2206  }
  2207  
  2208  // Returns information about display configuration
  2209  //
  2210  // Returns: @DisplayOptions
  2211  //
  2212  // Since: 3.1
  2213  type QueryDisplayOptionsCommand struct{}
  2214  
  2215  // Reload display configuration.
  2216  //
  2217  // Returns: Nothing on success.
  2218  //
  2219  // Since: 6.0
  2220  //
  2221  // Example: -> { "execute": "display-reload",
  2222  //      "arguments": { "type": "vnc", "tls-certs": true  } }
  2223  // <- { "return": {} }
  2224  type DisplayReloadCommand struct {
  2225  	DisplayReloadOptions
  2226  }
  2227  
  2228  // Returns information about current migration process. If migration
  2229  // is active there will be another json-object with RAM migration
  2230  // status and if block migration is active another one with block
  2231  // migration status.
  2232  //
  2233  // Returns: @MigrationInfo
  2234  //
  2235  // Since: 0.14
  2236  //
  2237  // Example: 1. Before the first migration
  2238  //
  2239  // -> { "execute": "query-migrate" }
  2240  // <- { "return": {} }
  2241  //
  2242  // 2. Migration is done and has succeeded
  2243  //
  2244  // -> { "execute": "query-migrate" }
  2245  // <- { "return": {
  2246  //         "status": "completed",
  2247  //         "total-time":12345,
  2248  //         "setup-time":12345,
  2249  //         "downtime":12345,
  2250  //         "ram":{
  2251  //           "transferred":123,
  2252  //           "remaining":123,
  2253  //           "total":246,
  2254  //           "duplicate":123,
  2255  //           "normal":123,
  2256  //           "normal-bytes":123456,
  2257  //           "dirty-sync-count":15
  2258  //         }
  2259  //      }
  2260  //    }
  2261  //
  2262  // 3. Migration is done and has failed
  2263  //
  2264  // -> { "execute": "query-migrate" }
  2265  // <- { "return": { "status": "failed" } }
  2266  //
  2267  // 4. Migration is being performed and is not a block migration:
  2268  //
  2269  // -> { "execute": "query-migrate" }
  2270  // <- {
  2271  //       "return":{
  2272  //          "status":"active",
  2273  //          "total-time":12345,
  2274  //          "setup-time":12345,
  2275  //          "expected-downtime":12345,
  2276  //          "ram":{
  2277  //             "transferred":123,
  2278  //             "remaining":123,
  2279  //             "total":246,
  2280  //             "duplicate":123,
  2281  //             "normal":123,
  2282  //             "normal-bytes":123456,
  2283  //             "dirty-sync-count":15
  2284  //          }
  2285  //       }
  2286  //    }
  2287  //
  2288  // 5. Migration is being performed and is a block migration:
  2289  //
  2290  // -> { "execute": "query-migrate" }
  2291  // <- {
  2292  //       "return":{
  2293  //          "status":"active",
  2294  //          "total-time":12345,
  2295  //          "setup-time":12345,
  2296  //          "expected-downtime":12345,
  2297  //          "ram":{
  2298  //             "total":1057024,
  2299  //             "remaining":1053304,
  2300  //             "transferred":3720,
  2301  //             "duplicate":123,
  2302  //             "normal":123,
  2303  //             "normal-bytes":123456,
  2304  //             "dirty-sync-count":15
  2305  //          },
  2306  //          "disk":{
  2307  //             "total":20971520,
  2308  //             "remaining":20880384,
  2309  //             "transferred":91136
  2310  //          }
  2311  //       }
  2312  //    }
  2313  //
  2314  // 6. Migration is being performed and XBZRLE is active:
  2315  //
  2316  // -> { "execute": "query-migrate" }
  2317  // <- {
  2318  //       "return":{
  2319  //          "status":"active",
  2320  //          "total-time":12345,
  2321  //          "setup-time":12345,
  2322  //          "expected-downtime":12345,
  2323  //          "ram":{
  2324  //             "total":1057024,
  2325  //             "remaining":1053304,
  2326  //             "transferred":3720,
  2327  //             "duplicate":10,
  2328  //             "normal":3333,
  2329  //             "normal-bytes":3412992,
  2330  //             "dirty-sync-count":15
  2331  //          },
  2332  //          "xbzrle-cache":{
  2333  //             "cache-size":67108864,
  2334  //             "bytes":20971520,
  2335  //             "pages":2444343,
  2336  //             "cache-miss":2244,
  2337  //             "cache-miss-rate":0.123,
  2338  //             "encoding-rate":80.1,
  2339  //             "overflow":34434
  2340  //          }
  2341  //       }
  2342  //    }
  2343  type QueryMigrateCommand struct{}
  2344  
  2345  // Enable/Disable the following migration capabilities (like xbzrle)
  2346  //
  2347  // Since: 1.2
  2348  //
  2349  // Example: -> { "execute": "migrate-set-capabilities" , "arguments":
  2350  //      { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
  2351  type MigrateSetCapabilitiesCommand struct {
  2352  	Capabilities []MigrationCapabilityStatus `json:"capabilities"` // json array of capability modifications to make
  2353  }
  2354  
  2355  // Returns information about the current migration capabilities status
  2356  //
  2357  // Returns: @MigrationCapabilitiesStatus
  2358  //
  2359  // Since: 1.2
  2360  //
  2361  // Example: -> { "execute": "query-migrate-capabilities" }
  2362  // <- { "return": [
  2363  //       {"state": false, "capability": "xbzrle"},
  2364  //       {"state": false, "capability": "rdma-pin-all"},
  2365  //       {"state": false, "capability": "auto-converge"},
  2366  //       {"state": false, "capability": "zero-blocks"},
  2367  //       {"state": false, "capability": "compress"},
  2368  //       {"state": true, "capability": "events"},
  2369  //       {"state": false, "capability": "postcopy-ram"},
  2370  //       {"state": false, "capability": "x-colo"}
  2371  //    ]}
  2372  type QueryMigrateCapabilitiesCommand struct{}
  2373  
  2374  // Set various migration parameters.
  2375  //
  2376  // Since: 2.4
  2377  //
  2378  // Example: -> { "execute": "migrate-set-parameters" ,
  2379  //      "arguments": { "compress-level": 1 } }
  2380  type MigrateSetParametersCommand struct {
  2381  	MigrateSetParameters
  2382  }
  2383  
  2384  // Returns information about the current migration parameters
  2385  //
  2386  // Returns: @MigrationParameters
  2387  //
  2388  // Since: 2.4
  2389  //
  2390  // Example: -> { "execute": "query-migrate-parameters" }
  2391  // <- { "return": {
  2392  //          "decompress-threads": 2,
  2393  //          "cpu-throttle-increment": 10,
  2394  //          "compress-threads": 8,
  2395  //          "compress-level": 1,
  2396  //          "cpu-throttle-initial": 20,
  2397  //          "max-bandwidth": 33554432,
  2398  //          "downtime-limit": 300
  2399  //       }
  2400  //    }
  2401  type QueryMigrateParametersCommand struct{}
  2402  
  2403  // Set migration information for remote display.  This makes the server
  2404  // ask the client to automatically reconnect using the new parameters
  2405  // once migration finished successfully.  Only implemented for SPICE.
  2406  //
  2407  // Since: 0.14
  2408  //
  2409  // Example: -> { "execute": "client_migrate_info",
  2410  //      "arguments": { "protocol": "spice",
  2411  //                     "hostname": "virt42.lab.kraxel.org",
  2412  //                     "port": 1234 } }
  2413  // <- { "return": {} }
  2414  type ClientMigrateInfoCommand struct {
  2415  	Protocol    string  `json:"protocol"`               // must be "spice"
  2416  	Hostname    string  `json:"hostname"`               // migration target hostname
  2417  	Port        *int64  `json:"port,omitempty"`         // spice tcp port for plaintext channels
  2418  	TlsPort     *int64  `json:"tls-port,omitempty"`     // spice tcp port for tls-secured channels
  2419  	CertSubject *string `json:"cert-subject,omitempty"` // server certificate subject
  2420  }
  2421  
  2422  // Followup to a migration command to switch the migration to postcopy mode.
  2423  // The postcopy-ram capability must be set on both source and destination
  2424  // before the original migration command.
  2425  //
  2426  // Since: 2.5
  2427  //
  2428  // Example: -> { "execute": "migrate-start-postcopy" }
  2429  // <- { "return": {} }
  2430  type MigrateStartPostcopyCommand struct{}
  2431  
  2432  // Tell qemu that heartbeat is lost, request it to do takeover procedures.
  2433  // If this command is sent to the PVM, the Primary side will exit COLO mode.
  2434  // If sent to the Secondary, the Secondary side will run failover work,
  2435  // then takes over server operation to become the service VM.
  2436  //
  2437  // Since: 2.8
  2438  //
  2439  // Example: -> { "execute": "x-colo-lost-heartbeat" }
  2440  // <- { "return": {} }
  2441  type XColoLostHeartbeatCommand struct{}
  2442  
  2443  // Cancel the current executing migration process.
  2444  //
  2445  // Returns: nothing on success
  2446  //
  2447  // Notes: This command succeeds even if there is no migration process running.
  2448  //
  2449  // Since: 0.14
  2450  //
  2451  // Example: -> { "execute": "migrate_cancel" }
  2452  // <- { "return": {} }
  2453  type MigrateCancelCommand struct{}
  2454  
  2455  // Continue migration when it's in a paused state.
  2456  //
  2457  // Returns: nothing on success
  2458  //
  2459  // Since: 2.11
  2460  //
  2461  // Example: -> { "execute": "migrate-continue" , "arguments":
  2462  //      { "state": "pre-switchover" } }
  2463  // <- { "return": {} }
  2464  type MigrateContinueCommand struct {
  2465  	State MigrationStatus `json:"state"` // The state the migration is currently expected to be in
  2466  }
  2467  
  2468  // Migrates the current running guest to another Virtual Machine.
  2469  //
  2470  // Returns: nothing on success
  2471  //
  2472  // Since: 0.14
  2473  //
  2474  // Notes: 1. The 'query-migrate' command should be used to check migration's progress
  2475  //    and final result (this information is provided by the 'status' member)
  2476  //
  2477  // 2. All boolean arguments default to false
  2478  //
  2479  // 3. The user Monitor's "detach" argument is invalid in QMP and should not
  2480  //    be used
  2481  //
  2482  // Example: -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
  2483  // <- { "return": {} }
  2484  type MigrateCommand struct {
  2485  	Uri    string `json:"uri"`              // the Uniform Resource Identifier of the destination VM
  2486  	Blk    *bool  `json:"blk,omitempty"`    // do block migration (full disk copy)
  2487  	Inc    *bool  `json:"inc,omitempty"`    // incremental disk copy migration
  2488  	Detach *bool  `json:"detach,omitempty"` // this argument exists only for compatibility reasons and is ignored by QEMU
  2489  	Resume *bool  `json:"resume,omitempty"` // resume one paused migration, default "off". (since 3.0)
  2490  }
  2491  
  2492  // Start an incoming migration, the qemu must have been started
  2493  // with -incoming defer
  2494  //
  2495  // Returns: nothing on success
  2496  //
  2497  // Since: 2.3
  2498  //
  2499  // Notes: 1. It's a bad idea to use a string for the uri, but it needs to stay
  2500  //    compatible with -incoming and the format of the uri is already exposed
  2501  //    above libvirt.
  2502  //
  2503  // 2. QEMU must be started with -incoming defer to allow migrate-incoming to
  2504  //    be used.
  2505  //
  2506  // 3. The uri format is the same as for -incoming
  2507  //
  2508  // Example: -> { "execute": "migrate-incoming",
  2509  //      "arguments": { "uri": "tcp::4446" } }
  2510  // <- { "return": {} }
  2511  type MigrateIncomingCommand struct {
  2512  	Uri string `json:"uri"` // The Uniform Resource Identifier identifying the source or address to listen on
  2513  }
  2514  
  2515  // Save the state of all devices to file. The RAM and the block devices
  2516  // of the VM are not saved by this command.
  2517  //
  2518  // Returns: Nothing on success
  2519  //
  2520  // Since: 1.1
  2521  //
  2522  // Example: -> { "execute": "xen-save-devices-state",
  2523  //      "arguments": { "filename": "/tmp/save" } }
  2524  // <- { "return": {} }
  2525  type XenSaveDevicesStateCommand struct {
  2526  	Filename string `json:"filename"`       // the file to save the state of the devices to as binary data. See xen-save-devices-state.txt for a description of the binary format.
  2527  	Live     *bool  `json:"live,omitempty"` // Optional argument to ask QEMU to treat this command as part of a live migration. Default to true. (since 2.11)
  2528  }
  2529  
  2530  // Enable or disable the global dirty log mode.
  2531  //
  2532  // Returns: nothing
  2533  //
  2534  // Since: 1.3
  2535  //
  2536  // Example: -> { "execute": "xen-set-global-dirty-log",
  2537  //      "arguments": { "enable": true } }
  2538  // <- { "return": {} }
  2539  type XenSetGlobalDirtyLogCommand struct {
  2540  	Enable bool `json:"enable"` // true to enable, false to disable.
  2541  }
  2542  
  2543  // Load the state of all devices from file. The RAM and the block devices
  2544  // of the VM are not loaded by this command.
  2545  //
  2546  // Since: 2.7
  2547  //
  2548  // Example: -> { "execute": "xen-load-devices-state",
  2549  //      "arguments": { "filename": "/tmp/resume" } }
  2550  // <- { "return": {} }
  2551  type XenLoadDevicesStateCommand struct {
  2552  	Filename string `json:"filename"` // the file to load the state of the devices from as binary data. See xen-save-devices-state.txt for a description of the binary format.
  2553  }
  2554  
  2555  // Enable or disable replication.
  2556  //
  2557  // Returns: nothing.
  2558  //
  2559  // Example: -> { "execute": "xen-set-replication",
  2560  //      "arguments": {"enable": true, "primary": false} }
  2561  // <- { "return": {} }
  2562  //
  2563  // Since: 2.9
  2564  type XenSetReplicationCommand struct {
  2565  	Enable   bool  `json:"enable"`             // true to enable, false to disable.
  2566  	Primary  bool  `json:"primary"`            // true for primary or false for secondary.
  2567  	Failover *bool `json:"failover,omitempty"` // true to do failover, false to stop. but cannot be specified if 'enable' is true. default value is false.
  2568  }
  2569  
  2570  // Query replication status while the vm is running.
  2571  //
  2572  // Returns: A @ReplicationResult object showing the status.
  2573  //
  2574  // Example: -> { "execute": "query-xen-replication-status" }
  2575  // <- { "return": { "error": false } }
  2576  //
  2577  // Since: 2.9
  2578  type QueryXenReplicationStatusCommand struct{}
  2579  
  2580  // Xen uses this command to notify replication to trigger a checkpoint.
  2581  //
  2582  // Returns: nothing.
  2583  //
  2584  // Example: -> { "execute": "xen-colo-do-checkpoint" }
  2585  // <- { "return": {} }
  2586  //
  2587  // Since: 2.9
  2588  type XenColoDoCheckpointCommand struct{}
  2589  
  2590  // Query COLO status while the vm is running.
  2591  //
  2592  // Returns: A @COLOStatus object showing the status.
  2593  //
  2594  // Example: -> { "execute": "query-colo-status" }
  2595  // <- { "return": { "mode": "primary", "reason": "request" } }
  2596  //
  2597  // Since: 3.1
  2598  type QueryColoStatusCommand struct{}
  2599  
  2600  // Provide a recovery migration stream URI.
  2601  //
  2602  // Returns: nothing.
  2603  //
  2604  // Example: -> { "execute": "migrate-recover",
  2605  //      "arguments": { "uri": "tcp:192.168.1.200:12345" } }
  2606  // <- { "return": {} }
  2607  //
  2608  // Since: 3.0
  2609  type MigrateRecoverCommand struct {
  2610  	Uri string `json:"uri"` // the URI to be used for the recovery of migration stream.
  2611  }
  2612  
  2613  // Pause a migration.  Currently it only supports postcopy.
  2614  //
  2615  // Returns: nothing.
  2616  //
  2617  // Example: -> { "execute": "migrate-pause" }
  2618  // <- { "return": {} }
  2619  //
  2620  // Since: 3.0
  2621  type MigratePauseCommand struct{}
  2622  
  2623  // start calculating dirty page rate for vm
  2624  //
  2625  // Since: 5.2
  2626  //
  2627  // Example: {"command": "calc-dirty-rate", "arguments": {"calc-time": 1,
  2628  //                                                'sample-pages': 512} }
  2629  type CalcDirtyRateCommand struct {
  2630  	CalcTime    int64                 `json:"calc-time"`              // time in units of second for sample dirty pages
  2631  	SamplePages *int64                `json:"sample-pages,omitempty"` // page count per GB for sample dirty pages the default value is 512 (since 6.1)
  2632  	Mode        *DirtyRateMeasureMode `json:"mode,omitempty"`         // mechanism of calculating dirtyrate includes 'page-sampling' and 'dirty-ring' (Since 6.1)
  2633  }
  2634  
  2635  // query dirty page rate in units of MB/s for vm
  2636  //
  2637  // Since: 5.2
  2638  type QueryDirtyRateCommand struct{}
  2639  
  2640  // Save a VM snapshot
  2641  //
  2642  // None: Applications should not assume that the snapshot save is complete
  2643  // when this command returns. The job commands / events must be used
  2644  // to determine completion and to fetch details of any errors that arise.
  2645  //
  2646  // Note that execution of the guest CPUs may be stopped during the
  2647  // time it takes to save the snapshot. A future version of QEMU
  2648  // may ensure CPUs are executing continuously.
  2649  //
  2650  // It is strongly recommended that @devices contain all writable
  2651  // block device nodes if a consistent snapshot is required.
  2652  //
  2653  // If @tag already exists, an error will be reported
  2654  //
  2655  // Returns: nothing
  2656  //
  2657  // Example: -> { "execute": "snapshot-save",
  2658  //      "arguments": {
  2659  //         "job-id": "snapsave0",
  2660  //         "tag": "my-snap",
  2661  //         "vmstate": "disk0",
  2662  //         "devices": ["disk0", "disk1"]
  2663  //      }
  2664  //    }
  2665  // <- { "return": { } }
  2666  // <- {"event": "JOB_STATUS_CHANGE",
  2667  //     "data": {"status": "created", "id": "snapsave0"}}
  2668  // <- {"event": "JOB_STATUS_CHANGE",
  2669  //     "data": {"status": "running", "id": "snapsave0"}}
  2670  // <- {"event": "STOP"}
  2671  // <- {"event": "RESUME"}
  2672  // <- {"event": "JOB_STATUS_CHANGE",
  2673  //     "data": {"status": "waiting", "id": "snapsave0"}}
  2674  // <- {"event": "JOB_STATUS_CHANGE",
  2675  //     "data": {"status": "pending", "id": "snapsave0"}}
  2676  // <- {"event": "JOB_STATUS_CHANGE",
  2677  //     "data": {"status": "concluded", "id": "snapsave0"}}
  2678  // -> {"execute": "query-jobs"}
  2679  // <- {"return": [{"current-progress": 1,
  2680  //                 "status": "concluded",
  2681  //                 "total-progress": 1,
  2682  //                 "type": "snapshot-save",
  2683  //                 "id": "snapsave0"}]}
  2684  //
  2685  // Since: 6.0
  2686  type SnapshotSaveCommand struct {
  2687  	JobId   string   `json:"job-id"`  // identifier for the newly created job
  2688  	Tag     string   `json:"tag"`     // name of the snapshot to create
  2689  	Vmstate string   `json:"vmstate"` // block device node name to save vmstate to
  2690  	Devices []string `json:"devices"` // list of block device node names to save a snapshot to
  2691  }
  2692  
  2693  // Load a VM snapshot
  2694  //
  2695  // None: Applications should not assume that the snapshot load is complete
  2696  // when this command returns. The job commands / events must be used
  2697  // to determine completion and to fetch details of any errors that arise.
  2698  //
  2699  // Note that execution of the guest CPUs will be stopped during the
  2700  // time it takes to load the snapshot.
  2701  //
  2702  // It is strongly recommended that @devices contain all writable
  2703  // block device nodes that can have changed since the original
  2704  // @snapshot-save command execution.
  2705  //
  2706  // Returns: nothing
  2707  //
  2708  // Example: -> { "execute": "snapshot-load",
  2709  //      "arguments": {
  2710  //         "job-id": "snapload0",
  2711  //         "tag": "my-snap",
  2712  //         "vmstate": "disk0",
  2713  //         "devices": ["disk0", "disk1"]
  2714  //      }
  2715  //    }
  2716  // <- { "return": { } }
  2717  // <- {"event": "JOB_STATUS_CHANGE",
  2718  //     "data": {"status": "created", "id": "snapload0"}}
  2719  // <- {"event": "JOB_STATUS_CHANGE",
  2720  //     "data": {"status": "running", "id": "snapload0"}}
  2721  // <- {"event": "STOP"}
  2722  // <- {"event": "RESUME"}
  2723  // <- {"event": "JOB_STATUS_CHANGE",
  2724  //     "data": {"status": "waiting", "id": "snapload0"}}
  2725  // <- {"event": "JOB_STATUS_CHANGE",
  2726  //     "data": {"status": "pending", "id": "snapload0"}}
  2727  // <- {"event": "JOB_STATUS_CHANGE",
  2728  //     "data": {"status": "concluded", "id": "snapload0"}}
  2729  // -> {"execute": "query-jobs"}
  2730  // <- {"return": [{"current-progress": 1,
  2731  //                 "status": "concluded",
  2732  //                 "total-progress": 1,
  2733  //                 "type": "snapshot-load",
  2734  //                 "id": "snapload0"}]}
  2735  //
  2736  // Since: 6.0
  2737  type SnapshotLoadCommand struct {
  2738  	JobId   string   `json:"job-id"`  // identifier for the newly created job
  2739  	Tag     string   `json:"tag"`     // name of the snapshot to load.
  2740  	Vmstate string   `json:"vmstate"` // block device node name to load vmstate from
  2741  	Devices []string `json:"devices"` // list of block device node names to load a snapshot from
  2742  }
  2743  
  2744  // Delete a VM snapshot
  2745  //
  2746  // None: Applications should not assume that the snapshot delete is complete
  2747  // when this command returns. The job commands / events must be used
  2748  // to determine completion and to fetch details of any errors that arise.
  2749  //
  2750  // Returns: nothing
  2751  //
  2752  // Example: -> { "execute": "snapshot-delete",
  2753  //      "arguments": {
  2754  //         "job-id": "snapdelete0",
  2755  //         "tag": "my-snap",
  2756  //         "devices": ["disk0", "disk1"]
  2757  //      }
  2758  //    }
  2759  // <- { "return": { } }
  2760  // <- {"event": "JOB_STATUS_CHANGE",
  2761  //     "data": {"status": "created", "id": "snapdelete0"}}
  2762  // <- {"event": "JOB_STATUS_CHANGE",
  2763  //     "data": {"status": "running", "id": "snapdelete0"}}
  2764  // <- {"event": "JOB_STATUS_CHANGE",
  2765  //     "data": {"status": "waiting", "id": "snapdelete0"}}
  2766  // <- {"event": "JOB_STATUS_CHANGE",
  2767  //     "data": {"status": "pending", "id": "snapdelete0"}}
  2768  // <- {"event": "JOB_STATUS_CHANGE",
  2769  //     "data": {"status": "concluded", "id": "snapdelete0"}}
  2770  // -> {"execute": "query-jobs"}
  2771  // <- {"return": [{"current-progress": 1,
  2772  //                 "status": "concluded",
  2773  //                 "total-progress": 1,
  2774  //                 "type": "snapshot-delete",
  2775  //                 "id": "snapdelete0"}]}
  2776  //
  2777  // Since: 6.0
  2778  type SnapshotDeleteCommand struct {
  2779  	JobId   string   `json:"job-id"`  // identifier for the newly created job
  2780  	Tag     string   `json:"tag"`     // name of the snapshot to delete.
  2781  	Devices []string `json:"devices"` // list of block device node names to delete a snapshot from
  2782  }
  2783  
  2784  // Executes a number of transactionable QMP commands atomically. If any
  2785  // operation fails, then the entire set of actions will be abandoned and the
  2786  // appropriate error returned.
  2787  //
  2788  // For external snapshots, the dictionary contains the device, the file to use for
  2789  // the new snapshot, and the format.  The default format, if not specified, is
  2790  // qcow2.
  2791  //
  2792  // Each new snapshot defaults to being created by QEMU (wiping any
  2793  // contents if the file already exists), but it is also possible to reuse
  2794  // an externally-created file.  In the latter case, you should ensure that
  2795  // the new image file has the same contents as the current one; QEMU cannot
  2796  // perform any meaningful check.  Typically this is achieved by using the
  2797  // current image file as the backing file for the new image.
  2798  //
  2799  // On failure, the original disks pre-snapshot attempt will be used.
  2800  //
  2801  // For internal snapshots, the dictionary contains the device and the
  2802  // snapshot's name.  If an internal snapshot matching name already exists,
  2803  // the request will be rejected.  Only some image formats support it, for
  2804  // example, qcow2, and rbd,
  2805  //
  2806  // On failure, qemu will try delete the newly created internal snapshot in the
  2807  // transaction.  When an I/O error occurs during deletion, the user needs to fix
  2808  // it later with qemu-img or other command.
  2809  //
  2810  // Returns: nothing on success
  2811  //
  2812  // Errors depend on the operations of the transaction
  2813  //
  2814  // Note: The transaction aborts on the first failure.  Therefore, there will be
  2815  // information on only one failed operation returned in an error condition, and
  2816  // subsequent actions will not have been attempted.
  2817  //
  2818  // Since: 1.1
  2819  //
  2820  // Example: -> { "execute": "transaction",
  2821  //      "arguments": { "actions": [
  2822  //          { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
  2823  //                                      "snapshot-file": "/some/place/my-image",
  2824  //                                      "format": "qcow2" } },
  2825  //          { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
  2826  //                                      "snapshot-file": "/some/place/my-image2",
  2827  //                                      "snapshot-node-name": "node3432",
  2828  //                                      "mode": "existing",
  2829  //                                      "format": "qcow2" } },
  2830  //          { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
  2831  //                                      "snapshot-file": "/some/place/my-image2",
  2832  //                                      "mode": "existing",
  2833  //                                      "format": "qcow2" } },
  2834  //          { "type": "blockdev-snapshot-internal-sync", "data" : {
  2835  //                                      "device": "ide-hd2",
  2836  //                                      "name": "snapshot0" } } ] } }
  2837  // <- { "return": {} }
  2838  type TransactionCommand struct {
  2839  	Actions    []TransactionAction    `json:"actions"`              // List of @TransactionAction; information needed for the respective operations.
  2840  	Properties *TransactionProperties `json:"properties,omitempty"` // structure of additional options to control the execution of the transaction. See @TransactionProperties for additional detail.
  2841  }
  2842  
  2843  // Query the state of events.
  2844  //
  2845  // Returns: a list of @TraceEventInfo for the matching events
  2846  //
  2847  // An event is returned if:
  2848  //
  2849  // - its name matches the @name pattern, and
  2850  // - if @vcpu is given, the event has the "vcpu" property.
  2851  //
  2852  // Therefore, if @vcpu is given, the operation will only match per-vCPU events,
  2853  // returning their state on the specified vCPU. Special case: if @name is an
  2854  // exact match, @vcpu is given and the event does not have the "vcpu" property,
  2855  // an error is returned.
  2856  //
  2857  // Since: 2.2
  2858  //
  2859  // Example: -> { "execute": "trace-event-get-state",
  2860  //      "arguments": { "name": "qemu_memalign" } }
  2861  // <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
  2862  type TraceEventGetStateCommand struct {
  2863  	Name string `json:"name"`           // Event name pattern (case-sensitive glob).
  2864  	Vcpu *int64 `json:"vcpu,omitempty"` // The vCPU to query (any by default; since 2.7).
  2865  }
  2866  
  2867  // Set the dynamic tracing state of events.
  2868  //
  2869  // None: An event's state is modified if:
  2870  // - its name matches the @name pattern, and
  2871  // - if @vcpu is given, the event has the "vcpu" property.
  2872  //
  2873  // Therefore, if @vcpu is given, the operation will only match per-vCPU events,
  2874  // setting their state on the specified vCPU. Special case: if @name is an exact
  2875  // match, @vcpu is given and the event does not have the "vcpu" property, an
  2876  // error is returned.
  2877  //
  2878  // Since: 2.2
  2879  //
  2880  // Example: -> { "execute": "trace-event-set-state",
  2881  //      "arguments": { "name": "qemu_memalign", "enable": true } }
  2882  // <- { "return": {} }
  2883  type TraceEventSetStateCommand struct {
  2884  	Name              string `json:"name"`                         // Event name pattern (case-sensitive glob).
  2885  	Enable            bool   `json:"enable"`                       // Whether to enable tracing.
  2886  	IgnoreUnavailable *bool  `json:"ignore-unavailable,omitempty"` // Do not match unavailable events with @name.
  2887  	Vcpu              *int64 `json:"vcpu,omitempty"`               // The vCPU to act upon (all by default; since 2.7).
  2888  }
  2889  
  2890  // Enable QMP capabilities.
  2891  //
  2892  // Arguments:
  2893  //
  2894  // Example: -> { "execute": "qmp_capabilities",
  2895  //      "arguments": { "enable": [ "oob" ] } }
  2896  // <- { "return": {} }
  2897  //
  2898  // Notes: This command is valid exactly when first connecting: it must be
  2899  // issued before any other command will be accepted, and will fail once the
  2900  // monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
  2901  //
  2902  // The QMP client needs to explicitly enable QMP capabilities, otherwise
  2903  // all the QMP capabilities will be turned off by default.
  2904  //
  2905  // Since: 0.13
  2906  type QmpCapabilitiesCommand struct {
  2907  	Enable []QMPCapability `json:"enable,omitempty"` // An optional list of QMPCapability values to enable. The client must not enable any capability that is not mentioned in the QMP greeting message. If the field is not provided, it means no QMP capabilities will be enabled. (since 2.12)
  2908  }
  2909  
  2910  // Returns the current version of QEMU.
  2911  //
  2912  // Returns: A @VersionInfo object describing the current version of QEMU.
  2913  //
  2914  // Since: 0.14
  2915  //
  2916  // Example: -> { "execute": "query-version" }
  2917  // <- {
  2918  //       "return":{
  2919  //          "qemu":{
  2920  //             "major":0,
  2921  //             "minor":11,
  2922  //             "micro":5
  2923  //          },
  2924  //          "package":""
  2925  //       }
  2926  //    }
  2927  type QueryVersionCommand struct{}
  2928  
  2929  // Return a list of supported QMP commands by this server
  2930  //
  2931  // Returns: A list of @CommandInfo for all supported commands
  2932  //
  2933  // Since: 0.14
  2934  //
  2935  // Example: -> { "execute": "query-commands" }
  2936  // <- {
  2937  //      "return":[
  2938  //         {
  2939  //            "name":"query-balloon"
  2940  //         },
  2941  //         {
  2942  //            "name":"system_powerdown"
  2943  //         }
  2944  //      ]
  2945  //    }
  2946  //
  2947  // Note: This example has been shortened as the real response is too long.
  2948  type QueryCommandsCommand struct{}
  2949  
  2950  // This command will cause the QEMU process to exit gracefully.  While every
  2951  // attempt is made to send the QMP response before terminating, this is not
  2952  // guaranteed.  When using this interface, a premature EOF would not be
  2953  // unexpected.
  2954  //
  2955  // Since: 0.14
  2956  //
  2957  // Example: -> { "execute": "quit" }
  2958  // <- { "return": {} }
  2959  type QuitCommand struct{}
  2960  
  2961  // Command query-qmp-schema exposes the QMP wire ABI as an array of
  2962  // SchemaInfo.  This lets QMP clients figure out what commands and
  2963  // events are available in this QEMU, and their parameters and results.
  2964  //
  2965  // However, the SchemaInfo can't reflect all the rules and restrictions
  2966  // that apply to QMP.  It's interface introspection (figuring out
  2967  // what's there), not interface specification.  The specification is in
  2968  // the QAPI schema.
  2969  //
  2970  // Furthermore, while we strive to keep the QMP wire format
  2971  // backwards-compatible across qemu versions, the introspection output
  2972  // is not guaranteed to have the same stability.  For example, one
  2973  // version of qemu may list an object member as an optional
  2974  // non-variant, while another lists the same member only through the
  2975  // object's variants; or the type of a member may change from a generic
  2976  // string into a specific enum or from one specific type into an
  2977  // alternate that includes the original type alongside something else.
  2978  //
  2979  // Returns: array of @SchemaInfo, where each element describes an
  2980  // entity in the ABI: command, event, type, ...
  2981  //
  2982  // The order of the various SchemaInfo is unspecified; however, all
  2983  // names are guaranteed to be unique (no name will be duplicated with
  2984  // different meta-types).
  2985  //
  2986  // Note: the QAPI schema is also used to help define *internal*
  2987  // interfaces, by defining QAPI types.  These are not part of the QMP
  2988  // wire ABI, and therefore not returned by this command.
  2989  //
  2990  // Since: 2.5
  2991  type QueryQmpSchemaCommand struct{}
  2992  
  2993  // This command will list any properties of a object given a path in the object
  2994  // model.
  2995  //
  2996  // Returns: a list of @ObjectPropertyInfo that describe the properties of the
  2997  // object.
  2998  //
  2999  // Since: 1.2
  3000  //
  3001  // Example: -> { "execute": "qom-list",
  3002  //      "arguments": { "path": "/chardevs" } }
  3003  // <- { "return": [ { "name": "type", "type": "string" },
  3004  //                  { "name": "parallel0", "type": "child<chardev-vc>" },
  3005  //                  { "name": "serial0", "type": "child<chardev-vc>" },
  3006  //                  { "name": "mon0", "type": "child<chardev-stdio>" } ] }
  3007  type QomListCommand struct {
  3008  	Path string `json:"path"` // the path within the object model. See @qom-get for a description of this parameter.
  3009  }
  3010  
  3011  // This command will get a property from a object model path and return the
  3012  // value.
  3013  //
  3014  // Returns: The property value.  The type depends on the property
  3015  // type. child<> and link<> properties are returned as #str
  3016  // pathnames.  All integer property types (u8, u16, etc) are
  3017  // returned as #int.
  3018  //
  3019  // Since: 1.2
  3020  //
  3021  // Example: 1. Use absolute path
  3022  //
  3023  // -> { "execute": "qom-get",
  3024  //      "arguments": { "path": "/machine/unattached/device[0]",
  3025  //                     "property": "hotplugged" } }
  3026  // <- { "return": false }
  3027  //
  3028  // 2. Use partial path
  3029  //
  3030  // -> { "execute": "qom-get",
  3031  //      "arguments": { "path": "unattached/sysbus",
  3032  //                     "property": "type" } }
  3033  // <- { "return": "System" }
  3034  type QomGetCommand struct {
  3035  	Path     string `json:"path"`     // The path within the object model. There are two forms of supported paths--absolute and partial paths. Absolute paths are derived from the root object and can follow child<> or link<> properties. Since they can follow link<> properties, they can be arbitrarily long. Absolute paths look like absolute filenames and are prefixed with a leading slash. Partial paths look like relative filenames. They do not begin with a prefix. The matching rules for partial paths are subtle but designed to make specifying objects easy. At each level of the composition tree, the partial path is matched as an absolute path. The first match is not returned. At least two matches are searched for. A successful result is only returned if only one match is found. If more than one match is found, a flag is return to indicate that the match was ambiguous.
  3036  	Property string `json:"property"` // The property name to read
  3037  }
  3038  
  3039  // This command will set a property from a object model path.
  3040  //
  3041  // Since: 1.2
  3042  //
  3043  // Example: -> { "execute": "qom-set",
  3044  //      "arguments": { "path": "/machine",
  3045  //                     "property": "graphics",
  3046  //                     "value": false } }
  3047  // <- { "return": {} }
  3048  type QomSetCommand struct {
  3049  	Path     string `json:"path"`     // see @qom-get for a description of this parameter
  3050  	Property string `json:"property"` // the property name to set
  3051  	Value    Any    `json:"value"`    // a value who's type is appropriate for the property type. See @qom-get for a description of type mapping.
  3052  }
  3053  
  3054  // This command will return a list of types given search parameters
  3055  //
  3056  // Returns: a list of @ObjectTypeInfo or an empty list if no results are found
  3057  //
  3058  // Since: 1.1
  3059  type QomListTypesCommand struct {
  3060  	Implements *string `json:"implements,omitempty"` // if specified, only return types that implement this type name
  3061  	Abstract   *bool   `json:"abstract,omitempty"`   // if true, include abstract types in the results
  3062  }
  3063  
  3064  // List properties associated with a QOM object.
  3065  //
  3066  // Note: objects can create properties at runtime, for example to describe
  3067  // links between different devices and/or objects. These properties
  3068  // are not included in the output of this command.
  3069  //
  3070  // Returns: a list of ObjectPropertyInfo describing object properties
  3071  //
  3072  // Since: 2.12
  3073  type QomListPropertiesCommand struct {
  3074  	Typename string `json:"typename"` // the type name of an object
  3075  }
  3076  
  3077  // Create a QOM object.
  3078  //
  3079  // Returns: Nothing on success
  3080  // Error if @qom-type is not a valid class name
  3081  //
  3082  // Since: 2.0
  3083  //
  3084  // Example: -> { "execute": "object-add",
  3085  //      "arguments": { "qom-type": "rng-random", "id": "rng1",
  3086  //                     "filename": "/dev/hwrng" } }
  3087  // <- { "return": {} }
  3088  type ObjectAddCommand struct {
  3089  	ObjectOptions
  3090  }
  3091  
  3092  // Remove a QOM object.
  3093  //
  3094  // Returns: Nothing on success
  3095  // Error if @id is not a valid id for a QOM object
  3096  //
  3097  // Since: 2.0
  3098  //
  3099  // Example: -> { "execute": "object-del", "arguments": { "id": "rng1" } }
  3100  // <- { "return": {} }
  3101  type ObjectDelCommand struct {
  3102  	Id string `json:"id"` // the name of the QOM object to remove
  3103  }
  3104  
  3105  // List properties associated with a device.
  3106  //
  3107  // Returns: a list of ObjectPropertyInfo describing a devices properties
  3108  //
  3109  // Note: objects can create properties at runtime, for example to describe
  3110  // links between different devices and/or objects. These properties
  3111  // are not included in the output of this command.
  3112  //
  3113  // Since: 1.2
  3114  type DeviceListPropertiesCommand struct {
  3115  	Typename string `json:"typename"` // the type name of a device
  3116  }
  3117  
  3118  // Add a device.
  3119  //
  3120  // Notes: Additional arguments depend on the type.
  3121  //
  3122  // 1. For detailed information about this command, please refer to the
  3123  //    'docs/qdev-device-use.txt' file.
  3124  //
  3125  // 2. It's possible to list device properties by running QEMU with the
  3126  //    "-device DEVICE,help" command-line argument, where DEVICE is the
  3127  //    device's name
  3128  //
  3129  // Example: -> { "execute": "device_add",
  3130  //      "arguments": { "driver": "e1000", "id": "net1",
  3131  //                     "bus": "pci.0",
  3132  //                     "mac": "52:54:00:12:34:56" } }
  3133  // <- { "return": {} }
  3134  //
  3135  // Since: 0.13
  3136  type DeviceAddCommand struct {
  3137  	Driver string  `json:"driver"`        // the name of the new device's driver
  3138  	Bus    *string `json:"bus,omitempty"` // the device's parent bus (device tree path)
  3139  	Id     *string `json:"id,omitempty"`  // the device's ID, must be unique
  3140  }
  3141  
  3142  // Remove a device from a guest
  3143  //
  3144  // Returns: Nothing on success
  3145  // If @id is not a valid device, DeviceNotFound
  3146  //
  3147  // Notes: When this command completes, the device may not be removed from the
  3148  // guest.  Hot removal is an operation that requires guest cooperation.
  3149  // This command merely requests that the guest begin the hot removal
  3150  // process.  Completion of the device removal process is signaled with a
  3151  // DEVICE_DELETED event. Guest reset will automatically complete removal
  3152  // for all devices.  If a guest-side error in the hot removal process is
  3153  // detected, the device will not be removed and a DEVICE_UNPLUG_GUEST_ERROR
  3154  // event is sent.  Some errors cannot be detected.
  3155  //
  3156  // Since: 0.14
  3157  //
  3158  // Example: -> { "execute": "device_del",
  3159  //      "arguments": { "id": "net1" } }
  3160  // <- { "return": {} }
  3161  //
  3162  // -> { "execute": "device_del",
  3163  //      "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
  3164  // <- { "return": {} }
  3165  type DeviceDelCommand struct {
  3166  	Id string `json:"id"` // the device's ID or QOM path
  3167  }
  3168  
  3169  // Returns information about all virtual CPUs.
  3170  //
  3171  // Returns: list of @CpuInfoFast
  3172  //
  3173  // Since: 2.12
  3174  //
  3175  // Example: -> { "execute": "query-cpus-fast" }
  3176  // <- { "return": [
  3177  //         {
  3178  //             "thread-id": 25627,
  3179  //             "props": {
  3180  //                 "core-id": 0,
  3181  //                 "thread-id": 0,
  3182  //                 "socket-id": 0
  3183  //             },
  3184  //             "qom-path": "/machine/unattached/device[0]",
  3185  //             "arch":"x86",
  3186  //             "target":"x86_64",
  3187  //             "cpu-index": 0
  3188  //         },
  3189  //         {
  3190  //             "thread-id": 25628,
  3191  //             "props": {
  3192  //                 "core-id": 0,
  3193  //                 "thread-id": 0,
  3194  //                 "socket-id": 1
  3195  //             },
  3196  //             "qom-path": "/machine/unattached/device[2]",
  3197  //             "arch":"x86",
  3198  //             "target":"x86_64",
  3199  //             "cpu-index": 1
  3200  //         }
  3201  //     ]
  3202  // }
  3203  type QueryCpusFastCommand struct{}
  3204  
  3205  // Return a list of supported machines
  3206  //
  3207  // Returns: a list of MachineInfo
  3208  //
  3209  // Since: 1.2
  3210  type QueryMachinesCommand struct{}
  3211  
  3212  // Return information on the current virtual machine.
  3213  //
  3214  // Returns: CurrentMachineParams
  3215  //
  3216  // Since: 4.0
  3217  type QueryCurrentMachineCommand struct{}
  3218  
  3219  // Return information about the target for this QEMU
  3220  //
  3221  // Returns: TargetInfo
  3222  //
  3223  // Since: 1.2
  3224  type QueryTargetCommand struct{}
  3225  
  3226  // Query the guest UUID information.
  3227  //
  3228  // Returns: The @UuidInfo for the guest
  3229  //
  3230  // Since: 0.14
  3231  //
  3232  // Example: -> { "execute": "query-uuid" }
  3233  // <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
  3234  type QueryUuidCommand struct{}
  3235  
  3236  // Show Virtual Machine Generation ID
  3237  //
  3238  // Since: 2.9
  3239  type QueryVmGenerationIdCommand struct{}
  3240  
  3241  // Performs a hard reset of a guest.
  3242  //
  3243  // Since: 0.14
  3244  //
  3245  // Example: -> { "execute": "system_reset" }
  3246  // <- { "return": {} }
  3247  type SystemResetCommand struct{}
  3248  
  3249  // Requests that a guest perform a powerdown operation.
  3250  //
  3251  // Since: 0.14
  3252  //
  3253  // Notes: A guest may or may not respond to this command.  This command
  3254  // returning does not indicate that a guest has accepted the request or
  3255  // that it has shut down.  Many guests will respond to this command by
  3256  // prompting the user in some way.
  3257  //
  3258  // Example: -> { "execute": "system_powerdown" }
  3259  // <- { "return": {} }
  3260  type SystemPowerdownCommand struct{}
  3261  
  3262  // Wake up guest from suspend. If the guest has wake-up from suspend
  3263  // support enabled (wakeup-suspend-support flag from
  3264  // query-current-machine), wake-up guest from suspend if the guest is
  3265  // in SUSPENDED state. Return an error otherwise.
  3266  //
  3267  // Since: 1.1
  3268  //
  3269  // Returns: nothing.
  3270  //
  3271  // Note: prior to 4.0, this command does nothing in case the guest
  3272  // isn't suspended.
  3273  //
  3274  // Example: -> { "execute": "system_wakeup" }
  3275  // <- { "return": {} }
  3276  type SystemWakeupCommand struct{}
  3277  
  3278  // Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
  3279  // The command fails when the guest doesn't support injecting.
  3280  //
  3281  // Returns: If successful, nothing
  3282  //
  3283  // Since: 0.14
  3284  //
  3285  // Note: prior to 2.1, this command was only supported for x86 and s390 VMs
  3286  //
  3287  // Example: -> { "execute": "inject-nmi" }
  3288  // <- { "return": {} }
  3289  type InjectNmiCommand struct{}
  3290  
  3291  // Returns information about KVM acceleration
  3292  //
  3293  // Returns: @KvmInfo
  3294  //
  3295  // Since: 0.14
  3296  //
  3297  // Example: -> { "execute": "query-kvm" }
  3298  // <- { "return": { "enabled": true, "present": true } }
  3299  type QueryKvmCommand struct{}
  3300  
  3301  // Save a portion of guest memory to a file.
  3302  //
  3303  // Returns: Nothing on success
  3304  //
  3305  // Since: 0.14
  3306  //
  3307  // Notes: Errors were not reliably returned until 1.1
  3308  //
  3309  // Example: -> { "execute": "memsave",
  3310  //      "arguments": { "val": 10,
  3311  //                     "size": 100,
  3312  //                     "filename": "/tmp/virtual-mem-dump" } }
  3313  // <- { "return": {} }
  3314  type MemsaveCommand struct {
  3315  	Val      int64  `json:"val"`                 // the virtual address of the guest to start from
  3316  	Size     int64  `json:"size"`                // the size of memory region to save
  3317  	Filename string `json:"filename"`            // the file to save the memory to as binary data
  3318  	CpuIndex *int64 `json:"cpu-index,omitempty"` // the index of the virtual CPU to use for translating the virtual address (defaults to CPU 0)
  3319  }
  3320  
  3321  // Save a portion of guest physical memory to a file.
  3322  //
  3323  // Returns: Nothing on success
  3324  //
  3325  // Since: 0.14
  3326  //
  3327  // Notes: Errors were not reliably returned until 1.1
  3328  //
  3329  // Example: -> { "execute": "pmemsave",
  3330  //      "arguments": { "val": 10,
  3331  //                     "size": 100,
  3332  //                     "filename": "/tmp/physical-mem-dump" } }
  3333  // <- { "return": {} }
  3334  type PmemsaveCommand struct {
  3335  	Val      int64  `json:"val"`      // the physical address of the guest to start from
  3336  	Size     int64  `json:"size"`     // the size of memory region to save
  3337  	Filename string `json:"filename"` // the file to save the memory to as binary data
  3338  }
  3339  
  3340  // Returns information for all memory backends.
  3341  //
  3342  // Returns: a list of @Memdev.
  3343  //
  3344  // Since: 2.1
  3345  //
  3346  // Example: -> { "execute": "query-memdev" }
  3347  // <- { "return": [
  3348  //        {
  3349  //          "id": "mem1",
  3350  //          "size": 536870912,
  3351  //          "merge": false,
  3352  //          "dump": true,
  3353  //          "prealloc": false,
  3354  //          "host-nodes": [0, 1],
  3355  //          "policy": "bind"
  3356  //        },
  3357  //        {
  3358  //          "size": 536870912,
  3359  //          "merge": false,
  3360  //          "dump": true,
  3361  //          "prealloc": true,
  3362  //          "host-nodes": [2, 3],
  3363  //          "policy": "preferred"
  3364  //        }
  3365  //      ]
  3366  //    }
  3367  type QueryMemdevCommand struct{}
  3368  
  3369  // Returns: a list of HotpluggableCPU objects.
  3370  //
  3371  // Since: 2.7
  3372  //
  3373  // Example: For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
  3374  //
  3375  // -> { "execute": "query-hotpluggable-cpus" }
  3376  // <- {"return": [
  3377  //      { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
  3378  //        "vcpus-count": 1 },
  3379  //      { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
  3380  //        "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
  3381  //    ]}'
  3382  //
  3383  // For pc machine type started with -smp 1,maxcpus=2:
  3384  //
  3385  // -> { "execute": "query-hotpluggable-cpus" }
  3386  // <- {"return": [
  3387  //      {
  3388  //         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
  3389  //         "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
  3390  //      },
  3391  //      {
  3392  //         "qom-path": "/machine/unattached/device[0]",
  3393  //         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
  3394  //         "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
  3395  //      }
  3396  //    ]}
  3397  //
  3398  // For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
  3399  // (Since: 2.11):
  3400  //
  3401  // -> { "execute": "query-hotpluggable-cpus" }
  3402  // <- {"return": [
  3403  //      {
  3404  //         "type": "qemu-s390x-cpu", "vcpus-count": 1,
  3405  //         "props": { "core-id": 1 }
  3406  //      },
  3407  //      {
  3408  //         "qom-path": "/machine/unattached/device[0]",
  3409  //         "type": "qemu-s390x-cpu", "vcpus-count": 1,
  3410  //         "props": { "core-id": 0 }
  3411  //      }
  3412  //    ]}
  3413  type QueryHotpluggableCpusCommand struct{}
  3414  
  3415  // Runtime equivalent of '-numa' CLI option, available at
  3416  // preconfigure stage to configure numa mapping before initializing
  3417  // machine.
  3418  //
  3419  // Since 3.0
  3420  type SetNumaNodeCommand struct {
  3421  	NumaOptions
  3422  }
  3423  
  3424  // Request the balloon driver to change its balloon size.
  3425  //
  3426  // Returns: - Nothing on success
  3427  // - If the balloon driver is enabled but not functional because the KVM
  3428  //   kernel module cannot support it, KvmMissingCap
  3429  // - If no balloon device is present, DeviceNotActive
  3430  //
  3431  // Notes: This command just issues a request to the guest.  When it returns,
  3432  // the balloon size may not have changed.  A guest can change the balloon
  3433  // size independent of this command.
  3434  //
  3435  // Since: 0.14
  3436  //
  3437  // Example: -> { "execute": "balloon", "arguments": { "value": 536870912 } }
  3438  // <- { "return": {} }
  3439  //
  3440  // With a 2.5GiB guest this command inflated the ballon to 3GiB.
  3441  type BalloonCommand struct {
  3442  	Value int64 `json:"value"` // the target logical size of the VM in bytes. We can deduce the size of the balloon using this formula: logical_vm_size = vm_ram_size - balloon_size From it we have: balloon_size = vm_ram_size - @value
  3443  }
  3444  
  3445  // Return information about the balloon device.
  3446  //
  3447  // Returns: - @BalloonInfo on success
  3448  // - If the balloon driver is enabled but not functional because the KVM
  3449  //   kernel module cannot support it, KvmMissingCap
  3450  // - If no balloon device is present, DeviceNotActive
  3451  //
  3452  // Since: 0.14
  3453  //
  3454  // Example: -> { "execute": "query-balloon" }
  3455  // <- { "return": {
  3456  //          "actual": 1073741824,
  3457  //       }
  3458  //    }
  3459  type QueryBalloonCommand struct{}
  3460  
  3461  // Return the amount of initially allocated and present hotpluggable (if
  3462  // enabled) memory in bytes.
  3463  //
  3464  // Example: -> { "execute": "query-memory-size-summary" }
  3465  // <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
  3466  //
  3467  // Since: 2.11
  3468  type QueryMemorySizeSummaryCommand struct{}
  3469  
  3470  // Lists available memory devices and their state
  3471  //
  3472  // Since: 2.1
  3473  //
  3474  // Example: -> { "execute": "query-memory-devices" }
  3475  // <- { "return": [ { "data":
  3476  //                       { "addr": 5368709120,
  3477  //                         "hotpluggable": true,
  3478  //                         "hotplugged": true,
  3479  //                         "id": "d1",
  3480  //                         "memdev": "/objects/memX",
  3481  //                         "node": 0,
  3482  //                         "size": 1073741824,
  3483  //                         "slot": 0},
  3484  //                    "type": "dimm"
  3485  //                  } ] }
  3486  type QueryMemoryDevicesCommand struct{}
  3487  
  3488  // Query interrupt statistics
  3489  //
  3490  // Returns: interrupt statistics
  3491  //
  3492  // Since: 6.2
  3493  type XQueryIrqCommand struct{}
  3494  
  3495  // Query TCG compiler statistics
  3496  //
  3497  // Returns: TCG compiler statistics
  3498  //
  3499  // Since: 6.2
  3500  type XQueryJitCommand struct{}
  3501  
  3502  // Query NUMA topology information
  3503  //
  3504  // Returns: topology information
  3505  //
  3506  // Since: 6.2
  3507  type XQueryNumaCommand struct{}
  3508  
  3509  // Query TCG opcode counters
  3510  //
  3511  // Returns: TCG opcode counters
  3512  //
  3513  // Since: 6.2
  3514  type XQueryOpcountCommand struct{}
  3515  
  3516  // Query TCG profiling information
  3517  //
  3518  // Returns: profile information
  3519  //
  3520  // Since: 6.2
  3521  type XQueryProfileCommand struct{}
  3522  
  3523  // Query system ramblock information
  3524  //
  3525  // Returns: system ramblock information
  3526  //
  3527  // Since: 6.2
  3528  type XQueryRamblockCommand struct{}
  3529  
  3530  // Query RDMA state
  3531  //
  3532  // Returns: RDMA state
  3533  //
  3534  // Since: 6.2
  3535  type XQueryRdmaCommand struct{}
  3536  
  3537  // Query information on the registered ROMS
  3538  //
  3539  // Returns: registered ROMs
  3540  //
  3541  // Since: 6.2
  3542  type XQueryRomsCommand struct{}
  3543  
  3544  // Query information on the USB devices
  3545  //
  3546  // Returns: USB device information
  3547  //
  3548  // Since: 6.2
  3549  type XQueryUsbCommand struct{}
  3550  
  3551  // Compares two CPU models, returning how they compare in a specific
  3552  // configuration. The results indicates how both models compare regarding
  3553  // runnability. This result can be used by tooling to make decisions if a
  3554  // certain CPU model will run in a certain configuration or if a compatible
  3555  // CPU model has to be created by baselining.
  3556  //
  3557  // Usually, a CPU model is compared against the maximum possible CPU model
  3558  // of a certain configuration (e.g. the "host" model for KVM). If that CPU
  3559  // model is identical or a subset, it will run in that configuration.
  3560  //
  3561  // The result returned by this command may be affected by:
  3562  //
  3563  // * QEMU version: CPU models may look different depending on the QEMU version.
  3564  //   (Except for CPU models reported as "static" in query-cpu-definitions.)
  3565  // * machine-type: CPU model may look different depending on the machine-type.
  3566  //   (Except for CPU models reported as "static" in query-cpu-definitions.)
  3567  // * machine options (including accelerator): in some architectures, CPU models
  3568  //   may look different depending on machine and accelerator options. (Except for
  3569  //   CPU models reported as "static" in query-cpu-definitions.)
  3570  // * "-cpu" arguments and global properties: arguments to the -cpu option and
  3571  //   global properties may affect expansion of CPU models. Using
  3572  //   query-cpu-model-expansion while using these is not advised.
  3573  //
  3574  // Some architectures may not support comparing CPU models. s390x supports
  3575  // comparing CPU models.
  3576  //
  3577  // Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
  3578  // not supported, if a model cannot be used, if a model contains
  3579  // an unknown cpu definition name, unknown properties or properties
  3580  // with wrong types.
  3581  //
  3582  // Note: this command isn't specific to s390x, but is only implemented
  3583  // on this architecture currently.
  3584  //
  3585  // Since: 2.8
  3586  type QueryCpuModelComparisonCommand struct {
  3587  	Modela CpuModelInfo `json:"modela"`
  3588  	Modelb CpuModelInfo `json:"modelb"`
  3589  }
  3590  
  3591  // Baseline two CPU models, creating a compatible third model. The created
  3592  // model will always be a static, migration-safe CPU model (see "static"
  3593  // CPU model expansion for details).
  3594  //
  3595  // This interface can be used by tooling to create a compatible CPU model out
  3596  // two CPU models. The created CPU model will be identical to or a subset of
  3597  // both CPU models when comparing them. Therefore, the created CPU model is
  3598  // guaranteed to run where the given CPU models run.
  3599  //
  3600  // The result returned by this command may be affected by:
  3601  //
  3602  // * QEMU version: CPU models may look different depending on the QEMU version.
  3603  //   (Except for CPU models reported as "static" in query-cpu-definitions.)
  3604  // * machine-type: CPU model may look different depending on the machine-type.
  3605  //   (Except for CPU models reported as "static" in query-cpu-definitions.)
  3606  // * machine options (including accelerator): in some architectures, CPU models
  3607  //   may look different depending on machine and accelerator options. (Except for
  3608  //   CPU models reported as "static" in query-cpu-definitions.)
  3609  // * "-cpu" arguments and global properties: arguments to the -cpu option and
  3610  //   global properties may affect expansion of CPU models. Using
  3611  //   query-cpu-model-expansion while using these is not advised.
  3612  //
  3613  // Some architectures may not support baselining CPU models. s390x supports
  3614  // baselining CPU models.
  3615  //
  3616  // Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
  3617  // not supported, if a model cannot be used, if a model contains
  3618  // an unknown cpu definition name, unknown properties or properties
  3619  // with wrong types.
  3620  //
  3621  // Note: this command isn't specific to s390x, but is only implemented
  3622  // on this architecture currently.
  3623  //
  3624  // Since: 2.8
  3625  type QueryCpuModelBaselineCommand struct {
  3626  	Modela CpuModelInfo `json:"modela"`
  3627  	Modelb CpuModelInfo `json:"modelb"`
  3628  }
  3629  
  3630  // Expands a given CPU model (or a combination of CPU model + additional options)
  3631  // to different granularities, allowing tooling to get an understanding what a
  3632  // specific CPU model looks like in QEMU under a certain configuration.
  3633  //
  3634  // This interface can be used to query the "host" CPU model.
  3635  //
  3636  // The data returned by this command may be affected by:
  3637  //
  3638  // * QEMU version: CPU models may look different depending on the QEMU version.
  3639  //   (Except for CPU models reported as "static" in query-cpu-definitions.)
  3640  // * machine-type: CPU model  may look different depending on the machine-type.
  3641  //   (Except for CPU models reported as "static" in query-cpu-definitions.)
  3642  // * machine options (including accelerator): in some architectures, CPU models
  3643  //   may look different depending on machine and accelerator options. (Except for
  3644  //   CPU models reported as "static" in query-cpu-definitions.)
  3645  // * "-cpu" arguments and global properties: arguments to the -cpu option and
  3646  //   global properties may affect expansion of CPU models. Using
  3647  //   query-cpu-model-expansion while using these is not advised.
  3648  //
  3649  // Some architectures may not support all expansion types. s390x supports
  3650  // "full" and "static". Arm only supports "full".
  3651  //
  3652  // Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
  3653  // not supported, if the model cannot be expanded, if the model contains
  3654  // an unknown CPU definition name, unknown properties or properties
  3655  // with a wrong type. Also returns an error if an expansion type is
  3656  // not supported.
  3657  //
  3658  // Since: 2.8
  3659  type QueryCpuModelExpansionCommand struct {
  3660  	Type  CpuModelExpansionType `json:"type"`
  3661  	Model CpuModelInfo          `json:"model"`
  3662  }
  3663  
  3664  // Return a list of supported virtual CPU definitions
  3665  //
  3666  // Returns: a list of CpuDefInfo
  3667  //
  3668  // Since: 1.2
  3669  type QueryCpuDefinitionsCommand struct{}
  3670  
  3671  // Retrieve the record/replay information.
  3672  // It includes current instruction count which may be used for
  3673  // @replay-break and @replay-seek commands.
  3674  //
  3675  // Returns: record/replay information.
  3676  //
  3677  // Since: 5.2
  3678  //
  3679  // Example: -> { "execute": "query-replay" }
  3680  // <- { "return": { "mode": "play", "filename": "log.rr", "icount": 220414 } }
  3681  type QueryReplayCommand struct{}
  3682  
  3683  // Set replay breakpoint at instruction count @icount.
  3684  // Execution stops when the specified instruction is reached.
  3685  // There can be at most one breakpoint. When breakpoint is set, any prior
  3686  // one is removed.  The breakpoint may be set only in replay mode and only
  3687  // "in the future", i.e. at instruction counts greater than the current one.
  3688  // The current instruction count can be observed with @query-replay.
  3689  //
  3690  // Since: 5.2
  3691  //
  3692  // Example: -> { "execute": "replay-break", "data": { "icount": 220414 } }
  3693  type ReplayBreakCommand struct {
  3694  	Icount int64 `json:"icount"` // instruction count to stop at
  3695  }
  3696  
  3697  // Remove replay breakpoint which was set with @replay-break.
  3698  // The command is ignored when there are no replay breakpoints.
  3699  //
  3700  // Since: 5.2
  3701  //
  3702  // Example: -> { "execute": "replay-delete-break" }
  3703  type ReplayDeleteBreakCommand struct{}
  3704  
  3705  // Automatically proceed to the instruction count @icount, when
  3706  // replaying the execution. The command automatically loads nearest
  3707  // snapshot and replays the execution to find the desired instruction.
  3708  // When there is no preceding snapshot or the execution is not replayed,
  3709  // then the command fails.
  3710  // icount for the reference may be obtained with @query-replay command.
  3711  //
  3712  // Since: 5.2
  3713  //
  3714  // Example: -> { "execute": "replay-seek", "data": { "icount": 220414 } }
  3715  type ReplaySeekCommand struct {
  3716  	Icount int64 `json:"icount"` // target instruction count
  3717  }
  3718  
  3719  // Try to recover from hanging QEMU by yanking the specified instances. See
  3720  // @YankInstance for more information.
  3721  //
  3722  // Takes a list of @YankInstance as argument.
  3723  //
  3724  // Returns: - Nothing on success
  3725  // - @DeviceNotFound error, if any of the YankInstances doesn't exist
  3726  //
  3727  // Example: -> { "execute": "yank",
  3728  //      "arguments": {
  3729  //          "instances": [
  3730  //               { "type": "block-node",
  3731  //                 "node-name": "nbd0" }
  3732  //          ] } }
  3733  // <- { "return": {} }
  3734  //
  3735  // Since: 6.0
  3736  type YankCommand struct {
  3737  	Instances []YankInstance `json:"instances"`
  3738  }
  3739  
  3740  // Query yank instances. See @YankInstance for more information.
  3741  //
  3742  // Returns: list of @YankInstance
  3743  //
  3744  // Example: -> { "execute": "query-yank" }
  3745  // <- { "return": [
  3746  //          { "type": "block-node",
  3747  //            "node-name": "nbd0" }
  3748  //      ] }
  3749  //
  3750  // Since: 6.0
  3751  type QueryYankCommand struct{}
  3752  
  3753  // Allow client connections for VNC, Spice and socket based
  3754  // character devices to be passed in to QEMU via SCM_RIGHTS.
  3755  //
  3756  // Returns: nothing on success.
  3757  //
  3758  // Since: 0.14
  3759  //
  3760  // Example: -> { "execute": "add_client", "arguments": { "protocol": "vnc",
  3761  //                                              "fdname": "myclient" } }
  3762  // <- { "return": {} }
  3763  type AddClientCommand struct {
  3764  	Protocol string `json:"protocol"`           // protocol name. Valid names are "vnc", "spice", "@dbus-display" or the name of a character device (eg. from -chardev id=XXXX)
  3765  	Fdname   string `json:"fdname"`             // file descriptor name previously passed via 'getfd' command
  3766  	Skipauth *bool  `json:"skipauth,omitempty"` // whether to skip authentication. Only applies to "vnc" and "spice" protocols
  3767  	Tls      *bool  `json:"tls,omitempty"`      // whether to perform TLS. Only applies to the "spice" protocol
  3768  }
  3769  
  3770  // Return the name information of a guest.
  3771  //
  3772  // Returns: @NameInfo of the guest
  3773  //
  3774  // Since: 0.14
  3775  //
  3776  // Example: -> { "execute": "query-name" }
  3777  // <- { "return": { "name": "qemu-name" } }
  3778  type QueryNameCommand struct{}
  3779  
  3780  // Returns a list of information about each iothread.
  3781  //
  3782  // Note: this list excludes the QEMU main loop thread, which is not declared
  3783  // using the -object iothread command-line option.  It is always the main thread
  3784  // of the process.
  3785  //
  3786  // Returns: a list of @IOThreadInfo for each iothread
  3787  //
  3788  // Since: 2.0
  3789  //
  3790  // Example: -> { "execute": "query-iothreads" }
  3791  // <- { "return": [
  3792  //          {
  3793  //             "id":"iothread0",
  3794  //             "thread-id":3134
  3795  //          },
  3796  //          {
  3797  //             "id":"iothread1",
  3798  //             "thread-id":3135
  3799  //          }
  3800  //       ]
  3801  //    }
  3802  type QueryIothreadsCommand struct{}
  3803  
  3804  // Stop all guest VCPU execution.
  3805  //
  3806  // Since: 0.14
  3807  //
  3808  // Notes: This function will succeed even if the guest is already in the stopped
  3809  // state.  In "inmigrate" state, it will ensure that the guest
  3810  // remains paused once migration finishes, as if the -S option was
  3811  // passed on the command line.
  3812  //
  3813  // Example: -> { "execute": "stop" }
  3814  // <- { "return": {} }
  3815  type StopCommand struct{}
  3816  
  3817  // Resume guest VCPU execution.
  3818  //
  3819  // Since: 0.14
  3820  //
  3821  // Returns: If successful, nothing
  3822  //
  3823  // Notes: This command will succeed if the guest is currently running.  It
  3824  // will also succeed if the guest is in the "inmigrate" state; in
  3825  // this case, the effect of the command is to make sure the guest
  3826  // starts once migration finishes, removing the effect of the -S
  3827  // command line option if it was passed.
  3828  //
  3829  // Example: -> { "execute": "cont" }
  3830  // <- { "return": {} }
  3831  type ContCommand struct{}
  3832  
  3833  // Exit from "preconfig" state
  3834  //
  3835  // This command makes QEMU exit the preconfig state and proceed with
  3836  // VM initialization using configuration data provided on the command line
  3837  // and via the QMP monitor during the preconfig state. The command is only
  3838  // available during the preconfig state (i.e. when the --preconfig command
  3839  // line option was in use).
  3840  //
  3841  // None: Since 3.0
  3842  //
  3843  // Returns: nothing
  3844  //
  3845  // Example: -> { "execute": "x-exit-preconfig" }
  3846  // <- { "return": {} }
  3847  type XExitPreconfigCommand struct{}
  3848  
  3849  // Execute a command on the human monitor and return the output.
  3850  //
  3851  // Returns: the output of the command as a string
  3852  //
  3853  // Since: 0.14
  3854  //
  3855  // Notes: This command only exists as a stop-gap.  Its use is highly
  3856  // discouraged.  The semantics of this command are not
  3857  // guaranteed: this means that command names, arguments and
  3858  // responses can change or be removed at ANY time.  Applications
  3859  // that rely on long term stability guarantees should NOT
  3860  // use this command.
  3861  //
  3862  // Known limitations:
  3863  //
  3864  // * This command is stateless, this means that commands that depend
  3865  //   on state information (such as getfd) might not work
  3866  //
  3867  // * Commands that prompt the user for data don't currently work
  3868  //
  3869  // Example: -> { "execute": "human-monitor-command",
  3870  //      "arguments": { "command-line": "info kvm" } }
  3871  // <- { "return": "kvm support: enabled\r\n" }
  3872  type HumanMonitorCommandCommand struct {
  3873  	CommandLine string `json:"command-line"`        // the command to execute in the human monitor
  3874  	CpuIndex    *int64 `json:"cpu-index,omitempty"` // The CPU to use for commands that require an implicit CPU
  3875  }
  3876  
  3877  // Receive a file descriptor via SCM rights and assign it a name
  3878  //
  3879  // Returns: Nothing on success
  3880  //
  3881  // Since: 0.14
  3882  //
  3883  // Notes: If @fdname already exists, the file descriptor assigned to
  3884  // it will be closed and replaced by the received file
  3885  // descriptor.
  3886  //
  3887  // The 'closefd' command can be used to explicitly close the
  3888  // file descriptor when it is no longer needed.
  3889  //
  3890  // Example: -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
  3891  // <- { "return": {} }
  3892  type GetfdCommand struct {
  3893  	Fdname string `json:"fdname"` // file descriptor name
  3894  }
  3895  
  3896  // Close a file descriptor previously passed via SCM rights
  3897  //
  3898  // Returns: Nothing on success
  3899  //
  3900  // Since: 0.14
  3901  //
  3902  // Example: -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
  3903  // <- { "return": {} }
  3904  type ClosefdCommand struct {
  3905  	Fdname string `json:"fdname"` // file descriptor name
  3906  }
  3907  
  3908  // Add a file descriptor, that was passed via SCM rights, to an fd set.
  3909  //
  3910  // Returns: - @AddfdInfo on success
  3911  // - If file descriptor was not received, FdNotSupplied
  3912  // - If @fdset-id is a negative value, InvalidParameterValue
  3913  //
  3914  // Notes: The list of fd sets is shared by all monitor connections.
  3915  //
  3916  // If @fdset-id is not specified, a new fd set will be created.
  3917  //
  3918  // Since: 1.2
  3919  //
  3920  // Example: -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
  3921  // <- { "return": { "fdset-id": 1, "fd": 3 } }
  3922  type AddFdCommand struct {
  3923  	FdsetId *int64  `json:"fdset-id,omitempty"` // The ID of the fd set to add the file descriptor to.
  3924  	Opaque  *string `json:"opaque,omitempty"`   // A free-form string that can be used to describe the fd.
  3925  }
  3926  
  3927  // Remove a file descriptor from an fd set.
  3928  //
  3929  // Returns: - Nothing on success
  3930  // - If @fdset-id or @fd is not found, FdNotFound
  3931  //
  3932  // Since: 1.2
  3933  //
  3934  // Notes: The list of fd sets is shared by all monitor connections.
  3935  //
  3936  // If @fd is not specified, all file descriptors in @fdset-id
  3937  // will be removed.
  3938  //
  3939  // Example: -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
  3940  // <- { "return": {} }
  3941  type RemoveFdCommand struct {
  3942  	FdsetId int64  `json:"fdset-id"`     // The ID of the fd set that the file descriptor belongs to.
  3943  	Fd      *int64 `json:"fd,omitempty"` // The file descriptor that is to be removed.
  3944  }
  3945  
  3946  // Return information describing all fd sets.
  3947  //
  3948  // Returns: A list of @FdsetInfo
  3949  //
  3950  // Since: 1.2
  3951  //
  3952  // Note: The list of fd sets is shared by all monitor connections.
  3953  //
  3954  // Example: -> { "execute": "query-fdsets" }
  3955  // <- { "return": [
  3956  //        {
  3957  //          "fds": [
  3958  //            {
  3959  //              "fd": 30,
  3960  //              "opaque": "rdonly:/path/to/file"
  3961  //            },
  3962  //            {
  3963  //              "fd": 24,
  3964  //              "opaque": "rdwr:/path/to/file"
  3965  //            }
  3966  //          ],
  3967  //          "fdset-id": 1
  3968  //        },
  3969  //        {
  3970  //          "fds": [
  3971  //            {
  3972  //              "fd": 28
  3973  //            },
  3974  //            {
  3975  //              "fd": 29
  3976  //            }
  3977  //          ],
  3978  //          "fdset-id": 0
  3979  //        }
  3980  //      ]
  3981  //    }
  3982  type QueryFdsetsCommand struct{}
  3983  
  3984  // Query command line option schema.
  3985  //
  3986  // Returns: list of @CommandLineOptionInfo for all options (or for the given
  3987  // @option).  Returns an error if the given @option doesn't exist.
  3988  //
  3989  // Since: 1.5
  3990  //
  3991  // Example: -> { "execute": "query-command-line-options",
  3992  //      "arguments": { "option": "option-rom" } }
  3993  // <- { "return": [
  3994  //         {
  3995  //             "parameters": [
  3996  //                 {
  3997  //                     "name": "romfile",
  3998  //                     "type": "string"
  3999  //                 },
  4000  //                 {
  4001  //                     "name": "bootindex",
  4002  //                     "type": "number"
  4003  //                 }
  4004  //             ],
  4005  //             "option": "option-rom"
  4006  //         }
  4007  //      ]
  4008  //    }
  4009  type QueryCommandLineOptionsCommand struct {
  4010  	Option *string `json:"option,omitempty"` // option name
  4011  }
  4012  
  4013  // This command will reset the RTC interrupt reinjection backlog.
  4014  // Can be used if another mechanism to synchronize guest time
  4015  // is in effect, for example QEMU guest agent's guest-set-time
  4016  // command.
  4017  //
  4018  // Since: 2.1
  4019  //
  4020  // Example: -> { "execute": "rtc-reset-reinjection" }
  4021  // <- { "return": {} }
  4022  type RtcResetReinjectionCommand struct{}
  4023  
  4024  // Returns information about SEV
  4025  //
  4026  // Returns: @SevInfo
  4027  //
  4028  // Since: 2.12
  4029  //
  4030  // Example: -> { "execute": "query-sev" }
  4031  // <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
  4032  //                  "build-id" : 0, "policy" : 0, "state" : "running",
  4033  //                  "handle" : 1 } }
  4034  type QuerySevCommand struct{}
  4035  
  4036  // Query the SEV guest launch information.
  4037  //
  4038  // Returns: The @SevLaunchMeasureInfo for the guest
  4039  //
  4040  // Since: 2.12
  4041  //
  4042  // Example: -> { "execute": "query-sev-launch-measure" }
  4043  // <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
  4044  type QuerySevLaunchMeasureCommand struct{}
  4045  
  4046  // This command is used to get the SEV capabilities, and is supported on AMD
  4047  // X86 platforms only.
  4048  //
  4049  // Returns: SevCapability objects.
  4050  //
  4051  // Since: 2.12
  4052  //
  4053  // Example: -> { "execute": "query-sev-capabilities" }
  4054  // <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
  4055  //                  "cbitpos": 47, "reduced-phys-bits": 5}}
  4056  type QuerySevCapabilitiesCommand struct{}
  4057  
  4058  // This command injects a secret blob into memory of SEV guest.
  4059  //
  4060  // Since: 6.0
  4061  type SevInjectLaunchSecretCommand struct {
  4062  	PacketHeader string  `json:"packet-header"` // the launch secret packet header encoded in base64
  4063  	Secret       string  `json:"secret"`        // the launch secret data to be injected encoded in base64
  4064  	Gpa          *uint64 `json:"gpa,omitempty"` // the guest physical address where secret will be injected.
  4065  }
  4066  
  4067  // This command is used to get the SEV attestation report, and is
  4068  // supported on AMD X86 platforms only.
  4069  //
  4070  // Returns: SevAttestationReport objects.
  4071  //
  4072  // Since: 6.1
  4073  //
  4074  // Example: -> { "execute" : "query-sev-attestation-report",
  4075  //                  "arguments": { "mnonce": "aaaaaaa" } }
  4076  // <- { "return" : { "data": "aaaaaaaabbbddddd"} }
  4077  type QuerySevAttestationReportCommand struct {
  4078  	Mnonce string `json:"mnonce"` // a random 16 bytes value encoded in base64 (it will be included in report)
  4079  }
  4080  
  4081  // Dump guest's storage keys
  4082  //
  4083  // None: This command is only supported on s390 architecture.
  4084  //
  4085  // Since: 2.5
  4086  //
  4087  // Example: -> { "execute": "dump-skeys",
  4088  //      "arguments": { "filename": "/tmp/skeys" } }
  4089  // <- { "return": {} }
  4090  type DumpSkeysCommand struct {
  4091  	Filename string `json:"filename"` // the path to the file to dump to
  4092  }
  4093  
  4094  // This command is ARM-only. It will return a list of GICCapability
  4095  // objects that describe its capability bits.
  4096  //
  4097  // Returns: a list of GICCapability objects.
  4098  //
  4099  // Since: 2.6
  4100  //
  4101  // Example: -> { "execute": "query-gic-capabilities" }
  4102  // <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
  4103  //                 { "version": 3, "emulated": false, "kernel": true } ] }
  4104  type QueryGicCapabilitiesCommand struct{}
  4105  
  4106  // Returns information about SGX
  4107  //
  4108  // Returns: @SGXInfo
  4109  //
  4110  // Since: 6.2
  4111  //
  4112  // Example: -> { "execute": "query-sgx" }
  4113  // <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
  4114  //                  "flc": true,  "section-size" : 96468992,
  4115  //                  "sections": [{"node": 0, "size": 67108864},
  4116  //                  {"node": 1, "size": 29360128}]} }
  4117  type QuerySgxCommand struct{}
  4118  
  4119  // Returns information from host SGX capabilities
  4120  //
  4121  // Returns: @SGXInfo
  4122  //
  4123  // Since: 6.2
  4124  //
  4125  // Example: -> { "execute": "query-sgx-capabilities" }
  4126  // <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
  4127  //                  "flc": true, "section-size" : 96468992,
  4128  //                  "section" : [{"node": 0, "size": 67108864},
  4129  //                  {"node": 1, "size": 29360128}]} }
  4130  type QuerySgxCapabilitiesCommand struct{}
  4131  
  4132  // Return a list of ACPIOSTInfo for devices that support status
  4133  // reporting via ACPI _OST method.
  4134  //
  4135  // Since: 2.1
  4136  //
  4137  // Example: -> { "execute": "query-acpi-ospm-status" }
  4138  // <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
  4139  //                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
  4140  //                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
  4141  //                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
  4142  //    ]}
  4143  type QueryAcpiOspmStatusCommand struct{}
  4144  
  4145  // Return information about the PCI bus topology of the guest.
  4146  //
  4147  // Returns: a list of @PciInfo for each PCI bus. Each bus is
  4148  // represented by a json-object, which has a key with a json-array of
  4149  // all PCI devices attached to it. Each device is represented by a
  4150  // json-object.
  4151  //
  4152  // Since: 0.14
  4153  //
  4154  // Example: -> { "execute": "query-pci" }
  4155  // <- { "return": [
  4156  //          {
  4157  //             "bus": 0,
  4158  //             "devices": [
  4159  //                {
  4160  //                   "bus": 0,
  4161  //                   "qdev_id": "",
  4162  //                   "slot": 0,
  4163  //                   "class_info": {
  4164  //                      "class": 1536,
  4165  //                      "desc": "Host bridge"
  4166  //                   },
  4167  //                   "id": {
  4168  //                      "device": 32902,
  4169  //                      "vendor": 4663
  4170  //                   },
  4171  //                   "function": 0,
  4172  //                   "regions": [
  4173  //                   ]
  4174  //                },
  4175  //                {
  4176  //                   "bus": 0,
  4177  //                   "qdev_id": "",
  4178  //                   "slot": 1,
  4179  //                   "class_info": {
  4180  //                      "class": 1537,
  4181  //                      "desc": "ISA bridge"
  4182  //                   },
  4183  //                   "id": {
  4184  //                      "device": 32902,
  4185  //                      "vendor": 28672
  4186  //                   },
  4187  //                   "function": 0,
  4188  //                   "regions": [
  4189  //                   ]
  4190  //                },
  4191  //                {
  4192  //                   "bus": 0,
  4193  //                   "qdev_id": "",
  4194  //                   "slot": 1,
  4195  //                   "class_info": {
  4196  //                      "class": 257,
  4197  //                      "desc": "IDE controller"
  4198  //                   },
  4199  //                   "id": {
  4200  //                      "device": 32902,
  4201  //                      "vendor": 28688
  4202  //                   },
  4203  //                   "function": 1,
  4204  //                   "regions": [
  4205  //                      {
  4206  //                         "bar": 4,
  4207  //                         "size": 16,
  4208  //                         "address": 49152,
  4209  //                         "type": "io"
  4210  //                      }
  4211  //                   ]
  4212  //                },
  4213  //                {
  4214  //                   "bus": 0,
  4215  //                   "qdev_id": "",
  4216  //                   "slot": 2,
  4217  //                   "class_info": {
  4218  //                      "class": 768,
  4219  //                      "desc": "VGA controller"
  4220  //                   },
  4221  //                   "id": {
  4222  //                      "device": 4115,
  4223  //                      "vendor": 184
  4224  //                   },
  4225  //                   "function": 0,
  4226  //                   "regions": [
  4227  //                      {
  4228  //                         "prefetch": true,
  4229  //                         "mem_type_64": false,
  4230  //                         "bar": 0,
  4231  //                         "size": 33554432,
  4232  //                         "address": 4026531840,
  4233  //                         "type": "memory"
  4234  //                      },
  4235  //                      {
  4236  //                         "prefetch": false,
  4237  //                         "mem_type_64": false,
  4238  //                         "bar": 1,
  4239  //                         "size": 4096,
  4240  //                         "address": 4060086272,
  4241  //                         "type": "memory"
  4242  //                      },
  4243  //                      {
  4244  //                         "prefetch": false,
  4245  //                         "mem_type_64": false,
  4246  //                         "bar": 6,
  4247  //                         "size": 65536,
  4248  //                         "address": -1,
  4249  //                         "type": "memory"
  4250  //                      }
  4251  //                   ]
  4252  //                },
  4253  //                {
  4254  //                   "bus": 0,
  4255  //                   "qdev_id": "",
  4256  //                   "irq": 11,
  4257  //                   "slot": 4,
  4258  //                   "class_info": {
  4259  //                      "class": 1280,
  4260  //                      "desc": "RAM controller"
  4261  //                   },
  4262  //                   "id": {
  4263  //                      "device": 6900,
  4264  //                      "vendor": 4098
  4265  //                   },
  4266  //                   "function": 0,
  4267  //                   "regions": [
  4268  //                      {
  4269  //                         "bar": 0,
  4270  //                         "size": 32,
  4271  //                         "address": 49280,
  4272  //                         "type": "io"
  4273  //                      }
  4274  //                   ]
  4275  //                }
  4276  //             ]
  4277  //          }
  4278  //       ]
  4279  //    }
  4280  //
  4281  // Note: This example has been shortened as the real response is too long.
  4282  type QueryPciCommand struct{}
  4283  
  4284  type CommandBase struct {
  4285  	Name string `json:"execute"`
  4286  }
  4287  
  4288  type Command struct {
  4289  	CommandBase
  4290  	Arg Any `json:"arguments,omitempty"`
  4291  }
  4292  
  4293  func (s *Command) UnmarshalJSON(data []byte) error {
  4294  
  4295  	var base CommandBase
  4296  	if err := json.Unmarshal(data, &base); err != nil {
  4297  		return err
  4298  	}
  4299  	s.CommandBase = base
  4300  
  4301  	switch base.Name {
  4302  	case "add-fd":
  4303  		tmp := struct {
  4304  			Value *AddFdCommand `json:"arguments,omitempty"`
  4305  		}{}
  4306  		if err := json.Unmarshal(data, &tmp); err != nil {
  4307  			return err
  4308  		}
  4309  		if tmp.Value == nil {
  4310  			s.Arg = nil
  4311  		} else {
  4312  			s.Arg = *tmp.Value
  4313  		}
  4314  	case "add_client":
  4315  		tmp := struct {
  4316  			Value *AddClientCommand `json:"arguments,omitempty"`
  4317  		}{}
  4318  		if err := json.Unmarshal(data, &tmp); err != nil {
  4319  			return err
  4320  		}
  4321  		if tmp.Value == nil {
  4322  			s.Arg = nil
  4323  		} else {
  4324  			s.Arg = *tmp.Value
  4325  		}
  4326  	case "announce-self":
  4327  		tmp := struct {
  4328  			Value *AnnounceSelfCommand `json:"arguments,omitempty"`
  4329  		}{}
  4330  		if err := json.Unmarshal(data, &tmp); err != nil {
  4331  			return err
  4332  		}
  4333  		if tmp.Value == nil {
  4334  			s.Arg = nil
  4335  		} else {
  4336  			s.Arg = *tmp.Value
  4337  		}
  4338  	case "balloon":
  4339  		tmp := struct {
  4340  			Value *BalloonCommand `json:"arguments,omitempty"`
  4341  		}{}
  4342  		if err := json.Unmarshal(data, &tmp); err != nil {
  4343  			return err
  4344  		}
  4345  		if tmp.Value == nil {
  4346  			s.Arg = nil
  4347  		} else {
  4348  			s.Arg = *tmp.Value
  4349  		}
  4350  	case "block-commit":
  4351  		tmp := struct {
  4352  			Value *BlockCommitCommand `json:"arguments,omitempty"`
  4353  		}{}
  4354  		if err := json.Unmarshal(data, &tmp); err != nil {
  4355  			return err
  4356  		}
  4357  		if tmp.Value == nil {
  4358  			s.Arg = nil
  4359  		} else {
  4360  			s.Arg = *tmp.Value
  4361  		}
  4362  	case "block-dirty-bitmap-add":
  4363  		tmp := struct {
  4364  			Value *BlockDirtyBitmapAddCommand `json:"arguments,omitempty"`
  4365  		}{}
  4366  		if err := json.Unmarshal(data, &tmp); err != nil {
  4367  			return err
  4368  		}
  4369  		if tmp.Value == nil {
  4370  			s.Arg = nil
  4371  		} else {
  4372  			s.Arg = *tmp.Value
  4373  		}
  4374  	case "block-dirty-bitmap-clear":
  4375  		tmp := struct {
  4376  			Value *BlockDirtyBitmapClearCommand `json:"arguments,omitempty"`
  4377  		}{}
  4378  		if err := json.Unmarshal(data, &tmp); err != nil {
  4379  			return err
  4380  		}
  4381  		if tmp.Value == nil {
  4382  			s.Arg = nil
  4383  		} else {
  4384  			s.Arg = *tmp.Value
  4385  		}
  4386  	case "block-dirty-bitmap-disable":
  4387  		tmp := struct {
  4388  			Value *BlockDirtyBitmapDisableCommand `json:"arguments,omitempty"`
  4389  		}{}
  4390  		if err := json.Unmarshal(data, &tmp); err != nil {
  4391  			return err
  4392  		}
  4393  		if tmp.Value == nil {
  4394  			s.Arg = nil
  4395  		} else {
  4396  			s.Arg = *tmp.Value
  4397  		}
  4398  	case "block-dirty-bitmap-enable":
  4399  		tmp := struct {
  4400  			Value *BlockDirtyBitmapEnableCommand `json:"arguments,omitempty"`
  4401  		}{}
  4402  		if err := json.Unmarshal(data, &tmp); err != nil {
  4403  			return err
  4404  		}
  4405  		if tmp.Value == nil {
  4406  			s.Arg = nil
  4407  		} else {
  4408  			s.Arg = *tmp.Value
  4409  		}
  4410  	case "block-dirty-bitmap-merge":
  4411  		tmp := struct {
  4412  			Value *BlockDirtyBitmapMergeCommand `json:"arguments,omitempty"`
  4413  		}{}
  4414  		if err := json.Unmarshal(data, &tmp); err != nil {
  4415  			return err
  4416  		}
  4417  		if tmp.Value == nil {
  4418  			s.Arg = nil
  4419  		} else {
  4420  			s.Arg = *tmp.Value
  4421  		}
  4422  	case "block-dirty-bitmap-remove":
  4423  		tmp := struct {
  4424  			Value *BlockDirtyBitmapRemoveCommand `json:"arguments,omitempty"`
  4425  		}{}
  4426  		if err := json.Unmarshal(data, &tmp); err != nil {
  4427  			return err
  4428  		}
  4429  		if tmp.Value == nil {
  4430  			s.Arg = nil
  4431  		} else {
  4432  			s.Arg = *tmp.Value
  4433  		}
  4434  	case "block-export-add":
  4435  		tmp := struct {
  4436  			Value *BlockExportAddCommand `json:"arguments,omitempty"`
  4437  		}{}
  4438  		if err := json.Unmarshal(data, &tmp); err != nil {
  4439  			return err
  4440  		}
  4441  		if tmp.Value == nil {
  4442  			s.Arg = nil
  4443  		} else {
  4444  			s.Arg = *tmp.Value
  4445  		}
  4446  	case "block-export-del":
  4447  		tmp := struct {
  4448  			Value *BlockExportDelCommand `json:"arguments,omitempty"`
  4449  		}{}
  4450  		if err := json.Unmarshal(data, &tmp); err != nil {
  4451  			return err
  4452  		}
  4453  		if tmp.Value == nil {
  4454  			s.Arg = nil
  4455  		} else {
  4456  			s.Arg = *tmp.Value
  4457  		}
  4458  	case "block-job-cancel":
  4459  		tmp := struct {
  4460  			Value *BlockJobCancelCommand `json:"arguments,omitempty"`
  4461  		}{}
  4462  		if err := json.Unmarshal(data, &tmp); err != nil {
  4463  			return err
  4464  		}
  4465  		if tmp.Value == nil {
  4466  			s.Arg = nil
  4467  		} else {
  4468  			s.Arg = *tmp.Value
  4469  		}
  4470  	case "block-job-complete":
  4471  		tmp := struct {
  4472  			Value *BlockJobCompleteCommand `json:"arguments,omitempty"`
  4473  		}{}
  4474  		if err := json.Unmarshal(data, &tmp); err != nil {
  4475  			return err
  4476  		}
  4477  		if tmp.Value == nil {
  4478  			s.Arg = nil
  4479  		} else {
  4480  			s.Arg = *tmp.Value
  4481  		}
  4482  	case "block-job-dismiss":
  4483  		tmp := struct {
  4484  			Value *BlockJobDismissCommand `json:"arguments,omitempty"`
  4485  		}{}
  4486  		if err := json.Unmarshal(data, &tmp); err != nil {
  4487  			return err
  4488  		}
  4489  		if tmp.Value == nil {
  4490  			s.Arg = nil
  4491  		} else {
  4492  			s.Arg = *tmp.Value
  4493  		}
  4494  	case "block-job-finalize":
  4495  		tmp := struct {
  4496  			Value *BlockJobFinalizeCommand `json:"arguments,omitempty"`
  4497  		}{}
  4498  		if err := json.Unmarshal(data, &tmp); err != nil {
  4499  			return err
  4500  		}
  4501  		if tmp.Value == nil {
  4502  			s.Arg = nil
  4503  		} else {
  4504  			s.Arg = *tmp.Value
  4505  		}
  4506  	case "block-job-pause":
  4507  		tmp := struct {
  4508  			Value *BlockJobPauseCommand `json:"arguments,omitempty"`
  4509  		}{}
  4510  		if err := json.Unmarshal(data, &tmp); err != nil {
  4511  			return err
  4512  		}
  4513  		if tmp.Value == nil {
  4514  			s.Arg = nil
  4515  		} else {
  4516  			s.Arg = *tmp.Value
  4517  		}
  4518  	case "block-job-resume":
  4519  		tmp := struct {
  4520  			Value *BlockJobResumeCommand `json:"arguments,omitempty"`
  4521  		}{}
  4522  		if err := json.Unmarshal(data, &tmp); err != nil {
  4523  			return err
  4524  		}
  4525  		if tmp.Value == nil {
  4526  			s.Arg = nil
  4527  		} else {
  4528  			s.Arg = *tmp.Value
  4529  		}
  4530  	case "block-job-set-speed":
  4531  		tmp := struct {
  4532  			Value *BlockJobSetSpeedCommand `json:"arguments,omitempty"`
  4533  		}{}
  4534  		if err := json.Unmarshal(data, &tmp); err != nil {
  4535  			return err
  4536  		}
  4537  		if tmp.Value == nil {
  4538  			s.Arg = nil
  4539  		} else {
  4540  			s.Arg = *tmp.Value
  4541  		}
  4542  	case "block-latency-histogram-set":
  4543  		tmp := struct {
  4544  			Value *BlockLatencyHistogramSetCommand `json:"arguments,omitempty"`
  4545  		}{}
  4546  		if err := json.Unmarshal(data, &tmp); err != nil {
  4547  			return err
  4548  		}
  4549  		if tmp.Value == nil {
  4550  			s.Arg = nil
  4551  		} else {
  4552  			s.Arg = *tmp.Value
  4553  		}
  4554  	case "block-set-write-threshold":
  4555  		tmp := struct {
  4556  			Value *BlockSetWriteThresholdCommand `json:"arguments,omitempty"`
  4557  		}{}
  4558  		if err := json.Unmarshal(data, &tmp); err != nil {
  4559  			return err
  4560  		}
  4561  		if tmp.Value == nil {
  4562  			s.Arg = nil
  4563  		} else {
  4564  			s.Arg = *tmp.Value
  4565  		}
  4566  	case "block-stream":
  4567  		tmp := struct {
  4568  			Value *BlockStreamCommand `json:"arguments,omitempty"`
  4569  		}{}
  4570  		if err := json.Unmarshal(data, &tmp); err != nil {
  4571  			return err
  4572  		}
  4573  		if tmp.Value == nil {
  4574  			s.Arg = nil
  4575  		} else {
  4576  			s.Arg = *tmp.Value
  4577  		}
  4578  	case "block_resize":
  4579  		tmp := struct {
  4580  			Value *BlockResizeCommand `json:"arguments,omitempty"`
  4581  		}{}
  4582  		if err := json.Unmarshal(data, &tmp); err != nil {
  4583  			return err
  4584  		}
  4585  		if tmp.Value == nil {
  4586  			s.Arg = nil
  4587  		} else {
  4588  			s.Arg = *tmp.Value
  4589  		}
  4590  	case "block_set_io_throttle":
  4591  		tmp := struct {
  4592  			Value *BlockSetIoThrottleCommand `json:"arguments,omitempty"`
  4593  		}{}
  4594  		if err := json.Unmarshal(data, &tmp); err != nil {
  4595  			return err
  4596  		}
  4597  		if tmp.Value == nil {
  4598  			s.Arg = nil
  4599  		} else {
  4600  			s.Arg = *tmp.Value
  4601  		}
  4602  	case "blockdev-add":
  4603  		tmp := struct {
  4604  			Value *BlockdevAddCommand `json:"arguments,omitempty"`
  4605  		}{}
  4606  		if err := json.Unmarshal(data, &tmp); err != nil {
  4607  			return err
  4608  		}
  4609  		if tmp.Value == nil {
  4610  			s.Arg = nil
  4611  		} else {
  4612  			s.Arg = *tmp.Value
  4613  		}
  4614  	case "blockdev-backup":
  4615  		tmp := struct {
  4616  			Value *BlockdevBackupCommand `json:"arguments,omitempty"`
  4617  		}{}
  4618  		if err := json.Unmarshal(data, &tmp); err != nil {
  4619  			return err
  4620  		}
  4621  		if tmp.Value == nil {
  4622  			s.Arg = nil
  4623  		} else {
  4624  			s.Arg = *tmp.Value
  4625  		}
  4626  	case "blockdev-change-medium":
  4627  		tmp := struct {
  4628  			Value *BlockdevChangeMediumCommand `json:"arguments,omitempty"`
  4629  		}{}
  4630  		if err := json.Unmarshal(data, &tmp); err != nil {
  4631  			return err
  4632  		}
  4633  		if tmp.Value == nil {
  4634  			s.Arg = nil
  4635  		} else {
  4636  			s.Arg = *tmp.Value
  4637  		}
  4638  	case "blockdev-close-tray":
  4639  		tmp := struct {
  4640  			Value *BlockdevCloseTrayCommand `json:"arguments,omitempty"`
  4641  		}{}
  4642  		if err := json.Unmarshal(data, &tmp); err != nil {
  4643  			return err
  4644  		}
  4645  		if tmp.Value == nil {
  4646  			s.Arg = nil
  4647  		} else {
  4648  			s.Arg = *tmp.Value
  4649  		}
  4650  	case "blockdev-create":
  4651  		tmp := struct {
  4652  			Value *BlockdevCreateCommand `json:"arguments,omitempty"`
  4653  		}{}
  4654  		if err := json.Unmarshal(data, &tmp); err != nil {
  4655  			return err
  4656  		}
  4657  		if tmp.Value == nil {
  4658  			s.Arg = nil
  4659  		} else {
  4660  			s.Arg = *tmp.Value
  4661  		}
  4662  	case "blockdev-del":
  4663  		tmp := struct {
  4664  			Value *BlockdevDelCommand `json:"arguments,omitempty"`
  4665  		}{}
  4666  		if err := json.Unmarshal(data, &tmp); err != nil {
  4667  			return err
  4668  		}
  4669  		if tmp.Value == nil {
  4670  			s.Arg = nil
  4671  		} else {
  4672  			s.Arg = *tmp.Value
  4673  		}
  4674  	case "blockdev-insert-medium":
  4675  		tmp := struct {
  4676  			Value *BlockdevInsertMediumCommand `json:"arguments,omitempty"`
  4677  		}{}
  4678  		if err := json.Unmarshal(data, &tmp); err != nil {
  4679  			return err
  4680  		}
  4681  		if tmp.Value == nil {
  4682  			s.Arg = nil
  4683  		} else {
  4684  			s.Arg = *tmp.Value
  4685  		}
  4686  	case "blockdev-mirror":
  4687  		tmp := struct {
  4688  			Value *BlockdevMirrorCommand `json:"arguments,omitempty"`
  4689  		}{}
  4690  		if err := json.Unmarshal(data, &tmp); err != nil {
  4691  			return err
  4692  		}
  4693  		if tmp.Value == nil {
  4694  			s.Arg = nil
  4695  		} else {
  4696  			s.Arg = *tmp.Value
  4697  		}
  4698  	case "blockdev-open-tray":
  4699  		tmp := struct {
  4700  			Value *BlockdevOpenTrayCommand `json:"arguments,omitempty"`
  4701  		}{}
  4702  		if err := json.Unmarshal(data, &tmp); err != nil {
  4703  			return err
  4704  		}
  4705  		if tmp.Value == nil {
  4706  			s.Arg = nil
  4707  		} else {
  4708  			s.Arg = *tmp.Value
  4709  		}
  4710  	case "blockdev-remove-medium":
  4711  		tmp := struct {
  4712  			Value *BlockdevRemoveMediumCommand `json:"arguments,omitempty"`
  4713  		}{}
  4714  		if err := json.Unmarshal(data, &tmp); err != nil {
  4715  			return err
  4716  		}
  4717  		if tmp.Value == nil {
  4718  			s.Arg = nil
  4719  		} else {
  4720  			s.Arg = *tmp.Value
  4721  		}
  4722  	case "blockdev-reopen":
  4723  		tmp := struct {
  4724  			Value *BlockdevReopenCommand `json:"arguments,omitempty"`
  4725  		}{}
  4726  		if err := json.Unmarshal(data, &tmp); err != nil {
  4727  			return err
  4728  		}
  4729  		if tmp.Value == nil {
  4730  			s.Arg = nil
  4731  		} else {
  4732  			s.Arg = *tmp.Value
  4733  		}
  4734  	case "blockdev-snapshot":
  4735  		tmp := struct {
  4736  			Value *BlockdevSnapshotCommand `json:"arguments,omitempty"`
  4737  		}{}
  4738  		if err := json.Unmarshal(data, &tmp); err != nil {
  4739  			return err
  4740  		}
  4741  		if tmp.Value == nil {
  4742  			s.Arg = nil
  4743  		} else {
  4744  			s.Arg = *tmp.Value
  4745  		}
  4746  	case "blockdev-snapshot-delete-internal-sync":
  4747  		tmp := struct {
  4748  			Value *BlockdevSnapshotDeleteInternalSyncCommand `json:"arguments,omitempty"`
  4749  		}{}
  4750  		if err := json.Unmarshal(data, &tmp); err != nil {
  4751  			return err
  4752  		}
  4753  		if tmp.Value == nil {
  4754  			s.Arg = nil
  4755  		} else {
  4756  			s.Arg = *tmp.Value
  4757  		}
  4758  	case "blockdev-snapshot-internal-sync":
  4759  		tmp := struct {
  4760  			Value *BlockdevSnapshotInternalSyncCommand `json:"arguments,omitempty"`
  4761  		}{}
  4762  		if err := json.Unmarshal(data, &tmp); err != nil {
  4763  			return err
  4764  		}
  4765  		if tmp.Value == nil {
  4766  			s.Arg = nil
  4767  		} else {
  4768  			s.Arg = *tmp.Value
  4769  		}
  4770  	case "blockdev-snapshot-sync":
  4771  		tmp := struct {
  4772  			Value *BlockdevSnapshotSyncCommand `json:"arguments,omitempty"`
  4773  		}{}
  4774  		if err := json.Unmarshal(data, &tmp); err != nil {
  4775  			return err
  4776  		}
  4777  		if tmp.Value == nil {
  4778  			s.Arg = nil
  4779  		} else {
  4780  			s.Arg = *tmp.Value
  4781  		}
  4782  	case "calc-dirty-rate":
  4783  		tmp := struct {
  4784  			Value *CalcDirtyRateCommand `json:"arguments,omitempty"`
  4785  		}{}
  4786  		if err := json.Unmarshal(data, &tmp); err != nil {
  4787  			return err
  4788  		}
  4789  		if tmp.Value == nil {
  4790  			s.Arg = nil
  4791  		} else {
  4792  			s.Arg = *tmp.Value
  4793  		}
  4794  	case "change-backing-file":
  4795  		tmp := struct {
  4796  			Value *ChangeBackingFileCommand `json:"arguments,omitempty"`
  4797  		}{}
  4798  		if err := json.Unmarshal(data, &tmp); err != nil {
  4799  			return err
  4800  		}
  4801  		if tmp.Value == nil {
  4802  			s.Arg = nil
  4803  		} else {
  4804  			s.Arg = *tmp.Value
  4805  		}
  4806  	case "change-vnc-password":
  4807  		tmp := struct {
  4808  			Value *ChangeVncPasswordCommand `json:"arguments,omitempty"`
  4809  		}{}
  4810  		if err := json.Unmarshal(data, &tmp); err != nil {
  4811  			return err
  4812  		}
  4813  		if tmp.Value == nil {
  4814  			s.Arg = nil
  4815  		} else {
  4816  			s.Arg = *tmp.Value
  4817  		}
  4818  	case "chardev-add":
  4819  		tmp := struct {
  4820  			Value *ChardevAddCommand `json:"arguments,omitempty"`
  4821  		}{}
  4822  		if err := json.Unmarshal(data, &tmp); err != nil {
  4823  			return err
  4824  		}
  4825  		if tmp.Value == nil {
  4826  			s.Arg = nil
  4827  		} else {
  4828  			s.Arg = *tmp.Value
  4829  		}
  4830  	case "chardev-change":
  4831  		tmp := struct {
  4832  			Value *ChardevChangeCommand `json:"arguments,omitempty"`
  4833  		}{}
  4834  		if err := json.Unmarshal(data, &tmp); err != nil {
  4835  			return err
  4836  		}
  4837  		if tmp.Value == nil {
  4838  			s.Arg = nil
  4839  		} else {
  4840  			s.Arg = *tmp.Value
  4841  		}
  4842  	case "chardev-remove":
  4843  		tmp := struct {
  4844  			Value *ChardevRemoveCommand `json:"arguments,omitempty"`
  4845  		}{}
  4846  		if err := json.Unmarshal(data, &tmp); err != nil {
  4847  			return err
  4848  		}
  4849  		if tmp.Value == nil {
  4850  			s.Arg = nil
  4851  		} else {
  4852  			s.Arg = *tmp.Value
  4853  		}
  4854  	case "chardev-send-break":
  4855  		tmp := struct {
  4856  			Value *ChardevSendBreakCommand `json:"arguments,omitempty"`
  4857  		}{}
  4858  		if err := json.Unmarshal(data, &tmp); err != nil {
  4859  			return err
  4860  		}
  4861  		if tmp.Value == nil {
  4862  			s.Arg = nil
  4863  		} else {
  4864  			s.Arg = *tmp.Value
  4865  		}
  4866  	case "client_migrate_info":
  4867  		tmp := struct {
  4868  			Value *ClientMigrateInfoCommand `json:"arguments,omitempty"`
  4869  		}{}
  4870  		if err := json.Unmarshal(data, &tmp); err != nil {
  4871  			return err
  4872  		}
  4873  		if tmp.Value == nil {
  4874  			s.Arg = nil
  4875  		} else {
  4876  			s.Arg = *tmp.Value
  4877  		}
  4878  	case "closefd":
  4879  		tmp := struct {
  4880  			Value *ClosefdCommand `json:"arguments,omitempty"`
  4881  		}{}
  4882  		if err := json.Unmarshal(data, &tmp); err != nil {
  4883  			return err
  4884  		}
  4885  		if tmp.Value == nil {
  4886  			s.Arg = nil
  4887  		} else {
  4888  			s.Arg = *tmp.Value
  4889  		}
  4890  	case "cont":
  4891  		tmp := struct {
  4892  			Value *ContCommand `json:"arguments,omitempty"`
  4893  		}{}
  4894  		if err := json.Unmarshal(data, &tmp); err != nil {
  4895  			return err
  4896  		}
  4897  		if tmp.Value == nil {
  4898  			s.Arg = nil
  4899  		} else {
  4900  			s.Arg = *tmp.Value
  4901  		}
  4902  	case "device-list-properties":
  4903  		tmp := struct {
  4904  			Value *DeviceListPropertiesCommand `json:"arguments,omitempty"`
  4905  		}{}
  4906  		if err := json.Unmarshal(data, &tmp); err != nil {
  4907  			return err
  4908  		}
  4909  		if tmp.Value == nil {
  4910  			s.Arg = nil
  4911  		} else {
  4912  			s.Arg = *tmp.Value
  4913  		}
  4914  	case "device_add":
  4915  		tmp := struct {
  4916  			Value *DeviceAddCommand `json:"arguments,omitempty"`
  4917  		}{}
  4918  		if err := json.Unmarshal(data, &tmp); err != nil {
  4919  			return err
  4920  		}
  4921  		if tmp.Value == nil {
  4922  			s.Arg = nil
  4923  		} else {
  4924  			s.Arg = *tmp.Value
  4925  		}
  4926  	case "device_del":
  4927  		tmp := struct {
  4928  			Value *DeviceDelCommand `json:"arguments,omitempty"`
  4929  		}{}
  4930  		if err := json.Unmarshal(data, &tmp); err != nil {
  4931  			return err
  4932  		}
  4933  		if tmp.Value == nil {
  4934  			s.Arg = nil
  4935  		} else {
  4936  			s.Arg = *tmp.Value
  4937  		}
  4938  	case "display-reload":
  4939  		tmp := struct {
  4940  			Value *DisplayReloadCommand `json:"arguments,omitempty"`
  4941  		}{}
  4942  		if err := json.Unmarshal(data, &tmp); err != nil {
  4943  			return err
  4944  		}
  4945  		if tmp.Value == nil {
  4946  			s.Arg = nil
  4947  		} else {
  4948  			s.Arg = *tmp.Value
  4949  		}
  4950  	case "drive-backup":
  4951  		tmp := struct {
  4952  			Value *DriveBackupCommand `json:"arguments,omitempty"`
  4953  		}{}
  4954  		if err := json.Unmarshal(data, &tmp); err != nil {
  4955  			return err
  4956  		}
  4957  		if tmp.Value == nil {
  4958  			s.Arg = nil
  4959  		} else {
  4960  			s.Arg = *tmp.Value
  4961  		}
  4962  	case "drive-mirror":
  4963  		tmp := struct {
  4964  			Value *DriveMirrorCommand `json:"arguments,omitempty"`
  4965  		}{}
  4966  		if err := json.Unmarshal(data, &tmp); err != nil {
  4967  			return err
  4968  		}
  4969  		if tmp.Value == nil {
  4970  			s.Arg = nil
  4971  		} else {
  4972  			s.Arg = *tmp.Value
  4973  		}
  4974  	case "dump-guest-memory":
  4975  		tmp := struct {
  4976  			Value *DumpGuestMemoryCommand `json:"arguments,omitempty"`
  4977  		}{}
  4978  		if err := json.Unmarshal(data, &tmp); err != nil {
  4979  			return err
  4980  		}
  4981  		if tmp.Value == nil {
  4982  			s.Arg = nil
  4983  		} else {
  4984  			s.Arg = *tmp.Value
  4985  		}
  4986  	case "dump-skeys":
  4987  		tmp := struct {
  4988  			Value *DumpSkeysCommand `json:"arguments,omitempty"`
  4989  		}{}
  4990  		if err := json.Unmarshal(data, &tmp); err != nil {
  4991  			return err
  4992  		}
  4993  		if tmp.Value == nil {
  4994  			s.Arg = nil
  4995  		} else {
  4996  			s.Arg = *tmp.Value
  4997  		}
  4998  	case "eject":
  4999  		tmp := struct {
  5000  			Value *EjectCommand `json:"arguments,omitempty"`
  5001  		}{}
  5002  		if err := json.Unmarshal(data, &tmp); err != nil {
  5003  			return err
  5004  		}
  5005  		if tmp.Value == nil {
  5006  			s.Arg = nil
  5007  		} else {
  5008  			s.Arg = *tmp.Value
  5009  		}
  5010  	case "expire_password":
  5011  		tmp := struct {
  5012  			Value *ExpirePasswordCommand `json:"arguments,omitempty"`
  5013  		}{}
  5014  		if err := json.Unmarshal(data, &tmp); err != nil {
  5015  			return err
  5016  		}
  5017  		if tmp.Value == nil {
  5018  			s.Arg = nil
  5019  		} else {
  5020  			s.Arg = *tmp.Value
  5021  		}
  5022  	case "getfd":
  5023  		tmp := struct {
  5024  			Value *GetfdCommand `json:"arguments,omitempty"`
  5025  		}{}
  5026  		if err := json.Unmarshal(data, &tmp); err != nil {
  5027  			return err
  5028  		}
  5029  		if tmp.Value == nil {
  5030  			s.Arg = nil
  5031  		} else {
  5032  			s.Arg = *tmp.Value
  5033  		}
  5034  	case "human-monitor-command":
  5035  		tmp := struct {
  5036  			Value *HumanMonitorCommandCommand `json:"arguments,omitempty"`
  5037  		}{}
  5038  		if err := json.Unmarshal(data, &tmp); err != nil {
  5039  			return err
  5040  		}
  5041  		if tmp.Value == nil {
  5042  			s.Arg = nil
  5043  		} else {
  5044  			s.Arg = *tmp.Value
  5045  		}
  5046  	case "inject-nmi":
  5047  		tmp := struct {
  5048  			Value *InjectNmiCommand `json:"arguments,omitempty"`
  5049  		}{}
  5050  		if err := json.Unmarshal(data, &tmp); err != nil {
  5051  			return err
  5052  		}
  5053  		if tmp.Value == nil {
  5054  			s.Arg = nil
  5055  		} else {
  5056  			s.Arg = *tmp.Value
  5057  		}
  5058  	case "input-send-event":
  5059  		tmp := struct {
  5060  			Value *InputSendEventCommand `json:"arguments,omitempty"`
  5061  		}{}
  5062  		if err := json.Unmarshal(data, &tmp); err != nil {
  5063  			return err
  5064  		}
  5065  		if tmp.Value == nil {
  5066  			s.Arg = nil
  5067  		} else {
  5068  			s.Arg = *tmp.Value
  5069  		}
  5070  	case "job-cancel":
  5071  		tmp := struct {
  5072  			Value *JobCancelCommand `json:"arguments,omitempty"`
  5073  		}{}
  5074  		if err := json.Unmarshal(data, &tmp); err != nil {
  5075  			return err
  5076  		}
  5077  		if tmp.Value == nil {
  5078  			s.Arg = nil
  5079  		} else {
  5080  			s.Arg = *tmp.Value
  5081  		}
  5082  	case "job-complete":
  5083  		tmp := struct {
  5084  			Value *JobCompleteCommand `json:"arguments,omitempty"`
  5085  		}{}
  5086  		if err := json.Unmarshal(data, &tmp); err != nil {
  5087  			return err
  5088  		}
  5089  		if tmp.Value == nil {
  5090  			s.Arg = nil
  5091  		} else {
  5092  			s.Arg = *tmp.Value
  5093  		}
  5094  	case "job-dismiss":
  5095  		tmp := struct {
  5096  			Value *JobDismissCommand `json:"arguments,omitempty"`
  5097  		}{}
  5098  		if err := json.Unmarshal(data, &tmp); err != nil {
  5099  			return err
  5100  		}
  5101  		if tmp.Value == nil {
  5102  			s.Arg = nil
  5103  		} else {
  5104  			s.Arg = *tmp.Value
  5105  		}
  5106  	case "job-finalize":
  5107  		tmp := struct {
  5108  			Value *JobFinalizeCommand `json:"arguments,omitempty"`
  5109  		}{}
  5110  		if err := json.Unmarshal(data, &tmp); err != nil {
  5111  			return err
  5112  		}
  5113  		if tmp.Value == nil {
  5114  			s.Arg = nil
  5115  		} else {
  5116  			s.Arg = *tmp.Value
  5117  		}
  5118  	case "job-pause":
  5119  		tmp := struct {
  5120  			Value *JobPauseCommand `json:"arguments,omitempty"`
  5121  		}{}
  5122  		if err := json.Unmarshal(data, &tmp); err != nil {
  5123  			return err
  5124  		}
  5125  		if tmp.Value == nil {
  5126  			s.Arg = nil
  5127  		} else {
  5128  			s.Arg = *tmp.Value
  5129  		}
  5130  	case "job-resume":
  5131  		tmp := struct {
  5132  			Value *JobResumeCommand `json:"arguments,omitempty"`
  5133  		}{}
  5134  		if err := json.Unmarshal(data, &tmp); err != nil {
  5135  			return err
  5136  		}
  5137  		if tmp.Value == nil {
  5138  			s.Arg = nil
  5139  		} else {
  5140  			s.Arg = *tmp.Value
  5141  		}
  5142  	case "memsave":
  5143  		tmp := struct {
  5144  			Value *MemsaveCommand `json:"arguments,omitempty"`
  5145  		}{}
  5146  		if err := json.Unmarshal(data, &tmp); err != nil {
  5147  			return err
  5148  		}
  5149  		if tmp.Value == nil {
  5150  			s.Arg = nil
  5151  		} else {
  5152  			s.Arg = *tmp.Value
  5153  		}
  5154  	case "migrate":
  5155  		tmp := struct {
  5156  			Value *MigrateCommand `json:"arguments,omitempty"`
  5157  		}{}
  5158  		if err := json.Unmarshal(data, &tmp); err != nil {
  5159  			return err
  5160  		}
  5161  		if tmp.Value == nil {
  5162  			s.Arg = nil
  5163  		} else {
  5164  			s.Arg = *tmp.Value
  5165  		}
  5166  	case "migrate-continue":
  5167  		tmp := struct {
  5168  			Value *MigrateContinueCommand `json:"arguments,omitempty"`
  5169  		}{}
  5170  		if err := json.Unmarshal(data, &tmp); err != nil {
  5171  			return err
  5172  		}
  5173  		if tmp.Value == nil {
  5174  			s.Arg = nil
  5175  		} else {
  5176  			s.Arg = *tmp.Value
  5177  		}
  5178  	case "migrate-incoming":
  5179  		tmp := struct {
  5180  			Value *MigrateIncomingCommand `json:"arguments,omitempty"`
  5181  		}{}
  5182  		if err := json.Unmarshal(data, &tmp); err != nil {
  5183  			return err
  5184  		}
  5185  		if tmp.Value == nil {
  5186  			s.Arg = nil
  5187  		} else {
  5188  			s.Arg = *tmp.Value
  5189  		}
  5190  	case "migrate-pause":
  5191  		tmp := struct {
  5192  			Value *MigratePauseCommand `json:"arguments,omitempty"`
  5193  		}{}
  5194  		if err := json.Unmarshal(data, &tmp); err != nil {
  5195  			return err
  5196  		}
  5197  		if tmp.Value == nil {
  5198  			s.Arg = nil
  5199  		} else {
  5200  			s.Arg = *tmp.Value
  5201  		}
  5202  	case "migrate-recover":
  5203  		tmp := struct {
  5204  			Value *MigrateRecoverCommand `json:"arguments,omitempty"`
  5205  		}{}
  5206  		if err := json.Unmarshal(data, &tmp); err != nil {
  5207  			return err
  5208  		}
  5209  		if tmp.Value == nil {
  5210  			s.Arg = nil
  5211  		} else {
  5212  			s.Arg = *tmp.Value
  5213  		}
  5214  	case "migrate-set-capabilities":
  5215  		tmp := struct {
  5216  			Value *MigrateSetCapabilitiesCommand `json:"arguments,omitempty"`
  5217  		}{}
  5218  		if err := json.Unmarshal(data, &tmp); err != nil {
  5219  			return err
  5220  		}
  5221  		if tmp.Value == nil {
  5222  			s.Arg = nil
  5223  		} else {
  5224  			s.Arg = *tmp.Value
  5225  		}
  5226  	case "migrate-set-parameters":
  5227  		tmp := struct {
  5228  			Value *MigrateSetParametersCommand `json:"arguments,omitempty"`
  5229  		}{}
  5230  		if err := json.Unmarshal(data, &tmp); err != nil {
  5231  			return err
  5232  		}
  5233  		if tmp.Value == nil {
  5234  			s.Arg = nil
  5235  		} else {
  5236  			s.Arg = *tmp.Value
  5237  		}
  5238  	case "migrate-start-postcopy":
  5239  		tmp := struct {
  5240  			Value *MigrateStartPostcopyCommand `json:"arguments,omitempty"`
  5241  		}{}
  5242  		if err := json.Unmarshal(data, &tmp); err != nil {
  5243  			return err
  5244  		}
  5245  		if tmp.Value == nil {
  5246  			s.Arg = nil
  5247  		} else {
  5248  			s.Arg = *tmp.Value
  5249  		}
  5250  	case "migrate_cancel":
  5251  		tmp := struct {
  5252  			Value *MigrateCancelCommand `json:"arguments,omitempty"`
  5253  		}{}
  5254  		if err := json.Unmarshal(data, &tmp); err != nil {
  5255  			return err
  5256  		}
  5257  		if tmp.Value == nil {
  5258  			s.Arg = nil
  5259  		} else {
  5260  			s.Arg = *tmp.Value
  5261  		}
  5262  	case "nbd-server-add":
  5263  		tmp := struct {
  5264  			Value *NbdServerAddCommand `json:"arguments,omitempty"`
  5265  		}{}
  5266  		if err := json.Unmarshal(data, &tmp); err != nil {
  5267  			return err
  5268  		}
  5269  		if tmp.Value == nil {
  5270  			s.Arg = nil
  5271  		} else {
  5272  			s.Arg = *tmp.Value
  5273  		}
  5274  	case "nbd-server-remove":
  5275  		tmp := struct {
  5276  			Value *NbdServerRemoveCommand `json:"arguments,omitempty"`
  5277  		}{}
  5278  		if err := json.Unmarshal(data, &tmp); err != nil {
  5279  			return err
  5280  		}
  5281  		if tmp.Value == nil {
  5282  			s.Arg = nil
  5283  		} else {
  5284  			s.Arg = *tmp.Value
  5285  		}
  5286  	case "nbd-server-start":
  5287  		tmp := struct {
  5288  			Value *NbdServerStartCommand `json:"arguments,omitempty"`
  5289  		}{}
  5290  		if err := json.Unmarshal(data, &tmp); err != nil {
  5291  			return err
  5292  		}
  5293  		if tmp.Value == nil {
  5294  			s.Arg = nil
  5295  		} else {
  5296  			s.Arg = *tmp.Value
  5297  		}
  5298  	case "nbd-server-stop":
  5299  		tmp := struct {
  5300  			Value *NbdServerStopCommand `json:"arguments,omitempty"`
  5301  		}{}
  5302  		if err := json.Unmarshal(data, &tmp); err != nil {
  5303  			return err
  5304  		}
  5305  		if tmp.Value == nil {
  5306  			s.Arg = nil
  5307  		} else {
  5308  			s.Arg = *tmp.Value
  5309  		}
  5310  	case "netdev_add":
  5311  		tmp := struct {
  5312  			Value *NetdevAddCommand `json:"arguments,omitempty"`
  5313  		}{}
  5314  		if err := json.Unmarshal(data, &tmp); err != nil {
  5315  			return err
  5316  		}
  5317  		if tmp.Value == nil {
  5318  			s.Arg = nil
  5319  		} else {
  5320  			s.Arg = *tmp.Value
  5321  		}
  5322  	case "netdev_del":
  5323  		tmp := struct {
  5324  			Value *NetdevDelCommand `json:"arguments,omitempty"`
  5325  		}{}
  5326  		if err := json.Unmarshal(data, &tmp); err != nil {
  5327  			return err
  5328  		}
  5329  		if tmp.Value == nil {
  5330  			s.Arg = nil
  5331  		} else {
  5332  			s.Arg = *tmp.Value
  5333  		}
  5334  	case "object-add":
  5335  		tmp := struct {
  5336  			Value *ObjectAddCommand `json:"arguments,omitempty"`
  5337  		}{}
  5338  		if err := json.Unmarshal(data, &tmp); err != nil {
  5339  			return err
  5340  		}
  5341  		if tmp.Value == nil {
  5342  			s.Arg = nil
  5343  		} else {
  5344  			s.Arg = *tmp.Value
  5345  		}
  5346  	case "object-del":
  5347  		tmp := struct {
  5348  			Value *ObjectDelCommand `json:"arguments,omitempty"`
  5349  		}{}
  5350  		if err := json.Unmarshal(data, &tmp); err != nil {
  5351  			return err
  5352  		}
  5353  		if tmp.Value == nil {
  5354  			s.Arg = nil
  5355  		} else {
  5356  			s.Arg = *tmp.Value
  5357  		}
  5358  	case "pmemsave":
  5359  		tmp := struct {
  5360  			Value *PmemsaveCommand `json:"arguments,omitempty"`
  5361  		}{}
  5362  		if err := json.Unmarshal(data, &tmp); err != nil {
  5363  			return err
  5364  		}
  5365  		if tmp.Value == nil {
  5366  			s.Arg = nil
  5367  		} else {
  5368  			s.Arg = *tmp.Value
  5369  		}
  5370  	case "qmp_capabilities":
  5371  		tmp := struct {
  5372  			Value *QmpCapabilitiesCommand `json:"arguments,omitempty"`
  5373  		}{}
  5374  		if err := json.Unmarshal(data, &tmp); err != nil {
  5375  			return err
  5376  		}
  5377  		if tmp.Value == nil {
  5378  			s.Arg = nil
  5379  		} else {
  5380  			s.Arg = *tmp.Value
  5381  		}
  5382  	case "qom-get":
  5383  		tmp := struct {
  5384  			Value *QomGetCommand `json:"arguments,omitempty"`
  5385  		}{}
  5386  		if err := json.Unmarshal(data, &tmp); err != nil {
  5387  			return err
  5388  		}
  5389  		if tmp.Value == nil {
  5390  			s.Arg = nil
  5391  		} else {
  5392  			s.Arg = *tmp.Value
  5393  		}
  5394  	case "qom-list":
  5395  		tmp := struct {
  5396  			Value *QomListCommand `json:"arguments,omitempty"`
  5397  		}{}
  5398  		if err := json.Unmarshal(data, &tmp); err != nil {
  5399  			return err
  5400  		}
  5401  		if tmp.Value == nil {
  5402  			s.Arg = nil
  5403  		} else {
  5404  			s.Arg = *tmp.Value
  5405  		}
  5406  	case "qom-list-properties":
  5407  		tmp := struct {
  5408  			Value *QomListPropertiesCommand `json:"arguments,omitempty"`
  5409  		}{}
  5410  		if err := json.Unmarshal(data, &tmp); err != nil {
  5411  			return err
  5412  		}
  5413  		if tmp.Value == nil {
  5414  			s.Arg = nil
  5415  		} else {
  5416  			s.Arg = *tmp.Value
  5417  		}
  5418  	case "qom-list-types":
  5419  		tmp := struct {
  5420  			Value *QomListTypesCommand `json:"arguments,omitempty"`
  5421  		}{}
  5422  		if err := json.Unmarshal(data, &tmp); err != nil {
  5423  			return err
  5424  		}
  5425  		if tmp.Value == nil {
  5426  			s.Arg = nil
  5427  		} else {
  5428  			s.Arg = *tmp.Value
  5429  		}
  5430  	case "qom-set":
  5431  		tmp := struct {
  5432  			Value *QomSetCommand `json:"arguments,omitempty"`
  5433  		}{}
  5434  		if err := json.Unmarshal(data, &tmp); err != nil {
  5435  			return err
  5436  		}
  5437  		if tmp.Value == nil {
  5438  			s.Arg = nil
  5439  		} else {
  5440  			s.Arg = *tmp.Value
  5441  		}
  5442  	case "query-acpi-ospm-status":
  5443  		tmp := struct {
  5444  			Value *QueryAcpiOspmStatusCommand `json:"arguments,omitempty"`
  5445  		}{}
  5446  		if err := json.Unmarshal(data, &tmp); err != nil {
  5447  			return err
  5448  		}
  5449  		if tmp.Value == nil {
  5450  			s.Arg = nil
  5451  		} else {
  5452  			s.Arg = *tmp.Value
  5453  		}
  5454  	case "query-balloon":
  5455  		tmp := struct {
  5456  			Value *QueryBalloonCommand `json:"arguments,omitempty"`
  5457  		}{}
  5458  		if err := json.Unmarshal(data, &tmp); err != nil {
  5459  			return err
  5460  		}
  5461  		if tmp.Value == nil {
  5462  			s.Arg = nil
  5463  		} else {
  5464  			s.Arg = *tmp.Value
  5465  		}
  5466  	case "query-block":
  5467  		tmp := struct {
  5468  			Value *QueryBlockCommand `json:"arguments,omitempty"`
  5469  		}{}
  5470  		if err := json.Unmarshal(data, &tmp); err != nil {
  5471  			return err
  5472  		}
  5473  		if tmp.Value == nil {
  5474  			s.Arg = nil
  5475  		} else {
  5476  			s.Arg = *tmp.Value
  5477  		}
  5478  	case "query-block-exports":
  5479  		tmp := struct {
  5480  			Value *QueryBlockExportsCommand `json:"arguments,omitempty"`
  5481  		}{}
  5482  		if err := json.Unmarshal(data, &tmp); err != nil {
  5483  			return err
  5484  		}
  5485  		if tmp.Value == nil {
  5486  			s.Arg = nil
  5487  		} else {
  5488  			s.Arg = *tmp.Value
  5489  		}
  5490  	case "query-block-jobs":
  5491  		tmp := struct {
  5492  			Value *QueryBlockJobsCommand `json:"arguments,omitempty"`
  5493  		}{}
  5494  		if err := json.Unmarshal(data, &tmp); err != nil {
  5495  			return err
  5496  		}
  5497  		if tmp.Value == nil {
  5498  			s.Arg = nil
  5499  		} else {
  5500  			s.Arg = *tmp.Value
  5501  		}
  5502  	case "query-blockstats":
  5503  		tmp := struct {
  5504  			Value *QueryBlockstatsCommand `json:"arguments,omitempty"`
  5505  		}{}
  5506  		if err := json.Unmarshal(data, &tmp); err != nil {
  5507  			return err
  5508  		}
  5509  		if tmp.Value == nil {
  5510  			s.Arg = nil
  5511  		} else {
  5512  			s.Arg = *tmp.Value
  5513  		}
  5514  	case "query-chardev":
  5515  		tmp := struct {
  5516  			Value *QueryChardevCommand `json:"arguments,omitempty"`
  5517  		}{}
  5518  		if err := json.Unmarshal(data, &tmp); err != nil {
  5519  			return err
  5520  		}
  5521  		if tmp.Value == nil {
  5522  			s.Arg = nil
  5523  		} else {
  5524  			s.Arg = *tmp.Value
  5525  		}
  5526  	case "query-chardev-backends":
  5527  		tmp := struct {
  5528  			Value *QueryChardevBackendsCommand `json:"arguments,omitempty"`
  5529  		}{}
  5530  		if err := json.Unmarshal(data, &tmp); err != nil {
  5531  			return err
  5532  		}
  5533  		if tmp.Value == nil {
  5534  			s.Arg = nil
  5535  		} else {
  5536  			s.Arg = *tmp.Value
  5537  		}
  5538  	case "query-colo-status":
  5539  		tmp := struct {
  5540  			Value *QueryColoStatusCommand `json:"arguments,omitempty"`
  5541  		}{}
  5542  		if err := json.Unmarshal(data, &tmp); err != nil {
  5543  			return err
  5544  		}
  5545  		if tmp.Value == nil {
  5546  			s.Arg = nil
  5547  		} else {
  5548  			s.Arg = *tmp.Value
  5549  		}
  5550  	case "query-command-line-options":
  5551  		tmp := struct {
  5552  			Value *QueryCommandLineOptionsCommand `json:"arguments,omitempty"`
  5553  		}{}
  5554  		if err := json.Unmarshal(data, &tmp); err != nil {
  5555  			return err
  5556  		}
  5557  		if tmp.Value == nil {
  5558  			s.Arg = nil
  5559  		} else {
  5560  			s.Arg = *tmp.Value
  5561  		}
  5562  	case "query-commands":
  5563  		tmp := struct {
  5564  			Value *QueryCommandsCommand `json:"arguments,omitempty"`
  5565  		}{}
  5566  		if err := json.Unmarshal(data, &tmp); err != nil {
  5567  			return err
  5568  		}
  5569  		if tmp.Value == nil {
  5570  			s.Arg = nil
  5571  		} else {
  5572  			s.Arg = *tmp.Value
  5573  		}
  5574  	case "query-cpu-definitions":
  5575  		tmp := struct {
  5576  			Value *QueryCpuDefinitionsCommand `json:"arguments,omitempty"`
  5577  		}{}
  5578  		if err := json.Unmarshal(data, &tmp); err != nil {
  5579  			return err
  5580  		}
  5581  		if tmp.Value == nil {
  5582  			s.Arg = nil
  5583  		} else {
  5584  			s.Arg = *tmp.Value
  5585  		}
  5586  	case "query-cpu-model-baseline":
  5587  		tmp := struct {
  5588  			Value *QueryCpuModelBaselineCommand `json:"arguments,omitempty"`
  5589  		}{}
  5590  		if err := json.Unmarshal(data, &tmp); err != nil {
  5591  			return err
  5592  		}
  5593  		if tmp.Value == nil {
  5594  			s.Arg = nil
  5595  		} else {
  5596  			s.Arg = *tmp.Value
  5597  		}
  5598  	case "query-cpu-model-comparison":
  5599  		tmp := struct {
  5600  			Value *QueryCpuModelComparisonCommand `json:"arguments,omitempty"`
  5601  		}{}
  5602  		if err := json.Unmarshal(data, &tmp); err != nil {
  5603  			return err
  5604  		}
  5605  		if tmp.Value == nil {
  5606  			s.Arg = nil
  5607  		} else {
  5608  			s.Arg = *tmp.Value
  5609  		}
  5610  	case "query-cpu-model-expansion":
  5611  		tmp := struct {
  5612  			Value *QueryCpuModelExpansionCommand `json:"arguments,omitempty"`
  5613  		}{}
  5614  		if err := json.Unmarshal(data, &tmp); err != nil {
  5615  			return err
  5616  		}
  5617  		if tmp.Value == nil {
  5618  			s.Arg = nil
  5619  		} else {
  5620  			s.Arg = *tmp.Value
  5621  		}
  5622  	case "query-cpus-fast":
  5623  		tmp := struct {
  5624  			Value *QueryCpusFastCommand `json:"arguments,omitempty"`
  5625  		}{}
  5626  		if err := json.Unmarshal(data, &tmp); err != nil {
  5627  			return err
  5628  		}
  5629  		if tmp.Value == nil {
  5630  			s.Arg = nil
  5631  		} else {
  5632  			s.Arg = *tmp.Value
  5633  		}
  5634  	case "query-current-machine":
  5635  		tmp := struct {
  5636  			Value *QueryCurrentMachineCommand `json:"arguments,omitempty"`
  5637  		}{}
  5638  		if err := json.Unmarshal(data, &tmp); err != nil {
  5639  			return err
  5640  		}
  5641  		if tmp.Value == nil {
  5642  			s.Arg = nil
  5643  		} else {
  5644  			s.Arg = *tmp.Value
  5645  		}
  5646  	case "query-dirty-rate":
  5647  		tmp := struct {
  5648  			Value *QueryDirtyRateCommand `json:"arguments,omitempty"`
  5649  		}{}
  5650  		if err := json.Unmarshal(data, &tmp); err != nil {
  5651  			return err
  5652  		}
  5653  		if tmp.Value == nil {
  5654  			s.Arg = nil
  5655  		} else {
  5656  			s.Arg = *tmp.Value
  5657  		}
  5658  	case "query-display-options":
  5659  		tmp := struct {
  5660  			Value *QueryDisplayOptionsCommand `json:"arguments,omitempty"`
  5661  		}{}
  5662  		if err := json.Unmarshal(data, &tmp); err != nil {
  5663  			return err
  5664  		}
  5665  		if tmp.Value == nil {
  5666  			s.Arg = nil
  5667  		} else {
  5668  			s.Arg = *tmp.Value
  5669  		}
  5670  	case "query-dump":
  5671  		tmp := struct {
  5672  			Value *QueryDumpCommand `json:"arguments,omitempty"`
  5673  		}{}
  5674  		if err := json.Unmarshal(data, &tmp); err != nil {
  5675  			return err
  5676  		}
  5677  		if tmp.Value == nil {
  5678  			s.Arg = nil
  5679  		} else {
  5680  			s.Arg = *tmp.Value
  5681  		}
  5682  	case "query-dump-guest-memory-capability":
  5683  		tmp := struct {
  5684  			Value *QueryDumpGuestMemoryCapabilityCommand `json:"arguments,omitempty"`
  5685  		}{}
  5686  		if err := json.Unmarshal(data, &tmp); err != nil {
  5687  			return err
  5688  		}
  5689  		if tmp.Value == nil {
  5690  			s.Arg = nil
  5691  		} else {
  5692  			s.Arg = *tmp.Value
  5693  		}
  5694  	case "query-fdsets":
  5695  		tmp := struct {
  5696  			Value *QueryFdsetsCommand `json:"arguments,omitempty"`
  5697  		}{}
  5698  		if err := json.Unmarshal(data, &tmp); err != nil {
  5699  			return err
  5700  		}
  5701  		if tmp.Value == nil {
  5702  			s.Arg = nil
  5703  		} else {
  5704  			s.Arg = *tmp.Value
  5705  		}
  5706  	case "query-gic-capabilities":
  5707  		tmp := struct {
  5708  			Value *QueryGicCapabilitiesCommand `json:"arguments,omitempty"`
  5709  		}{}
  5710  		if err := json.Unmarshal(data, &tmp); err != nil {
  5711  			return err
  5712  		}
  5713  		if tmp.Value == nil {
  5714  			s.Arg = nil
  5715  		} else {
  5716  			s.Arg = *tmp.Value
  5717  		}
  5718  	case "query-hotpluggable-cpus":
  5719  		tmp := struct {
  5720  			Value *QueryHotpluggableCpusCommand `json:"arguments,omitempty"`
  5721  		}{}
  5722  		if err := json.Unmarshal(data, &tmp); err != nil {
  5723  			return err
  5724  		}
  5725  		if tmp.Value == nil {
  5726  			s.Arg = nil
  5727  		} else {
  5728  			s.Arg = *tmp.Value
  5729  		}
  5730  	case "query-iothreads":
  5731  		tmp := struct {
  5732  			Value *QueryIothreadsCommand `json:"arguments,omitempty"`
  5733  		}{}
  5734  		if err := json.Unmarshal(data, &tmp); err != nil {
  5735  			return err
  5736  		}
  5737  		if tmp.Value == nil {
  5738  			s.Arg = nil
  5739  		} else {
  5740  			s.Arg = *tmp.Value
  5741  		}
  5742  	case "query-jobs":
  5743  		tmp := struct {
  5744  			Value *QueryJobsCommand `json:"arguments,omitempty"`
  5745  		}{}
  5746  		if err := json.Unmarshal(data, &tmp); err != nil {
  5747  			return err
  5748  		}
  5749  		if tmp.Value == nil {
  5750  			s.Arg = nil
  5751  		} else {
  5752  			s.Arg = *tmp.Value
  5753  		}
  5754  	case "query-kvm":
  5755  		tmp := struct {
  5756  			Value *QueryKvmCommand `json:"arguments,omitempty"`
  5757  		}{}
  5758  		if err := json.Unmarshal(data, &tmp); err != nil {
  5759  			return err
  5760  		}
  5761  		if tmp.Value == nil {
  5762  			s.Arg = nil
  5763  		} else {
  5764  			s.Arg = *tmp.Value
  5765  		}
  5766  	case "query-machines":
  5767  		tmp := struct {
  5768  			Value *QueryMachinesCommand `json:"arguments,omitempty"`
  5769  		}{}
  5770  		if err := json.Unmarshal(data, &tmp); err != nil {
  5771  			return err
  5772  		}
  5773  		if tmp.Value == nil {
  5774  			s.Arg = nil
  5775  		} else {
  5776  			s.Arg = *tmp.Value
  5777  		}
  5778  	case "query-memdev":
  5779  		tmp := struct {
  5780  			Value *QueryMemdevCommand `json:"arguments,omitempty"`
  5781  		}{}
  5782  		if err := json.Unmarshal(data, &tmp); err != nil {
  5783  			return err
  5784  		}
  5785  		if tmp.Value == nil {
  5786  			s.Arg = nil
  5787  		} else {
  5788  			s.Arg = *tmp.Value
  5789  		}
  5790  	case "query-memory-devices":
  5791  		tmp := struct {
  5792  			Value *QueryMemoryDevicesCommand `json:"arguments,omitempty"`
  5793  		}{}
  5794  		if err := json.Unmarshal(data, &tmp); err != nil {
  5795  			return err
  5796  		}
  5797  		if tmp.Value == nil {
  5798  			s.Arg = nil
  5799  		} else {
  5800  			s.Arg = *tmp.Value
  5801  		}
  5802  	case "query-memory-size-summary":
  5803  		tmp := struct {
  5804  			Value *QueryMemorySizeSummaryCommand `json:"arguments,omitempty"`
  5805  		}{}
  5806  		if err := json.Unmarshal(data, &tmp); err != nil {
  5807  			return err
  5808  		}
  5809  		if tmp.Value == nil {
  5810  			s.Arg = nil
  5811  		} else {
  5812  			s.Arg = *tmp.Value
  5813  		}
  5814  	case "query-mice":
  5815  		tmp := struct {
  5816  			Value *QueryMiceCommand `json:"arguments,omitempty"`
  5817  		}{}
  5818  		if err := json.Unmarshal(data, &tmp); err != nil {
  5819  			return err
  5820  		}
  5821  		if tmp.Value == nil {
  5822  			s.Arg = nil
  5823  		} else {
  5824  			s.Arg = *tmp.Value
  5825  		}
  5826  	case "query-migrate":
  5827  		tmp := struct {
  5828  			Value *QueryMigrateCommand `json:"arguments,omitempty"`
  5829  		}{}
  5830  		if err := json.Unmarshal(data, &tmp); err != nil {
  5831  			return err
  5832  		}
  5833  		if tmp.Value == nil {
  5834  			s.Arg = nil
  5835  		} else {
  5836  			s.Arg = *tmp.Value
  5837  		}
  5838  	case "query-migrate-capabilities":
  5839  		tmp := struct {
  5840  			Value *QueryMigrateCapabilitiesCommand `json:"arguments,omitempty"`
  5841  		}{}
  5842  		if err := json.Unmarshal(data, &tmp); err != nil {
  5843  			return err
  5844  		}
  5845  		if tmp.Value == nil {
  5846  			s.Arg = nil
  5847  		} else {
  5848  			s.Arg = *tmp.Value
  5849  		}
  5850  	case "query-migrate-parameters":
  5851  		tmp := struct {
  5852  			Value *QueryMigrateParametersCommand `json:"arguments,omitempty"`
  5853  		}{}
  5854  		if err := json.Unmarshal(data, &tmp); err != nil {
  5855  			return err
  5856  		}
  5857  		if tmp.Value == nil {
  5858  			s.Arg = nil
  5859  		} else {
  5860  			s.Arg = *tmp.Value
  5861  		}
  5862  	case "query-name":
  5863  		tmp := struct {
  5864  			Value *QueryNameCommand `json:"arguments,omitempty"`
  5865  		}{}
  5866  		if err := json.Unmarshal(data, &tmp); err != nil {
  5867  			return err
  5868  		}
  5869  		if tmp.Value == nil {
  5870  			s.Arg = nil
  5871  		} else {
  5872  			s.Arg = *tmp.Value
  5873  		}
  5874  	case "query-named-block-nodes":
  5875  		tmp := struct {
  5876  			Value *QueryNamedBlockNodesCommand `json:"arguments,omitempty"`
  5877  		}{}
  5878  		if err := json.Unmarshal(data, &tmp); err != nil {
  5879  			return err
  5880  		}
  5881  		if tmp.Value == nil {
  5882  			s.Arg = nil
  5883  		} else {
  5884  			s.Arg = *tmp.Value
  5885  		}
  5886  	case "query-pci":
  5887  		tmp := struct {
  5888  			Value *QueryPciCommand `json:"arguments,omitempty"`
  5889  		}{}
  5890  		if err := json.Unmarshal(data, &tmp); err != nil {
  5891  			return err
  5892  		}
  5893  		if tmp.Value == nil {
  5894  			s.Arg = nil
  5895  		} else {
  5896  			s.Arg = *tmp.Value
  5897  		}
  5898  	case "query-pr-managers":
  5899  		tmp := struct {
  5900  			Value *QueryPrManagersCommand `json:"arguments,omitempty"`
  5901  		}{}
  5902  		if err := json.Unmarshal(data, &tmp); err != nil {
  5903  			return err
  5904  		}
  5905  		if tmp.Value == nil {
  5906  			s.Arg = nil
  5907  		} else {
  5908  			s.Arg = *tmp.Value
  5909  		}
  5910  	case "query-qmp-schema":
  5911  		tmp := struct {
  5912  			Value *QueryQmpSchemaCommand `json:"arguments,omitempty"`
  5913  		}{}
  5914  		if err := json.Unmarshal(data, &tmp); err != nil {
  5915  			return err
  5916  		}
  5917  		if tmp.Value == nil {
  5918  			s.Arg = nil
  5919  		} else {
  5920  			s.Arg = *tmp.Value
  5921  		}
  5922  	case "query-replay":
  5923  		tmp := struct {
  5924  			Value *QueryReplayCommand `json:"arguments,omitempty"`
  5925  		}{}
  5926  		if err := json.Unmarshal(data, &tmp); err != nil {
  5927  			return err
  5928  		}
  5929  		if tmp.Value == nil {
  5930  			s.Arg = nil
  5931  		} else {
  5932  			s.Arg = *tmp.Value
  5933  		}
  5934  	case "query-rocker":
  5935  		tmp := struct {
  5936  			Value *QueryRockerCommand `json:"arguments,omitempty"`
  5937  		}{}
  5938  		if err := json.Unmarshal(data, &tmp); err != nil {
  5939  			return err
  5940  		}
  5941  		if tmp.Value == nil {
  5942  			s.Arg = nil
  5943  		} else {
  5944  			s.Arg = *tmp.Value
  5945  		}
  5946  	case "query-rocker-of-dpa-flows":
  5947  		tmp := struct {
  5948  			Value *QueryRockerOfDpaFlowsCommand `json:"arguments,omitempty"`
  5949  		}{}
  5950  		if err := json.Unmarshal(data, &tmp); err != nil {
  5951  			return err
  5952  		}
  5953  		if tmp.Value == nil {
  5954  			s.Arg = nil
  5955  		} else {
  5956  			s.Arg = *tmp.Value
  5957  		}
  5958  	case "query-rocker-of-dpa-groups":
  5959  		tmp := struct {
  5960  			Value *QueryRockerOfDpaGroupsCommand `json:"arguments,omitempty"`
  5961  		}{}
  5962  		if err := json.Unmarshal(data, &tmp); err != nil {
  5963  			return err
  5964  		}
  5965  		if tmp.Value == nil {
  5966  			s.Arg = nil
  5967  		} else {
  5968  			s.Arg = *tmp.Value
  5969  		}
  5970  	case "query-rocker-ports":
  5971  		tmp := struct {
  5972  			Value *QueryRockerPortsCommand `json:"arguments,omitempty"`
  5973  		}{}
  5974  		if err := json.Unmarshal(data, &tmp); err != nil {
  5975  			return err
  5976  		}
  5977  		if tmp.Value == nil {
  5978  			s.Arg = nil
  5979  		} else {
  5980  			s.Arg = *tmp.Value
  5981  		}
  5982  	case "query-rx-filter":
  5983  		tmp := struct {
  5984  			Value *QueryRxFilterCommand `json:"arguments,omitempty"`
  5985  		}{}
  5986  		if err := json.Unmarshal(data, &tmp); err != nil {
  5987  			return err
  5988  		}
  5989  		if tmp.Value == nil {
  5990  			s.Arg = nil
  5991  		} else {
  5992  			s.Arg = *tmp.Value
  5993  		}
  5994  	case "query-sev":
  5995  		tmp := struct {
  5996  			Value *QuerySevCommand `json:"arguments,omitempty"`
  5997  		}{}
  5998  		if err := json.Unmarshal(data, &tmp); err != nil {
  5999  			return err
  6000  		}
  6001  		if tmp.Value == nil {
  6002  			s.Arg = nil
  6003  		} else {
  6004  			s.Arg = *tmp.Value
  6005  		}
  6006  	case "query-sev-attestation-report":
  6007  		tmp := struct {
  6008  			Value *QuerySevAttestationReportCommand `json:"arguments,omitempty"`
  6009  		}{}
  6010  		if err := json.Unmarshal(data, &tmp); err != nil {
  6011  			return err
  6012  		}
  6013  		if tmp.Value == nil {
  6014  			s.Arg = nil
  6015  		} else {
  6016  			s.Arg = *tmp.Value
  6017  		}
  6018  	case "query-sev-capabilities":
  6019  		tmp := struct {
  6020  			Value *QuerySevCapabilitiesCommand `json:"arguments,omitempty"`
  6021  		}{}
  6022  		if err := json.Unmarshal(data, &tmp); err != nil {
  6023  			return err
  6024  		}
  6025  		if tmp.Value == nil {
  6026  			s.Arg = nil
  6027  		} else {
  6028  			s.Arg = *tmp.Value
  6029  		}
  6030  	case "query-sev-launch-measure":
  6031  		tmp := struct {
  6032  			Value *QuerySevLaunchMeasureCommand `json:"arguments,omitempty"`
  6033  		}{}
  6034  		if err := json.Unmarshal(data, &tmp); err != nil {
  6035  			return err
  6036  		}
  6037  		if tmp.Value == nil {
  6038  			s.Arg = nil
  6039  		} else {
  6040  			s.Arg = *tmp.Value
  6041  		}
  6042  	case "query-sgx":
  6043  		tmp := struct {
  6044  			Value *QuerySgxCommand `json:"arguments,omitempty"`
  6045  		}{}
  6046  		if err := json.Unmarshal(data, &tmp); err != nil {
  6047  			return err
  6048  		}
  6049  		if tmp.Value == nil {
  6050  			s.Arg = nil
  6051  		} else {
  6052  			s.Arg = *tmp.Value
  6053  		}
  6054  	case "query-sgx-capabilities":
  6055  		tmp := struct {
  6056  			Value *QuerySgxCapabilitiesCommand `json:"arguments,omitempty"`
  6057  		}{}
  6058  		if err := json.Unmarshal(data, &tmp); err != nil {
  6059  			return err
  6060  		}
  6061  		if tmp.Value == nil {
  6062  			s.Arg = nil
  6063  		} else {
  6064  			s.Arg = *tmp.Value
  6065  		}
  6066  	case "query-spice":
  6067  		tmp := struct {
  6068  			Value *QuerySpiceCommand `json:"arguments,omitempty"`
  6069  		}{}
  6070  		if err := json.Unmarshal(data, &tmp); err != nil {
  6071  			return err
  6072  		}
  6073  		if tmp.Value == nil {
  6074  			s.Arg = nil
  6075  		} else {
  6076  			s.Arg = *tmp.Value
  6077  		}
  6078  	case "query-status":
  6079  		tmp := struct {
  6080  			Value *QueryStatusCommand `json:"arguments,omitempty"`
  6081  		}{}
  6082  		if err := json.Unmarshal(data, &tmp); err != nil {
  6083  			return err
  6084  		}
  6085  		if tmp.Value == nil {
  6086  			s.Arg = nil
  6087  		} else {
  6088  			s.Arg = *tmp.Value
  6089  		}
  6090  	case "query-target":
  6091  		tmp := struct {
  6092  			Value *QueryTargetCommand `json:"arguments,omitempty"`
  6093  		}{}
  6094  		if err := json.Unmarshal(data, &tmp); err != nil {
  6095  			return err
  6096  		}
  6097  		if tmp.Value == nil {
  6098  			s.Arg = nil
  6099  		} else {
  6100  			s.Arg = *tmp.Value
  6101  		}
  6102  	case "query-tpm":
  6103  		tmp := struct {
  6104  			Value *QueryTpmCommand `json:"arguments,omitempty"`
  6105  		}{}
  6106  		if err := json.Unmarshal(data, &tmp); err != nil {
  6107  			return err
  6108  		}
  6109  		if tmp.Value == nil {
  6110  			s.Arg = nil
  6111  		} else {
  6112  			s.Arg = *tmp.Value
  6113  		}
  6114  	case "query-tpm-models":
  6115  		tmp := struct {
  6116  			Value *QueryTpmModelsCommand `json:"arguments,omitempty"`
  6117  		}{}
  6118  		if err := json.Unmarshal(data, &tmp); err != nil {
  6119  			return err
  6120  		}
  6121  		if tmp.Value == nil {
  6122  			s.Arg = nil
  6123  		} else {
  6124  			s.Arg = *tmp.Value
  6125  		}
  6126  	case "query-tpm-types":
  6127  		tmp := struct {
  6128  			Value *QueryTpmTypesCommand `json:"arguments,omitempty"`
  6129  		}{}
  6130  		if err := json.Unmarshal(data, &tmp); err != nil {
  6131  			return err
  6132  		}
  6133  		if tmp.Value == nil {
  6134  			s.Arg = nil
  6135  		} else {
  6136  			s.Arg = *tmp.Value
  6137  		}
  6138  	case "query-uuid":
  6139  		tmp := struct {
  6140  			Value *QueryUuidCommand `json:"arguments,omitempty"`
  6141  		}{}
  6142  		if err := json.Unmarshal(data, &tmp); err != nil {
  6143  			return err
  6144  		}
  6145  		if tmp.Value == nil {
  6146  			s.Arg = nil
  6147  		} else {
  6148  			s.Arg = *tmp.Value
  6149  		}
  6150  	case "query-version":
  6151  		tmp := struct {
  6152  			Value *QueryVersionCommand `json:"arguments,omitempty"`
  6153  		}{}
  6154  		if err := json.Unmarshal(data, &tmp); err != nil {
  6155  			return err
  6156  		}
  6157  		if tmp.Value == nil {
  6158  			s.Arg = nil
  6159  		} else {
  6160  			s.Arg = *tmp.Value
  6161  		}
  6162  	case "query-vm-generation-id":
  6163  		tmp := struct {
  6164  			Value *QueryVmGenerationIdCommand `json:"arguments,omitempty"`
  6165  		}{}
  6166  		if err := json.Unmarshal(data, &tmp); err != nil {
  6167  			return err
  6168  		}
  6169  		if tmp.Value == nil {
  6170  			s.Arg = nil
  6171  		} else {
  6172  			s.Arg = *tmp.Value
  6173  		}
  6174  	case "query-vnc":
  6175  		tmp := struct {
  6176  			Value *QueryVncCommand `json:"arguments,omitempty"`
  6177  		}{}
  6178  		if err := json.Unmarshal(data, &tmp); err != nil {
  6179  			return err
  6180  		}
  6181  		if tmp.Value == nil {
  6182  			s.Arg = nil
  6183  		} else {
  6184  			s.Arg = *tmp.Value
  6185  		}
  6186  	case "query-vnc-servers":
  6187  		tmp := struct {
  6188  			Value *QueryVncServersCommand `json:"arguments,omitempty"`
  6189  		}{}
  6190  		if err := json.Unmarshal(data, &tmp); err != nil {
  6191  			return err
  6192  		}
  6193  		if tmp.Value == nil {
  6194  			s.Arg = nil
  6195  		} else {
  6196  			s.Arg = *tmp.Value
  6197  		}
  6198  	case "query-xen-replication-status":
  6199  		tmp := struct {
  6200  			Value *QueryXenReplicationStatusCommand `json:"arguments,omitempty"`
  6201  		}{}
  6202  		if err := json.Unmarshal(data, &tmp); err != nil {
  6203  			return err
  6204  		}
  6205  		if tmp.Value == nil {
  6206  			s.Arg = nil
  6207  		} else {
  6208  			s.Arg = *tmp.Value
  6209  		}
  6210  	case "query-yank":
  6211  		tmp := struct {
  6212  			Value *QueryYankCommand `json:"arguments,omitempty"`
  6213  		}{}
  6214  		if err := json.Unmarshal(data, &tmp); err != nil {
  6215  			return err
  6216  		}
  6217  		if tmp.Value == nil {
  6218  			s.Arg = nil
  6219  		} else {
  6220  			s.Arg = *tmp.Value
  6221  		}
  6222  	case "quit":
  6223  		tmp := struct {
  6224  			Value *QuitCommand `json:"arguments,omitempty"`
  6225  		}{}
  6226  		if err := json.Unmarshal(data, &tmp); err != nil {
  6227  			return err
  6228  		}
  6229  		if tmp.Value == nil {
  6230  			s.Arg = nil
  6231  		} else {
  6232  			s.Arg = *tmp.Value
  6233  		}
  6234  	case "remove-fd":
  6235  		tmp := struct {
  6236  			Value *RemoveFdCommand `json:"arguments,omitempty"`
  6237  		}{}
  6238  		if err := json.Unmarshal(data, &tmp); err != nil {
  6239  			return err
  6240  		}
  6241  		if tmp.Value == nil {
  6242  			s.Arg = nil
  6243  		} else {
  6244  			s.Arg = *tmp.Value
  6245  		}
  6246  	case "replay-break":
  6247  		tmp := struct {
  6248  			Value *ReplayBreakCommand `json:"arguments,omitempty"`
  6249  		}{}
  6250  		if err := json.Unmarshal(data, &tmp); err != nil {
  6251  			return err
  6252  		}
  6253  		if tmp.Value == nil {
  6254  			s.Arg = nil
  6255  		} else {
  6256  			s.Arg = *tmp.Value
  6257  		}
  6258  	case "replay-delete-break":
  6259  		tmp := struct {
  6260  			Value *ReplayDeleteBreakCommand `json:"arguments,omitempty"`
  6261  		}{}
  6262  		if err := json.Unmarshal(data, &tmp); err != nil {
  6263  			return err
  6264  		}
  6265  		if tmp.Value == nil {
  6266  			s.Arg = nil
  6267  		} else {
  6268  			s.Arg = *tmp.Value
  6269  		}
  6270  	case "replay-seek":
  6271  		tmp := struct {
  6272  			Value *ReplaySeekCommand `json:"arguments,omitempty"`
  6273  		}{}
  6274  		if err := json.Unmarshal(data, &tmp); err != nil {
  6275  			return err
  6276  		}
  6277  		if tmp.Value == nil {
  6278  			s.Arg = nil
  6279  		} else {
  6280  			s.Arg = *tmp.Value
  6281  		}
  6282  	case "ringbuf-read":
  6283  		tmp := struct {
  6284  			Value *RingbufReadCommand `json:"arguments,omitempty"`
  6285  		}{}
  6286  		if err := json.Unmarshal(data, &tmp); err != nil {
  6287  			return err
  6288  		}
  6289  		if tmp.Value == nil {
  6290  			s.Arg = nil
  6291  		} else {
  6292  			s.Arg = *tmp.Value
  6293  		}
  6294  	case "ringbuf-write":
  6295  		tmp := struct {
  6296  			Value *RingbufWriteCommand `json:"arguments,omitempty"`
  6297  		}{}
  6298  		if err := json.Unmarshal(data, &tmp); err != nil {
  6299  			return err
  6300  		}
  6301  		if tmp.Value == nil {
  6302  			s.Arg = nil
  6303  		} else {
  6304  			s.Arg = *tmp.Value
  6305  		}
  6306  	case "rtc-reset-reinjection":
  6307  		tmp := struct {
  6308  			Value *RtcResetReinjectionCommand `json:"arguments,omitempty"`
  6309  		}{}
  6310  		if err := json.Unmarshal(data, &tmp); err != nil {
  6311  			return err
  6312  		}
  6313  		if tmp.Value == nil {
  6314  			s.Arg = nil
  6315  		} else {
  6316  			s.Arg = *tmp.Value
  6317  		}
  6318  	case "screendump":
  6319  		tmp := struct {
  6320  			Value *ScreendumpCommand `json:"arguments,omitempty"`
  6321  		}{}
  6322  		if err := json.Unmarshal(data, &tmp); err != nil {
  6323  			return err
  6324  		}
  6325  		if tmp.Value == nil {
  6326  			s.Arg = nil
  6327  		} else {
  6328  			s.Arg = *tmp.Value
  6329  		}
  6330  	case "send-key":
  6331  		tmp := struct {
  6332  			Value *SendKeyCommand `json:"arguments,omitempty"`
  6333  		}{}
  6334  		if err := json.Unmarshal(data, &tmp); err != nil {
  6335  			return err
  6336  		}
  6337  		if tmp.Value == nil {
  6338  			s.Arg = nil
  6339  		} else {
  6340  			s.Arg = *tmp.Value
  6341  		}
  6342  	case "set-action":
  6343  		tmp := struct {
  6344  			Value *SetActionCommand `json:"arguments,omitempty"`
  6345  		}{}
  6346  		if err := json.Unmarshal(data, &tmp); err != nil {
  6347  			return err
  6348  		}
  6349  		if tmp.Value == nil {
  6350  			s.Arg = nil
  6351  		} else {
  6352  			s.Arg = *tmp.Value
  6353  		}
  6354  	case "set-numa-node":
  6355  		tmp := struct {
  6356  			Value *SetNumaNodeCommand `json:"arguments,omitempty"`
  6357  		}{}
  6358  		if err := json.Unmarshal(data, &tmp); err != nil {
  6359  			return err
  6360  		}
  6361  		if tmp.Value == nil {
  6362  			s.Arg = nil
  6363  		} else {
  6364  			s.Arg = *tmp.Value
  6365  		}
  6366  	case "set_link":
  6367  		tmp := struct {
  6368  			Value *SetLinkCommand `json:"arguments,omitempty"`
  6369  		}{}
  6370  		if err := json.Unmarshal(data, &tmp); err != nil {
  6371  			return err
  6372  		}
  6373  		if tmp.Value == nil {
  6374  			s.Arg = nil
  6375  		} else {
  6376  			s.Arg = *tmp.Value
  6377  		}
  6378  	case "set_password":
  6379  		tmp := struct {
  6380  			Value *SetPasswordCommand `json:"arguments,omitempty"`
  6381  		}{}
  6382  		if err := json.Unmarshal(data, &tmp); err != nil {
  6383  			return err
  6384  		}
  6385  		if tmp.Value == nil {
  6386  			s.Arg = nil
  6387  		} else {
  6388  			s.Arg = *tmp.Value
  6389  		}
  6390  	case "sev-inject-launch-secret":
  6391  		tmp := struct {
  6392  			Value *SevInjectLaunchSecretCommand `json:"arguments,omitempty"`
  6393  		}{}
  6394  		if err := json.Unmarshal(data, &tmp); err != nil {
  6395  			return err
  6396  		}
  6397  		if tmp.Value == nil {
  6398  			s.Arg = nil
  6399  		} else {
  6400  			s.Arg = *tmp.Value
  6401  		}
  6402  	case "snapshot-delete":
  6403  		tmp := struct {
  6404  			Value *SnapshotDeleteCommand `json:"arguments,omitempty"`
  6405  		}{}
  6406  		if err := json.Unmarshal(data, &tmp); err != nil {
  6407  			return err
  6408  		}
  6409  		if tmp.Value == nil {
  6410  			s.Arg = nil
  6411  		} else {
  6412  			s.Arg = *tmp.Value
  6413  		}
  6414  	case "snapshot-load":
  6415  		tmp := struct {
  6416  			Value *SnapshotLoadCommand `json:"arguments,omitempty"`
  6417  		}{}
  6418  		if err := json.Unmarshal(data, &tmp); err != nil {
  6419  			return err
  6420  		}
  6421  		if tmp.Value == nil {
  6422  			s.Arg = nil
  6423  		} else {
  6424  			s.Arg = *tmp.Value
  6425  		}
  6426  	case "snapshot-save":
  6427  		tmp := struct {
  6428  			Value *SnapshotSaveCommand `json:"arguments,omitempty"`
  6429  		}{}
  6430  		if err := json.Unmarshal(data, &tmp); err != nil {
  6431  			return err
  6432  		}
  6433  		if tmp.Value == nil {
  6434  			s.Arg = nil
  6435  		} else {
  6436  			s.Arg = *tmp.Value
  6437  		}
  6438  	case "stop":
  6439  		tmp := struct {
  6440  			Value *StopCommand `json:"arguments,omitempty"`
  6441  		}{}
  6442  		if err := json.Unmarshal(data, &tmp); err != nil {
  6443  			return err
  6444  		}
  6445  		if tmp.Value == nil {
  6446  			s.Arg = nil
  6447  		} else {
  6448  			s.Arg = *tmp.Value
  6449  		}
  6450  	case "system_powerdown":
  6451  		tmp := struct {
  6452  			Value *SystemPowerdownCommand `json:"arguments,omitempty"`
  6453  		}{}
  6454  		if err := json.Unmarshal(data, &tmp); err != nil {
  6455  			return err
  6456  		}
  6457  		if tmp.Value == nil {
  6458  			s.Arg = nil
  6459  		} else {
  6460  			s.Arg = *tmp.Value
  6461  		}
  6462  	case "system_reset":
  6463  		tmp := struct {
  6464  			Value *SystemResetCommand `json:"arguments,omitempty"`
  6465  		}{}
  6466  		if err := json.Unmarshal(data, &tmp); err != nil {
  6467  			return err
  6468  		}
  6469  		if tmp.Value == nil {
  6470  			s.Arg = nil
  6471  		} else {
  6472  			s.Arg = *tmp.Value
  6473  		}
  6474  	case "system_wakeup":
  6475  		tmp := struct {
  6476  			Value *SystemWakeupCommand `json:"arguments,omitempty"`
  6477  		}{}
  6478  		if err := json.Unmarshal(data, &tmp); err != nil {
  6479  			return err
  6480  		}
  6481  		if tmp.Value == nil {
  6482  			s.Arg = nil
  6483  		} else {
  6484  			s.Arg = *tmp.Value
  6485  		}
  6486  	case "trace-event-get-state":
  6487  		tmp := struct {
  6488  			Value *TraceEventGetStateCommand `json:"arguments,omitempty"`
  6489  		}{}
  6490  		if err := json.Unmarshal(data, &tmp); err != nil {
  6491  			return err
  6492  		}
  6493  		if tmp.Value == nil {
  6494  			s.Arg = nil
  6495  		} else {
  6496  			s.Arg = *tmp.Value
  6497  		}
  6498  	case "trace-event-set-state":
  6499  		tmp := struct {
  6500  			Value *TraceEventSetStateCommand `json:"arguments,omitempty"`
  6501  		}{}
  6502  		if err := json.Unmarshal(data, &tmp); err != nil {
  6503  			return err
  6504  		}
  6505  		if tmp.Value == nil {
  6506  			s.Arg = nil
  6507  		} else {
  6508  			s.Arg = *tmp.Value
  6509  		}
  6510  	case "transaction":
  6511  		tmp := struct {
  6512  			Value *TransactionCommand `json:"arguments,omitempty"`
  6513  		}{}
  6514  		if err := json.Unmarshal(data, &tmp); err != nil {
  6515  			return err
  6516  		}
  6517  		if tmp.Value == nil {
  6518  			s.Arg = nil
  6519  		} else {
  6520  			s.Arg = *tmp.Value
  6521  		}
  6522  	case "watchdog-set-action":
  6523  		tmp := struct {
  6524  			Value *WatchdogSetActionCommand `json:"arguments,omitempty"`
  6525  		}{}
  6526  		if err := json.Unmarshal(data, &tmp); err != nil {
  6527  			return err
  6528  		}
  6529  		if tmp.Value == nil {
  6530  			s.Arg = nil
  6531  		} else {
  6532  			s.Arg = *tmp.Value
  6533  		}
  6534  	case "x-blockdev-amend":
  6535  		tmp := struct {
  6536  			Value *XBlockdevAmendCommand `json:"arguments,omitempty"`
  6537  		}{}
  6538  		if err := json.Unmarshal(data, &tmp); err != nil {
  6539  			return err
  6540  		}
  6541  		if tmp.Value == nil {
  6542  			s.Arg = nil
  6543  		} else {
  6544  			s.Arg = *tmp.Value
  6545  		}
  6546  	case "x-blockdev-change":
  6547  		tmp := struct {
  6548  			Value *XBlockdevChangeCommand `json:"arguments,omitempty"`
  6549  		}{}
  6550  		if err := json.Unmarshal(data, &tmp); err != nil {
  6551  			return err
  6552  		}
  6553  		if tmp.Value == nil {
  6554  			s.Arg = nil
  6555  		} else {
  6556  			s.Arg = *tmp.Value
  6557  		}
  6558  	case "x-blockdev-set-iothread":
  6559  		tmp := struct {
  6560  			Value *XBlockdevSetIothreadCommand `json:"arguments,omitempty"`
  6561  		}{}
  6562  		if err := json.Unmarshal(data, &tmp); err != nil {
  6563  			return err
  6564  		}
  6565  		if tmp.Value == nil {
  6566  			s.Arg = nil
  6567  		} else {
  6568  			s.Arg = *tmp.Value
  6569  		}
  6570  	case "x-colo-lost-heartbeat":
  6571  		tmp := struct {
  6572  			Value *XColoLostHeartbeatCommand `json:"arguments,omitempty"`
  6573  		}{}
  6574  		if err := json.Unmarshal(data, &tmp); err != nil {
  6575  			return err
  6576  		}
  6577  		if tmp.Value == nil {
  6578  			s.Arg = nil
  6579  		} else {
  6580  			s.Arg = *tmp.Value
  6581  		}
  6582  	case "x-debug-block-dirty-bitmap-sha256":
  6583  		tmp := struct {
  6584  			Value *XDebugBlockDirtyBitmapSha256Command `json:"arguments,omitempty"`
  6585  		}{}
  6586  		if err := json.Unmarshal(data, &tmp); err != nil {
  6587  			return err
  6588  		}
  6589  		if tmp.Value == nil {
  6590  			s.Arg = nil
  6591  		} else {
  6592  			s.Arg = *tmp.Value
  6593  		}
  6594  	case "x-debug-query-block-graph":
  6595  		tmp := struct {
  6596  			Value *XDebugQueryBlockGraphCommand `json:"arguments,omitempty"`
  6597  		}{}
  6598  		if err := json.Unmarshal(data, &tmp); err != nil {
  6599  			return err
  6600  		}
  6601  		if tmp.Value == nil {
  6602  			s.Arg = nil
  6603  		} else {
  6604  			s.Arg = *tmp.Value
  6605  		}
  6606  	case "x-exit-preconfig":
  6607  		tmp := struct {
  6608  			Value *XExitPreconfigCommand `json:"arguments,omitempty"`
  6609  		}{}
  6610  		if err := json.Unmarshal(data, &tmp); err != nil {
  6611  			return err
  6612  		}
  6613  		if tmp.Value == nil {
  6614  			s.Arg = nil
  6615  		} else {
  6616  			s.Arg = *tmp.Value
  6617  		}
  6618  	case "x-query-irq":
  6619  		tmp := struct {
  6620  			Value *XQueryIrqCommand `json:"arguments,omitempty"`
  6621  		}{}
  6622  		if err := json.Unmarshal(data, &tmp); err != nil {
  6623  			return err
  6624  		}
  6625  		if tmp.Value == nil {
  6626  			s.Arg = nil
  6627  		} else {
  6628  			s.Arg = *tmp.Value
  6629  		}
  6630  	case "x-query-jit":
  6631  		tmp := struct {
  6632  			Value *XQueryJitCommand `json:"arguments,omitempty"`
  6633  		}{}
  6634  		if err := json.Unmarshal(data, &tmp); err != nil {
  6635  			return err
  6636  		}
  6637  		if tmp.Value == nil {
  6638  			s.Arg = nil
  6639  		} else {
  6640  			s.Arg = *tmp.Value
  6641  		}
  6642  	case "x-query-numa":
  6643  		tmp := struct {
  6644  			Value *XQueryNumaCommand `json:"arguments,omitempty"`
  6645  		}{}
  6646  		if err := json.Unmarshal(data, &tmp); err != nil {
  6647  			return err
  6648  		}
  6649  		if tmp.Value == nil {
  6650  			s.Arg = nil
  6651  		} else {
  6652  			s.Arg = *tmp.Value
  6653  		}
  6654  	case "x-query-opcount":
  6655  		tmp := struct {
  6656  			Value *XQueryOpcountCommand `json:"arguments,omitempty"`
  6657  		}{}
  6658  		if err := json.Unmarshal(data, &tmp); err != nil {
  6659  			return err
  6660  		}
  6661  		if tmp.Value == nil {
  6662  			s.Arg = nil
  6663  		} else {
  6664  			s.Arg = *tmp.Value
  6665  		}
  6666  	case "x-query-profile":
  6667  		tmp := struct {
  6668  			Value *XQueryProfileCommand `json:"arguments,omitempty"`
  6669  		}{}
  6670  		if err := json.Unmarshal(data, &tmp); err != nil {
  6671  			return err
  6672  		}
  6673  		if tmp.Value == nil {
  6674  			s.Arg = nil
  6675  		} else {
  6676  			s.Arg = *tmp.Value
  6677  		}
  6678  	case "x-query-ramblock":
  6679  		tmp := struct {
  6680  			Value *XQueryRamblockCommand `json:"arguments,omitempty"`
  6681  		}{}
  6682  		if err := json.Unmarshal(data, &tmp); err != nil {
  6683  			return err
  6684  		}
  6685  		if tmp.Value == nil {
  6686  			s.Arg = nil
  6687  		} else {
  6688  			s.Arg = *tmp.Value
  6689  		}
  6690  	case "x-query-rdma":
  6691  		tmp := struct {
  6692  			Value *XQueryRdmaCommand `json:"arguments,omitempty"`
  6693  		}{}
  6694  		if err := json.Unmarshal(data, &tmp); err != nil {
  6695  			return err
  6696  		}
  6697  		if tmp.Value == nil {
  6698  			s.Arg = nil
  6699  		} else {
  6700  			s.Arg = *tmp.Value
  6701  		}
  6702  	case "x-query-roms":
  6703  		tmp := struct {
  6704  			Value *XQueryRomsCommand `json:"arguments,omitempty"`
  6705  		}{}
  6706  		if err := json.Unmarshal(data, &tmp); err != nil {
  6707  			return err
  6708  		}
  6709  		if tmp.Value == nil {
  6710  			s.Arg = nil
  6711  		} else {
  6712  			s.Arg = *tmp.Value
  6713  		}
  6714  	case "x-query-usb":
  6715  		tmp := struct {
  6716  			Value *XQueryUsbCommand `json:"arguments,omitempty"`
  6717  		}{}
  6718  		if err := json.Unmarshal(data, &tmp); err != nil {
  6719  			return err
  6720  		}
  6721  		if tmp.Value == nil {
  6722  			s.Arg = nil
  6723  		} else {
  6724  			s.Arg = *tmp.Value
  6725  		}
  6726  	case "xen-colo-do-checkpoint":
  6727  		tmp := struct {
  6728  			Value *XenColoDoCheckpointCommand `json:"arguments,omitempty"`
  6729  		}{}
  6730  		if err := json.Unmarshal(data, &tmp); err != nil {
  6731  			return err
  6732  		}
  6733  		if tmp.Value == nil {
  6734  			s.Arg = nil
  6735  		} else {
  6736  			s.Arg = *tmp.Value
  6737  		}
  6738  	case "xen-load-devices-state":
  6739  		tmp := struct {
  6740  			Value *XenLoadDevicesStateCommand `json:"arguments,omitempty"`
  6741  		}{}
  6742  		if err := json.Unmarshal(data, &tmp); err != nil {
  6743  			return err
  6744  		}
  6745  		if tmp.Value == nil {
  6746  			s.Arg = nil
  6747  		} else {
  6748  			s.Arg = *tmp.Value
  6749  		}
  6750  	case "xen-save-devices-state":
  6751  		tmp := struct {
  6752  			Value *XenSaveDevicesStateCommand `json:"arguments,omitempty"`
  6753  		}{}
  6754  		if err := json.Unmarshal(data, &tmp); err != nil {
  6755  			return err
  6756  		}
  6757  		if tmp.Value == nil {
  6758  			s.Arg = nil
  6759  		} else {
  6760  			s.Arg = *tmp.Value
  6761  		}
  6762  	case "xen-set-global-dirty-log":
  6763  		tmp := struct {
  6764  			Value *XenSetGlobalDirtyLogCommand `json:"arguments,omitempty"`
  6765  		}{}
  6766  		if err := json.Unmarshal(data, &tmp); err != nil {
  6767  			return err
  6768  		}
  6769  		if tmp.Value == nil {
  6770  			s.Arg = nil
  6771  		} else {
  6772  			s.Arg = *tmp.Value
  6773  		}
  6774  	case "xen-set-replication":
  6775  		tmp := struct {
  6776  			Value *XenSetReplicationCommand `json:"arguments,omitempty"`
  6777  		}{}
  6778  		if err := json.Unmarshal(data, &tmp); err != nil {
  6779  			return err
  6780  		}
  6781  		if tmp.Value == nil {
  6782  			s.Arg = nil
  6783  		} else {
  6784  			s.Arg = *tmp.Value
  6785  		}
  6786  	case "yank":
  6787  		tmp := struct {
  6788  			Value *YankCommand `json:"arguments,omitempty"`
  6789  		}{}
  6790  		if err := json.Unmarshal(data, &tmp); err != nil {
  6791  			return err
  6792  		}
  6793  		if tmp.Value == nil {
  6794  			s.Arg = nil
  6795  		} else {
  6796  			s.Arg = *tmp.Value
  6797  		}
  6798  
  6799  	default:
  6800  		fmt.Println("Failed to decode Command", base.Name)
  6801  	}
  6802  
  6803  	return nil
  6804  }
  6805  
  6806  type CommandResult struct {
  6807  	CommandBase `json:"-"`
  6808  	Value       Any `json:"return,omitempty"`
  6809  }
  6810  
  6811  func (s Command) GetReturnType() CommandResult {
  6812  	return CommandResult{
  6813  		CommandBase: s.CommandBase,
  6814  	}
  6815  }
  6816  
  6817  // In order to evaluate nil value to empty JSON object
  6818  func (s *CommandResult) MarshalJSON() ([]byte, error) {
  6819  	if s.Value == nil {
  6820  		return []byte(`{"return":{}}`), nil
  6821  	}
  6822  	tmp := struct {
  6823  		Value Any `json:"return"`
  6824  	}{Value: s.Value}
  6825  
  6826  	return json.Marshal(&tmp)
  6827  }
  6828  
  6829  func (s *CommandResult) UnmarshalJSON(data []byte) error {
  6830  
  6831  	switch s.Name {
  6832  	case "add-fd":
  6833  		tmp := struct {
  6834  			Value *AddfdInfo `json:"return,omitempty"`
  6835  		}{}
  6836  		if err := json.Unmarshal(data, &tmp); err != nil {
  6837  			return err
  6838  		}
  6839  		if tmp.Value == nil {
  6840  			s.Value = nil
  6841  		} else {
  6842  			s.Value = *tmp.Value
  6843  		}
  6844  	case "blockdev-snapshot-delete-internal-sync":
  6845  		tmp := struct {
  6846  			Value *SnapshotInfo `json:"return,omitempty"`
  6847  		}{}
  6848  		if err := json.Unmarshal(data, &tmp); err != nil {
  6849  			return err
  6850  		}
  6851  		if tmp.Value == nil {
  6852  			s.Value = nil
  6853  		} else {
  6854  			s.Value = *tmp.Value
  6855  		}
  6856  	case "chardev-add":
  6857  		tmp := struct {
  6858  			Value *ChardevReturn `json:"return,omitempty"`
  6859  		}{}
  6860  		if err := json.Unmarshal(data, &tmp); err != nil {
  6861  			return err
  6862  		}
  6863  		if tmp.Value == nil {
  6864  			s.Value = nil
  6865  		} else {
  6866  			s.Value = *tmp.Value
  6867  		}
  6868  	case "chardev-change":
  6869  		tmp := struct {
  6870  			Value *ChardevReturn `json:"return,omitempty"`
  6871  		}{}
  6872  		if err := json.Unmarshal(data, &tmp); err != nil {
  6873  			return err
  6874  		}
  6875  		if tmp.Value == nil {
  6876  			s.Value = nil
  6877  		} else {
  6878  			s.Value = *tmp.Value
  6879  		}
  6880  	case "device-list-properties":
  6881  		tmp := struct {
  6882  			Value []ObjectPropertyInfo `json:"return,omitempty"`
  6883  		}{}
  6884  		if err := json.Unmarshal(data, &tmp); err != nil {
  6885  			return err
  6886  		}
  6887  		if tmp.Value == nil {
  6888  			s.Value = nil
  6889  		} else {
  6890  			s.Value = tmp.Value
  6891  		}
  6892  	case "human-monitor-command":
  6893  		tmp := struct {
  6894  			Value *string `json:"return,omitempty"`
  6895  		}{}
  6896  		if err := json.Unmarshal(data, &tmp); err != nil {
  6897  			return err
  6898  		}
  6899  		if tmp.Value == nil {
  6900  			s.Value = nil
  6901  		} else {
  6902  			s.Value = *tmp.Value
  6903  		}
  6904  	case "qom-get":
  6905  		tmp := struct {
  6906  			Value *Any `json:"return,omitempty"`
  6907  		}{}
  6908  		if err := json.Unmarshal(data, &tmp); err != nil {
  6909  			return err
  6910  		}
  6911  		if tmp.Value == nil {
  6912  			s.Value = nil
  6913  		} else {
  6914  			s.Value = *tmp.Value
  6915  		}
  6916  	case "qom-list":
  6917  		tmp := struct {
  6918  			Value []ObjectPropertyInfo `json:"return,omitempty"`
  6919  		}{}
  6920  		if err := json.Unmarshal(data, &tmp); err != nil {
  6921  			return err
  6922  		}
  6923  		if tmp.Value == nil {
  6924  			s.Value = nil
  6925  		} else {
  6926  			s.Value = tmp.Value
  6927  		}
  6928  	case "qom-list-properties":
  6929  		tmp := struct {
  6930  			Value []ObjectPropertyInfo `json:"return,omitempty"`
  6931  		}{}
  6932  		if err := json.Unmarshal(data, &tmp); err != nil {
  6933  			return err
  6934  		}
  6935  		if tmp.Value == nil {
  6936  			s.Value = nil
  6937  		} else {
  6938  			s.Value = tmp.Value
  6939  		}
  6940  	case "qom-list-types":
  6941  		tmp := struct {
  6942  			Value []ObjectTypeInfo `json:"return,omitempty"`
  6943  		}{}
  6944  		if err := json.Unmarshal(data, &tmp); err != nil {
  6945  			return err
  6946  		}
  6947  		if tmp.Value == nil {
  6948  			s.Value = nil
  6949  		} else {
  6950  			s.Value = tmp.Value
  6951  		}
  6952  	case "query-acpi-ospm-status":
  6953  		tmp := struct {
  6954  			Value []ACPIOSTInfo `json:"return,omitempty"`
  6955  		}{}
  6956  		if err := json.Unmarshal(data, &tmp); err != nil {
  6957  			return err
  6958  		}
  6959  		if tmp.Value == nil {
  6960  			s.Value = nil
  6961  		} else {
  6962  			s.Value = tmp.Value
  6963  		}
  6964  	case "query-balloon":
  6965  		tmp := struct {
  6966  			Value *BalloonInfo `json:"return,omitempty"`
  6967  		}{}
  6968  		if err := json.Unmarshal(data, &tmp); err != nil {
  6969  			return err
  6970  		}
  6971  		if tmp.Value == nil {
  6972  			s.Value = nil
  6973  		} else {
  6974  			s.Value = *tmp.Value
  6975  		}
  6976  	case "query-block":
  6977  		tmp := struct {
  6978  			Value []BlockInfo `json:"return,omitempty"`
  6979  		}{}
  6980  		if err := json.Unmarshal(data, &tmp); err != nil {
  6981  			return err
  6982  		}
  6983  		if tmp.Value == nil {
  6984  			s.Value = nil
  6985  		} else {
  6986  			s.Value = tmp.Value
  6987  		}
  6988  	case "query-block-exports":
  6989  		tmp := struct {
  6990  			Value []BlockExportInfo `json:"return,omitempty"`
  6991  		}{}
  6992  		if err := json.Unmarshal(data, &tmp); err != nil {
  6993  			return err
  6994  		}
  6995  		if tmp.Value == nil {
  6996  			s.Value = nil
  6997  		} else {
  6998  			s.Value = tmp.Value
  6999  		}
  7000  	case "query-block-jobs":
  7001  		tmp := struct {
  7002  			Value []BlockJobInfo `json:"return,omitempty"`
  7003  		}{}
  7004  		if err := json.Unmarshal(data, &tmp); err != nil {
  7005  			return err
  7006  		}
  7007  		if tmp.Value == nil {
  7008  			s.Value = nil
  7009  		} else {
  7010  			s.Value = tmp.Value
  7011  		}
  7012  	case "query-blockstats":
  7013  		tmp := struct {
  7014  			Value []BlockStats `json:"return,omitempty"`
  7015  		}{}
  7016  		if err := json.Unmarshal(data, &tmp); err != nil {
  7017  			return err
  7018  		}
  7019  		if tmp.Value == nil {
  7020  			s.Value = nil
  7021  		} else {
  7022  			s.Value = tmp.Value
  7023  		}
  7024  	case "query-chardev":
  7025  		tmp := struct {
  7026  			Value []ChardevInfo `json:"return,omitempty"`
  7027  		}{}
  7028  		if err := json.Unmarshal(data, &tmp); err != nil {
  7029  			return err
  7030  		}
  7031  		if tmp.Value == nil {
  7032  			s.Value = nil
  7033  		} else {
  7034  			s.Value = tmp.Value
  7035  		}
  7036  	case "query-chardev-backends":
  7037  		tmp := struct {
  7038  			Value []ChardevBackendInfo `json:"return,omitempty"`
  7039  		}{}
  7040  		if err := json.Unmarshal(data, &tmp); err != nil {
  7041  			return err
  7042  		}
  7043  		if tmp.Value == nil {
  7044  			s.Value = nil
  7045  		} else {
  7046  			s.Value = tmp.Value
  7047  		}
  7048  	case "query-colo-status":
  7049  		tmp := struct {
  7050  			Value *COLOStatus `json:"return,omitempty"`
  7051  		}{}
  7052  		if err := json.Unmarshal(data, &tmp); err != nil {
  7053  			return err
  7054  		}
  7055  		if tmp.Value == nil {
  7056  			s.Value = nil
  7057  		} else {
  7058  			s.Value = *tmp.Value
  7059  		}
  7060  	case "query-command-line-options":
  7061  		tmp := struct {
  7062  			Value []CommandLineOptionInfo `json:"return,omitempty"`
  7063  		}{}
  7064  		if err := json.Unmarshal(data, &tmp); err != nil {
  7065  			return err
  7066  		}
  7067  		if tmp.Value == nil {
  7068  			s.Value = nil
  7069  		} else {
  7070  			s.Value = tmp.Value
  7071  		}
  7072  	case "query-commands":
  7073  		tmp := struct {
  7074  			Value []CommandInfo `json:"return,omitempty"`
  7075  		}{}
  7076  		if err := json.Unmarshal(data, &tmp); err != nil {
  7077  			return err
  7078  		}
  7079  		if tmp.Value == nil {
  7080  			s.Value = nil
  7081  		} else {
  7082  			s.Value = tmp.Value
  7083  		}
  7084  	case "query-cpu-definitions":
  7085  		tmp := struct {
  7086  			Value []CpuDefinitionInfo `json:"return,omitempty"`
  7087  		}{}
  7088  		if err := json.Unmarshal(data, &tmp); err != nil {
  7089  			return err
  7090  		}
  7091  		if tmp.Value == nil {
  7092  			s.Value = nil
  7093  		} else {
  7094  			s.Value = tmp.Value
  7095  		}
  7096  	case "query-cpu-model-baseline":
  7097  		tmp := struct {
  7098  			Value *CpuModelBaselineInfo `json:"return,omitempty"`
  7099  		}{}
  7100  		if err := json.Unmarshal(data, &tmp); err != nil {
  7101  			return err
  7102  		}
  7103  		if tmp.Value == nil {
  7104  			s.Value = nil
  7105  		} else {
  7106  			s.Value = *tmp.Value
  7107  		}
  7108  	case "query-cpu-model-comparison":
  7109  		tmp := struct {
  7110  			Value *CpuModelCompareInfo `json:"return,omitempty"`
  7111  		}{}
  7112  		if err := json.Unmarshal(data, &tmp); err != nil {
  7113  			return err
  7114  		}
  7115  		if tmp.Value == nil {
  7116  			s.Value = nil
  7117  		} else {
  7118  			s.Value = *tmp.Value
  7119  		}
  7120  	case "query-cpu-model-expansion":
  7121  		tmp := struct {
  7122  			Value *CpuModelExpansionInfo `json:"return,omitempty"`
  7123  		}{}
  7124  		if err := json.Unmarshal(data, &tmp); err != nil {
  7125  			return err
  7126  		}
  7127  		if tmp.Value == nil {
  7128  			s.Value = nil
  7129  		} else {
  7130  			s.Value = *tmp.Value
  7131  		}
  7132  	case "query-cpus-fast":
  7133  		tmp := struct {
  7134  			Value []CpuInfoFast `json:"return,omitempty"`
  7135  		}{}
  7136  		if err := json.Unmarshal(data, &tmp); err != nil {
  7137  			return err
  7138  		}
  7139  		if tmp.Value == nil {
  7140  			s.Value = nil
  7141  		} else {
  7142  			s.Value = tmp.Value
  7143  		}
  7144  	case "query-current-machine":
  7145  		tmp := struct {
  7146  			Value *CurrentMachineParams `json:"return,omitempty"`
  7147  		}{}
  7148  		if err := json.Unmarshal(data, &tmp); err != nil {
  7149  			return err
  7150  		}
  7151  		if tmp.Value == nil {
  7152  			s.Value = nil
  7153  		} else {
  7154  			s.Value = *tmp.Value
  7155  		}
  7156  	case "query-dirty-rate":
  7157  		tmp := struct {
  7158  			Value *DirtyRateInfo `json:"return,omitempty"`
  7159  		}{}
  7160  		if err := json.Unmarshal(data, &tmp); err != nil {
  7161  			return err
  7162  		}
  7163  		if tmp.Value == nil {
  7164  			s.Value = nil
  7165  		} else {
  7166  			s.Value = *tmp.Value
  7167  		}
  7168  	case "query-display-options":
  7169  		tmp := struct {
  7170  			Value *DisplayOptions `json:"return,omitempty"`
  7171  		}{}
  7172  		if err := json.Unmarshal(data, &tmp); err != nil {
  7173  			return err
  7174  		}
  7175  		if tmp.Value == nil {
  7176  			s.Value = nil
  7177  		} else {
  7178  			s.Value = *tmp.Value
  7179  		}
  7180  	case "query-dump":
  7181  		tmp := struct {
  7182  			Value *DumpQueryResult `json:"return,omitempty"`
  7183  		}{}
  7184  		if err := json.Unmarshal(data, &tmp); err != nil {
  7185  			return err
  7186  		}
  7187  		if tmp.Value == nil {
  7188  			s.Value = nil
  7189  		} else {
  7190  			s.Value = *tmp.Value
  7191  		}
  7192  	case "query-dump-guest-memory-capability":
  7193  		tmp := struct {
  7194  			Value *DumpGuestMemoryCapability `json:"return,omitempty"`
  7195  		}{}
  7196  		if err := json.Unmarshal(data, &tmp); err != nil {
  7197  			return err
  7198  		}
  7199  		if tmp.Value == nil {
  7200  			s.Value = nil
  7201  		} else {
  7202  			s.Value = *tmp.Value
  7203  		}
  7204  	case "query-fdsets":
  7205  		tmp := struct {
  7206  			Value []FdsetInfo `json:"return,omitempty"`
  7207  		}{}
  7208  		if err := json.Unmarshal(data, &tmp); err != nil {
  7209  			return err
  7210  		}
  7211  		if tmp.Value == nil {
  7212  			s.Value = nil
  7213  		} else {
  7214  			s.Value = tmp.Value
  7215  		}
  7216  	case "query-gic-capabilities":
  7217  		tmp := struct {
  7218  			Value []GICCapability `json:"return,omitempty"`
  7219  		}{}
  7220  		if err := json.Unmarshal(data, &tmp); err != nil {
  7221  			return err
  7222  		}
  7223  		if tmp.Value == nil {
  7224  			s.Value = nil
  7225  		} else {
  7226  			s.Value = tmp.Value
  7227  		}
  7228  	case "query-hotpluggable-cpus":
  7229  		tmp := struct {
  7230  			Value []HotpluggableCPU `json:"return,omitempty"`
  7231  		}{}
  7232  		if err := json.Unmarshal(data, &tmp); err != nil {
  7233  			return err
  7234  		}
  7235  		if tmp.Value == nil {
  7236  			s.Value = nil
  7237  		} else {
  7238  			s.Value = tmp.Value
  7239  		}
  7240  	case "query-iothreads":
  7241  		tmp := struct {
  7242  			Value []IOThreadInfo `json:"return,omitempty"`
  7243  		}{}
  7244  		if err := json.Unmarshal(data, &tmp); err != nil {
  7245  			return err
  7246  		}
  7247  		if tmp.Value == nil {
  7248  			s.Value = nil
  7249  		} else {
  7250  			s.Value = tmp.Value
  7251  		}
  7252  	case "query-jobs":
  7253  		tmp := struct {
  7254  			Value []JobInfo `json:"return,omitempty"`
  7255  		}{}
  7256  		if err := json.Unmarshal(data, &tmp); err != nil {
  7257  			return err
  7258  		}
  7259  		if tmp.Value == nil {
  7260  			s.Value = nil
  7261  		} else {
  7262  			s.Value = tmp.Value
  7263  		}
  7264  	case "query-kvm":
  7265  		tmp := struct {
  7266  			Value *KvmInfo `json:"return,omitempty"`
  7267  		}{}
  7268  		if err := json.Unmarshal(data, &tmp); err != nil {
  7269  			return err
  7270  		}
  7271  		if tmp.Value == nil {
  7272  			s.Value = nil
  7273  		} else {
  7274  			s.Value = *tmp.Value
  7275  		}
  7276  	case "query-machines":
  7277  		tmp := struct {
  7278  			Value []MachineInfo `json:"return,omitempty"`
  7279  		}{}
  7280  		if err := json.Unmarshal(data, &tmp); err != nil {
  7281  			return err
  7282  		}
  7283  		if tmp.Value == nil {
  7284  			s.Value = nil
  7285  		} else {
  7286  			s.Value = tmp.Value
  7287  		}
  7288  	case "query-memdev":
  7289  		tmp := struct {
  7290  			Value []Memdev `json:"return,omitempty"`
  7291  		}{}
  7292  		if err := json.Unmarshal(data, &tmp); err != nil {
  7293  			return err
  7294  		}
  7295  		if tmp.Value == nil {
  7296  			s.Value = nil
  7297  		} else {
  7298  			s.Value = tmp.Value
  7299  		}
  7300  	case "query-memory-devices":
  7301  		tmp := struct {
  7302  			Value []MemoryDeviceInfo `json:"return,omitempty"`
  7303  		}{}
  7304  		if err := json.Unmarshal(data, &tmp); err != nil {
  7305  			return err
  7306  		}
  7307  		if tmp.Value == nil {
  7308  			s.Value = nil
  7309  		} else {
  7310  			s.Value = tmp.Value
  7311  		}
  7312  	case "query-memory-size-summary":
  7313  		tmp := struct {
  7314  			Value *MemoryInfo `json:"return,omitempty"`
  7315  		}{}
  7316  		if err := json.Unmarshal(data, &tmp); err != nil {
  7317  			return err
  7318  		}
  7319  		if tmp.Value == nil {
  7320  			s.Value = nil
  7321  		} else {
  7322  			s.Value = *tmp.Value
  7323  		}
  7324  	case "query-mice":
  7325  		tmp := struct {
  7326  			Value []MouseInfo `json:"return,omitempty"`
  7327  		}{}
  7328  		if err := json.Unmarshal(data, &tmp); err != nil {
  7329  			return err
  7330  		}
  7331  		if tmp.Value == nil {
  7332  			s.Value = nil
  7333  		} else {
  7334  			s.Value = tmp.Value
  7335  		}
  7336  	case "query-migrate":
  7337  		tmp := struct {
  7338  			Value *MigrationInfo `json:"return,omitempty"`
  7339  		}{}
  7340  		if err := json.Unmarshal(data, &tmp); err != nil {
  7341  			return err
  7342  		}
  7343  		if tmp.Value == nil {
  7344  			s.Value = nil
  7345  		} else {
  7346  			s.Value = *tmp.Value
  7347  		}
  7348  	case "query-migrate-capabilities":
  7349  		tmp := struct {
  7350  			Value []MigrationCapabilityStatus `json:"return,omitempty"`
  7351  		}{}
  7352  		if err := json.Unmarshal(data, &tmp); err != nil {
  7353  			return err
  7354  		}
  7355  		if tmp.Value == nil {
  7356  			s.Value = nil
  7357  		} else {
  7358  			s.Value = tmp.Value
  7359  		}
  7360  	case "query-migrate-parameters":
  7361  		tmp := struct {
  7362  			Value *MigrationParameters `json:"return,omitempty"`
  7363  		}{}
  7364  		if err := json.Unmarshal(data, &tmp); err != nil {
  7365  			return err
  7366  		}
  7367  		if tmp.Value == nil {
  7368  			s.Value = nil
  7369  		} else {
  7370  			s.Value = *tmp.Value
  7371  		}
  7372  	case "query-name":
  7373  		tmp := struct {
  7374  			Value *NameInfo `json:"return,omitempty"`
  7375  		}{}
  7376  		if err := json.Unmarshal(data, &tmp); err != nil {
  7377  			return err
  7378  		}
  7379  		if tmp.Value == nil {
  7380  			s.Value = nil
  7381  		} else {
  7382  			s.Value = *tmp.Value
  7383  		}
  7384  	case "query-named-block-nodes":
  7385  		tmp := struct {
  7386  			Value []BlockDeviceInfo `json:"return,omitempty"`
  7387  		}{}
  7388  		if err := json.Unmarshal(data, &tmp); err != nil {
  7389  			return err
  7390  		}
  7391  		if tmp.Value == nil {
  7392  			s.Value = nil
  7393  		} else {
  7394  			s.Value = tmp.Value
  7395  		}
  7396  	case "query-pci":
  7397  		tmp := struct {
  7398  			Value []PciInfo `json:"return,omitempty"`
  7399  		}{}
  7400  		if err := json.Unmarshal(data, &tmp); err != nil {
  7401  			return err
  7402  		}
  7403  		if tmp.Value == nil {
  7404  			s.Value = nil
  7405  		} else {
  7406  			s.Value = tmp.Value
  7407  		}
  7408  	case "query-pr-managers":
  7409  		tmp := struct {
  7410  			Value []PRManagerInfo `json:"return,omitempty"`
  7411  		}{}
  7412  		if err := json.Unmarshal(data, &tmp); err != nil {
  7413  			return err
  7414  		}
  7415  		if tmp.Value == nil {
  7416  			s.Value = nil
  7417  		} else {
  7418  			s.Value = tmp.Value
  7419  		}
  7420  	case "query-qmp-schema":
  7421  		tmp := struct {
  7422  			Value []SchemaInfo `json:"return,omitempty"`
  7423  		}{}
  7424  		if err := json.Unmarshal(data, &tmp); err != nil {
  7425  			return err
  7426  		}
  7427  		if tmp.Value == nil {
  7428  			s.Value = nil
  7429  		} else {
  7430  			s.Value = tmp.Value
  7431  		}
  7432  	case "query-replay":
  7433  		tmp := struct {
  7434  			Value *ReplayInfo `json:"return,omitempty"`
  7435  		}{}
  7436  		if err := json.Unmarshal(data, &tmp); err != nil {
  7437  			return err
  7438  		}
  7439  		if tmp.Value == nil {
  7440  			s.Value = nil
  7441  		} else {
  7442  			s.Value = *tmp.Value
  7443  		}
  7444  	case "query-rocker":
  7445  		tmp := struct {
  7446  			Value *RockerSwitch `json:"return,omitempty"`
  7447  		}{}
  7448  		if err := json.Unmarshal(data, &tmp); err != nil {
  7449  			return err
  7450  		}
  7451  		if tmp.Value == nil {
  7452  			s.Value = nil
  7453  		} else {
  7454  			s.Value = *tmp.Value
  7455  		}
  7456  	case "query-rocker-of-dpa-flows":
  7457  		tmp := struct {
  7458  			Value []RockerOfDpaFlow `json:"return,omitempty"`
  7459  		}{}
  7460  		if err := json.Unmarshal(data, &tmp); err != nil {
  7461  			return err
  7462  		}
  7463  		if tmp.Value == nil {
  7464  			s.Value = nil
  7465  		} else {
  7466  			s.Value = tmp.Value
  7467  		}
  7468  	case "query-rocker-of-dpa-groups":
  7469  		tmp := struct {
  7470  			Value []RockerOfDpaGroup `json:"return,omitempty"`
  7471  		}{}
  7472  		if err := json.Unmarshal(data, &tmp); err != nil {
  7473  			return err
  7474  		}
  7475  		if tmp.Value == nil {
  7476  			s.Value = nil
  7477  		} else {
  7478  			s.Value = tmp.Value
  7479  		}
  7480  	case "query-rocker-ports":
  7481  		tmp := struct {
  7482  			Value []RockerPort `json:"return,omitempty"`
  7483  		}{}
  7484  		if err := json.Unmarshal(data, &tmp); err != nil {
  7485  			return err
  7486  		}
  7487  		if tmp.Value == nil {
  7488  			s.Value = nil
  7489  		} else {
  7490  			s.Value = tmp.Value
  7491  		}
  7492  	case "query-rx-filter":
  7493  		tmp := struct {
  7494  			Value []RxFilterInfo `json:"return,omitempty"`
  7495  		}{}
  7496  		if err := json.Unmarshal(data, &tmp); err != nil {
  7497  			return err
  7498  		}
  7499  		if tmp.Value == nil {
  7500  			s.Value = nil
  7501  		} else {
  7502  			s.Value = tmp.Value
  7503  		}
  7504  	case "query-sev":
  7505  		tmp := struct {
  7506  			Value *SevInfo `json:"return,omitempty"`
  7507  		}{}
  7508  		if err := json.Unmarshal(data, &tmp); err != nil {
  7509  			return err
  7510  		}
  7511  		if tmp.Value == nil {
  7512  			s.Value = nil
  7513  		} else {
  7514  			s.Value = *tmp.Value
  7515  		}
  7516  	case "query-sev-attestation-report":
  7517  		tmp := struct {
  7518  			Value *SevAttestationReport `json:"return,omitempty"`
  7519  		}{}
  7520  		if err := json.Unmarshal(data, &tmp); err != nil {
  7521  			return err
  7522  		}
  7523  		if tmp.Value == nil {
  7524  			s.Value = nil
  7525  		} else {
  7526  			s.Value = *tmp.Value
  7527  		}
  7528  	case "query-sev-capabilities":
  7529  		tmp := struct {
  7530  			Value *SevCapability `json:"return,omitempty"`
  7531  		}{}
  7532  		if err := json.Unmarshal(data, &tmp); err != nil {
  7533  			return err
  7534  		}
  7535  		if tmp.Value == nil {
  7536  			s.Value = nil
  7537  		} else {
  7538  			s.Value = *tmp.Value
  7539  		}
  7540  	case "query-sev-launch-measure":
  7541  		tmp := struct {
  7542  			Value *SevLaunchMeasureInfo `json:"return,omitempty"`
  7543  		}{}
  7544  		if err := json.Unmarshal(data, &tmp); err != nil {
  7545  			return err
  7546  		}
  7547  		if tmp.Value == nil {
  7548  			s.Value = nil
  7549  		} else {
  7550  			s.Value = *tmp.Value
  7551  		}
  7552  	case "query-sgx":
  7553  		tmp := struct {
  7554  			Value *SGXInfo `json:"return,omitempty"`
  7555  		}{}
  7556  		if err := json.Unmarshal(data, &tmp); err != nil {
  7557  			return err
  7558  		}
  7559  		if tmp.Value == nil {
  7560  			s.Value = nil
  7561  		} else {
  7562  			s.Value = *tmp.Value
  7563  		}
  7564  	case "query-sgx-capabilities":
  7565  		tmp := struct {
  7566  			Value *SGXInfo `json:"return,omitempty"`
  7567  		}{}
  7568  		if err := json.Unmarshal(data, &tmp); err != nil {
  7569  			return err
  7570  		}
  7571  		if tmp.Value == nil {
  7572  			s.Value = nil
  7573  		} else {
  7574  			s.Value = *tmp.Value
  7575  		}
  7576  	case "query-spice":
  7577  		tmp := struct {
  7578  			Value *SpiceInfo `json:"return,omitempty"`
  7579  		}{}
  7580  		if err := json.Unmarshal(data, &tmp); err != nil {
  7581  			return err
  7582  		}
  7583  		if tmp.Value == nil {
  7584  			s.Value = nil
  7585  		} else {
  7586  			s.Value = *tmp.Value
  7587  		}
  7588  	case "query-status":
  7589  		tmp := struct {
  7590  			Value *StatusInfo `json:"return,omitempty"`
  7591  		}{}
  7592  		if err := json.Unmarshal(data, &tmp); err != nil {
  7593  			return err
  7594  		}
  7595  		if tmp.Value == nil {
  7596  			s.Value = nil
  7597  		} else {
  7598  			s.Value = *tmp.Value
  7599  		}
  7600  	case "query-target":
  7601  		tmp := struct {
  7602  			Value *TargetInfo `json:"return,omitempty"`
  7603  		}{}
  7604  		if err := json.Unmarshal(data, &tmp); err != nil {
  7605  			return err
  7606  		}
  7607  		if tmp.Value == nil {
  7608  			s.Value = nil
  7609  		} else {
  7610  			s.Value = *tmp.Value
  7611  		}
  7612  	case "query-tpm":
  7613  		tmp := struct {
  7614  			Value []TPMInfo `json:"return,omitempty"`
  7615  		}{}
  7616  		if err := json.Unmarshal(data, &tmp); err != nil {
  7617  			return err
  7618  		}
  7619  		if tmp.Value == nil {
  7620  			s.Value = nil
  7621  		} else {
  7622  			s.Value = tmp.Value
  7623  		}
  7624  	case "query-tpm-models":
  7625  		tmp := struct {
  7626  			Value []TpmModel `json:"return,omitempty"`
  7627  		}{}
  7628  		if err := json.Unmarshal(data, &tmp); err != nil {
  7629  			return err
  7630  		}
  7631  		if tmp.Value == nil {
  7632  			s.Value = nil
  7633  		} else {
  7634  			s.Value = tmp.Value
  7635  		}
  7636  	case "query-tpm-types":
  7637  		tmp := struct {
  7638  			Value []TpmType `json:"return,omitempty"`
  7639  		}{}
  7640  		if err := json.Unmarshal(data, &tmp); err != nil {
  7641  			return err
  7642  		}
  7643  		if tmp.Value == nil {
  7644  			s.Value = nil
  7645  		} else {
  7646  			s.Value = tmp.Value
  7647  		}
  7648  	case "query-uuid":
  7649  		tmp := struct {
  7650  			Value *UuidInfo `json:"return,omitempty"`
  7651  		}{}
  7652  		if err := json.Unmarshal(data, &tmp); err != nil {
  7653  			return err
  7654  		}
  7655  		if tmp.Value == nil {
  7656  			s.Value = nil
  7657  		} else {
  7658  			s.Value = *tmp.Value
  7659  		}
  7660  	case "query-version":
  7661  		tmp := struct {
  7662  			Value *VersionInfo `json:"return,omitempty"`
  7663  		}{}
  7664  		if err := json.Unmarshal(data, &tmp); err != nil {
  7665  			return err
  7666  		}
  7667  		if tmp.Value == nil {
  7668  			s.Value = nil
  7669  		} else {
  7670  			s.Value = *tmp.Value
  7671  		}
  7672  	case "query-vm-generation-id":
  7673  		tmp := struct {
  7674  			Value *GuidInfo `json:"return,omitempty"`
  7675  		}{}
  7676  		if err := json.Unmarshal(data, &tmp); err != nil {
  7677  			return err
  7678  		}
  7679  		if tmp.Value == nil {
  7680  			s.Value = nil
  7681  		} else {
  7682  			s.Value = *tmp.Value
  7683  		}
  7684  	case "query-vnc":
  7685  		tmp := struct {
  7686  			Value *VncInfo `json:"return,omitempty"`
  7687  		}{}
  7688  		if err := json.Unmarshal(data, &tmp); err != nil {
  7689  			return err
  7690  		}
  7691  		if tmp.Value == nil {
  7692  			s.Value = nil
  7693  		} else {
  7694  			s.Value = *tmp.Value
  7695  		}
  7696  	case "query-vnc-servers":
  7697  		tmp := struct {
  7698  			Value []VncInfo2 `json:"return,omitempty"`
  7699  		}{}
  7700  		if err := json.Unmarshal(data, &tmp); err != nil {
  7701  			return err
  7702  		}
  7703  		if tmp.Value == nil {
  7704  			s.Value = nil
  7705  		} else {
  7706  			s.Value = tmp.Value
  7707  		}
  7708  	case "query-xen-replication-status":
  7709  		tmp := struct {
  7710  			Value *ReplicationStatus `json:"return,omitempty"`
  7711  		}{}
  7712  		if err := json.Unmarshal(data, &tmp); err != nil {
  7713  			return err
  7714  		}
  7715  		if tmp.Value == nil {
  7716  			s.Value = nil
  7717  		} else {
  7718  			s.Value = *tmp.Value
  7719  		}
  7720  	case "query-yank":
  7721  		tmp := struct {
  7722  			Value []YankInstance `json:"return,omitempty"`
  7723  		}{}
  7724  		if err := json.Unmarshal(data, &tmp); err != nil {
  7725  			return err
  7726  		}
  7727  		if tmp.Value == nil {
  7728  			s.Value = nil
  7729  		} else {
  7730  			s.Value = tmp.Value
  7731  		}
  7732  	case "ringbuf-read":
  7733  		tmp := struct {
  7734  			Value *string `json:"return,omitempty"`
  7735  		}{}
  7736  		if err := json.Unmarshal(data, &tmp); err != nil {
  7737  			return err
  7738  		}
  7739  		if tmp.Value == nil {
  7740  			s.Value = nil
  7741  		} else {
  7742  			s.Value = *tmp.Value
  7743  		}
  7744  	case "trace-event-get-state":
  7745  		tmp := struct {
  7746  			Value []TraceEventInfo `json:"return,omitempty"`
  7747  		}{}
  7748  		if err := json.Unmarshal(data, &tmp); err != nil {
  7749  			return err
  7750  		}
  7751  		if tmp.Value == nil {
  7752  			s.Value = nil
  7753  		} else {
  7754  			s.Value = tmp.Value
  7755  		}
  7756  	case "x-debug-block-dirty-bitmap-sha256":
  7757  		tmp := struct {
  7758  			Value *BlockDirtyBitmapSha256 `json:"return,omitempty"`
  7759  		}{}
  7760  		if err := json.Unmarshal(data, &tmp); err != nil {
  7761  			return err
  7762  		}
  7763  		if tmp.Value == nil {
  7764  			s.Value = nil
  7765  		} else {
  7766  			s.Value = *tmp.Value
  7767  		}
  7768  	case "x-debug-query-block-graph":
  7769  		tmp := struct {
  7770  			Value *XDbgBlockGraph `json:"return,omitempty"`
  7771  		}{}
  7772  		if err := json.Unmarshal(data, &tmp); err != nil {
  7773  			return err
  7774  		}
  7775  		if tmp.Value == nil {
  7776  			s.Value = nil
  7777  		} else {
  7778  			s.Value = *tmp.Value
  7779  		}
  7780  	case "x-query-irq":
  7781  		tmp := struct {
  7782  			Value *HumanReadableText `json:"return,omitempty"`
  7783  		}{}
  7784  		if err := json.Unmarshal(data, &tmp); err != nil {
  7785  			return err
  7786  		}
  7787  		if tmp.Value == nil {
  7788  			s.Value = nil
  7789  		} else {
  7790  			s.Value = *tmp.Value
  7791  		}
  7792  	case "x-query-jit":
  7793  		tmp := struct {
  7794  			Value *HumanReadableText `json:"return,omitempty"`
  7795  		}{}
  7796  		if err := json.Unmarshal(data, &tmp); err != nil {
  7797  			return err
  7798  		}
  7799  		if tmp.Value == nil {
  7800  			s.Value = nil
  7801  		} else {
  7802  			s.Value = *tmp.Value
  7803  		}
  7804  	case "x-query-numa":
  7805  		tmp := struct {
  7806  			Value *HumanReadableText `json:"return,omitempty"`
  7807  		}{}
  7808  		if err := json.Unmarshal(data, &tmp); err != nil {
  7809  			return err
  7810  		}
  7811  		if tmp.Value == nil {
  7812  			s.Value = nil
  7813  		} else {
  7814  			s.Value = *tmp.Value
  7815  		}
  7816  	case "x-query-opcount":
  7817  		tmp := struct {
  7818  			Value *HumanReadableText `json:"return,omitempty"`
  7819  		}{}
  7820  		if err := json.Unmarshal(data, &tmp); err != nil {
  7821  			return err
  7822  		}
  7823  		if tmp.Value == nil {
  7824  			s.Value = nil
  7825  		} else {
  7826  			s.Value = *tmp.Value
  7827  		}
  7828  	case "x-query-profile":
  7829  		tmp := struct {
  7830  			Value *HumanReadableText `json:"return,omitempty"`
  7831  		}{}
  7832  		if err := json.Unmarshal(data, &tmp); err != nil {
  7833  			return err
  7834  		}
  7835  		if tmp.Value == nil {
  7836  			s.Value = nil
  7837  		} else {
  7838  			s.Value = *tmp.Value
  7839  		}
  7840  	case "x-query-ramblock":
  7841  		tmp := struct {
  7842  			Value *HumanReadableText `json:"return,omitempty"`
  7843  		}{}
  7844  		if err := json.Unmarshal(data, &tmp); err != nil {
  7845  			return err
  7846  		}
  7847  		if tmp.Value == nil {
  7848  			s.Value = nil
  7849  		} else {
  7850  			s.Value = *tmp.Value
  7851  		}
  7852  	case "x-query-rdma":
  7853  		tmp := struct {
  7854  			Value *HumanReadableText `json:"return,omitempty"`
  7855  		}{}
  7856  		if err := json.Unmarshal(data, &tmp); err != nil {
  7857  			return err
  7858  		}
  7859  		if tmp.Value == nil {
  7860  			s.Value = nil
  7861  		} else {
  7862  			s.Value = *tmp.Value
  7863  		}
  7864  	case "x-query-roms":
  7865  		tmp := struct {
  7866  			Value *HumanReadableText `json:"return,omitempty"`
  7867  		}{}
  7868  		if err := json.Unmarshal(data, &tmp); err != nil {
  7869  			return err
  7870  		}
  7871  		if tmp.Value == nil {
  7872  			s.Value = nil
  7873  		} else {
  7874  			s.Value = *tmp.Value
  7875  		}
  7876  	case "x-query-usb":
  7877  		tmp := struct {
  7878  			Value *HumanReadableText `json:"return,omitempty"`
  7879  		}{}
  7880  		if err := json.Unmarshal(data, &tmp); err != nil {
  7881  			return err
  7882  		}
  7883  		if tmp.Value == nil {
  7884  			s.Value = nil
  7885  		} else {
  7886  			s.Value = *tmp.Value
  7887  		}
  7888  
  7889  	}
  7890  
  7891  	return nil
  7892  }
  7893  

View as plain text