001package org.anarres.qemu.qapi.api; 002 003import com.fasterxml.jackson.annotation.JsonIgnore; 004import com.fasterxml.jackson.annotation.JsonInclude; 005import com.fasterxml.jackson.annotation.JsonProperty; 006import com.fasterxml.jackson.annotation.JsonUnwrapped; 007import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 008import javax.annotation.CheckForNull; 009import javax.annotation.Nonnull; 010import org.anarres.qemu.qapi.common.*; 011 012/** 013 * Autogenerated class. 014 * 015 * <pre>QApiTypeDescriptor{name=BlockDeviceInfo, data={file=str, *node-name=str, ro=bool, drv=str, *backing_file=str, backing_file_depth=int, encrypted=bool, encryption_key_missing=bool, detect_zeroes=BlockdevDetectZeroesOptions, bps=int, bps_rd=int, bps_wr=int, iops=int, iops_rd=int, iops_wr=int, image=ImageInfo, *bps_max=int, *bps_rd_max=int, *bps_wr_max=int, *iops_max=int, *iops_rd_max=int, *iops_wr_max=int, *iops_size=int, *group=str, cache=BlockdevCacheInfo, write_threshold=int}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=BlockDeviceInfo, data={file=str, *node-name=str, ro=bool, drv=str, *backing_file=str, backing_file_depth=int, encrypted=bool, encryption_key_missing=bool, detect_zeroes=BlockdevDetectZeroesOptions, bps=int, bps_rd=int, bps_wr=int, iops=int, iops_rd=int, iops_wr=int, image=ImageInfo, *bps_max=int, *bps_rd_max=int, *bps_wr_max=int, *iops_max=int, *iops_rd_max=int, *iops_wr_max=int, *iops_size=int, *group=str, cache=BlockdevCacheInfo, write_threshold=int}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class BlockDeviceInfo extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("file") 023 @Nonnull 024 public java.lang.String file; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("node-name") 027 @CheckForNull 028 public java.lang.String nodeName; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("ro") 031 @Nonnull 032 public boolean ro; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("drv") 035 @Nonnull 036 public java.lang.String drv; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("backing_file") 039 @CheckForNull 040 public java.lang.String backingFile; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("backing_file_depth") 043 @Nonnull 044 public long backingFileDepth; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("encrypted") 047 @Nonnull 048 public boolean encrypted; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("encryption_key_missing") 051 @Nonnull 052 public boolean encryptionKeyMissing; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("detect_zeroes") 055 @Nonnull 056 public BlockdevDetectZeroesOptions detectZeroes; 057 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 058 @JsonProperty("bps") 059 @Nonnull 060 public long bps; 061 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 062 @JsonProperty("bps_rd") 063 @Nonnull 064 public long bpsRd; 065 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 066 @JsonProperty("bps_wr") 067 @Nonnull 068 public long bpsWr; 069 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 070 @JsonProperty("iops") 071 @Nonnull 072 public long iops; 073 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 074 @JsonProperty("iops_rd") 075 @Nonnull 076 public long iopsRd; 077 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 078 @JsonProperty("iops_wr") 079 @Nonnull 080 public long iopsWr; 081 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 082 @JsonProperty("image") 083 @Nonnull 084 public ImageInfo image; 085 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 086 @JsonProperty("bps_max") 087 @CheckForNull 088 public java.lang.Long bpsMax; 089 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 090 @JsonProperty("bps_rd_max") 091 @CheckForNull 092 public java.lang.Long bpsRdMax; 093 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 094 @JsonProperty("bps_wr_max") 095 @CheckForNull 096 public java.lang.Long bpsWrMax; 097 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 098 @JsonProperty("iops_max") 099 @CheckForNull 100 public java.lang.Long iopsMax; 101 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 102 @JsonProperty("iops_rd_max") 103 @CheckForNull 104 public java.lang.Long iopsRdMax; 105 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 106 @JsonProperty("iops_wr_max") 107 @CheckForNull 108 public java.lang.Long iopsWrMax; 109 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 110 @JsonProperty("iops_size") 111 @CheckForNull 112 public java.lang.Long iopsSize; 113 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 114 @JsonProperty("group") 115 @CheckForNull 116 public java.lang.String group; 117 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 118 @JsonProperty("cache") 119 @Nonnull 120 public BlockdevCacheInfo cache; 121 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 122 @JsonProperty("write_threshold") 123 @Nonnull 124 public long writeThreshold; 125 126 @Nonnull 127 public BlockDeviceInfo withFile(java.lang.String value) { 128 this.file = value; 129 return this; 130 } 131 132 @Nonnull 133 public BlockDeviceInfo withNodeName(java.lang.String value) { 134 this.nodeName = value; 135 return this; 136 } 137 138 @Nonnull 139 public BlockDeviceInfo withRo(boolean value) { 140 this.ro = value; 141 return this; 142 } 143 144 @Nonnull 145 public BlockDeviceInfo withDrv(java.lang.String value) { 146 this.drv = value; 147 return this; 148 } 149 150 @Nonnull 151 public BlockDeviceInfo withBackingFile(java.lang.String value) { 152 this.backingFile = value; 153 return this; 154 } 155 156 @Nonnull 157 public BlockDeviceInfo withBackingFileDepth(long value) { 158 this.backingFileDepth = value; 159 return this; 160 } 161 162 @Nonnull 163 public BlockDeviceInfo withEncrypted(boolean value) { 164 this.encrypted = value; 165 return this; 166 } 167 168 @Nonnull 169 public BlockDeviceInfo withEncryptionKeyMissing(boolean value) { 170 this.encryptionKeyMissing = value; 171 return this; 172 } 173 174 @Nonnull 175 public BlockDeviceInfo withDetectZeroes(BlockdevDetectZeroesOptions value) { 176 this.detectZeroes = value; 177 return this; 178 } 179 180 @Nonnull 181 public BlockDeviceInfo withBps(long value) { 182 this.bps = value; 183 return this; 184 } 185 186 @Nonnull 187 public BlockDeviceInfo withBpsRd(long value) { 188 this.bpsRd = value; 189 return this; 190 } 191 192 @Nonnull 193 public BlockDeviceInfo withBpsWr(long value) { 194 this.bpsWr = value; 195 return this; 196 } 197 198 @Nonnull 199 public BlockDeviceInfo withIops(long value) { 200 this.iops = value; 201 return this; 202 } 203 204 @Nonnull 205 public BlockDeviceInfo withIopsRd(long value) { 206 this.iopsRd = value; 207 return this; 208 } 209 210 @Nonnull 211 public BlockDeviceInfo withIopsWr(long value) { 212 this.iopsWr = value; 213 return this; 214 } 215 216 @Nonnull 217 public BlockDeviceInfo withImage(ImageInfo value) { 218 this.image = value; 219 return this; 220 } 221 222 @Nonnull 223 public BlockDeviceInfo withBpsMax(java.lang.Long value) { 224 this.bpsMax = value; 225 return this; 226 } 227 228 @Nonnull 229 public BlockDeviceInfo withBpsRdMax(java.lang.Long value) { 230 this.bpsRdMax = value; 231 return this; 232 } 233 234 @Nonnull 235 public BlockDeviceInfo withBpsWrMax(java.lang.Long value) { 236 this.bpsWrMax = value; 237 return this; 238 } 239 240 @Nonnull 241 public BlockDeviceInfo withIopsMax(java.lang.Long value) { 242 this.iopsMax = value; 243 return this; 244 } 245 246 @Nonnull 247 public BlockDeviceInfo withIopsRdMax(java.lang.Long value) { 248 this.iopsRdMax = value; 249 return this; 250 } 251 252 @Nonnull 253 public BlockDeviceInfo withIopsWrMax(java.lang.Long value) { 254 this.iopsWrMax = value; 255 return this; 256 } 257 258 @Nonnull 259 public BlockDeviceInfo withIopsSize(java.lang.Long value) { 260 this.iopsSize = value; 261 return this; 262 } 263 264 @Nonnull 265 public BlockDeviceInfo withGroup(java.lang.String value) { 266 this.group = value; 267 return this; 268 } 269 270 @Nonnull 271 public BlockDeviceInfo withCache(BlockdevCacheInfo value) { 272 this.cache = value; 273 return this; 274 } 275 276 @Nonnull 277 public BlockDeviceInfo withWriteThreshold(long value) { 278 this.writeThreshold = value; 279 return this; 280 } 281 282 public BlockDeviceInfo() { 283 } 284 285 public BlockDeviceInfo(java.lang.String file, java.lang.String nodeName, boolean ro, java.lang.String drv, java.lang.String backingFile, long backingFileDepth, boolean encrypted, boolean encryptionKeyMissing, BlockdevDetectZeroesOptions detectZeroes, long bps, long bpsRd, long bpsWr, long iops, long iopsRd, long iopsWr, ImageInfo image, java.lang.Long bpsMax, java.lang.Long bpsRdMax, java.lang.Long bpsWrMax, java.lang.Long iopsMax, java.lang.Long iopsRdMax, java.lang.Long iopsWrMax, java.lang.Long iopsSize, java.lang.String group, BlockdevCacheInfo cache, long writeThreshold) { 286 this.file = file; 287 this.nodeName = nodeName; 288 this.ro = ro; 289 this.drv = drv; 290 this.backingFile = backingFile; 291 this.backingFileDepth = backingFileDepth; 292 this.encrypted = encrypted; 293 this.encryptionKeyMissing = encryptionKeyMissing; 294 this.detectZeroes = detectZeroes; 295 this.bps = bps; 296 this.bpsRd = bpsRd; 297 this.bpsWr = bpsWr; 298 this.iops = iops; 299 this.iopsRd = iopsRd; 300 this.iopsWr = iopsWr; 301 this.image = image; 302 this.bpsMax = bpsMax; 303 this.bpsRdMax = bpsRdMax; 304 this.bpsWrMax = bpsWrMax; 305 this.iopsMax = iopsMax; 306 this.iopsRdMax = iopsRdMax; 307 this.iopsWrMax = iopsWrMax; 308 this.iopsSize = iopsSize; 309 this.group = group; 310 this.cache = cache; 311 this.writeThreshold = writeThreshold; 312 } 313 314 @JsonIgnore 315 @Override 316 public java.util.List<java.lang.String> getFieldNames() { 317 java.util.List<java.lang.String> names = super.getFieldNames(); 318 names.add("file"); 319 names.add("node-name"); 320 names.add("ro"); 321 names.add("drv"); 322 names.add("backing_file"); 323 names.add("backing_file_depth"); 324 names.add("encrypted"); 325 names.add("encryption_key_missing"); 326 names.add("detect_zeroes"); 327 names.add("bps"); 328 names.add("bps_rd"); 329 names.add("bps_wr"); 330 names.add("iops"); 331 names.add("iops_rd"); 332 names.add("iops_wr"); 333 names.add("image"); 334 names.add("bps_max"); 335 names.add("bps_rd_max"); 336 names.add("bps_wr_max"); 337 names.add("iops_max"); 338 names.add("iops_rd_max"); 339 names.add("iops_wr_max"); 340 names.add("iops_size"); 341 names.add("group"); 342 names.add("cache"); 343 names.add("write_threshold"); 344 return names; 345 } 346 347 @Override 348 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 349 if ("file".equals(name)) 350 return file; 351 if ("node-name".equals(name)) 352 return nodeName; 353 if ("ro".equals(name)) 354 return ro; 355 if ("drv".equals(name)) 356 return drv; 357 if ("backing_file".equals(name)) 358 return backingFile; 359 if ("backing_file_depth".equals(name)) 360 return backingFileDepth; 361 if ("encrypted".equals(name)) 362 return encrypted; 363 if ("encryption_key_missing".equals(name)) 364 return encryptionKeyMissing; 365 if ("detect_zeroes".equals(name)) 366 return detectZeroes; 367 if ("bps".equals(name)) 368 return bps; 369 if ("bps_rd".equals(name)) 370 return bpsRd; 371 if ("bps_wr".equals(name)) 372 return bpsWr; 373 if ("iops".equals(name)) 374 return iops; 375 if ("iops_rd".equals(name)) 376 return iopsRd; 377 if ("iops_wr".equals(name)) 378 return iopsWr; 379 if ("image".equals(name)) 380 return image; 381 if ("bps_max".equals(name)) 382 return bpsMax; 383 if ("bps_rd_max".equals(name)) 384 return bpsRdMax; 385 if ("bps_wr_max".equals(name)) 386 return bpsWrMax; 387 if ("iops_max".equals(name)) 388 return iopsMax; 389 if ("iops_rd_max".equals(name)) 390 return iopsRdMax; 391 if ("iops_wr_max".equals(name)) 392 return iopsWrMax; 393 if ("iops_size".equals(name)) 394 return iopsSize; 395 if ("group".equals(name)) 396 return group; 397 if ("cache".equals(name)) 398 return cache; 399 if ("write_threshold".equals(name)) 400 return writeThreshold; 401 return super.getFieldByName(name); 402 } 403}