diff --git a/qemu-manager/src/test/java/org/anarres/qemu/manager/QEmuManagerTest.java b/qemu-manager/src/test/java/org/anarres/qemu/manager/QEmuManagerTest.java index 8c71f752..31856efd 100644 --- a/qemu-manager/src/test/java/org/anarres/qemu/manager/QEmuManagerTest.java +++ b/qemu-manager/src/test/java/org/anarres/qemu/manager/QEmuManagerTest.java @@ -58,7 +58,8 @@ public void testManager() throws Exception { file.getAbsolutePath(), null, OnOffAuto.auto, - BlockdevAioOptions._native)); + BlockdevAioOptions._native, + null)); options.withReadOnly(true); options.withNodeName("test-file-node"); options.withCache(new BlockdevCacheOptions().withDirect(true)); diff --git a/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/SchemaParser.java b/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/SchemaParser.java index 2e00a06b..3e5746db 100644 --- a/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/SchemaParser.java +++ b/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/SchemaParser.java @@ -133,6 +133,12 @@ else if (jsonTree.get("pragma") != null) element.getName() + "Base"); model.elements.put(parentElement.getName(), parentElement); } + + if (element instanceof QApiEnumDescriptor) { + // Keep track of all the enum types. + QApiEnumDescriptor.ALL_ENUMS.add(element.getName()); + } + // LOG.info("Read specific " + element); } diff --git a/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/AbstractQApiTypeDescriptor.java b/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/AbstractQApiTypeDescriptor.java index 7d6701c1..9169cb77 100644 --- a/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/AbstractQApiTypeDescriptor.java +++ b/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/AbstractQApiTypeDescriptor.java @@ -25,6 +25,10 @@ public static class Field { public String typeName; public String name; public String serializedName; + /** + * Enum field "name"s convert to Java names differently. Save that conversion, too. + */ + public String enumName; public boolean optional; public String getAnnotations() { @@ -35,6 +39,19 @@ public String getTypeName() { return typeName; } + /** + * @return Whether this field is an enum type. + */ + public boolean isEnumType() { + return QApiEnumDescriptor.ALL_ENUMS.contains(getTypeName()); + } + + public String getAllThem() { + StringBuilder b = new StringBuilder(); + QApiEnumDescriptor.ALL_ENUMS.forEach(s -> {b.append(s);b.append(" ");}); + return b.toString(); + } + public String getTypeNameWrapped() { return toWrappedJavaType(getTypeName()); } @@ -43,6 +60,10 @@ public String getName() { return name; } + public String getEnumName() { + return enumName; + } + public String getCapName() { return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, getName()); } @@ -96,6 +117,7 @@ protected boolean preprocess(@Nonnull AbstractQApiTypeDescriptor root) { field.annotations = "@Nonnull"; } field.serializedName = field.name; + field.enumName = toJavaEnumName(field.name); field.name = toJavaName(field.name); if (e.getValue() instanceof Map) { diff --git a/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/QApiEnumDescriptor.java b/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/QApiEnumDescriptor.java index 1eb1077c..999409fb 100644 --- a/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/QApiEnumDescriptor.java +++ b/qemu-qapi/src/generate/java/org/anarres/qemu/qapi/generator/model/QApiEnumDescriptor.java @@ -7,7 +7,9 @@ import com.google.common.base.Objects; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; import javax.annotation.Nonnull; /** @@ -16,6 +18,9 @@ */ public class QApiEnumDescriptor extends QApiElementDescriptor { + /** Save a record of all the enum types after we convert them to Java class names. */ + public static final Set ALL_ENUMS = new HashSet<>(); + public static class Field { public String name; diff --git a/qemu-qapi/src/generate/resources/velocity/union.vm b/qemu-qapi/src/generate/resources/velocity/union.vm index 04ec7781..50603e10 100644 --- a/qemu-qapi/src/generate/resources/velocity/union.vm +++ b/qemu-qapi/src/generate/resources/velocity/union.vm @@ -50,7 +50,11 @@ public class $element.className extends #{if} ($element.superClassName)$element. self.type = Discriminator.${field.underscoreName}; #end #if ($element.fieldDiscriminated) +#if ($element.discriminatorField.isEnumType()) + self.${element.discriminatorField.name} = ${element.discriminatorField.typeName}.${field.enumName}; +#else self.${element.discriminatorField.name} = ${element.discriminatorField.typeName}.${field.underscoreName}; +#end #end self.${field.name} = $field.name; return self; diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockJobInfo.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockJobInfo.java index 7a4be1dc..ca90a36d 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockJobInfo.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockJobInfo.java @@ -12,9 +12,9 @@ /** * Autogenerated class. * - *
QApiStructDescriptor{name=BlockJobInfo, data={type=str, device=str, len=int, offset=int, busy=bool, paused=bool, speed=int, io-status=BlockDeviceIoStatus, ready=bool, status=BlockJobStatus, auto-finalize=bool, auto-dismiss=bool}, innerTypes=null, fields=null, base=null}
+ *
QApiStructDescriptor{name=BlockJobInfo, data={type=str, device=str, len=int, offset=int, busy=bool, paused=bool, speed=int, io-status=BlockDeviceIoStatus, ready=bool, status=BlockJobStatus, auto-finalize=bool, auto-dismiss=bool, *error=str}, innerTypes=null, fields=null, base=null}
*/ -// QApiStructDescriptor{name=BlockJobInfo, data={type=str, device=str, len=int, offset=int, busy=bool, paused=bool, speed=int, io-status=BlockDeviceIoStatus, ready=bool, status=BlockJobStatus, auto-finalize=bool, auto-dismiss=bool}, innerTypes=null, fields=null, base=null} +// QApiStructDescriptor{name=BlockJobInfo, data={type=str, device=str, len=int, offset=int, busy=bool, paused=bool, speed=int, io-status=BlockDeviceIoStatus, ready=bool, status=BlockJobStatus, auto-finalize=bool, auto-dismiss=bool, *error=str}, innerTypes=null, fields=null, base=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class BlockJobInfo extends QApiType { @@ -66,6 +66,10 @@ public class BlockJobInfo extends QApiType { @JsonProperty("auto-dismiss") @Nonnull public boolean autoDismiss; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("error") + @CheckForNull + public java.lang.String error; @Nonnull public BlockJobInfo withType(java.lang.String value) { @@ -139,10 +143,16 @@ public BlockJobInfo withAutoDismiss(boolean value) { return this; } + @Nonnull + public BlockJobInfo withError(java.lang.String value) { + this.error = value; + return this; + } + public BlockJobInfo() { } - public BlockJobInfo(java.lang.String type, java.lang.String device, long len, long offset, boolean busy, boolean paused, long speed, BlockDeviceIoStatus ioStatus, boolean ready, BlockJobStatus status, boolean autoFinalize, boolean autoDismiss) { + public BlockJobInfo(java.lang.String type, java.lang.String device, long len, long offset, boolean busy, boolean paused, long speed, BlockDeviceIoStatus ioStatus, boolean ready, BlockJobStatus status, boolean autoFinalize, boolean autoDismiss, java.lang.String error) { this.type = type; this.device = device; this.len = len; @@ -155,6 +165,7 @@ public BlockJobInfo(java.lang.String type, java.lang.String device, long len, lo this.status = status; this.autoFinalize = autoFinalize; this.autoDismiss = autoDismiss; + this.error = error; } @JsonIgnore @@ -173,6 +184,7 @@ public java.util.List getFieldNames() { names.add("status"); names.add("auto-finalize"); names.add("auto-dismiss"); + names.add("error"); return names; } @@ -202,6 +214,8 @@ public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldE return autoFinalize; if ("auto-dismiss".equals(name)) return autoDismiss; + if ("error".equals(name)) + return error; return super.getFieldByName(name); } } diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevCreateOptions.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevCreateOptions.java index 83115ce6..8a460c26 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevCreateOptions.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevCreateOptions.java @@ -13,7 +13,7 @@ /** * Autogenerated class. * - *
QApiUnionDescriptor{name=BlockdevCreateOptions, discriminator=driver, data={blkdebug=BlockdevCreateNotSupported, blkverify=BlockdevCreateNotSupported, bochs=BlockdevCreateNotSupported, cloop=BlockdevCreateNotSupported, dmg=BlockdevCreateNotSupported, file=BlockdevCreateOptionsFile, ftp=BlockdevCreateNotSupported, ftps=BlockdevCreateNotSupported, gluster=BlockdevCreateOptionsGluster, host_cdrom=BlockdevCreateNotSupported, host_device=BlockdevCreateNotSupported, http=BlockdevCreateNotSupported, https=BlockdevCreateNotSupported, iscsi=BlockdevCreateNotSupported, luks=BlockdevCreateOptionsLUKS, nbd=BlockdevCreateNotSupported, nfs=BlockdevCreateOptionsNfs, null-aio=BlockdevCreateNotSupported, null-co=BlockdevCreateNotSupported, nvme=BlockdevCreateNotSupported, parallels=BlockdevCreateOptionsParallels, qcow=BlockdevCreateOptionsQcow, qcow2=BlockdevCreateOptionsQcow2, qed=BlockdevCreateOptionsQed, quorum=BlockdevCreateNotSupported, raw=BlockdevCreateNotSupported, rbd=BlockdevCreateOptionsRbd, replication=BlockdevCreateNotSupported, sheepdog=BlockdevCreateOptionsSheepdog, ssh=BlockdevCreateOptionsSsh, throttle=BlockdevCreateNotSupported, vdi=BlockdevCreateOptionsVdi, vhdx=BlockdevCreateOptionsVhdx, vmdk=BlockdevCreateNotSupported, vpc=BlockdevCreateOptionsVpc, vvfat=BlockdevCreateNotSupported, vxhs=BlockdevCreateNotSupported}, innerTypes=null, fields=null, base={driver=BlockdevDriver}, discriminatorField=null}
+ *
QApiUnionDescriptor{name=BlockdevCreateOptions, discriminator=driver, data={blkdebug=BlockdevCreateNotSupported, blkverify=BlockdevCreateNotSupported, bochs=BlockdevCreateNotSupported, cloop=BlockdevCreateNotSupported, copy-on-read=BlockdevCreateNotSupported, dmg=BlockdevCreateNotSupported, file=BlockdevCreateOptionsFile, ftp=BlockdevCreateNotSupported, ftps=BlockdevCreateNotSupported, gluster=BlockdevCreateOptionsGluster, host_cdrom=BlockdevCreateNotSupported, host_device=BlockdevCreateNotSupported, http=BlockdevCreateNotSupported, https=BlockdevCreateNotSupported, iscsi=BlockdevCreateNotSupported, luks=BlockdevCreateOptionsLUKS, nbd=BlockdevCreateNotSupported, nfs=BlockdevCreateOptionsNfs, null-aio=BlockdevCreateNotSupported, null-co=BlockdevCreateNotSupported, nvme=BlockdevCreateNotSupported, parallels=BlockdevCreateOptionsParallels, qcow=BlockdevCreateOptionsQcow, qcow2=BlockdevCreateOptionsQcow2, qed=BlockdevCreateOptionsQed, quorum=BlockdevCreateNotSupported, raw=BlockdevCreateNotSupported, rbd=BlockdevCreateOptionsRbd, replication=BlockdevCreateNotSupported, sheepdog=BlockdevCreateOptionsSheepdog, ssh=BlockdevCreateOptionsSsh, throttle=BlockdevCreateNotSupported, vdi=BlockdevCreateOptionsVdi, vhdx=BlockdevCreateOptionsVhdx, vmdk=BlockdevCreateNotSupported, vpc=BlockdevCreateOptionsVpc, vvfat=BlockdevCreateNotSupported, vxhs=BlockdevCreateNotSupported}, innerTypes=null, fields=null, base={driver=BlockdevDriver}, discriminatorField=null}
*/ @JsonInclude(JsonInclude.Include.NON_EMPTY) public class BlockdevCreateOptions extends BlockdevCreateOptionsBase implements QApiUnion { @@ -40,6 +40,11 @@ public class BlockdevCreateOptions extends BlockdevCreateOptionsBase implements @CheckForNull public BlockdevCreateNotSupported cloop; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("copy-on-read") + @JsonUnwrapped + @CheckForNull + public BlockdevCreateNotSupported copyOnRead; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("dmg") @JsonUnwrapped @CheckForNull @@ -238,6 +243,14 @@ public static BlockdevCreateOptions cloop(@Nonnull BlockdevCreateNotSupported cl return self; } + @Nonnull + public static BlockdevCreateOptions copyOnRead(@Nonnull BlockdevCreateNotSupported copyOnRead) { + BlockdevCreateOptions self = new BlockdevCreateOptions(); + self.driver = BlockdevDriver.copy_on_read; + self.copyOnRead = copyOnRead; + return self; + } + @Nonnull public static BlockdevCreateOptions dmg(@Nonnull BlockdevCreateNotSupported dmg) { BlockdevCreateOptions self = new BlockdevCreateOptions(); @@ -509,6 +522,7 @@ public java.util.List getFieldNames() { names.add("blkverify"); names.add("bochs"); names.add("cloop"); + names.add("copy-on-read"); names.add("dmg"); names.add("file"); names.add("ftp"); @@ -556,6 +570,8 @@ public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldE return bochs; if ("cloop".equals(name)) return cloop; + if ("copy-on-read".equals(name)) + return copyOnRead; if ("dmg".equals(name)) return dmg; if ("file".equals(name)) @@ -636,6 +652,8 @@ public boolean isValidUnion() { count++; if (cloop != null) count++; + if (copyOnRead != null) + count++; if (dmg != null) count++; if (file != null) diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevDriver.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevDriver.java index 5db032e1..3d2253fb 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevDriver.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevDriver.java @@ -8,14 +8,15 @@ /** * Autogenerated class. * - *
QApiEnumDescriptor{name=BlockdevDriver, data=[blkdebug, blkverify, bochs, cloop, dmg, file, ftp, ftps, gluster, host_cdrom, host_device, http, https, iscsi, luks, nbd, nfs, null-aio, null-co, nvme, parallels, qcow, qcow2, qed, quorum, raw, rbd, replication, sheepdog, ssh, throttle, vdi, vhdx, vmdk, vpc, vvfat, vxhs], fields=null}
+ *
QApiEnumDescriptor{name=BlockdevDriver, data=[blkdebug, blkverify, bochs, cloop, copy-on-read, dmg, file, ftp, ftps, gluster, host_cdrom, host_device, http, https, iscsi, luks, nbd, nfs, null-aio, null-co, nvme, parallels, qcow, qcow2, qed, quorum, raw, rbd, replication, sheepdog, ssh, throttle, vdi, vhdx, vmdk, vpc, vvfat, vxhs], fields=null}
*/ -// QApiEnumDescriptor{name=BlockdevDriver, data=[blkdebug, blkverify, bochs, cloop, dmg, file, ftp, ftps, gluster, host_cdrom, host_device, http, https, iscsi, luks, nbd, nfs, null-aio, null-co, nvme, parallels, qcow, qcow2, qed, quorum, raw, rbd, replication, sheepdog, ssh, throttle, vdi, vhdx, vmdk, vpc, vvfat, vxhs], fields=null} +// QApiEnumDescriptor{name=BlockdevDriver, data=[blkdebug, blkverify, bochs, cloop, copy-on-read, dmg, file, ftp, ftps, gluster, host_cdrom, host_device, http, https, iscsi, luks, nbd, nfs, null-aio, null-co, nvme, parallels, qcow, qcow2, qed, quorum, raw, rbd, replication, sheepdog, ssh, throttle, vdi, vhdx, vmdk, vpc, vvfat, vxhs], fields=null} public enum BlockdevDriver { blkdebug("blkdebug"), blkverify("blkverify"), bochs("bochs"), cloop("cloop"), + copy_on_read("copy-on-read"), dmg("dmg"), file("file"), ftp("ftp"), diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptions.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptions.java index 3dd29fdd..dcf90273 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptions.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptions.java @@ -13,7 +13,7 @@ /** * Autogenerated class. * - *
QApiUnionDescriptor{name=BlockdevOptions, discriminator=driver, data={blkdebug=BlockdevOptionsBlkdebug, blkverify=BlockdevOptionsBlkverify, bochs=BlockdevOptionsGenericFormat, cloop=BlockdevOptionsGenericFormat, dmg=BlockdevOptionsGenericFormat, file=BlockdevOptionsFile, ftp=BlockdevOptionsCurlFtp, ftps=BlockdevOptionsCurlFtps, gluster=BlockdevOptionsGluster, host_cdrom=BlockdevOptionsFile, host_device=BlockdevOptionsFile, http=BlockdevOptionsCurlHttp, https=BlockdevOptionsCurlHttps, iscsi=BlockdevOptionsIscsi, luks=BlockdevOptionsLUKS, nbd=BlockdevOptionsNbd, nfs=BlockdevOptionsNfs, null-aio=BlockdevOptionsNull, null-co=BlockdevOptionsNull, nvme=BlockdevOptionsNVMe, parallels=BlockdevOptionsGenericFormat, qcow2=BlockdevOptionsQcow2, qcow=BlockdevOptionsQcow, qed=BlockdevOptionsGenericCOWFormat, quorum=BlockdevOptionsQuorum, raw=BlockdevOptionsRaw, rbd=BlockdevOptionsRbd, replication=BlockdevOptionsReplication, sheepdog=BlockdevOptionsSheepdog, ssh=BlockdevOptionsSsh, throttle=BlockdevOptionsThrottle, vdi=BlockdevOptionsGenericFormat, vhdx=BlockdevOptionsGenericFormat, vmdk=BlockdevOptionsGenericCOWFormat, vpc=BlockdevOptionsGenericFormat, vvfat=BlockdevOptionsVVFAT, vxhs=BlockdevOptionsVxHS}, innerTypes=null, fields=null, base={driver=BlockdevDriver, *node-name=str, *discard=BlockdevDiscardOptions, *cache=BlockdevCacheOptions, *read-only=bool, *force-share=bool, *detect-zeroes=BlockdevDetectZeroesOptions}, discriminatorField=null}
+ *
QApiUnionDescriptor{name=BlockdevOptions, discriminator=driver, data={blkdebug=BlockdevOptionsBlkdebug, blkverify=BlockdevOptionsBlkverify, bochs=BlockdevOptionsGenericFormat, cloop=BlockdevOptionsGenericFormat, copy-on-read=BlockdevOptionsGenericFormat, dmg=BlockdevOptionsGenericFormat, file=BlockdevOptionsFile, ftp=BlockdevOptionsCurlFtp, ftps=BlockdevOptionsCurlFtps, gluster=BlockdevOptionsGluster, host_cdrom=BlockdevOptionsFile, host_device=BlockdevOptionsFile, http=BlockdevOptionsCurlHttp, https=BlockdevOptionsCurlHttps, iscsi=BlockdevOptionsIscsi, luks=BlockdevOptionsLUKS, nbd=BlockdevOptionsNbd, nfs=BlockdevOptionsNfs, null-aio=BlockdevOptionsNull, null-co=BlockdevOptionsNull, nvme=BlockdevOptionsNVMe, parallels=BlockdevOptionsGenericFormat, qcow2=BlockdevOptionsQcow2, qcow=BlockdevOptionsQcow, qed=BlockdevOptionsGenericCOWFormat, quorum=BlockdevOptionsQuorum, raw=BlockdevOptionsRaw, rbd=BlockdevOptionsRbd, replication=BlockdevOptionsReplication, sheepdog=BlockdevOptionsSheepdog, ssh=BlockdevOptionsSsh, throttle=BlockdevOptionsThrottle, vdi=BlockdevOptionsGenericFormat, vhdx=BlockdevOptionsGenericFormat, vmdk=BlockdevOptionsGenericCOWFormat, vpc=BlockdevOptionsGenericFormat, vvfat=BlockdevOptionsVVFAT, vxhs=BlockdevOptionsVxHS}, innerTypes=null, fields=null, base={driver=BlockdevDriver, *node-name=str, *discard=BlockdevDiscardOptions, *cache=BlockdevCacheOptions, *read-only=bool, *force-share=bool, *detect-zeroes=BlockdevDetectZeroesOptions}, discriminatorField=null}
*/ @JsonInclude(JsonInclude.Include.NON_EMPTY) public class BlockdevOptions extends BlockdevOptionsBase implements QApiUnion { @@ -40,6 +40,11 @@ public class BlockdevOptions extends BlockdevOptionsBase implements QApiUnion { @CheckForNull public BlockdevOptionsGenericFormat cloop; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("copy-on-read") + @JsonUnwrapped + @CheckForNull + public BlockdevOptionsGenericFormat copyOnRead; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("dmg") @JsonUnwrapped @CheckForNull @@ -238,6 +243,14 @@ public static BlockdevOptions cloop(@Nonnull BlockdevOptionsGenericFormat cloop) return self; } + @Nonnull + public static BlockdevOptions copyOnRead(@Nonnull BlockdevOptionsGenericFormat copyOnRead) { + BlockdevOptions self = new BlockdevOptions(); + self.driver = BlockdevDriver.copy_on_read; + self.copyOnRead = copyOnRead; + return self; + } + @Nonnull public static BlockdevOptions dmg(@Nonnull BlockdevOptionsGenericFormat dmg) { BlockdevOptions self = new BlockdevOptions(); @@ -509,6 +522,7 @@ public java.util.List getFieldNames() { names.add("blkverify"); names.add("bochs"); names.add("cloop"); + names.add("copy-on-read"); names.add("dmg"); names.add("file"); names.add("ftp"); @@ -556,6 +570,8 @@ public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldE return bochs; if ("cloop".equals(name)) return cloop; + if ("copy-on-read".equals(name)) + return copyOnRead; if ("dmg".equals(name)) return dmg; if ("file".equals(name)) @@ -636,6 +652,8 @@ public boolean isValidUnion() { count++; if (cloop != null) count++; + if (copyOnRead != null) + count++; if (dmg != null) count++; if (file != null) diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptionsFile.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptionsFile.java index b23b1cf8..1edaed56 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptionsFile.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/BlockdevOptionsFile.java @@ -12,9 +12,9 @@ /** * Autogenerated class. * - *
QApiStructDescriptor{name=BlockdevOptionsFile, data={filename=str, *pr-manager=str, *locking=OnOffAuto, *aio=BlockdevAioOptions}, innerTypes=null, fields=null, base=null}
+ *
QApiStructDescriptor{name=BlockdevOptionsFile, data={filename=str, *pr-manager=str, *locking=OnOffAuto, *aio=BlockdevAioOptions, *x-check-cache-dropped=bool}, innerTypes=null, fields=null, base=null}
*/ -// QApiStructDescriptor{name=BlockdevOptionsFile, data={filename=str, *pr-manager=str, *locking=OnOffAuto, *aio=BlockdevAioOptions}, innerTypes=null, fields=null, base=null} +// QApiStructDescriptor{name=BlockdevOptionsFile, data={filename=str, *pr-manager=str, *locking=OnOffAuto, *aio=BlockdevAioOptions, *x-check-cache-dropped=bool}, innerTypes=null, fields=null, base=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class BlockdevOptionsFile extends QApiType { @@ -34,6 +34,10 @@ public class BlockdevOptionsFile extends QApiType { @JsonProperty("aio") @CheckForNull public BlockdevAioOptions aio; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("x-check-cache-dropped") + @CheckForNull + public java.lang.Boolean xCheckCacheDropped; @Nonnull public BlockdevOptionsFile withFilename(java.lang.String value) { @@ -59,14 +63,21 @@ public BlockdevOptionsFile withAio(BlockdevAioOptions value) { return this; } + @Nonnull + public BlockdevOptionsFile withXCheckCacheDropped(java.lang.Boolean value) { + this.xCheckCacheDropped = value; + return this; + } + public BlockdevOptionsFile() { } - public BlockdevOptionsFile(java.lang.String filename, java.lang.String prManager, OnOffAuto locking, BlockdevAioOptions aio) { + public BlockdevOptionsFile(java.lang.String filename, java.lang.String prManager, OnOffAuto locking, BlockdevAioOptions aio, java.lang.Boolean xCheckCacheDropped) { this.filename = filename; this.prManager = prManager; this.locking = locking; this.aio = aio; + this.xCheckCacheDropped = xCheckCacheDropped; } @JsonIgnore @@ -77,6 +88,7 @@ public java.util.List getFieldNames() { names.add("pr-manager"); names.add("locking"); names.add("aio"); + names.add("x-check-cache-dropped"); return names; } @@ -90,6 +102,8 @@ public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldE return locking; if ("aio".equals(name)) return aio; + if ("x-check-cache-dropped".equals(name)) + return xCheckCacheDropped; return super.getFieldByName(name); } } diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFast.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFast.java index bc6b419f..4b677f71 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFast.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFast.java @@ -13,172 +13,604 @@ /** * Autogenerated class. * - *
QApiUnionDescriptor{name=CpuInfoFast, discriminator=arch, data={x86=CpuInfoOther, sparc=CpuInfoOther, ppc=CpuInfoOther, mips=CpuInfoOther, tricore=CpuInfoOther, s390=CpuInfoS390, riscv=CpuInfoRISCV, other=CpuInfoOther}, innerTypes=null, fields=null, base={cpu-index=int, qom-path=str, thread-id=int, *props=CpuInstanceProperties, arch=CpuInfoArch}, discriminatorField=null}
+ *
QApiUnionDescriptor{name=CpuInfoFast, discriminator=target, data={aarch64=CpuInfoOther, alpha=CpuInfoOther, arm=CpuInfoOther, cris=CpuInfoOther, hppa=CpuInfoOther, i386=CpuInfoOther, lm32=CpuInfoOther, m68k=CpuInfoOther, microblaze=CpuInfoOther, microblazeel=CpuInfoOther, mips=CpuInfoOther, mips64=CpuInfoOther, mips64el=CpuInfoOther, mipsel=CpuInfoOther, moxie=CpuInfoOther, nios2=CpuInfoOther, or1k=CpuInfoOther, ppc=CpuInfoOther, ppc64=CpuInfoOther, ppcemb=CpuInfoOther, riscv32=CpuInfoOther, riscv64=CpuInfoOther, s390x=CpuInfoS390, sh4=CpuInfoOther, sh4eb=CpuInfoOther, sparc=CpuInfoOther, sparc64=CpuInfoOther, tricore=CpuInfoOther, unicore32=CpuInfoOther, x86_64=CpuInfoOther, xtensa=CpuInfoOther, xtensaeb=CpuInfoOther}, innerTypes=null, fields=null, base={cpu-index=int, qom-path=str, thread-id=int, *props=CpuInstanceProperties, arch=CpuInfoArch, target=SysEmuTarget}, discriminatorField=null}
*/ @JsonInclude(JsonInclude.Include.NON_EMPTY) public class CpuInfoFast extends CpuInfoFastBase implements QApiUnion { // union { @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("x86") + @JsonProperty("aarch64") @JsonUnwrapped @CheckForNull - public CpuInfoOther x86; + public CpuInfoOther aarch64; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("sparc") + @JsonProperty("alpha") @JsonUnwrapped @CheckForNull - public CpuInfoOther sparc; + public CpuInfoOther alpha; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("ppc") + @JsonProperty("arm") @JsonUnwrapped @CheckForNull - public CpuInfoOther ppc; + public CpuInfoOther arm; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("cris") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther cris; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("hppa") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther hppa; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("i386") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther i386; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("lm32") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther lm32; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("m68k") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther m68k; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("microblaze") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther microblaze; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("microblazeel") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther microblazeel; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("mips") @JsonUnwrapped @CheckForNull public CpuInfoOther mips; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("mips64") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther mips64; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("mips64el") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther mips64el; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("mipsel") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther mipsel; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("moxie") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther moxie; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("nios2") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther nios2; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("or1k") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther or1k; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("ppc") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther ppc; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("ppc64") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther ppc64; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("ppcemb") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther ppcemb; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("riscv32") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther riscv32; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("riscv64") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther riscv64; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("s390x") + @JsonUnwrapped + @CheckForNull + public CpuInfoS390 s390x; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("sh4") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther sh4; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("sh4eb") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther sh4eb; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("sparc") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther sparc; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("sparc64") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther sparc64; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("tricore") @JsonUnwrapped @CheckForNull public CpuInfoOther tricore; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("s390") + @JsonProperty("unicore32") @JsonUnwrapped @CheckForNull - public CpuInfoS390 s390; + public CpuInfoOther unicore32; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("riscv") + @JsonProperty("x86_64") @JsonUnwrapped @CheckForNull - public CpuInfoRISCV riscv; + public CpuInfoOther x8664; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("other") + @JsonProperty("xtensa") @JsonUnwrapped @CheckForNull - public CpuInfoOther other; + public CpuInfoOther xtensa; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("xtensaeb") + @JsonUnwrapped + @CheckForNull + public CpuInfoOther xtensaeb; // } @Nonnull - public static CpuInfoFast x86(@Nonnull CpuInfoOther x86) { + public static CpuInfoFast aarch64(@Nonnull CpuInfoOther aarch64) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.x86; - self.x86 = x86; + self.target = SysEmuTarget.aarch64; + self.aarch64 = aarch64; return self; } @Nonnull - public static CpuInfoFast sparc(@Nonnull CpuInfoOther sparc) { + public static CpuInfoFast alpha(@Nonnull CpuInfoOther alpha) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.sparc; - self.sparc = sparc; + self.target = SysEmuTarget.alpha; + self.alpha = alpha; return self; } @Nonnull - public static CpuInfoFast ppc(@Nonnull CpuInfoOther ppc) { + public static CpuInfoFast arm(@Nonnull CpuInfoOther arm) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.ppc; - self.ppc = ppc; + self.target = SysEmuTarget.arm; + self.arm = arm; + return self; + } + + @Nonnull + public static CpuInfoFast cris(@Nonnull CpuInfoOther cris) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.cris; + self.cris = cris; + return self; + } + + @Nonnull + public static CpuInfoFast hppa(@Nonnull CpuInfoOther hppa) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.hppa; + self.hppa = hppa; + return self; + } + + @Nonnull + public static CpuInfoFast i386(@Nonnull CpuInfoOther i386) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.i386; + self.i386 = i386; + return self; + } + + @Nonnull + public static CpuInfoFast lm32(@Nonnull CpuInfoOther lm32) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.lm32; + self.lm32 = lm32; + return self; + } + + @Nonnull + public static CpuInfoFast m68k(@Nonnull CpuInfoOther m68k) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.m68k; + self.m68k = m68k; + return self; + } + + @Nonnull + public static CpuInfoFast microblaze(@Nonnull CpuInfoOther microblaze) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.microblaze; + self.microblaze = microblaze; + return self; + } + + @Nonnull + public static CpuInfoFast microblazeel(@Nonnull CpuInfoOther microblazeel) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.microblazeel; + self.microblazeel = microblazeel; return self; } @Nonnull public static CpuInfoFast mips(@Nonnull CpuInfoOther mips) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.mips; + self.target = SysEmuTarget.mips; self.mips = mips; return self; } + @Nonnull + public static CpuInfoFast mips64(@Nonnull CpuInfoOther mips64) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.mips64; + self.mips64 = mips64; + return self; + } + + @Nonnull + public static CpuInfoFast mips64el(@Nonnull CpuInfoOther mips64el) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.mips64el; + self.mips64el = mips64el; + return self; + } + + @Nonnull + public static CpuInfoFast mipsel(@Nonnull CpuInfoOther mipsel) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.mipsel; + self.mipsel = mipsel; + return self; + } + + @Nonnull + public static CpuInfoFast moxie(@Nonnull CpuInfoOther moxie) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.moxie; + self.moxie = moxie; + return self; + } + + @Nonnull + public static CpuInfoFast nios2(@Nonnull CpuInfoOther nios2) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.nios2; + self.nios2 = nios2; + return self; + } + + @Nonnull + public static CpuInfoFast or1k(@Nonnull CpuInfoOther or1k) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.or1k; + self.or1k = or1k; + return self; + } + + @Nonnull + public static CpuInfoFast ppc(@Nonnull CpuInfoOther ppc) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.ppc; + self.ppc = ppc; + return self; + } + + @Nonnull + public static CpuInfoFast ppc64(@Nonnull CpuInfoOther ppc64) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.ppc64; + self.ppc64 = ppc64; + return self; + } + + @Nonnull + public static CpuInfoFast ppcemb(@Nonnull CpuInfoOther ppcemb) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.ppcemb; + self.ppcemb = ppcemb; + return self; + } + + @Nonnull + public static CpuInfoFast riscv32(@Nonnull CpuInfoOther riscv32) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.riscv32; + self.riscv32 = riscv32; + return self; + } + + @Nonnull + public static CpuInfoFast riscv64(@Nonnull CpuInfoOther riscv64) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.riscv64; + self.riscv64 = riscv64; + return self; + } + + @Nonnull + public static CpuInfoFast s390x(@Nonnull CpuInfoS390 s390x) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.s390x; + self.s390x = s390x; + return self; + } + + @Nonnull + public static CpuInfoFast sh4(@Nonnull CpuInfoOther sh4) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.sh4; + self.sh4 = sh4; + return self; + } + + @Nonnull + public static CpuInfoFast sh4eb(@Nonnull CpuInfoOther sh4eb) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.sh4eb; + self.sh4eb = sh4eb; + return self; + } + + @Nonnull + public static CpuInfoFast sparc(@Nonnull CpuInfoOther sparc) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.sparc; + self.sparc = sparc; + return self; + } + + @Nonnull + public static CpuInfoFast sparc64(@Nonnull CpuInfoOther sparc64) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.sparc64; + self.sparc64 = sparc64; + return self; + } + @Nonnull public static CpuInfoFast tricore(@Nonnull CpuInfoOther tricore) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.tricore; + self.target = SysEmuTarget.tricore; self.tricore = tricore; return self; } @Nonnull - public static CpuInfoFast s390(@Nonnull CpuInfoS390 s390) { + public static CpuInfoFast unicore32(@Nonnull CpuInfoOther unicore32) { + CpuInfoFast self = new CpuInfoFast(); + self.target = SysEmuTarget.unicore32; + self.unicore32 = unicore32; + return self; + } + + @Nonnull + public static CpuInfoFast x8664(@Nonnull CpuInfoOther x8664) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.s390; - self.s390 = s390; + self.target = SysEmuTarget.x86_64; + self.x8664 = x8664; return self; } @Nonnull - public static CpuInfoFast riscv(@Nonnull CpuInfoRISCV riscv) { + public static CpuInfoFast xtensa(@Nonnull CpuInfoOther xtensa) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.riscv; - self.riscv = riscv; + self.target = SysEmuTarget.xtensa; + self.xtensa = xtensa; return self; } @Nonnull - public static CpuInfoFast other(@Nonnull CpuInfoOther other) { + public static CpuInfoFast xtensaeb(@Nonnull CpuInfoOther xtensaeb) { CpuInfoFast self = new CpuInfoFast(); - self.arch = CpuInfoArch.other; - self.other = other; + self.target = SysEmuTarget.xtensaeb; + self.xtensaeb = xtensaeb; return self; } @Override public java.util.List getFieldNames() { java.util.List names = super.getFieldNames(); - names.add("x86"); - names.add("sparc"); - names.add("ppc"); + names.add("aarch64"); + names.add("alpha"); + names.add("arm"); + names.add("cris"); + names.add("hppa"); + names.add("i386"); + names.add("lm32"); + names.add("m68k"); + names.add("microblaze"); + names.add("microblazeel"); names.add("mips"); + names.add("mips64"); + names.add("mips64el"); + names.add("mipsel"); + names.add("moxie"); + names.add("nios2"); + names.add("or1k"); + names.add("ppc"); + names.add("ppc64"); + names.add("ppcemb"); + names.add("riscv32"); + names.add("riscv64"); + names.add("s390x"); + names.add("sh4"); + names.add("sh4eb"); + names.add("sparc"); + names.add("sparc64"); names.add("tricore"); - names.add("s390"); - names.add("riscv"); - names.add("other"); + names.add("unicore32"); + names.add("x86_64"); + names.add("xtensa"); + names.add("xtensaeb"); return names; } @JsonIgnore @Override public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { - if ("x86".equals(name)) - return x86; - if ("sparc".equals(name)) - return sparc; - if ("ppc".equals(name)) - return ppc; + if ("aarch64".equals(name)) + return aarch64; + if ("alpha".equals(name)) + return alpha; + if ("arm".equals(name)) + return arm; + if ("cris".equals(name)) + return cris; + if ("hppa".equals(name)) + return hppa; + if ("i386".equals(name)) + return i386; + if ("lm32".equals(name)) + return lm32; + if ("m68k".equals(name)) + return m68k; + if ("microblaze".equals(name)) + return microblaze; + if ("microblazeel".equals(name)) + return microblazeel; if ("mips".equals(name)) return mips; + if ("mips64".equals(name)) + return mips64; + if ("mips64el".equals(name)) + return mips64el; + if ("mipsel".equals(name)) + return mipsel; + if ("moxie".equals(name)) + return moxie; + if ("nios2".equals(name)) + return nios2; + if ("or1k".equals(name)) + return or1k; + if ("ppc".equals(name)) + return ppc; + if ("ppc64".equals(name)) + return ppc64; + if ("ppcemb".equals(name)) + return ppcemb; + if ("riscv32".equals(name)) + return riscv32; + if ("riscv64".equals(name)) + return riscv64; + if ("s390x".equals(name)) + return s390x; + if ("sh4".equals(name)) + return sh4; + if ("sh4eb".equals(name)) + return sh4eb; + if ("sparc".equals(name)) + return sparc; + if ("sparc64".equals(name)) + return sparc64; if ("tricore".equals(name)) return tricore; - if ("s390".equals(name)) - return s390; - if ("riscv".equals(name)) - return riscv; - if ("other".equals(name)) - return other; + if ("unicore32".equals(name)) + return unicore32; + if ("x86_64".equals(name)) + return x8664; + if ("xtensa".equals(name)) + return xtensa; + if ("xtensaeb".equals(name)) + return xtensaeb; return super.getFieldByName(name); } @JsonIgnore public boolean isValidUnion() { int count = 0; - if (x86 != null) + if (aarch64 != null) count++; - if (sparc != null) + if (alpha != null) count++; - if (ppc != null) + if (arm != null) + count++; + if (cris != null) + count++; + if (hppa != null) + count++; + if (i386 != null) + count++; + if (lm32 != null) + count++; + if (m68k != null) + count++; + if (microblaze != null) + count++; + if (microblazeel != null) count++; if (mips != null) count++; + if (mips64 != null) + count++; + if (mips64el != null) + count++; + if (mipsel != null) + count++; + if (moxie != null) + count++; + if (nios2 != null) + count++; + if (or1k != null) + count++; + if (ppc != null) + count++; + if (ppc64 != null) + count++; + if (ppcemb != null) + count++; + if (riscv32 != null) + count++; + if (riscv64 != null) + count++; + if (s390x != null) + count++; + if (sh4 != null) + count++; + if (sh4eb != null) + count++; + if (sparc != null) + count++; + if (sparc64 != null) + count++; if (tricore != null) count++; - if (s390 != null) + if (unicore32 != null) + count++; + if (x8664 != null) count++; - if (riscv != null) + if (xtensa != null) count++; - if (other != null) + if (xtensaeb != null) count++; return (count == 1); } diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFastBase.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFastBase.java index 4798f69a..aec9f90e 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFastBase.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/CpuInfoFastBase.java @@ -12,9 +12,9 @@ /** * Autogenerated class. * - *
QApiTypeDescriptor{name=CpuInfoFastBase, data={cpu-index=int, qom-path=str, thread-id=int, *props=CpuInstanceProperties, arch=CpuInfoArch}, innerTypes=null}
+ *
QApiTypeDescriptor{name=CpuInfoFastBase, data={cpu-index=int, qom-path=str, thread-id=int, *props=CpuInstanceProperties, arch=CpuInfoArch, target=SysEmuTarget}, innerTypes=null}
*/ -// QApiTypeDescriptor{name=CpuInfoFastBase, data={cpu-index=int, qom-path=str, thread-id=int, *props=CpuInstanceProperties, arch=CpuInfoArch}, innerTypes=null} +// QApiTypeDescriptor{name=CpuInfoFastBase, data={cpu-index=int, qom-path=str, thread-id=int, *props=CpuInstanceProperties, arch=CpuInfoArch, target=SysEmuTarget}, innerTypes=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class CpuInfoFastBase extends QApiType { @@ -38,6 +38,10 @@ public class CpuInfoFastBase extends QApiType { @JsonProperty("arch") @Nonnull public CpuInfoArch arch; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("target") + @Nonnull + public SysEmuTarget target; @Nonnull public CpuInfoFastBase withCpuIndex(long value) { @@ -69,15 +73,22 @@ public CpuInfoFastBase withArch(CpuInfoArch value) { return this; } + @Nonnull + public CpuInfoFastBase withTarget(SysEmuTarget value) { + this.target = value; + return this; + } + public CpuInfoFastBase() { } - public CpuInfoFastBase(long cpuIndex, java.lang.String qomPath, long threadId, CpuInstanceProperties props, CpuInfoArch arch) { + public CpuInfoFastBase(long cpuIndex, java.lang.String qomPath, long threadId, CpuInstanceProperties props, CpuInfoArch arch, SysEmuTarget target) { this.cpuIndex = cpuIndex; this.qomPath = qomPath; this.threadId = threadId; this.props = props; this.arch = arch; + this.target = target; } @JsonIgnore @@ -89,6 +100,7 @@ public java.util.List getFieldNames() { names.add("thread-id"); names.add("props"); names.add("arch"); + names.add("target"); return names; } @@ -104,6 +116,8 @@ public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldE return props; if ("arch".equals(name)) return arch; + if ("target".equals(name)) + return target; return super.getFieldByName(name); } } diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayGLMode.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayGLMode.java new file mode 100644 index 00000000..ece8db0c --- /dev/null +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayGLMode.java @@ -0,0 +1,31 @@ +package org.anarres.qemu.qapi.api; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; + +/** + * Autogenerated class. + * + *
QApiEnumDescriptor{name=DisplayGLMode, data=[off, on, core, es], fields=null}
+ */ +// QApiEnumDescriptor{name=DisplayGLMode, data=[off, on, core, es], fields=null} +public enum DisplayGLMode { + off("off"), + on("on"), + core("core"), + es("es"), + __UNKNOWN(""); + + private final java.lang.String jsonValue; + + /* pp */ DisplayGLMode(@Nonnull java.lang.String jsonValue) { + this.jsonValue = jsonValue; + } + + @JsonValue + public java.lang.String getJsonValue() { + return jsonValue; + } +} diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptions.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptions.java index 9597beb5..8ae3d772 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptions.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptions.java @@ -13,7 +13,7 @@ /** * Autogenerated class. * - *
QApiUnionDescriptor{name=DisplayOptions, discriminator=type, data={default=DisplayNoOpts, none=DisplayNoOpts, gtk=DisplayGTK, sdl=DisplayNoOpts, egl-headless=DisplayNoOpts, curses=DisplayNoOpts, cocoa=DisplayNoOpts}, innerTypes=null, fields=null, base={type=DisplayType, *full-screen=bool, *window-close=bool, *gl=bool}, discriminatorField=null}
+ *
QApiUnionDescriptor{name=DisplayOptions, discriminator=type, data={default=DisplayNoOpts, none=DisplayNoOpts, gtk=DisplayGTK, sdl=DisplayNoOpts, egl-headless=DisplayNoOpts, curses=DisplayNoOpts, cocoa=DisplayNoOpts}, innerTypes=null, fields=null, base={type=DisplayType, *full-screen=bool, *window-close=bool, *gl=DisplayGLMode}, discriminatorField=null}
*/ @JsonInclude(JsonInclude.Include.NON_EMPTY) public class DisplayOptions extends DisplayOptionsBase implements QApiUnion { diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptionsBase.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptionsBase.java index d95cc887..a5713ceb 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptionsBase.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/DisplayOptionsBase.java @@ -12,9 +12,9 @@ /** * Autogenerated class. * - *
QApiTypeDescriptor{name=DisplayOptionsBase, data={type=DisplayType, *full-screen=bool, *window-close=bool, *gl=bool}, innerTypes=null}
+ *
QApiTypeDescriptor{name=DisplayOptionsBase, data={type=DisplayType, *full-screen=bool, *window-close=bool, *gl=DisplayGLMode}, innerTypes=null}
*/ -// QApiTypeDescriptor{name=DisplayOptionsBase, data={type=DisplayType, *full-screen=bool, *window-close=bool, *gl=bool}, innerTypes=null} +// QApiTypeDescriptor{name=DisplayOptionsBase, data={type=DisplayType, *full-screen=bool, *window-close=bool, *gl=DisplayGLMode}, innerTypes=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class DisplayOptionsBase extends QApiType { @@ -33,7 +33,7 @@ public class DisplayOptionsBase extends QApiType { @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("gl") @CheckForNull - public java.lang.Boolean gl; + public DisplayGLMode gl; @Nonnull public DisplayOptionsBase withType(DisplayType value) { @@ -54,7 +54,7 @@ public DisplayOptionsBase withWindowClose(java.lang.Boolean value) { } @Nonnull - public DisplayOptionsBase withGl(java.lang.Boolean value) { + public DisplayOptionsBase withGl(DisplayGLMode value) { this.gl = value; return this; } @@ -62,7 +62,7 @@ public DisplayOptionsBase withGl(java.lang.Boolean value) { public DisplayOptionsBase() { } - public DisplayOptionsBase(DisplayType type, java.lang.Boolean fullScreen, java.lang.Boolean windowClose, java.lang.Boolean gl) { + public DisplayOptionsBase(DisplayType type, java.lang.Boolean fullScreen, java.lang.Boolean windowClose, DisplayGLMode gl) { this.type = type; this.fullScreen = fullScreen; this.windowClose = windowClose; diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateCommand.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateCommand.java index db6bbb1a..726e76d3 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateCommand.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateCommand.java @@ -10,9 +10,9 @@ /** * Autogenerated class. * - *
QApiCommandDescriptor{name=migrate, returns=null, data={uri=str, *blk=bool, *inc=bool, *detach=bool}}
+ *
QApiCommandDescriptor{name=migrate, returns=null, data={uri=str, *blk=bool, *inc=bool, *detach=bool, *resume=bool}}
*/ -// QApiCommandDescriptor{name=migrate, returns=null, data={uri=str, *blk=bool, *inc=bool, *detach=bool}} +// QApiCommandDescriptor{name=migrate, returns=null, data={uri=str, *blk=bool, *inc=bool, *detach=bool, *resume=bool}} public class MigrateCommand extends QApiCommand { /** Compound arguments to a MigrateCommand. */ @JsonInclude(JsonInclude.Include.NON_EMPTY) @@ -34,15 +34,20 @@ public static class Arguments { @JsonProperty("detach") @CheckForNull public java.lang.Boolean detach; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("resume") + @CheckForNull + public java.lang.Boolean resume; public Arguments() { } - public Arguments(java.lang.String uri, java.lang.Boolean blk, java.lang.Boolean inc, java.lang.Boolean detach) { + public Arguments(java.lang.String uri, java.lang.Boolean blk, java.lang.Boolean inc, java.lang.Boolean detach, java.lang.Boolean resume) { this.uri = uri; this.blk = blk; this.inc = inc; this.detach = detach; + this.resume = resume; } } @@ -56,7 +61,7 @@ public MigrateCommand(@Nonnull MigrateCommand.Arguments argument) { } /** Constructs a new MigrateCommand. */ - public MigrateCommand(java.lang.String uri, java.lang.Boolean blk, java.lang.Boolean inc, java.lang.Boolean detach) { - this(new Arguments(uri, blk, inc, detach)); + public MigrateCommand(java.lang.String uri, java.lang.Boolean blk, java.lang.Boolean inc, java.lang.Boolean detach, java.lang.Boolean resume) { + this(new Arguments(uri, blk, inc, detach, resume)); } } diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigratePauseCommand.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigratePauseCommand.java new file mode 100644 index 00000000..802e2bd6 --- /dev/null +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigratePauseCommand.java @@ -0,0 +1,27 @@ +package org.anarres.qemu.qapi.api; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; +import org.anarres.qemu.qapi.common.*; + +/** + * Autogenerated class. + * + *
QApiCommandDescriptor{name=migrate-pause, returns=null, data=null}
+ */ +// QApiCommandDescriptor{name=migrate-pause, returns=null, data=null} +public class MigratePauseCommand extends QApiCommand { + + /** Response to a MigratePauseCommand. */ + public static class Response extends QApiResponse { + } + + /** Constructs a new MigratePauseCommand. */ + public MigratePauseCommand() { + super("migrate-pause", Response.class, null); + } + +} diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateRecoverCommand.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateRecoverCommand.java new file mode 100644 index 00000000..88697778 --- /dev/null +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrateRecoverCommand.java @@ -0,0 +1,47 @@ +package org.anarres.qemu.qapi.api; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; +import org.anarres.qemu.qapi.common.*; + +/** + * Autogenerated class. + * + *
QApiCommandDescriptor{name=migrate-recover, returns=null, data={uri=str}}
+ */ +// QApiCommandDescriptor{name=migrate-recover, returns=null, data={uri=str}} +public class MigrateRecoverCommand extends QApiCommand { + /** Compound arguments to a MigrateRecoverCommand. */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class Arguments { + + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("uri") + @Nonnull + public java.lang.String uri; + + public Arguments() { + } + + public Arguments(java.lang.String uri) { + this.uri = uri; + } + } + + /** Response to a MigrateRecoverCommand. */ + public static class Response extends QApiResponse { + } + + /** Constructs a new MigrateRecoverCommand. */ + public MigrateRecoverCommand(@Nonnull MigrateRecoverCommand.Arguments argument) { + super("migrate-recover", Response.class, argument); + } + + /** Constructs a new MigrateRecoverCommand. */ + public MigrateRecoverCommand(java.lang.String uri) { + this(new Arguments(uri)); + } +} diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationCapability.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationCapability.java index f3024335..db4ec758 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationCapability.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationCapability.java @@ -8,9 +8,9 @@ /** * Autogenerated class. * - *
QApiEnumDescriptor{name=MigrationCapability, data=[xbzrle, rdma-pin-all, auto-converge, zero-blocks, compress, events, postcopy-ram, x-colo, release-ram, block, return-path, pause-before-switchover, x-multifd, dirty-bitmaps], fields=null}
+ *
QApiEnumDescriptor{name=MigrationCapability, data=[xbzrle, rdma-pin-all, auto-converge, zero-blocks, compress, events, postcopy-ram, x-colo, release-ram, block, return-path, pause-before-switchover, x-multifd, dirty-bitmaps, postcopy-blocktime], fields=null}
*/ -// QApiEnumDescriptor{name=MigrationCapability, data=[xbzrle, rdma-pin-all, auto-converge, zero-blocks, compress, events, postcopy-ram, x-colo, release-ram, block, return-path, pause-before-switchover, x-multifd, dirty-bitmaps], fields=null} +// QApiEnumDescriptor{name=MigrationCapability, data=[xbzrle, rdma-pin-all, auto-converge, zero-blocks, compress, events, postcopy-ram, x-colo, release-ram, block, return-path, pause-before-switchover, x-multifd, dirty-bitmaps, postcopy-blocktime], fields=null} public enum MigrationCapability { xbzrle("xbzrle"), rdma_pin_all("rdma-pin-all"), @@ -26,6 +26,7 @@ public enum MigrationCapability { pause_before_switchover("pause-before-switchover"), x_multifd("x-multifd"), dirty_bitmaps("dirty-bitmaps"), + postcopy_blocktime("postcopy-blocktime"), __UNKNOWN(""); private final java.lang.String jsonValue; diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationInfo.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationInfo.java index bf642f35..47478a29 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationInfo.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationInfo.java @@ -12,9 +12,9 @@ /** * Autogenerated class. * - *
QApiStructDescriptor{name=MigrationInfo, data={*status=MigrationStatus, *ram=MigrationStats, *disk=MigrationStats, *xbzrle-cache=XBZRLECacheStats, *total-time=int, *expected-downtime=int, *downtime=int, *setup-time=int, *cpu-throttle-percentage=int, *error-desc=str}, innerTypes=null, fields=null, base=null}
+ *
QApiStructDescriptor{name=MigrationInfo, data={*status=MigrationStatus, *ram=MigrationStats, *disk=MigrationStats, *xbzrle-cache=XBZRLECacheStats, *total-time=int, *expected-downtime=int, *downtime=int, *setup-time=int, *cpu-throttle-percentage=int, *error-desc=str, *postcopy-blocktime=uint32, *postcopy-vcpu-blocktime=[uint32]}, innerTypes=null, fields=null, base=null}
*/ -// QApiStructDescriptor{name=MigrationInfo, data={*status=MigrationStatus, *ram=MigrationStats, *disk=MigrationStats, *xbzrle-cache=XBZRLECacheStats, *total-time=int, *expected-downtime=int, *downtime=int, *setup-time=int, *cpu-throttle-percentage=int, *error-desc=str}, innerTypes=null, fields=null, base=null} +// QApiStructDescriptor{name=MigrationInfo, data={*status=MigrationStatus, *ram=MigrationStats, *disk=MigrationStats, *xbzrle-cache=XBZRLECacheStats, *total-time=int, *expected-downtime=int, *downtime=int, *setup-time=int, *cpu-throttle-percentage=int, *error-desc=str, *postcopy-blocktime=uint32, *postcopy-vcpu-blocktime=[uint32]}, innerTypes=null, fields=null, base=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class MigrationInfo extends QApiType { @@ -58,6 +58,14 @@ public class MigrationInfo extends QApiType { @JsonProperty("error-desc") @CheckForNull public java.lang.String errorDesc; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("postcopy-blocktime") + @CheckForNull + public java.lang.Long postcopyBlocktime; + @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") + @JsonProperty("postcopy-vcpu-blocktime") + @CheckForNull + public java.util.List postcopyVcpuBlocktime; @Nonnull public MigrationInfo withStatus(MigrationStatus value) { @@ -119,10 +127,22 @@ public MigrationInfo withErrorDesc(java.lang.String value) { return this; } + @Nonnull + public MigrationInfo withPostcopyBlocktime(java.lang.Long value) { + this.postcopyBlocktime = value; + return this; + } + + @Nonnull + public MigrationInfo withPostcopyVcpuBlocktime(java.util.List value) { + this.postcopyVcpuBlocktime = value; + return this; + } + public MigrationInfo() { } - public MigrationInfo(MigrationStatus status, MigrationStats ram, MigrationStats disk, XBZRLECacheStats xbzrleCache, java.lang.Long totalTime, java.lang.Long expectedDowntime, java.lang.Long downtime, java.lang.Long setupTime, java.lang.Long cpuThrottlePercentage, java.lang.String errorDesc) { + public MigrationInfo(MigrationStatus status, MigrationStats ram, MigrationStats disk, XBZRLECacheStats xbzrleCache, java.lang.Long totalTime, java.lang.Long expectedDowntime, java.lang.Long downtime, java.lang.Long setupTime, java.lang.Long cpuThrottlePercentage, java.lang.String errorDesc, java.lang.Long postcopyBlocktime, java.util.List postcopyVcpuBlocktime) { this.status = status; this.ram = ram; this.disk = disk; @@ -133,6 +153,8 @@ public MigrationInfo(MigrationStatus status, MigrationStats ram, MigrationStats this.setupTime = setupTime; this.cpuThrottlePercentage = cpuThrottlePercentage; this.errorDesc = errorDesc; + this.postcopyBlocktime = postcopyBlocktime; + this.postcopyVcpuBlocktime = postcopyVcpuBlocktime; } @JsonIgnore @@ -149,6 +171,8 @@ public java.util.List getFieldNames() { names.add("setup-time"); names.add("cpu-throttle-percentage"); names.add("error-desc"); + names.add("postcopy-blocktime"); + names.add("postcopy-vcpu-blocktime"); return names; } @@ -174,6 +198,10 @@ public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldE return cpuThrottlePercentage; if ("error-desc".equals(name)) return errorDesc; + if ("postcopy-blocktime".equals(name)) + return postcopyBlocktime; + if ("postcopy-vcpu-blocktime".equals(name)) + return postcopyVcpuBlocktime; return super.getFieldByName(name); } } diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationStatus.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationStatus.java index 4172e74a..aef918eb 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationStatus.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/MigrationStatus.java @@ -8,9 +8,9 @@ /** * Autogenerated class. * - *
QApiEnumDescriptor{name=MigrationStatus, data=[none, setup, cancelling, cancelled, active, postcopy-active, completed, failed, colo, pre-switchover, device], fields=null}
+ *
QApiEnumDescriptor{name=MigrationStatus, data=[none, setup, cancelling, cancelled, active, postcopy-active, postcopy-paused, postcopy-recover, completed, failed, colo, pre-switchover, device], fields=null}
*/ -// QApiEnumDescriptor{name=MigrationStatus, data=[none, setup, cancelling, cancelled, active, postcopy-active, completed, failed, colo, pre-switchover, device], fields=null} +// QApiEnumDescriptor{name=MigrationStatus, data=[none, setup, cancelling, cancelled, active, postcopy-active, postcopy-paused, postcopy-recover, completed, failed, colo, pre-switchover, device], fields=null} public enum MigrationStatus { none("none"), setup("setup"), @@ -18,6 +18,8 @@ public enum MigrationStatus { cancelled("cancelled"), active("active"), postcopy_active("postcopy-active"), + postcopy_paused("postcopy-paused"), + postcopy_recover("postcopy-recover"), completed("completed"), failed("failed"), colo("colo"), diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/NetLegacy.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/NetLegacy.java index 723bc878..f04faae9 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/NetLegacy.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/NetLegacy.java @@ -12,16 +12,12 @@ /** * Autogenerated class. * - *
QApiStructDescriptor{name=NetLegacy, data={*vlan=int32, *id=str, *name=str, opts=NetLegacyOptions}, innerTypes=null, fields=null, base=null}
+ *
QApiStructDescriptor{name=NetLegacy, data={*id=str, *name=str, opts=NetLegacyOptions}, innerTypes=null, fields=null, base=null}
*/ -// QApiStructDescriptor{name=NetLegacy, data={*vlan=int32, *id=str, *name=str, opts=NetLegacyOptions}, innerTypes=null, fields=null, base=null} +// QApiStructDescriptor{name=NetLegacy, data={*id=str, *name=str, opts=NetLegacyOptions}, innerTypes=null, fields=null, base=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class NetLegacy extends QApiType { - @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") - @JsonProperty("vlan") - @CheckForNull - public java.lang.Integer vlan; @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("id") @CheckForNull @@ -35,12 +31,6 @@ public class NetLegacy extends QApiType { @Nonnull public NetLegacyOptions opts; - @Nonnull - public NetLegacy withVlan(java.lang.Integer value) { - this.vlan = value; - return this; - } - @Nonnull public NetLegacy withId(java.lang.String value) { this.id = value; @@ -62,8 +52,7 @@ public NetLegacy withOpts(NetLegacyOptions value) { public NetLegacy() { } - public NetLegacy(java.lang.Integer vlan, java.lang.String id, java.lang.String name, NetLegacyOptions opts) { - this.vlan = vlan; + public NetLegacy(java.lang.String id, java.lang.String name, NetLegacyOptions opts) { this.id = id; this.name = name; this.opts = opts; @@ -73,7 +62,6 @@ public NetLegacy(java.lang.Integer vlan, java.lang.String id, java.lang.String n @Override public java.util.List getFieldNames() { java.util.List names = super.getFieldNames(); - names.add("vlan"); names.add("id"); names.add("name"); names.add("opts"); @@ -82,8 +70,6 @@ public java.util.List getFieldNames() { @Override public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { - if ("vlan".equals(name)) - return vlan; if ("id".equals(name)) return id; if ("name".equals(name)) diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/SysEmuTarget.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/SysEmuTarget.java new file mode 100644 index 00000000..8803efd4 --- /dev/null +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/SysEmuTarget.java @@ -0,0 +1,59 @@ +package org.anarres.qemu.qapi.api; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; + +/** + * Autogenerated class. + * + *
QApiEnumDescriptor{name=SysEmuTarget, data=[aarch64, alpha, arm, cris, hppa, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, nios2, or1k, ppc, ppc64, ppcemb, riscv32, riscv64, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb], fields=null}
+ */ +// QApiEnumDescriptor{name=SysEmuTarget, data=[aarch64, alpha, arm, cris, hppa, i386, lm32, m68k, microblaze, microblazeel, mips, mips64, mips64el, mipsel, moxie, nios2, or1k, ppc, ppc64, ppcemb, riscv32, riscv64, s390x, sh4, sh4eb, sparc, sparc64, tricore, unicore32, x86_64, xtensa, xtensaeb], fields=null} +public enum SysEmuTarget { + aarch64("aarch64"), + alpha("alpha"), + arm("arm"), + cris("cris"), + hppa("hppa"), + i386("i386"), + lm32("lm32"), + m68k("m68k"), + microblaze("microblaze"), + microblazeel("microblazeel"), + mips("mips"), + mips64("mips64"), + mips64el("mips64el"), + mipsel("mipsel"), + moxie("moxie"), + nios2("nios2"), + or1k("or1k"), + ppc("ppc"), + ppc64("ppc64"), + ppcemb("ppcemb"), + riscv32("riscv32"), + riscv64("riscv64"), + s390x("s390x"), + sh4("sh4"), + sh4eb("sh4eb"), + sparc("sparc"), + sparc64("sparc64"), + tricore("tricore"), + unicore32("unicore32"), + x86_64("x86_64"), + xtensa("xtensa"), + xtensaeb("xtensaeb"), + __UNKNOWN(""); + + private final java.lang.String jsonValue; + + /* pp */ SysEmuTarget(@Nonnull java.lang.String jsonValue) { + this.jsonValue = jsonValue; + } + + @JsonValue + public java.lang.String getJsonValue() { + return jsonValue; + } +} diff --git a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/TargetInfo.java b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/TargetInfo.java index 638bdad9..66b053e7 100644 --- a/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/TargetInfo.java +++ b/qemu-qapi/src/main/java/org/anarres/qemu/qapi/api/TargetInfo.java @@ -12,19 +12,19 @@ /** * Autogenerated class. * - *
QApiStructDescriptor{name=TargetInfo, data={arch=str}, innerTypes=null, fields=null, base=null}
+ *
QApiStructDescriptor{name=TargetInfo, data={arch=SysEmuTarget}, innerTypes=null, fields=null, base=null}
*/ -// QApiStructDescriptor{name=TargetInfo, data={arch=str}, innerTypes=null, fields=null, base=null} +// QApiStructDescriptor{name=TargetInfo, data={arch=SysEmuTarget}, innerTypes=null, fields=null, base=null} @JsonInclude(JsonInclude.Include.NON_EMPTY) public class TargetInfo extends QApiType { @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") @JsonProperty("arch") @Nonnull - public java.lang.String arch; + public SysEmuTarget arch; @Nonnull - public TargetInfo withArch(java.lang.String value) { + public TargetInfo withArch(SysEmuTarget value) { this.arch = value; return this; } @@ -32,7 +32,7 @@ public TargetInfo withArch(java.lang.String value) { public TargetInfo() { } - public TargetInfo(java.lang.String arch) { + public TargetInfo(SysEmuTarget arch) { this.arch = arch; } diff --git a/qemu-qapi/src/test/java/org/anarres/qemu/qapi/common/QApiBlockdevTest.java b/qemu-qapi/src/test/java/org/anarres/qemu/qapi/common/QApiBlockdevTest.java index 7aa197e3..751f1c6f 100644 --- a/qemu-qapi/src/test/java/org/anarres/qemu/qapi/common/QApiBlockdevTest.java +++ b/qemu-qapi/src/test/java/org/anarres/qemu/qapi/common/QApiBlockdevTest.java @@ -42,7 +42,7 @@ public void testConnection() throws Exception { { BlockdevOptions fileOptions = BlockdevOptions.file(new BlockdevOptionsFile("/home/shevek/sdb.img", - null, OnOffAuto.auto, BlockdevAioOptions._native)); + null, OnOffAuto.auto, BlockdevAioOptions._native, null)); BlockdevOptions rawOptions = BlockdevOptions.raw((BlockdevOptionsRaw) new BlockdevOptionsRaw() .withFile(BlockdevRef.definition(fileOptions)));