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=PCDIMMDeviceInfo, data={*id=str, addr=int, size=int, slot=int, node=int, memdev=str, hotplugged=bool, hotpluggable=bool}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=PCDIMMDeviceInfo, data={*id=str, addr=int, size=int, slot=int, node=int, memdev=str, hotplugged=bool, hotpluggable=bool}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class PCDIMMDeviceInfo extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("id") 023 @CheckForNull 024 public java.lang.String id; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("addr") 027 @Nonnull 028 public long addr; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("size") 031 @Nonnull 032 public long size; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("slot") 035 @Nonnull 036 public long slot; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("node") 039 @Nonnull 040 public long node; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("memdev") 043 @Nonnull 044 public java.lang.String memdev; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("hotplugged") 047 @Nonnull 048 public boolean hotplugged; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("hotpluggable") 051 @Nonnull 052 public boolean hotpluggable; 053 054 @Nonnull 055 public PCDIMMDeviceInfo withId(java.lang.String value) { 056 this.id = value; 057 return this; 058 } 059 060 @Nonnull 061 public PCDIMMDeviceInfo withAddr(long value) { 062 this.addr = value; 063 return this; 064 } 065 066 @Nonnull 067 public PCDIMMDeviceInfo withSize(long value) { 068 this.size = value; 069 return this; 070 } 071 072 @Nonnull 073 public PCDIMMDeviceInfo withSlot(long value) { 074 this.slot = value; 075 return this; 076 } 077 078 @Nonnull 079 public PCDIMMDeviceInfo withNode(long value) { 080 this.node = value; 081 return this; 082 } 083 084 @Nonnull 085 public PCDIMMDeviceInfo withMemdev(java.lang.String value) { 086 this.memdev = value; 087 return this; 088 } 089 090 @Nonnull 091 public PCDIMMDeviceInfo withHotplugged(boolean value) { 092 this.hotplugged = value; 093 return this; 094 } 095 096 @Nonnull 097 public PCDIMMDeviceInfo withHotpluggable(boolean value) { 098 this.hotpluggable = value; 099 return this; 100 } 101 102 public PCDIMMDeviceInfo() { 103 } 104 105 public PCDIMMDeviceInfo(java.lang.String id, long addr, long size, long slot, long node, java.lang.String memdev, boolean hotplugged, boolean hotpluggable) { 106 this.id = id; 107 this.addr = addr; 108 this.size = size; 109 this.slot = slot; 110 this.node = node; 111 this.memdev = memdev; 112 this.hotplugged = hotplugged; 113 this.hotpluggable = hotpluggable; 114 } 115 116 @JsonIgnore 117 @Override 118 public java.util.List<java.lang.String> getFieldNames() { 119 java.util.List<java.lang.String> names = super.getFieldNames(); 120 names.add("id"); 121 names.add("addr"); 122 names.add("size"); 123 names.add("slot"); 124 names.add("node"); 125 names.add("memdev"); 126 names.add("hotplugged"); 127 names.add("hotpluggable"); 128 return names; 129 } 130 131 @Override 132 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 133 if ("id".equals(name)) 134 return id; 135 if ("addr".equals(name)) 136 return addr; 137 if ("size".equals(name)) 138 return size; 139 if ("slot".equals(name)) 140 return slot; 141 if ("node".equals(name)) 142 return node; 143 if ("memdev".equals(name)) 144 return memdev; 145 if ("hotplugged".equals(name)) 146 return hotplugged; 147 if ("hotpluggable".equals(name)) 148 return hotpluggable; 149 return super.getFieldByName(name); 150 } 151}