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=BlockdevOptionsBlkdebug, data={image=BlockdevRef, *config=str, *align=int, *inject-error=[BlkdebugInjectErrorOptions], *set-state=[BlkdebugSetStateOptions]}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=BlockdevOptionsBlkdebug, data={image=BlockdevRef, *config=str, *align=int, *inject-error=[BlkdebugInjectErrorOptions], *set-state=[BlkdebugSetStateOptions]}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class BlockdevOptionsBlkdebug extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("image") 023 @Nonnull 024 public BlockdevRef image; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("config") 027 @CheckForNull 028 public java.lang.String config; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("align") 031 @CheckForNull 032 public java.lang.Long align; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("inject-error") 035 @CheckForNull 036 public java.util.List<BlkdebugInjectErrorOptions> injectError; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("set-state") 039 @CheckForNull 040 public java.util.List<BlkdebugSetStateOptions> setState; 041 042 @Nonnull 043 public BlockdevOptionsBlkdebug withImage(BlockdevRef value) { 044 this.image = value; 045 return this; 046 } 047 048 @Nonnull 049 public BlockdevOptionsBlkdebug withConfig(java.lang.String value) { 050 this.config = value; 051 return this; 052 } 053 054 @Nonnull 055 public BlockdevOptionsBlkdebug withAlign(java.lang.Long value) { 056 this.align = value; 057 return this; 058 } 059 060 @Nonnull 061 public BlockdevOptionsBlkdebug withInjectError(java.util.List<BlkdebugInjectErrorOptions> value) { 062 this.injectError = value; 063 return this; 064 } 065 066 @Nonnull 067 public BlockdevOptionsBlkdebug withSetState(java.util.List<BlkdebugSetStateOptions> value) { 068 this.setState = value; 069 return this; 070 } 071 072 public BlockdevOptionsBlkdebug() { 073 } 074 075 public BlockdevOptionsBlkdebug(BlockdevRef image, java.lang.String config, java.lang.Long align, java.util.List<BlkdebugInjectErrorOptions> injectError, java.util.List<BlkdebugSetStateOptions> setState) { 076 this.image = image; 077 this.config = config; 078 this.align = align; 079 this.injectError = injectError; 080 this.setState = setState; 081 } 082 083 @JsonIgnore 084 @Override 085 public java.util.List<java.lang.String> getFieldNames() { 086 java.util.List<java.lang.String> names = super.getFieldNames(); 087 names.add("image"); 088 names.add("config"); 089 names.add("align"); 090 names.add("inject-error"); 091 names.add("set-state"); 092 return names; 093 } 094 095 @Override 096 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 097 if ("image".equals(name)) 098 return image; 099 if ("config".equals(name)) 100 return config; 101 if ("align".equals(name)) 102 return align; 103 if ("inject-error".equals(name)) 104 return injectError; 105 if ("set-state".equals(name)) 106 return setState; 107 return super.getFieldByName(name); 108 } 109}