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=BlockdevOptionsVVFAT, data={dir=str, *fat-type=int, *floppy=bool, *label=str, *rw=bool}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=BlockdevOptionsVVFAT, data={dir=str, *fat-type=int, *floppy=bool, *label=str, *rw=bool}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class BlockdevOptionsVVFAT extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("dir")
023        @Nonnull
024        public java.lang.String dir;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("fat-type")
027        @CheckForNull
028        public java.lang.Long fatType;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("floppy")
031        @CheckForNull
032        public java.lang.Boolean floppy;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("label")
035        @CheckForNull
036        public java.lang.String label;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("rw")
039        @CheckForNull
040        public java.lang.Boolean rw;
041
042        @Nonnull
043        public BlockdevOptionsVVFAT withDir(java.lang.String value) {
044                this.dir = value;
045                return this;
046        }
047
048        @Nonnull
049        public BlockdevOptionsVVFAT withFatType(java.lang.Long value) {
050                this.fatType = value;
051                return this;
052        }
053
054        @Nonnull
055        public BlockdevOptionsVVFAT withFloppy(java.lang.Boolean value) {
056                this.floppy = value;
057                return this;
058        }
059
060        @Nonnull
061        public BlockdevOptionsVVFAT withLabel(java.lang.String value) {
062                this.label = value;
063                return this;
064        }
065
066        @Nonnull
067        public BlockdevOptionsVVFAT withRw(java.lang.Boolean value) {
068                this.rw = value;
069                return this;
070        }
071
072        public BlockdevOptionsVVFAT() {
073        }
074
075        public BlockdevOptionsVVFAT(java.lang.String dir, java.lang.Long fatType, java.lang.Boolean floppy, java.lang.String label, java.lang.Boolean rw) {
076                this.dir = dir;
077                this.fatType = fatType;
078                this.floppy = floppy;
079                this.label = label;
080                this.rw = rw;
081        }
082
083        @JsonIgnore
084        @Override
085        public java.util.List<java.lang.String> getFieldNames() {
086                java.util.List<java.lang.String> names = super.getFieldNames();
087                names.add("dir");
088                names.add("fat-type");
089                names.add("floppy");
090                names.add("label");
091                names.add("rw");
092                return names;
093        }
094
095        @Override
096        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
097                if ("dir".equals(name))
098                        return dir;
099                if ("fat-type".equals(name))
100                        return fatType;
101                if ("floppy".equals(name))
102                        return floppy;
103                if ("label".equals(name))
104                        return label;
105                if ("rw".equals(name))
106                        return rw;
107                return super.getFieldByName(name);
108        }
109}