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=RockerOfDpaGroup, data={id=uint32, type=uint8, *vlan-id=uint16, *pport=uint32, *index=uint32, *out-pport=uint32, *group-id=uint32, *set-vlan-id=uint16, *pop-vlan=uint8, *group-ids=[uint32], *set-eth-src=str, *set-eth-dst=str, *ttl-check=uint8}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=RockerOfDpaGroup, data={id=uint32, type=uint8, *vlan-id=uint16, *pport=uint32, *index=uint32, *out-pport=uint32, *group-id=uint32, *set-vlan-id=uint16, *pop-vlan=uint8, *group-ids=[uint32], *set-eth-src=str, *set-eth-dst=str, *ttl-check=uint8}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class RockerOfDpaGroup extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("id")
023        @Nonnull
024        public long id;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("type")
027        @Nonnull
028        public char type;
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("pport")
035        @CheckForNull
036        public java.lang.Long pport;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("index")
039        @CheckForNull
040        public java.lang.Long index;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("out-pport")
043        @CheckForNull
044        public java.lang.Long outPport;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("group-id")
047        @CheckForNull
048        public java.lang.Long groupId;
049        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
050        @JsonProperty("set-vlan-id")
051        @CheckForNull
052        public java.lang.Integer setVlanId;
053        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
054        @JsonProperty("pop-vlan")
055        @CheckForNull
056        public char popVlan;
057        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
058        @JsonProperty("group-ids")
059        @CheckForNull
060        public java.util.List<java.lang.Long> groupIds;
061        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
062        @JsonProperty("set-eth-src")
063        @CheckForNull
064        public java.lang.String setEthSrc;
065        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
066        @JsonProperty("set-eth-dst")
067        @CheckForNull
068        public java.lang.String setEthDst;
069        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
070        @JsonProperty("ttl-check")
071        @CheckForNull
072        public char ttlCheck;
073
074        @Nonnull
075        public RockerOfDpaGroup withId(long value) {
076                this.id = value;
077                return this;
078        }
079
080        @Nonnull
081        public RockerOfDpaGroup withType(char value) {
082                this.type = value;
083                return this;
084        }
085
086        @Nonnull
087        public RockerOfDpaGroup withVlanId(java.lang.Integer value) {
088                this.vlanId = value;
089                return this;
090        }
091
092        @Nonnull
093        public RockerOfDpaGroup withPport(java.lang.Long value) {
094                this.pport = value;
095                return this;
096        }
097
098        @Nonnull
099        public RockerOfDpaGroup withIndex(java.lang.Long value) {
100                this.index = value;
101                return this;
102        }
103
104        @Nonnull
105        public RockerOfDpaGroup withOutPport(java.lang.Long value) {
106                this.outPport = value;
107                return this;
108        }
109
110        @Nonnull
111        public RockerOfDpaGroup withGroupId(java.lang.Long value) {
112                this.groupId = value;
113                return this;
114        }
115
116        @Nonnull
117        public RockerOfDpaGroup withSetVlanId(java.lang.Integer value) {
118                this.setVlanId = value;
119                return this;
120        }
121
122        @Nonnull
123        public RockerOfDpaGroup withPopVlan(char value) {
124                this.popVlan = value;
125                return this;
126        }
127
128        @Nonnull
129        public RockerOfDpaGroup withGroupIds(java.util.List<java.lang.Long> value) {
130                this.groupIds = value;
131                return this;
132        }
133
134        @Nonnull
135        public RockerOfDpaGroup withSetEthSrc(java.lang.String value) {
136                this.setEthSrc = value;
137                return this;
138        }
139
140        @Nonnull
141        public RockerOfDpaGroup withSetEthDst(java.lang.String value) {
142                this.setEthDst = value;
143                return this;
144        }
145
146        @Nonnull
147        public RockerOfDpaGroup withTtlCheck(char value) {
148                this.ttlCheck = value;
149                return this;
150        }
151
152        public RockerOfDpaGroup() {
153        }
154
155        public RockerOfDpaGroup(long id, char type, java.lang.Integer vlanId, java.lang.Long pport, java.lang.Long index, java.lang.Long outPport, java.lang.Long groupId, java.lang.Integer setVlanId, char popVlan, java.util.List<java.lang.Long> groupIds, java.lang.String setEthSrc, java.lang.String setEthDst, char ttlCheck) {
156                this.id = id;
157                this.type = type;
158                this.vlanId = vlanId;
159                this.pport = pport;
160                this.index = index;
161                this.outPport = outPport;
162                this.groupId = groupId;
163                this.setVlanId = setVlanId;
164                this.popVlan = popVlan;
165                this.groupIds = groupIds;
166                this.setEthSrc = setEthSrc;
167                this.setEthDst = setEthDst;
168                this.ttlCheck = ttlCheck;
169        }
170
171        @JsonIgnore
172        @Override
173        public java.util.List<java.lang.String> getFieldNames() {
174                java.util.List<java.lang.String> names = super.getFieldNames();
175                names.add("id");
176                names.add("type");
177                names.add("vlan-id");
178                names.add("pport");
179                names.add("index");
180                names.add("out-pport");
181                names.add("group-id");
182                names.add("set-vlan-id");
183                names.add("pop-vlan");
184                names.add("group-ids");
185                names.add("set-eth-src");
186                names.add("set-eth-dst");
187                names.add("ttl-check");
188                return names;
189        }
190
191        @Override
192        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
193                if ("id".equals(name))
194                        return id;
195                if ("type".equals(name))
196                        return type;
197                if ("vlan-id".equals(name))
198                        return vlanId;
199                if ("pport".equals(name))
200                        return pport;
201                if ("index".equals(name))
202                        return index;
203                if ("out-pport".equals(name))
204                        return outPport;
205                if ("group-id".equals(name))
206                        return groupId;
207                if ("set-vlan-id".equals(name))
208                        return setVlanId;
209                if ("pop-vlan".equals(name))
210                        return popVlan;
211                if ("group-ids".equals(name))
212                        return groupIds;
213                if ("set-eth-src".equals(name))
214                        return setEthSrc;
215                if ("set-eth-dst".equals(name))
216                        return setEthDst;
217                if ("ttl-check".equals(name))
218                        return ttlCheck;
219                return super.getFieldByName(name);
220        }
221}