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=CpuInfo, data={CPU=int, current=bool, halted=bool, qom_path=str, *pc=int, *nip=int, *npc=int, *PC=int, thread_id=int}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=CpuInfo, data={CPU=int, current=bool, halted=bool, qom_path=str, *pc=int, *nip=int, *npc=int, *PC=int, thread_id=int}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class CpuInfo extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("CPU") 023 @Nonnull 024 public long cpu; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("current") 027 @Nonnull 028 public boolean current; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("halted") 031 @Nonnull 032 public boolean halted; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("qom_path") 035 @Nonnull 036 public java.lang.String qomPath; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("pc") 039 @CheckForNull 040 public java.lang.Long pc; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("nip") 043 @CheckForNull 044 public java.lang.Long nip; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("npc") 047 @CheckForNull 048 public java.lang.Long npc; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("PC") 051 @CheckForNull 052 public java.lang.Long PC; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("thread_id") 055 @Nonnull 056 public long threadId; 057 058 @Nonnull 059 public CpuInfo withCpu(long value) { 060 this.cpu = value; 061 return this; 062 } 063 064 @Nonnull 065 public CpuInfo withCurrent(boolean value) { 066 this.current = value; 067 return this; 068 } 069 070 @Nonnull 071 public CpuInfo withHalted(boolean value) { 072 this.halted = value; 073 return this; 074 } 075 076 @Nonnull 077 public CpuInfo withQomPath(java.lang.String value) { 078 this.qomPath = value; 079 return this; 080 } 081 082 @Nonnull 083 public CpuInfo withPc(java.lang.Long value) { 084 this.pc = value; 085 return this; 086 } 087 088 @Nonnull 089 public CpuInfo withNip(java.lang.Long value) { 090 this.nip = value; 091 return this; 092 } 093 094 @Nonnull 095 public CpuInfo withNpc(java.lang.Long value) { 096 this.npc = value; 097 return this; 098 } 099 100 @Nonnull 101 public CpuInfo withPC(java.lang.Long value) { 102 this.PC = value; 103 return this; 104 } 105 106 @Nonnull 107 public CpuInfo withThreadId(long value) { 108 this.threadId = value; 109 return this; 110 } 111 112 public CpuInfo() { 113 } 114 115 public CpuInfo(long cpu, boolean current, boolean halted, java.lang.String qomPath, java.lang.Long pc, java.lang.Long nip, java.lang.Long npc, java.lang.Long PC, long threadId) { 116 this.cpu = cpu; 117 this.current = current; 118 this.halted = halted; 119 this.qomPath = qomPath; 120 this.pc = pc; 121 this.nip = nip; 122 this.npc = npc; 123 this.PC = PC; 124 this.threadId = threadId; 125 } 126 127 @JsonIgnore 128 @Override 129 public java.util.List<java.lang.String> getFieldNames() { 130 java.util.List<java.lang.String> names = super.getFieldNames(); 131 names.add("CPU"); 132 names.add("current"); 133 names.add("halted"); 134 names.add("qom_path"); 135 names.add("pc"); 136 names.add("nip"); 137 names.add("npc"); 138 names.add("PC"); 139 names.add("thread_id"); 140 return names; 141 } 142 143 @Override 144 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 145 if ("CPU".equals(name)) 146 return cpu; 147 if ("current".equals(name)) 148 return current; 149 if ("halted".equals(name)) 150 return halted; 151 if ("qom_path".equals(name)) 152 return qomPath; 153 if ("pc".equals(name)) 154 return pc; 155 if ("nip".equals(name)) 156 return nip; 157 if ("npc".equals(name)) 158 return npc; 159 if ("PC".equals(name)) 160 return PC; 161 if ("thread_id".equals(name)) 162 return threadId; 163 return super.getFieldByName(name); 164 } 165}