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=RockerOfDpaFlow, data={cookie=uint64, hits=uint64, key=RockerOfDpaFlowKey, mask=RockerOfDpaFlowMask, action=RockerOfDpaFlowAction}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=RockerOfDpaFlow, data={cookie=uint64, hits=uint64, key=RockerOfDpaFlowKey, mask=RockerOfDpaFlowMask, action=RockerOfDpaFlowAction}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class RockerOfDpaFlow extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("cookie")
023        @Nonnull
024        public long cookie;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("hits")
027        @Nonnull
028        public long hits;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("key")
031        @Nonnull
032        public RockerOfDpaFlowKey key;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("mask")
035        @Nonnull
036        public RockerOfDpaFlowMask mask;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("action")
039        @Nonnull
040        public RockerOfDpaFlowAction action;
041
042        @Nonnull
043        public RockerOfDpaFlow withCookie(long value) {
044                this.cookie = value;
045                return this;
046        }
047
048        @Nonnull
049        public RockerOfDpaFlow withHits(long value) {
050                this.hits = value;
051                return this;
052        }
053
054        @Nonnull
055        public RockerOfDpaFlow withKey(RockerOfDpaFlowKey value) {
056                this.key = value;
057                return this;
058        }
059
060        @Nonnull
061        public RockerOfDpaFlow withMask(RockerOfDpaFlowMask value) {
062                this.mask = value;
063                return this;
064        }
065
066        @Nonnull
067        public RockerOfDpaFlow withAction(RockerOfDpaFlowAction value) {
068                this.action = value;
069                return this;
070        }
071
072        public RockerOfDpaFlow() {
073        }
074
075        public RockerOfDpaFlow(long cookie, long hits, RockerOfDpaFlowKey key, RockerOfDpaFlowMask mask, RockerOfDpaFlowAction action) {
076                this.cookie = cookie;
077                this.hits = hits;
078                this.key = key;
079                this.mask = mask;
080                this.action = action;
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("cookie");
088                names.add("hits");
089                names.add("key");
090                names.add("mask");
091                names.add("action");
092                return names;
093        }
094
095        @Override
096        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
097                if ("cookie".equals(name))
098                        return cookie;
099                if ("hits".equals(name))
100                        return hits;
101                if ("key".equals(name))
102                        return key;
103                if ("mask".equals(name))
104                        return mask;
105                if ("action".equals(name))
106                        return action;
107                return super.getFieldByName(name);
108        }
109}