java.lang.Object
software.amazon.awssdk.services.mturk.model.Assignment
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Assignment.Builder,Assignment>

@Generated("software.amazon.awssdk:codegen") public final class Assignment extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Assignment.Builder,Assignment>

The Assignment data structure represents a single assignment of a HIT to a Worker. The assignment tracks the Worker's efforts to complete the HIT, and contains the results for later retrieval.

See Also:
  • Method Details

    • assignmentId

      public final String assignmentId()

      A unique identifier for the assignment.

      Returns:
      A unique identifier for the assignment.
    • workerId

      public final String workerId()

      The ID of the Worker who accepted the HIT.

      Returns:
      The ID of the Worker who accepted the HIT.
    • hitId

      public final String hitId()

      The ID of the HIT.

      Returns:
      The ID of the HIT.
    • assignmentStatus

      public final AssignmentStatus assignmentStatus()

      The status of the assignment.

      If the service returns an enum value that is not available in the current SDK version, assignmentStatus will return AssignmentStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from assignmentStatusAsString().

      Returns:
      The status of the assignment.
      See Also:
    • assignmentStatusAsString

      public final String assignmentStatusAsString()

      The status of the assignment.

      If the service returns an enum value that is not available in the current SDK version, assignmentStatus will return AssignmentStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from assignmentStatusAsString().

      Returns:
      The status of the assignment.
      See Also:
    • autoApprovalTime

      public final Instant autoApprovalTime()

      If results have been submitted, AutoApprovalTime is the date and time the results of the assignment results are considered Approved automatically if they have not already been explicitly approved or rejected by the Requester. This value is derived from the auto-approval delay specified by the Requester in the HIT. This value is omitted from the assignment if the Worker has not yet submitted results.

      Returns:
      If results have been submitted, AutoApprovalTime is the date and time the results of the assignment results are considered Approved automatically if they have not already been explicitly approved or rejected by the Requester. This value is derived from the auto-approval delay specified by the Requester in the HIT. This value is omitted from the assignment if the Worker has not yet submitted results.
    • acceptTime

      public final Instant acceptTime()

      The date and time the Worker accepted the assignment.

      Returns:
      The date and time the Worker accepted the assignment.
    • submitTime

      public final Instant submitTime()

      If the Worker has submitted results, SubmitTime is the date and time the assignment was submitted. This value is omitted from the assignment if the Worker has not yet submitted results.

      Returns:
      If the Worker has submitted results, SubmitTime is the date and time the assignment was submitted. This value is omitted from the assignment if the Worker has not yet submitted results.
    • approvalTime

      public final Instant approvalTime()

      If the Worker has submitted results and the Requester has approved the results, ApprovalTime is the date and time the Requester approved the results. This value is omitted from the assignment if the Requester has not yet approved the results.

      Returns:
      If the Worker has submitted results and the Requester has approved the results, ApprovalTime is the date and time the Requester approved the results. This value is omitted from the assignment if the Requester has not yet approved the results.
    • rejectionTime

      public final Instant rejectionTime()

      If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.

      Returns:
      If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.
    • deadline

      public final Instant deadline()

      The date and time of the deadline for the assignment. This value is derived from the deadline specification for the HIT and the date and time the Worker accepted the HIT.

      Returns:
      The date and time of the deadline for the assignment. This value is derived from the deadline specification for the HIT and the date and time the Worker accepted the HIT.
    • answer

      public final String answer()

      The Worker's answers submitted for the HIT contained in a QuestionFormAnswers document, if the Worker provides an answer. If the Worker does not provide any answers, Answer may contain a QuestionFormAnswers document, or Answer may be empty.

      Returns:
      The Worker's answers submitted for the HIT contained in a QuestionFormAnswers document, if the Worker provides an answer. If the Worker does not provide any answers, Answer may contain a QuestionFormAnswers document, or Answer may be empty.
    • requesterFeedback

      public final String requesterFeedback()

      The feedback string included with the call to the ApproveAssignment operation or the RejectAssignment operation, if the Requester approved or rejected the assignment and specified feedback.

      Returns:
      The feedback string included with the call to the ApproveAssignment operation or the RejectAssignment operation, if the Requester approved or rejected the assignment and specified feedback.
    • toBuilder

      public Assignment.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<Assignment.Builder,Assignment>
      Returns:
      a builder for type T
    • builder

      public static Assignment.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Assignment.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.