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=PciMemoryRegion, data={bar=int, type=str, address=int, size=int, *prefetch=bool, *mem_type_64=bool}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=PciMemoryRegion, data={bar=int, type=str, address=int, size=int, *prefetch=bool, *mem_type_64=bool}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class PciMemoryRegion extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("bar")
023        @Nonnull
024        public long bar;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("type")
027        @Nonnull
028        public java.lang.String type;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("address")
031        @Nonnull
032        public long address;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("size")
035        @Nonnull
036        public long size;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("prefetch")
039        @CheckForNull
040        public java.lang.Boolean prefetch;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("mem_type_64")
043        @CheckForNull
044        public java.lang.Boolean memType64;
045
046        @Nonnull
047        public PciMemoryRegion withBar(long value) {
048                this.bar = value;
049                return this;
050        }
051
052        @Nonnull
053        public PciMemoryRegion withType(java.lang.String value) {
054                this.type = value;
055                return this;
056        }
057
058        @Nonnull
059        public PciMemoryRegion withAddress(long value) {
060                this.address = value;
061                return this;
062        }
063
064        @Nonnull
065        public PciMemoryRegion withSize(long value) {
066                this.size = value;
067                return this;
068        }
069
070        @Nonnull
071        public PciMemoryRegion withPrefetch(java.lang.Boolean value) {
072                this.prefetch = value;
073                return this;
074        }
075
076        @Nonnull
077        public PciMemoryRegion withMemType64(java.lang.Boolean value) {
078                this.memType64 = value;
079                return this;
080        }
081
082        public PciMemoryRegion() {
083        }
084
085        public PciMemoryRegion(long bar, java.lang.String type, long address, long size, java.lang.Boolean prefetch, java.lang.Boolean memType64) {
086                this.bar = bar;
087                this.type = type;
088                this.address = address;
089                this.size = size;
090                this.prefetch = prefetch;
091                this.memType64 = memType64;
092        }
093
094        @JsonIgnore
095        @Override
096        public java.util.List<java.lang.String> getFieldNames() {
097                java.util.List<java.lang.String> names = super.getFieldNames();
098                names.add("bar");
099                names.add("type");
100                names.add("address");
101                names.add("size");
102                names.add("prefetch");
103                names.add("mem_type_64");
104                return names;
105        }
106
107        @Override
108        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
109                if ("bar".equals(name))
110                        return bar;
111                if ("type".equals(name))
112                        return type;
113                if ("address".equals(name))
114                        return address;
115                if ("size".equals(name))
116                        return size;
117                if ("prefetch".equals(name))
118                        return prefetch;
119                if ("mem_type_64".equals(name))
120                        return memType64;
121                return super.getFieldByName(name);
122        }
123}