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:
  • Method Details

    • 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, hitStatus will return HITStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from hitStatusAsString().

      Returns:
      The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.
      See Also:
    • 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, hitStatus will return HITStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from hitStatusAsString().

      Returns:
      The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.
      See Also:
    • 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 the isEmpty() 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 ActionsGuarded field on each QualificationRequirement structure.

      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 ActionsGuarded field on each QualificationRequirement structure.
    • 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, hitReviewStatus will return HITReviewStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from hitReviewStatusAsString().

      Returns:
      Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
      See Also:
    • 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, hitReviewStatus will return HITReviewStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from hitReviewStatusAsString().

      Returns:
      Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
      See Also:
    • 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()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<HIT.Builder,HIT>
      Returns:
      a builder for type T
    • builder

      public static HIT.Builder builder()
    • serializableBuilderClass

      public static Class<? extends HIT.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.