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=BlockDeviceMapEntry, data={start=int, length=int, depth=int, zero=bool, data=bool, *offset=int}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=BlockDeviceMapEntry, data={start=int, length=int, depth=int, zero=bool, data=bool, *offset=int}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class BlockDeviceMapEntry extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("start")
023        @Nonnull
024        public long start;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("length")
027        @Nonnull
028        public long length;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("depth")
031        @Nonnull
032        public long depth;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("zero")
035        @Nonnull
036        public boolean zero;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("data")
039        @Nonnull
040        public boolean data;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("offset")
043        @CheckForNull
044        public java.lang.Long offset;
045
046        @Nonnull
047        public BlockDeviceMapEntry withStart(long value) {
048                this.start = value;
049                return this;
050        }
051
052        @Nonnull
053        public BlockDeviceMapEntry withLength(long value) {
054                this.length = value;
055                return this;
056        }
057
058        @Nonnull
059        public BlockDeviceMapEntry withDepth(long value) {
060                this.depth = value;
061                return this;
062        }
063
064        @Nonnull
065        public BlockDeviceMapEntry withZero(boolean value) {
066                this.zero = value;
067                return this;
068        }
069
070        @Nonnull
071        public BlockDeviceMapEntry withData(boolean value) {
072                this.data = value;
073                return this;
074        }
075
076        @Nonnull
077        public BlockDeviceMapEntry withOffset(java.lang.Long value) {
078                this.offset = value;
079                return this;
080        }
081
082        public BlockDeviceMapEntry() {
083        }
084
085        public BlockDeviceMapEntry(long start, long length, long depth, boolean zero, boolean data, java.lang.Long offset) {
086                this.start = start;
087                this.length = length;
088                this.depth = depth;
089                this.zero = zero;
090                this.data = data;
091                this.offset = offset;
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("start");
099                names.add("length");
100                names.add("depth");
101                names.add("zero");
102                names.add("data");
103                names.add("offset");
104                return names;
105        }
106
107        @Override
108        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
109                if ("start".equals(name))
110                        return start;
111                if ("length".equals(name))
112                        return length;
113                if ("depth".equals(name))
114                        return depth;
115                if ("zero".equals(name))
116                        return zero;
117                if ("data".equals(name))
118                        return data;
119                if ("offset".equals(name))
120                        return offset;
121                return super.getFieldByName(name);
122        }
123}