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=RockerOfDpaFlowMask, data={*in-pport=uint32, *tunnel-id=uint32, *vlan-id=uint16, *eth-src=str, *eth-dst=str, *ip-proto=uint8, *ip-tos=uint8}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=RockerOfDpaFlowMask, data={*in-pport=uint32, *tunnel-id=uint32, *vlan-id=uint16, *eth-src=str, *eth-dst=str, *ip-proto=uint8, *ip-tos=uint8}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class RockerOfDpaFlowMask extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("in-pport")
023        @CheckForNull
024        public java.lang.Long inPport;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("tunnel-id")
027        @CheckForNull
028        public java.lang.Long tunnelId;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("vlan-id")
031        @CheckForNull
032        public java.lang.Integer vlanId;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("eth-src")
035        @CheckForNull
036        public java.lang.String ethSrc;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("eth-dst")
039        @CheckForNull
040        public java.lang.String ethDst;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("ip-proto")
043        @CheckForNull
044        public char ipProto;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("ip-tos")
047        @CheckForNull
048        public char ipTos;
049
050        @Nonnull
051        public RockerOfDpaFlowMask withInPport(java.lang.Long value) {
052                this.inPport = value;
053                return this;
054        }
055
056        @Nonnull
057        public RockerOfDpaFlowMask withTunnelId(java.lang.Long value) {
058                this.tunnelId = value;
059                return this;
060        }
061
062        @Nonnull
063        public RockerOfDpaFlowMask withVlanId(java.lang.Integer value) {
064                this.vlanId = value;
065                return this;
066        }
067
068        @Nonnull
069        public RockerOfDpaFlowMask withEthSrc(java.lang.String value) {
070                this.ethSrc = value;
071                return this;
072        }
073
074        @Nonnull
075        public RockerOfDpaFlowMask withEthDst(java.lang.String value) {
076                this.ethDst = value;
077                return this;
078        }
079
080        @Nonnull
081        public RockerOfDpaFlowMask withIpProto(char value) {
082                this.ipProto = value;
083                return this;
084        }
085
086        @Nonnull
087        public RockerOfDpaFlowMask withIpTos(char value) {
088                this.ipTos = value;
089                return this;
090        }
091
092        public RockerOfDpaFlowMask() {
093        }
094
095        public RockerOfDpaFlowMask(java.lang.Long inPport, java.lang.Long tunnelId, java.lang.Integer vlanId, java.lang.String ethSrc, java.lang.String ethDst, char ipProto, char ipTos) {
096                this.inPport = inPport;
097                this.tunnelId = tunnelId;
098                this.vlanId = vlanId;
099                this.ethSrc = ethSrc;
100                this.ethDst = ethDst;
101                this.ipProto = ipProto;
102                this.ipTos = ipTos;
103        }
104
105        @JsonIgnore
106        @Override
107        public java.util.List<java.lang.String> getFieldNames() {
108                java.util.List<java.lang.String> names = super.getFieldNames();
109                names.add("in-pport");
110                names.add("tunnel-id");
111                names.add("vlan-id");
112                names.add("eth-src");
113                names.add("eth-dst");
114                names.add("ip-proto");
115                names.add("ip-tos");
116                return names;
117        }
118
119        @Override
120        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
121                if ("in-pport".equals(name))
122                        return inPport;
123                if ("tunnel-id".equals(name))
124                        return tunnelId;
125                if ("vlan-id".equals(name))
126                        return vlanId;
127                if ("eth-src".equals(name))
128                        return ethSrc;
129                if ("eth-dst".equals(name))
130                        return ethDst;
131                if ("ip-proto".equals(name))
132                        return ipProto;
133                if ("ip-tos".equals(name))
134                        return ipTos;
135                return super.getFieldByName(name);
136        }
137}