amazonka-mechanicalturk-1.6.1: Amazon Mechanical Turk SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.MechanicalTurk.CreateHITWithHITType

Contents

Description

The CreateHITWithHITType operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by the CreateHITType operation.

This is an alternative way to create HITs from the CreateHIT operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.

CreateHITWithHITType also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters .

Synopsis

Creating a Request

createHITWithHITType Source #

Creates a value of CreateHITWithHITType with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • chitwhittHITReviewPolicy - The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
  • chitwhittUniqueRequestToken - 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.
  • chitwhittRequesterAnnotation - 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.
  • chitwhittMaxAssignments - The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
  • chitwhittHITLayoutId - 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.
  • chitwhittHITLayoutParameters - If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
  • chitwhittQuestion - 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.
  • chitwhittAssignmentReviewPolicy - 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.
  • chitwhittHITTypeId - The HIT type ID you want to create this HIT with.
  • chitwhittLifetimeInSeconds - 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.

data CreateHITWithHITType Source #

See: createHITWithHITType smart constructor.

Instances
Eq CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Data CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateHITWithHITType -> c CreateHITWithHITType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateHITWithHITType #

toConstr :: CreateHITWithHITType -> Constr #

dataTypeOf :: CreateHITWithHITType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateHITWithHITType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateHITWithHITType) #

gmapT :: (forall b. Data b => b -> b) -> CreateHITWithHITType -> CreateHITWithHITType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateHITWithHITType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateHITWithHITType -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateHITWithHITType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateHITWithHITType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateHITWithHITType -> m CreateHITWithHITType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHITWithHITType -> m CreateHITWithHITType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHITWithHITType -> m CreateHITWithHITType #

Read CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Show CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Generic CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Associated Types

type Rep CreateHITWithHITType :: Type -> Type #

Hashable CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

ToJSON CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

AWSRequest CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Associated Types

type Rs CreateHITWithHITType :: Type #

ToHeaders CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

ToPath CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

ToQuery CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

NFData CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Methods

rnf :: CreateHITWithHITType -> () #

type Rep CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITType = D1 (MetaData "CreateHITWithHITType" "Network.AWS.MechanicalTurk.CreateHITWithHITType" "amazonka-mechanicalturk-1.6.1-GV5ehA4FkQY3BZvWX2sEC2" False) (C1 (MetaCons "CreateHITWithHITType'" PrefixI True) (((S1 (MetaSel (Just "_chitwhittHITReviewPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ReviewPolicy)) :*: S1 (MetaSel (Just "_chitwhittUniqueRequestToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_chitwhittRequesterAnnotation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_chitwhittMaxAssignments") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "_chitwhittHITLayoutId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 (MetaSel (Just "_chitwhittHITLayoutParameters") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [HITLayoutParameter])) :*: S1 (MetaSel (Just "_chitwhittQuestion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_chitwhittAssignmentReviewPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ReviewPolicy)) :*: (S1 (MetaSel (Just "_chitwhittHITTypeId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_chitwhittLifetimeInSeconds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Integer))))))
type Rs CreateHITWithHITType Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Request Lenses

chitwhittHITReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy) Source #

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

chitwhittUniqueRequestToken :: Lens' CreateHITWithHITType (Maybe Text) Source #

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.

chitwhittRequesterAnnotation :: Lens' CreateHITWithHITType (Maybe Text) Source #

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.

chitwhittMaxAssignments :: Lens' CreateHITWithHITType (Maybe Int) Source #

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

chitwhittHITLayoutId :: Lens' CreateHITWithHITType (Maybe Text) Source #

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.

chitwhittHITLayoutParameters :: Lens' CreateHITWithHITType [HITLayoutParameter] Source #

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

chitwhittQuestion :: Lens' CreateHITWithHITType (Maybe Text) Source #

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.

chitwhittAssignmentReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy) Source #

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.

chitwhittHITTypeId :: Lens' CreateHITWithHITType Text Source #

The HIT type ID you want to create this HIT with.

chitwhittLifetimeInSeconds :: Lens' CreateHITWithHITType Integer Source #

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.

Destructuring the Response

createHITWithHITTypeResponse Source #

Creates a value of CreateHITWithHITTypeResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • chitwhittrsHIT - Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.
  • chitwhittrsResponseStatus - -- | The response status code.

data CreateHITWithHITTypeResponse Source #

See: createHITWithHITTypeResponse smart constructor.

Instances
Eq CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Data CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateHITWithHITTypeResponse -> c CreateHITWithHITTypeResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateHITWithHITTypeResponse #

toConstr :: CreateHITWithHITTypeResponse -> Constr #

dataTypeOf :: CreateHITWithHITTypeResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateHITWithHITTypeResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateHITWithHITTypeResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateHITWithHITTypeResponse -> CreateHITWithHITTypeResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateHITWithHITTypeResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateHITWithHITTypeResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateHITWithHITTypeResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateHITWithHITTypeResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateHITWithHITTypeResponse -> m CreateHITWithHITTypeResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHITWithHITTypeResponse -> m CreateHITWithHITTypeResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateHITWithHITTypeResponse -> m CreateHITWithHITTypeResponse #

Read CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Show CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Generic CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

Associated Types

type Rep CreateHITWithHITTypeResponse :: Type -> Type #

NFData CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITTypeResponse Source # 
Instance details

Defined in Network.AWS.MechanicalTurk.CreateHITWithHITType

type Rep CreateHITWithHITTypeResponse = D1 (MetaData "CreateHITWithHITTypeResponse" "Network.AWS.MechanicalTurk.CreateHITWithHITType" "amazonka-mechanicalturk-1.6.1-GV5ehA4FkQY3BZvWX2sEC2" False) (C1 (MetaCons "CreateHITWithHITTypeResponse'" PrefixI True) (S1 (MetaSel (Just "_chitwhittrsHIT") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe HIT)) :*: S1 (MetaSel (Just "_chitwhittrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

chitwhittrsHIT :: Lens' CreateHITWithHITTypeResponse (Maybe HIT) Source #

Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.