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

com.amazonaws.services.mturk.model.CreateHITRequest 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 2015-2020 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.AmazonWebServiceRequest;

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

    /**
     * 

* The number of times the HIT can be accepted and completed before the HIT becomes unavailable. *

*/ private Integer maxAssignments; /** *

* The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. *

*/ private Long autoApprovalDelayInSeconds; /** *

* An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime * of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT * have been accepted. *

*/ private Long lifetimeInSeconds; /** *

* The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not * complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is * still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find * and accept. *

*/ private Long assignmentDurationInSeconds; /** *

* The amount of money the Requester will pay a Worker for successfully completing the HIT. *

*/ private String reward; /** *

* The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the * Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned. *

*/ private String title; /** *

* One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find * HITs. *

*/ private String keywords; /** *

* A general description of the HIT. A description includes detailed information about the kind of task the HIT * contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search * results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate * the HIT before accepting it. *

*/ private String description; /** *

* The data the person completing the HIT uses to produce the results. *

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data * structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including * whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. *

*/ private String question; /** *

* An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT * for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application * that corresponds with the HIT. *

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown * to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are * grouped. *

*/ private String requesterAnnotation; /** *

* Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and * ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. * Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. *

*/ private java.util.List qualificationRequirements; /** *

* A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. * This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the * server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, * subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId. *

* *

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. * Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs. *

*
*/ private String uniqueRequestToken; /** *

* The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk * to take various actions based on the policy. *

*/ private ReviewPolicy assignmentReviewPolicy; /** *

* The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based * on the policy. *

*/ private ReviewPolicy hITReviewPolicy; /** *

* The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT * by providing those values as HITLayoutParameters. *

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. *

*/ private String hITLayoutId; /** *

* If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter * structure. For more information, see HITLayout. *

*/ private java.util.List hITLayoutParameters; /** *

* The number of times the HIT can be accepted and completed before the HIT becomes unavailable. *

* * @param maxAssignments * The number of times the HIT can be accepted and completed before the HIT becomes unavailable. */ public void setMaxAssignments(Integer maxAssignments) { this.maxAssignments = maxAssignments; } /** *

* The number of times the HIT can be accepted and completed before the HIT becomes unavailable. *

* * @return The number of times the HIT can be accepted and completed before the HIT becomes unavailable. */ public Integer getMaxAssignments() { return this.maxAssignments; } /** *

* The number of times the HIT can be accepted and completed before the HIT becomes unavailable. *

* * @param maxAssignments * The number of times the HIT can be accepted and completed before the HIT becomes unavailable. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withMaxAssignments(Integer maxAssignments) { setMaxAssignments(maxAssignments); return this; } /** *

* The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. *

* * @param autoApprovalDelayInSeconds * The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. */ public void setAutoApprovalDelayInSeconds(Long autoApprovalDelayInSeconds) { this.autoApprovalDelayInSeconds = autoApprovalDelayInSeconds; } /** *

* The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. *

* * @return The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. */ public Long getAutoApprovalDelayInSeconds() { return this.autoApprovalDelayInSeconds; } /** *

* The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. *

* * @param autoApprovalDelayInSeconds * The number of seconds after an assignment for the HIT has been submitted, after which the assignment is * considered Approved automatically unless the Requester explicitly rejects it. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withAutoApprovalDelayInSeconds(Long autoApprovalDelayInSeconds) { setAutoApprovalDelayInSeconds(autoApprovalDelayInSeconds); return this; } /** *

* An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime * of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT * have been accepted. *

* * @param lifetimeInSeconds * An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the * lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments * for the HIT have been accepted. */ public void setLifetimeInSeconds(Long lifetimeInSeconds) { this.lifetimeInSeconds = lifetimeInSeconds; } /** *

* An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime * of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT * have been accepted. *

* * @return An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the * lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the * assignments for the HIT have been accepted. */ public Long getLifetimeInSeconds() { return this.lifetimeInSeconds; } /** *

* An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime * of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT * have been accepted. *

* * @param lifetimeInSeconds * An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the * lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments * for the HIT have been accepted. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withLifetimeInSeconds(Long lifetimeInSeconds) { setLifetimeInSeconds(lifetimeInSeconds); return this; } /** *

* The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not * complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is * still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find * and accept. *

* * @param assignmentDurationInSeconds * The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does * not complete the assignment within the specified duration, the assignment is considered abandoned. If the * HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other * users to find and accept. */ public void setAssignmentDurationInSeconds(Long assignmentDurationInSeconds) { this.assignmentDurationInSeconds = assignmentDurationInSeconds; } /** *

* The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not * complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is * still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find * and accept. *

* * @return The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker * does not complete the assignment within the specified duration, the assignment is considered abandoned. * If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for * other users to find and accept. */ public Long getAssignmentDurationInSeconds() { return this.assignmentDurationInSeconds; } /** *

* The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not * complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is * still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find * and accept. *

* * @param assignmentDurationInSeconds * The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does * not complete the assignment within the specified duration, the assignment is considered abandoned. If the * HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other * users to find and accept. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withAssignmentDurationInSeconds(Long assignmentDurationInSeconds) { setAssignmentDurationInSeconds(assignmentDurationInSeconds); return this; } /** *

* The amount of money the Requester will pay a Worker for successfully completing the HIT. *

* * @param reward * The amount of money the Requester will pay a Worker for successfully completing the HIT. */ public void setReward(String reward) { this.reward = reward; } /** *

* The amount of money the Requester will pay a Worker for successfully completing the HIT. *

* * @return The amount of money the Requester will pay a Worker for successfully completing the HIT. */ public String getReward() { return this.reward; } /** *

* The amount of money the Requester will pay a Worker for successfully completing the HIT. *

* * @param reward * The amount of money the Requester will pay a Worker for successfully completing the HIT. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withReward(String reward) { setReward(reward); return this; } /** *

* The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the * Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned. *

* * @param title * The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On * the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is * mentioned. */ public void setTitle(String title) { this.title = title; } /** *

* The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the * Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned. *

* * @return The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On * the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is * mentioned. */ public String getTitle() { return this.title; } /** *

* The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the * Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned. *

* * @param title * The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On * the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is * mentioned. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withTitle(String title) { setTitle(title); return this; } /** *

* One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find * HITs. *

* * @param keywords * One or more words or phrases that describe the HIT, separated by commas. These words are used in searches * to find HITs. */ public void setKeywords(String keywords) { this.keywords = keywords; } /** *

* One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find * HITs. *

* * @return One or more words or phrases that describe the HIT, separated by commas. These words are used in searches * to find HITs. */ public String getKeywords() { return this.keywords; } /** *

* One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find * HITs. *

* * @param keywords * One or more words or phrases that describe the HIT, separated by commas. These words are used in searches * to find HITs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withKeywords(String keywords) { setKeywords(keywords); return this; } /** *

* A general description of the HIT. A description includes detailed information about the kind of task the HIT * contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search * results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate * the HIT before accepting it. *

* * @param description * A general description of the HIT. A description includes detailed information about the kind of task the * HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of * search results, and in the HIT and assignment screens. A good description gives the user enough * information to evaluate the HIT before accepting it. */ public void setDescription(String description) { this.description = description; } /** *

* A general description of the HIT. A description includes detailed information about the kind of task the HIT * contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search * results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate * the HIT before accepting it. *

* * @return A general description of the HIT. A description includes detailed information about the kind of task the * HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of * search results, and in the HIT and assignment screens. A good description gives the user enough * information to evaluate the HIT before accepting it. */ public String getDescription() { return this.description; } /** *

* A general description of the HIT. A description includes detailed information about the kind of task the HIT * contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search * results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate * the HIT before accepting it. *

* * @param description * A general description of the HIT. A description includes detailed information about the kind of task the * HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of * search results, and in the HIT and assignment screens. A good description gives the user enough * information to evaluate the HIT before accepting it. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withDescription(String description) { setDescription(description); return this; } /** *

* The data the person completing the HIT uses to produce the results. *

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data * structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including * whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. *

* * @param question * The data the person completing the HIT uses to produce the results.

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion * data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, * including whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. */ public void setQuestion(String question) { this.question = question; } /** *

* The data the person completing the HIT uses to produce the results. *

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data * structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including * whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. *

* * @return The data the person completing the HIT uses to produce the results.

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an * HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in * size, including whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. */ public String getQuestion() { return this.question; } /** *

* The data the person completing the HIT uses to produce the results. *

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data * structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including * whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. *

* * @param question * The data the person completing the HIT uses to produce the results.

*

* Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion * data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, * including whitespace. *

*

* Either a Question parameter or a HITLayoutId parameter must be provided. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withQuestion(String question) { setQuestion(question); return this; } /** *

* An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT * for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application * that corresponds with the HIT. *

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown * to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are * grouped. *

* * @param requesterAnnotation * An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to * the HIT for tracking purposes. For example, this parameter could be an identifier internal to the * Requester's application that corresponds with the HIT.

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is * not shown to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your * HITs are grouped. */ public void setRequesterAnnotation(String requesterAnnotation) { this.requesterAnnotation = requesterAnnotation; } /** *

* An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT * for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application * that corresponds with the HIT. *

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown * to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are * grouped. *

* * @return An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to * the HIT for tracking purposes. For example, this parameter could be an identifier internal to the * Requester's application that corresponds with the HIT.

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is * not shown to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your * HITs are grouped. */ public String getRequesterAnnotation() { return this.requesterAnnotation; } /** *

* An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT * for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application * that corresponds with the HIT. *

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown * to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are * grouped. *

* * @param requesterAnnotation * An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to * the HIT for tracking purposes. For example, this parameter could be an identifier internal to the * Requester's application that corresponds with the HIT.

*

* The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is * not shown to the Worker, or any other Requester. *

*

* The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your * HITs are grouped. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withRequesterAnnotation(String requesterAnnotation) { setRequesterAnnotation(requesterAnnotation); return this; } /** *

* Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and * ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. * Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. *

* * @return Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between * zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the * HIT. Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. */ public java.util.List getQualificationRequirements() { return qualificationRequirements; } /** *

* Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and * ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. * Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. *

* * @param qualificationRequirements * Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between * zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the * HIT. Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. */ public void setQualificationRequirements(java.util.Collection qualificationRequirements) { if (qualificationRequirements == null) { this.qualificationRequirements = null; return; } this.qualificationRequirements = new java.util.ArrayList(qualificationRequirements); } /** *

* Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and * ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. * Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setQualificationRequirements(java.util.Collection)} or * {@link #withQualificationRequirements(java.util.Collection)} if you want to override the existing values. *

* * @param qualificationRequirements * Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between * zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the * HIT. Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withQualificationRequirements(QualificationRequirement... qualificationRequirements) { if (this.qualificationRequirements == null) { setQualificationRequirements(new java.util.ArrayList(qualificationRequirements.length)); } for (QualificationRequirement ele : qualificationRequirements) { this.qualificationRequirements.add(ele); } return this; } /** *

* Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and * ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. * Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. *

* * @param qualificationRequirements * Conditions that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between * zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the * HIT. Additionally, other actions can be restricted using the ActionsGuarded field on each * QualificationRequirement structure. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withQualificationRequirements(java.util.Collection qualificationRequirements) { setQualificationRequirements(qualificationRequirements); return this; } /** *

* A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. * This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the * server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, * subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId. *

* *

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. * Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs. *

*
* * @param uniqueRequestToken * A unique identifier for this request which allows you to retry the call on error without creating * duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the * call succeeded on the server. If the HIT already exists in the system from a previous call using the same * UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a * message containing the HITId.

*

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 * hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create * duplicate HITs. *

*/ public void setUniqueRequestToken(String uniqueRequestToken) { this.uniqueRequestToken = uniqueRequestToken; } /** *

* A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. * This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the * server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, * subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId. *

* *

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. * Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs. *

*
* * @return A unique identifier for this request which allows you to retry the call on error without creating * duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the * call succeeded on the server. If the HIT already exists in the system from a previous call using the same * UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a * message containing the HITId.

*

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 * hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create * duplicate HITs. *

*/ public String getUniqueRequestToken() { return this.uniqueRequestToken; } /** *

* A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. * This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the * server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, * subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId. *

* *

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. * Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs. *

*
* * @param uniqueRequestToken * A unique identifier for this request which allows you to retry the call on error without creating * duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the * call succeeded on the server. If the HIT already exists in the system from a previous call using the same * UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a * message containing the HITId.

*

* Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 * hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create * duplicate HITs. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withUniqueRequestToken(String uniqueRequestToken) { setUniqueRequestToken(uniqueRequestToken); return this; } /** *

* The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk * to take various actions based on the policy. *

* * @param assignmentReviewPolicy * The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for * Mechanical Turk to take various actions based on the policy. */ public void setAssignmentReviewPolicy(ReviewPolicy assignmentReviewPolicy) { this.assignmentReviewPolicy = assignmentReviewPolicy; } /** *

* The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk * to take various actions based on the policy. *

* * @return The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for * Mechanical Turk to take various actions based on the policy. */ public ReviewPolicy getAssignmentReviewPolicy() { return this.assignmentReviewPolicy; } /** *

* The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk * to take various actions based on the policy. *

* * @param assignmentReviewPolicy * The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for * Mechanical Turk to take various actions based on the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withAssignmentReviewPolicy(ReviewPolicy assignmentReviewPolicy) { setAssignmentReviewPolicy(assignmentReviewPolicy); return this; } /** *

* The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based * on the policy. *

* * @param hITReviewPolicy * The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various * actions based on the policy. */ public void setHITReviewPolicy(ReviewPolicy hITReviewPolicy) { this.hITReviewPolicy = hITReviewPolicy; } /** *

* The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based * on the policy. *

* * @return The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various * actions based on the policy. */ public ReviewPolicy getHITReviewPolicy() { return this.hITReviewPolicy; } /** *

* The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based * on the policy. *

* * @param hITReviewPolicy * The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various * actions based on the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withHITReviewPolicy(ReviewPolicy hITReviewPolicy) { setHITReviewPolicy(hITReviewPolicy); return this; } /** *

* The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT * by providing those values as HITLayoutParameters. *

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. *

* * @param hITLayoutId * The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an * additional HIT by providing those values as HITLayoutParameters.

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. */ public void setHITLayoutId(String hITLayoutId) { this.hITLayoutId = hITLayoutId; } /** *

* The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT * by providing those values as HITLayoutParameters. *

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. *

* * @return The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an * additional HIT by providing those values as HITLayoutParameters.

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. */ public String getHITLayoutId() { return this.hITLayoutId; } /** *

* The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT * by providing those values as HITLayoutParameters. *

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. *

* * @param hITLayoutId * The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an * additional HIT by providing those values as HITLayoutParameters.

*

* Constraints: Either a Question parameter or a HITLayoutId parameter must be provided. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withHITLayoutId(String hITLayoutId) { setHITLayoutId(hITLayoutId); return this; } /** *

* If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter * structure. For more information, see HITLayout. *

* * @return If the HITLayoutId is provided, any placeholder values must be filled in with values using the * HITLayoutParameter structure. For more information, see HITLayout. */ public java.util.List getHITLayoutParameters() { return hITLayoutParameters; } /** *

* If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter * structure. For more information, see HITLayout. *

* * @param hITLayoutParameters * If the HITLayoutId is provided, any placeholder values must be filled in with values using the * HITLayoutParameter structure. For more information, see HITLayout. */ public void setHITLayoutParameters(java.util.Collection hITLayoutParameters) { if (hITLayoutParameters == null) { this.hITLayoutParameters = null; return; } this.hITLayoutParameters = new java.util.ArrayList(hITLayoutParameters); } /** *

* If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter * structure. For more information, see HITLayout. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setHITLayoutParameters(java.util.Collection)} or {@link #withHITLayoutParameters(java.util.Collection)} * if you want to override the existing values. *

* * @param hITLayoutParameters * If the HITLayoutId is provided, any placeholder values must be filled in with values using the * HITLayoutParameter structure. For more information, see HITLayout. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withHITLayoutParameters(HITLayoutParameter... hITLayoutParameters) { if (this.hITLayoutParameters == null) { setHITLayoutParameters(new java.util.ArrayList(hITLayoutParameters.length)); } for (HITLayoutParameter ele : hITLayoutParameters) { this.hITLayoutParameters.add(ele); } return this; } /** *

* If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter * structure. For more information, see HITLayout. *

* * @param hITLayoutParameters * If the HITLayoutId is provided, any placeholder values must be filled in with values using the * HITLayoutParameter structure. For more information, see HITLayout. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITRequest withHITLayoutParameters(java.util.Collection hITLayoutParameters) { setHITLayoutParameters(hITLayoutParameters); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getMaxAssignments() != null) sb.append("MaxAssignments: ").append(getMaxAssignments()).append(","); if (getAutoApprovalDelayInSeconds() != null) sb.append("AutoApprovalDelayInSeconds: ").append(getAutoApprovalDelayInSeconds()).append(","); if (getLifetimeInSeconds() != null) sb.append("LifetimeInSeconds: ").append(getLifetimeInSeconds()).append(","); if (getAssignmentDurationInSeconds() != null) sb.append("AssignmentDurationInSeconds: ").append(getAssignmentDurationInSeconds()).append(","); if (getReward() != null) sb.append("Reward: ").append(getReward()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getKeywords() != null) sb.append("Keywords: ").append(getKeywords()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getQuestion() != null) sb.append("Question: ").append(getQuestion()).append(","); if (getRequesterAnnotation() != null) sb.append("RequesterAnnotation: ").append(getRequesterAnnotation()).append(","); if (getQualificationRequirements() != null) sb.append("QualificationRequirements: ").append(getQualificationRequirements()).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(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateHITRequest == false) return false; CreateHITRequest other = (CreateHITRequest) obj; if (other.getMaxAssignments() == null ^ this.getMaxAssignments() == null) return false; if (other.getMaxAssignments() != null && other.getMaxAssignments().equals(this.getMaxAssignments()) == false) return false; if (other.getAutoApprovalDelayInSeconds() == null ^ this.getAutoApprovalDelayInSeconds() == null) return false; if (other.getAutoApprovalDelayInSeconds() != null && other.getAutoApprovalDelayInSeconds().equals(this.getAutoApprovalDelayInSeconds()) == 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.getAssignmentDurationInSeconds() == null ^ this.getAssignmentDurationInSeconds() == null) return false; if (other.getAssignmentDurationInSeconds() != null && other.getAssignmentDurationInSeconds().equals(this.getAssignmentDurationInSeconds()) == false) return false; if (other.getReward() == null ^ this.getReward() == null) return false; if (other.getReward() != null && other.getReward().equals(this.getReward()) == 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.getKeywords() == null ^ this.getKeywords() == null) return false; if (other.getKeywords() != null && other.getKeywords().equals(this.getKeywords()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getQualificationRequirements() == null ^ this.getQualificationRequirements() == null) return false; if (other.getQualificationRequirements() != null && other.getQualificationRequirements().equals(this.getQualificationRequirements()) == 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) return false; if (other.getHITReviewPolicy() == null ^ this.getHITReviewPolicy() == null) return false; if (other.getHITReviewPolicy() != null && other.getHITReviewPolicy().equals(this.getHITReviewPolicy()) == 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.getHITLayoutParameters() == null ^ this.getHITLayoutParameters() == null) return false; if (other.getHITLayoutParameters() != null && other.getHITLayoutParameters().equals(this.getHITLayoutParameters()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMaxAssignments() == null) ? 0 : getMaxAssignments().hashCode()); hashCode = prime * hashCode + ((getAutoApprovalDelayInSeconds() == null) ? 0 : getAutoApprovalDelayInSeconds().hashCode()); hashCode = prime * hashCode + ((getLifetimeInSeconds() == null) ? 0 : getLifetimeInSeconds().hashCode()); hashCode = prime * hashCode + ((getAssignmentDurationInSeconds() == null) ? 0 : getAssignmentDurationInSeconds().hashCode()); hashCode = prime * hashCode + ((getReward() == null) ? 0 : getReward().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getKeywords() == null) ? 0 : getKeywords().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getQuestion() == null) ? 0 : getQuestion().hashCode()); hashCode = prime * hashCode + ((getRequesterAnnotation() == null) ? 0 : getRequesterAnnotation().hashCode()); hashCode = prime * hashCode + ((getQualificationRequirements() == null) ? 0 : getQualificationRequirements().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; } @Override public CreateHITRequest clone() { return (CreateHITRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy