2 * Autogenerated by Thrift Compiler (0.9.1)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
8 package org.opendaylight.bgpmanager.thrift.gen;
10 import org.apache.thrift.scheme.IScheme;
11 import org.apache.thrift.scheme.SchemeFactory;
12 import org.apache.thrift.scheme.StandardScheme;
14 import org.apache.thrift.scheme.TupleScheme;
15 import org.apache.thrift.protocol.TTupleProtocol;
16 import org.apache.thrift.protocol.TProtocolException;
17 import org.apache.thrift.EncodingUtils;
18 import org.apache.thrift.TException;
19 import org.apache.thrift.async.AsyncMethodCallback;
20 import org.apache.thrift.server.AbstractNonblockingServer.*;
21 import java.util.List;
22 import java.util.ArrayList;
24 import java.util.HashMap;
25 import java.util.EnumMap;
27 import java.util.HashSet;
28 import java.util.EnumSet;
29 import java.util.Collections;
30 import java.util.BitSet;
31 import java.nio.ByteBuffer;
32 import java.util.Arrays;
33 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory;
36 public class Update implements org.apache.thrift.TBase<Update, Update._Fields>, java.io.Serializable, Cloneable, Comparable<Update> {
37 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Update");
39 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);
40 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);
41 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);
42 private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.I32, (short)4);
43 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)5);
44 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)6);
45 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)7);
47 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
49 schemes.put(StandardScheme.class, new UpdateStandardSchemeFactory());
50 schemes.put(TupleScheme.class, new UpdateTupleSchemeFactory());
53 public int type; // required
54 public int reserved; // required
55 public int prefixlen; // required
56 public int label; // required
57 public String rd; // required
58 public String prefix; // required
59 public String nexthop; // required
61 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63 TYPE((short)1, "type"),
64 RESERVED((short)2, "reserved"),
65 PREFIXLEN((short)3, "prefixlen"),
66 LABEL((short)4, "label"),
68 PREFIX((short)6, "prefix"),
69 NEXTHOP((short)7, "nexthop");
71 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74 for (_Fields field : EnumSet.allOf(_Fields.class)) {
75 byName.put(field.getFieldName(), field);
80 * Find the _Fields constant that matches fieldId, or null if its not found.
82 public static _Fields findByThriftId(int fieldId) {
104 * Find the _Fields constant that matches fieldId, throwing an exception
105 * if it is not found.
107 public static _Fields findByThriftIdOrThrow(int fieldId) {
108 _Fields fields = findByThriftId(fieldId);
109 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
114 * Find the _Fields constant that matches name, or null if its not found.
116 public static _Fields findByName(String name) {
117 return byName.get(name);
120 private final short _thriftId;
121 private final String _fieldName;
123 _Fields(short thriftId, String fieldName) {
124 _thriftId = thriftId;
125 _fieldName = fieldName;
128 public short getThriftFieldId() {
132 public String getFieldName() {
137 // isset id assignments
138 private static final int __TYPE_ISSET_ID = 0;
139 private static final int __RESERVED_ISSET_ID = 1;
140 private static final int __PREFIXLEN_ISSET_ID = 2;
141 private static final int __LABEL_ISSET_ID = 3;
142 private byte __isset_bitfield = 0;
143 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
145 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
146 tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
147 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
148 tmpMap.put(_Fields.RESERVED, new org.apache.thrift.meta_data.FieldMetaData("reserved", org.apache.thrift.TFieldRequirementType.DEFAULT,
149 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
150 tmpMap.put(_Fields.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT,
151 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
152 tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT,
153 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
154 tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
155 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
156 tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
157 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
158 tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT,
159 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
160 metaDataMap = Collections.unmodifiableMap(tmpMap);
161 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Update.class, metaDataMap);
179 this.reserved = reserved;
180 setReservedIsSet(true);
181 this.prefixlen = prefixlen;
182 setPrefixlenIsSet(true);
186 this.prefix = prefix;
187 this.nexthop = nexthop;
191 * Performs a deep copy on <i>other</i>.
193 public Update(Update other) {
194 __isset_bitfield = other.__isset_bitfield;
195 this.type = other.type;
196 this.reserved = other.reserved;
197 this.prefixlen = other.prefixlen;
198 this.label = other.label;
199 if (other.isSetRd()) {
202 if (other.isSetPrefix()) {
203 this.prefix = other.prefix;
205 if (other.isSetNexthop()) {
206 this.nexthop = other.nexthop;
210 public Update deepCopy() {
211 return new Update(this);
215 public void clear() {
218 setReservedIsSet(false);
220 setPrefixlenIsSet(false);
222 setLabelIsSet(false);
229 public int getType() {
233 public Update setType(int type) {
239 public void unsetType() {
240 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
243 /** Returns true if field type is set (has been assigned a value) and false otherwise */
244 public boolean isSetType() {
245 return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
248 public void setTypeIsSet(boolean value) {
249 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
252 public int getReserved() {
253 return this.reserved;
256 public Update setReserved(int reserved) {
257 this.reserved = reserved;
258 setReservedIsSet(true);
262 public void unsetReserved() {
263 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESERVED_ISSET_ID);
266 /** Returns true if field reserved is set (has been assigned a value) and false otherwise */
267 public boolean isSetReserved() {
268 return EncodingUtils.testBit(__isset_bitfield, __RESERVED_ISSET_ID);
271 public void setReservedIsSet(boolean value) {
272 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVED_ISSET_ID, value);
275 public int getPrefixlen() {
276 return this.prefixlen;
279 public Update setPrefixlen(int prefixlen) {
280 this.prefixlen = prefixlen;
281 setPrefixlenIsSet(true);
285 public void unsetPrefixlen() {
286 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
289 /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
290 public boolean isSetPrefixlen() {
291 return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
294 public void setPrefixlenIsSet(boolean value) {
295 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
298 public int getLabel() {
302 public Update setLabel(int label) {
308 public void unsetLabel() {
309 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
312 /** Returns true if field label is set (has been assigned a value) and false otherwise */
313 public boolean isSetLabel() {
314 return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
317 public void setLabelIsSet(boolean value) {
318 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
321 public String getRd() {
325 public Update setRd(String rd) {
330 public void unsetRd() {
334 /** Returns true if field rd is set (has been assigned a value) and false otherwise */
335 public boolean isSetRd() {
336 return this.rd != null;
339 public void setRdIsSet(boolean value) {
345 public String getPrefix() {
349 public Update setPrefix(String prefix) {
350 this.prefix = prefix;
354 public void unsetPrefix() {
358 /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
359 public boolean isSetPrefix() {
360 return this.prefix != null;
363 public void setPrefixIsSet(boolean value) {
369 public String getNexthop() {
373 public Update setNexthop(String nexthop) {
374 this.nexthop = nexthop;
378 public void unsetNexthop() {
382 /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
383 public boolean isSetNexthop() {
384 return this.nexthop != null;
387 public void setNexthopIsSet(boolean value) {
393 public void setFieldValue(_Fields field, Object value) {
399 setType((Integer)value);
407 setReserved((Integer)value);
415 setPrefixlen((Integer)value);
423 setLabel((Integer)value);
431 setRd((String)value);
439 setPrefix((String)value);
447 setNexthop((String)value);
454 public Object getFieldValue(_Fields field) {
457 return Integer.valueOf(getType());
460 return Integer.valueOf(getReserved());
463 return Integer.valueOf(getPrefixlen());
466 return Integer.valueOf(getLabel());
478 throw new IllegalStateException();
481 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
482 public boolean isSet(_Fields field) {
484 throw new IllegalArgumentException();
491 return isSetReserved();
493 return isSetPrefixlen();
499 return isSetPrefix();
501 return isSetNexthop();
503 throw new IllegalStateException();
507 public boolean equals(Object that) {
510 if (that instanceof Update)
511 return this.equals((Update)that);
515 public boolean equals(Update that) {
519 boolean this_present_type = true;
520 boolean that_present_type = true;
521 if (this_present_type || that_present_type) {
522 if (!(this_present_type && that_present_type))
524 if (this.type != that.type)
528 boolean this_present_reserved = true;
529 boolean that_present_reserved = true;
530 if (this_present_reserved || that_present_reserved) {
531 if (!(this_present_reserved && that_present_reserved))
533 if (this.reserved != that.reserved)
537 boolean this_present_prefixlen = true;
538 boolean that_present_prefixlen = true;
539 if (this_present_prefixlen || that_present_prefixlen) {
540 if (!(this_present_prefixlen && that_present_prefixlen))
542 if (this.prefixlen != that.prefixlen)
546 boolean this_present_label = true;
547 boolean that_present_label = true;
548 if (this_present_label || that_present_label) {
549 if (!(this_present_label && that_present_label))
551 if (this.label != that.label)
555 boolean this_present_rd = true && this.isSetRd();
556 boolean that_present_rd = true && that.isSetRd();
557 if (this_present_rd || that_present_rd) {
558 if (!(this_present_rd && that_present_rd))
560 if (!this.rd.equals(that.rd))
564 boolean this_present_prefix = true && this.isSetPrefix();
565 boolean that_present_prefix = true && that.isSetPrefix();
566 if (this_present_prefix || that_present_prefix) {
567 if (!(this_present_prefix && that_present_prefix))
569 if (!this.prefix.equals(that.prefix))
573 boolean this_present_nexthop = true && this.isSetNexthop();
574 boolean that_present_nexthop = true && that.isSetNexthop();
575 if (this_present_nexthop || that_present_nexthop) {
576 if (!(this_present_nexthop && that_present_nexthop))
578 if (!this.nexthop.equals(that.nexthop))
586 public int hashCode() {
591 public int compareTo(Update other) {
592 if (!getClass().equals(other.getClass())) {
593 return getClass().getName().compareTo(other.getClass().getName());
596 int lastComparison = 0;
598 lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
599 if (lastComparison != 0) {
600 return lastComparison;
603 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
604 if (lastComparison != 0) {
605 return lastComparison;
608 lastComparison = Boolean.valueOf(isSetReserved()).compareTo(other.isSetReserved());
609 if (lastComparison != 0) {
610 return lastComparison;
612 if (isSetReserved()) {
613 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reserved, other.reserved);
614 if (lastComparison != 0) {
615 return lastComparison;
618 lastComparison = Boolean.valueOf(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
619 if (lastComparison != 0) {
620 return lastComparison;
622 if (isSetPrefixlen()) {
623 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
624 if (lastComparison != 0) {
625 return lastComparison;
628 lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
629 if (lastComparison != 0) {
630 return lastComparison;
633 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
634 if (lastComparison != 0) {
635 return lastComparison;
638 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
639 if (lastComparison != 0) {
640 return lastComparison;
643 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
644 if (lastComparison != 0) {
645 return lastComparison;
648 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
649 if (lastComparison != 0) {
650 return lastComparison;
653 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
654 if (lastComparison != 0) {
655 return lastComparison;
658 lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
659 if (lastComparison != 0) {
660 return lastComparison;
662 if (isSetNexthop()) {
663 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
664 if (lastComparison != 0) {
665 return lastComparison;
671 public _Fields fieldForId(int fieldId) {
672 return _Fields.findByThriftId(fieldId);
675 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
676 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
679 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
680 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
684 public String toString() {
685 StringBuilder sb = new StringBuilder("Update(");
686 boolean first = true;
689 sb.append(this.type);
691 if (!first) sb.append(", ");
692 sb.append("reserved:");
693 sb.append(this.reserved);
695 if (!first) sb.append(", ");
696 sb.append("prefixlen:");
697 sb.append(this.prefixlen);
699 if (!first) sb.append(", ");
701 sb.append(this.label);
703 if (!first) sb.append(", ");
705 if (this.rd == null) {
711 if (!first) sb.append(", ");
712 sb.append("prefix:");
713 if (this.prefix == null) {
716 sb.append(this.prefix);
719 if (!first) sb.append(", ");
720 sb.append("nexthop:");
721 if (this.nexthop == null) {
724 sb.append(this.nexthop);
728 return sb.toString();
731 public void validate() throws org.apache.thrift.TException {
732 // check for required fields
733 // check for sub-struct validity
736 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
738 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
739 } catch (org.apache.thrift.TException te) {
740 throw new java.io.IOException(te);
744 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
746 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
747 __isset_bitfield = 0;
748 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
749 } catch (org.apache.thrift.TException te) {
750 throw new java.io.IOException(te);
754 private static class UpdateStandardSchemeFactory implements SchemeFactory {
755 public UpdateStandardScheme getScheme() {
756 return new UpdateStandardScheme();
760 private static class UpdateStandardScheme extends StandardScheme<Update> {
762 public void read(org.apache.thrift.protocol.TProtocol iprot, Update struct) throws org.apache.thrift.TException {
763 org.apache.thrift.protocol.TField schemeField;
764 iprot.readStructBegin();
767 schemeField = iprot.readFieldBegin();
768 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
771 switch (schemeField.id) {
773 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
774 struct.type = iprot.readI32();
775 struct.setTypeIsSet(true);
777 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
781 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
782 struct.reserved = iprot.readI32();
783 struct.setReservedIsSet(true);
785 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
789 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
790 struct.prefixlen = iprot.readI32();
791 struct.setPrefixlenIsSet(true);
793 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
797 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
798 struct.label = iprot.readI32();
799 struct.setLabelIsSet(true);
801 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
805 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
806 struct.rd = iprot.readString();
807 struct.setRdIsSet(true);
809 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
813 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
814 struct.prefix = iprot.readString();
815 struct.setPrefixIsSet(true);
817 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
821 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
822 struct.nexthop = iprot.readString();
823 struct.setNexthopIsSet(true);
825 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
829 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
831 iprot.readFieldEnd();
833 iprot.readStructEnd();
835 // check for required fields of primitive type, which can't be checked in the validate method
839 public void write(org.apache.thrift.protocol.TProtocol oprot, Update struct) throws org.apache.thrift.TException {
842 oprot.writeStructBegin(STRUCT_DESC);
843 oprot.writeFieldBegin(TYPE_FIELD_DESC);
844 oprot.writeI32(struct.type);
845 oprot.writeFieldEnd();
846 oprot.writeFieldBegin(RESERVED_FIELD_DESC);
847 oprot.writeI32(struct.reserved);
848 oprot.writeFieldEnd();
849 oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
850 oprot.writeI32(struct.prefixlen);
851 oprot.writeFieldEnd();
852 oprot.writeFieldBegin(LABEL_FIELD_DESC);
853 oprot.writeI32(struct.label);
854 oprot.writeFieldEnd();
855 if (struct.rd != null) {
856 oprot.writeFieldBegin(RD_FIELD_DESC);
857 oprot.writeString(struct.rd);
858 oprot.writeFieldEnd();
860 if (struct.prefix != null) {
861 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
862 oprot.writeString(struct.prefix);
863 oprot.writeFieldEnd();
865 if (struct.nexthop != null) {
866 oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
867 oprot.writeString(struct.nexthop);
868 oprot.writeFieldEnd();
870 oprot.writeFieldStop();
871 oprot.writeStructEnd();
876 private static class UpdateTupleSchemeFactory implements SchemeFactory {
877 public UpdateTupleScheme getScheme() {
878 return new UpdateTupleScheme();
882 private static class UpdateTupleScheme extends TupleScheme<Update> {
885 public void write(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
886 TTupleProtocol oprot = (TTupleProtocol) prot;
887 BitSet optionals = new BitSet();
888 if (struct.isSetType()) {
891 if (struct.isSetReserved()) {
894 if (struct.isSetPrefixlen()) {
897 if (struct.isSetLabel()) {
900 if (struct.isSetRd()) {
903 if (struct.isSetPrefix()) {
906 if (struct.isSetNexthop()) {
909 oprot.writeBitSet(optionals, 7);
910 if (struct.isSetType()) {
911 oprot.writeI32(struct.type);
913 if (struct.isSetReserved()) {
914 oprot.writeI32(struct.reserved);
916 if (struct.isSetPrefixlen()) {
917 oprot.writeI32(struct.prefixlen);
919 if (struct.isSetLabel()) {
920 oprot.writeI32(struct.label);
922 if (struct.isSetRd()) {
923 oprot.writeString(struct.rd);
925 if (struct.isSetPrefix()) {
926 oprot.writeString(struct.prefix);
928 if (struct.isSetNexthop()) {
929 oprot.writeString(struct.nexthop);
934 public void read(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
935 TTupleProtocol iprot = (TTupleProtocol) prot;
936 BitSet incoming = iprot.readBitSet(7);
937 if (incoming.get(0)) {
938 struct.type = iprot.readI32();
939 struct.setTypeIsSet(true);
941 if (incoming.get(1)) {
942 struct.reserved = iprot.readI32();
943 struct.setReservedIsSet(true);
945 if (incoming.get(2)) {
946 struct.prefixlen = iprot.readI32();
947 struct.setPrefixlenIsSet(true);
949 if (incoming.get(3)) {
950 struct.label = iprot.readI32();
951 struct.setLabelIsSet(true);
953 if (incoming.get(4)) {
954 struct.rd = iprot.readString();
955 struct.setRdIsSet(true);
957 if (incoming.get(5)) {
958 struct.prefix = iprot.readString();
959 struct.setPrefixIsSet(true);
961 if (incoming.get(6)) {
962 struct.nexthop = iprot.readString();
963 struct.setNexthopIsSet(true);