1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5import ( 6 "time" 7) 8 9// The Assignment data structure represents a single assignment of a HIT to a 10// Worker. The assignment tracks the Worker's efforts to complete the HIT, and 11// contains the results for later retrieval. 12type Assignment struct { 13 14 // The date and time the Worker accepted the assignment. 15 AcceptTime *time.Time 16 17 // The Worker's answers submitted for the HIT contained in a QuestionFormAnswers 18 // document, if the Worker provides an answer. If the Worker does not provide any 19 // answers, Answer may contain a QuestionFormAnswers document, or Answer may be 20 // empty. 21 Answer *string 22 23 // If the Worker has submitted results and the Requester has approved the results, 24 // ApprovalTime is the date and time the Requester approved the results. This value 25 // is omitted from the assignment if the Requester has not yet approved the 26 // results. 27 ApprovalTime *time.Time 28 29 // A unique identifier for the assignment. 30 AssignmentId *string 31 32 // The status of the assignment. 33 AssignmentStatus AssignmentStatus 34 35 // If results have been submitted, AutoApprovalTime is the date and time the 36 // results of the assignment results are considered Approved automatically if they 37 // have not already been explicitly approved or rejected by the Requester. This 38 // value is derived from the auto-approval delay specified by the Requester in the 39 // HIT. This value is omitted from the assignment if the Worker has not yet 40 // submitted results. 41 AutoApprovalTime *time.Time 42 43 // The date and time of the deadline for the assignment. This value is derived from 44 // the deadline specification for the HIT and the date and time the Worker accepted 45 // the HIT. 46 Deadline *time.Time 47 48 // The ID of the HIT. 49 HITId *string 50 51 // If the Worker has submitted results and the Requester has rejected the results, 52 // RejectionTime is the date and time the Requester rejected the results. 53 RejectionTime *time.Time 54 55 // The feedback string included with the call to the ApproveAssignment operation or 56 // the RejectAssignment operation, if the Requester approved or rejected the 57 // assignment and specified feedback. 58 RequesterFeedback *string 59 60 // If the Worker has submitted results, SubmitTime is the date and time the 61 // assignment was submitted. This value is omitted from the assignment if the 62 // Worker has not yet submitted results. 63 SubmitTime *time.Time 64 65 // The ID of the Worker who accepted the HIT. 66 WorkerId *string 67} 68 69// An object representing a Bonus payment paid to a Worker. 70type BonusPayment struct { 71 72 // The ID of the assignment associated with this bonus payment. 73 AssignmentId *string 74 75 // A string representing a currency amount. 76 BonusAmount *string 77 78 // The date and time of when the bonus was granted. 79 GrantTime *time.Time 80 81 // The Reason text given when the bonus was granted, if any. 82 Reason *string 83 84 // The ID of the Worker to whom the bonus was paid. 85 WorkerId *string 86} 87 88// The HIT data structure represents a single HIT, including all the information 89// necessary for a Worker to accept and complete the HIT. 90type HIT struct { 91 92 // The length of time, in seconds, that a Worker has to complete the HIT after 93 // accepting it. 94 AssignmentDurationInSeconds *int64 95 96 // The amount of time, in seconds, after the Worker submits an assignment for the 97 // HIT that the results are automatically approved by Amazon Mechanical Turk. This 98 // is the amount of time the Requester has to reject an assignment submitted by a 99 // Worker before the assignment is auto-approved and the Worker is paid. 100 AutoApprovalDelayInSeconds *int64 101 102 // The date and time the HIT was created. 103 CreationTime *time.Time 104 105 // A general description of the HIT. 106 Description *string 107 108 // The date and time the HIT expires. 109 Expiration *time.Time 110 111 // The ID of the HIT Group of this HIT. 112 HITGroupId *string 113 114 // A unique identifier for the HIT. 115 HITId *string 116 117 // The ID of the HIT Layout of this HIT. 118 HITLayoutId *string 119 120 // Indicates the review status of the HIT. Valid Values are NotReviewed | 121 // MarkedForReview | ReviewedAppropriate | ReviewedInappropriate. 122 HITReviewStatus HITReviewStatus 123 124 // The status of the HIT and its assignments. Valid Values are Assignable | 125 // Unassignable | Reviewable | Reviewing | Disposed. 126 HITStatus HITStatus 127 128 // The ID of the HIT type of this HIT 129 HITTypeId *string 130 131 // One or more words or phrases that describe the HIT, separated by commas. Search 132 // terms similar to the keywords of a HIT are more likely to have the HIT in the 133 // search results. 134 Keywords *string 135 136 // The number of times the HIT can be accepted and completed before the HIT becomes 137 // unavailable. 138 MaxAssignments *int32 139 140 // The number of assignments for this HIT that are available for Workers to accept. 141 NumberOfAssignmentsAvailable *int32 142 143 // The number of assignments for this HIT that have been approved or rejected. 144 NumberOfAssignmentsCompleted *int32 145 146 // The number of assignments for this HIT that are being previewed or have been 147 // accepted by Workers, but have not yet been submitted, returned, or abandoned. 148 NumberOfAssignmentsPending *int32 149 150 // Conditions that a Worker's Qualifications must meet in order to accept the HIT. 151 // A HIT can have between zero and ten Qualification requirements. All requirements 152 // must be met in order for a Worker to accept the HIT. Additionally, other actions 153 // can be restricted using the ActionsGuarded field on each 154 // QualificationRequirement structure. 155 QualificationRequirements []QualificationRequirement 156 157 // The data the Worker completing the HIT uses produce the results. This is either 158 // either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure. 159 Question *string 160 161 // An arbitrary data field the Requester who created the HIT can use. This field is 162 // visible only to the creator of the HIT. 163 RequesterAnnotation *string 164 165 // A string representing a currency amount. 166 Reward *string 167 168 // The title of the HIT. 169 Title *string 170} 171 172// The HITLayoutParameter data structure defines parameter values used with a 173// HITLayout. A HITLayout is a reusable Amazon Mechanical Turk project template 174// used to provide Human Intelligence Task (HIT) question data for CreateHIT. 175type HITLayoutParameter struct { 176 177 // The name of the parameter in the HITLayout. 178 // 179 // This member is required. 180 Name *string 181 182 // The value substituted for the parameter referenced in the HITLayout. 183 // 184 // This member is required. 185 Value *string 186} 187 188// The Locale data structure represents a geographical region or location. 189type Locale struct { 190 191 // The country of the locale. Must be a valid ISO 3166 country code. For example, 192 // the code US refers to the United States of America. 193 // 194 // This member is required. 195 Country *string 196 197 // The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For 198 // example, the code WA refers to the state of Washington. 199 Subdivision *string 200} 201 202// The NotificationSpecification data structure describes a HIT event notification 203// for a HIT type. 204type NotificationSpecification struct { 205 206 // The target for notification messages. The Destination’s format is determined by 207 // the specified Transport: 208 // 209 // * When Transport is Email, the Destination is your 210 // email address. 211 // 212 // * When Transport is SQS, the Destination is your queue URL. 213 // 214 // * 215 // When Transport is SNS, the Destination is the ARN of your topic. 216 // 217 // This member is required. 218 Destination *string 219 220 // The list of events that should cause notifications to be sent. Valid Values: 221 // AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | 222 // AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | 223 // HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is 224 // only valid for the SendTestEventNotification operation. 225 // 226 // This member is required. 227 EventTypes []EventType 228 229 // The method Amazon Mechanical Turk uses to send the notification. Valid Values: 230 // Email | SQS | SNS. 231 // 232 // This member is required. 233 Transport NotificationTransport 234 235 // The version of the Notification API to use. Valid value is 2006-05-05. 236 // 237 // This member is required. 238 Version *string 239} 240 241// When MTurk encounters an issue with notifying the Workers you specified, it 242// returns back this object with failure details. 243type NotifyWorkersFailureStatus struct { 244 245 // Encoded value for the failure type. 246 NotifyWorkersFailureCode NotifyWorkersFailureCode 247 248 // A message detailing the reason the Worker could not be notified. 249 NotifyWorkersFailureMessage *string 250 251 // The ID of the Worker. 252 WorkerId *string 253} 254 255// This data structure is the data type for the AnswerKey parameter of the 256// ScoreMyKnownAnswers/2011-09-01 Review Policy. 257type ParameterMapEntry struct { 258 259 // The QuestionID from the HIT that is used to identify which question requires 260 // Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review 261 // Policy. 262 Key *string 263 264 // The list of answers to the question specified in the MapEntry Key element. The 265 // Worker must match all values in order for the answer to be scored correctly. 266 Values []string 267} 268 269// Name of the parameter from the Review policy. 270type PolicyParameter struct { 271 272 // Name of the parameter from the list of Review Polices. 273 Key *string 274 275 // List of ParameterMapEntry objects. 276 MapEntries []ParameterMapEntry 277 278 // The list of values of the Parameter 279 Values []string 280} 281 282// The Qualification data structure represents a Qualification assigned to a user, 283// including the Qualification type and the value (score). 284type Qualification struct { 285 286 // The date and time the Qualification was granted to the Worker. If the Worker's 287 // Qualification was revoked, and then re-granted based on a new Qualification 288 // request, GrantTime is the date and time of the last call to the 289 // AcceptQualificationRequest operation. 290 GrantTime *time.Time 291 292 // The value (score) of the Qualification, if the Qualification has an integer 293 // value. 294 IntegerValue *int32 295 296 // The Locale data structure represents a geographical region or location. 297 LocaleValue *Locale 298 299 // The ID of the Qualification type for the Qualification. 300 QualificationTypeId *string 301 302 // The status of the Qualification. Valid values are Granted | Revoked. 303 Status QualificationStatus 304 305 // The ID of the Worker who possesses the Qualification. 306 WorkerId *string 307} 308 309// The QualificationRequest data structure represents a request a Worker has made 310// for a Qualification. 311type QualificationRequest struct { 312 313 // The Worker's answers for the Qualification type's test contained in a 314 // QuestionFormAnswers document, if the type has a test and the Worker has 315 // submitted answers. If the Worker does not provide any answers, Answer may be 316 // empty. 317 Answer *string 318 319 // The ID of the Qualification request, a unique identifier generated when the 320 // request was submitted. 321 QualificationRequestId *string 322 323 // The ID of the Qualification type the Worker is requesting, as returned by the 324 // CreateQualificationType operation. 325 QualificationTypeId *string 326 327 // The date and time the Qualification request had a status of Submitted. This is 328 // either the time the Worker submitted answers for a Qualification test, or the 329 // time the Worker requested the Qualification if the Qualification type does not 330 // have a test. 331 SubmitTime *time.Time 332 333 // The contents of the Qualification test that was presented to the Worker, if the 334 // type has a test and the Worker has submitted answers. This value is identical to 335 // the QuestionForm associated with the Qualification type at the time the Worker 336 // requests the Qualification. 337 Test *string 338 339 // The ID of the Worker requesting the Qualification. 340 WorkerId *string 341} 342 343// The QualificationRequirement data structure describes a Qualification that a 344// Worker must have before the Worker is allowed to accept a HIT. A requirement may 345// optionally state that a Worker must have the Qualification in order to preview 346// the HIT, or see the HIT in search results. 347type QualificationRequirement struct { 348 349 // The kind of comparison to make against a Qualification's value. You can compare 350 // a Qualification's value to an IntegerValue to see if it is LessThan, 351 // LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the 352 // IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or 353 // NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a 354 // set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement 355 // can also test if a Qualification Exists or DoesNotExist in the user's profile, 356 // regardless of its value. 357 // 358 // This member is required. 359 Comparator Comparator 360 361 // The ID of the Qualification type for the requirement. 362 // 363 // This member is required. 364 QualificationTypeId *string 365 366 // Setting this attribute prevents Workers whose Qualifications do not meet this 367 // QualificationRequirement from taking the specified action. Valid arguments 368 // include "Accept" (Worker cannot accept the HIT, but can preview the HIT and see 369 // it in their search results), "PreviewAndAccept" (Worker cannot accept or preview 370 // the HIT, but can see the HIT in their search results), and 371 // "DiscoverPreviewAndAccept" (Worker cannot accept, preview, or see the HIT in 372 // their search results). It's possible for you to create a HIT with multiple 373 // QualificationRequirements (which can have different values for the ActionGuarded 374 // attribute). In this case, the Worker is only permitted to perform an action when 375 // they have met all QualificationRequirements guarding the action. The actions in 376 // the order of least restrictive to most restrictive are Discover, Preview and 377 // Accept. For example, if a Worker meets all QualificationRequirements that are 378 // set to DiscoverPreviewAndAccept, but do not meet all requirements that are set 379 // with PreviewAndAccept, then the Worker will be able to Discover, i.e. see the 380 // HIT in their search result, but will not be able to Preview or Accept the HIT. 381 // ActionsGuarded should not be used in combination with the RequiredToPreview 382 // field. 383 ActionsGuarded HITAccessActions 384 385 // The integer value to compare against the Qualification's value. IntegerValue 386 // must not be present if Comparator is Exists or DoesNotExist. IntegerValue can 387 // only be used if the Qualification type has an integer value; it cannot be used 388 // with the Worker_Locale QualificationType ID. When performing a set comparison by 389 // using the In or the NotIn comparator, you can use up to 15 IntegerValue elements 390 // in a QualificationRequirement data structure. 391 IntegerValues []int32 392 393 // The locale value to compare against the Qualification's value. The local value 394 // must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. 395 // LocaleValue can only be used with a Worker_Locale QualificationType ID. 396 // LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn 397 // comparators. You must only use a single LocaleValue element when using the 398 // EqualTo or NotEqualTo comparators. When performing a set comparison by using the 399 // In or the NotIn comparator, you can use up to 30 LocaleValue elements in a 400 // QualificationRequirement data structure. 401 LocaleValues []Locale 402 403 // DEPRECATED: Use the ActionsGuarded field instead. If RequiredToPreview is true, 404 // the question data for the HIT will not be shown when a Worker whose 405 // Qualifications do not meet this requirement tries to preview the HIT. That is, a 406 // Worker's Qualifications must meet all of the requirements for which 407 // RequiredToPreview is true in order to preview the HIT. If a Worker meets all of 408 // the requirements where RequiredToPreview is true (or if there are no such 409 // requirements), but does not meet all of the requirements for the HIT, the Worker 410 // will be allowed to preview the HIT's question data, but will not be allowed to 411 // accept and complete the HIT. The default is false. This should not be used in 412 // combination with the ActionsGuarded field. 413 // 414 // Deprecated: This member has been deprecated. 415 RequiredToPreview *bool 416} 417 418// The QualificationType data structure represents a Qualification type, a 419// description of a property of a Worker that must match the requirements of a HIT 420// for the Worker to be able to accept the HIT. The type also describes how a 421// Worker can obtain a Qualification of that type, such as through a Qualification 422// test. 423type QualificationType struct { 424 425 // The answers to the Qualification test specified in the Test parameter. 426 AnswerKey *string 427 428 // Specifies that requests for the Qualification type are granted immediately, 429 // without prompting the Worker with a Qualification test. Valid values are True | 430 // False. 431 AutoGranted *bool 432 433 // The Qualification integer value to use for automatically granted Qualifications, 434 // if AutoGranted is true. This is 1 by default. 435 AutoGrantedValue *int32 436 437 // The date and time the Qualification type was created. 438 CreationTime *time.Time 439 440 // A long description for the Qualification type. 441 Description *string 442 443 // Specifies whether the Qualification type is one that a user can request through 444 // the Amazon Mechanical Turk web site, such as by taking a Qualification test. 445 // This value is False for Qualifications assigned automatically by the system. 446 // Valid values are True | False. 447 IsRequestable *bool 448 449 // One or more words or phrases that describe theQualification type, separated by 450 // commas. The Keywords make the type easier to find using a search. 451 Keywords *string 452 453 // The name of the Qualification type. The type name is used to identify the type, 454 // and to find the type using a Qualification type search. 455 Name *string 456 457 // A unique identifier for the Qualification type. A Qualification type is given a 458 // Qualification type ID when you call the CreateQualificationType operation. 459 QualificationTypeId *string 460 461 // The status of the Qualification type. A Qualification type's status determines 462 // if users can apply to receive a Qualification of this type, and if HITs can be 463 // created with requirements based on this type. Valid values are Active | 464 // Inactive. 465 QualificationTypeStatus QualificationTypeStatus 466 467 // The amount of time, in seconds, Workers must wait after taking the Qualification 468 // test before they can take it again. Workers can take a Qualification test 469 // multiple times if they were not granted the Qualification from a previous 470 // attempt, or if the test offers a gradient score and they want a better score. If 471 // not specified, retries are disabled and Workers can request a Qualification only 472 // once. 473 RetryDelayInSeconds *int64 474 475 // The questions for a Qualification test associated with this Qualification type 476 // that a user can take to obtain a Qualification of this type. This parameter must 477 // be specified if AnswerKey is present. A Qualification type cannot have both a 478 // specified Test parameter and an AutoGranted value of true. 479 Test *string 480 481 // The amount of time, in seconds, given to a Worker to complete the Qualification 482 // test, beginning from the time the Worker requests the Qualification. 483 TestDurationInSeconds *int64 484} 485 486// Both the AssignmentReviewReport and the HITReviewReport elements contains the 487// ReviewActionDetail data structure. This structure is returned multiple times for 488// each action specified in the Review Policy. 489type ReviewActionDetail struct { 490 491 // The unique identifier for the action. 492 ActionId *string 493 494 // The nature of the action itself. The Review Policy is responsible for examining 495 // the HIT and Assignments, emitting results, and deciding which other actions will 496 // be necessary. 497 ActionName *string 498 499 // The date when the action was completed. 500 CompleteTime *time.Time 501 502 // Present only when the Results have a FAILED Status. 503 ErrorCode *string 504 505 // A description of the outcome of the review. 506 Result *string 507 508 // The current disposition of the action: INTENDED, SUCCEEDED, FAILED, or 509 // CANCELLED. 510 Status ReviewActionStatus 511 512 // The specific HITId or AssignmentID targeted by the action. 513 TargetId *string 514 515 // The type of object in TargetId. 516 TargetType *string 517} 518 519// HIT Review Policy data structures represent HIT review policies, which you 520// specify when you create a HIT. 521type ReviewPolicy struct { 522 523 // Name of a Review Policy: SimplePlurality/2011-09-01 or 524 // ScoreMyKnownAnswers/2011-09-01 525 // 526 // This member is required. 527 PolicyName *string 528 529 // Name of the parameter from the Review policy. 530 Parameters []PolicyParameter 531} 532 533// Contains both ReviewResult and ReviewAction elements for a particular HIT. 534type ReviewReport struct { 535 536 // A list of ReviewAction objects for each action specified in the Review Policy. 537 ReviewActions []ReviewActionDetail 538 539 // A list of ReviewResults objects for each action specified in the Review Policy. 540 ReviewResults []ReviewResultDetail 541} 542 543// This data structure is returned multiple times for each result specified in the 544// Review Policy. 545type ReviewResultDetail struct { 546 547 // A unique identifier of the Review action result. 548 ActionId *string 549 550 // Key identifies the particular piece of reviewed information. 551 Key *string 552 553 // Specifies the QuestionId the result is describing. Depending on whether the 554 // TargetType is a HIT or Assignment this results could specify multiple values. If 555 // TargetType is HIT and QuestionId is absent, then the result describes results of 556 // the HIT, including the HIT agreement score. If ObjectType is Assignment and 557 // QuestionId is absent, then the result describes the Worker's performance on the 558 // HIT. 559 QuestionId *string 560 561 // The HITID or AssignmentId about which this result was taken. Note that HIT-level 562 // Review Policies will often emit results about both the HIT itself and its 563 // Assignments, while Assignment-level review policies generally only emit results 564 // about the Assignment itself. 565 SubjectId *string 566 567 // The type of the object from the SubjectId field. 568 SubjectType *string 569 570 // The values of Key provided by the review policies you have selected. 571 Value *string 572} 573 574// The WorkerBlock data structure represents a Worker who has been blocked. It has 575// two elements: the WorkerId and the Reason for the block. 576type WorkerBlock struct { 577 578 // A message explaining the reason the Worker was blocked. 579 Reason *string 580 581 // The ID of the Worker who accepted the HIT. 582 WorkerId *string 583} 584