blib/lib/Paws/MTurk/CreateHITWithHITType.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 21 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::MTurk::CreateHITWithHITType;
3 use Moose;
4 has AssignmentReviewPolicy => (is => 'ro', isa => 'Paws::MTurk::ReviewPolicy');
5 has HITLayoutId => (is => 'ro', isa => 'Str');
6 has HITLayoutParameters => (is => 'ro', isa => 'ArrayRef[Paws::MTurk::HITLayoutParameter]');
7 has HITReviewPolicy => (is => 'ro', isa => 'Paws::MTurk::ReviewPolicy');
8 has HITTypeId => (is => 'ro', isa => 'Str', required => 1);
9 has LifetimeInSeconds => (is => 'ro', isa => 'Int', required => 1);
10 has MaxAssignments => (is => 'ro', isa => 'Int');
11 has Question => (is => 'ro', isa => 'Str');
12 has RequesterAnnotation => (is => 'ro', isa => 'Str');
13 has UniqueRequestToken => (is => 'ro', isa => 'Str');
14  
15 use MooseX::ClassAttribute;
16  
17 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateHITWithHITType');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::MTurk::CreateHITWithHITTypeResponse');
19 class_has _result_key => (isa => 'Str', is => 'ro');
20 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::MTurk::CreateHITWithHITType - Arguments for method CreateHITWithHITType on L<Paws::MTurk>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method CreateHITWithHITType on the
31 L<Amazon Mechanical Turk|Paws::MTurk> service. Use the attributes of this class
32 as arguments to method CreateHITWithHITType.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateHITWithHITType.
35  
36 =head1 SYNOPSIS
37  
38 my $mturk-requester = Paws->service('MTurk');
39 my $CreateHITWithHITTypeResponse = $mturk -requester->CreateHITWithHITType(
40 HITTypeId => 'MyEntityId',
41 LifetimeInSeconds => 1,
42 AssignmentReviewPolicy => {
43 PolicyName => 'MyString',
44 Parameters => [
45 {
46 Key => 'MyString',
47 MapEntries => [
48 {
49 Key => 'MyString',
50 Values => [ 'MyString', ... ], # OPTIONAL
51 },
52 ...
53 ], # OPTIONAL
54 Values => [ 'MyString', ... ], # OPTIONAL
55 },
56 ...
57 ], # OPTIONAL
58 }, # OPTIONAL
59 HITLayoutId => 'MyEntityId', # OPTIONAL
60 HITLayoutParameters => [
61 {
62 Name => 'MyString',
63 Value => 'MyString',
64  
65 },
66 ...
67 ], # OPTIONAL
68 HITReviewPolicy => {
69 PolicyName => 'MyString',
70 Parameters => [
71 {
72 Key => 'MyString',
73 MapEntries => [
74 {
75 Key => 'MyString',
76 Values => [ 'MyString', ... ], # OPTIONAL
77 },
78 ...
79 ], # OPTIONAL
80 Values => [ 'MyString', ... ], # OPTIONAL
81 },
82 ...
83 ], # OPTIONAL
84 }, # OPTIONAL
85 MaxAssignments => 1, # OPTIONAL
86 Question => 'MyString', # OPTIONAL
87 RequesterAnnotation => 'MyString', # OPTIONAL
88 UniqueRequestToken => 'MyIdempotencyToken', # OPTIONAL
89 );
90  
91 # Results:
92 my $HIT = $CreateHITWithHITTypeResponse->HIT;
93  
94 # Returns a L<Paws::MTurk::CreateHITWithHITTypeResponse> object.
95  
96 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.
97 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/mturk-requester/CreateHITWithHITType>
98  
99 =head1 ATTRIBUTES
100  
101  
102 =head2 AssignmentReviewPolicy => L<Paws::MTurk::ReviewPolicy>
103  
104 The Assignment-level Review Policy applies to the assignments under the
105 HIT. You can specify for Mechanical Turk to take various actions based
106 on the policy.
107  
108  
109  
110 =head2 HITLayoutId => Str
111  
112 The HITLayoutId allows you to use a pre-existing HIT design with
113 placeholder values and create an additional HIT by providing those
114 values as HITLayoutParameters.
115  
116 Constraints: Either a Question parameter or a HITLayoutId parameter
117 must be provided.
118  
119  
120  
121 =head2 HITLayoutParameters => ArrayRef[L<Paws::MTurk::HITLayoutParameter>]
122  
123 If the HITLayoutId is provided, any placeholder values must be filled
124 in with values using the HITLayoutParameter structure. For more
125 information, see HITLayout.
126  
127  
128  
129 =head2 HITReviewPolicy => L<Paws::MTurk::ReviewPolicy>
130  
131 The HIT-level Review Policy applies to the HIT. You can specify for
132 Mechanical Turk to take various actions based on the policy.
133  
134  
135  
136 =head2 B<REQUIRED> HITTypeId => Str
137  
138 The HIT type ID you want to create this HIT with.
139  
140  
141  
142 =head2 B<REQUIRED> LifetimeInSeconds => Int
143  
144 An amount of time, in seconds, after which the HIT is no longer
145 available for users to accept. After the lifetime of the HIT elapses,
146 the HIT no longer appears in HIT searches, even if not all of the
147 assignments for the HIT have been accepted.
148  
149  
150  
151 =head2 MaxAssignments => Int
152  
153 The number of times the HIT can be accepted and completed before the
154 HIT becomes unavailable.
155  
156  
157  
158 =head2 Question => Str
159  
160 The data the person completing the HIT uses to produce the results.
161  
162 Constraints: Must be a QuestionForm data structure, an ExternalQuestion
163 data structure, or an HTMLQuestion data structure. The XML question
164 data must not be larger than 64 kilobytes (65,535 bytes) in size,
165 including whitespace.
166  
167 Either a Question parameter or a HITLayoutId parameter must be
168 provided.
169  
170  
171  
172 =head2 RequesterAnnotation => Str
173  
174 An arbitrary data field. The RequesterAnnotation parameter lets your
175 application attach arbitrary data to the HIT for tracking purposes. For
176 example, this parameter could be an identifier internal to the
177 Requester's application that corresponds with the HIT.
178  
179 The RequesterAnnotation parameter for a HIT is only visible to the
180 Requester who created the HIT. It is not shown to the Worker, or any
181 other Requester.
182  
183 The RequesterAnnotation parameter may be different for each HIT you
184 submit. It does not affect how your HITs are grouped.
185  
186  
187  
188 =head2 UniqueRequestToken => Str
189  
190 A unique identifier for this request which allows you to retry the call
191 on error without creating duplicate HITs. This is useful in cases such
192 as network timeouts where it is unclear whether or not the call
193 succeeded on the server. If the HIT already exists in the system from a
194 previous call using the same UniqueRequestToken, subsequent calls will
195 return a AWS.MechanicalTurk.HitAlreadyExists error with a message
196 containing the HITId.
197  
198 Note: It is your responsibility to ensure uniqueness of the token. The
199 unique token expires after 24 hours. Subsequent calls using the same
200 UniqueRequestToken made after the 24 hour limit could create duplicate
201 HITs.
202  
203  
204  
205  
206 =head1 SEE ALSO
207  
208 This class forms part of L<Paws>, documenting arguments for method CreateHITWithHITType in L<Paws::MTurk>
209  
210 =head1 BUGS and CONTRIBUTIONS
211  
212 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
213  
214 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
215  
216 =cut
217