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=RockerOfDpaFlowKey, data={priority=uint32, tbl-id=uint32, *in-pport=uint32, *tunnel-id=uint32, *vlan-id=uint16, *eth-type=uint16, *eth-src=str, *eth-dst=str, *ip-proto=uint8, *ip-tos=uint8, *ip-dst=str}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=RockerOfDpaFlowKey, data={priority=uint32, tbl-id=uint32, *in-pport=uint32, *tunnel-id=uint32, *vlan-id=uint16, *eth-type=uint16, *eth-src=str, *eth-dst=str, *ip-proto=uint8, *ip-tos=uint8, *ip-dst=str}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class RockerOfDpaFlowKey extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("priority")
023        @Nonnull
024        public long priority;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("tbl-id")
027        @Nonnull
028        public long tblId;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("in-pport")
031        @CheckForNull
032        public java.lang.Long inPport;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("tunnel-id")
035        @CheckForNull
036        public java.lang.Long tunnelId;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("vlan-id")
039        @CheckForNull
040        public java.lang.Integer vlanId;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("eth-type")
043        @CheckForNull
044        public java.lang.Integer ethType;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("eth-src")
047        @CheckForNull
048        public java.lang.String ethSrc;
049        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
050        @JsonProperty("eth-dst")
051        @CheckForNull
052        public java.lang.String ethDst;
053        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
054        @JsonProperty("ip-proto")
055        @CheckForNull
056        public char ipProto;
057        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
058        @JsonProperty("ip-tos")
059        @CheckForNull
060        public char ipTos;
061        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
062        @JsonProperty("ip-dst")
063        @CheckForNull
064        public java.lang.String ipDst;
065
066        @Nonnull
067        public RockerOfDpaFlowKey withPriority(long value) {
068                this.priority = value;
069                return this;
070        }
071
072        @Nonnull
073        public RockerOfDpaFlowKey withTblId(long value) {
074                this.tblId = value;
075                return this;
076        }
077
078        @Nonnull
079        public RockerOfDpaFlowKey withInPport(java.lang.Long value) {
080                this.inPport = value;
081                return this;
082        }
083
084        @Nonnull
085        public RockerOfDpaFlowKey withTunnelId(java.lang.Long value) {
086                this.tunnelId = value;
087                return this;
088        }
089
090        @Nonnull
091        public RockerOfDpaFlowKey withVlanId(java.lang.Integer value) {
092                this.vlanId = value;
093                return this;
094        }
095
096        @Nonnull
097        public RockerOfDpaFlowKey withEthType(java.lang.Integer value) {
098                this.ethType = value;
099                return this;
100        }
101
102        @Nonnull
103        public RockerOfDpaFlowKey withEthSrc(java.lang.String value) {
104                this.ethSrc = value;
105                return this;
106        }
107
108        @Nonnull
109        public RockerOfDpaFlowKey withEthDst(java.lang.String value) {
110                this.ethDst = value;
111                return this;
112        }
113
114        @Nonnull
115        public RockerOfDpaFlowKey withIpProto(char value) {
116                this.ipProto = value;
117                return this;
118        }
119
120        @Nonnull
121        public RockerOfDpaFlowKey withIpTos(char value) {
122                this.ipTos = value;
123                return this;
124        }
125
126        @Nonnull
127        public RockerOfDpaFlowKey withIpDst(java.lang.String value) {
128                this.ipDst = value;
129                return this;
130        }
131
132        public RockerOfDpaFlowKey() {
133        }
134
135        public RockerOfDpaFlowKey(long priority, long tblId, java.lang.Long inPport, java.lang.Long tunnelId, java.lang.Integer vlanId, java.lang.Integer ethType, java.lang.String ethSrc, java.lang.String ethDst, char ipProto, char ipTos, java.lang.String ipDst) {
136                this.priority = priority;
137                this.tblId = tblId;
138                this.inPport = inPport;
139                this.tunnelId = tunnelId;
140                this.vlanId = vlanId;
141                this.ethType = ethType;
142                this.ethSrc = ethSrc;
143                this.ethDst = ethDst;
144                this.ipProto = ipProto;
145                this.ipTos = ipTos;
146                this.ipDst = ipDst;
147        }
148
149        @JsonIgnore
150        @Override
151        public java.util.List<java.lang.String> getFieldNames() {
152                java.util.List<java.lang.String> names = super.getFieldNames();
153                names.add("priority");
154                names.add("tbl-id");
155                names.add("in-pport");
156                names.add("tunnel-id");
157                names.add("vlan-id");
158                names.add("eth-type");
159                names.add("eth-src");
160                names.add("eth-dst");
161                names.add("ip-proto");
162                names.add("ip-tos");
163                names.add("ip-dst");
164                return names;
165        }
166
167        @Override
168        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
169                if ("priority".equals(name))
170                        return priority;
171                if ("tbl-id".equals(name))
172                        return tblId;
173                if ("in-pport".equals(name))
174                        return inPport;
175                if ("tunnel-id".equals(name))
176                        return tunnelId;
177                if ("vlan-id".equals(name))
178                        return vlanId;
179                if ("eth-type".equals(name))
180                        return ethType;
181                if ("eth-src".equals(name))
182                        return ethSrc;
183                if ("eth-dst".equals(name))
184                        return ethDst;
185                if ("ip-proto".equals(name))
186                        return ipProto;
187                if ("ip-tos".equals(name))
188                        return ipTos;
189                if ("ip-dst".equals(name))
190                        return ipDst;
191                return super.getFieldByName(name);
192        }
193}