@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHITTypeId() == null) ? 0 : getHITTypeId().hashCode()); hashCode = prime * hashCode + ((getMaxAssignments() == null) ? 0 : getMaxAssignments().hashCode()); hashCode = prime * hashCode + ((getLifetimeInSeconds() == null) ? 0 : getLifetimeInSeconds().hashCode()); hashCode = prime * hashCode + ((getQuestion() == null) ? 0 : getQuestion().hashCode()); hashCode = prime * hashCode + ((getRequesterAnnotation() == null) ? 0 : getRequesterAnnotation().hashCode()); hashCode = prime * hashCode + ((getUniqueRequestToken() == null) ? 0 : getUniqueRequestToken().hashCode()); hashCode = prime * hashCode + ((getAssignmentReviewPolicy() == null) ? 0 : getAssignmentReviewPolicy().hashCode()); hashCode = prime * hashCode + ((getHITReviewPolicy() == null) ? 0 : getHITReviewPolicy().hashCode()); hashCode = prime * hashCode + ((getHITLayoutId() == null) ? 0 : getHITLayoutId().hashCode()); hashCode = prime * hashCode + ((getHITLayoutParameters() == null) ? 0 : getHITLayoutParameters().hashCode()); return hashCode; }
return false; CreateHITWithHITTypeRequest other = (CreateHITWithHITTypeRequest) obj; if (other.getHITTypeId() == null ^ this.getHITTypeId() == null) return false; if (other.getHITTypeId() != null && other.getHITTypeId().equals(this.getHITTypeId()) == false) return false; if (other.getMaxAssignments() == null ^ this.getMaxAssignments() == null) return false; if (other.getMaxAssignments() != null && other.getMaxAssignments().equals(this.getMaxAssignments()) == false) return false; if (other.getLifetimeInSeconds() == null ^ this.getLifetimeInSeconds() == null) return false; if (other.getLifetimeInSeconds() != null && other.getLifetimeInSeconds().equals(this.getLifetimeInSeconds()) == false) return false; if (other.getQuestion() == null ^ this.getQuestion() == null) return false; if (other.getQuestion() != null && other.getQuestion().equals(this.getQuestion()) == false) return false; if (other.getRequesterAnnotation() == null ^ this.getRequesterAnnotation() == null) return false; if (other.getRequesterAnnotation() != null && other.getRequesterAnnotation().equals(this.getRequesterAnnotation()) == false) return false; if (other.getUniqueRequestToken() == null ^ this.getUniqueRequestToken() == null) return false; if (other.getUniqueRequestToken() != null && other.getUniqueRequestToken().equals(this.getUniqueRequestToken()) == false) return false; if (other.getAssignmentReviewPolicy() == null ^ this.getAssignmentReviewPolicy() == null) return false; if (other.getAssignmentReviewPolicy() != null && other.getAssignmentReviewPolicy().equals(this.getAssignmentReviewPolicy()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getHITTypeId() != null) sb.append("HITTypeId: ").append(getHITTypeId()).append(","); if (getMaxAssignments() != null) sb.append("MaxAssignments: ").append(getMaxAssignments()).append(","); if (getLifetimeInSeconds() != null) sb.append("LifetimeInSeconds: ").append(getLifetimeInSeconds()).append(","); if (getQuestion() != null) sb.append("Question: ").append(getQuestion()).append(","); if (getRequesterAnnotation() != null) sb.append("RequesterAnnotation: ").append(getRequesterAnnotation()).append(","); if (getUniqueRequestToken() != null) sb.append("UniqueRequestToken: ").append(getUniqueRequestToken()).append(","); if (getAssignmentReviewPolicy() != null) sb.append("AssignmentReviewPolicy: ").append(getAssignmentReviewPolicy()).append(","); if (getHITReviewPolicy() != null) sb.append("HITReviewPolicy: ").append(getHITReviewPolicy()).append(","); if (getHITLayoutId() != null) sb.append("HITLayoutId: ").append(getHITLayoutId()).append(","); if (getHITLayoutParameters() != null) sb.append("HITLayoutParameters: ").append(getHITLayoutParameters()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(CreateHITWithHITTypeRequest createHITWithHITTypeRequest, ProtocolMarshaller protocolMarshaller) { if (createHITWithHITTypeRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createHITWithHITTypeRequest.getHITTypeId(), HITTYPEID_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getMaxAssignments(), MAXASSIGNMENTS_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getLifetimeInSeconds(), LIFETIMEINSECONDS_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getQuestion(), QUESTION_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getRequesterAnnotation(), REQUESTERANNOTATION_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getUniqueRequestToken(), UNIQUEREQUESTTOKEN_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getAssignmentReviewPolicy(), ASSIGNMENTREVIEWPOLICY_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getHITReviewPolicy(), HITREVIEWPOLICY_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getHITLayoutId(), HITLAYOUTID_BINDING); protocolMarshaller.marshall(createHITWithHITTypeRequest.getHITLayoutParameters(), HITLAYOUTPARAMETERS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }