File Coverage

blib/lib/Paws/MTurk/CreateHIT.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::MTurk::CreateHIT;
3 1     1   435 use Moose;
  1         3  
  1         7  
4             has AssignmentDurationInSeconds => (is => 'ro', isa => 'Int', required => 1);
5             has AssignmentReviewPolicy => (is => 'ro', isa => 'Paws::MTurk::ReviewPolicy');
6             has AutoApprovalDelayInSeconds => (is => 'ro', isa => 'Int');
7             has Description => (is => 'ro', isa => 'Str', required => 1);
8             has HITLayoutId => (is => 'ro', isa => 'Str');
9             has HITLayoutParameters => (is => 'ro', isa => 'ArrayRef[Paws::MTurk::HITLayoutParameter]');
10             has HITReviewPolicy => (is => 'ro', isa => 'Paws::MTurk::ReviewPolicy');
11             has Keywords => (is => 'ro', isa => 'Str');
12             has LifetimeInSeconds => (is => 'ro', isa => 'Int', required => 1);
13             has MaxAssignments => (is => 'ro', isa => 'Int');
14             has QualificationRequirements => (is => 'ro', isa => 'ArrayRef[Paws::MTurk::QualificationRequirement]');
15             has Question => (is => 'ro', isa => 'Str');
16             has RequesterAnnotation => (is => 'ro', isa => 'Str');
17             has Reward => (is => 'ro', isa => 'Str', required => 1);
18             has Title => (is => 'ro', isa => 'Str', required => 1);
19             has UniqueRequestToken => (is => 'ro', isa => 'Str');
20              
21 1     1   6187 use MooseX::ClassAttribute;
  1         3  
  1         11  
22              
23             class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateHIT');
24             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::MTurk::CreateHITResponse');
25             class_has _result_key => (isa => 'Str', is => 'ro');
26             1;
27              
28             ### main pod documentation begin ###
29              
30             =head1 NAME
31              
32             Paws::MTurk::CreateHIT - Arguments for method CreateHIT on Paws::MTurk
33              
34             =head1 DESCRIPTION
35              
36             This class represents the parameters used for calling the method CreateHIT on the
37             Amazon Mechanical Turk service. Use the attributes of this class
38             as arguments to method CreateHIT.
39              
40             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateHIT.
41              
42             As an example:
43              
44             $service_obj->CreateHIT(Att1 => $value1, Att2 => $value2, ...);
45              
46             Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
47              
48             =head1 ATTRIBUTES
49              
50              
51             =head2 B<REQUIRED> AssignmentDurationInSeconds => Int
52              
53             The amount of time, in seconds, that a Worker has to complete the HIT
54             after accepting it. If a Worker does not complete the assignment within
55             the specified duration, the assignment is considered abandoned. If the
56             HIT is still active (that is, its lifetime has not elapsed), the
57             assignment becomes available for other users to find and accept.
58              
59              
60              
61             =head2 AssignmentReviewPolicy => L<Paws::MTurk::ReviewPolicy>
62              
63             The Assignment-level Review Policy applies to the assignments under the
64             HIT. You can specify for Mechanical Turk to take various actions based
65             on the policy.
66              
67              
68              
69             =head2 AutoApprovalDelayInSeconds => Int
70              
71             The number of seconds after an assignment for the HIT has been
72             submitted, after which the assignment is considered Approved
73             automatically unless the Requester explicitly rejects it.
74              
75              
76              
77             =head2 B<REQUIRED> Description => Str
78              
79             A general description of the HIT. A description includes detailed
80             information about the kind of task the HIT contains. On the Amazon
81             Mechanical Turk web site, the HIT description appears in the expanded
82             view of search results, and in the HIT and assignment screens. A good
83             description gives the user enough information to evaluate the HIT
84             before accepting it.
85              
86              
87              
88             =head2 HITLayoutId => Str
89              
90             The HITLayoutId allows you to use a pre-existing HIT design with
91             placeholder values and create an additional HIT by providing those
92             values as HITLayoutParameters.
93              
94             Constraints: Either a Question parameter or a HITLayoutId parameter
95             must be provided.
96              
97              
98              
99             =head2 HITLayoutParameters => ArrayRef[L<Paws::MTurk::HITLayoutParameter>]
100              
101             If the HITLayoutId is provided, any placeholder values must be filled
102             in with values using the HITLayoutParameter structure. For more
103             information, see HITLayout.
104              
105              
106              
107             =head2 HITReviewPolicy => L<Paws::MTurk::ReviewPolicy>
108              
109             The HIT-level Review Policy applies to the HIT. You can specify for
110             Mechanical Turk to take various actions based on the policy.
111              
112              
113              
114             =head2 Keywords => Str
115              
116             One or more words or phrases that describe the HIT, separated by
117             commas. These words are used in searches to find HITs.
118              
119              
120              
121             =head2 B<REQUIRED> LifetimeInSeconds => Int
122              
123             An amount of time, in seconds, after which the HIT is no longer
124             available for users to accept. After the lifetime of the HIT elapses,
125             the HIT no longer appears in HIT searches, even if not all of the
126             assignments for the HIT have been accepted.
127              
128              
129              
130             =head2 MaxAssignments => Int
131              
132             The number of times the HIT can be accepted and completed before the
133             HIT becomes unavailable.
134              
135              
136              
137             =head2 QualificationRequirements => ArrayRef[L<Paws::MTurk::QualificationRequirement>]
138              
139             A condition that a Worker's Qualifications must meet before the Worker
140             is allowed to accept and complete the HIT.
141              
142              
143              
144             =head2 Question => Str
145              
146             The data the person completing the HIT uses to produce the results.
147              
148             Constraints: Must be a QuestionForm data structure, an ExternalQuestion
149             data structure, or an HTMLQuestion data structure. The XML question
150             data must not be larger than 64 kilobytes (65,535 bytes) in size,
151             including whitespace.
152              
153             Either a Question parameter or a HITLayoutId parameter must be
154             provided.
155              
156              
157              
158             =head2 RequesterAnnotation => Str
159              
160             An arbitrary data field. The RequesterAnnotation parameter lets your
161             application attach arbitrary data to the HIT for tracking purposes. For
162             example, this parameter could be an identifier internal to the
163             Requester's application that corresponds with the HIT.
164              
165             The RequesterAnnotation parameter for a HIT is only visible to the
166             Requester who created the HIT. It is not shown to the Worker, or any
167             other Requester.
168              
169             The RequesterAnnotation parameter may be different for each HIT you
170             submit. It does not affect how your HITs are grouped.
171              
172              
173              
174             =head2 B<REQUIRED> Reward => Str
175              
176             The amount of money the Requester will pay a Worker for successfully
177             completing the HIT.
178              
179              
180              
181             =head2 B<REQUIRED> Title => Str
182              
183             The title of the HIT. A title should be short and descriptive about the
184             kind of task the HIT contains. On the Amazon Mechanical Turk web site,
185             the HIT title appears in search results, and everywhere the HIT is
186             mentioned.
187              
188              
189              
190             =head2 UniqueRequestToken => Str
191              
192             A unique identifier for this request which allows you to retry the call
193             on error without creating duplicate HITs. This is useful in cases such
194             as network timeouts where it is unclear whether or not the call
195             succeeded on the server. If the HIT already exists in the system from a
196             previous call using the same UniqueRequestToken, subsequent calls will
197             return a AWS.MechanicalTurk.HitAlreadyExists error with a message
198             containing the HITId.
199              
200             Note: It is your responsibility to ensure uniqueness of the token. The
201             unique token expires after 24 hours. Subsequent calls using the same
202             UniqueRequestToken made after the 24 hour limit could create duplicate
203             HITs.
204              
205              
206              
207              
208             =head1 SEE ALSO
209              
210             This class forms part of L<Paws>, documenting arguments for method CreateHIT in L<Paws::MTurk>
211              
212             =head1 BUGS and CONTRIBUTIONS
213              
214             The source code is located here: https://github.com/pplu/aws-sdk-perl
215              
216             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
217              
218             =cut
219