2 * Autogenerated by Thrift Compiler (0.9.3)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
7 package org.opendaylight.netvirt.bgpmanager.thrift.gen;
8 import org.apache.thrift.scheme.IScheme;
9 import org.apache.thrift.scheme.SchemeFactory;
10 import org.apache.thrift.scheme.StandardScheme;
12 import org.apache.thrift.scheme.TupleScheme;
13 import org.apache.thrift.protocol.TTupleProtocol;
14 import org.apache.thrift.protocol.TProtocolException;
15 import org.apache.thrift.EncodingUtils;
16 import org.apache.thrift.TException;
17 import org.apache.thrift.async.AsyncMethodCallback;
18 import org.apache.thrift.server.AbstractNonblockingServer.*;
19 import java.util.List;
20 import java.util.ArrayList;
22 import java.util.HashMap;
23 import java.util.EnumMap;
25 import java.util.HashSet;
26 import java.util.EnumSet;
27 import java.util.Collections;
28 import java.util.BitSet;
29 import java.nio.ByteBuffer;
30 import java.util.Arrays;
31 import javax.annotation.Generated;
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
35 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
36 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-09-13")
37 public class Update implements org.apache.thrift.TBase<Update, Update._Fields>, java.io.Serializable, Cloneable, Comparable<Update> {
38 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Update");
40 private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
41 private static final org.apache.thrift.protocol.TField RESERVED_FIELD_DESC = new org.apache.thrift.protocol.TField("reserved", org.apache.thrift.protocol.TType.I32, (short)2);
42 private static final org.apache.thrift.protocol.TField PREFIXLEN_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixlen", org.apache.thrift.protocol.TType.I32, (short)3);
43 private static final org.apache.thrift.protocol.TField L3LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l3label", org.apache.thrift.protocol.TType.I32, (short)4);
44 private static final org.apache.thrift.protocol.TField L2LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2label", org.apache.thrift.protocol.TType.I32, (short)5);
45 private static final org.apache.thrift.protocol.TField ETHTAG_FIELD_DESC = new org.apache.thrift.protocol.TField("ethtag", org.apache.thrift.protocol.TType.I32, (short)6);
46 private static final org.apache.thrift.protocol.TField ESI_FIELD_DESC = new org.apache.thrift.protocol.TField("esi", org.apache.thrift.protocol.TType.STRING, (short)7);
47 private static final org.apache.thrift.protocol.TField MACADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("macaddress", org.apache.thrift.protocol.TType.STRING, (short)8);
48 private static final org.apache.thrift.protocol.TField RD_FIELD_DESC = new org.apache.thrift.protocol.TField("rd", org.apache.thrift.protocol.TType.STRING, (short)9);
49 private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)10);
50 private static final org.apache.thrift.protocol.TField NEXTHOP_FIELD_DESC = new org.apache.thrift.protocol.TField("nexthop", org.apache.thrift.protocol.TType.STRING, (short)11);
51 private static final org.apache.thrift.protocol.TField ROUTERMAC_FIELD_DESC = new org.apache.thrift.protocol.TField("routermac", org.apache.thrift.protocol.TType.STRING, (short)12);
53 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
55 schemes.put(StandardScheme.class, new UpdateStandardSchemeFactory());
56 schemes.put(TupleScheme.class, new UpdateTupleSchemeFactory());
59 public int type; // required
60 public int reserved; // required
61 public int prefixlen; // required
62 public int l3label; // required
63 public int l2label; // required
64 public int ethtag; // required
65 public String esi; // required
66 public String macaddress; // required
67 public String rd; // required
68 public String prefix; // required
69 public String nexthop; // required
70 public String routermac; // required
72 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
73 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
74 TYPE((short)1, "type"),
75 RESERVED((short)2, "reserved"),
76 PREFIXLEN((short)3, "prefixlen"),
77 L3LABEL((short)4, "l3label"),
78 L2LABEL((short)5, "l2label"),
79 ETHTAG((short)6, "ethtag"),
81 MACADDRESS((short)8, "macaddress"),
83 PREFIX((short)10, "prefix"),
84 NEXTHOP((short)11, "nexthop"),
85 ROUTERMAC((short)12, "routermac");
87 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
90 for (_Fields field : EnumSet.allOf(_Fields.class)) {
91 byName.put(field.getFieldName(), field);
96 * Find the _Fields constant that matches fieldId, or null if its not found.
98 public static _Fields findByThriftId(int fieldId) {
114 case 8: // MACADDRESS
122 case 12: // ROUTERMAC
130 * Find the _Fields constant that matches fieldId, throwing an exception
131 * if it is not found.
133 public static _Fields findByThriftIdOrThrow(int fieldId) {
134 _Fields fields = findByThriftId(fieldId);
135 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
140 * Find the _Fields constant that matches name, or null if its not found.
142 public static _Fields findByName(String name) {
143 return byName.get(name);
146 private final short _thriftId;
147 private final String _fieldName;
149 _Fields(short thriftId, String fieldName) {
150 _thriftId = thriftId;
151 _fieldName = fieldName;
154 public short getThriftFieldId() {
158 public String getFieldName() {
163 // isset id assignments
164 private static final int __TYPE_ISSET_ID = 0;
165 private static final int __RESERVED_ISSET_ID = 1;
166 private static final int __PREFIXLEN_ISSET_ID = 2;
167 private static final int __L3LABEL_ISSET_ID = 3;
168 private static final int __L2LABEL_ISSET_ID = 4;
169 private static final int __ETHTAG_ISSET_ID = 5;
170 private byte __isset_bitfield = 0;
171 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
173 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
174 tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
175 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
176 tmpMap.put(_Fields.RESERVED, new org.apache.thrift.meta_data.FieldMetaData("reserved", org.apache.thrift.TFieldRequirementType.DEFAULT,
177 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
178 tmpMap.put(_Fields.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT,
179 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
180 tmpMap.put(_Fields.L3LABEL, new org.apache.thrift.meta_data.FieldMetaData("l3label", org.apache.thrift.TFieldRequirementType.DEFAULT,
181 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
182 tmpMap.put(_Fields.L2LABEL, new org.apache.thrift.meta_data.FieldMetaData("l2label", org.apache.thrift.TFieldRequirementType.DEFAULT,
183 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
184 tmpMap.put(_Fields.ETHTAG, new org.apache.thrift.meta_data.FieldMetaData("ethtag", org.apache.thrift.TFieldRequirementType.DEFAULT,
185 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
186 tmpMap.put(_Fields.ESI, new org.apache.thrift.meta_data.FieldMetaData("esi", org.apache.thrift.TFieldRequirementType.DEFAULT,
187 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
188 tmpMap.put(_Fields.MACADDRESS, new org.apache.thrift.meta_data.FieldMetaData("macaddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
189 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
190 tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
191 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
192 tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
193 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
194 tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT,
195 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
196 tmpMap.put(_Fields.ROUTERMAC, new org.apache.thrift.meta_data.FieldMetaData("routermac", org.apache.thrift.TFieldRequirementType.DEFAULT,
197 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
198 metaDataMap = Collections.unmodifiableMap(tmpMap);
199 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Update.class, metaDataMap);
222 this.reserved = reserved;
223 setReservedIsSet(true);
224 this.prefixlen = prefixlen;
225 setPrefixlenIsSet(true);
226 this.l3label = l3label;
227 setL3labelIsSet(true);
228 this.l2label = l2label;
229 setL2labelIsSet(true);
230 this.ethtag = ethtag;
231 setEthtagIsSet(true);
233 this.macaddress = macaddress;
235 this.prefix = prefix;
236 this.nexthop = nexthop;
237 this.routermac = routermac;
241 * Performs a deep copy on <i>other</i>.
243 public Update(Update other) {
244 __isset_bitfield = other.__isset_bitfield;
245 this.type = other.type;
246 this.reserved = other.reserved;
247 this.prefixlen = other.prefixlen;
248 this.l3label = other.l3label;
249 this.l2label = other.l2label;
250 this.ethtag = other.ethtag;
251 if (other.isSetEsi()) {
252 this.esi = other.esi;
254 if (other.isSetMacaddress()) {
255 this.macaddress = other.macaddress;
257 if (other.isSetRd()) {
260 if (other.isSetPrefix()) {
261 this.prefix = other.prefix;
263 if (other.isSetNexthop()) {
264 this.nexthop = other.nexthop;
266 if (other.isSetRoutermac()) {
267 this.routermac = other.routermac;
271 public Update deepCopy() {
272 return new Update(this);
276 public void clear() {
279 setReservedIsSet(false);
281 setPrefixlenIsSet(false);
283 setL3labelIsSet(false);
285 setL2labelIsSet(false);
287 setEthtagIsSet(false);
290 this.macaddress = null;
294 this.routermac = null;
297 public int getType() {
301 public Update setType(int type) {
307 public void unsetType() {
308 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
311 /** Returns true if field type is set (has been assigned a value) and false otherwise */
312 public boolean isSetType() {
313 return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
316 public void setTypeIsSet(boolean value) {
317 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
320 public int getReserved() {
321 return this.reserved;
324 public Update setReserved(int reserved) {
325 this.reserved = reserved;
326 setReservedIsSet(true);
330 public void unsetReserved() {
331 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESERVED_ISSET_ID);
334 /** Returns true if field reserved is set (has been assigned a value) and false otherwise */
335 public boolean isSetReserved() {
336 return EncodingUtils.testBit(__isset_bitfield, __RESERVED_ISSET_ID);
339 public void setReservedIsSet(boolean value) {
340 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVED_ISSET_ID, value);
343 public int getPrefixlen() {
344 return this.prefixlen;
347 public Update setPrefixlen(int prefixlen) {
348 this.prefixlen = prefixlen;
349 setPrefixlenIsSet(true);
353 public void unsetPrefixlen() {
354 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
357 /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
358 public boolean isSetPrefixlen() {
359 return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
362 public void setPrefixlenIsSet(boolean value) {
363 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
366 public int getL3label() {
370 public Update setL3label(int l3label) {
371 this.l3label = l3label;
372 setL3labelIsSet(true);
376 public void unsetL3label() {
377 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __L3LABEL_ISSET_ID);
380 /** Returns true if field l3label is set (has been assigned a value) and false otherwise */
381 public boolean isSetL3label() {
382 return EncodingUtils.testBit(__isset_bitfield, __L3LABEL_ISSET_ID);
385 public void setL3labelIsSet(boolean value) {
386 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L3LABEL_ISSET_ID, value);
389 public int getL2label() {
393 public Update setL2label(int l2label) {
394 this.l2label = l2label;
395 setL2labelIsSet(true);
399 public void unsetL2label() {
400 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __L2LABEL_ISSET_ID);
403 /** Returns true if field l2label is set (has been assigned a value) and false otherwise */
404 public boolean isSetL2label() {
405 return EncodingUtils.testBit(__isset_bitfield, __L2LABEL_ISSET_ID);
408 public void setL2labelIsSet(boolean value) {
409 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __L2LABEL_ISSET_ID, value);
412 public int getEthtag() {
416 public Update setEthtag(int ethtag) {
417 this.ethtag = ethtag;
418 setEthtagIsSet(true);
422 public void unsetEthtag() {
423 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ETHTAG_ISSET_ID);
426 /** Returns true if field ethtag is set (has been assigned a value) and false otherwise */
427 public boolean isSetEthtag() {
428 return EncodingUtils.testBit(__isset_bitfield, __ETHTAG_ISSET_ID);
431 public void setEthtagIsSet(boolean value) {
432 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ETHTAG_ISSET_ID, value);
435 public String getEsi() {
439 public Update setEsi(String esi) {
444 public void unsetEsi() {
448 /** Returns true if field esi is set (has been assigned a value) and false otherwise */
449 public boolean isSetEsi() {
450 return this.esi != null;
453 public void setEsiIsSet(boolean value) {
459 public String getMacaddress() {
460 return this.macaddress;
463 public Update setMacaddress(String macaddress) {
464 this.macaddress = macaddress;
468 public void unsetMacaddress() {
469 this.macaddress = null;
472 /** Returns true if field macaddress is set (has been assigned a value) and false otherwise */
473 public boolean isSetMacaddress() {
474 return this.macaddress != null;
477 public void setMacaddressIsSet(boolean value) {
479 this.macaddress = null;
483 public String getRd() {
487 public Update setRd(String rd) {
492 public void unsetRd() {
496 /** Returns true if field rd is set (has been assigned a value) and false otherwise */
497 public boolean isSetRd() {
498 return this.rd != null;
501 public void setRdIsSet(boolean value) {
507 public String getPrefix() {
511 public Update setPrefix(String prefix) {
512 this.prefix = prefix;
516 public void unsetPrefix() {
520 /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
521 public boolean isSetPrefix() {
522 return this.prefix != null;
525 public void setPrefixIsSet(boolean value) {
531 public String getNexthop() {
535 public Update setNexthop(String nexthop) {
536 this.nexthop = nexthop;
540 public void unsetNexthop() {
544 /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
545 public boolean isSetNexthop() {
546 return this.nexthop != null;
549 public void setNexthopIsSet(boolean value) {
555 public String getRoutermac() {
556 return this.routermac;
559 public Update setRoutermac(String routermac) {
560 this.routermac = routermac;
564 public void unsetRoutermac() {
565 this.routermac = null;
568 /** Returns true if field routermac is set (has been assigned a value) and false otherwise */
569 public boolean isSetRoutermac() {
570 return this.routermac != null;
573 public void setRoutermacIsSet(boolean value) {
575 this.routermac = null;
579 public void setFieldValue(_Fields field, Object value) {
585 setType((Integer)value);
593 setReserved((Integer)value);
601 setPrefixlen((Integer)value);
609 setL3label((Integer)value);
617 setL2label((Integer)value);
625 setEthtag((Integer)value);
633 setEsi((String)value);
641 setMacaddress((String)value);
649 setRd((String)value);
657 setPrefix((String)value);
665 setNexthop((String)value);
673 setRoutermac((String)value);
680 public Object getFieldValue(_Fields field) {
683 return Integer.valueOf(getType());
686 return Integer.valueOf(getReserved());
689 return Integer.valueOf(getPrefixlen());
692 return Integer.valueOf(getL3label());
695 return Integer.valueOf(getL2label());
698 return Integer.valueOf(getEthtag());
704 return getMacaddress();
716 return getRoutermac();
719 throw new IllegalStateException();
722 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
723 public boolean isSet(_Fields field) {
725 throw new IllegalArgumentException();
732 return isSetReserved();
734 return isSetPrefixlen();
736 return isSetL3label();
738 return isSetL2label();
740 return isSetEthtag();
744 return isSetMacaddress();
748 return isSetPrefix();
750 return isSetNexthop();
752 return isSetRoutermac();
754 throw new IllegalStateException();
758 public boolean equals(Object that) {
761 if (that instanceof Update)
762 return this.equals((Update)that);
766 public boolean equals(Update that) {
770 boolean this_present_type = true;
771 boolean that_present_type = true;
772 if (this_present_type || that_present_type) {
773 if (!(this_present_type && that_present_type))
775 if (this.type != that.type)
779 boolean this_present_reserved = true;
780 boolean that_present_reserved = true;
781 if (this_present_reserved || that_present_reserved) {
782 if (!(this_present_reserved && that_present_reserved))
784 if (this.reserved != that.reserved)
788 boolean this_present_prefixlen = true;
789 boolean that_present_prefixlen = true;
790 if (this_present_prefixlen || that_present_prefixlen) {
791 if (!(this_present_prefixlen && that_present_prefixlen))
793 if (this.prefixlen != that.prefixlen)
797 boolean this_present_l3label = true;
798 boolean that_present_l3label = true;
799 if (this_present_l3label || that_present_l3label) {
800 if (!(this_present_l3label && that_present_l3label))
802 if (this.l3label != that.l3label)
806 boolean this_present_l2label = true;
807 boolean that_present_l2label = true;
808 if (this_present_l2label || that_present_l2label) {
809 if (!(this_present_l2label && that_present_l2label))
811 if (this.l2label != that.l2label)
815 boolean this_present_ethtag = true;
816 boolean that_present_ethtag = true;
817 if (this_present_ethtag || that_present_ethtag) {
818 if (!(this_present_ethtag && that_present_ethtag))
820 if (this.ethtag != that.ethtag)
824 boolean this_present_esi = true && this.isSetEsi();
825 boolean that_present_esi = true && that.isSetEsi();
826 if (this_present_esi || that_present_esi) {
827 if (!(this_present_esi && that_present_esi))
829 if (!this.esi.equals(that.esi))
833 boolean this_present_macaddress = true && this.isSetMacaddress();
834 boolean that_present_macaddress = true && that.isSetMacaddress();
835 if (this_present_macaddress || that_present_macaddress) {
836 if (!(this_present_macaddress && that_present_macaddress))
838 if (!this.macaddress.equals(that.macaddress))
842 boolean this_present_rd = true && this.isSetRd();
843 boolean that_present_rd = true && that.isSetRd();
844 if (this_present_rd || that_present_rd) {
845 if (!(this_present_rd && that_present_rd))
847 if (!this.rd.equals(that.rd))
851 boolean this_present_prefix = true && this.isSetPrefix();
852 boolean that_present_prefix = true && that.isSetPrefix();
853 if (this_present_prefix || that_present_prefix) {
854 if (!(this_present_prefix && that_present_prefix))
856 if (!this.prefix.equals(that.prefix))
860 boolean this_present_nexthop = true && this.isSetNexthop();
861 boolean that_present_nexthop = true && that.isSetNexthop();
862 if (this_present_nexthop || that_present_nexthop) {
863 if (!(this_present_nexthop && that_present_nexthop))
865 if (!this.nexthop.equals(that.nexthop))
869 boolean this_present_routermac = true && this.isSetRoutermac();
870 boolean that_present_routermac = true && that.isSetRoutermac();
871 if (this_present_routermac || that_present_routermac) {
872 if (!(this_present_routermac && that_present_routermac))
874 if (!this.routermac.equals(that.routermac))
882 public int hashCode() {
883 List<Object> list = new ArrayList<Object>();
884 boolean present_type = true;
885 list.add(present_type);
888 boolean present_reserved = true;
889 list.add(present_reserved);
890 if (present_reserved)
892 boolean present_prefixlen = true;
893 list.add(present_prefixlen);
894 if (present_prefixlen)
896 boolean present_l3label = true;
897 list.add(present_l3label);
900 boolean present_l2label = true;
901 list.add(present_l2label);
904 boolean present_ethtag = true;
905 list.add(present_ethtag);
908 boolean present_esi = true && (isSetEsi());
909 list.add(present_esi);
912 boolean present_macaddress = true && (isSetMacaddress());
913 list.add(present_macaddress);
914 if (present_macaddress)
915 list.add(macaddress);
916 boolean present_rd = true && (isSetRd());
917 list.add(present_rd);
920 boolean present_prefix = true && (isSetPrefix());
921 list.add(present_prefix);
924 boolean present_nexthop = true && (isSetNexthop());
925 list.add(present_nexthop);
928 boolean present_routermac = true && (isSetRoutermac());
929 list.add(present_routermac);
930 if (present_routermac)
932 return list.hashCode();
936 public int compareTo(Update other) {
937 if (!getClass().equals(other.getClass())) {
938 return getClass().getName().compareTo(other.getClass().getName());
941 int lastComparison = 0;
943 lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
944 if (lastComparison != 0) {
945 return lastComparison;
948 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
949 if (lastComparison != 0) {
950 return lastComparison;
953 lastComparison = Boolean.valueOf(isSetReserved()).compareTo(other.isSetReserved());
954 if (lastComparison != 0) {
955 return lastComparison;
957 if (isSetReserved()) {
958 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reserved, other.reserved);
959 if (lastComparison != 0) {
960 return lastComparison;
963 lastComparison = Boolean.valueOf(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
964 if (lastComparison != 0) {
965 return lastComparison;
967 if (isSetPrefixlen()) {
968 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
969 if (lastComparison != 0) {
970 return lastComparison;
973 lastComparison = Boolean.valueOf(isSetL3label()).compareTo(other.isSetL3label());
974 if (lastComparison != 0) {
975 return lastComparison;
977 if (isSetL3label()) {
978 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l3label, other.l3label);
979 if (lastComparison != 0) {
980 return lastComparison;
983 lastComparison = Boolean.valueOf(isSetL2label()).compareTo(other.isSetL2label());
984 if (lastComparison != 0) {
985 return lastComparison;
987 if (isSetL2label()) {
988 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l2label, other.l2label);
989 if (lastComparison != 0) {
990 return lastComparison;
993 lastComparison = Boolean.valueOf(isSetEthtag()).compareTo(other.isSetEthtag());
994 if (lastComparison != 0) {
995 return lastComparison;
998 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ethtag, other.ethtag);
999 if (lastComparison != 0) {
1000 return lastComparison;
1003 lastComparison = Boolean.valueOf(isSetEsi()).compareTo(other.isSetEsi());
1004 if (lastComparison != 0) {
1005 return lastComparison;
1008 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.esi, other.esi);
1009 if (lastComparison != 0) {
1010 return lastComparison;
1013 lastComparison = Boolean.valueOf(isSetMacaddress()).compareTo(other.isSetMacaddress());
1014 if (lastComparison != 0) {
1015 return lastComparison;
1017 if (isSetMacaddress()) {
1018 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.macaddress, other.macaddress);
1019 if (lastComparison != 0) {
1020 return lastComparison;
1023 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
1024 if (lastComparison != 0) {
1025 return lastComparison;
1028 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
1029 if (lastComparison != 0) {
1030 return lastComparison;
1033 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
1034 if (lastComparison != 0) {
1035 return lastComparison;
1037 if (isSetPrefix()) {
1038 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
1039 if (lastComparison != 0) {
1040 return lastComparison;
1043 lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
1044 if (lastComparison != 0) {
1045 return lastComparison;
1047 if (isSetNexthop()) {
1048 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
1049 if (lastComparison != 0) {
1050 return lastComparison;
1053 lastComparison = Boolean.valueOf(isSetRoutermac()).compareTo(other.isSetRoutermac());
1054 if (lastComparison != 0) {
1055 return lastComparison;
1057 if (isSetRoutermac()) {
1058 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routermac, other.routermac);
1059 if (lastComparison != 0) {
1060 return lastComparison;
1066 public _Fields fieldForId(int fieldId) {
1067 return _Fields.findByThriftId(fieldId);
1070 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1071 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
1074 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1075 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
1079 public String toString() {
1080 StringBuilder sb = new StringBuilder("Update(");
1081 boolean first = true;
1084 sb.append(this.type);
1086 if (!first) sb.append(", ");
1087 sb.append("reserved:");
1088 sb.append(this.reserved);
1090 if (!first) sb.append(", ");
1091 sb.append("prefixlen:");
1092 sb.append(this.prefixlen);
1094 if (!first) sb.append(", ");
1095 sb.append("l3label:");
1096 sb.append(this.l3label);
1098 if (!first) sb.append(", ");
1099 sb.append("l2label:");
1100 sb.append(this.l2label);
1102 if (!first) sb.append(", ");
1103 sb.append("ethtag:");
1104 sb.append(this.ethtag);
1106 if (!first) sb.append(", ");
1108 if (this.esi == null) {
1111 sb.append(this.esi);
1114 if (!first) sb.append(", ");
1115 sb.append("macaddress:");
1116 if (this.macaddress == null) {
1119 sb.append(this.macaddress);
1122 if (!first) sb.append(", ");
1124 if (this.rd == null) {
1130 if (!first) sb.append(", ");
1131 sb.append("prefix:");
1132 if (this.prefix == null) {
1135 sb.append(this.prefix);
1138 if (!first) sb.append(", ");
1139 sb.append("nexthop:");
1140 if (this.nexthop == null) {
1143 sb.append(this.nexthop);
1146 if (!first) sb.append(", ");
1147 sb.append("routermac:");
1148 if (this.routermac == null) {
1151 sb.append(this.routermac);
1155 return sb.toString();
1158 public void validate() throws org.apache.thrift.TException {
1159 // check for required fields
1160 // check for sub-struct validity
1163 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1165 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1166 } catch (org.apache.thrift.TException te) {
1167 throw new java.io.IOException(te);
1171 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1173 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1174 __isset_bitfield = 0;
1175 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1176 } catch (org.apache.thrift.TException te) {
1177 throw new java.io.IOException(te);
1181 private static class UpdateStandardSchemeFactory implements SchemeFactory {
1182 public UpdateStandardScheme getScheme() {
1183 return new UpdateStandardScheme();
1187 private static class UpdateStandardScheme extends StandardScheme<Update> {
1189 public void read(org.apache.thrift.protocol.TProtocol iprot, Update struct) throws org.apache.thrift.TException {
1190 org.apache.thrift.protocol.TField schemeField;
1191 iprot.readStructBegin();
1194 schemeField = iprot.readFieldBegin();
1195 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
1198 switch (schemeField.id) {
1200 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1201 struct.type = iprot.readI32();
1202 struct.setTypeIsSet(true);
1204 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1208 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1209 struct.reserved = iprot.readI32();
1210 struct.setReservedIsSet(true);
1212 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1215 case 3: // PREFIXLEN
1216 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1217 struct.prefixlen = iprot.readI32();
1218 struct.setPrefixlenIsSet(true);
1220 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1224 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1225 struct.l3label = iprot.readI32();
1226 struct.setL3labelIsSet(true);
1228 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1232 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1233 struct.l2label = iprot.readI32();
1234 struct.setL2labelIsSet(true);
1236 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1240 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1241 struct.ethtag = iprot.readI32();
1242 struct.setEthtagIsSet(true);
1244 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1248 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1249 struct.esi = iprot.readString();
1250 struct.setEsiIsSet(true);
1252 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1255 case 8: // MACADDRESS
1256 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1257 struct.macaddress = iprot.readString();
1258 struct.setMacaddressIsSet(true);
1260 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1264 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1265 struct.rd = iprot.readString();
1266 struct.setRdIsSet(true);
1268 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1272 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1273 struct.prefix = iprot.readString();
1274 struct.setPrefixIsSet(true);
1276 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1280 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1281 struct.nexthop = iprot.readString();
1282 struct.setNexthopIsSet(true);
1284 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1287 case 12: // ROUTERMAC
1288 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1289 struct.routermac = iprot.readString();
1290 struct.setRoutermacIsSet(true);
1292 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1296 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1298 iprot.readFieldEnd();
1300 iprot.readStructEnd();
1302 // check for required fields of primitive type, which can't be checked in the validate method
1306 public void write(org.apache.thrift.protocol.TProtocol oprot, Update struct) throws org.apache.thrift.TException {
1309 oprot.writeStructBegin(STRUCT_DESC);
1310 oprot.writeFieldBegin(TYPE_FIELD_DESC);
1311 oprot.writeI32(struct.type);
1312 oprot.writeFieldEnd();
1313 oprot.writeFieldBegin(RESERVED_FIELD_DESC);
1314 oprot.writeI32(struct.reserved);
1315 oprot.writeFieldEnd();
1316 oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
1317 oprot.writeI32(struct.prefixlen);
1318 oprot.writeFieldEnd();
1319 oprot.writeFieldBegin(L3LABEL_FIELD_DESC);
1320 oprot.writeI32(struct.l3label);
1321 oprot.writeFieldEnd();
1322 oprot.writeFieldBegin(L2LABEL_FIELD_DESC);
1323 oprot.writeI32(struct.l2label);
1324 oprot.writeFieldEnd();
1325 oprot.writeFieldBegin(ETHTAG_FIELD_DESC);
1326 oprot.writeI32(struct.ethtag);
1327 oprot.writeFieldEnd();
1328 if (struct.esi != null) {
1329 oprot.writeFieldBegin(ESI_FIELD_DESC);
1330 oprot.writeString(struct.esi);
1331 oprot.writeFieldEnd();
1333 if (struct.macaddress != null) {
1334 oprot.writeFieldBegin(MACADDRESS_FIELD_DESC);
1335 oprot.writeString(struct.macaddress);
1336 oprot.writeFieldEnd();
1338 if (struct.rd != null) {
1339 oprot.writeFieldBegin(RD_FIELD_DESC);
1340 oprot.writeString(struct.rd);
1341 oprot.writeFieldEnd();
1343 if (struct.prefix != null) {
1344 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
1345 oprot.writeString(struct.prefix);
1346 oprot.writeFieldEnd();
1348 if (struct.nexthop != null) {
1349 oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
1350 oprot.writeString(struct.nexthop);
1351 oprot.writeFieldEnd();
1353 if (struct.routermac != null) {
1354 oprot.writeFieldBegin(ROUTERMAC_FIELD_DESC);
1355 oprot.writeString(struct.routermac);
1356 oprot.writeFieldEnd();
1358 oprot.writeFieldStop();
1359 oprot.writeStructEnd();
1364 private static class UpdateTupleSchemeFactory implements SchemeFactory {
1365 public UpdateTupleScheme getScheme() {
1366 return new UpdateTupleScheme();
1370 private static class UpdateTupleScheme extends TupleScheme<Update> {
1373 public void write(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
1374 TTupleProtocol oprot = (TTupleProtocol) prot;
1375 BitSet optionals = new BitSet();
1376 if (struct.isSetType()) {
1379 if (struct.isSetReserved()) {
1382 if (struct.isSetPrefixlen()) {
1385 if (struct.isSetL3label()) {
1388 if (struct.isSetL2label()) {
1391 if (struct.isSetEthtag()) {
1394 if (struct.isSetEsi()) {
1397 if (struct.isSetMacaddress()) {
1400 if (struct.isSetRd()) {
1403 if (struct.isSetPrefix()) {
1406 if (struct.isSetNexthop()) {
1409 if (struct.isSetRoutermac()) {
1412 oprot.writeBitSet(optionals, 12);
1413 if (struct.isSetType()) {
1414 oprot.writeI32(struct.type);
1416 if (struct.isSetReserved()) {
1417 oprot.writeI32(struct.reserved);
1419 if (struct.isSetPrefixlen()) {
1420 oprot.writeI32(struct.prefixlen);
1422 if (struct.isSetL3label()) {
1423 oprot.writeI32(struct.l3label);
1425 if (struct.isSetL2label()) {
1426 oprot.writeI32(struct.l2label);
1428 if (struct.isSetEthtag()) {
1429 oprot.writeI32(struct.ethtag);
1431 if (struct.isSetEsi()) {
1432 oprot.writeString(struct.esi);
1434 if (struct.isSetMacaddress()) {
1435 oprot.writeString(struct.macaddress);
1437 if (struct.isSetRd()) {
1438 oprot.writeString(struct.rd);
1440 if (struct.isSetPrefix()) {
1441 oprot.writeString(struct.prefix);
1443 if (struct.isSetNexthop()) {
1444 oprot.writeString(struct.nexthop);
1446 if (struct.isSetRoutermac()) {
1447 oprot.writeString(struct.routermac);
1452 public void read(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
1453 TTupleProtocol iprot = (TTupleProtocol) prot;
1454 BitSet incoming = iprot.readBitSet(12);
1455 if (incoming.get(0)) {
1456 struct.type = iprot.readI32();
1457 struct.setTypeIsSet(true);
1459 if (incoming.get(1)) {
1460 struct.reserved = iprot.readI32();
1461 struct.setReservedIsSet(true);
1463 if (incoming.get(2)) {
1464 struct.prefixlen = iprot.readI32();
1465 struct.setPrefixlenIsSet(true);
1467 if (incoming.get(3)) {
1468 struct.l3label = iprot.readI32();
1469 struct.setL3labelIsSet(true);
1471 if (incoming.get(4)) {
1472 struct.l2label = iprot.readI32();
1473 struct.setL2labelIsSet(true);
1475 if (incoming.get(5)) {
1476 struct.ethtag = iprot.readI32();
1477 struct.setEthtagIsSet(true);
1479 if (incoming.get(6)) {
1480 struct.esi = iprot.readString();
1481 struct.setEsiIsSet(true);
1483 if (incoming.get(7)) {
1484 struct.macaddress = iprot.readString();
1485 struct.setMacaddressIsSet(true);
1487 if (incoming.get(8)) {
1488 struct.rd = iprot.readString();
1489 struct.setRdIsSet(true);
1491 if (incoming.get(9)) {
1492 struct.prefix = iprot.readString();
1493 struct.setPrefixIsSet(true);
1495 if (incoming.get(10)) {
1496 struct.nexthop = iprot.readString();
1497 struct.setNexthopIsSet(true);
1499 if (incoming.get(11)) {
1500 struct.routermac = iprot.readString();
1501 struct.setRoutermacIsSet(true);