MTURK-REQUESTER

AcceptQualificationRequest

valid {
    input.Body.QualificationRequestId == STRING
    input.Body.IntegerValue == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ApproveAssignment

valid {
    input.Body.AssignmentId == STRING
    input.Body.RequesterFeedback == STRING
    input.Body.OverrideRejection == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

AssociateQualificationWithWorker

valid {
    input.Body.QualificationTypeId == STRING
    input.Body.WorkerId == STRING
    input.Body.IntegerValue == INTEGER
    input.Body.SendNotification == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateAdditionalAssignmentsForHIT

valid {
    input.Body.HITId == STRING
    input.Body.NumberOfAdditionalAssignments == INTEGER
    input.Body.UniqueRequestToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateHIT

enum_Comparator := [ "LessThan", "LessThanOrEqualTo", "GreaterThan", "GreaterThanOrEqualTo", "EqualTo", "NotEqualTo", "Exists", "DoesNotExist", "In", "NotIn" ]
enum_HITAccessActions := [ "Accept", "PreviewAndAccept", "DiscoverPreviewAndAccept" ]

valid {
    input.Body.MaxAssignments == INTEGER
    input.Body.AutoApprovalDelayInSeconds == LONG
    input.Body.LifetimeInSeconds == LONG
    input.Body.AssignmentDurationInSeconds == LONG
    input.Body.Reward == STRING
    input.Body.Title == STRING
    input.Body.Keywords == STRING
    input.Body.Description == STRING
    input.Body.Question == STRING
    input.Body.RequesterAnnotation == STRING
    input.Body.QualificationRequirements[_].QualificationTypeId == STRING
    input.Body.QualificationRequirements[_].Comparator == enum_Comparator[_]
    input.Body.QualificationRequirements[_].IntegerValues[_] == INTEGER
    input.Body.QualificationRequirements[_].LocaleValues[_].Country == STRING
    input.Body.QualificationRequirements[_].LocaleValues[_].Subdivision == STRING
    input.Body.QualificationRequirements[_].RequiredToPreview == BOOLEAN
    input.Body.QualificationRequirements[_].ActionsGuarded == enum_HITAccessActions[_]
    input.Body.UniqueRequestToken == STRING
    input.Body.AssignmentReviewPolicy.PolicyName == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].Key == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].Values[_] == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].MapEntries[_].Key == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].MapEntries[_].Values[_] == STRING
    input.Body.HITReviewPolicy.PolicyName == STRING
    input.Body.HITReviewPolicy.Parameters[_].Key == STRING
    input.Body.HITReviewPolicy.Parameters[_].Values[_] == STRING
    input.Body.HITReviewPolicy.Parameters[_].MapEntries[_].Key == STRING
    input.Body.HITReviewPolicy.Parameters[_].MapEntries[_].Values[_] == STRING
    input.Body.HITLayoutId == STRING
    input.Body.HITLayoutParameters[_].Name == STRING
    input.Body.HITLayoutParameters[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateHITType

enum_Comparator := [ "LessThan", "LessThanOrEqualTo", "GreaterThan", "GreaterThanOrEqualTo", "EqualTo", "NotEqualTo", "Exists", "DoesNotExist", "In", "NotIn" ]
enum_HITAccessActions := [ "Accept", "PreviewAndAccept", "DiscoverPreviewAndAccept" ]

valid {
    input.Body.AutoApprovalDelayInSeconds == LONG
    input.Body.AssignmentDurationInSeconds == LONG
    input.Body.Reward == STRING
    input.Body.Title == STRING
    input.Body.Keywords == STRING
    input.Body.Description == STRING
    input.Body.QualificationRequirements[_].QualificationTypeId == STRING
    input.Body.QualificationRequirements[_].Comparator == enum_Comparator[_]
    input.Body.QualificationRequirements[_].IntegerValues[_] == INTEGER
    input.Body.QualificationRequirements[_].LocaleValues[_].Country == STRING
    input.Body.QualificationRequirements[_].LocaleValues[_].Subdivision == STRING
    input.Body.QualificationRequirements[_].RequiredToPreview == BOOLEAN
    input.Body.QualificationRequirements[_].ActionsGuarded == enum_HITAccessActions[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateHITWithHITType

valid {
    input.Body.HITTypeId == STRING
    input.Body.MaxAssignments == INTEGER
    input.Body.LifetimeInSeconds == LONG
    input.Body.Question == STRING
    input.Body.RequesterAnnotation == STRING
    input.Body.UniqueRequestToken == STRING
    input.Body.AssignmentReviewPolicy.PolicyName == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].Key == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].Values[_] == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].MapEntries[_].Key == STRING
    input.Body.AssignmentReviewPolicy.Parameters[_].MapEntries[_].Values[_] == STRING
    input.Body.HITReviewPolicy.PolicyName == STRING
    input.Body.HITReviewPolicy.Parameters[_].Key == STRING
    input.Body.HITReviewPolicy.Parameters[_].Values[_] == STRING
    input.Body.HITReviewPolicy.Parameters[_].MapEntries[_].Key == STRING
    input.Body.HITReviewPolicy.Parameters[_].MapEntries[_].Values[_] == STRING
    input.Body.HITLayoutId == STRING
    input.Body.HITLayoutParameters[_].Name == STRING
    input.Body.HITLayoutParameters[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateQualificationType

enum_QualificationTypeStatus := [ "Active", "Inactive" ]

valid {
    input.Body.Name == STRING
    input.Body.Keywords == STRING
    input.Body.Description == STRING
    input.Body.QualificationTypeStatus == enum_QualificationTypeStatus[_]
    input.Body.RetryDelayInSeconds == LONG
    input.Body.Test == STRING
    input.Body.AnswerKey == STRING
    input.Body.TestDurationInSeconds == LONG
    input.Body.AutoGranted == BOOLEAN
    input.Body.AutoGrantedValue == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateWorkerBlock

valid {
    input.Body.WorkerId == STRING
    input.Body.Reason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteHIT

valid {
    input.Body.HITId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteQualificationType

valid {
    input.Body.QualificationTypeId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteWorkerBlock

valid {
    input.Body.WorkerId == STRING
    input.Body.Reason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DisassociateQualificationFromWorker

valid {
    input.Body.WorkerId == STRING
    input.Body.QualificationTypeId == STRING
    input.Body.Reason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetAccountBalance

valid {
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetAssignment

valid {
    input.Body.AssignmentId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetFileUploadURL

valid {
    input.Body.AssignmentId == STRING
    input.Body.QuestionIdentifier == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetHIT

valid {
    input.Body.HITId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetQualificationScore

valid {
    input.Body.QualificationTypeId == STRING
    input.Body.WorkerId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetQualificationType

valid {
    input.Body.QualificationTypeId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListAssignmentsForHIT

enum_AssignmentStatus := [ "Submitted", "Approved", "Rejected" ]

valid {
    input.Body.HITId == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.Body.AssignmentStatuses[_] == enum_AssignmentStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListBonusPayments

valid {
    input.Body.HITId == STRING
    input.Body.AssignmentId == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListHITs

valid {
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListHITsForQualificationType

valid {
    input.Body.QualificationTypeId == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListQualificationRequests

valid {
    input.Body.QualificationTypeId == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListQualificationTypes

valid {
    input.Body.Query == STRING
    input.Body.MustBeRequestable == BOOLEAN
    input.Body.MustBeOwnedByCaller == BOOLEAN
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListReviewPolicyResultsForHIT

enum_ReviewPolicyLevel := [ "Assignment", "HIT" ]

valid {
    input.Body.HITId == STRING
    input.Body.PolicyLevels[_] == enum_ReviewPolicyLevel[_]
    input.Body.RetrieveActions == BOOLEAN
    input.Body.RetrieveResults == BOOLEAN
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListReviewableHITs

enum_ReviewableHITStatus := [ "Reviewable", "Reviewing" ]

valid {
    input.Body.HITTypeId == STRING
    input.Body.Status == enum_ReviewableHITStatus[_]
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListWorkerBlocks

valid {
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListWorkersWithQualificationType

enum_QualificationStatus := [ "Granted", "Revoked" ]

valid {
    input.Body.QualificationTypeId == STRING
    input.Body.Status == enum_QualificationStatus[_]
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

NotifyWorkers

valid {
    input.Body.Subject == STRING
    input.Body.MessageText == STRING
    input.Body.WorkerIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RejectAssignment

valid {
    input.Body.AssignmentId == STRING
    input.Body.RequesterFeedback == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RejectQualificationRequest

valid {
    input.Body.QualificationRequestId == STRING
    input.Body.Reason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendBonus

valid {
    input.Body.WorkerId == STRING
    input.Body.BonusAmount == STRING
    input.Body.AssignmentId == STRING
    input.Body.Reason == STRING
    input.Body.UniqueRequestToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendTestEventNotification

enum_EventType := [ "AssignmentAccepted", "AssignmentAbandoned", "AssignmentReturned", "AssignmentSubmitted", "AssignmentRejected", "AssignmentApproved", "HITCreated", "HITExpired", "HITReviewable", "HITExtended", "HITDisposed", "Ping" ]
enum_NotificationTransport := [ "Email", "SQS", "SNS" ]

valid {
    input.Body.Notification.Destination == STRING
    input.Body.Notification.Transport == enum_NotificationTransport[_]
    input.Body.Notification.Version == STRING
    input.Body.Notification.EventTypes[_] == enum_EventType[_]
    input.Body.TestEventType == enum_EventType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateExpirationForHIT

valid {
    input.Body.HITId == STRING
    input.Body.ExpireAt == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateHITReviewStatus

valid {
    input.Body.HITId == STRING
    input.Body.Revert == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateHITTypeOfHIT

valid {
    input.Body.HITId == STRING
    input.Body.HITTypeId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateNotificationSettings

enum_EventType := [ "AssignmentAccepted", "AssignmentAbandoned", "AssignmentReturned", "AssignmentSubmitted", "AssignmentRejected", "AssignmentApproved", "HITCreated", "HITExpired", "HITReviewable", "HITExtended", "HITDisposed", "Ping" ]
enum_NotificationTransport := [ "Email", "SQS", "SNS" ]

valid {
    input.Body.HITTypeId == STRING
    input.Body.Notification.Destination == STRING
    input.Body.Notification.Transport == enum_NotificationTransport[_]
    input.Body.Notification.Version == STRING
    input.Body.Notification.EventTypes[_] == enum_EventType[_]
    input.Body.Active == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateQualificationType

enum_QualificationTypeStatus := [ "Active", "Inactive" ]

valid {
    input.Body.QualificationTypeId == STRING
    input.Body.Description == STRING
    input.Body.QualificationTypeStatus == enum_QualificationTypeStatus[_]
    input.Body.Test == STRING
    input.Body.AnswerKey == STRING
    input.Body.TestDurationInSeconds == LONG
    input.Body.RetryDelayInSeconds == LONG
    input.Body.AutoGranted == BOOLEAN
    input.Body.AutoGrantedValue == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}