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=MachineInfo, data={name=str, *alias=str, *is-default=bool, cpu-max=int}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=MachineInfo, data={name=str, *alias=str, *is-default=bool, cpu-max=int}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class MachineInfo extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("name") 023 @Nonnull 024 public java.lang.String name; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("alias") 027 @CheckForNull 028 public java.lang.String alias; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("is-default") 031 @CheckForNull 032 public java.lang.Boolean isDefault; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("cpu-max") 035 @Nonnull 036 public long cpuMax; 037 038 @Nonnull 039 public MachineInfo withName(java.lang.String value) { 040 this.name = value; 041 return this; 042 } 043 044 @Nonnull 045 public MachineInfo withAlias(java.lang.String value) { 046 this.alias = value; 047 return this; 048 } 049 050 @Nonnull 051 public MachineInfo withIsDefault(java.lang.Boolean value) { 052 this.isDefault = value; 053 return this; 054 } 055 056 @Nonnull 057 public MachineInfo withCpuMax(long value) { 058 this.cpuMax = value; 059 return this; 060 } 061 062 public MachineInfo() { 063 } 064 065 public MachineInfo(java.lang.String name, java.lang.String alias, java.lang.Boolean isDefault, long cpuMax) { 066 this.name = name; 067 this.alias = alias; 068 this.isDefault = isDefault; 069 this.cpuMax = cpuMax; 070 } 071 072 @JsonIgnore 073 @Override 074 public java.util.List<java.lang.String> getFieldNames() { 075 java.util.List<java.lang.String> names = super.getFieldNames(); 076 names.add("name"); 077 names.add("alias"); 078 names.add("is-default"); 079 names.add("cpu-max"); 080 return names; 081 } 082 083 @Override 084 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 085 if ("name".equals(name)) 086 return name; 087 if ("alias".equals(name)) 088 return alias; 089 if ("is-default".equals(name)) 090 return isDefault; 091 if ("cpu-max".equals(name)) 092 return cpuMax; 093 return super.getFieldByName(name); 094 } 095}