+ tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.HOLD_TIME, new org.apache.thrift.meta_data.FieldMetaData("holdTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.KEEP_ALIVE_TIME, new org.apache.thrift.meta_data.FieldMetaData("keepAliveTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.STALEPATH_TIME, new org.apache.thrift.meta_data.FieldMetaData("stalepathTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.ANNOUNCE_FBIT, new org.apache.thrift.meta_data.FieldMetaData("announceFbit", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgp_args.class, metaDataMap);
+ }
+
+ public startBgp_args() {
+ }
+
+ public startBgp_args(
+ int asNumber,
+ String routerId,
+ int port,
+ int holdTime,
+ int keepAliveTime,
+ int stalepathTime,
+ boolean announceFbit)
+ {
+ this();
+ this.asNumber = asNumber;
+ setAsNumberIsSet(true);
+ this.routerId = routerId;
+ this.port = port;
+ setPortIsSet(true);
+ this.holdTime = holdTime;
+ setHoldTimeIsSet(true);
+ this.keepAliveTime = keepAliveTime;
+ setKeepAliveTimeIsSet(true);
+ this.stalepathTime = stalepathTime;
+ setStalepathTimeIsSet(true);
+ this.announceFbit = announceFbit;
+ setAnnounceFbitIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startBgp_args(startBgp_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.asNumber = other.asNumber;
+ if (other.isSetRouterId()) {
+ this.routerId = other.routerId;
+ }
+ this.port = other.port;
+ this.holdTime = other.holdTime;
+ this.keepAliveTime = other.keepAliveTime;
+ this.stalepathTime = other.stalepathTime;
+ this.announceFbit = other.announceFbit;
+ }
+
+ public startBgp_args deepCopy() {
+ return new startBgp_args(this);
+ }
+
+ @Override
+ public void clear() {
+ setAsNumberIsSet(false);
+ this.asNumber = 0;
+ this.routerId = null;
+ setPortIsSet(false);
+ this.port = 0;
+ setHoldTimeIsSet(false);
+ this.holdTime = 0;
+ setKeepAliveTimeIsSet(false);
+ this.keepAliveTime = 0;
+ setStalepathTimeIsSet(false);
+ this.stalepathTime = 0;
+ setAnnounceFbitIsSet(false);
+ this.announceFbit = false;
+ }
+
+ public int getAsNumber() {
+ return this.asNumber;
+ }
+
+ public startBgp_args setAsNumber(int asNumber) {
+ this.asNumber = asNumber;
+ setAsNumberIsSet(true);
+ return this;
+ }
+
+ public void unsetAsNumber() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+ }
+
+ /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
+ public boolean isSetAsNumber() {
+ return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+ }
+
+ public void setAsNumberIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+ }
+
+ public String getRouterId() {
+ return this.routerId;
+ }
+
+ public startBgp_args setRouterId(String routerId) {
+ this.routerId = routerId;
+ return this;
+ }
+
+ public void unsetRouterId() {
+ this.routerId = null;
+ }
+
+ /** Returns true if field routerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetRouterId() {
+ return this.routerId != null;
+ }
+
+ public void setRouterIdIsSet(boolean value) {
+ if (!value) {
+ this.routerId = null;
+ }
+ }
+
+ public int getPort() {
+ return this.port;
+ }
+
+ public startBgp_args setPort(int port) {
+ this.port = port;
+ setPortIsSet(true);
+ return this;
+ }
+
+ public void unsetPort() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ }
+
+ /** Returns true if field port is set (has been assigned a value) and false otherwise */
+ public boolean isSetPort() {
+ return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ }
+
+ public void setPortIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ }
+
+ public int getHoldTime() {
+ return this.holdTime;
+ }
+
+ public startBgp_args setHoldTime(int holdTime) {
+ this.holdTime = holdTime;
+ setHoldTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetHoldTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field holdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetHoldTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+ }
+
+ public void setHoldTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
+ }
+
+ public int getKeepAliveTime() {
+ return this.keepAliveTime;
+ }
+
+ public startBgp_args setKeepAliveTime(int keepAliveTime) {
+ this.keepAliveTime = keepAliveTime;
+ setKeepAliveTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetKeepAliveTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
+ }
+
+ /** Returns true if field keepAliveTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetKeepAliveTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID);
+ }
+
+ public void setKeepAliveTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEEPALIVETIME_ISSET_ID, value);
+ }
+
+ public int getStalepathTime() {
+ return this.stalepathTime;
+ }
+
+ public startBgp_args setStalepathTime(int stalepathTime) {
+ this.stalepathTime = stalepathTime;
+ setStalepathTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetStalepathTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID);
+ }
+
+ /** Returns true if field stalepathTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetStalepathTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID);
+ }
+
+ public void setStalepathTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALEPATHTIME_ISSET_ID, value);
+ }
+
+ public boolean isAnnounceFbit() {
+ return this.announceFbit;
+ }
+
+ public startBgp_args setAnnounceFbit(boolean announceFbit) {
+ this.announceFbit = announceFbit;
+ setAnnounceFbitIsSet(true);
+ return this;
+ }
+
+ public void unsetAnnounceFbit() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID);
+ }
+
+ /** Returns true if field announceFbit is set (has been assigned a value) and false otherwise */
+ public boolean isSetAnnounceFbit() {
+ return EncodingUtils.testBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID);
+ }
+
+ public void setAnnounceFbitIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ANNOUNCEFBIT_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AS_NUMBER:
+ if (value == null) {
+ unsetAsNumber();
+ } else {
+ setAsNumber((Integer)value);
+ }
+ break;
+
+ case ROUTER_ID:
+ if (value == null) {
+ unsetRouterId();
+ } else {
+ setRouterId((String)value);
+ }
+ break;
+
+ case PORT:
+ if (value == null) {
+ unsetPort();
+ } else {
+ setPort((Integer)value);
+ }
+ break;
+
+ case HOLD_TIME:
+ if (value == null) {
+ unsetHoldTime();
+ } else {
+ setHoldTime((Integer)value);
+ }
+ break;
+
+ case KEEP_ALIVE_TIME:
+ if (value == null) {
+ unsetKeepAliveTime();
+ } else {
+ setKeepAliveTime((Integer)value);
+ }
+ break;
+
+ case STALEPATH_TIME:
+ if (value == null) {
+ unsetStalepathTime();
+ } else {
+ setStalepathTime((Integer)value);
+ }
+ break;
+
+ case ANNOUNCE_FBIT:
+ if (value == null) {
+ unsetAnnounceFbit();
+ } else {
+ setAnnounceFbit((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AS_NUMBER:
+ return Integer.valueOf(getAsNumber());
+
+ case ROUTER_ID:
+ return getRouterId();
+
+ case PORT:
+ return Integer.valueOf(getPort());
+
+ case HOLD_TIME:
+ return Integer.valueOf(getHoldTime());
+
+ case KEEP_ALIVE_TIME:
+ return Integer.valueOf(getKeepAliveTime());
+
+ case STALEPATH_TIME:
+ return Integer.valueOf(getStalepathTime());
+
+ case ANNOUNCE_FBIT:
+ return Boolean.valueOf(isAnnounceFbit());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case AS_NUMBER:
+ return isSetAsNumber();
+ case ROUTER_ID:
+ return isSetRouterId();
+ case PORT:
+ return isSetPort();
+ case HOLD_TIME:
+ return isSetHoldTime();
+ case KEEP_ALIVE_TIME:
+ return isSetKeepAliveTime();
+ case STALEPATH_TIME:
+ return isSetStalepathTime();
+ case ANNOUNCE_FBIT:
+ return isSetAnnounceFbit();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startBgp_args)
+ return this.equals((startBgp_args)that);
+ return false;
+ }
+
+ public boolean equals(startBgp_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_asNumber = true;
+ boolean that_present_asNumber = true;
+ if (this_present_asNumber || that_present_asNumber) {
+ if (!(this_present_asNumber && that_present_asNumber))
+ return false;
+ if (this.asNumber != that.asNumber)
+ return false;
+ }
+
+ boolean this_present_routerId = true && this.isSetRouterId();
+ boolean that_present_routerId = true && that.isSetRouterId();
+ if (this_present_routerId || that_present_routerId) {
+ if (!(this_present_routerId && that_present_routerId))
+ return false;
+ if (!this.routerId.equals(that.routerId))
+ return false;
+ }
+
+ boolean this_present_port = true;
+ boolean that_present_port = true;
+ if (this_present_port || that_present_port) {
+ if (!(this_present_port && that_present_port))
+ return false;
+ if (this.port != that.port)
+ return false;
+ }
+
+ boolean this_present_holdTime = true;
+ boolean that_present_holdTime = true;
+ if (this_present_holdTime || that_present_holdTime) {
+ if (!(this_present_holdTime && that_present_holdTime))
+ return false;
+ if (this.holdTime != that.holdTime)
+ return false;
+ }
+
+ boolean this_present_keepAliveTime = true;
+ boolean that_present_keepAliveTime = true;
+ if (this_present_keepAliveTime || that_present_keepAliveTime) {
+ if (!(this_present_keepAliveTime && that_present_keepAliveTime))
+ return false;
+ if (this.keepAliveTime != that.keepAliveTime)
+ return false;
+ }
+
+ boolean this_present_stalepathTime = true;
+ boolean that_present_stalepathTime = true;
+ if (this_present_stalepathTime || that_present_stalepathTime) {
+ if (!(this_present_stalepathTime && that_present_stalepathTime))
+ return false;
+ if (this.stalepathTime != that.stalepathTime)
+ return false;
+ }
+
+ boolean this_present_announceFbit = true;
+ boolean that_present_announceFbit = true;
+ if (this_present_announceFbit || that_present_announceFbit) {
+ if (!(this_present_announceFbit && that_present_announceFbit))
+ return false;
+ if (this.announceFbit != that.announceFbit)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(startBgp_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAsNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRouterId()).compareTo(other.isSetRouterId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRouterId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.routerId, other.routerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHoldTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdTime, other.holdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetKeepAliveTime()).compareTo(other.isSetKeepAliveTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKeepAliveTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepAliveTime, other.keepAliveTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStalepathTime()).compareTo(other.isSetStalepathTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStalepathTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stalepathTime, other.stalepathTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAnnounceFbit()).compareTo(other.isSetAnnounceFbit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAnnounceFbit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.announceFbit, other.announceFbit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("startBgp_args(");
+ boolean first = true;
+
+ sb.append("asNumber:");
+ sb.append(this.asNumber);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("routerId:");
+ if (this.routerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.routerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("port:");
+ sb.append(this.port);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("holdTime:");
+ sb.append(this.holdTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("keepAliveTime:");
+ sb.append(this.keepAliveTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("stalepathTime:");
+ sb.append(this.stalepathTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("announceFbit:");
+ sb.append(this.announceFbit);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class startBgp_argsStandardSchemeFactory implements SchemeFactory {
+ public startBgp_argsStandardScheme getScheme() {
+ return new startBgp_argsStandardScheme();
+ }
+ }
+
+ private static class startBgp_argsStandardScheme extends StandardScheme<startBgp_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startBgp_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AS_NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.asNumber = iprot.readI32();
+ struct.setAsNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ROUTER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.routerId = iprot.readString();
+ struct.setRouterIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.port = iprot.readI32();
+ struct.setPortIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // HOLD_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.holdTime = iprot.readI32();
+ struct.setHoldTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // KEEP_ALIVE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.keepAliveTime = iprot.readI32();
+ struct.setKeepAliveTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // STALEPATH_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.stalepathTime = iprot.readI32();
+ struct.setStalepathTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // ANNOUNCE_FBIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.announceFbit = iprot.readBool();
+ struct.setAnnounceFbitIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, startBgp_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.asNumber);
+ oprot.writeFieldEnd();
+ if (struct.routerId != null) {
+ oprot.writeFieldBegin(ROUTER_ID_FIELD_DESC);
+ oprot.writeString(struct.routerId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PORT_FIELD_DESC);
+ oprot.writeI32(struct.port);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HOLD_TIME_FIELD_DESC);
+ oprot.writeI32(struct.holdTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(KEEP_ALIVE_TIME_FIELD_DESC);
+ oprot.writeI32(struct.keepAliveTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(STALEPATH_TIME_FIELD_DESC);
+ oprot.writeI32(struct.stalepathTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(ANNOUNCE_FBIT_FIELD_DESC);
+ oprot.writeBool(struct.announceFbit);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startBgp_argsTupleSchemeFactory implements SchemeFactory {
+ public startBgp_argsTupleScheme getScheme() {
+ return new startBgp_argsTupleScheme();
+ }
+ }
+
+ private static class startBgp_argsTupleScheme extends TupleScheme<startBgp_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startBgp_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAsNumber()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRouterId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPort()) {
+ optionals.set(2);
+ }
+ if (struct.isSetHoldTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetKeepAliveTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetStalepathTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetAnnounceFbit()) {
+ optionals.set(6);
+ }
+ oprot.writeBitSet(optionals, 7);
+ if (struct.isSetAsNumber()) {
+ oprot.writeI32(struct.asNumber);
+ }
+ if (struct.isSetRouterId()) {
+ oprot.writeString(struct.routerId);
+ }
+ if (struct.isSetPort()) {
+ oprot.writeI32(struct.port);
+ }
+ if (struct.isSetHoldTime()) {
+ oprot.writeI32(struct.holdTime);
+ }
+ if (struct.isSetKeepAliveTime()) {
+ oprot.writeI32(struct.keepAliveTime);
+ }
+ if (struct.isSetStalepathTime()) {
+ oprot.writeI32(struct.stalepathTime);
+ }
+ if (struct.isSetAnnounceFbit()) {
+ oprot.writeBool(struct.announceFbit);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startBgp_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(7);
+ if (incoming.get(0)) {
+ struct.asNumber = iprot.readI32();
+ struct.setAsNumberIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.routerId = iprot.readString();
+ struct.setRouterIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.port = iprot.readI32();
+ struct.setPortIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.holdTime = iprot.readI32();
+ struct.setHoldTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.keepAliveTime = iprot.readI32();
+ struct.setKeepAliveTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.stalepathTime = iprot.readI32();
+ struct.setStalepathTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.announceFbit = iprot.readBool();
+ struct.setAnnounceFbitIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class startBgp_result implements org.apache.thrift.TBase<startBgp_result, startBgp_result._Fields>, java.io.Serializable, Cloneable, Comparable<startBgp_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startBgp_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startBgp_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startBgp_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startBgp_result.class, metaDataMap);
+ }
+
+ public startBgp_result() {
+ }
+
+ public startBgp_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startBgp_result(startBgp_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public startBgp_result deepCopy() {
+ return new startBgp_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public startBgp_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startBgp_result)
+ return this.equals((startBgp_result)that);
+ return false;
+ }
+
+ public boolean equals(startBgp_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(startBgp_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("startBgp_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class startBgp_resultStandardSchemeFactory implements SchemeFactory {
+ public startBgp_resultStandardScheme getScheme() {
+ return new startBgp_resultStandardScheme();
+ }
+ }
+
+ private static class startBgp_resultStandardScheme extends StandardScheme<startBgp_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startBgp_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, startBgp_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startBgp_resultTupleSchemeFactory implements SchemeFactory {
+ public startBgp_resultTupleScheme getScheme() {
+ return new startBgp_resultTupleScheme();
+ }
+ }
+
+ private static class startBgp_resultTupleScheme extends TupleScheme<startBgp_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startBgp_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startBgp_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class stopBgp_args implements org.apache.thrift.TBase<stopBgp_args, stopBgp_args._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgp_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgp_args");
+
+ private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new stopBgp_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new stopBgp_argsTupleSchemeFactory());
+ }
+
+ public int asNumber; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ AS_NUMBER((short)1, "asNumber");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // AS_NUMBER
+ return AS_NUMBER;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __ASNUMBER_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgp_args.class, metaDataMap);
+ }
+
+ public stopBgp_args() {
+ }
+
+ public stopBgp_args(
+ int asNumber)
+ {
+ this();
+ this.asNumber = asNumber;
+ setAsNumberIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public stopBgp_args(stopBgp_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.asNumber = other.asNumber;
+ }
+
+ public stopBgp_args deepCopy() {
+ return new stopBgp_args(this);
+ }
+
+ @Override
+ public void clear() {
+ setAsNumberIsSet(false);
+ this.asNumber = 0;
+ }
+
+ public int getAsNumber() {
+ return this.asNumber;
+ }
+
+ public stopBgp_args setAsNumber(int asNumber) {
+ this.asNumber = asNumber;
+ setAsNumberIsSet(true);
+ return this;
+ }
+
+ public void unsetAsNumber() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+ }
+
+ /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
+ public boolean isSetAsNumber() {
+ return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+ }
+
+ public void setAsNumberIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case AS_NUMBER:
+ if (value == null) {
+ unsetAsNumber();
+ } else {
+ setAsNumber((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case AS_NUMBER:
+ return Integer.valueOf(getAsNumber());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case AS_NUMBER:
+ return isSetAsNumber();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof stopBgp_args)
+ return this.equals((stopBgp_args)that);
+ return false;
+ }
+
+ public boolean equals(stopBgp_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_asNumber = true;
+ boolean that_present_asNumber = true;
+ if (this_present_asNumber || that_present_asNumber) {
+ if (!(this_present_asNumber && that_present_asNumber))
+ return false;
+ if (this.asNumber != that.asNumber)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(stopBgp_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAsNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("stopBgp_args(");
+ boolean first = true;
+
+ sb.append("asNumber:");
+ sb.append(this.asNumber);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class stopBgp_argsStandardSchemeFactory implements SchemeFactory {
+ public stopBgp_argsStandardScheme getScheme() {
+ return new stopBgp_argsStandardScheme();
+ }
+ }
+
+ private static class stopBgp_argsStandardScheme extends StandardScheme<stopBgp_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgp_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // AS_NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.asNumber = iprot.readI32();
+ struct.setAsNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgp_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.asNumber);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class stopBgp_argsTupleSchemeFactory implements SchemeFactory {
+ public stopBgp_argsTupleScheme getScheme() {
+ return new stopBgp_argsTupleScheme();
+ }
+ }
+
+ private static class stopBgp_argsTupleScheme extends TupleScheme<stopBgp_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, stopBgp_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAsNumber()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetAsNumber()) {
+ oprot.writeI32(struct.asNumber);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, stopBgp_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.asNumber = iprot.readI32();
+ struct.setAsNumberIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class stopBgp_result implements org.apache.thrift.TBase<stopBgp_result, stopBgp_result._Fields>, java.io.Serializable, Cloneable, Comparable<stopBgp_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stopBgp_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new stopBgp_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new stopBgp_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopBgp_result.class, metaDataMap);
+ }
+
+ public stopBgp_result() {
+ }
+
+ public stopBgp_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public stopBgp_result(stopBgp_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public stopBgp_result deepCopy() {
+ return new stopBgp_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public stopBgp_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof stopBgp_result)
+ return this.equals((stopBgp_result)that);
+ return false;
+ }
+
+ public boolean equals(stopBgp_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(stopBgp_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("stopBgp_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class stopBgp_resultStandardSchemeFactory implements SchemeFactory {
+ public stopBgp_resultStandardScheme getScheme() {
+ return new stopBgp_resultStandardScheme();
+ }
+ }
+
+ private static class stopBgp_resultStandardScheme extends StandardScheme<stopBgp_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, stopBgp_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, stopBgp_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class stopBgp_resultTupleSchemeFactory implements SchemeFactory {
+ public stopBgp_resultTupleScheme getScheme() {
+ return new stopBgp_resultTupleScheme();
+ }
+ }
+
+ private static class stopBgp_resultTupleScheme extends TupleScheme<stopBgp_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, stopBgp_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, stopBgp_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class createPeer_args implements org.apache.thrift.TBase<createPeer_args, createPeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_args");
+
+ private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField AS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("asNumber", org.apache.thrift.protocol.TType.I32, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createPeer_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createPeer_argsTupleSchemeFactory());
+ }
+
+ public String ipAddress; // required
+ public int asNumber; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IP_ADDRESS((short)1, "ipAddress"),
+ AS_NUMBER((short)2, "asNumber");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IP_ADDRESS
+ return IP_ADDRESS;
+ case 2: // AS_NUMBER
+ return AS_NUMBER;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __ASNUMBER_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.AS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("asNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_args.class, metaDataMap);
+ }
+
+ public createPeer_args() {
+ }
+
+ public createPeer_args(
+ String ipAddress,
+ int asNumber)
+ {
+ this();
+ this.ipAddress = ipAddress;
+ this.asNumber = asNumber;
+ setAsNumberIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createPeer_args(createPeer_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetIpAddress()) {
+ this.ipAddress = other.ipAddress;
+ }
+ this.asNumber = other.asNumber;
+ }
+
+ public createPeer_args deepCopy() {
+ return new createPeer_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.ipAddress = null;
+ setAsNumberIsSet(false);
+ this.asNumber = 0;
+ }
+
+ public String getIpAddress() {
+ return this.ipAddress;
+ }
+
+ public createPeer_args setIpAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ return this;
+ }
+
+ public void unsetIpAddress() {
+ this.ipAddress = null;
+ }
+
+ /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
+ public boolean isSetIpAddress() {
+ return this.ipAddress != null;
+ }
+
+ public void setIpAddressIsSet(boolean value) {
+ if (!value) {
+ this.ipAddress = null;
+ }
+ }
+
+ public int getAsNumber() {
+ return this.asNumber;
+ }
+
+ public createPeer_args setAsNumber(int asNumber) {
+ this.asNumber = asNumber;
+ setAsNumberIsSet(true);
+ return this;
+ }
+
+ public void unsetAsNumber() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+ }
+
+ /** Returns true if field asNumber is set (has been assigned a value) and false otherwise */
+ public boolean isSetAsNumber() {
+ return EncodingUtils.testBit(__isset_bitfield, __ASNUMBER_ISSET_ID);
+ }
+
+ public void setAsNumberIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ASNUMBER_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IP_ADDRESS:
+ if (value == null) {
+ unsetIpAddress();
+ } else {
+ setIpAddress((String)value);
+ }
+ break;
+
+ case AS_NUMBER:
+ if (value == null) {
+ unsetAsNumber();
+ } else {
+ setAsNumber((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IP_ADDRESS:
+ return getIpAddress();
+
+ case AS_NUMBER:
+ return Integer.valueOf(getAsNumber());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IP_ADDRESS:
+ return isSetIpAddress();
+ case AS_NUMBER:
+ return isSetAsNumber();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createPeer_args)
+ return this.equals((createPeer_args)that);
+ return false;
+ }
+
+ public boolean equals(createPeer_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_ipAddress = true && this.isSetIpAddress();
+ boolean that_present_ipAddress = true && that.isSetIpAddress();
+ if (this_present_ipAddress || that_present_ipAddress) {
+ if (!(this_present_ipAddress && that_present_ipAddress))
+ return false;
+ if (!this.ipAddress.equals(that.ipAddress))
+ return false;
+ }
+
+ boolean this_present_asNumber = true;
+ boolean that_present_asNumber = true;
+ if (this_present_asNumber || that_present_asNumber) {
+ if (!(this_present_asNumber && that_present_asNumber))
+ return false;
+ if (this.asNumber != that.asNumber)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createPeer_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIpAddress()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAsNumber()).compareTo(other.isSetAsNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAsNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asNumber, other.asNumber);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("createPeer_args(");
+ boolean first = true;
+
+ sb.append("ipAddress:");
+ if (this.ipAddress == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ipAddress);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("asNumber:");
+ sb.append(this.asNumber);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class createPeer_argsStandardSchemeFactory implements SchemeFactory {
+ public createPeer_argsStandardScheme getScheme() {
+ return new createPeer_argsStandardScheme();
+ }
+ }
+
+ private static class createPeer_argsStandardScheme extends StandardScheme<createPeer_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IP_ADDRESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ipAddress = iprot.readString();
+ struct.setIpAddressIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // AS_NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.asNumber = iprot.readI32();
+ struct.setAsNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.ipAddress != null) {
+ oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
+ oprot.writeString(struct.ipAddress);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(AS_NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.asNumber);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createPeer_argsTupleSchemeFactory implements SchemeFactory {
+ public createPeer_argsTupleScheme getScheme() {
+ return new createPeer_argsTupleScheme();
+ }
+ }
+
+ private static class createPeer_argsTupleScheme extends TupleScheme<createPeer_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIpAddress()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAsNumber()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetIpAddress()) {
+ oprot.writeString(struct.ipAddress);
+ }
+ if (struct.isSetAsNumber()) {
+ oprot.writeI32(struct.asNumber);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.ipAddress = iprot.readString();
+ struct.setIpAddressIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.asNumber = iprot.readI32();
+ struct.setAsNumberIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class createPeer_result implements org.apache.thrift.TBase<createPeer_result, createPeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPeer_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPeer_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createPeer_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createPeer_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPeer_result.class, metaDataMap);
+ }
+
+ public createPeer_result() {
+ }
+
+ public createPeer_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createPeer_result(createPeer_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public createPeer_result deepCopy() {
+ return new createPeer_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public createPeer_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createPeer_result)
+ return this.equals((createPeer_result)that);
+ return false;
+ }
+
+ public boolean equals(createPeer_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createPeer_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("createPeer_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class createPeer_resultStandardSchemeFactory implements SchemeFactory {
+ public createPeer_resultStandardScheme getScheme() {
+ return new createPeer_resultStandardScheme();
+ }
+ }
+
+ private static class createPeer_resultStandardScheme extends StandardScheme<createPeer_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createPeer_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, createPeer_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createPeer_resultTupleSchemeFactory implements SchemeFactory {
+ public createPeer_resultTupleScheme getScheme() {
+ return new createPeer_resultTupleScheme();
+ }
+ }
+
+ private static class createPeer_resultTupleScheme extends TupleScheme<createPeer_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createPeer_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deletePeer_args implements org.apache.thrift.TBase<deletePeer_args, deletePeer_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_args");
+
+ private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deletePeer_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deletePeer_argsTupleSchemeFactory());
+ }
+
+ public String ipAddress; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IP_ADDRESS((short)1, "ipAddress");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IP_ADDRESS
+ return IP_ADDRESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_args.class, metaDataMap);
+ }
+
+ public deletePeer_args() {
+ }
+
+ public deletePeer_args(
+ String ipAddress)
+ {
+ this();
+ this.ipAddress = ipAddress;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deletePeer_args(deletePeer_args other) {
+ if (other.isSetIpAddress()) {
+ this.ipAddress = other.ipAddress;
+ }
+ }
+
+ public deletePeer_args deepCopy() {
+ return new deletePeer_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.ipAddress = null;
+ }
+
+ public String getIpAddress() {
+ return this.ipAddress;
+ }
+
+ public deletePeer_args setIpAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ return this;
+ }
+
+ public void unsetIpAddress() {
+ this.ipAddress = null;
+ }
+
+ /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
+ public boolean isSetIpAddress() {
+ return this.ipAddress != null;
+ }
+
+ public void setIpAddressIsSet(boolean value) {
+ if (!value) {
+ this.ipAddress = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IP_ADDRESS:
+ if (value == null) {
+ unsetIpAddress();
+ } else {
+ setIpAddress((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IP_ADDRESS:
+ return getIpAddress();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IP_ADDRESS:
+ return isSetIpAddress();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deletePeer_args)
+ return this.equals((deletePeer_args)that);
+ return false;
+ }
+
+ public boolean equals(deletePeer_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_ipAddress = true && this.isSetIpAddress();
+ boolean that_present_ipAddress = true && that.isSetIpAddress();
+ if (this_present_ipAddress || that_present_ipAddress) {
+ if (!(this_present_ipAddress && that_present_ipAddress))
+ return false;
+ if (!this.ipAddress.equals(that.ipAddress))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(deletePeer_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(other.isSetIpAddress());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIpAddress()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, other.ipAddress);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("deletePeer_args(");
+ boolean first = true;
+
+ sb.append("ipAddress:");
+ if (this.ipAddress == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ipAddress);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class deletePeer_argsStandardSchemeFactory implements SchemeFactory {
+ public deletePeer_argsStandardScheme getScheme() {
+ return new deletePeer_argsStandardScheme();
+ }
+ }
+
+ private static class deletePeer_argsStandardScheme extends StandardScheme<deletePeer_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IP_ADDRESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ipAddress = iprot.readString();
+ struct.setIpAddressIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.ipAddress != null) {
+ oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
+ oprot.writeString(struct.ipAddress);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deletePeer_argsTupleSchemeFactory implements SchemeFactory {
+ public deletePeer_argsTupleScheme getScheme() {
+ return new deletePeer_argsTupleScheme();
+ }
+ }
+
+ private static class deletePeer_argsTupleScheme extends TupleScheme<deletePeer_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIpAddress()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetIpAddress()) {
+ oprot.writeString(struct.ipAddress);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.ipAddress = iprot.readString();
+ struct.setIpAddressIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deletePeer_result implements org.apache.thrift.TBase<deletePeer_result, deletePeer_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePeer_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePeer_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deletePeer_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deletePeer_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePeer_result.class, metaDataMap);
+ }
+
+ public deletePeer_result() {
+ }
+
+ public deletePeer_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deletePeer_result(deletePeer_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public deletePeer_result deepCopy() {
+ return new deletePeer_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public deletePeer_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deletePeer_result)
+ return this.equals((deletePeer_result)that);
+ return false;
+ }
+
+ public boolean equals(deletePeer_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(deletePeer_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("deletePeer_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class deletePeer_resultStandardSchemeFactory implements SchemeFactory {
+ public deletePeer_resultStandardScheme getScheme() {
+ return new deletePeer_resultStandardScheme();
+ }
+ }
+
+ private static class deletePeer_resultStandardScheme extends StandardScheme<deletePeer_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deletePeer_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, deletePeer_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deletePeer_resultTupleSchemeFactory implements SchemeFactory {
+ public deletePeer_resultTupleScheme getScheme() {
+ return new deletePeer_resultTupleScheme();
+ }
+ }
+
+ private static class deletePeer_resultTupleScheme extends TupleScheme<deletePeer_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, deletePeer_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class addVrf_args implements org.apache.thrift.TBase<addVrf_args, addVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_args");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField IRTS_FIELD_DESC = new org.apache.thrift.protocol.TField("irts", org.apache.thrift.protocol.TType.LIST, (short)2);
+ private static final org.apache.thrift.protocol.TField ERTS_FIELD_DESC = new org.apache.thrift.protocol.TField("erts", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new addVrf_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new addVrf_argsTupleSchemeFactory());
+ }
+
+ public String rd; // required
+ public List<String> irts; // required
+ public List<String> erts; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RD((short)1, "rd"),
+ IRTS((short)2, "irts"),
+ ERTS((short)3, "erts");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RD
+ return RD;
+ case 2: // IRTS
+ return IRTS;
+ case 3: // ERTS
+ return ERTS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IRTS, new org.apache.thrift.meta_data.FieldMetaData("irts", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.ERTS, new org.apache.thrift.meta_data.FieldMetaData("erts", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_args.class, metaDataMap);
+ }
+
+ public addVrf_args() {
+ }
+
+ public addVrf_args(
+ String rd,
+ List<String> irts,
+ List<String> erts)
+ {
+ this();
+ this.rd = rd;
+ this.irts = irts;
+ this.erts = erts;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public addVrf_args(addVrf_args other) {
+ if (other.isSetRd()) {
+ this.rd = other.rd;
+ }
+ if (other.isSetIrts()) {
+ List<String> __this__irts = new ArrayList<String>(other.irts);
+ this.irts = __this__irts;
+ }
+ if (other.isSetErts()) {
+ List<String> __this__erts = new ArrayList<String>(other.erts);
+ this.erts = __this__erts;
+ }
+ }
+
+ public addVrf_args deepCopy() {
+ return new addVrf_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.rd = null;
+ this.irts = null;
+ this.erts = null;
+ }
+
+ public String getRd() {
+ return this.rd;
+ }
+
+ public addVrf_args setRd(String rd) {
+ this.rd = rd;
+ return this;
+ }
+
+ public void unsetRd() {
+ this.rd = null;
+ }
+
+ /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+ public boolean isSetRd() {
+ return this.rd != null;
+ }
+
+ public void setRdIsSet(boolean value) {
+ if (!value) {
+ this.rd = null;
+ }
+ }
+
+ public int getIrtsSize() {
+ return (this.irts == null) ? 0 : this.irts.size();
+ }
+
+ public java.util.Iterator<String> getIrtsIterator() {
+ return (this.irts == null) ? null : this.irts.iterator();
+ }
+
+ public void addToIrts(String elem) {
+ if (this.irts == null) {
+ this.irts = new ArrayList<String>();
+ }
+ this.irts.add(elem);
+ }
+
+ public List<String> getIrts() {
+ return this.irts;
+ }
+
+ public addVrf_args setIrts(List<String> irts) {
+ this.irts = irts;
+ return this;
+ }
+
+ public void unsetIrts() {
+ this.irts = null;
+ }
+
+ /** Returns true if field irts is set (has been assigned a value) and false otherwise */
+ public boolean isSetIrts() {
+ return this.irts != null;
+ }
+
+ public void setIrtsIsSet(boolean value) {
+ if (!value) {
+ this.irts = null;
+ }
+ }
+
+ public int getErtsSize() {
+ return (this.erts == null) ? 0 : this.erts.size();
+ }
+
+ public java.util.Iterator<String> getErtsIterator() {
+ return (this.erts == null) ? null : this.erts.iterator();
+ }
+
+ public void addToErts(String elem) {
+ if (this.erts == null) {
+ this.erts = new ArrayList<String>();
+ }
+ this.erts.add(elem);
+ }
+
+ public List<String> getErts() {
+ return this.erts;
+ }
+
+ public addVrf_args setErts(List<String> erts) {
+ this.erts = erts;
+ return this;
+ }
+
+ public void unsetErts() {
+ this.erts = null;
+ }
+
+ /** Returns true if field erts is set (has been assigned a value) and false otherwise */
+ public boolean isSetErts() {
+ return this.erts != null;
+ }
+
+ public void setErtsIsSet(boolean value) {
+ if (!value) {
+ this.erts = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RD:
+ if (value == null) {
+ unsetRd();
+ } else {
+ setRd((String)value);
+ }
+ break;
+
+ case IRTS:
+ if (value == null) {
+ unsetIrts();
+ } else {
+ setIrts((List<String>)value);
+ }
+ break;
+
+ case ERTS:
+ if (value == null) {
+ unsetErts();
+ } else {
+ setErts((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RD:
+ return getRd();
+
+ case IRTS:
+ return getIrts();
+
+ case ERTS:
+ return getErts();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RD:
+ return isSetRd();
+ case IRTS:
+ return isSetIrts();
+ case ERTS:
+ return isSetErts();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof addVrf_args)
+ return this.equals((addVrf_args)that);
+ return false;
+ }
+
+ public boolean equals(addVrf_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_rd = true && this.isSetRd();
+ boolean that_present_rd = true && that.isSetRd();
+ if (this_present_rd || that_present_rd) {
+ if (!(this_present_rd && that_present_rd))
+ return false;
+ if (!this.rd.equals(that.rd))
+ return false;
+ }
+
+ boolean this_present_irts = true && this.isSetIrts();
+ boolean that_present_irts = true && that.isSetIrts();
+ if (this_present_irts || that_present_irts) {
+ if (!(this_present_irts && that_present_irts))
+ return false;
+ if (!this.irts.equals(that.irts))
+ return false;
+ }
+
+ boolean this_present_erts = true && this.isSetErts();
+ boolean that_present_erts = true && that.isSetErts();
+ if (this_present_erts || that_present_erts) {
+ if (!(this_present_erts && that_present_erts))
+ return false;
+ if (!this.erts.equals(that.erts))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(addVrf_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRd()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIrts()).compareTo(other.isSetIrts());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIrts()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.irts, other.irts);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetErts()).compareTo(other.isSetErts());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetErts()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.erts, other.erts);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("addVrf_args(");
+ boolean first = true;
+
+ sb.append("rd:");
+ if (this.rd == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rd);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("irts:");
+ if (this.irts == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.irts);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("erts:");
+ if (this.erts == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.erts);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class addVrf_argsStandardSchemeFactory implements SchemeFactory {
+ public addVrf_argsStandardScheme getScheme() {
+ return new addVrf_argsStandardScheme();
+ }
+ }
+
+ private static class addVrf_argsStandardScheme extends StandardScheme<addVrf_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // IRTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+ struct.irts = new ArrayList<String>(_list8.size);
+ for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ {
+ String _elem10;
+ _elem10 = iprot.readString();
+ struct.irts.add(_elem10);
+ }
+ iprot.readListEnd();
+ }
+ struct.setIrtsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ERTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
+ struct.erts = new ArrayList<String>(_list11.size);
+ for (int _i12 = 0; _i12 < _list11.size; ++_i12)
+ {
+ String _elem13;
+ _elem13 = iprot.readString();
+ struct.erts.add(_elem13);
+ }
+ iprot.readListEnd();
+ }
+ struct.setErtsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.rd != null) {
+ oprot.writeFieldBegin(RD_FIELD_DESC);
+ oprot.writeString(struct.rd);
+ oprot.writeFieldEnd();
+ }
+ if (struct.irts != null) {
+ oprot.writeFieldBegin(IRTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.irts.size()));
+ for (String _iter14 : struct.irts)
+ {
+ oprot.writeString(_iter14);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.erts != null) {
+ oprot.writeFieldBegin(ERTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.erts.size()));
+ for (String _iter15 : struct.erts)
+ {
+ oprot.writeString(_iter15);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class addVrf_argsTupleSchemeFactory implements SchemeFactory {
+ public addVrf_argsTupleScheme getScheme() {
+ return new addVrf_argsTupleScheme();
+ }
+ }
+
+ private static class addVrf_argsTupleScheme extends TupleScheme<addVrf_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRd()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIrts()) {
+ optionals.set(1);
+ }
+ if (struct.isSetErts()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetRd()) {
+ oprot.writeString(struct.rd);
+ }
+ if (struct.isSetIrts()) {
+ {
+ oprot.writeI32(struct.irts.size());
+ for (String _iter16 : struct.irts)
+ {
+ oprot.writeString(_iter16);
+ }
+ }
+ }
+ if (struct.isSetErts()) {
+ {
+ oprot.writeI32(struct.erts.size());
+ for (String _iter17 : struct.erts)
+ {
+ oprot.writeString(_iter17);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.irts = new ArrayList<String>(_list18.size);
+ for (int _i19 = 0; _i19 < _list18.size; ++_i19)
+ {
+ String _elem20;
+ _elem20 = iprot.readString();
+ struct.irts.add(_elem20);
+ }
+ }
+ struct.setIrtsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.erts = new ArrayList<String>(_list21.size);
+ for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ {
+ String _elem23;
+ _elem23 = iprot.readString();
+ struct.erts.add(_elem23);
+ }
+ }
+ struct.setErtsIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class addVrf_result implements org.apache.thrift.TBase<addVrf_result, addVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<addVrf_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVrf_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new addVrf_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new addVrf_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVrf_result.class, metaDataMap);
+ }
+
+ public addVrf_result() {
+ }
+
+ public addVrf_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public addVrf_result(addVrf_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public addVrf_result deepCopy() {
+ return new addVrf_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public addVrf_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof addVrf_result)
+ return this.equals((addVrf_result)that);
+ return false;
+ }
+
+ public boolean equals(addVrf_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(addVrf_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("addVrf_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class addVrf_resultStandardSchemeFactory implements SchemeFactory {
+ public addVrf_resultStandardScheme getScheme() {
+ return new addVrf_resultStandardScheme();
+ }
+ }
+
+ private static class addVrf_resultStandardScheme extends StandardScheme<addVrf_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, addVrf_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, addVrf_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class addVrf_resultTupleSchemeFactory implements SchemeFactory {
+ public addVrf_resultTupleScheme getScheme() {
+ return new addVrf_resultTupleScheme();
+ }
+ }
+
+ private static class addVrf_resultTupleScheme extends TupleScheme<addVrf_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, addVrf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class delVrf_args implements org.apache.thrift.TBase<delVrf_args, delVrf_args._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_args");
+
+ 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)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new delVrf_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new delVrf_argsTupleSchemeFactory());
+ }
+
+ public String rd; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RD((short)1, "rd");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RD
+ return RD;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_args.class, metaDataMap);
+ }
+
+ public delVrf_args() {
+ }
+
+ public delVrf_args(
+ String rd)
+ {
+ this();
+ this.rd = rd;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public delVrf_args(delVrf_args other) {
+ if (other.isSetRd()) {
+ this.rd = other.rd;
+ }
+ }
+
+ public delVrf_args deepCopy() {
+ return new delVrf_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.rd = null;
+ }
+
+ public String getRd() {
+ return this.rd;
+ }
+
+ public delVrf_args setRd(String rd) {
+ this.rd = rd;
+ return this;
+ }
+
+ public void unsetRd() {
+ this.rd = null;
+ }
+
+ /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+ public boolean isSetRd() {
+ return this.rd != null;
+ }
+
+ public void setRdIsSet(boolean value) {
+ if (!value) {
+ this.rd = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RD:
+ if (value == null) {
+ unsetRd();
+ } else {
+ setRd((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RD:
+ return getRd();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RD:
+ return isSetRd();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof delVrf_args)
+ return this.equals((delVrf_args)that);
+ return false;
+ }
+
+ public boolean equals(delVrf_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_rd = true && this.isSetRd();
+ boolean that_present_rd = true && that.isSetRd();
+ if (this_present_rd || that_present_rd) {
+ if (!(this_present_rd && that_present_rd))
+ return false;
+ if (!this.rd.equals(that.rd))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(delVrf_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRd()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("delVrf_args(");
+ boolean first = true;
+
+ sb.append("rd:");
+ if (this.rd == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rd);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class delVrf_argsStandardSchemeFactory implements SchemeFactory {
+ public delVrf_argsStandardScheme getScheme() {
+ return new delVrf_argsStandardScheme();
+ }
+ }
+
+ private static class delVrf_argsStandardScheme extends StandardScheme<delVrf_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.rd != null) {
+ oprot.writeFieldBegin(RD_FIELD_DESC);
+ oprot.writeString(struct.rd);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class delVrf_argsTupleSchemeFactory implements SchemeFactory {
+ public delVrf_argsTupleScheme getScheme() {
+ return new delVrf_argsTupleScheme();
+ }
+ }
+
+ private static class delVrf_argsTupleScheme extends TupleScheme<delVrf_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRd()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetRd()) {
+ oprot.writeString(struct.rd);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class delVrf_result implements org.apache.thrift.TBase<delVrf_result, delVrf_result._Fields>, java.io.Serializable, Cloneable, Comparable<delVrf_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delVrf_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new delVrf_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new delVrf_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delVrf_result.class, metaDataMap);
+ }
+
+ public delVrf_result() {
+ }
+
+ public delVrf_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public delVrf_result(delVrf_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public delVrf_result deepCopy() {
+ return new delVrf_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public delVrf_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof delVrf_result)
+ return this.equals((delVrf_result)that);
+ return false;
+ }
+
+ public boolean equals(delVrf_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(delVrf_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("delVrf_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class delVrf_resultStandardSchemeFactory implements SchemeFactory {
+ public delVrf_resultStandardScheme getScheme() {
+ return new delVrf_resultStandardScheme();
+ }
+ }
+
+ private static class delVrf_resultStandardScheme extends StandardScheme<delVrf_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, delVrf_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, delVrf_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class delVrf_resultTupleSchemeFactory implements SchemeFactory {
+ public delVrf_resultTupleScheme getScheme() {
+ return new delVrf_resultTupleScheme();
+ }
+ }
+
+ private static class delVrf_resultTupleScheme extends TupleScheme<delVrf_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, delVrf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class pushRoute_args implements org.apache.thrift.TBase<pushRoute_args, pushRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_args");
+
+ 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)1);
+ 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)2);
+ 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)3);
+ 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);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new pushRoute_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new pushRoute_argsTupleSchemeFactory());
+ }
+
+ public String prefix; // required
+ public String nexthop; // required
+ public String rd; // required
+ public int label; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PREFIX((short)1, "prefix"),
+ NEXTHOP((short)2, "nexthop"),
+ RD((short)3, "rd"),
+ LABEL((short)4, "label");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PREFIX
+ return PREFIX;
+ case 2: // NEXTHOP
+ return NEXTHOP;
+ case 3: // RD
+ return RD;
+ case 4: // LABEL
+ return LABEL;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __LABEL_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NEXTHOP, new org.apache.thrift.meta_data.FieldMetaData("nexthop", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_args.class, metaDataMap);
+ }
+
+ public pushRoute_args() {
+ }
+
+ public pushRoute_args(
+ String prefix,
+ String nexthop,
+ String rd,
+ int label)
+ {
+ this();
+ this.prefix = prefix;
+ this.nexthop = nexthop;
+ this.rd = rd;
+ this.label = label;
+ setLabelIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public pushRoute_args(pushRoute_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetPrefix()) {
+ this.prefix = other.prefix;
+ }
+ if (other.isSetNexthop()) {
+ this.nexthop = other.nexthop;
+ }
+ if (other.isSetRd()) {
+ this.rd = other.rd;
+ }
+ this.label = other.label;
+ }
+
+ public pushRoute_args deepCopy() {
+ return new pushRoute_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.prefix = null;
+ this.nexthop = null;
+ this.rd = null;
+ setLabelIsSet(false);
+ this.label = 0;
+ }
+
+ public String getPrefix() {
+ return this.prefix;
+ }
+
+ public pushRoute_args setPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ public void unsetPrefix() {
+ this.prefix = null;
+ }
+
+ /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
+ public boolean isSetPrefix() {
+ return this.prefix != null;
+ }
+
+ public void setPrefixIsSet(boolean value) {
+ if (!value) {
+ this.prefix = null;
+ }
+ }
+
+ public String getNexthop() {
+ return this.nexthop;
+ }
+
+ public pushRoute_args setNexthop(String nexthop) {
+ this.nexthop = nexthop;
+ return this;
+ }
+
+ public void unsetNexthop() {
+ this.nexthop = null;
+ }
+
+ /** Returns true if field nexthop is set (has been assigned a value) and false otherwise */
+ public boolean isSetNexthop() {
+ return this.nexthop != null;
+ }
+
+ public void setNexthopIsSet(boolean value) {
+ if (!value) {
+ this.nexthop = null;
+ }
+ }
+
+ public String getRd() {
+ return this.rd;
+ }
+
+ public pushRoute_args setRd(String rd) {
+ this.rd = rd;
+ return this;
+ }
+
+ public void unsetRd() {
+ this.rd = null;
+ }
+
+ /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+ public boolean isSetRd() {
+ return this.rd != null;
+ }
+
+ public void setRdIsSet(boolean value) {
+ if (!value) {
+ this.rd = null;
+ }
+ }
+
+ public int getLabel() {
+ return this.label;
+ }
+
+ public pushRoute_args setLabel(int label) {
+ this.label = label;
+ setLabelIsSet(true);
+ return this;
+ }
+
+ public void unsetLabel() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LABEL_ISSET_ID);
+ }
+
+ /** Returns true if field label is set (has been assigned a value) and false otherwise */
+ public boolean isSetLabel() {
+ return EncodingUtils.testBit(__isset_bitfield, __LABEL_ISSET_ID);
+ }
+
+ public void setLabelIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LABEL_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PREFIX:
+ if (value == null) {
+ unsetPrefix();
+ } else {
+ setPrefix((String)value);
+ }
+ break;
+
+ case NEXTHOP:
+ if (value == null) {
+ unsetNexthop();
+ } else {
+ setNexthop((String)value);
+ }
+ break;
+
+ case RD:
+ if (value == null) {
+ unsetRd();
+ } else {
+ setRd((String)value);
+ }
+ break;
+
+ case LABEL:
+ if (value == null) {
+ unsetLabel();
+ } else {
+ setLabel((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PREFIX:
+ return getPrefix();
+
+ case NEXTHOP:
+ return getNexthop();
+
+ case RD:
+ return getRd();
+
+ case LABEL:
+ return Integer.valueOf(getLabel());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PREFIX:
+ return isSetPrefix();
+ case NEXTHOP:
+ return isSetNexthop();
+ case RD:
+ return isSetRd();
+ case LABEL:
+ return isSetLabel();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof pushRoute_args)
+ return this.equals((pushRoute_args)that);
+ return false;
+ }
+
+ public boolean equals(pushRoute_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_prefix = true && this.isSetPrefix();
+ boolean that_present_prefix = true && that.isSetPrefix();
+ if (this_present_prefix || that_present_prefix) {
+ if (!(this_present_prefix && that_present_prefix))
+ return false;
+ if (!this.prefix.equals(that.prefix))
+ return false;
+ }
+
+ boolean this_present_nexthop = true && this.isSetNexthop();
+ boolean that_present_nexthop = true && that.isSetNexthop();
+ if (this_present_nexthop || that_present_nexthop) {
+ if (!(this_present_nexthop && that_present_nexthop))
+ return false;
+ if (!this.nexthop.equals(that.nexthop))
+ return false;
+ }
+
+ boolean this_present_rd = true && this.isSetRd();
+ boolean that_present_rd = true && that.isSetRd();
+ if (this_present_rd || that_present_rd) {
+ if (!(this_present_rd && that_present_rd))
+ return false;
+ if (!this.rd.equals(that.rd))
+ return false;
+ }
+
+ boolean this_present_label = true;
+ boolean that_present_label = true;
+ if (this_present_label || that_present_label) {
+ if (!(this_present_label && that_present_label))
+ return false;
+ if (this.label != that.label)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(pushRoute_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrefix()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNexthop()).compareTo(other.isSetNexthop());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNexthop()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nexthop, other.nexthop);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRd()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLabel()).compareTo(other.isSetLabel());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLabel()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("pushRoute_args(");
+ boolean first = true;
+
+ sb.append("prefix:");
+ if (this.prefix == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.prefix);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("nexthop:");
+ if (this.nexthop == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nexthop);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("rd:");
+ if (this.rd == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rd);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("label:");
+ sb.append(this.label);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class pushRoute_argsStandardSchemeFactory implements SchemeFactory {
+ public pushRoute_argsStandardScheme getScheme() {
+ return new pushRoute_argsStandardScheme();
+ }
+ }
+
+ private static class pushRoute_argsStandardScheme extends StandardScheme<pushRoute_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // PREFIX
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.prefix = iprot.readString();
+ struct.setPrefixIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NEXTHOP
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nexthop = iprot.readString();
+ struct.setNexthopIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // RD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // LABEL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.label = iprot.readI32();
+ struct.setLabelIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.prefix != null) {
+ oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+ oprot.writeString(struct.prefix);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nexthop != null) {
+ oprot.writeFieldBegin(NEXTHOP_FIELD_DESC);
+ oprot.writeString(struct.nexthop);
+ oprot.writeFieldEnd();
+ }
+ if (struct.rd != null) {
+ oprot.writeFieldBegin(RD_FIELD_DESC);
+ oprot.writeString(struct.rd);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LABEL_FIELD_DESC);
+ oprot.writeI32(struct.label);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class pushRoute_argsTupleSchemeFactory implements SchemeFactory {
+ public pushRoute_argsTupleScheme getScheme() {
+ return new pushRoute_argsTupleScheme();
+ }
+ }
+
+ private static class pushRoute_argsTupleScheme extends TupleScheme<pushRoute_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPrefix()) {
+ optionals.set(0);
+ }
+ if (struct.isSetNexthop()) {
+ optionals.set(1);
+ }
+ if (struct.isSetRd()) {
+ optionals.set(2);
+ }
+ if (struct.isSetLabel()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetPrefix()) {
+ oprot.writeString(struct.prefix);
+ }
+ if (struct.isSetNexthop()) {
+ oprot.writeString(struct.nexthop);
+ }
+ if (struct.isSetRd()) {
+ oprot.writeString(struct.rd);
+ }
+ if (struct.isSetLabel()) {
+ oprot.writeI32(struct.label);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.prefix = iprot.readString();
+ struct.setPrefixIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.nexthop = iprot.readString();
+ struct.setNexthopIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.label = iprot.readI32();
+ struct.setLabelIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class pushRoute_result implements org.apache.thrift.TBase<pushRoute_result, pushRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<pushRoute_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushRoute_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new pushRoute_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new pushRoute_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushRoute_result.class, metaDataMap);
+ }
+
+ public pushRoute_result() {
+ }
+
+ public pushRoute_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public pushRoute_result(pushRoute_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public pushRoute_result deepCopy() {
+ return new pushRoute_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public pushRoute_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof pushRoute_result)
+ return this.equals((pushRoute_result)that);
+ return false;
+ }
+
+ public boolean equals(pushRoute_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(pushRoute_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("pushRoute_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class pushRoute_resultStandardSchemeFactory implements SchemeFactory {
+ public pushRoute_resultStandardScheme getScheme() {
+ return new pushRoute_resultStandardScheme();
+ }
+ }
+
+ private static class pushRoute_resultStandardScheme extends StandardScheme<pushRoute_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, pushRoute_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, pushRoute_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class pushRoute_resultTupleSchemeFactory implements SchemeFactory {
+ public pushRoute_resultTupleScheme getScheme() {
+ return new pushRoute_resultTupleScheme();
+ }
+ }
+
+ private static class pushRoute_resultTupleScheme extends TupleScheme<pushRoute_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, pushRoute_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class withdrawRoute_args implements org.apache.thrift.TBase<withdrawRoute_args, withdrawRoute_args._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_args");
+
+ 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)1);
+ 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)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new withdrawRoute_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new withdrawRoute_argsTupleSchemeFactory());
+ }
+
+ public String prefix; // required
+ public String rd; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PREFIX((short)1, "prefix"),
+ RD((short)2, "rd");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PREFIX
+ return PREFIX;
+ case 2: // RD
+ return RD;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RD, new org.apache.thrift.meta_data.FieldMetaData("rd", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_args.class, metaDataMap);
+ }
+
+ public withdrawRoute_args() {
+ }
+
+ public withdrawRoute_args(
+ String prefix,
+ String rd)
+ {
+ this();
+ this.prefix = prefix;
+ this.rd = rd;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public withdrawRoute_args(withdrawRoute_args other) {
+ if (other.isSetPrefix()) {
+ this.prefix = other.prefix;
+ }
+ if (other.isSetRd()) {
+ this.rd = other.rd;
+ }
+ }
+
+ public withdrawRoute_args deepCopy() {
+ return new withdrawRoute_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.prefix = null;
+ this.rd = null;
+ }
+
+ public String getPrefix() {
+ return this.prefix;
+ }
+
+ public withdrawRoute_args setPrefix(String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ public void unsetPrefix() {
+ this.prefix = null;
+ }
+
+ /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
+ public boolean isSetPrefix() {
+ return this.prefix != null;
+ }
+
+ public void setPrefixIsSet(boolean value) {
+ if (!value) {
+ this.prefix = null;
+ }
+ }
+
+ public String getRd() {
+ return this.rd;
+ }
+
+ public withdrawRoute_args setRd(String rd) {
+ this.rd = rd;
+ return this;
+ }
+
+ public void unsetRd() {
+ this.rd = null;
+ }
+
+ /** Returns true if field rd is set (has been assigned a value) and false otherwise */
+ public boolean isSetRd() {
+ return this.rd != null;
+ }
+
+ public void setRdIsSet(boolean value) {
+ if (!value) {
+ this.rd = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PREFIX:
+ if (value == null) {
+ unsetPrefix();
+ } else {
+ setPrefix((String)value);
+ }
+ break;
+
+ case RD:
+ if (value == null) {
+ unsetRd();
+ } else {
+ setRd((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PREFIX:
+ return getPrefix();
+
+ case RD:
+ return getRd();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PREFIX:
+ return isSetPrefix();
+ case RD:
+ return isSetRd();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof withdrawRoute_args)
+ return this.equals((withdrawRoute_args)that);
+ return false;
+ }
+
+ public boolean equals(withdrawRoute_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_prefix = true && this.isSetPrefix();
+ boolean that_present_prefix = true && that.isSetPrefix();
+ if (this_present_prefix || that_present_prefix) {
+ if (!(this_present_prefix && that_present_prefix))
+ return false;
+ if (!this.prefix.equals(that.prefix))
+ return false;
+ }
+
+ boolean this_present_rd = true && this.isSetRd();
+ boolean that_present_rd = true && that.isSetRd();
+ if (this_present_rd || that_present_rd) {
+ if (!(this_present_rd && that_present_rd))
+ return false;
+ if (!this.rd.equals(that.rd))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(withdrawRoute_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(other.isSetPrefix());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrefix()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, other.prefix);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRd()).compareTo(other.isSetRd());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRd()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rd, other.rd);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("withdrawRoute_args(");
+ boolean first = true;
+
+ sb.append("prefix:");
+ if (this.prefix == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.prefix);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("rd:");
+ if (this.rd == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rd);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class withdrawRoute_argsStandardSchemeFactory implements SchemeFactory {
+ public withdrawRoute_argsStandardScheme getScheme() {
+ return new withdrawRoute_argsStandardScheme();
+ }
+ }
+
+ private static class withdrawRoute_argsStandardScheme extends StandardScheme<withdrawRoute_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // PREFIX
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.prefix = iprot.readString();
+ struct.setPrefixIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // RD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.prefix != null) {
+ oprot.writeFieldBegin(PREFIX_FIELD_DESC);
+ oprot.writeString(struct.prefix);
+ oprot.writeFieldEnd();
+ }
+ if (struct.rd != null) {
+ oprot.writeFieldBegin(RD_FIELD_DESC);
+ oprot.writeString(struct.rd);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class withdrawRoute_argsTupleSchemeFactory implements SchemeFactory {
+ public withdrawRoute_argsTupleScheme getScheme() {
+ return new withdrawRoute_argsTupleScheme();
+ }
+ }
+
+ private static class withdrawRoute_argsTupleScheme extends TupleScheme<withdrawRoute_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPrefix()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRd()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetPrefix()) {
+ oprot.writeString(struct.prefix);
+ }
+ if (struct.isSetRd()) {
+ oprot.writeString(struct.rd);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.prefix = iprot.readString();
+ struct.setPrefixIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.rd = iprot.readString();
+ struct.setRdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class withdrawRoute_result implements org.apache.thrift.TBase<withdrawRoute_result, withdrawRoute_result._Fields>, java.io.Serializable, Cloneable, Comparable<withdrawRoute_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("withdrawRoute_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new withdrawRoute_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new withdrawRoute_resultTupleSchemeFactory());
+ }
+
+ public int success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(withdrawRoute_result.class, metaDataMap);
+ }
+
+ public withdrawRoute_result() {
+ }
+
+ public withdrawRoute_result(
+ int success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public withdrawRoute_result(withdrawRoute_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public withdrawRoute_result deepCopy() {
+ return new withdrawRoute_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public int getSuccess() {
+ return this.success;
+ }
+
+ public withdrawRoute_result setSuccess(int success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Integer.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof withdrawRoute_result)
+ return this.equals((withdrawRoute_result)that);
+ return false;
+ }
+
+ public boolean equals(withdrawRoute_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(withdrawRoute_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("withdrawRoute_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class withdrawRoute_resultStandardSchemeFactory implements SchemeFactory {
+ public withdrawRoute_resultStandardScheme getScheme() {
+ return new withdrawRoute_resultStandardScheme();
+ }
+ }
+
+ private static class withdrawRoute_resultStandardScheme extends StandardScheme<withdrawRoute_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI32(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class withdrawRoute_resultTupleSchemeFactory implements SchemeFactory {
+ public withdrawRoute_resultTupleScheme getScheme() {
+ return new withdrawRoute_resultTupleScheme();
+ }
+ }
+
+ private static class withdrawRoute_resultTupleScheme extends TupleScheme<withdrawRoute_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI32(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, withdrawRoute_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI32();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class setEbgpMultihop_args implements org.apache.thrift.TBase<setEbgpMultihop_args, setEbgpMultihop_args._Fields>, java.io.Serializable, Cloneable, Comparable<setEbgpMultihop_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setEbgpMultihop_args");
+
+ private static final org.apache.thrift.protocol.TField PEER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("peerIp", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField N_HOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("nHops", org.apache.thrift.protocol.TType.I32, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setEbgpMultihop_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setEbgpMultihop_argsTupleSchemeFactory());
+ }
+
+ public String peerIp; // required
+ public int nHops; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PEER_IP((short)1, "peerIp"),
+ N_HOPS((short)2, "nHops");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PEER_IP
+ return PEER_IP;
+ case 2: // N_HOPS
+ return N_HOPS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __NHOPS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PEER_IP, new org.apache.thrift.meta_data.FieldMetaData("peerIp", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.N_HOPS, new org.apache.thrift.meta_data.FieldMetaData("nHops", org.apache.thrift.TFieldRequirementType.DEFAULT,