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=NetdevL2TPv3Options, data={src=str, dst=str, *srcport=str, *dstport=str, *ipv6=bool, *udp=bool, *cookie64=bool, *counter=bool, *pincounter=bool, *txcookie=uint64, *rxcookie=uint64, txsession=uint32, *rxsession=uint32, *offset=uint32}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=NetdevL2TPv3Options, data={src=str, dst=str, *srcport=str, *dstport=str, *ipv6=bool, *udp=bool, *cookie64=bool, *counter=bool, *pincounter=bool, *txcookie=uint64, *rxcookie=uint64, txsession=uint32, *rxsession=uint32, *offset=uint32}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class NetdevL2TPv3Options extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("src")
023        @Nonnull
024        public java.lang.String src;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("dst")
027        @Nonnull
028        public java.lang.String dst;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("srcport")
031        @CheckForNull
032        public java.lang.String srcport;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("dstport")
035        @CheckForNull
036        public java.lang.String dstport;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("ipv6")
039        @CheckForNull
040        public java.lang.Boolean ipv6;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("udp")
043        @CheckForNull
044        public java.lang.Boolean udp;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("cookie64")
047        @CheckForNull
048        public java.lang.Boolean cookie64;
049        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
050        @JsonProperty("counter")
051        @CheckForNull
052        public java.lang.Boolean counter;
053        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
054        @JsonProperty("pincounter")
055        @CheckForNull
056        public java.lang.Boolean pincounter;
057        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
058        @JsonProperty("txcookie")
059        @CheckForNull
060        public java.lang.Long txcookie;
061        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
062        @JsonProperty("rxcookie")
063        @CheckForNull
064        public java.lang.Long rxcookie;
065        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
066        @JsonProperty("txsession")
067        @Nonnull
068        public long txsession;
069        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
070        @JsonProperty("rxsession")
071        @CheckForNull
072        public java.lang.Long rxsession;
073        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
074        @JsonProperty("offset")
075        @CheckForNull
076        public java.lang.Long offset;
077
078        @Nonnull
079        public NetdevL2TPv3Options withSrc(java.lang.String value) {
080                this.src = value;
081                return this;
082        }
083
084        @Nonnull
085        public NetdevL2TPv3Options withDst(java.lang.String value) {
086                this.dst = value;
087                return this;
088        }
089
090        @Nonnull
091        public NetdevL2TPv3Options withSrcport(java.lang.String value) {
092                this.srcport = value;
093                return this;
094        }
095
096        @Nonnull
097        public NetdevL2TPv3Options withDstport(java.lang.String value) {
098                this.dstport = value;
099                return this;
100        }
101
102        @Nonnull
103        public NetdevL2TPv3Options withIpv6(java.lang.Boolean value) {
104                this.ipv6 = value;
105                return this;
106        }
107
108        @Nonnull
109        public NetdevL2TPv3Options withUdp(java.lang.Boolean value) {
110                this.udp = value;
111                return this;
112        }
113
114        @Nonnull
115        public NetdevL2TPv3Options withCookie64(java.lang.Boolean value) {
116                this.cookie64 = value;
117                return this;
118        }
119
120        @Nonnull
121        public NetdevL2TPv3Options withCounter(java.lang.Boolean value) {
122                this.counter = value;
123                return this;
124        }
125
126        @Nonnull
127        public NetdevL2TPv3Options withPincounter(java.lang.Boolean value) {
128                this.pincounter = value;
129                return this;
130        }
131
132        @Nonnull
133        public NetdevL2TPv3Options withTxcookie(java.lang.Long value) {
134                this.txcookie = value;
135                return this;
136        }
137
138        @Nonnull
139        public NetdevL2TPv3Options withRxcookie(java.lang.Long value) {
140                this.rxcookie = value;
141                return this;
142        }
143
144        @Nonnull
145        public NetdevL2TPv3Options withTxsession(long value) {
146                this.txsession = value;
147                return this;
148        }
149
150        @Nonnull
151        public NetdevL2TPv3Options withRxsession(java.lang.Long value) {
152                this.rxsession = value;
153                return this;
154        }
155
156        @Nonnull
157        public NetdevL2TPv3Options withOffset(java.lang.Long value) {
158                this.offset = value;
159                return this;
160        }
161
162        public NetdevL2TPv3Options() {
163        }
164
165        public NetdevL2TPv3Options(java.lang.String src, java.lang.String dst, java.lang.String srcport, java.lang.String dstport, java.lang.Boolean ipv6, java.lang.Boolean udp, java.lang.Boolean cookie64, java.lang.Boolean counter, java.lang.Boolean pincounter, java.lang.Long txcookie, java.lang.Long rxcookie, long txsession, java.lang.Long rxsession, java.lang.Long offset) {
166                this.src = src;
167                this.dst = dst;
168                this.srcport = srcport;
169                this.dstport = dstport;
170                this.ipv6 = ipv6;
171                this.udp = udp;
172                this.cookie64 = cookie64;
173                this.counter = counter;
174                this.pincounter = pincounter;
175                this.txcookie = txcookie;
176                this.rxcookie = rxcookie;
177                this.txsession = txsession;
178                this.rxsession = rxsession;
179                this.offset = offset;
180        }
181
182        @JsonIgnore
183        @Override
184        public java.util.List<java.lang.String> getFieldNames() {
185                java.util.List<java.lang.String> names = super.getFieldNames();
186                names.add("src");
187                names.add("dst");
188                names.add("srcport");
189                names.add("dstport");
190                names.add("ipv6");
191                names.add("udp");
192                names.add("cookie64");
193                names.add("counter");
194                names.add("pincounter");
195                names.add("txcookie");
196                names.add("rxcookie");
197                names.add("txsession");
198                names.add("rxsession");
199                names.add("offset");
200                return names;
201        }
202
203        @Override
204        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
205                if ("src".equals(name))
206                        return src;
207                if ("dst".equals(name))
208                        return dst;
209                if ("srcport".equals(name))
210                        return srcport;
211                if ("dstport".equals(name))
212                        return dstport;
213                if ("ipv6".equals(name))
214                        return ipv6;
215                if ("udp".equals(name))
216                        return udp;
217                if ("cookie64".equals(name))
218                        return cookie64;
219                if ("counter".equals(name))
220                        return counter;
221                if ("pincounter".equals(name))
222                        return pincounter;
223                if ("txcookie".equals(name))
224                        return txcookie;
225                if ("rxcookie".equals(name))
226                        return rxcookie;
227                if ("txsession".equals(name))
228                        return txsession;
229                if ("rxsession".equals(name))
230                        return rxsession;
231                if ("offset".equals(name))
232                        return offset;
233                return super.getFieldByName(name);
234        }
235}