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=NetLegacyNicOptions, data={*netdev=str, *macaddr=str, *model=str, *addr=str, *vectors=uint32}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=NetLegacyNicOptions, data={*netdev=str, *macaddr=str, *model=str, *addr=str, *vectors=uint32}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class NetLegacyNicOptions extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("netdev") 023 @CheckForNull 024 public java.lang.String netdev; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("macaddr") 027 @CheckForNull 028 public java.lang.String macaddr; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("model") 031 @CheckForNull 032 public java.lang.String model; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("addr") 035 @CheckForNull 036 public java.lang.String addr; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("vectors") 039 @CheckForNull 040 public java.lang.Long vectors; 041 042 @Nonnull 043 public NetLegacyNicOptions withNetdev(java.lang.String value) { 044 this.netdev = value; 045 return this; 046 } 047 048 @Nonnull 049 public NetLegacyNicOptions withMacaddr(java.lang.String value) { 050 this.macaddr = value; 051 return this; 052 } 053 054 @Nonnull 055 public NetLegacyNicOptions withModel(java.lang.String value) { 056 this.model = value; 057 return this; 058 } 059 060 @Nonnull 061 public NetLegacyNicOptions withAddr(java.lang.String value) { 062 this.addr = value; 063 return this; 064 } 065 066 @Nonnull 067 public NetLegacyNicOptions withVectors(java.lang.Long value) { 068 this.vectors = value; 069 return this; 070 } 071 072 public NetLegacyNicOptions() { 073 } 074 075 public NetLegacyNicOptions(java.lang.String netdev, java.lang.String macaddr, java.lang.String model, java.lang.String addr, java.lang.Long vectors) { 076 this.netdev = netdev; 077 this.macaddr = macaddr; 078 this.model = model; 079 this.addr = addr; 080 this.vectors = vectors; 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("netdev"); 088 names.add("macaddr"); 089 names.add("model"); 090 names.add("addr"); 091 names.add("vectors"); 092 return names; 093 } 094 095 @Override 096 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 097 if ("netdev".equals(name)) 098 return netdev; 099 if ("macaddr".equals(name)) 100 return macaddr; 101 if ("model".equals(name)) 102 return model; 103 if ("addr".equals(name)) 104 return addr; 105 if ("vectors".equals(name)) 106 return vectors; 107 return super.getFieldByName(name); 108 } 109}