Class HIT
- java.lang.Object
-
- software.amazon.awssdk.services.mturk.model.HIT
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<HIT.Builder,HIT>
@Generated("software.amazon.awssdk:codegen") public final class HIT extends Object implements SdkPojo, Serializable, ToCopyableBuilder<HIT.Builder,HIT>
The HIT data structure represents a single HIT, including all the information necessary for a Worker to accept and complete the HIT.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHIT.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LongassignmentDurationInSeconds()The length of time, in seconds, that a Worker has to complete the HIT after accepting it.LongautoApprovalDelayInSeconds()The amount of time, in seconds, after the Worker submits an assignment for the HIT that the results are automatically approved by Amazon Mechanical Turk.static HIT.Builderbuilder()InstantcreationTime()The date and time the HIT was created.Stringdescription()A general description of the HIT.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)Instantexpiration()The date and time the HIT expires.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasQualificationRequirements()For responses, this returns true if the service returned a value for the QualificationRequirements property.StringhitGroupId()The ID of the HIT Group of this HIT.StringhitId()A unique identifier for the HIT.StringhitLayoutId()The ID of the HIT Layout of this HIT.HITReviewStatushitReviewStatus()Indicates the review status of the HIT.StringhitReviewStatusAsString()Indicates the review status of the HIT.HITStatushitStatus()The status of the HIT and its assignments.StringhitStatusAsString()The status of the HIT and its assignments.StringhitTypeId()The ID of the HIT type of this HITStringkeywords()One or more words or phrases that describe the HIT, separated by commas.IntegermaxAssignments()The number of times the HIT can be accepted and completed before the HIT becomes unavailable.IntegernumberOfAssignmentsAvailable()The number of assignments for this HIT that are available for Workers to accept.IntegernumberOfAssignmentsCompleted()The number of assignments for this HIT that have been approved or rejected.IntegernumberOfAssignmentsPending()The number of assignments for this HIT that are being previewed or have been accepted by Workers, but have not yet been submitted, returned, or abandoned.List<QualificationRequirement>qualificationRequirements()Conditions that a Worker's Qualifications must meet in order to accept the HIT.Stringquestion()The data the Worker completing the HIT uses produce the results.StringrequesterAnnotation()An arbitrary data field the Requester who created the HIT can use.Stringreward()Returns the value of the Reward property for this object.List<SdkField<?>>sdkFields()static Class<? extends HIT.Builder>serializableBuilderClass()Stringtitle()The title of the HIT.HIT.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
hitId
public final String hitId()
A unique identifier for the HIT.
- Returns:
- A unique identifier for the HIT.
-
hitTypeId
public final String hitTypeId()
The ID of the HIT type of this HIT
- Returns:
- The ID of the HIT type of this HIT
-
hitGroupId
public final String hitGroupId()
The ID of the HIT Group of this HIT.
- Returns:
- The ID of the HIT Group of this HIT.
-
hitLayoutId
public final String hitLayoutId()
The ID of the HIT Layout of this HIT.
- Returns:
- The ID of the HIT Layout of this HIT.
-
creationTime
public final Instant creationTime()
The date and time the HIT was created.
- Returns:
- The date and time the HIT was created.
-
title
public final String title()
The title of the HIT.
- Returns:
- The title of the HIT.
-
description
public final String description()
A general description of the HIT.
- Returns:
- A general description of the HIT.
-
question
public final String question()
The data the Worker completing the HIT uses produce the results. This is either either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure.
- Returns:
- The data the Worker completing the HIT uses produce the results. This is either either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure.
-
keywords
public final String keywords()
One or more words or phrases that describe the HIT, separated by commas. Search terms similar to the keywords of a HIT are more likely to have the HIT in the search results.
- Returns:
- One or more words or phrases that describe the HIT, separated by commas. Search terms similar to the keywords of a HIT are more likely to have the HIT in the search results.
-
hitStatus
public final HITStatus hitStatus()
The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.
If the service returns an enum value that is not available in the current SDK version,
hitStatuswill returnHITStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhitStatusAsString().- Returns:
- The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.
- See Also:
HITStatus
-
hitStatusAsString
public final String hitStatusAsString()
The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.
If the service returns an enum value that is not available in the current SDK version,
hitStatuswill returnHITStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhitStatusAsString().- Returns:
- The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.
- See Also:
HITStatus
-
maxAssignments
public final Integer maxAssignments()
The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
- Returns:
- The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
-
reward
public final String reward()
Returns the value of the Reward property for this object.- Returns:
- The value of the Reward property for this object.
-
autoApprovalDelayInSeconds
public final Long autoApprovalDelayInSeconds()
The amount of time, in seconds, after the Worker submits an assignment for the HIT that the results are automatically approved by Amazon Mechanical Turk. This is the amount of time the Requester has to reject an assignment submitted by a Worker before the assignment is auto-approved and the Worker is paid.
- Returns:
- The amount of time, in seconds, after the Worker submits an assignment for the HIT that the results are automatically approved by Amazon Mechanical Turk. This is the amount of time the Requester has to reject an assignment submitted by a Worker before the assignment is auto-approved and the Worker is paid.
-
expiration
public final Instant expiration()
The date and time the HIT expires.
- Returns:
- The date and time the HIT expires.
-
assignmentDurationInSeconds
public final Long assignmentDurationInSeconds()
The length of time, in seconds, that a Worker has to complete the HIT after accepting it.
- Returns:
- The length of time, in seconds, that a Worker has to complete the HIT after accepting it.
-
requesterAnnotation
public final String requesterAnnotation()
An arbitrary data field the Requester who created the HIT can use. This field is visible only to the creator of the HIT.
- Returns:
- An arbitrary data field the Requester who created the HIT can use. This field is visible only to the creator of the HIT.
-
hasQualificationRequirements
public final boolean hasQualificationRequirements()
For responses, this returns true if the service returned a value for the QualificationRequirements property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
qualificationRequirements
public final List<QualificationRequirement> 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
ActionsGuardedfield on eachQualificationRequirementstructure.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasQualificationRequirements()method.- Returns:
- 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
ActionsGuardedfield on eachQualificationRequirementstructure.
-
hitReviewStatus
public final HITReviewStatus hitReviewStatus()
Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
If the service returns an enum value that is not available in the current SDK version,
hitReviewStatuswill returnHITReviewStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhitReviewStatusAsString().- Returns:
- Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
- See Also:
HITReviewStatus
-
hitReviewStatusAsString
public final String hitReviewStatusAsString()
Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
If the service returns an enum value that is not available in the current SDK version,
hitReviewStatuswill returnHITReviewStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhitReviewStatusAsString().- Returns:
- Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
- See Also:
HITReviewStatus
-
numberOfAssignmentsPending
public final Integer numberOfAssignmentsPending()
The number of assignments for this HIT that are being previewed or have been accepted by Workers, but have not yet been submitted, returned, or abandoned.
- Returns:
- The number of assignments for this HIT that are being previewed or have been accepted by Workers, but have not yet been submitted, returned, or abandoned.
-
numberOfAssignmentsAvailable
public final Integer numberOfAssignmentsAvailable()
The number of assignments for this HIT that are available for Workers to accept.
- Returns:
- The number of assignments for this HIT that are available for Workers to accept.
-
numberOfAssignmentsCompleted
public final Integer numberOfAssignmentsCompleted()
The number of assignments for this HIT that have been approved or rejected.
- Returns:
- The number of assignments for this HIT that have been approved or rejected.
-
toBuilder
public HIT.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<HIT.Builder,HIT>
-
builder
public static HIT.Builder builder()
-
serializableBuilderClass
public static Class<? extends HIT.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
-