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=BlockdevOptionsGenericFormat, data={file=BlockdevRef}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=BlockdevOptionsGenericFormat, data={file=BlockdevRef}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class BlockdevOptionsGenericFormat extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("file") 023 @Nonnull 024 public BlockdevRef file; 025 026 @Nonnull 027 public BlockdevOptionsGenericFormat withFile(BlockdevRef value) { 028 this.file = value; 029 return this; 030 } 031 032 public BlockdevOptionsGenericFormat() { 033 } 034 035 public BlockdevOptionsGenericFormat(BlockdevRef file) { 036 this.file = file; 037 } 038 039 @JsonIgnore 040 @Override 041 public java.util.List<java.lang.String> getFieldNames() { 042 java.util.List<java.lang.String> names = super.getFieldNames(); 043 names.add("file"); 044 return names; 045 } 046 047 @Override 048 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 049 if ("file".equals(name)) 050 return file; 051 return super.getFieldByName(name); 052 } 053}