2 * Autogenerated by Thrift Compiler (0.9.1)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
7 package org.opendaylight.bgpmanager.thrift.gen;
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import org.apache.thrift.protocol.TProtocolException;
16 import org.apache.thrift.EncodingUtils;
17 import org.apache.thrift.TException;
18 import org.apache.thrift.async.AsyncMethodCallback;
19 import org.apache.thrift.server.AbstractNonblockingServer.*;
20 import java.util.List;
21 import java.util.ArrayList;
23 import java.util.HashMap;
24 import java.util.EnumMap;
26 import java.util.HashSet;
27 import java.util.EnumSet;
28 import java.util.Collections;
29 import java.util.BitSet;
30 import java.nio.ByteBuffer;
31 import java.util.Arrays;
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
35 public class Update implements org.apache.thrift.TBase<Update, Update._Fields>, java.io.Serializable, Cloneable, Comparable<Update> {
36 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Update");
38 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);
39 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);
40 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);
41 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);
42 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);
43 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);
44 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);
46 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
48 schemes.put(StandardScheme.class, new UpdateStandardSchemeFactory());
49 schemes.put(TupleScheme.class, new UpdateTupleSchemeFactory());
52 public int type; // required
53 public int reserved; // required
54 public int prefixlen; // required
55 public int label; // required
56 public String rd; // required
57 public String prefix; // required
58 public String nexthop; // required
60 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
61 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
62 TYPE((short)1, "type"),
63 RESERVED((short)2, "reserved"),
64 PREFIXLEN((short)3, "prefixlen"),
65 LABEL((short)4, "label"),
67 PREFIX((short)6, "prefix"),
68 NEXTHOP((short)7, "nexthop");
70 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
73 for (_Fields field : EnumSet.allOf(_Fields.class)) {
74 byName.put(field.getFieldName(), field);
79 * Find the _Fields constant that matches fieldId, or null if its not found.
81 public static _Fields findByThriftId(int fieldId) {
103 * Find the _Fields constant that matches fieldId, throwing an exception
104 * if it is not found.
106 public static _Fields findByThriftIdOrThrow(int fieldId) {
107 _Fields fields = findByThriftId(fieldId);
108 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
113 * Find the _Fields constant that matches name, or null if its not found.
115 public static _Fields findByName(String name) {
116 return byName.get(name);
119 private final short _thriftId;
120 private final String _fieldName;
122 _Fields(short thriftId, String fieldName) {
123 _thriftId = thriftId;
124 _fieldName = fieldName;
127 public short getThriftFieldId() {
131 public String getFieldName() {
136 // isset id assignments
137 private static final int __TYPE_ISSET_ID = 0;
138 private static final int __RESERVED_ISSET_ID = 1;
139 private static final int __PREFIXLEN_ISSET_ID = 2;
140 private static final int __LABEL_ISSET_ID = 3;
141 private byte __isset_bitfield = 0;
142 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
144 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
145 tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
146 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
147 tmpMap.put(_Fields.RESERVED, new org.apache.thrift.meta_data.FieldMetaData("reserved", org.apache.thrift.TFieldRequirementType.DEFAULT,
148 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
149 tmpMap.put(_Fields.PREFIXLEN, new org.apache.thrift.meta_data.FieldMetaData("prefixlen", org.apache.thrift.TFieldRequirementType.DEFAULT,
150 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
151 tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT,
152 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
153 tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
154 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
155 tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
156 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
157 tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT,
158 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
159 metaDataMap = Collections.unmodifiableMap(tmpMap);
160 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Update.class, metaDataMap);
178 this.reserved = reserved;
179 setReservedIsSet(true);
180 this.prefixlen = prefixlen;
181 setPrefixlenIsSet(true);
185 this.prefix = prefix;
186 this.nexthop = nexthop;
190 * Performs a deep copy on <i>other</i>.
192 public Update(Update other) {
193 __isset_bitfield = other.__isset_bitfield;
194 this.type = other.type;
195 this.reserved = other.reserved;
196 this.prefixlen = other.prefixlen;
197 this.label = other.label;
198 if (other.isSetRd()) {
201 if (other.isSetPrefix()) {
202 this.prefix = other.prefix;
204 if (other.isSetNexthop()) {
205 this.nexthop = other.nexthop;
209 public Update deepCopy() {
210 return new Update(this);
214 public void clear() {
217 setReservedIsSet(false);
219 setPrefixlenIsSet(false);
221 setLabelIsSet(false);
228 public int getType() {
232 public Update setType(int type) {
238 public void unsetType() {
239 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
242 /** Returns true if field type is set (has been assigned a value) and false otherwise */
243 public boolean isSetType() {
244 return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
247 public void setTypeIsSet(boolean value) {
248 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
251 public int getReserved() {
252 return this.reserved;
255 public Update setReserved(int reserved) {
256 this.reserved = reserved;
257 setReservedIsSet(true);
261 public void unsetReserved() {
262 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESERVED_ISSET_ID);
265 /** Returns true if field reserved is set (has been assigned a value) and false otherwise */
266 public boolean isSetReserved() {
267 return EncodingUtils.testBit(__isset_bitfield, __RESERVED_ISSET_ID);
270 public void setReservedIsSet(boolean value) {
271 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVED_ISSET_ID, value);
274 public int getPrefixlen() {
275 return this.prefixlen;
278 public Update setPrefixlen(int prefixlen) {
279 this.prefixlen = prefixlen;
280 setPrefixlenIsSet(true);
284 public void unsetPrefixlen() {
285 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
288 /** Returns true if field prefixlen is set (has been assigned a value) and false otherwise */
289 public boolean isSetPrefixlen() {
290 return EncodingUtils.testBit(__isset_bitfield, __PREFIXLEN_ISSET_ID);
293 public void setPrefixlenIsSet(boolean value) {
294 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PREFIXLEN_ISSET_ID, value);
297 public int getLabel() {
301 public Update setLabel(int label) {
307 public void unsetLabel() {
308 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
311 /** Returns true if field label is set (has been assigned a value) and false otherwise */
312 public boolean isSetLabel() {
313 return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
316 public void setLabelIsSet(boolean value) {
317 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
320 public String getRd() {
324 public Update setRd(String rd) {
329 public void unsetRd() {
333 /** Returns true if field rd is set (has been assigned a value) and false otherwise */
334 public boolean isSetRd() {
335 return this.rd != null;
338 public void setRdIsSet(boolean value) {
344 public String getPrefix() {
348 public Update setPrefix(String prefix) {
349 this.prefix = prefix;
353 public void unsetPrefix() {
357 /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
358 public boolean isSetPrefix() {
359 return this.prefix != null;
362 public void setPrefixIsSet(boolean value) {
368 public String getNexthop() {
372 public Update setNexthop(String nexthop) {
373 this.nexthop = nexthop;
377 public void unsetNexthop() {
381 /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
382 public boolean isSetNexthop() {
383 return this.nexthop != null;
386 public void setNexthopIsSet(boolean value) {
392 public void setFieldValue(_Fields field, Object value) {
398 setType((Integer)value);
406 setReserved((Integer)value);
414 setPrefixlen((Integer)value);
422 setLabel((Integer)value);
430 setRd((String)value);
438 setPrefix((String)value);
446 setNexthop((String)value);
453 public Object getFieldValue(_Fields field) {
456 return Integer.valueOf(getType());
459 return Integer.valueOf(getReserved());
462 return Integer.valueOf(getPrefixlen());
465 return Integer.valueOf(getLabel());
477 throw new IllegalStateException();
480 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
481 public boolean isSet(_Fields field) {
483 throw new IllegalArgumentException();
490 return isSetReserved();
492 return isSetPrefixlen();
498 return isSetPrefix();
500 return isSetNexthop();
502 throw new IllegalStateException();
506 public boolean equals(Object that) {
509 if (that instanceof Update)
510 return this.equals((Update)that);
514 public boolean equals(Update that) {
518 boolean this_present_type = true;
519 boolean that_present_type = true;
520 if (this_present_type || that_present_type) {
521 if (!(this_present_type && that_present_type))
523 if (this.type != that.type)
527 boolean this_present_reserved = true;
528 boolean that_present_reserved = true;
529 if (this_present_reserved || that_present_reserved) {
530 if (!(this_present_reserved && that_present_reserved))
532 if (this.reserved != that.reserved)
536 boolean this_present_prefixlen = true;
537 boolean that_present_prefixlen = true;
538 if (this_present_prefixlen || that_present_prefixlen) {
539 if (!(this_present_prefixlen && that_present_prefixlen))
541 if (this.prefixlen != that.prefixlen)
545 boolean this_present_label = true;
546 boolean that_present_label = true;
547 if (this_present_label || that_present_label) {
548 if (!(this_present_label && that_present_label))
550 if (this.label != that.label)
554 boolean this_present_rd = true && this.isSetRd();
555 boolean that_present_rd = true && that.isSetRd();
556 if (this_present_rd || that_present_rd) {
557 if (!(this_present_rd && that_present_rd))
559 if (!this.rd.equals(that.rd))
563 boolean this_present_prefix = true && this.isSetPrefix();
564 boolean that_present_prefix = true && that.isSetPrefix();
565 if (this_present_prefix || that_present_prefix) {
566 if (!(this_present_prefix && that_present_prefix))
568 if (!this.prefix.equals(that.prefix))
572 boolean this_present_nexthop = true && this.isSetNexthop();
573 boolean that_present_nexthop = true && that.isSetNexthop();
574 if (this_present_nexthop || that_present_nexthop) {
575 if (!(this_present_nexthop && that_present_nexthop))
577 if (!this.nexthop.equals(that.nexthop))
585 public int hashCode() {
590 public int compareTo(Update other) {
591 if (!getClass().equals(other.getClass())) {
592 return getClass().getName().compareTo(other.getClass().getName());
595 int lastComparison = 0;
597 lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
598 if (lastComparison != 0) {
599 return lastComparison;
602 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
603 if (lastComparison != 0) {
604 return lastComparison;
607 lastComparison = Boolean.valueOf(isSetReserved()).compareTo(other.isSetReserved());
608 if (lastComparison != 0) {
609 return lastComparison;
611 if (isSetReserved()) {
612 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reserved, other.reserved);
613 if (lastComparison != 0) {
614 return lastComparison;
617 lastComparison = Boolean.valueOf(isSetPrefixlen()).compareTo(other.isSetPrefixlen());
618 if (lastComparison != 0) {
619 return lastComparison;
621 if (isSetPrefixlen()) {
622 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefixlen, other.prefixlen);
623 if (lastComparison != 0) {
624 return lastComparison;
627 lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
628 if (lastComparison != 0) {
629 return lastComparison;
632 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
633 if (lastComparison != 0) {
634 return lastComparison;
637 lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
638 if (lastComparison != 0) {
639 return lastComparison;
642 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
643 if (lastComparison != 0) {
644 return lastComparison;
647 lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
648 if (lastComparison != 0) {
649 return lastComparison;
652 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
653 if (lastComparison != 0) {
654 return lastComparison;
657 lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
658 if (lastComparison != 0) {
659 return lastComparison;
661 if (isSetNexthop()) {
662 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
663 if (lastComparison != 0) {
664 return lastComparison;
670 public _Fields fieldForId(int fieldId) {
671 return _Fields.findByThriftId(fieldId);
674 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
675 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
678 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
679 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
683 public String toString() {
684 StringBuilder sb = new StringBuilder("Update(");
685 boolean first = true;
688 sb.append(this.type);
690 if (!first) sb.append(", ");
691 sb.append("reserved:");
692 sb.append(this.reserved);
694 if (!first) sb.append(", ");
695 sb.append("prefixlen:");
696 sb.append(this.prefixlen);
698 if (!first) sb.append(", ");
700 sb.append(this.label);
702 if (!first) sb.append(", ");
704 if (this.rd == null) {
710 if (!first) sb.append(", ");
711 sb.append("prefix:");
712 if (this.prefix == null) {
715 sb.append(this.prefix);
718 if (!first) sb.append(", ");
719 sb.append("nexthop:");
720 if (this.nexthop == null) {
723 sb.append(this.nexthop);
727 return sb.toString();
730 public void validate() throws org.apache.thrift.TException {
731 // check for required fields
732 // check for sub-struct validity
735 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
737 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
738 } catch (org.apache.thrift.TException te) {
739 throw new java.io.IOException(te);
743 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
745 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
746 __isset_bitfield = 0;
747 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
748 } catch (org.apache.thrift.TException te) {
749 throw new java.io.IOException(te);
753 private static class UpdateStandardSchemeFactory implements SchemeFactory {
754 public UpdateStandardScheme getScheme() {
755 return new UpdateStandardScheme();
759 private static class UpdateStandardScheme extends StandardScheme<Update> {
761 public void read(org.apache.thrift.protocol.TProtocol iprot, Update struct) throws org.apache.thrift.TException {
762 org.apache.thrift.protocol.TField schemeField;
763 iprot.readStructBegin();
766 schemeField = iprot.readFieldBegin();
767 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
770 switch (schemeField.id) {
772 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
773 struct.type = iprot.readI32();
774 struct.setTypeIsSet(true);
776 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
780 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
781 struct.reserved = iprot.readI32();
782 struct.setReservedIsSet(true);
784 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
788 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
789 struct.prefixlen = iprot.readI32();
790 struct.setPrefixlenIsSet(true);
792 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
796 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
797 struct.label = iprot.readI32();
798 struct.setLabelIsSet(true);
800 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
804 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
805 struct.rd = iprot.readString();
806 struct.setRdIsSet(true);
808 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
812 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
813 struct.prefix = iprot.readString();
814 struct.setPrefixIsSet(true);
816 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
820 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
821 struct.nexthop = iprot.readString();
822 struct.setNexthopIsSet(true);
824 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
828 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
830 iprot.readFieldEnd();
832 iprot.readStructEnd();
834 // check for required fields of primitive type, which can't be checked in the validate method
838 public void write(org.apache.thrift.protocol.TProtocol oprot, Update struct) throws org.apache.thrift.TException {
841 oprot.writeStructBegin(STRUCT_DESC);
842 oprot.writeFieldBegin(TYPE_FIELD_DESC);
843 oprot.writeI32(struct.type);
844 oprot.writeFieldEnd();
845 oprot.writeFieldBegin(RESERVED_FIELD_DESC);
846 oprot.writeI32(struct.reserved);
847 oprot.writeFieldEnd();
848 oprot.writeFieldBegin(PREFIXLEN_FIELD_DESC);
849 oprot.writeI32(struct.prefixlen);
850 oprot.writeFieldEnd();
851 oprot.writeFieldBegin(LABEL_FIELD_DESC);
852 oprot.writeI32(struct.label);
853 oprot.writeFieldEnd();
854 if (struct.rd != null) {
855 oprot.writeFieldBegin(RD_FIELD_DESC);
856 oprot.writeString(struct.rd);
857 oprot.writeFieldEnd();
859 if (struct.prefix != null) {
860 oprot.writeFieldBegin(PREFIX_FIELD_DESC);
861 oprot.writeString(struct.prefix);
862 oprot.writeFieldEnd();
864 if (struct.nexthop != null) {
865 oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
866 oprot.writeString(struct.nexthop);
867 oprot.writeFieldEnd();
869 oprot.writeFieldStop();
870 oprot.writeStructEnd();
875 private static class UpdateTupleSchemeFactory implements SchemeFactory {
876 public UpdateTupleScheme getScheme() {
877 return new UpdateTupleScheme();
881 private static class UpdateTupleScheme extends TupleScheme<Update> {
884 public void write(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
885 TTupleProtocol oprot = (TTupleProtocol) prot;
886 BitSet optionals = new BitSet();
887 if (struct.isSetType()) {
890 if (struct.isSetReserved()) {
893 if (struct.isSetPrefixlen()) {
896 if (struct.isSetLabel()) {
899 if (struct.isSetRd()) {
902 if (struct.isSetPrefix()) {
905 if (struct.isSetNexthop()) {
908 oprot.writeBitSet(optionals, 7);
909 if (struct.isSetType()) {
910 oprot.writeI32(struct.type);
912 if (struct.isSetReserved()) {
913 oprot.writeI32(struct.reserved);
915 if (struct.isSetPrefixlen()) {
916 oprot.writeI32(struct.prefixlen);
918 if (struct.isSetLabel()) {
919 oprot.writeI32(struct.label);
921 if (struct.isSetRd()) {
922 oprot.writeString(struct.rd);
924 if (struct.isSetPrefix()) {
925 oprot.writeString(struct.prefix);
927 if (struct.isSetNexthop()) {
928 oprot.writeString(struct.nexthop);
933 public void read(org.apache.thrift.protocol.TProtocol prot, Update struct) throws org.apache.thrift.TException {
934 TTupleProtocol iprot = (TTupleProtocol) prot;
935 BitSet incoming = iprot.readBitSet(7);
936 if (incoming.get(0)) {
937 struct.type = iprot.readI32();
938 struct.setTypeIsSet(true);
940 if (incoming.get(1)) {
941 struct.reserved = iprot.readI32();
942 struct.setReservedIsSet(true);
944 if (incoming.get(2)) {
945 struct.prefixlen = iprot.readI32();
946 struct.setPrefixlenIsSet(true);
948 if (incoming.get(3)) {
949 struct.label = iprot.readI32();
950 struct.setLabelIsSet(true);
952 if (incoming.get(4)) {
953 struct.rd = iprot.readString();
954 struct.setRdIsSet(true);
956 if (incoming.get(5)) {
957 struct.prefix = iprot.readString();
958 struct.setPrefixIsSet(true);
960 if (incoming.get(6)) {
961 struct.nexthop = iprot.readString();
962 struct.setNexthopIsSet(true);