@Override public int compareTo(TGetTypeInfoResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** Performs a deep copy on <i>other</i>. */ public TGetTypeInfoResp(TGetTypeInfoResp other) { if (other.isSetStatus()) { this.status = new TStatus(other.status); } if (other.isSetOperationHandle()) { this.operationHandle = new TOperationHandle(other.operationHandle); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TGetTypeInfoResp struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.status = new TStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(true); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TGetTypeInfoResp struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.status.write(oprot); BitSet optionals = new BitSet(); if (struct.isSetOperationHandle()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetOperationHandle()) { struct.operationHandle.write(oprot); } }
public boolean equals(TGetTypeInfoResp that) { if (that == null) return false; boolean this_present_status = true && this.isSetStatus(); boolean that_present_status = true && that.isSetStatus(); if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status)) return false; if (!this.status.equals(that.status)) return false; } boolean this_present_operationHandle = true && this.isSetOperationHandle(); boolean that_present_operationHandle = true && that.isSetOperationHandle(); if (this_present_operationHandle || that_present_operationHandle) { if (!(this_present_operationHandle && that_present_operationHandle)) return false; if (!this.operationHandle.equals(that.operationHandle)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetTypeInfoResp struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.status != null) { oprot.writeFieldBegin(STATUS_FIELD_DESC); struct.status.write(oprot); oprot.writeFieldEnd(); } if (struct.operationHandle != null) { if (struct.isSetOperationHandle()) { oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC); struct.operationHandle.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTypeInfoResp 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: // STATUS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.status = new TStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OPERATION_HANDLE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(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(); struct.validate(); }