public boolean equals(Response that) { if (that == null) return false; boolean this_present_ResultType = true && this.isSetResultType(); boolean that_present_ResultType = true && that.isSetResultType(); if (this_present_ResultType || that_present_ResultType) { if (!(this_present_ResultType && that_present_ResultType)) return false; if (!this.ResultType.equals(that.ResultType)) return false; } boolean this_present_Result = true && this.isSetResult(); boolean that_present_Result = true && that.isSetResult(); if (this_present_Result || that_present_Result) { if (!(this_present_Result && that_present_Result)) return false; if (!this.Result.equals(that.Result)) return false; } boolean this_present_OperationId = true && this.isSetOperationId(); boolean that_present_OperationId = true && that.isSetOperationId(); if (this_present_OperationId || that_present_OperationId) { if (!(this_present_OperationId && that_present_OperationId)) return false; if (!this.OperationId.equals(that.OperationId)) return false; } return true; }
/** Performs a deep copy on <i>other</i>. */ public Response(Response other) { if (other.isSetResultType()) { this.ResultType = other.ResultType; } if (other.isSetResult()) { this.Result = org.apache.thrift.TBaseHelper.copyBinary(other.Result); } if (other.isSetOperationId()) { this.OperationId = other.OperationId; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Response struct) throws TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetResultType()) { optionals.set(0); } if (struct.isSetResult()) { optionals.set(1); } if (struct.isSetOperationId()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetResultType()) { oprot.writeString(struct.ResultType); } if (struct.isSetResult()) { oprot.writeBinary(struct.Result); } if (struct.isSetOperationId()) { oprot.writeString(struct.OperationId); } }
@Override public int compareTo(Response other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetResultType()).compareTo(other.isSetResultType()); if (lastComparison != 0) { return lastComparison; } if (isSetResultType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ResultType, other.ResultType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult()); if (lastComparison != 0) { return lastComparison; } if (isSetResult()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Result, other.Result); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(other.isSetOperationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.OperationId, other.OperationId); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void read(org.apache.thrift.protocol.TProtocol iprot, Response struct) throws 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: // RESULT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ResultType = iprot.readString(); struct.setResultTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RESULT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.Result = iprot.readBinary(); struct.setResultIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // OPERATION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.OperationId = iprot.readString(); struct.setOperationIdIsSet(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(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Response struct) throws TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.ResultType = iprot.readString(); struct.setResultTypeIsSet(true); } if (incoming.get(1)) { struct.Result = iprot.readBinary(); struct.setResultIsSet(true); } if (incoming.get(2)) { struct.OperationId = iprot.readString(); struct.setOperationIdIsSet(true); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, Response struct) throws TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ResultType != null) { oprot.writeFieldBegin(RESULT_TYPE_FIELD_DESC); oprot.writeString(struct.ResultType); oprot.writeFieldEnd(); } if (struct.Result != null) { oprot.writeFieldBegin(RESULT_FIELD_DESC); oprot.writeBinary(struct.Result); oprot.writeFieldEnd(); } if (struct.OperationId != null) { oprot.writeFieldBegin(OPERATION_ID_FIELD_DESC); oprot.writeString(struct.OperationId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }