001package org.anarres.qemu.qapi.api; 002 003import com.fasterxml.jackson.annotation.JsonInclude; 004import com.fasterxml.jackson.annotation.JsonProperty; 005import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 006import javax.annotation.CheckForNull; 007import javax.annotation.Nonnull; 008import org.anarres.qemu.qapi.common.*; 009 010/** 011 * Autogenerated class. 012 * 013 * <pre>QApiCommandDescriptor{name=drive-mirror, returns=null, data={device=str, target=str, *format=str, *node-name=str, *replaces=str, sync=MirrorSyncMode, *mode=NewImageMode, *speed=int, *granularity=uint32, *buf-size=int, *on-source-error=BlockdevOnError, *on-target-error=BlockdevOnError, *unmap=bool}}</pre> 014 */ 015// QApiCommandDescriptor{name=drive-mirror, returns=null, data={device=str, target=str, *format=str, *node-name=str, *replaces=str, sync=MirrorSyncMode, *mode=NewImageMode, *speed=int, *granularity=uint32, *buf-size=int, *on-source-error=BlockdevOnError, *on-target-error=BlockdevOnError, *unmap=bool}} 016public class DriveMirrorCommand extends QApiCommand<DriveMirrorCommand.Arguments, DriveMirrorCommand.Response> { 017 /** Compound arguments to a DriveMirrorCommand. */ 018 @JsonInclude(JsonInclude.Include.NON_EMPTY) 019 public static class Arguments { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("device") 023 @Nonnull 024 public java.lang.String device; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("target") 027 @Nonnull 028 public java.lang.String target; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("format") 031 @CheckForNull 032 public java.lang.String format; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("node-name") 035 @CheckForNull 036 public java.lang.String nodeName; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("replaces") 039 @CheckForNull 040 public java.lang.String replaces; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("sync") 043 @Nonnull 044 public MirrorSyncMode sync; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("mode") 047 @CheckForNull 048 public NewImageMode mode; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("speed") 051 @CheckForNull 052 public java.lang.Long speed; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("granularity") 055 @CheckForNull 056 public java.lang.Long granularity; 057 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 058 @JsonProperty("buf-size") 059 @CheckForNull 060 public java.lang.Long bufSize; 061 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 062 @JsonProperty("on-source-error") 063 @CheckForNull 064 public BlockdevOnError onSourceError; 065 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 066 @JsonProperty("on-target-error") 067 @CheckForNull 068 public BlockdevOnError onTargetError; 069 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 070 @JsonProperty("unmap") 071 @CheckForNull 072 public java.lang.Boolean unmap; 073 074 public Arguments() { 075 } 076 077 public Arguments(java.lang.String device, java.lang.String target, java.lang.String format, java.lang.String nodeName, java.lang.String replaces, MirrorSyncMode sync, NewImageMode mode, java.lang.Long speed, java.lang.Long granularity, java.lang.Long bufSize, BlockdevOnError onSourceError, BlockdevOnError onTargetError, java.lang.Boolean unmap) { 078 this.device = device; 079 this.target = target; 080 this.format = format; 081 this.nodeName = nodeName; 082 this.replaces = replaces; 083 this.sync = sync; 084 this.mode = mode; 085 this.speed = speed; 086 this.granularity = granularity; 087 this.bufSize = bufSize; 088 this.onSourceError = onSourceError; 089 this.onTargetError = onTargetError; 090 this.unmap = unmap; 091 } 092 } 093 094 /** Response to a DriveMirrorCommand. */ 095 public static class Response extends QApiResponse<java.lang.Void> { 096 } 097 098 /** Constructs a new DriveMirrorCommand. */ 099 public DriveMirrorCommand(@Nonnull DriveMirrorCommand.Arguments argument) { 100 super("drive-mirror", Response.class, argument); 101 } 102 103 /** Constructs a new DriveMirrorCommand. */ 104 public DriveMirrorCommand(java.lang.String device, java.lang.String target, java.lang.String format, java.lang.String nodeName, java.lang.String replaces, MirrorSyncMode sync, NewImageMode mode, java.lang.Long speed, java.lang.Long granularity, java.lang.Long bufSize, BlockdevOnError onSourceError, BlockdevOnError onTargetError, java.lang.Boolean unmap) { 105 this(new Arguments(device, target, format, nodeName, replaces, sync, mode, speed, granularity, bufSize, onSourceError, onTargetError, unmap)); 106 } 107}