@Override public int compareTo(DeleteMessageRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName()); if (lastComparison != 0) { return lastComparison; } if (isSetQueueName()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetReceiptHandle()).compareTo(other.isSetReceiptHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetReceiptHandle()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.receiptHandle, other.receiptHandle); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** Performs a deep copy on <i>other</i>. */ public DeleteMessageRequest(DeleteMessageRequest other) { if (other.isSetQueueName()) { this.queueName = other.queueName; } if (other.isSetReceiptHandle()) { this.receiptHandle = other.receiptHandle; } }
@Override public void read(libthrift091.protocol.TProtocol prot, DeleteMessageRequest struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.queueName = iprot.readString(); struct.setQueueNameIsSet(true); struct.receiptHandle = iprot.readString(); struct.setReceiptHandleIsSet(true); }
public boolean equals(DeleteMessageRequest that) { if (that == null) return false; boolean this_present_queueName = true && this.isSetQueueName(); boolean that_present_queueName = true && that.isSetQueueName(); if (this_present_queueName || that_present_queueName) { if (!(this_present_queueName && that_present_queueName)) return false; if (!this.queueName.equals(that.queueName)) return false; } boolean this_present_receiptHandle = true && this.isSetReceiptHandle(); boolean that_present_receiptHandle = true && that.isSetReceiptHandle(); if (this_present_receiptHandle || that_present_receiptHandle) { if (!(this_present_receiptHandle && that_present_receiptHandle)) return false; if (!this.receiptHandle.equals(that.receiptHandle)) return false; } return true; }
public void read(libthrift091.protocol.TProtocol iprot, DeleteMessageRequest struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.queueName = iprot.readString(); struct.setQueueNameIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RECEIPT_HANDLE if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.receiptHandle = iprot.readString(); struct.setReceiptHandleIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.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(libthrift091.protocol.TProtocol oprot, DeleteMessageRequest struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queueName != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queueName); oprot.writeFieldEnd(); } if (struct.receiptHandle != null) { oprot.writeFieldBegin(RECEIPT_HANDLE_FIELD_DESC); oprot.writeString(struct.receiptHandle); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }