{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MechanicalTurk.Types.HIT
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MechanicalTurk.Types.HIT where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MechanicalTurk.Types.HITReviewStatus
import Amazonka.MechanicalTurk.Types.HITStatus
import Amazonka.MechanicalTurk.Types.QualificationRequirement
import qualified Amazonka.Prelude as Prelude

-- | The HIT data structure represents a single HIT, including all the
-- information necessary for a Worker to accept and complete the HIT.
--
-- /See:/ 'newHIT' smart constructor.
data HIT = HIT'
  { -- | The date and time the HIT was created.
    HIT -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The ID of the HIT Group of this HIT.
    HIT -> Maybe Text
hITGroupId :: Prelude.Maybe Prelude.Text,
    -- | 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.
    HIT -> Maybe Int
numberOfAssignmentsPending :: Prelude.Maybe Prelude.Int,
    -- | The ID of the HIT type of this HIT
    HIT -> Maybe Text
hITTypeId :: Prelude.Maybe Prelude.Text,
    -- | The date and time the HIT expires.
    HIT -> Maybe POSIX
expiration :: Prelude.Maybe Core.POSIX,
    -- | 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.
    HIT -> Maybe Integer
autoApprovalDelayInSeconds :: Prelude.Maybe Prelude.Integer,
    -- | An arbitrary data field the Requester who created the HIT can use. This
    -- field is visible only to the creator of the HIT.
    HIT -> Maybe Text
requesterAnnotation :: Prelude.Maybe Prelude.Text,
    -- | The status of the HIT and its assignments. Valid Values are Assignable |
    -- Unassignable | Reviewable | Reviewing | Disposed.
    HIT -> Maybe HITStatus
hITStatus :: Prelude.Maybe HITStatus,
    -- | The number of times the HIT can be accepted and completed before the HIT
    -- becomes unavailable.
    HIT -> Maybe Int
maxAssignments :: Prelude.Maybe Prelude.Int,
    -- | The number of assignments for this HIT that have been approved or
    -- rejected.
    HIT -> Maybe Int
numberOfAssignmentsCompleted :: Prelude.Maybe Prelude.Int,
    HIT -> Maybe Text
reward :: Prelude.Maybe Prelude.Text,
    -- | 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.
    HIT -> Maybe Text
keywords :: Prelude.Maybe Prelude.Text,
    -- | The ID of the HIT Layout of this HIT.
    HIT -> Maybe Text
hITLayoutId :: Prelude.Maybe Prelude.Text,
    -- | 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.
    HIT -> Maybe [QualificationRequirement]
qualificationRequirements :: Prelude.Maybe [QualificationRequirement],
    -- | The title of the HIT.
    HIT -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the HIT.
    HIT -> Maybe Text
hITId :: Prelude.Maybe Prelude.Text,
    -- | Indicates the review status of the HIT. Valid Values are NotReviewed |
    -- MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
    HIT -> Maybe HITReviewStatus
hITReviewStatus :: Prelude.Maybe HITReviewStatus,
    -- | The number of assignments for this HIT that are available for Workers to
    -- accept.
    HIT -> Maybe Int
numberOfAssignmentsAvailable :: Prelude.Maybe Prelude.Int,
    -- | A general description of the HIT.
    HIT -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The data the Worker completing the HIT uses produce the results. This is
    -- either either a QuestionForm, HTMLQuestion or an ExternalQuestion data
    -- structure.
    HIT -> Maybe Text
question :: Prelude.Maybe Prelude.Text,
    -- | The length of time, in seconds, that a Worker has to complete the HIT
    -- after accepting it.
    HIT -> Maybe Integer
assignmentDurationInSeconds :: Prelude.Maybe Prelude.Integer
  }
  deriving (HIT -> HIT -> Bool
(HIT -> HIT -> Bool) -> (HIT -> HIT -> Bool) -> Eq HIT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HIT -> HIT -> Bool
$c/= :: HIT -> HIT -> Bool
== :: HIT -> HIT -> Bool
$c== :: HIT -> HIT -> Bool
Prelude.Eq, ReadPrec [HIT]
ReadPrec HIT
Int -> ReadS HIT
ReadS [HIT]
(Int -> ReadS HIT)
-> ReadS [HIT] -> ReadPrec HIT -> ReadPrec [HIT] -> Read HIT
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HIT]
$creadListPrec :: ReadPrec [HIT]
readPrec :: ReadPrec HIT
$creadPrec :: ReadPrec HIT
readList :: ReadS [HIT]
$creadList :: ReadS [HIT]
readsPrec :: Int -> ReadS HIT
$creadsPrec :: Int -> ReadS HIT
Prelude.Read, Int -> HIT -> ShowS
[HIT] -> ShowS
HIT -> String
(Int -> HIT -> ShowS)
-> (HIT -> String) -> ([HIT] -> ShowS) -> Show HIT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HIT] -> ShowS
$cshowList :: [HIT] -> ShowS
show :: HIT -> String
$cshow :: HIT -> String
showsPrec :: Int -> HIT -> ShowS
$cshowsPrec :: Int -> HIT -> ShowS
Prelude.Show, (forall x. HIT -> Rep HIT x)
-> (forall x. Rep HIT x -> HIT) -> Generic HIT
forall x. Rep HIT x -> HIT
forall x. HIT -> Rep HIT x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HIT x -> HIT
$cfrom :: forall x. HIT -> Rep HIT x
Prelude.Generic)

-- |
-- Create a value of 'HIT' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationTime', 'hit_creationTime' - The date and time the HIT was created.
--
-- 'hITGroupId', 'hit_hITGroupId' - The ID of the HIT Group of this HIT.
--
-- 'numberOfAssignmentsPending', 'hit_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.
--
-- 'hITTypeId', 'hit_hITTypeId' - The ID of the HIT type of this HIT
--
-- 'expiration', 'hit_expiration' - The date and time the HIT expires.
--
-- 'autoApprovalDelayInSeconds', 'hit_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.
--
-- 'requesterAnnotation', 'hit_requesterAnnotation' - An arbitrary data field the Requester who created the HIT can use. This
-- field is visible only to the creator of the HIT.
--
-- 'hITStatus', 'hit_hITStatus' - The status of the HIT and its assignments. Valid Values are Assignable |
-- Unassignable | Reviewable | Reviewing | Disposed.
--
-- 'maxAssignments', 'hit_maxAssignments' - The number of times the HIT can be accepted and completed before the HIT
-- becomes unavailable.
--
-- 'numberOfAssignmentsCompleted', 'hit_numberOfAssignmentsCompleted' - The number of assignments for this HIT that have been approved or
-- rejected.
--
-- 'reward', 'hit_reward' - Undocumented member.
--
-- 'keywords', 'hit_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.
--
-- 'hITLayoutId', 'hit_hITLayoutId' - The ID of the HIT Layout of this HIT.
--
-- 'qualificationRequirements', 'hit_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.
--
-- 'title', 'hit_title' - The title of the HIT.
--
-- 'hITId', 'hit_hITId' - A unique identifier for the HIT.
--
-- 'hITReviewStatus', 'hit_hITReviewStatus' - Indicates the review status of the HIT. Valid Values are NotReviewed |
-- MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
--
-- 'numberOfAssignmentsAvailable', 'hit_numberOfAssignmentsAvailable' - The number of assignments for this HIT that are available for Workers to
-- accept.
--
-- 'description', 'hit_description' - A general description of the HIT.
--
-- 'question', 'hit_question' - The data the Worker completing the HIT uses produce the results. This is
-- either either a QuestionForm, HTMLQuestion or an ExternalQuestion data
-- structure.
--
-- 'assignmentDurationInSeconds', 'hit_assignmentDurationInSeconds' - The length of time, in seconds, that a Worker has to complete the HIT
-- after accepting it.
newHIT ::
  HIT
newHIT :: HIT
newHIT =
  HIT' :: Maybe POSIX
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe HITStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [QualificationRequirement]
-> Maybe Text
-> Maybe Text
-> Maybe HITReviewStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> HIT
HIT'
    { $sel:creationTime:HIT' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:hITGroupId:HIT' :: Maybe Text
hITGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfAssignmentsPending:HIT' :: Maybe Int
numberOfAssignmentsPending = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:hITTypeId:HIT' :: Maybe Text
hITTypeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expiration:HIT' :: Maybe POSIX
expiration = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:autoApprovalDelayInSeconds:HIT' :: Maybe Integer
autoApprovalDelayInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:requesterAnnotation:HIT' :: Maybe Text
requesterAnnotation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hITStatus:HIT' :: Maybe HITStatus
hITStatus = Maybe HITStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:maxAssignments:HIT' :: Maybe Int
maxAssignments = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfAssignmentsCompleted:HIT' :: Maybe Int
numberOfAssignmentsCompleted = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:reward:HIT' :: Maybe Text
reward = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keywords:HIT' :: Maybe Text
keywords = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hITLayoutId:HIT' :: Maybe Text
hITLayoutId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:qualificationRequirements:HIT' :: Maybe [QualificationRequirement]
qualificationRequirements = Maybe [QualificationRequirement]
forall a. Maybe a
Prelude.Nothing,
      $sel:title:HIT' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hITId:HIT' :: Maybe Text
hITId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hITReviewStatus:HIT' :: Maybe HITReviewStatus
hITReviewStatus = Maybe HITReviewStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfAssignmentsAvailable:HIT' :: Maybe Int
numberOfAssignmentsAvailable = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:description:HIT' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:question:HIT' :: Maybe Text
question = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assignmentDurationInSeconds:HIT' :: Maybe Integer
assignmentDurationInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time the HIT was created.
hit_creationTime :: Lens.Lens' HIT (Prelude.Maybe Prelude.UTCTime)
hit_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> HIT -> f HIT
hit_creationTime = (HIT -> Maybe POSIX)
-> (HIT -> Maybe POSIX -> HIT)
-> Lens HIT HIT (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:HIT' :: HIT -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: HIT
s@HIT' {} Maybe POSIX
a -> HIT
s {$sel:creationTime:HIT' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: HIT) ((Maybe POSIX -> f (Maybe POSIX)) -> HIT -> f HIT)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HIT
-> f HIT
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ID of the HIT Group of this HIT.
hit_hITGroupId :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_hITGroupId :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_hITGroupId = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
hITGroupId :: Maybe Text
$sel:hITGroupId:HIT' :: HIT -> Maybe Text
hITGroupId} -> Maybe Text
hITGroupId) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:hITGroupId:HIT' :: Maybe Text
hITGroupId = Maybe Text
a} :: HIT)

-- | 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.
hit_numberOfAssignmentsPending :: Lens.Lens' HIT (Prelude.Maybe Prelude.Int)
hit_numberOfAssignmentsPending :: (Maybe Int -> f (Maybe Int)) -> HIT -> f HIT
hit_numberOfAssignmentsPending = (HIT -> Maybe Int)
-> (HIT -> Maybe Int -> HIT)
-> Lens HIT HIT (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Int
numberOfAssignmentsPending :: Maybe Int
$sel:numberOfAssignmentsPending:HIT' :: HIT -> Maybe Int
numberOfAssignmentsPending} -> Maybe Int
numberOfAssignmentsPending) (\s :: HIT
s@HIT' {} Maybe Int
a -> HIT
s {$sel:numberOfAssignmentsPending:HIT' :: Maybe Int
numberOfAssignmentsPending = Maybe Int
a} :: HIT)

-- | The ID of the HIT type of this HIT
hit_hITTypeId :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_hITTypeId :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_hITTypeId = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
hITTypeId :: Maybe Text
$sel:hITTypeId:HIT' :: HIT -> Maybe Text
hITTypeId} -> Maybe Text
hITTypeId) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:hITTypeId:HIT' :: Maybe Text
hITTypeId = Maybe Text
a} :: HIT)

-- | The date and time the HIT expires.
hit_expiration :: Lens.Lens' HIT (Prelude.Maybe Prelude.UTCTime)
hit_expiration :: (Maybe UTCTime -> f (Maybe UTCTime)) -> HIT -> f HIT
hit_expiration = (HIT -> Maybe POSIX)
-> (HIT -> Maybe POSIX -> HIT)
-> Lens HIT HIT (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe POSIX
expiration :: Maybe POSIX
$sel:expiration:HIT' :: HIT -> Maybe POSIX
expiration} -> Maybe POSIX
expiration) (\s :: HIT
s@HIT' {} Maybe POSIX
a -> HIT
s {$sel:expiration:HIT' :: Maybe POSIX
expiration = Maybe POSIX
a} :: HIT) ((Maybe POSIX -> f (Maybe POSIX)) -> HIT -> f HIT)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> HIT
-> f HIT
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | 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.
hit_autoApprovalDelayInSeconds :: Lens.Lens' HIT (Prelude.Maybe Prelude.Integer)
hit_autoApprovalDelayInSeconds :: (Maybe Integer -> f (Maybe Integer)) -> HIT -> f HIT
hit_autoApprovalDelayInSeconds = (HIT -> Maybe Integer)
-> (HIT -> Maybe Integer -> HIT)
-> Lens HIT HIT (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Integer
autoApprovalDelayInSeconds :: Maybe Integer
$sel:autoApprovalDelayInSeconds:HIT' :: HIT -> Maybe Integer
autoApprovalDelayInSeconds} -> Maybe Integer
autoApprovalDelayInSeconds) (\s :: HIT
s@HIT' {} Maybe Integer
a -> HIT
s {$sel:autoApprovalDelayInSeconds:HIT' :: Maybe Integer
autoApprovalDelayInSeconds = Maybe Integer
a} :: HIT)

-- | An arbitrary data field the Requester who created the HIT can use. This
-- field is visible only to the creator of the HIT.
hit_requesterAnnotation :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_requesterAnnotation :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_requesterAnnotation = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
requesterAnnotation :: Maybe Text
$sel:requesterAnnotation:HIT' :: HIT -> Maybe Text
requesterAnnotation} -> Maybe Text
requesterAnnotation) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:requesterAnnotation:HIT' :: Maybe Text
requesterAnnotation = Maybe Text
a} :: HIT)

-- | The status of the HIT and its assignments. Valid Values are Assignable |
-- Unassignable | Reviewable | Reviewing | Disposed.
hit_hITStatus :: Lens.Lens' HIT (Prelude.Maybe HITStatus)
hit_hITStatus :: (Maybe HITStatus -> f (Maybe HITStatus)) -> HIT -> f HIT
hit_hITStatus = (HIT -> Maybe HITStatus)
-> (HIT -> Maybe HITStatus -> HIT)
-> Lens HIT HIT (Maybe HITStatus) (Maybe HITStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe HITStatus
hITStatus :: Maybe HITStatus
$sel:hITStatus:HIT' :: HIT -> Maybe HITStatus
hITStatus} -> Maybe HITStatus
hITStatus) (\s :: HIT
s@HIT' {} Maybe HITStatus
a -> HIT
s {$sel:hITStatus:HIT' :: Maybe HITStatus
hITStatus = Maybe HITStatus
a} :: HIT)

-- | The number of times the HIT can be accepted and completed before the HIT
-- becomes unavailable.
hit_maxAssignments :: Lens.Lens' HIT (Prelude.Maybe Prelude.Int)
hit_maxAssignments :: (Maybe Int -> f (Maybe Int)) -> HIT -> f HIT
hit_maxAssignments = (HIT -> Maybe Int)
-> (HIT -> Maybe Int -> HIT)
-> Lens HIT HIT (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Int
maxAssignments :: Maybe Int
$sel:maxAssignments:HIT' :: HIT -> Maybe Int
maxAssignments} -> Maybe Int
maxAssignments) (\s :: HIT
s@HIT' {} Maybe Int
a -> HIT
s {$sel:maxAssignments:HIT' :: Maybe Int
maxAssignments = Maybe Int
a} :: HIT)

-- | The number of assignments for this HIT that have been approved or
-- rejected.
hit_numberOfAssignmentsCompleted :: Lens.Lens' HIT (Prelude.Maybe Prelude.Int)
hit_numberOfAssignmentsCompleted :: (Maybe Int -> f (Maybe Int)) -> HIT -> f HIT
hit_numberOfAssignmentsCompleted = (HIT -> Maybe Int)
-> (HIT -> Maybe Int -> HIT)
-> Lens HIT HIT (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Int
numberOfAssignmentsCompleted :: Maybe Int
$sel:numberOfAssignmentsCompleted:HIT' :: HIT -> Maybe Int
numberOfAssignmentsCompleted} -> Maybe Int
numberOfAssignmentsCompleted) (\s :: HIT
s@HIT' {} Maybe Int
a -> HIT
s {$sel:numberOfAssignmentsCompleted:HIT' :: Maybe Int
numberOfAssignmentsCompleted = Maybe Int
a} :: HIT)

-- | Undocumented member.
hit_reward :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_reward :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_reward = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
reward :: Maybe Text
$sel:reward:HIT' :: HIT -> Maybe Text
reward} -> Maybe Text
reward) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:reward:HIT' :: Maybe Text
reward = Maybe Text
a} :: HIT)

-- | 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.
hit_keywords :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_keywords :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_keywords = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
keywords :: Maybe Text
$sel:keywords:HIT' :: HIT -> Maybe Text
keywords} -> Maybe Text
keywords) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:keywords:HIT' :: Maybe Text
keywords = Maybe Text
a} :: HIT)

-- | The ID of the HIT Layout of this HIT.
hit_hITLayoutId :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_hITLayoutId :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_hITLayoutId = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
hITLayoutId :: Maybe Text
$sel:hITLayoutId:HIT' :: HIT -> Maybe Text
hITLayoutId} -> Maybe Text
hITLayoutId) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:hITLayoutId:HIT' :: Maybe Text
hITLayoutId = Maybe Text
a} :: HIT)

-- | 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.
hit_qualificationRequirements :: Lens.Lens' HIT (Prelude.Maybe [QualificationRequirement])
hit_qualificationRequirements :: (Maybe [QualificationRequirement]
 -> f (Maybe [QualificationRequirement]))
-> HIT -> f HIT
hit_qualificationRequirements = (HIT -> Maybe [QualificationRequirement])
-> (HIT -> Maybe [QualificationRequirement] -> HIT)
-> Lens
     HIT
     HIT
     (Maybe [QualificationRequirement])
     (Maybe [QualificationRequirement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe [QualificationRequirement]
qualificationRequirements :: Maybe [QualificationRequirement]
$sel:qualificationRequirements:HIT' :: HIT -> Maybe [QualificationRequirement]
qualificationRequirements} -> Maybe [QualificationRequirement]
qualificationRequirements) (\s :: HIT
s@HIT' {} Maybe [QualificationRequirement]
a -> HIT
s {$sel:qualificationRequirements:HIT' :: Maybe [QualificationRequirement]
qualificationRequirements = Maybe [QualificationRequirement]
a} :: HIT) ((Maybe [QualificationRequirement]
  -> f (Maybe [QualificationRequirement]))
 -> HIT -> f HIT)
-> ((Maybe [QualificationRequirement]
     -> f (Maybe [QualificationRequirement]))
    -> Maybe [QualificationRequirement]
    -> f (Maybe [QualificationRequirement]))
-> (Maybe [QualificationRequirement]
    -> f (Maybe [QualificationRequirement]))
-> HIT
-> f HIT
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [QualificationRequirement]
  [QualificationRequirement]
  [QualificationRequirement]
  [QualificationRequirement]
-> Iso
     (Maybe [QualificationRequirement])
     (Maybe [QualificationRequirement])
     (Maybe [QualificationRequirement])
     (Maybe [QualificationRequirement])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [QualificationRequirement]
  [QualificationRequirement]
  [QualificationRequirement]
  [QualificationRequirement]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The title of the HIT.
hit_title :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_title :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_title = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
title :: Maybe Text
$sel:title:HIT' :: HIT -> Maybe Text
title} -> Maybe Text
title) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:title:HIT' :: Maybe Text
title = Maybe Text
a} :: HIT)

-- | A unique identifier for the HIT.
hit_hITId :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_hITId :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_hITId = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
hITId :: Maybe Text
$sel:hITId:HIT' :: HIT -> Maybe Text
hITId} -> Maybe Text
hITId) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:hITId:HIT' :: Maybe Text
hITId = Maybe Text
a} :: HIT)

-- | Indicates the review status of the HIT. Valid Values are NotReviewed |
-- MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.
hit_hITReviewStatus :: Lens.Lens' HIT (Prelude.Maybe HITReviewStatus)
hit_hITReviewStatus :: (Maybe HITReviewStatus -> f (Maybe HITReviewStatus))
-> HIT -> f HIT
hit_hITReviewStatus = (HIT -> Maybe HITReviewStatus)
-> (HIT -> Maybe HITReviewStatus -> HIT)
-> Lens HIT HIT (Maybe HITReviewStatus) (Maybe HITReviewStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe HITReviewStatus
hITReviewStatus :: Maybe HITReviewStatus
$sel:hITReviewStatus:HIT' :: HIT -> Maybe HITReviewStatus
hITReviewStatus} -> Maybe HITReviewStatus
hITReviewStatus) (\s :: HIT
s@HIT' {} Maybe HITReviewStatus
a -> HIT
s {$sel:hITReviewStatus:HIT' :: Maybe HITReviewStatus
hITReviewStatus = Maybe HITReviewStatus
a} :: HIT)

-- | The number of assignments for this HIT that are available for Workers to
-- accept.
hit_numberOfAssignmentsAvailable :: Lens.Lens' HIT (Prelude.Maybe Prelude.Int)
hit_numberOfAssignmentsAvailable :: (Maybe Int -> f (Maybe Int)) -> HIT -> f HIT
hit_numberOfAssignmentsAvailable = (HIT -> Maybe Int)
-> (HIT -> Maybe Int -> HIT)
-> Lens HIT HIT (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Int
numberOfAssignmentsAvailable :: Maybe Int
$sel:numberOfAssignmentsAvailable:HIT' :: HIT -> Maybe Int
numberOfAssignmentsAvailable} -> Maybe Int
numberOfAssignmentsAvailable) (\s :: HIT
s@HIT' {} Maybe Int
a -> HIT
s {$sel:numberOfAssignmentsAvailable:HIT' :: Maybe Int
numberOfAssignmentsAvailable = Maybe Int
a} :: HIT)

-- | A general description of the HIT.
hit_description :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_description :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_description = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
description :: Maybe Text
$sel:description:HIT' :: HIT -> Maybe Text
description} -> Maybe Text
description) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:description:HIT' :: Maybe Text
description = Maybe Text
a} :: HIT)

-- | The data the Worker completing the HIT uses produce the results. This is
-- either either a QuestionForm, HTMLQuestion or an ExternalQuestion data
-- structure.
hit_question :: Lens.Lens' HIT (Prelude.Maybe Prelude.Text)
hit_question :: (Maybe Text -> f (Maybe Text)) -> HIT -> f HIT
hit_question = (HIT -> Maybe Text)
-> (HIT -> Maybe Text -> HIT)
-> Lens HIT HIT (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Text
question :: Maybe Text
$sel:question:HIT' :: HIT -> Maybe Text
question} -> Maybe Text
question) (\s :: HIT
s@HIT' {} Maybe Text
a -> HIT
s {$sel:question:HIT' :: Maybe Text
question = Maybe Text
a} :: HIT)

-- | The length of time, in seconds, that a Worker has to complete the HIT
-- after accepting it.
hit_assignmentDurationInSeconds :: Lens.Lens' HIT (Prelude.Maybe Prelude.Integer)
hit_assignmentDurationInSeconds :: (Maybe Integer -> f (Maybe Integer)) -> HIT -> f HIT
hit_assignmentDurationInSeconds = (HIT -> Maybe Integer)
-> (HIT -> Maybe Integer -> HIT)
-> Lens HIT HIT (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HIT' {Maybe Integer
assignmentDurationInSeconds :: Maybe Integer
$sel:assignmentDurationInSeconds:HIT' :: HIT -> Maybe Integer
assignmentDurationInSeconds} -> Maybe Integer
assignmentDurationInSeconds) (\s :: HIT
s@HIT' {} Maybe Integer
a -> HIT
s {$sel:assignmentDurationInSeconds:HIT' :: Maybe Integer
assignmentDurationInSeconds = Maybe Integer
a} :: HIT)

instance Core.FromJSON HIT where
  parseJSON :: Value -> Parser HIT
parseJSON =
    String -> (Object -> Parser HIT) -> Value -> Parser HIT
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HIT"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe HITStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [QualificationRequirement]
-> Maybe Text
-> Maybe Text
-> Maybe HITReviewStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> HIT
HIT'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe HITStatus
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [QualificationRequirement]
 -> Maybe Text
 -> Maybe Text
 -> Maybe HITReviewStatus
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> HIT)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HITGroupId")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfAssignmentsPending")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HITTypeId")
            Parser
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Expiration")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutoApprovalDelayInSeconds")
            Parser
  (Maybe Text
   -> Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe HITStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequesterAnnotation")
            Parser
  (Maybe HITStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe HITStatus)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HITStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HITStatus")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxAssignments")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfAssignmentsCompleted")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Reward")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Keywords")
            Parser
  (Maybe Text
   -> Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe [QualificationRequirement]
      -> Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HITLayoutId")
            Parser
  (Maybe [QualificationRequirement]
   -> Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe [QualificationRequirement])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [QualificationRequirement]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QualificationRequirements"
                            Parser (Maybe (Maybe [QualificationRequirement]))
-> Maybe [QualificationRequirement]
-> Parser (Maybe [QualificationRequirement])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [QualificationRequirement]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe HITReviewStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Title")
            Parser
  (Maybe Text
   -> Maybe HITReviewStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> HIT)
-> Parser (Maybe Text)
-> Parser
     (Maybe HITReviewStatus
      -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe Integer -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HITId")
            Parser
  (Maybe HITReviewStatus
   -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe Integer -> HIT)
-> Parser (Maybe HITReviewStatus)
-> Parser
     (Maybe Int -> Maybe Text -> Maybe Text -> Maybe Integer -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HITReviewStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HITReviewStatus")
            Parser
  (Maybe Int -> Maybe Text -> Maybe Text -> Maybe Integer -> HIT)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Text -> Maybe Integer -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfAssignmentsAvailable")
            Parser (Maybe Text -> Maybe Text -> Maybe Integer -> HIT)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Integer -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Maybe Text -> Maybe Integer -> HIT)
-> Parser (Maybe Text) -> Parser (Maybe Integer -> HIT)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Question")
            Parser (Maybe Integer -> HIT)
-> Parser (Maybe Integer) -> Parser HIT
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssignmentDurationInSeconds")
      )

instance Prelude.Hashable HIT

instance Prelude.NFData HIT