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=PciDeviceInfo, data={bus=int, slot=int, function=int, class_info=PciDeviceClass, id=PciDeviceId, *irq=int, qdev_id=str, *pci_bridge=PciBridgeInfo, regions=[PciMemoryRegion]}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=PciDeviceInfo, data={bus=int, slot=int, function=int, class_info=PciDeviceClass, id=PciDeviceId, *irq=int, qdev_id=str, *pci_bridge=PciBridgeInfo, regions=[PciMemoryRegion]}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class PciDeviceInfo extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("bus") 023 @Nonnull 024 public long bus; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("slot") 027 @Nonnull 028 public long slot; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("function") 031 @Nonnull 032 public long function; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("class_info") 035 @Nonnull 036 public PciDeviceClass classInfo; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("id") 039 @Nonnull 040 public PciDeviceId id; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("irq") 043 @CheckForNull 044 public java.lang.Long irq; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("qdev_id") 047 @Nonnull 048 public java.lang.String qdevId; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("pci_bridge") 051 @CheckForNull 052 public PciBridgeInfo pciBridge; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("regions") 055 @Nonnull 056 public java.util.List<PciMemoryRegion> regions; 057 058 @Nonnull 059 public PciDeviceInfo withBus(long value) { 060 this.bus = value; 061 return this; 062 } 063 064 @Nonnull 065 public PciDeviceInfo withSlot(long value) { 066 this.slot = value; 067 return this; 068 } 069 070 @Nonnull 071 public PciDeviceInfo withFunction(long value) { 072 this.function = value; 073 return this; 074 } 075 076 @Nonnull 077 public PciDeviceInfo withClassInfo(PciDeviceClass value) { 078 this.classInfo = value; 079 return this; 080 } 081 082 @Nonnull 083 public PciDeviceInfo withId(PciDeviceId value) { 084 this.id = value; 085 return this; 086 } 087 088 @Nonnull 089 public PciDeviceInfo withIrq(java.lang.Long value) { 090 this.irq = value; 091 return this; 092 } 093 094 @Nonnull 095 public PciDeviceInfo withQdevId(java.lang.String value) { 096 this.qdevId = value; 097 return this; 098 } 099 100 @Nonnull 101 public PciDeviceInfo withPciBridge(PciBridgeInfo value) { 102 this.pciBridge = value; 103 return this; 104 } 105 106 @Nonnull 107 public PciDeviceInfo withRegions(java.util.List<PciMemoryRegion> value) { 108 this.regions = value; 109 return this; 110 } 111 112 public PciDeviceInfo() { 113 } 114 115 public PciDeviceInfo(long bus, long slot, long function, PciDeviceClass classInfo, PciDeviceId id, java.lang.Long irq, java.lang.String qdevId, PciBridgeInfo pciBridge, java.util.List<PciMemoryRegion> regions) { 116 this.bus = bus; 117 this.slot = slot; 118 this.function = function; 119 this.classInfo = classInfo; 120 this.id = id; 121 this.irq = irq; 122 this.qdevId = qdevId; 123 this.pciBridge = pciBridge; 124 this.regions = regions; 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("bus"); 132 names.add("slot"); 133 names.add("function"); 134 names.add("class_info"); 135 names.add("id"); 136 names.add("irq"); 137 names.add("qdev_id"); 138 names.add("pci_bridge"); 139 names.add("regions"); 140 return names; 141 } 142 143 @Override 144 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 145 if ("bus".equals(name)) 146 return bus; 147 if ("slot".equals(name)) 148 return slot; 149 if ("function".equals(name)) 150 return function; 151 if ("class_info".equals(name)) 152 return classInfo; 153 if ("id".equals(name)) 154 return id; 155 if ("irq".equals(name)) 156 return irq; 157 if ("qdev_id".equals(name)) 158 return qdevId; 159 if ("pci_bridge".equals(name)) 160 return pciBridge; 161 if ("regions".equals(name)) 162 return regions; 163 return super.getFieldByName(name); 164 } 165}