if (getApprovalTime() != null) sb.append("ApprovalTime: ").append(getApprovalTime()).append(","); if (getRejectionTime() != null) sb.append("RejectionTime: ").append(getRejectionTime()).append(","); if (getDeadline() != null) sb.append("Deadline: ").append(getDeadline()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAssignmentId() == null) ? 0 : getAssignmentId().hashCode()); hashCode = prime * hashCode + ((getWorkerId() == null) ? 0 : getWorkerId().hashCode()); hashCode = prime * hashCode + ((getHITId() == null) ? 0 : getHITId().hashCode()); hashCode = prime * hashCode + ((getAssignmentStatus() == null) ? 0 : getAssignmentStatus().hashCode()); hashCode = prime * hashCode + ((getAutoApprovalTime() == null) ? 0 : getAutoApprovalTime().hashCode()); hashCode = prime * hashCode + ((getAcceptTime() == null) ? 0 : getAcceptTime().hashCode()); hashCode = prime * hashCode + ((getSubmitTime() == null) ? 0 : getSubmitTime().hashCode()); hashCode = prime * hashCode + ((getApprovalTime() == null) ? 0 : getApprovalTime().hashCode()); hashCode = prime * hashCode + ((getRejectionTime() == null) ? 0 : getRejectionTime().hashCode()); hashCode = prime * hashCode + ((getDeadline() == null) ? 0 : getDeadline().hashCode()); hashCode = prime * hashCode + ((getAnswer() == null) ? 0 : getAnswer().hashCode()); hashCode = prime * hashCode + ((getRequesterFeedback() == null) ? 0 : getRequesterFeedback().hashCode()); return hashCode; }
if (other.getApprovalTime() != null && other.getApprovalTime().equals(this.getApprovalTime()) == false) return false; if (other.getRejectionTime() == null ^ this.getRejectionTime() == null) return false; if (other.getRejectionTime() != null && other.getRejectionTime().equals(this.getRejectionTime()) == false) return false; if (other.getDeadline() == null ^ this.getDeadline() == null)
/** * Marshall the given parameter object. */ public void marshall(Assignment assignment, ProtocolMarshaller protocolMarshaller) { if (assignment == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assignment.getAssignmentId(), ASSIGNMENTID_BINDING); protocolMarshaller.marshall(assignment.getWorkerId(), WORKERID_BINDING); protocolMarshaller.marshall(assignment.getHITId(), HITID_BINDING); protocolMarshaller.marshall(assignment.getAssignmentStatus(), ASSIGNMENTSTATUS_BINDING); protocolMarshaller.marshall(assignment.getAutoApprovalTime(), AUTOAPPROVALTIME_BINDING); protocolMarshaller.marshall(assignment.getAcceptTime(), ACCEPTTIME_BINDING); protocolMarshaller.marshall(assignment.getSubmitTime(), SUBMITTIME_BINDING); protocolMarshaller.marshall(assignment.getApprovalTime(), APPROVALTIME_BINDING); protocolMarshaller.marshall(assignment.getRejectionTime(), REJECTIONTIME_BINDING); protocolMarshaller.marshall(assignment.getDeadline(), DEADLINE_BINDING); protocolMarshaller.marshall(assignment.getAnswer(), ANSWER_BINDING); protocolMarshaller.marshall(assignment.getRequesterFeedback(), REQUESTERFEEDBACK_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }