All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.mturk.model.QualificationRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Mechanical Turk module holds the client classes that are used for communicating with Amazon Mechanical Turk Requester.

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.mturk.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The QualificationRequest data structure represents a request a Worker has made for a Qualification. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class QualificationRequest implements Serializable, Cloneable, StructuredPojo { /** *

* The ID of the Qualification request, a unique identifier generated when the request was submitted. *

*/ private String qualificationRequestId; /** *

* The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation. *

*/ private String qualificationTypeId; /** *

* The ID of the Worker requesting the Qualification. *

*/ private String workerId; /** *

* The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker * has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the * time the Worker requests the Qualification. *

*/ private String test; /** *

* The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type * has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty. *

*/ private String answer; /** *

* The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. *

*/ private java.util.Date submitTime; /** *

* The ID of the Qualification request, a unique identifier generated when the request was submitted. *

* * @param qualificationRequestId * The ID of the Qualification request, a unique identifier generated when the request was submitted. */ public void setQualificationRequestId(String qualificationRequestId) { this.qualificationRequestId = qualificationRequestId; } /** *

* The ID of the Qualification request, a unique identifier generated when the request was submitted. *

* * @return The ID of the Qualification request, a unique identifier generated when the request was submitted. */ public String getQualificationRequestId() { return this.qualificationRequestId; } /** *

* The ID of the Qualification request, a unique identifier generated when the request was submitted. *

* * @param qualificationRequestId * The ID of the Qualification request, a unique identifier generated when the request was submitted. * @return Returns a reference to this object so that method calls can be chained together. */ public QualificationRequest withQualificationRequestId(String qualificationRequestId) { setQualificationRequestId(qualificationRequestId); return this; } /** *

* The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation. *

* * @param qualificationTypeId * The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType * operation. */ public void setQualificationTypeId(String qualificationTypeId) { this.qualificationTypeId = qualificationTypeId; } /** *

* The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation. *

* * @return The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType * operation. */ public String getQualificationTypeId() { return this.qualificationTypeId; } /** *

* The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation. *

* * @param qualificationTypeId * The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType * operation. * @return Returns a reference to this object so that method calls can be chained together. */ public QualificationRequest withQualificationTypeId(String qualificationTypeId) { setQualificationTypeId(qualificationTypeId); return this; } /** *

* The ID of the Worker requesting the Qualification. *

* * @param workerId * The ID of the Worker requesting the Qualification. */ public void setWorkerId(String workerId) { this.workerId = workerId; } /** *

* The ID of the Worker requesting the Qualification. *

* * @return The ID of the Worker requesting the Qualification. */ public String getWorkerId() { return this.workerId; } /** *

* The ID of the Worker requesting the Qualification. *

* * @param workerId * The ID of the Worker requesting the Qualification. * @return Returns a reference to this object so that method calls can be chained together. */ public QualificationRequest withWorkerId(String workerId) { setWorkerId(workerId); return this; } /** *

* The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker * has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the * time the Worker requests the Qualification. *

* * @param test * The contents of the Qualification test that was presented to the Worker, if the type has a test and the * Worker has submitted answers. This value is identical to the QuestionForm associated with the * Qualification type at the time the Worker requests the Qualification. */ public void setTest(String test) { this.test = test; } /** *

* The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker * has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the * time the Worker requests the Qualification. *

* * @return The contents of the Qualification test that was presented to the Worker, if the type has a test and the * Worker has submitted answers. This value is identical to the QuestionForm associated with the * Qualification type at the time the Worker requests the Qualification. */ public String getTest() { return this.test; } /** *

* The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker * has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the * time the Worker requests the Qualification. *

* * @param test * The contents of the Qualification test that was presented to the Worker, if the type has a test and the * Worker has submitted answers. This value is identical to the QuestionForm associated with the * Qualification type at the time the Worker requests the Qualification. * @return Returns a reference to this object so that method calls can be chained together. */ public QualificationRequest withTest(String test) { setTest(test); return this; } /** *

* The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type * has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty. *

* * @param answer * The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the * type has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer * may be empty. */ public void setAnswer(String answer) { this.answer = answer; } /** *

* The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type * has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty. *

* * @return The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if * the type has a test and the Worker has submitted answers. If the Worker does not provide any answers, * Answer may be empty. */ public String getAnswer() { return this.answer; } /** *

* The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type * has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty. *

* * @param answer * The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the * type has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer * may be empty. * @return Returns a reference to this object so that method calls can be chained together. */ public QualificationRequest withAnswer(String answer) { setAnswer(answer); return this; } /** *

* The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. *

* * @param submitTime * The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. */ public void setSubmitTime(java.util.Date submitTime) { this.submitTime = submitTime; } /** *

* The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. *

* * @return The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. */ public java.util.Date getSubmitTime() { return this.submitTime; } /** *

* The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. *

* * @param submitTime * The date and time the Qualification request had a status of Submitted. This is either the time the Worker * submitted answers for a Qualification test, or the time the Worker requested the Qualification if the * Qualification type does not have a test. * @return Returns a reference to this object so that method calls can be chained together. */ public QualificationRequest withSubmitTime(java.util.Date submitTime) { setSubmitTime(submitTime); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getQualificationRequestId() != null) sb.append("QualificationRequestId: ").append(getQualificationRequestId()).append(","); if (getQualificationTypeId() != null) sb.append("QualificationTypeId: ").append(getQualificationTypeId()).append(","); if (getWorkerId() != null) sb.append("WorkerId: ").append(getWorkerId()).append(","); if (getTest() != null) sb.append("Test: ").append(getTest()).append(","); if (getAnswer() != null) sb.append("Answer: ").append(getAnswer()).append(","); if (getSubmitTime() != null) sb.append("SubmitTime: ").append(getSubmitTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof QualificationRequest == false) return false; QualificationRequest other = (QualificationRequest) obj; if (other.getQualificationRequestId() == null ^ this.getQualificationRequestId() == null) return false; if (other.getQualificationRequestId() != null && other.getQualificationRequestId().equals(this.getQualificationRequestId()) == false) return false; if (other.getQualificationTypeId() == null ^ this.getQualificationTypeId() == null) return false; if (other.getQualificationTypeId() != null && other.getQualificationTypeId().equals(this.getQualificationTypeId()) == false) return false; if (other.getWorkerId() == null ^ this.getWorkerId() == null) return false; if (other.getWorkerId() != null && other.getWorkerId().equals(this.getWorkerId()) == false) return false; if (other.getTest() == null ^ this.getTest() == null) return false; if (other.getTest() != null && other.getTest().equals(this.getTest()) == false) return false; if (other.getAnswer() == null ^ this.getAnswer() == null) return false; if (other.getAnswer() != null && other.getAnswer().equals(this.getAnswer()) == false) return false; if (other.getSubmitTime() == null ^ this.getSubmitTime() == null) return false; if (other.getSubmitTime() != null && other.getSubmitTime().equals(this.getSubmitTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getQualificationRequestId() == null) ? 0 : getQualificationRequestId().hashCode()); hashCode = prime * hashCode + ((getQualificationTypeId() == null) ? 0 : getQualificationTypeId().hashCode()); hashCode = prime * hashCode + ((getWorkerId() == null) ? 0 : getWorkerId().hashCode()); hashCode = prime * hashCode + ((getTest() == null) ? 0 : getTest().hashCode()); hashCode = prime * hashCode + ((getAnswer() == null) ? 0 : getAnswer().hashCode()); hashCode = prime * hashCode + ((getSubmitTime() == null) ? 0 : getSubmitTime().hashCode()); return hashCode; } @Override public QualificationRequest clone() { try { return (QualificationRequest) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.mturk.model.transform.QualificationRequestMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy