@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHITId() == null) ? 0 : getHITId().hashCode()); hashCode = prime * hashCode + ((getHITTypeId() == null) ? 0 : getHITTypeId().hashCode()); hashCode = prime * hashCode + ((getHITGroupId() == null) ? 0 : getHITGroupId().hashCode()); hashCode = prime * hashCode + ((getHITLayoutId() == null) ? 0 : getHITLayoutId().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getQuestion() == null) ? 0 : getQuestion().hashCode()); hashCode = prime * hashCode + ((getKeywords() == null) ? 0 : getKeywords().hashCode()); hashCode = prime * hashCode + ((getHITStatus() == null) ? 0 : getHITStatus().hashCode()); hashCode = prime * hashCode + ((getMaxAssignments() == null) ? 0 : getMaxAssignments().hashCode()); hashCode = prime * hashCode + ((getReward() == null) ? 0 : getReward().hashCode()); hashCode = prime * hashCode + ((getAutoApprovalDelayInSeconds() == null) ? 0 : getAutoApprovalDelayInSeconds().hashCode()); hashCode = prime * hashCode + ((getExpiration() == null) ? 0 : getExpiration().hashCode()); hashCode = prime * hashCode + ((getAssignmentDurationInSeconds() == null) ? 0 : getAssignmentDurationInSeconds().hashCode()); hashCode = prime * hashCode + ((getRequesterAnnotation() == null) ? 0 : getRequesterAnnotation().hashCode()); hashCode = prime * hashCode + ((getQualificationRequirements() == null) ? 0 : getQualificationRequirements().hashCode()); hashCode = prime * hashCode + ((getHITReviewStatus() == null) ? 0 : getHITReviewStatus().hashCode()); hashCode = prime * hashCode + ((getNumberOfAssignmentsPending() == null) ? 0 : getNumberOfAssignmentsPending().hashCode()); hashCode = prime * hashCode + ((getNumberOfAssignmentsAvailable() == null) ? 0 : getNumberOfAssignmentsAvailable().hashCode()); hashCode = prime * hashCode + ((getNumberOfAssignmentsCompleted() == null) ? 0 : getNumberOfAssignmentsCompleted().hashCode()); return hashCode; }
public HIT unmarshall(JsonUnmarshallerContext context) throws Exception { HIT hIT = new HIT(); if (context.testExpression("HITId", targetDepth)) { context.nextToken(); hIT.setHITId(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setHITTypeId(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setHITGroupId(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setHITLayoutId(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setCreationTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); hIT.setTitle(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setDescription(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setQuestion(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setKeywords(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setHITStatus(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setMaxAssignments(context.getUnmarshaller(Integer.class).unmarshall(context)); hIT.setReward(context.getUnmarshaller(String.class).unmarshall(context)); hIT.setAutoApprovalDelayInSeconds(context.getUnmarshaller(Long.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetHITResult == false) return false; GetHITResult other = (GetHITResult) obj; if (other.getHIT() == null ^ this.getHIT() == null) return false; if (other.getHIT() != null && other.getHIT().equals(this.getHIT()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateHITResult == false) return false; CreateHITResult other = (CreateHITResult) obj; if (other.getHIT() == null ^ this.getHIT() == null) return false; if (other.getHIT() != null && other.getHIT().equals(this.getHIT()) == false) return false; return true; }
return false; HIT other = (HIT) obj; if (other.getHITId() == null ^ this.getHITId() == null) return false; if (other.getHITId() != null && other.getHITId().equals(this.getHITId()) == false) return false; if (other.getHITTypeId() == null ^ this.getHITTypeId() == null) return false; if (other.getHITTypeId() != null && other.getHITTypeId().equals(this.getHITTypeId()) == false) return false; if (other.getHITGroupId() == null ^ this.getHITGroupId() == null) return false; if (other.getHITGroupId() != null && other.getHITGroupId().equals(this.getHITGroupId()) == false) return false; if (other.getHITLayoutId() == null ^ this.getHITLayoutId() == null) return false; if (other.getHITLayoutId() != null && other.getHITLayoutId().equals(this.getHITLayoutId()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getTitle() == null ^ this.getTitle() == null) return false; if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateHITWithHITTypeResult == false) return false; CreateHITWithHITTypeResult other = (CreateHITWithHITTypeResult) obj; if (other.getHIT() == null ^ this.getHIT() == null) return false; if (other.getHIT() != null && other.getHIT().equals(this.getHIT()) == false) return false; return true; }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getHITId() != null) sb.append("HITId: ").append(getHITId()).append(","); if (getHITTypeId() != null) sb.append("HITTypeId: ").append(getHITTypeId()).append(","); if (getHITGroupId() != null) sb.append("HITGroupId: ").append(getHITGroupId()).append(","); if (getHITLayoutId() != null) sb.append("HITLayoutId: ").append(getHITLayoutId()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getQuestion() != null) sb.append("Question: ").append(getQuestion()).append(","); if (getKeywords() != null) sb.append("Keywords: ").append(getKeywords()).append(","); if (getHITStatus() != null) sb.append("HITStatus: ").append(getHITStatus()).append(","); if (getMaxAssignments() != null) sb.append("MaxAssignments: ").append(getMaxAssignments()).append(","); if (getReward() != null) sb.append("Reward: ").append(getReward()).append(","); if (getAutoApprovalDelayInSeconds() != null) sb.append("AutoApprovalDelayInSeconds: ").append(getAutoApprovalDelayInSeconds()).append(","); if (getExpiration() != null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetAssignmentResult == false) return false; GetAssignmentResult other = (GetAssignmentResult) obj; if (other.getAssignment() == null ^ this.getAssignment() == null) return false; if (other.getAssignment() != null && other.getAssignment().equals(this.getAssignment()) == false) return false; if (other.getHIT() == null ^ this.getHIT() == null) return false; if (other.getHIT() != null && other.getHIT().equals(this.getHIT()) == false) return false; return true; }
protocolMarshaller.marshall(hIT.getHITId(), HITID_BINDING); protocolMarshaller.marshall(hIT.getHITTypeId(), HITTYPEID_BINDING); protocolMarshaller.marshall(hIT.getHITGroupId(), HITGROUPID_BINDING); protocolMarshaller.marshall(hIT.getHITLayoutId(), HITLAYOUTID_BINDING); protocolMarshaller.marshall(hIT.getCreationTime(), CREATIONTIME_BINDING); protocolMarshaller.marshall(hIT.getTitle(), TITLE_BINDING); protocolMarshaller.marshall(hIT.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(hIT.getQuestion(), QUESTION_BINDING); protocolMarshaller.marshall(hIT.getKeywords(), KEYWORDS_BINDING); protocolMarshaller.marshall(hIT.getHITStatus(), HITSTATUS_BINDING); protocolMarshaller.marshall(hIT.getMaxAssignments(), MAXASSIGNMENTS_BINDING); protocolMarshaller.marshall(hIT.getReward(), REWARD_BINDING); protocolMarshaller.marshall(hIT.getAutoApprovalDelayInSeconds(), AUTOAPPROVALDELAYINSECONDS_BINDING); protocolMarshaller.marshall(hIT.getExpiration(), EXPIRATION_BINDING); protocolMarshaller.marshall(hIT.getAssignmentDurationInSeconds(), ASSIGNMENTDURATIONINSECONDS_BINDING); protocolMarshaller.marshall(hIT.getRequesterAnnotation(), REQUESTERANNOTATION_BINDING); protocolMarshaller.marshall(hIT.getQualificationRequirements(), QUALIFICATIONREQUIREMENTS_BINDING); protocolMarshaller.marshall(hIT.getHITReviewStatus(), HITREVIEWSTATUS_BINDING); protocolMarshaller.marshall(hIT.getNumberOfAssignmentsPending(), NUMBEROFASSIGNMENTSPENDING_BINDING); protocolMarshaller.marshall(hIT.getNumberOfAssignmentsAvailable(), NUMBEROFASSIGNMENTSAVAILABLE_BINDING); protocolMarshaller.marshall(hIT.getNumberOfAssignmentsCompleted(), NUMBEROFASSIGNMENTSCOMPLETED_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);