amazonka-mechanicalturk (empty) → 1.5.0
raw patch · 131 files changed
+10989/−0 lines, 131 filesdep +amazonka-coredep +amazonka-mechanicalturkdep +amazonka-testsetup-changed
Dependencies added: amazonka-core, amazonka-mechanicalturk, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-mechanicalturk.cabal +124/−0
- fixture/AcceptQualificationRequest.yaml +10/−0
- fixture/AcceptQualificationRequestResponse.proto +0/−0
- fixture/ApproveAssignment.yaml +10/−0
- fixture/ApproveAssignmentResponse.proto +0/−0
- fixture/AssociateQualificationWithWorker.yaml +10/−0
- fixture/AssociateQualificationWithWorkerResponse.proto +0/−0
- fixture/CreateAdditionalAssignmentsForHIT.yaml +10/−0
- fixture/CreateAdditionalAssignmentsForHITResponse.proto +0/−0
- fixture/CreateHIT.yaml +10/−0
- fixture/CreateHITResponse.proto +0/−0
- fixture/CreateHITType.yaml +10/−0
- fixture/CreateHITTypeResponse.proto +0/−0
- fixture/CreateHITWithHITType.yaml +10/−0
- fixture/CreateHITWithHITTypeResponse.proto +0/−0
- fixture/CreateQualificationType.yaml +10/−0
- fixture/CreateQualificationTypeResponse.proto +0/−0
- fixture/CreateWorkerBlock.yaml +10/−0
- fixture/CreateWorkerBlockResponse.proto +0/−0
- fixture/DeleteHIT.yaml +10/−0
- fixture/DeleteHITResponse.proto +0/−0
- fixture/DeleteQualificationType.yaml +10/−0
- fixture/DeleteQualificationTypeResponse.proto +0/−0
- fixture/DeleteWorkerBlock.yaml +10/−0
- fixture/DeleteWorkerBlockResponse.proto +0/−0
- fixture/DisassociateQualificationFromWorker.yaml +10/−0
- fixture/DisassociateQualificationFromWorkerResponse.proto +0/−0
- fixture/GetAccountBalance.yaml +10/−0
- fixture/GetAccountBalanceResponse.proto +0/−0
- fixture/GetAssignment.yaml +10/−0
- fixture/GetAssignmentResponse.proto +0/−0
- fixture/GetFileUploadURL.yaml +10/−0
- fixture/GetFileUploadURLResponse.proto +0/−0
- fixture/GetHIT.yaml +10/−0
- fixture/GetHITResponse.proto +0/−0
- fixture/GetQualificationScore.yaml +10/−0
- fixture/GetQualificationScoreResponse.proto +0/−0
- fixture/GetQualificationType.yaml +10/−0
- fixture/GetQualificationTypeResponse.proto +0/−0
- fixture/ListAssignmentsForHIT.yaml +10/−0
- fixture/ListAssignmentsForHITResponse.proto +0/−0
- fixture/ListBonusPayments.yaml +10/−0
- fixture/ListBonusPaymentsResponse.proto +0/−0
- fixture/ListHITs.yaml +10/−0
- fixture/ListHITsForQualificationType.yaml +10/−0
- fixture/ListHITsForQualificationTypeResponse.proto +0/−0
- fixture/ListHITsResponse.proto +0/−0
- fixture/ListQualificationRequests.yaml +10/−0
- fixture/ListQualificationRequestsResponse.proto +0/−0
- fixture/ListQualificationTypes.yaml +10/−0
- fixture/ListQualificationTypesResponse.proto +0/−0
- fixture/ListReviewPolicyResultsForHIT.yaml +10/−0
- fixture/ListReviewPolicyResultsForHITResponse.proto +0/−0
- fixture/ListReviewableHITs.yaml +10/−0
- fixture/ListReviewableHITsResponse.proto +0/−0
- fixture/ListWorkerBlocks.yaml +10/−0
- fixture/ListWorkerBlocksResponse.proto +0/−0
- fixture/ListWorkersWithQualificationType.yaml +10/−0
- fixture/ListWorkersWithQualificationTypeResponse.proto +0/−0
- fixture/NotifyWorkers.yaml +10/−0
- fixture/NotifyWorkersResponse.proto +0/−0
- fixture/RejectAssignment.yaml +10/−0
- fixture/RejectAssignmentResponse.proto +0/−0
- fixture/RejectQualificationRequest.yaml +10/−0
- fixture/RejectQualificationRequestResponse.proto +0/−0
- fixture/SendBonus.yaml +10/−0
- fixture/SendBonusResponse.proto +0/−0
- fixture/SendTestEventNotification.yaml +10/−0
- fixture/SendTestEventNotificationResponse.proto +0/−0
- fixture/UpdateExpirationForHIT.yaml +10/−0
- fixture/UpdateExpirationForHITResponse.proto +0/−0
- fixture/UpdateHITReviewStatus.yaml +10/−0
- fixture/UpdateHITReviewStatusResponse.proto +0/−0
- fixture/UpdateHITTypeOfHIT.yaml +10/−0
- fixture/UpdateHITTypeOfHITResponse.proto +0/−0
- fixture/UpdateNotificationSettings.yaml +10/−0
- fixture/UpdateNotificationSettingsResponse.proto +0/−0
- fixture/UpdateQualificationType.yaml +10/−0
- fixture/UpdateQualificationTypeResponse.proto +0/−0
- gen/Network/AWS/MechanicalTurk.hs +437/−0
- gen/Network/AWS/MechanicalTurk/AcceptQualificationRequest.hs +145/−0
- gen/Network/AWS/MechanicalTurk/ApproveAssignment.hs +158/−0
- gen/Network/AWS/MechanicalTurk/AssociateQualificationWithWorker.hs +172/−0
- gen/Network/AWS/MechanicalTurk/CreateAdditionalAssignmentsForHIT.hs +164/−0
- gen/Network/AWS/MechanicalTurk/CreateHIT.hs +304/−0
- gen/Network/AWS/MechanicalTurk/CreateHITType.hs +203/−0
- gen/Network/AWS/MechanicalTurk/CreateHITWithHITType.hs +239/−0
- gen/Network/AWS/MechanicalTurk/CreateQualificationType.hs +233/−0
- gen/Network/AWS/MechanicalTurk/CreateWorkerBlock.hs +134/−0
- gen/Network/AWS/MechanicalTurk/DeleteHIT.hs +123/−0
- gen/Network/AWS/MechanicalTurk/DeleteQualificationType.hs +129/−0
- gen/Network/AWS/MechanicalTurk/DeleteWorkerBlock.hs +133/−0
- gen/Network/AWS/MechanicalTurk/DisassociateQualificationFromWorker.hs +164/−0
- gen/Network/AWS/MechanicalTurk/GetAccountBalance.hs +133/−0
- gen/Network/AWS/MechanicalTurk/GetAssignment.hs +145/−0
- gen/Network/AWS/MechanicalTurk/GetFileUploadURL.hs +148/−0
- gen/Network/AWS/MechanicalTurk/GetHIT.hs +131/−0
- gen/Network/AWS/MechanicalTurk/GetQualificationScore.hs +151/−0
- gen/Network/AWS/MechanicalTurk/GetQualificationType.hs +136/−0
- gen/Network/AWS/MechanicalTurk/ListAssignmentsForHIT.hs +198/−0
- gen/Network/AWS/MechanicalTurk/ListBonusPayments.hs +188/−0
- gen/Network/AWS/MechanicalTurk/ListHITs.hs +163/−0
- gen/Network/AWS/MechanicalTurk/ListHITsForQualificationType.hs +183/−0
- gen/Network/AWS/MechanicalTurk/ListQualificationRequests.hs +181/−0
- gen/Network/AWS/MechanicalTurk/ListQualificationTypes.hs +201/−0
- gen/Network/AWS/MechanicalTurk/ListReviewPolicyResultsForHIT.hs +243/−0
- gen/Network/AWS/MechanicalTurk/ListReviewableHITs.hs +188/−0
- gen/Network/AWS/MechanicalTurk/ListWorkerBlocks.hs +165/−0
- gen/Network/AWS/MechanicalTurk/ListWorkersWithQualificationType.hs +200/−0
- gen/Network/AWS/MechanicalTurk/NotifyWorkers.hs +160/−0
- gen/Network/AWS/MechanicalTurk/RejectAssignment.hs +139/−0
- gen/Network/AWS/MechanicalTurk/RejectQualificationRequest.hs +141/−0
- gen/Network/AWS/MechanicalTurk/SendBonus.hs +169/−0
- gen/Network/AWS/MechanicalTurk/SendTestEventNotification.hs +138/−0
- gen/Network/AWS/MechanicalTurk/Types.hs +290/−0
- gen/Network/AWS/MechanicalTurk/Types/Product.hs +1493/−0
- gen/Network/AWS/MechanicalTurk/Types/Sum.hs +437/−0
- gen/Network/AWS/MechanicalTurk/UpdateExpirationForHIT.hs +137/−0
- gen/Network/AWS/MechanicalTurk/UpdateHITReviewStatus.hs +135/−0
- gen/Network/AWS/MechanicalTurk/UpdateHITTypeOfHIT.hs +136/−0
- gen/Network/AWS/MechanicalTurk/UpdateNotificationSettings.hs +149/−0
- gen/Network/AWS/MechanicalTurk/UpdateQualificationType.hs +233/−0
- gen/Network/AWS/MechanicalTurk/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/MechanicalTurk.hs +741/−0
- test/Test/AWS/MechanicalTurk.hs +20/−0
- test/Test/AWS/MechanicalTurk/Internal.hs +9/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,45 @@+# Amazon Mechanical Turk SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.5.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-mechanicalturk)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.MechanicalTurk](http://hackage.haskell.org/package/amazonka-mechanicalturk/docs/Network-AWS-MechanicalTurk.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-mechanicalturk` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-mechanicalturk.cabal view
@@ -0,0 +1,124 @@+name: amazonka-mechanicalturk+version: 1.5.0+synopsis: Amazon Mechanical Turk SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2017 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.MechanicalTurk" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-mechanicalturk++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields++ exposed-modules:+ Network.AWS.MechanicalTurk+ , Network.AWS.MechanicalTurk.AcceptQualificationRequest+ , Network.AWS.MechanicalTurk.ApproveAssignment+ , Network.AWS.MechanicalTurk.AssociateQualificationWithWorker+ , Network.AWS.MechanicalTurk.CreateAdditionalAssignmentsForHIT+ , Network.AWS.MechanicalTurk.CreateHIT+ , Network.AWS.MechanicalTurk.CreateHITType+ , Network.AWS.MechanicalTurk.CreateHITWithHITType+ , Network.AWS.MechanicalTurk.CreateQualificationType+ , Network.AWS.MechanicalTurk.CreateWorkerBlock+ , Network.AWS.MechanicalTurk.DeleteHIT+ , Network.AWS.MechanicalTurk.DeleteQualificationType+ , Network.AWS.MechanicalTurk.DeleteWorkerBlock+ , Network.AWS.MechanicalTurk.DisassociateQualificationFromWorker+ , Network.AWS.MechanicalTurk.GetAccountBalance+ , Network.AWS.MechanicalTurk.GetAssignment+ , Network.AWS.MechanicalTurk.GetFileUploadURL+ , Network.AWS.MechanicalTurk.GetHIT+ , Network.AWS.MechanicalTurk.GetQualificationScore+ , Network.AWS.MechanicalTurk.GetQualificationType+ , Network.AWS.MechanicalTurk.ListAssignmentsForHIT+ , Network.AWS.MechanicalTurk.ListBonusPayments+ , Network.AWS.MechanicalTurk.ListHITs+ , Network.AWS.MechanicalTurk.ListHITsForQualificationType+ , Network.AWS.MechanicalTurk.ListQualificationRequests+ , Network.AWS.MechanicalTurk.ListQualificationTypes+ , Network.AWS.MechanicalTurk.ListReviewPolicyResultsForHIT+ , Network.AWS.MechanicalTurk.ListReviewableHITs+ , Network.AWS.MechanicalTurk.ListWorkerBlocks+ , Network.AWS.MechanicalTurk.ListWorkersWithQualificationType+ , Network.AWS.MechanicalTurk.NotifyWorkers+ , Network.AWS.MechanicalTurk.RejectAssignment+ , Network.AWS.MechanicalTurk.RejectQualificationRequest+ , Network.AWS.MechanicalTurk.SendBonus+ , Network.AWS.MechanicalTurk.SendTestEventNotification+ , Network.AWS.MechanicalTurk.Types+ , Network.AWS.MechanicalTurk.UpdateExpirationForHIT+ , Network.AWS.MechanicalTurk.UpdateHITReviewStatus+ , Network.AWS.MechanicalTurk.UpdateHITTypeOfHIT+ , Network.AWS.MechanicalTurk.UpdateNotificationSettings+ , Network.AWS.MechanicalTurk.UpdateQualificationType+ , Network.AWS.MechanicalTurk.Waiters++ other-modules:+ Network.AWS.MechanicalTurk.Types.Product+ , Network.AWS.MechanicalTurk.Types.Sum++ build-depends:+ amazonka-core == 1.5.0.*+ , base >= 4.7 && < 5++test-suite amazonka-mechanicalturk-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.AWS.MechanicalTurk+ , Test.AWS.Gen.MechanicalTurk+ , Test.AWS.MechanicalTurk.Internal++ build-depends:+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-mechanicalturk+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AcceptQualificationRequest.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/AcceptQualificationRequestResponse.proto view
+ fixture/ApproveAssignment.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ApproveAssignmentResponse.proto view
+ fixture/AssociateQualificationWithWorker.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/AssociateQualificationWithWorkerResponse.proto view
+ fixture/CreateAdditionalAssignmentsForHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateAdditionalAssignmentsForHITResponse.proto view
+ fixture/CreateHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateHITResponse.proto view
+ fixture/CreateHITType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateHITTypeResponse.proto view
+ fixture/CreateHITWithHITType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateHITWithHITTypeResponse.proto view
+ fixture/CreateQualificationType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateQualificationTypeResponse.proto view
+ fixture/CreateWorkerBlock.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateWorkerBlockResponse.proto view
+ fixture/DeleteHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteHITResponse.proto view
+ fixture/DeleteQualificationType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteQualificationTypeResponse.proto view
+ fixture/DeleteWorkerBlock.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteWorkerBlockResponse.proto view
+ fixture/DisassociateQualificationFromWorker.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DisassociateQualificationFromWorkerResponse.proto view
+ fixture/GetAccountBalance.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetAccountBalanceResponse.proto view
+ fixture/GetAssignment.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetAssignmentResponse.proto view
+ fixture/GetFileUploadURL.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetFileUploadURLResponse.proto view
+ fixture/GetHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetHITResponse.proto view
+ fixture/GetQualificationScore.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetQualificationScoreResponse.proto view
+ fixture/GetQualificationType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetQualificationTypeResponse.proto view
+ fixture/ListAssignmentsForHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListAssignmentsForHITResponse.proto view
+ fixture/ListBonusPayments.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListBonusPaymentsResponse.proto view
+ fixture/ListHITs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListHITsForQualificationType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListHITsForQualificationTypeResponse.proto view
+ fixture/ListHITsResponse.proto view
+ fixture/ListQualificationRequests.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListQualificationRequestsResponse.proto view
+ fixture/ListQualificationTypes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListQualificationTypesResponse.proto view
+ fixture/ListReviewPolicyResultsForHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListReviewPolicyResultsForHITResponse.proto view
+ fixture/ListReviewableHITs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListReviewableHITsResponse.proto view
+ fixture/ListWorkerBlocks.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListWorkerBlocksResponse.proto view
+ fixture/ListWorkersWithQualificationType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListWorkersWithQualificationTypeResponse.proto view
+ fixture/NotifyWorkers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/NotifyWorkersResponse.proto view
+ fixture/RejectAssignment.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/RejectAssignmentResponse.proto view
+ fixture/RejectQualificationRequest.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/RejectQualificationRequestResponse.proto view
+ fixture/SendBonus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/SendBonusResponse.proto view
+ fixture/SendTestEventNotification.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/SendTestEventNotificationResponse.proto view
+ fixture/UpdateExpirationForHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateExpirationForHITResponse.proto view
+ fixture/UpdateHITReviewStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateHITReviewStatusResponse.proto view
+ fixture/UpdateHITTypeOfHIT.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateHITTypeOfHITResponse.proto view
+ fixture/UpdateNotificationSettings.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateNotificationSettingsResponse.proto view
+ fixture/UpdateQualificationType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mturk-requester/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mturk-requester.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateQualificationTypeResponse.proto view
+ gen/Network/AWS/MechanicalTurk.hs view
@@ -0,0 +1,437 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- __Amazon Mechanical Turk API Reference__+module Network.AWS.MechanicalTurk+ (+ -- * Service Configuration+ mechanicalTurk++ -- * Errors+ -- $errors++ -- ** ServiceFault+ , _ServiceFault++ -- ** RequestError+ , _RequestError++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** ApproveAssignment+ , module Network.AWS.MechanicalTurk.ApproveAssignment++ -- ** ListReviewPolicyResultsForHIT+ , module Network.AWS.MechanicalTurk.ListReviewPolicyResultsForHIT++ -- ** ListHITs+ , module Network.AWS.MechanicalTurk.ListHITs++ -- ** ListWorkersWithQualificationType+ , module Network.AWS.MechanicalTurk.ListWorkersWithQualificationType++ -- ** DeleteHIT+ , module Network.AWS.MechanicalTurk.DeleteHIT++ -- ** ListReviewableHITs+ , module Network.AWS.MechanicalTurk.ListReviewableHITs++ -- ** GetAssignment+ , module Network.AWS.MechanicalTurk.GetAssignment++ -- ** DeleteQualificationType+ , module Network.AWS.MechanicalTurk.DeleteQualificationType++ -- ** UpdateQualificationType+ , module Network.AWS.MechanicalTurk.UpdateQualificationType++ -- ** ListQualificationTypes+ , module Network.AWS.MechanicalTurk.ListQualificationTypes++ -- ** UpdateHITTypeOfHIT+ , module Network.AWS.MechanicalTurk.UpdateHITTypeOfHIT++ -- ** DisassociateQualificationFromWorker+ , module Network.AWS.MechanicalTurk.DisassociateQualificationFromWorker++ -- ** SendTestEventNotification+ , module Network.AWS.MechanicalTurk.SendTestEventNotification++ -- ** NotifyWorkers+ , module Network.AWS.MechanicalTurk.NotifyWorkers++ -- ** CreateHITWithHITType+ , module Network.AWS.MechanicalTurk.CreateHITWithHITType++ -- ** CreateHITType+ , module Network.AWS.MechanicalTurk.CreateHITType++ -- ** SendBonus+ , module Network.AWS.MechanicalTurk.SendBonus++ -- ** ListQualificationRequests+ , module Network.AWS.MechanicalTurk.ListQualificationRequests++ -- ** UpdateExpirationForHIT+ , module Network.AWS.MechanicalTurk.UpdateExpirationForHIT++ -- ** RejectAssignment+ , module Network.AWS.MechanicalTurk.RejectAssignment++ -- ** ListAssignmentsForHIT+ , module Network.AWS.MechanicalTurk.ListAssignmentsForHIT++ -- ** RejectQualificationRequest+ , module Network.AWS.MechanicalTurk.RejectQualificationRequest++ -- ** GetQualificationScore+ , module Network.AWS.MechanicalTurk.GetQualificationScore++ -- ** GetQualificationType+ , module Network.AWS.MechanicalTurk.GetQualificationType++ -- ** UpdateHITReviewStatus+ , module Network.AWS.MechanicalTurk.UpdateHITReviewStatus++ -- ** CreateQualificationType+ , module Network.AWS.MechanicalTurk.CreateQualificationType++ -- ** AcceptQualificationRequest+ , module Network.AWS.MechanicalTurk.AcceptQualificationRequest++ -- ** GetFileUploadURL+ , module Network.AWS.MechanicalTurk.GetFileUploadURL++ -- ** CreateAdditionalAssignmentsForHIT+ , module Network.AWS.MechanicalTurk.CreateAdditionalAssignmentsForHIT++ -- ** GetHIT+ , module Network.AWS.MechanicalTurk.GetHIT++ -- ** CreateWorkerBlock+ , module Network.AWS.MechanicalTurk.CreateWorkerBlock++ -- ** ListHITsForQualificationType+ , module Network.AWS.MechanicalTurk.ListHITsForQualificationType++ -- ** ListBonusPayments+ , module Network.AWS.MechanicalTurk.ListBonusPayments++ -- ** ListWorkerBlocks+ , module Network.AWS.MechanicalTurk.ListWorkerBlocks++ -- ** DeleteWorkerBlock+ , module Network.AWS.MechanicalTurk.DeleteWorkerBlock++ -- ** UpdateNotificationSettings+ , module Network.AWS.MechanicalTurk.UpdateNotificationSettings++ -- ** AssociateQualificationWithWorker+ , module Network.AWS.MechanicalTurk.AssociateQualificationWithWorker++ -- ** CreateHIT+ , module Network.AWS.MechanicalTurk.CreateHIT++ -- ** GetAccountBalance+ , module Network.AWS.MechanicalTurk.GetAccountBalance++ -- * Types++ -- ** AssignmentStatus+ , AssignmentStatus (..)++ -- ** Comparator+ , Comparator (..)++ -- ** EventType+ , EventType (..)++ -- ** HITReviewStatus+ , HITReviewStatus (..)++ -- ** HITStatus+ , HITStatus (..)++ -- ** NotificationTransport+ , NotificationTransport (..)++ -- ** NotifyWorkersFailureCode+ , NotifyWorkersFailureCode (..)++ -- ** QualificationStatus+ , QualificationStatus (..)++ -- ** QualificationTypeStatus+ , QualificationTypeStatus (..)++ -- ** ReviewActionStatus+ , ReviewActionStatus (..)++ -- ** ReviewPolicyLevel+ , ReviewPolicyLevel (..)++ -- ** ReviewableHITStatus+ , ReviewableHITStatus (..)++ -- ** Assignment+ , Assignment+ , assignment+ , aAcceptTime+ , aAnswer+ , aAssignmentStatus+ , aRequesterFeedback+ , aDeadline+ , aApprovalTime+ , aRejectionTime+ , aAutoApprovalTime+ , aHITId+ , aWorkerId+ , aAssignmentId+ , aSubmitTime++ -- ** BonusPayment+ , BonusPayment+ , bonusPayment+ , bpReason+ , bpGrantTime+ , bpWorkerId+ , bpAssignmentId+ , bpBonusAmount++ -- ** HIT+ , HIT+ , hIT+ , hitCreationTime+ , hitHITGroupId+ , hitNumberOfAssignmentsPending+ , hitHITTypeId+ , hitExpiration+ , hitAutoApprovalDelayInSeconds+ , hitRequesterAnnotation+ , hitHITStatus+ , hitMaxAssignments+ , hitNumberOfAssignmentsCompleted+ , hitReward+ , hitKeywords+ , hitHITLayoutId+ , hitQualificationRequirements+ , hitTitle+ , hitHITId+ , hitHITReviewStatus+ , hitNumberOfAssignmentsAvailable+ , hitDescription+ , hitQuestion+ , hitAssignmentDurationInSeconds++ -- ** HITLayoutParameter+ , HITLayoutParameter+ , hITLayoutParameter+ , hitlpName+ , hitlpValue++ -- ** Locale+ , Locale+ , locale+ , lSubdivision+ , lCountry++ -- ** NotificationSpecification+ , NotificationSpecification+ , notificationSpecification+ , nsDestination+ , nsTransport+ , nsVersion+ , nsEventTypes++ -- ** NotifyWorkersFailureStatus+ , NotifyWorkersFailureStatus+ , notifyWorkersFailureStatus+ , nwfsNotifyWorkersFailureMessage+ , nwfsNotifyWorkersFailureCode+ , nwfsWorkerId++ -- ** ParameterMapEntry+ , ParameterMapEntry+ , parameterMapEntry+ , pmeValues+ , pmeKey++ -- ** PolicyParameter+ , PolicyParameter+ , policyParameter+ , ppValues+ , ppMapEntries+ , ppKey++ -- ** Qualification+ , Qualification+ , qualification+ , qStatus+ , qIntegerValue+ , qLocaleValue+ , qQualificationTypeId+ , qGrantTime+ , qWorkerId++ -- ** QualificationRequest+ , QualificationRequest+ , qualificationRequest+ , quaQualificationRequestId+ , quaTest+ , quaQualificationTypeId+ , quaAnswer+ , quaWorkerId+ , quaSubmitTime++ -- ** QualificationRequirement+ , QualificationRequirement+ , qualificationRequirement+ , qrLocaleValues+ , qrRequiredToPreview+ , qrIntegerValues+ , qrQualificationTypeId+ , qrComparator++ -- ** QualificationType+ , QualificationType+ , qualificationType+ , qtCreationTime+ , qtTestDurationInSeconds+ , qtQualificationTypeStatus+ , qtAnswerKey+ , qtTest+ , qtQualificationTypeId+ , qtName+ , qtKeywords+ , qtAutoGranted+ , qtAutoGrantedValue+ , qtDescription+ , qtIsRequestable+ , qtRetryDelayInSeconds++ -- ** ReviewActionDetail+ , ReviewActionDetail+ , reviewActionDetail+ , radStatus+ , radTargetId+ , radActionId+ , radTargetType+ , radResult+ , radActionName+ , radCompleteTime+ , radErrorCode++ -- ** ReviewPolicy+ , ReviewPolicy+ , reviewPolicy+ , rpParameters+ , rpPolicyName++ -- ** ReviewReport+ , ReviewReport+ , reviewReport+ , rrReviewActions+ , rrReviewResults++ -- ** ReviewResultDetail+ , ReviewResultDetail+ , reviewResultDetail+ , rrdValue+ , rrdActionId+ , rrdSubjectType+ , rrdKey+ , rrdQuestionId+ , rrdSubjectId++ -- ** WorkerBlock+ , WorkerBlock+ , workerBlock+ , wbReason+ , wbWorkerId+ ) where++import Network.AWS.MechanicalTurk.AcceptQualificationRequest+import Network.AWS.MechanicalTurk.ApproveAssignment+import Network.AWS.MechanicalTurk.AssociateQualificationWithWorker+import Network.AWS.MechanicalTurk.CreateAdditionalAssignmentsForHIT+import Network.AWS.MechanicalTurk.CreateHIT+import Network.AWS.MechanicalTurk.CreateHITType+import Network.AWS.MechanicalTurk.CreateHITWithHITType+import Network.AWS.MechanicalTurk.CreateQualificationType+import Network.AWS.MechanicalTurk.CreateWorkerBlock+import Network.AWS.MechanicalTurk.DeleteHIT+import Network.AWS.MechanicalTurk.DeleteQualificationType+import Network.AWS.MechanicalTurk.DeleteWorkerBlock+import Network.AWS.MechanicalTurk.DisassociateQualificationFromWorker+import Network.AWS.MechanicalTurk.GetAccountBalance+import Network.AWS.MechanicalTurk.GetAssignment+import Network.AWS.MechanicalTurk.GetFileUploadURL+import Network.AWS.MechanicalTurk.GetHIT+import Network.AWS.MechanicalTurk.GetQualificationScore+import Network.AWS.MechanicalTurk.GetQualificationType+import Network.AWS.MechanicalTurk.ListAssignmentsForHIT+import Network.AWS.MechanicalTurk.ListBonusPayments+import Network.AWS.MechanicalTurk.ListHITs+import Network.AWS.MechanicalTurk.ListHITsForQualificationType+import Network.AWS.MechanicalTurk.ListQualificationRequests+import Network.AWS.MechanicalTurk.ListQualificationTypes+import Network.AWS.MechanicalTurk.ListReviewableHITs+import Network.AWS.MechanicalTurk.ListReviewPolicyResultsForHIT+import Network.AWS.MechanicalTurk.ListWorkerBlocks+import Network.AWS.MechanicalTurk.ListWorkersWithQualificationType+import Network.AWS.MechanicalTurk.NotifyWorkers+import Network.AWS.MechanicalTurk.RejectAssignment+import Network.AWS.MechanicalTurk.RejectQualificationRequest+import Network.AWS.MechanicalTurk.SendBonus+import Network.AWS.MechanicalTurk.SendTestEventNotification+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.UpdateExpirationForHIT+import Network.AWS.MechanicalTurk.UpdateHITReviewStatus+import Network.AWS.MechanicalTurk.UpdateHITTypeOfHIT+import Network.AWS.MechanicalTurk.UpdateNotificationSettings+import Network.AWS.MechanicalTurk.UpdateQualificationType+import Network.AWS.MechanicalTurk.Waiters++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'MechanicalTurk'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/MechanicalTurk/AcceptQualificationRequest.hs view
@@ -0,0 +1,145 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.AcceptQualificationRequest+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @AcceptQualificationRequest@ operation approves a Worker's request for a Qualification.+--+--+-- Only the owner of the Qualification type can grant a Qualification request for that type.+--+-- A successful request for the @AcceptQualificationRequest@ operation returns with no errors and an empty body.+--+module Network.AWS.MechanicalTurk.AcceptQualificationRequest+ (+ -- * Creating a Request+ acceptQualificationRequest+ , AcceptQualificationRequest+ -- * Request Lenses+ , aqrIntegerValue+ , aqrQualificationRequestId++ -- * Destructuring the Response+ , acceptQualificationRequestResponse+ , AcceptQualificationRequestResponse+ -- * Response Lenses+ , aqrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'acceptQualificationRequest' smart constructor.+data AcceptQualificationRequest = AcceptQualificationRequest'+ { _aqrIntegerValue :: !(Maybe Int)+ , _aqrQualificationRequestId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AcceptQualificationRequest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aqrIntegerValue' - The value of the Qualification. You can omit this value if you are using the presence or absence of the Qualification as the basis for a HIT requirement.+--+-- * 'aqrQualificationRequestId' - The ID of the Qualification request, as returned by the @GetQualificationRequests@ operation.+acceptQualificationRequest+ :: Text -- ^ 'aqrQualificationRequestId'+ -> AcceptQualificationRequest+acceptQualificationRequest pQualificationRequestId_ =+ AcceptQualificationRequest'+ { _aqrIntegerValue = Nothing+ , _aqrQualificationRequestId = pQualificationRequestId_+ }+++-- | The value of the Qualification. You can omit this value if you are using the presence or absence of the Qualification as the basis for a HIT requirement.+aqrIntegerValue :: Lens' AcceptQualificationRequest (Maybe Int)+aqrIntegerValue = lens _aqrIntegerValue (\ s a -> s{_aqrIntegerValue = a});++-- | The ID of the Qualification request, as returned by the @GetQualificationRequests@ operation.+aqrQualificationRequestId :: Lens' AcceptQualificationRequest Text+aqrQualificationRequestId = lens _aqrQualificationRequestId (\ s a -> s{_aqrQualificationRequestId = a});++instance AWSRequest AcceptQualificationRequest where+ type Rs AcceptQualificationRequest =+ AcceptQualificationRequestResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ AcceptQualificationRequestResponse' <$>+ (pure (fromEnum s)))++instance Hashable AcceptQualificationRequest where++instance NFData AcceptQualificationRequest where++instance ToHeaders AcceptQualificationRequest where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.AcceptQualificationRequest"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON AcceptQualificationRequest where+ toJSON AcceptQualificationRequest'{..}+ = object+ (catMaybes+ [("IntegerValue" .=) <$> _aqrIntegerValue,+ Just+ ("QualificationRequestId" .=+ _aqrQualificationRequestId)])++instance ToPath AcceptQualificationRequest where+ toPath = const "/"++instance ToQuery AcceptQualificationRequest where+ toQuery = const mempty++-- | /See:/ 'acceptQualificationRequestResponse' smart constructor.+newtype AcceptQualificationRequestResponse = AcceptQualificationRequestResponse'+ { _aqrrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AcceptQualificationRequestResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aqrrsResponseStatus' - -- | The response status code.+acceptQualificationRequestResponse+ :: Int -- ^ 'aqrrsResponseStatus'+ -> AcceptQualificationRequestResponse+acceptQualificationRequestResponse pResponseStatus_ =+ AcceptQualificationRequestResponse' {_aqrrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+aqrrsResponseStatus :: Lens' AcceptQualificationRequestResponse Int+aqrrsResponseStatus = lens _aqrrsResponseStatus (\ s a -> s{_aqrrsResponseStatus = a});++instance NFData AcceptQualificationRequestResponse+ where
+ gen/Network/AWS/MechanicalTurk/ApproveAssignment.hs view
@@ -0,0 +1,158 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ApproveAssignment+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ApproveAssignment@ operation approves the results of a completed assignment.+--+--+-- Approving an assignment initiates two payments from the Requester's Amazon.com account+--+-- * The Worker who submitted the results is paid the reward specified in the HIT.+--+-- * Amazon Mechanical Turk fees are debited.+--+--+--+-- If the Requester's account does not have adequate funds for these payments, the call to ApproveAssignment returns an exception, and the approval is not processed. You can include an optional feedback message with the approval, which the Worker can see in the Status section of the web site.+--+-- You can also call this operation for assignments that were previous rejected and approve them by explicitly overriding the previous rejection. This only works on rejected assignments that were submitted within the previous 30 days and only if the assignment's related HIT has not been deleted.+--+module Network.AWS.MechanicalTurk.ApproveAssignment+ (+ -- * Creating a Request+ approveAssignment+ , ApproveAssignment+ -- * Request Lenses+ , aaOverrideRejection+ , aaRequesterFeedback+ , aaAssignmentId++ -- * Destructuring the Response+ , approveAssignmentResponse+ , ApproveAssignmentResponse+ -- * Response Lenses+ , aarsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'approveAssignment' smart constructor.+data ApproveAssignment = ApproveAssignment'+ { _aaOverrideRejection :: !(Maybe Bool)+ , _aaRequesterFeedback :: !(Maybe Text)+ , _aaAssignmentId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ApproveAssignment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aaOverrideRejection' - A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to @False@ .+--+-- * 'aaRequesterFeedback' - A message for the Worker, which the Worker can see in the Status section of the web site.+--+-- * 'aaAssignmentId' - The ID of the assignment. The assignment must correspond to a HIT created by the Requester.+approveAssignment+ :: Text -- ^ 'aaAssignmentId'+ -> ApproveAssignment+approveAssignment pAssignmentId_ =+ ApproveAssignment'+ { _aaOverrideRejection = Nothing+ , _aaRequesterFeedback = Nothing+ , _aaAssignmentId = pAssignmentId_+ }+++-- | A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to @False@ .+aaOverrideRejection :: Lens' ApproveAssignment (Maybe Bool)+aaOverrideRejection = lens _aaOverrideRejection (\ s a -> s{_aaOverrideRejection = a});++-- | A message for the Worker, which the Worker can see in the Status section of the web site.+aaRequesterFeedback :: Lens' ApproveAssignment (Maybe Text)+aaRequesterFeedback = lens _aaRequesterFeedback (\ s a -> s{_aaRequesterFeedback = a});++-- | The ID of the assignment. The assignment must correspond to a HIT created by the Requester.+aaAssignmentId :: Lens' ApproveAssignment Text+aaAssignmentId = lens _aaAssignmentId (\ s a -> s{_aaAssignmentId = a});++instance AWSRequest ApproveAssignment where+ type Rs ApproveAssignment = ApproveAssignmentResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ ApproveAssignmentResponse' <$> (pure (fromEnum s)))++instance Hashable ApproveAssignment where++instance NFData ApproveAssignment where++instance ToHeaders ApproveAssignment where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ApproveAssignment"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ApproveAssignment where+ toJSON ApproveAssignment'{..}+ = object+ (catMaybes+ [("OverrideRejection" .=) <$> _aaOverrideRejection,+ ("RequesterFeedback" .=) <$> _aaRequesterFeedback,+ Just ("AssignmentId" .= _aaAssignmentId)])++instance ToPath ApproveAssignment where+ toPath = const "/"++instance ToQuery ApproveAssignment where+ toQuery = const mempty++-- | /See:/ 'approveAssignmentResponse' smart constructor.+newtype ApproveAssignmentResponse = ApproveAssignmentResponse'+ { _aarsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ApproveAssignmentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aarsResponseStatus' - -- | The response status code.+approveAssignmentResponse+ :: Int -- ^ 'aarsResponseStatus'+ -> ApproveAssignmentResponse+approveAssignmentResponse pResponseStatus_ =+ ApproveAssignmentResponse' {_aarsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+aarsResponseStatus :: Lens' ApproveAssignmentResponse Int+aarsResponseStatus = lens _aarsResponseStatus (\ s a -> s{_aarsResponseStatus = a});++instance NFData ApproveAssignmentResponse where
+ gen/Network/AWS/MechanicalTurk/AssociateQualificationWithWorker.hs view
@@ -0,0 +1,172 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.AssociateQualificationWithWorker+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @AssociateQualificationWithWorker@ operation gives a Worker a Qualification. @AssociateQualificationWithWorker@ does not require that the Worker submit a Qualification request. It gives the Qualification directly to the Worker.+--+--+-- You can only assign a Qualification of a Qualification type that you created (using the @CreateQualificationType@ operation).+--+module Network.AWS.MechanicalTurk.AssociateQualificationWithWorker+ (+ -- * Creating a Request+ associateQualificationWithWorker+ , AssociateQualificationWithWorker+ -- * Request Lenses+ , aqwwIntegerValue+ , aqwwSendNotification+ , aqwwQualificationTypeId+ , aqwwWorkerId++ -- * Destructuring the Response+ , associateQualificationWithWorkerResponse+ , AssociateQualificationWithWorkerResponse+ -- * Response Lenses+ , aqwwrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'associateQualificationWithWorker' smart constructor.+data AssociateQualificationWithWorker = AssociateQualificationWithWorker'+ { _aqwwIntegerValue :: !(Maybe Int)+ , _aqwwSendNotification :: !(Maybe Bool)+ , _aqwwQualificationTypeId :: !Text+ , _aqwwWorkerId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AssociateQualificationWithWorker' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aqwwIntegerValue' - The value of the Qualification to assign.+--+-- * 'aqwwSendNotification' - Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.+--+-- * 'aqwwQualificationTypeId' - The ID of the Qualification type to use for the assigned Qualification.+--+-- * 'aqwwWorkerId' - The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.+associateQualificationWithWorker+ :: Text -- ^ 'aqwwQualificationTypeId'+ -> Text -- ^ 'aqwwWorkerId'+ -> AssociateQualificationWithWorker+associateQualificationWithWorker pQualificationTypeId_ pWorkerId_ =+ AssociateQualificationWithWorker'+ { _aqwwIntegerValue = Nothing+ , _aqwwSendNotification = Nothing+ , _aqwwQualificationTypeId = pQualificationTypeId_+ , _aqwwWorkerId = pWorkerId_+ }+++-- | The value of the Qualification to assign.+aqwwIntegerValue :: Lens' AssociateQualificationWithWorker (Maybe Int)+aqwwIntegerValue = lens _aqwwIntegerValue (\ s a -> s{_aqwwIntegerValue = a});++-- | Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.+aqwwSendNotification :: Lens' AssociateQualificationWithWorker (Maybe Bool)+aqwwSendNotification = lens _aqwwSendNotification (\ s a -> s{_aqwwSendNotification = a});++-- | The ID of the Qualification type to use for the assigned Qualification.+aqwwQualificationTypeId :: Lens' AssociateQualificationWithWorker Text+aqwwQualificationTypeId = lens _aqwwQualificationTypeId (\ s a -> s{_aqwwQualificationTypeId = a});++-- | The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.+aqwwWorkerId :: Lens' AssociateQualificationWithWorker Text+aqwwWorkerId = lens _aqwwWorkerId (\ s a -> s{_aqwwWorkerId = a});++instance AWSRequest AssociateQualificationWithWorker+ where+ type Rs AssociateQualificationWithWorker =+ AssociateQualificationWithWorkerResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ AssociateQualificationWithWorkerResponse' <$>+ (pure (fromEnum s)))++instance Hashable AssociateQualificationWithWorker+ where++instance NFData AssociateQualificationWithWorker+ where++instance ToHeaders AssociateQualificationWithWorker+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.AssociateQualificationWithWorker"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON AssociateQualificationWithWorker+ where+ toJSON AssociateQualificationWithWorker'{..}+ = object+ (catMaybes+ [("IntegerValue" .=) <$> _aqwwIntegerValue,+ ("SendNotification" .=) <$> _aqwwSendNotification,+ Just+ ("QualificationTypeId" .= _aqwwQualificationTypeId),+ Just ("WorkerId" .= _aqwwWorkerId)])++instance ToPath AssociateQualificationWithWorker+ where+ toPath = const "/"++instance ToQuery AssociateQualificationWithWorker+ where+ toQuery = const mempty++-- | /See:/ 'associateQualificationWithWorkerResponse' smart constructor.+newtype AssociateQualificationWithWorkerResponse = AssociateQualificationWithWorkerResponse'+ { _aqwwrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AssociateQualificationWithWorkerResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aqwwrsResponseStatus' - -- | The response status code.+associateQualificationWithWorkerResponse+ :: Int -- ^ 'aqwwrsResponseStatus'+ -> AssociateQualificationWithWorkerResponse+associateQualificationWithWorkerResponse pResponseStatus_ =+ AssociateQualificationWithWorkerResponse'+ {_aqwwrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+aqwwrsResponseStatus :: Lens' AssociateQualificationWithWorkerResponse Int+aqwwrsResponseStatus = lens _aqwwrsResponseStatus (\ s a -> s{_aqwwrsResponseStatus = a});++instance NFData+ AssociateQualificationWithWorkerResponse+ where
+ gen/Network/AWS/MechanicalTurk/CreateAdditionalAssignmentsForHIT.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.CreateAdditionalAssignmentsForHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @CreateAdditionalAssignmentsForHIT@ operation increases the maximum number of assignments of an existing HIT.+--+--+-- To extend the maximum number of assignments, specify the number of additional assignments.+--+module Network.AWS.MechanicalTurk.CreateAdditionalAssignmentsForHIT+ (+ -- * Creating a Request+ createAdditionalAssignmentsForHIT+ , CreateAdditionalAssignmentsForHIT+ -- * Request Lenses+ , caafhitUniqueRequestToken+ , caafhitHITId+ , caafhitNumberOfAdditionalAssignments++ -- * Destructuring the Response+ , createAdditionalAssignmentsForHITResponse+ , CreateAdditionalAssignmentsForHITResponse+ -- * Response Lenses+ , caafhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createAdditionalAssignmentsForHIT' smart constructor.+data CreateAdditionalAssignmentsForHIT = CreateAdditionalAssignmentsForHIT'+ { _caafhitUniqueRequestToken :: !(Maybe Text)+ , _caafhitHITId :: !Text+ , _caafhitNumberOfAdditionalAssignments :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAdditionalAssignmentsForHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'caafhitUniqueRequestToken' - A unique identifier for this request, which allows you to retry the call on error without extending the HIT multiple times. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the extend HIT already exists in the system from a previous call using the same @UniqueRequestToken@ , subsequent calls will return an error with a message containing the request ID.+--+-- * 'caafhitHITId' - The ID of the HIT to extend.+--+-- * 'caafhitNumberOfAdditionalAssignments' - The number of additional assignments to request for this HIT.+createAdditionalAssignmentsForHIT+ :: Text -- ^ 'caafhitHITId'+ -> Int -- ^ 'caafhitNumberOfAdditionalAssignments'+ -> CreateAdditionalAssignmentsForHIT+createAdditionalAssignmentsForHIT pHITId_ pNumberOfAdditionalAssignments_ =+ CreateAdditionalAssignmentsForHIT'+ { _caafhitUniqueRequestToken = Nothing+ , _caafhitHITId = pHITId_+ , _caafhitNumberOfAdditionalAssignments = pNumberOfAdditionalAssignments_+ }+++-- | A unique identifier for this request, which allows you to retry the call on error without extending the HIT multiple times. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the extend HIT already exists in the system from a previous call using the same @UniqueRequestToken@ , subsequent calls will return an error with a message containing the request ID.+caafhitUniqueRequestToken :: Lens' CreateAdditionalAssignmentsForHIT (Maybe Text)+caafhitUniqueRequestToken = lens _caafhitUniqueRequestToken (\ s a -> s{_caafhitUniqueRequestToken = a});++-- | The ID of the HIT to extend.+caafhitHITId :: Lens' CreateAdditionalAssignmentsForHIT Text+caafhitHITId = lens _caafhitHITId (\ s a -> s{_caafhitHITId = a});++-- | The number of additional assignments to request for this HIT.+caafhitNumberOfAdditionalAssignments :: Lens' CreateAdditionalAssignmentsForHIT Int+caafhitNumberOfAdditionalAssignments = lens _caafhitNumberOfAdditionalAssignments (\ s a -> s{_caafhitNumberOfAdditionalAssignments = a});++instance AWSRequest CreateAdditionalAssignmentsForHIT+ where+ type Rs CreateAdditionalAssignmentsForHIT =+ CreateAdditionalAssignmentsForHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ CreateAdditionalAssignmentsForHITResponse' <$>+ (pure (fromEnum s)))++instance Hashable CreateAdditionalAssignmentsForHIT+ where++instance NFData CreateAdditionalAssignmentsForHIT+ where++instance ToHeaders CreateAdditionalAssignmentsForHIT+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.CreateAdditionalAssignmentsForHIT"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateAdditionalAssignmentsForHIT+ where+ toJSON CreateAdditionalAssignmentsForHIT'{..}+ = object+ (catMaybes+ [("UniqueRequestToken" .=) <$>+ _caafhitUniqueRequestToken,+ Just ("HITId" .= _caafhitHITId),+ Just+ ("NumberOfAdditionalAssignments" .=+ _caafhitNumberOfAdditionalAssignments)])++instance ToPath CreateAdditionalAssignmentsForHIT+ where+ toPath = const "/"++instance ToQuery CreateAdditionalAssignmentsForHIT+ where+ toQuery = const mempty++-- | /See:/ 'createAdditionalAssignmentsForHITResponse' smart constructor.+newtype CreateAdditionalAssignmentsForHITResponse = CreateAdditionalAssignmentsForHITResponse'+ { _caafhitrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAdditionalAssignmentsForHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'caafhitrsResponseStatus' - -- | The response status code.+createAdditionalAssignmentsForHITResponse+ :: Int -- ^ 'caafhitrsResponseStatus'+ -> CreateAdditionalAssignmentsForHITResponse+createAdditionalAssignmentsForHITResponse pResponseStatus_ =+ CreateAdditionalAssignmentsForHITResponse'+ {_caafhitrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+caafhitrsResponseStatus :: Lens' CreateAdditionalAssignmentsForHITResponse Int+caafhitrsResponseStatus = lens _caafhitrsResponseStatus (\ s a -> s{_caafhitrsResponseStatus = a});++instance NFData+ CreateAdditionalAssignmentsForHITResponse+ where
+ gen/Network/AWS/MechanicalTurk/CreateHIT.hs view
@@ -0,0 +1,304 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.CreateHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @CreateHIT@ operation creates a new Human Intelligence Task (HIT). The new HIT is made available for Workers to find and accept on the Amazon Mechanical Turk website.+--+--+-- This operation allows you to specify a new HIT by passing in values for the properties of the HIT, such as its title, reward amount and number of assignments. When you pass these values to @CreateHIT@ , a new HIT is created for you, with a new @HITTypeID@ . The HITTypeID can be used to create additional HITs in the future without needing to specify common parameters such as the title, description and reward amount each time.+--+-- An alternative way to create HITs is to first generate a HITTypeID using the @CreateHITType@ operation and then call the @CreateHITWithHITType@ operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.+--+-- CreateHIT 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@ .+--+module Network.AWS.MechanicalTurk.CreateHIT+ (+ -- * Creating a Request+ createHIT+ , CreateHIT+ -- * Request Lenses+ , chitHITReviewPolicy+ , chitUniqueRequestToken+ , chitAutoApprovalDelayInSeconds+ , chitRequesterAnnotation+ , chitMaxAssignments+ , chitKeywords+ , chitHITLayoutId+ , chitHITLayoutParameters+ , chitQualificationRequirements+ , chitQuestion+ , chitAssignmentReviewPolicy+ , chitLifetimeInSeconds+ , chitAssignmentDurationInSeconds+ , chitReward+ , chitTitle+ , chitDescription++ -- * Destructuring the Response+ , createHITResponse+ , CreateHITResponse+ -- * Response Lenses+ , chitrsHIT+ , chitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createHIT' smart constructor.+data CreateHIT = CreateHIT'+ { _chitHITReviewPolicy :: !(Maybe ReviewPolicy)+ , _chitUniqueRequestToken :: !(Maybe Text)+ , _chitAutoApprovalDelayInSeconds :: !(Maybe Integer)+ , _chitRequesterAnnotation :: !(Maybe Text)+ , _chitMaxAssignments :: !(Maybe Int)+ , _chitKeywords :: !(Maybe Text)+ , _chitHITLayoutId :: !(Maybe Text)+ , _chitHITLayoutParameters :: !(Maybe [HITLayoutParameter])+ , _chitQualificationRequirements :: !(Maybe [QualificationRequirement])+ , _chitQuestion :: !(Maybe Text)+ , _chitAssignmentReviewPolicy :: !(Maybe ReviewPolicy)+ , _chitLifetimeInSeconds :: !Integer+ , _chitAssignmentDurationInSeconds :: !Integer+ , _chitReward :: !Text+ , _chitTitle :: !Text+ , _chitDescription :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chitHITReviewPolicy' - The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.+--+-- * 'chitUniqueRequestToken' - 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.+--+-- * 'chitAutoApprovalDelayInSeconds' - The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.+--+-- * 'chitRequesterAnnotation' - 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.+--+-- * 'chitMaxAssignments' - The number of times the HIT can be accepted and completed before the HIT becomes unavailable.+--+-- * 'chitKeywords' - One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.+--+-- * 'chitHITLayoutId' - 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.+--+-- * 'chitHITLayoutParameters' - If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.+--+-- * 'chitQualificationRequirements' - A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT.+--+-- * 'chitQuestion' - 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.+--+-- * 'chitAssignmentReviewPolicy' - 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.+--+-- * 'chitLifetimeInSeconds' - 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.+--+-- * 'chitAssignmentDurationInSeconds' - The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.+--+-- * 'chitReward' - The amount of money the Requester will pay a Worker for successfully completing the HIT.+--+-- * 'chitTitle' - The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.+--+-- * 'chitDescription' - A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.+createHIT+ :: Integer -- ^ 'chitLifetimeInSeconds'+ -> Integer -- ^ 'chitAssignmentDurationInSeconds'+ -> Text -- ^ 'chitReward'+ -> Text -- ^ 'chitTitle'+ -> Text -- ^ 'chitDescription'+ -> CreateHIT+createHIT pLifetimeInSeconds_ pAssignmentDurationInSeconds_ pReward_ pTitle_ pDescription_ =+ CreateHIT'+ { _chitHITReviewPolicy = Nothing+ , _chitUniqueRequestToken = Nothing+ , _chitAutoApprovalDelayInSeconds = Nothing+ , _chitRequesterAnnotation = Nothing+ , _chitMaxAssignments = Nothing+ , _chitKeywords = Nothing+ , _chitHITLayoutId = Nothing+ , _chitHITLayoutParameters = Nothing+ , _chitQualificationRequirements = Nothing+ , _chitQuestion = Nothing+ , _chitAssignmentReviewPolicy = Nothing+ , _chitLifetimeInSeconds = pLifetimeInSeconds_+ , _chitAssignmentDurationInSeconds = pAssignmentDurationInSeconds_+ , _chitReward = pReward_+ , _chitTitle = pTitle_+ , _chitDescription = pDescription_+ }+++-- | The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.+chitHITReviewPolicy :: Lens' CreateHIT (Maybe ReviewPolicy)+chitHITReviewPolicy = lens _chitHITReviewPolicy (\ s a -> s{_chitHITReviewPolicy = a});++-- | 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.+chitUniqueRequestToken :: Lens' CreateHIT (Maybe Text)+chitUniqueRequestToken = lens _chitUniqueRequestToken (\ s a -> s{_chitUniqueRequestToken = a});++-- | The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.+chitAutoApprovalDelayInSeconds :: Lens' CreateHIT (Maybe Integer)+chitAutoApprovalDelayInSeconds = lens _chitAutoApprovalDelayInSeconds (\ s a -> s{_chitAutoApprovalDelayInSeconds = a});++-- | 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.+chitRequesterAnnotation :: Lens' CreateHIT (Maybe Text)+chitRequesterAnnotation = lens _chitRequesterAnnotation (\ s a -> s{_chitRequesterAnnotation = a});++-- | The number of times the HIT can be accepted and completed before the HIT becomes unavailable.+chitMaxAssignments :: Lens' CreateHIT (Maybe Int)+chitMaxAssignments = lens _chitMaxAssignments (\ s a -> s{_chitMaxAssignments = a});++-- | One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.+chitKeywords :: Lens' CreateHIT (Maybe Text)+chitKeywords = lens _chitKeywords (\ s a -> s{_chitKeywords = a});++-- | 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.+chitHITLayoutId :: Lens' CreateHIT (Maybe Text)+chitHITLayoutId = lens _chitHITLayoutId (\ s a -> s{_chitHITLayoutId = a});++-- | If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.+chitHITLayoutParameters :: Lens' CreateHIT [HITLayoutParameter]+chitHITLayoutParameters = lens _chitHITLayoutParameters (\ s a -> s{_chitHITLayoutParameters = a}) . _Default . _Coerce;++-- | A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT.+chitQualificationRequirements :: Lens' CreateHIT [QualificationRequirement]+chitQualificationRequirements = lens _chitQualificationRequirements (\ s a -> s{_chitQualificationRequirements = a}) . _Default . _Coerce;++-- | 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.+chitQuestion :: Lens' CreateHIT (Maybe Text)+chitQuestion = lens _chitQuestion (\ s a -> s{_chitQuestion = a});++-- | 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.+chitAssignmentReviewPolicy :: Lens' CreateHIT (Maybe ReviewPolicy)+chitAssignmentReviewPolicy = lens _chitAssignmentReviewPolicy (\ s a -> s{_chitAssignmentReviewPolicy = a});++-- | 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.+chitLifetimeInSeconds :: Lens' CreateHIT Integer+chitLifetimeInSeconds = lens _chitLifetimeInSeconds (\ s a -> s{_chitLifetimeInSeconds = a});++-- | The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.+chitAssignmentDurationInSeconds :: Lens' CreateHIT Integer+chitAssignmentDurationInSeconds = lens _chitAssignmentDurationInSeconds (\ s a -> s{_chitAssignmentDurationInSeconds = a});++-- | The amount of money the Requester will pay a Worker for successfully completing the HIT.+chitReward :: Lens' CreateHIT Text+chitReward = lens _chitReward (\ s a -> s{_chitReward = a});++-- | The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.+chitTitle :: Lens' CreateHIT Text+chitTitle = lens _chitTitle (\ s a -> s{_chitTitle = a});++-- | A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.+chitDescription :: Lens' CreateHIT Text+chitDescription = lens _chitDescription (\ s a -> s{_chitDescription = a});++instance AWSRequest CreateHIT where+ type Rs CreateHIT = CreateHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ CreateHITResponse' <$>+ (x .?> "HIT") <*> (pure (fromEnum s)))++instance Hashable CreateHIT where++instance NFData CreateHIT where++instance ToHeaders CreateHIT where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.CreateHIT" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateHIT where+ toJSON CreateHIT'{..}+ = object+ (catMaybes+ [("HITReviewPolicy" .=) <$> _chitHITReviewPolicy,+ ("UniqueRequestToken" .=) <$>+ _chitUniqueRequestToken,+ ("AutoApprovalDelayInSeconds" .=) <$>+ _chitAutoApprovalDelayInSeconds,+ ("RequesterAnnotation" .=) <$>+ _chitRequesterAnnotation,+ ("MaxAssignments" .=) <$> _chitMaxAssignments,+ ("Keywords" .=) <$> _chitKeywords,+ ("HITLayoutId" .=) <$> _chitHITLayoutId,+ ("HITLayoutParameters" .=) <$>+ _chitHITLayoutParameters,+ ("QualificationRequirements" .=) <$>+ _chitQualificationRequirements,+ ("Question" .=) <$> _chitQuestion,+ ("AssignmentReviewPolicy" .=) <$>+ _chitAssignmentReviewPolicy,+ Just ("LifetimeInSeconds" .= _chitLifetimeInSeconds),+ Just+ ("AssignmentDurationInSeconds" .=+ _chitAssignmentDurationInSeconds),+ Just ("Reward" .= _chitReward),+ Just ("Title" .= _chitTitle),+ Just ("Description" .= _chitDescription)])++instance ToPath CreateHIT where+ toPath = const "/"++instance ToQuery CreateHIT where+ toQuery = const mempty++-- | /See:/ 'createHITResponse' smart constructor.+data CreateHITResponse = CreateHITResponse'+ { _chitrsHIT :: !(Maybe HIT)+ , _chitrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chitrsHIT' - 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.+--+-- * 'chitrsResponseStatus' - -- | The response status code.+createHITResponse+ :: Int -- ^ 'chitrsResponseStatus'+ -> CreateHITResponse+createHITResponse pResponseStatus_ =+ CreateHITResponse'+ {_chitrsHIT = Nothing, _chitrsResponseStatus = pResponseStatus_}+++-- | 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.+chitrsHIT :: Lens' CreateHITResponse (Maybe HIT)+chitrsHIT = lens _chitrsHIT (\ s a -> s{_chitrsHIT = a});++-- | -- | The response status code.+chitrsResponseStatus :: Lens' CreateHITResponse Int+chitrsResponseStatus = lens _chitrsResponseStatus (\ s a -> s{_chitrsResponseStatus = a});++instance NFData CreateHITResponse where
+ gen/Network/AWS/MechanicalTurk/CreateHITType.hs view
@@ -0,0 +1,203 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.CreateHITType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @CreateHITType@ operation creates a new HIT type. This operation allows you to define a standard set of HIT properties to use when creating HITs. If you register a HIT type with values that match an existing HIT type, the HIT type ID of the existing type will be returned.+--+--+module Network.AWS.MechanicalTurk.CreateHITType+ (+ -- * Creating a Request+ createHITType+ , CreateHITType+ -- * Request Lenses+ , chittAutoApprovalDelayInSeconds+ , chittKeywords+ , chittQualificationRequirements+ , chittAssignmentDurationInSeconds+ , chittReward+ , chittTitle+ , chittDescription++ -- * Destructuring the Response+ , createHITTypeResponse+ , CreateHITTypeResponse+ -- * Response Lenses+ , chittrsHITTypeId+ , chittrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createHITType' smart constructor.+data CreateHITType = CreateHITType'+ { _chittAutoApprovalDelayInSeconds :: !(Maybe Integer)+ , _chittKeywords :: !(Maybe Text)+ , _chittQualificationRequirements :: !(Maybe [QualificationRequirement])+ , _chittAssignmentDurationInSeconds :: !Integer+ , _chittReward :: !Text+ , _chittTitle :: !Text+ , _chittDescription :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateHITType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chittAutoApprovalDelayInSeconds' - The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.+--+-- * 'chittKeywords' - One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.+--+-- * 'chittQualificationRequirements' - A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT.+--+-- * 'chittAssignmentDurationInSeconds' - The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.+--+-- * 'chittReward' - The amount of money the Requester will pay a Worker for successfully completing the HIT.+--+-- * 'chittTitle' - The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.+--+-- * 'chittDescription' - A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.+createHITType+ :: Integer -- ^ 'chittAssignmentDurationInSeconds'+ -> Text -- ^ 'chittReward'+ -> Text -- ^ 'chittTitle'+ -> Text -- ^ 'chittDescription'+ -> CreateHITType+createHITType pAssignmentDurationInSeconds_ pReward_ pTitle_ pDescription_ =+ CreateHITType'+ { _chittAutoApprovalDelayInSeconds = Nothing+ , _chittKeywords = Nothing+ , _chittQualificationRequirements = Nothing+ , _chittAssignmentDurationInSeconds = pAssignmentDurationInSeconds_+ , _chittReward = pReward_+ , _chittTitle = pTitle_+ , _chittDescription = pDescription_+ }+++-- | The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.+chittAutoApprovalDelayInSeconds :: Lens' CreateHITType (Maybe Integer)+chittAutoApprovalDelayInSeconds = lens _chittAutoApprovalDelayInSeconds (\ s a -> s{_chittAutoApprovalDelayInSeconds = a});++-- | One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.+chittKeywords :: Lens' CreateHITType (Maybe Text)+chittKeywords = lens _chittKeywords (\ s a -> s{_chittKeywords = a});++-- | A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT.+chittQualificationRequirements :: Lens' CreateHITType [QualificationRequirement]+chittQualificationRequirements = lens _chittQualificationRequirements (\ s a -> s{_chittQualificationRequirements = a}) . _Default . _Coerce;++-- | The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.+chittAssignmentDurationInSeconds :: Lens' CreateHITType Integer+chittAssignmentDurationInSeconds = lens _chittAssignmentDurationInSeconds (\ s a -> s{_chittAssignmentDurationInSeconds = a});++-- | The amount of money the Requester will pay a Worker for successfully completing the HIT.+chittReward :: Lens' CreateHITType Text+chittReward = lens _chittReward (\ s a -> s{_chittReward = a});++-- | The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.+chittTitle :: Lens' CreateHITType Text+chittTitle = lens _chittTitle (\ s a -> s{_chittTitle = a});++-- | A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.+chittDescription :: Lens' CreateHITType Text+chittDescription = lens _chittDescription (\ s a -> s{_chittDescription = a});++instance AWSRequest CreateHITType where+ type Rs CreateHITType = CreateHITTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ CreateHITTypeResponse' <$>+ (x .?> "HITTypeId") <*> (pure (fromEnum s)))++instance Hashable CreateHITType where++instance NFData CreateHITType where++instance ToHeaders CreateHITType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.CreateHITType" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateHITType where+ toJSON CreateHITType'{..}+ = object+ (catMaybes+ [("AutoApprovalDelayInSeconds" .=) <$>+ _chittAutoApprovalDelayInSeconds,+ ("Keywords" .=) <$> _chittKeywords,+ ("QualificationRequirements" .=) <$>+ _chittQualificationRequirements,+ Just+ ("AssignmentDurationInSeconds" .=+ _chittAssignmentDurationInSeconds),+ Just ("Reward" .= _chittReward),+ Just ("Title" .= _chittTitle),+ Just ("Description" .= _chittDescription)])++instance ToPath CreateHITType where+ toPath = const "/"++instance ToQuery CreateHITType where+ toQuery = const mempty++-- | /See:/ 'createHITTypeResponse' smart constructor.+data CreateHITTypeResponse = CreateHITTypeResponse'+ { _chittrsHITTypeId :: !(Maybe Text)+ , _chittrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateHITTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chittrsHITTypeId' - The ID of the newly registered HIT type.+--+-- * 'chittrsResponseStatus' - -- | The response status code.+createHITTypeResponse+ :: Int -- ^ 'chittrsResponseStatus'+ -> CreateHITTypeResponse+createHITTypeResponse pResponseStatus_ =+ CreateHITTypeResponse'+ {_chittrsHITTypeId = Nothing, _chittrsResponseStatus = pResponseStatus_}+++-- | The ID of the newly registered HIT type.+chittrsHITTypeId :: Lens' CreateHITTypeResponse (Maybe Text)+chittrsHITTypeId = lens _chittrsHITTypeId (\ s a -> s{_chittrsHITTypeId = a});++-- | -- | The response status code.+chittrsResponseStatus :: Lens' CreateHITTypeResponse Int+chittrsResponseStatus = lens _chittrsResponseStatus (\ s a -> s{_chittrsResponseStatus = a});++instance NFData CreateHITTypeResponse where
+ gen/Network/AWS/MechanicalTurk/CreateHITWithHITType.hs view
@@ -0,0 +1,239 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.CreateHITWithHITType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- 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@ .+--+module Network.AWS.MechanicalTurk.CreateHITWithHITType+ (+ -- * Creating a Request+ createHITWithHITType+ , CreateHITWithHITType+ -- * Request Lenses+ , chitwhittHITReviewPolicy+ , chitwhittUniqueRequestToken+ , chitwhittRequesterAnnotation+ , chitwhittMaxAssignments+ , chitwhittHITLayoutId+ , chitwhittHITLayoutParameters+ , chitwhittQuestion+ , chitwhittAssignmentReviewPolicy+ , chitwhittHITTypeId+ , chitwhittLifetimeInSeconds++ -- * Destructuring the Response+ , createHITWithHITTypeResponse+ , CreateHITWithHITTypeResponse+ -- * Response Lenses+ , chitwhittrsHIT+ , chitwhittrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createHITWithHITType' smart constructor.+data CreateHITWithHITType = CreateHITWithHITType'+ { _chitwhittHITReviewPolicy :: !(Maybe ReviewPolicy)+ , _chitwhittUniqueRequestToken :: !(Maybe Text)+ , _chitwhittRequesterAnnotation :: !(Maybe Text)+ , _chitwhittMaxAssignments :: !(Maybe Int)+ , _chitwhittHITLayoutId :: !(Maybe Text)+ , _chitwhittHITLayoutParameters :: !(Maybe [HITLayoutParameter])+ , _chitwhittQuestion :: !(Maybe Text)+ , _chitwhittAssignmentReviewPolicy :: !(Maybe ReviewPolicy)+ , _chitwhittHITTypeId :: !Text+ , _chitwhittLifetimeInSeconds :: !Integer+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | 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.+createHITWithHITType+ :: Text -- ^ 'chitwhittHITTypeId'+ -> Integer -- ^ 'chitwhittLifetimeInSeconds'+ -> CreateHITWithHITType+createHITWithHITType pHITTypeId_ pLifetimeInSeconds_ =+ CreateHITWithHITType'+ { _chitwhittHITReviewPolicy = Nothing+ , _chitwhittUniqueRequestToken = Nothing+ , _chitwhittRequesterAnnotation = Nothing+ , _chitwhittMaxAssignments = Nothing+ , _chitwhittHITLayoutId = Nothing+ , _chitwhittHITLayoutParameters = Nothing+ , _chitwhittQuestion = Nothing+ , _chitwhittAssignmentReviewPolicy = Nothing+ , _chitwhittHITTypeId = pHITTypeId_+ , _chitwhittLifetimeInSeconds = pLifetimeInSeconds_+ }+++-- | The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.+chitwhittHITReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy)+chitwhittHITReviewPolicy = lens _chitwhittHITReviewPolicy (\ s a -> s{_chitwhittHITReviewPolicy = a});++-- | 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.+chitwhittUniqueRequestToken :: Lens' CreateHITWithHITType (Maybe Text)+chitwhittUniqueRequestToken = lens _chitwhittUniqueRequestToken (\ s a -> s{_chitwhittUniqueRequestToken = a});++-- | 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.+chitwhittRequesterAnnotation :: Lens' CreateHITWithHITType (Maybe Text)+chitwhittRequesterAnnotation = lens _chitwhittRequesterAnnotation (\ s a -> s{_chitwhittRequesterAnnotation = a});++-- | The number of times the HIT can be accepted and completed before the HIT becomes unavailable.+chitwhittMaxAssignments :: Lens' CreateHITWithHITType (Maybe Int)+chitwhittMaxAssignments = lens _chitwhittMaxAssignments (\ s a -> s{_chitwhittMaxAssignments = a});++-- | 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.+chitwhittHITLayoutId :: Lens' CreateHITWithHITType (Maybe Text)+chitwhittHITLayoutId = lens _chitwhittHITLayoutId (\ s a -> s{_chitwhittHITLayoutId = a});++-- | If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.+chitwhittHITLayoutParameters :: Lens' CreateHITWithHITType [HITLayoutParameter]+chitwhittHITLayoutParameters = lens _chitwhittHITLayoutParameters (\ s a -> s{_chitwhittHITLayoutParameters = a}) . _Default . _Coerce;++-- | 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.+chitwhittQuestion :: Lens' CreateHITWithHITType (Maybe Text)+chitwhittQuestion = lens _chitwhittQuestion (\ s a -> s{_chitwhittQuestion = a});++-- | 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.+chitwhittAssignmentReviewPolicy :: Lens' CreateHITWithHITType (Maybe ReviewPolicy)+chitwhittAssignmentReviewPolicy = lens _chitwhittAssignmentReviewPolicy (\ s a -> s{_chitwhittAssignmentReviewPolicy = a});++-- | The HIT type ID you want to create this HIT with.+chitwhittHITTypeId :: Lens' CreateHITWithHITType Text+chitwhittHITTypeId = lens _chitwhittHITTypeId (\ s a -> s{_chitwhittHITTypeId = a});++-- | 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.+chitwhittLifetimeInSeconds :: Lens' CreateHITWithHITType Integer+chitwhittLifetimeInSeconds = lens _chitwhittLifetimeInSeconds (\ s a -> s{_chitwhittLifetimeInSeconds = a});++instance AWSRequest CreateHITWithHITType where+ type Rs CreateHITWithHITType =+ CreateHITWithHITTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ CreateHITWithHITTypeResponse' <$>+ (x .?> "HIT") <*> (pure (fromEnum s)))++instance Hashable CreateHITWithHITType where++instance NFData CreateHITWithHITType where++instance ToHeaders CreateHITWithHITType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.CreateHITWithHITType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateHITWithHITType where+ toJSON CreateHITWithHITType'{..}+ = object+ (catMaybes+ [("HITReviewPolicy" .=) <$>+ _chitwhittHITReviewPolicy,+ ("UniqueRequestToken" .=) <$>+ _chitwhittUniqueRequestToken,+ ("RequesterAnnotation" .=) <$>+ _chitwhittRequesterAnnotation,+ ("MaxAssignments" .=) <$> _chitwhittMaxAssignments,+ ("HITLayoutId" .=) <$> _chitwhittHITLayoutId,+ ("HITLayoutParameters" .=) <$>+ _chitwhittHITLayoutParameters,+ ("Question" .=) <$> _chitwhittQuestion,+ ("AssignmentReviewPolicy" .=) <$>+ _chitwhittAssignmentReviewPolicy,+ Just ("HITTypeId" .= _chitwhittHITTypeId),+ Just+ ("LifetimeInSeconds" .=+ _chitwhittLifetimeInSeconds)])++instance ToPath CreateHITWithHITType where+ toPath = const "/"++instance ToQuery CreateHITWithHITType where+ toQuery = const mempty++-- | /See:/ 'createHITWithHITTypeResponse' smart constructor.+data CreateHITWithHITTypeResponse = CreateHITWithHITTypeResponse'+ { _chitwhittrsHIT :: !(Maybe HIT)+ , _chitwhittrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | 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.+createHITWithHITTypeResponse+ :: Int -- ^ 'chitwhittrsResponseStatus'+ -> CreateHITWithHITTypeResponse+createHITWithHITTypeResponse pResponseStatus_ =+ CreateHITWithHITTypeResponse'+ {_chitwhittrsHIT = Nothing, _chitwhittrsResponseStatus = pResponseStatus_}+++-- | 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.+chitwhittrsHIT :: Lens' CreateHITWithHITTypeResponse (Maybe HIT)+chitwhittrsHIT = lens _chitwhittrsHIT (\ s a -> s{_chitwhittrsHIT = a});++-- | -- | The response status code.+chitwhittrsResponseStatus :: Lens' CreateHITWithHITTypeResponse Int+chitwhittrsResponseStatus = lens _chitwhittrsResponseStatus (\ s a -> s{_chitwhittrsResponseStatus = a});++instance NFData CreateHITWithHITTypeResponse where
+ gen/Network/AWS/MechanicalTurk/CreateQualificationType.hs view
@@ -0,0 +1,233 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.CreateQualificationType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @CreateQualificationType@ operation creates a new Qualification type, which is represented by a @QualificationType@ data structure.+--+--+module Network.AWS.MechanicalTurk.CreateQualificationType+ (+ -- * Creating a Request+ createQualificationType+ , CreateQualificationType+ -- * Request Lenses+ , cqtTestDurationInSeconds+ , cqtAnswerKey+ , cqtTest+ , cqtKeywords+ , cqtAutoGranted+ , cqtAutoGrantedValue+ , cqtRetryDelayInSeconds+ , cqtName+ , cqtDescription+ , cqtQualificationTypeStatus++ -- * Destructuring the Response+ , createQualificationTypeResponse+ , CreateQualificationTypeResponse+ -- * Response Lenses+ , cqtrsQualificationType+ , cqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createQualificationType' smart constructor.+data CreateQualificationType = CreateQualificationType'+ { _cqtTestDurationInSeconds :: !(Maybe Integer)+ , _cqtAnswerKey :: !(Maybe Text)+ , _cqtTest :: !(Maybe Text)+ , _cqtKeywords :: !(Maybe Text)+ , _cqtAutoGranted :: !(Maybe Bool)+ , _cqtAutoGrantedValue :: !(Maybe Int)+ , _cqtRetryDelayInSeconds :: !(Maybe Integer)+ , _cqtName :: !Text+ , _cqtDescription :: !Text+ , _cqtQualificationTypeStatus :: !QualificationTypeStatus+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateQualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cqtTestDurationInSeconds' - The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.+--+-- * 'cqtAnswerKey' - The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure. Constraints: Must not be longer than 65535 bytes. Constraints: None. If not specified, you must process Qualification requests manually.+--+-- * 'cqtTest' - The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, @TestDurationInSeconds@ must also be specified. Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true. Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.+--+-- * 'cqtKeywords' - One or more words or phrases that describe the Qualification type, separated by commas. The keywords of a type make the type easier to find during a search.+--+-- * 'cqtAutoGranted' - Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Constraints: If the Test parameter is specified, this parameter cannot be true.+--+-- * 'cqtAutoGrantedValue' - The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.+--+-- * 'cqtRetryDelayInSeconds' - The number of seconds that a Worker must wait after requesting a Qualification of the Qualification type before the worker can retry the Qualification request. Constraints: None. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must delete existing retry-enabled Qualification type and then create a new Qualification type with retries disabled.+--+-- * 'cqtName' - The name you give to the Qualification type. The type name is used to represent the Qualification to Workers, and to find the type using a Qualification type search. It must be unique across all of your Qualification types.+--+-- * 'cqtDescription' - A long description for the Qualification type. On the Amazon Mechanical Turk website, the long description is displayed when a Worker examines a Qualification type.+--+-- * 'cqtQualificationTypeStatus' - The initial status of the Qualification type. Constraints: Valid values are: Active | Inactive+createQualificationType+ :: Text -- ^ 'cqtName'+ -> Text -- ^ 'cqtDescription'+ -> QualificationTypeStatus -- ^ 'cqtQualificationTypeStatus'+ -> CreateQualificationType+createQualificationType pName_ pDescription_ pQualificationTypeStatus_ =+ CreateQualificationType'+ { _cqtTestDurationInSeconds = Nothing+ , _cqtAnswerKey = Nothing+ , _cqtTest = Nothing+ , _cqtKeywords = Nothing+ , _cqtAutoGranted = Nothing+ , _cqtAutoGrantedValue = Nothing+ , _cqtRetryDelayInSeconds = Nothing+ , _cqtName = pName_+ , _cqtDescription = pDescription_+ , _cqtQualificationTypeStatus = pQualificationTypeStatus_+ }+++-- | The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.+cqtTestDurationInSeconds :: Lens' CreateQualificationType (Maybe Integer)+cqtTestDurationInSeconds = lens _cqtTestDurationInSeconds (\ s a -> s{_cqtTestDurationInSeconds = a});++-- | The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure. Constraints: Must not be longer than 65535 bytes. Constraints: None. If not specified, you must process Qualification requests manually.+cqtAnswerKey :: Lens' CreateQualificationType (Maybe Text)+cqtAnswerKey = lens _cqtAnswerKey (\ s a -> s{_cqtAnswerKey = a});++-- | The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, @TestDurationInSeconds@ must also be specified. Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true. Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.+cqtTest :: Lens' CreateQualificationType (Maybe Text)+cqtTest = lens _cqtTest (\ s a -> s{_cqtTest = a});++-- | One or more words or phrases that describe the Qualification type, separated by commas. The keywords of a type make the type easier to find during a search.+cqtKeywords :: Lens' CreateQualificationType (Maybe Text)+cqtKeywords = lens _cqtKeywords (\ s a -> s{_cqtKeywords = a});++-- | Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Constraints: If the Test parameter is specified, this parameter cannot be true.+cqtAutoGranted :: Lens' CreateQualificationType (Maybe Bool)+cqtAutoGranted = lens _cqtAutoGranted (\ s a -> s{_cqtAutoGranted = a});++-- | The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.+cqtAutoGrantedValue :: Lens' CreateQualificationType (Maybe Int)+cqtAutoGrantedValue = lens _cqtAutoGrantedValue (\ s a -> s{_cqtAutoGrantedValue = a});++-- | The number of seconds that a Worker must wait after requesting a Qualification of the Qualification type before the worker can retry the Qualification request. Constraints: None. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must delete existing retry-enabled Qualification type and then create a new Qualification type with retries disabled.+cqtRetryDelayInSeconds :: Lens' CreateQualificationType (Maybe Integer)+cqtRetryDelayInSeconds = lens _cqtRetryDelayInSeconds (\ s a -> s{_cqtRetryDelayInSeconds = a});++-- | The name you give to the Qualification type. The type name is used to represent the Qualification to Workers, and to find the type using a Qualification type search. It must be unique across all of your Qualification types.+cqtName :: Lens' CreateQualificationType Text+cqtName = lens _cqtName (\ s a -> s{_cqtName = a});++-- | A long description for the Qualification type. On the Amazon Mechanical Turk website, the long description is displayed when a Worker examines a Qualification type.+cqtDescription :: Lens' CreateQualificationType Text+cqtDescription = lens _cqtDescription (\ s a -> s{_cqtDescription = a});++-- | The initial status of the Qualification type. Constraints: Valid values are: Active | Inactive+cqtQualificationTypeStatus :: Lens' CreateQualificationType QualificationTypeStatus+cqtQualificationTypeStatus = lens _cqtQualificationTypeStatus (\ s a -> s{_cqtQualificationTypeStatus = a});++instance AWSRequest CreateQualificationType where+ type Rs CreateQualificationType =+ CreateQualificationTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ CreateQualificationTypeResponse' <$>+ (x .?> "QualificationType") <*> (pure (fromEnum s)))++instance Hashable CreateQualificationType where++instance NFData CreateQualificationType where++instance ToHeaders CreateQualificationType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.CreateQualificationType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateQualificationType where+ toJSON CreateQualificationType'{..}+ = object+ (catMaybes+ [("TestDurationInSeconds" .=) <$>+ _cqtTestDurationInSeconds,+ ("AnswerKey" .=) <$> _cqtAnswerKey,+ ("Test" .=) <$> _cqtTest,+ ("Keywords" .=) <$> _cqtKeywords,+ ("AutoGranted" .=) <$> _cqtAutoGranted,+ ("AutoGrantedValue" .=) <$> _cqtAutoGrantedValue,+ ("RetryDelayInSeconds" .=) <$>+ _cqtRetryDelayInSeconds,+ Just ("Name" .= _cqtName),+ Just ("Description" .= _cqtDescription),+ Just+ ("QualificationTypeStatus" .=+ _cqtQualificationTypeStatus)])++instance ToPath CreateQualificationType where+ toPath = const "/"++instance ToQuery CreateQualificationType where+ toQuery = const mempty++-- | /See:/ 'createQualificationTypeResponse' smart constructor.+data CreateQualificationTypeResponse = CreateQualificationTypeResponse'+ { _cqtrsQualificationType :: !(Maybe QualificationType)+ , _cqtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateQualificationTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cqtrsQualificationType' - The created Qualification type, returned as a QualificationType data structure.+--+-- * 'cqtrsResponseStatus' - -- | The response status code.+createQualificationTypeResponse+ :: Int -- ^ 'cqtrsResponseStatus'+ -> CreateQualificationTypeResponse+createQualificationTypeResponse pResponseStatus_ =+ CreateQualificationTypeResponse'+ {_cqtrsQualificationType = Nothing, _cqtrsResponseStatus = pResponseStatus_}+++-- | The created Qualification type, returned as a QualificationType data structure.+cqtrsQualificationType :: Lens' CreateQualificationTypeResponse (Maybe QualificationType)+cqtrsQualificationType = lens _cqtrsQualificationType (\ s a -> s{_cqtrsQualificationType = a});++-- | -- | The response status code.+cqtrsResponseStatus :: Lens' CreateQualificationTypeResponse Int+cqtrsResponseStatus = lens _cqtrsResponseStatus (\ s a -> s{_cqtrsResponseStatus = a});++instance NFData CreateQualificationTypeResponse where
+ gen/Network/AWS/MechanicalTurk/CreateWorkerBlock.hs view
@@ -0,0 +1,134 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.CreateWorkerBlock+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @CreateWorkerBlock@ operation allows you to prevent a Worker from working on your HITs. For example, you can block a Worker who is producing poor quality work. You can block up to 100,000 Workers.+--+--+module Network.AWS.MechanicalTurk.CreateWorkerBlock+ (+ -- * Creating a Request+ createWorkerBlock+ , CreateWorkerBlock+ -- * Request Lenses+ , cwbWorkerId+ , cwbReason++ -- * Destructuring the Response+ , createWorkerBlockResponse+ , CreateWorkerBlockResponse+ -- * Response Lenses+ , cwbrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createWorkerBlock' smart constructor.+data CreateWorkerBlock = CreateWorkerBlock'+ { _cwbWorkerId :: !Text+ , _cwbReason :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateWorkerBlock' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cwbWorkerId' - The ID of the Worker to block.+--+-- * 'cwbReason' - A message explaining the reason for blocking the Worker. This parameter enables you to keep track of your Workers. The Worker does not see this message.+createWorkerBlock+ :: Text -- ^ 'cwbWorkerId'+ -> Text -- ^ 'cwbReason'+ -> CreateWorkerBlock+createWorkerBlock pWorkerId_ pReason_ =+ CreateWorkerBlock' {_cwbWorkerId = pWorkerId_, _cwbReason = pReason_}+++-- | The ID of the Worker to block.+cwbWorkerId :: Lens' CreateWorkerBlock Text+cwbWorkerId = lens _cwbWorkerId (\ s a -> s{_cwbWorkerId = a});++-- | A message explaining the reason for blocking the Worker. This parameter enables you to keep track of your Workers. The Worker does not see this message.+cwbReason :: Lens' CreateWorkerBlock Text+cwbReason = lens _cwbReason (\ s a -> s{_cwbReason = a});++instance AWSRequest CreateWorkerBlock where+ type Rs CreateWorkerBlock = CreateWorkerBlockResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ CreateWorkerBlockResponse' <$> (pure (fromEnum s)))++instance Hashable CreateWorkerBlock where++instance NFData CreateWorkerBlock where++instance ToHeaders CreateWorkerBlock where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.CreateWorkerBlock"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateWorkerBlock where+ toJSON CreateWorkerBlock'{..}+ = object+ (catMaybes+ [Just ("WorkerId" .= _cwbWorkerId),+ Just ("Reason" .= _cwbReason)])++instance ToPath CreateWorkerBlock where+ toPath = const "/"++instance ToQuery CreateWorkerBlock where+ toQuery = const mempty++-- | /See:/ 'createWorkerBlockResponse' smart constructor.+newtype CreateWorkerBlockResponse = CreateWorkerBlockResponse'+ { _cwbrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateWorkerBlockResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cwbrsResponseStatus' - -- | The response status code.+createWorkerBlockResponse+ :: Int -- ^ 'cwbrsResponseStatus'+ -> CreateWorkerBlockResponse+createWorkerBlockResponse pResponseStatus_ =+ CreateWorkerBlockResponse' {_cwbrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+cwbrsResponseStatus :: Lens' CreateWorkerBlockResponse Int+cwbrsResponseStatus = lens _cwbrsResponseStatus (\ s a -> s{_cwbrsResponseStatus = a});++instance NFData CreateWorkerBlockResponse where
+ gen/Network/AWS/MechanicalTurk/DeleteHIT.hs view
@@ -0,0 +1,123 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.DeleteHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @DeleteHIT@ operation is used to delete HIT that is no longer needed. Only the Requester who created the HIT can delete it.+--+--+-- You can only dispose of HITs that are in the @Reviewable@ state, with all of their submitted assignments already either approved or rejected. If you call the DeleteHIT operation on a HIT that is not in the @Reviewable@ state (for example, that has not expired, or still has active assignments), or on a HIT that is Reviewable but without all of its submitted assignments already approved or rejected, the service will return an error.+--+module Network.AWS.MechanicalTurk.DeleteHIT+ (+ -- * Creating a Request+ deleteHIT+ , DeleteHIT+ -- * Request Lenses+ , dhitHITId++ -- * Destructuring the Response+ , deleteHITResponse+ , DeleteHITResponse+ -- * Response Lenses+ , dhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteHIT' smart constructor.+newtype DeleteHIT = DeleteHIT'+ { _dhitHITId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dhitHITId' - The ID of the HIT to be deleted.+deleteHIT+ :: Text -- ^ 'dhitHITId'+ -> DeleteHIT+deleteHIT pHITId_ = DeleteHIT' {_dhitHITId = pHITId_}+++-- | The ID of the HIT to be deleted.+dhitHITId :: Lens' DeleteHIT Text+dhitHITId = lens _dhitHITId (\ s a -> s{_dhitHITId = a});++instance AWSRequest DeleteHIT where+ type Rs DeleteHIT = DeleteHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ DeleteHITResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteHIT where++instance NFData DeleteHIT where++instance ToHeaders DeleteHIT where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.DeleteHIT" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteHIT where+ toJSON DeleteHIT'{..}+ = object (catMaybes [Just ("HITId" .= _dhitHITId)])++instance ToPath DeleteHIT where+ toPath = const "/"++instance ToQuery DeleteHIT where+ toQuery = const mempty++-- | /See:/ 'deleteHITResponse' smart constructor.+newtype DeleteHITResponse = DeleteHITResponse'+ { _dhitrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dhitrsResponseStatus' - -- | The response status code.+deleteHITResponse+ :: Int -- ^ 'dhitrsResponseStatus'+ -> DeleteHITResponse+deleteHITResponse pResponseStatus_ =+ DeleteHITResponse' {_dhitrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dhitrsResponseStatus :: Lens' DeleteHITResponse Int+dhitrsResponseStatus = lens _dhitrsResponseStatus (\ s a -> s{_dhitrsResponseStatus = a});++instance NFData DeleteHITResponse where
+ gen/Network/AWS/MechanicalTurk/DeleteQualificationType.hs view
@@ -0,0 +1,129 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.DeleteQualificationType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @DeleteQualificationType@ deletes a Qualification type and deletes any HIT types that are associated with the Qualification type.+--+--+-- This operation does not revoke Qualifications already assigned to Workers because the Qualifications might be needed for active HITs. If there are any pending requests for the Qualification type, Amazon Mechanical Turk rejects those requests. After you delete a Qualification type, you can no longer use it to create HITs or HIT types.+--+module Network.AWS.MechanicalTurk.DeleteQualificationType+ (+ -- * Creating a Request+ deleteQualificationType+ , DeleteQualificationType+ -- * Request Lenses+ , dqtQualificationTypeId++ -- * Destructuring the Response+ , deleteQualificationTypeResponse+ , DeleteQualificationTypeResponse+ -- * Response Lenses+ , dqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteQualificationType' smart constructor.+newtype DeleteQualificationType = DeleteQualificationType'+ { _dqtQualificationTypeId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteQualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dqtQualificationTypeId' - The ID of the QualificationType to dispose.+deleteQualificationType+ :: Text -- ^ 'dqtQualificationTypeId'+ -> DeleteQualificationType+deleteQualificationType pQualificationTypeId_ =+ DeleteQualificationType' {_dqtQualificationTypeId = pQualificationTypeId_}+++-- | The ID of the QualificationType to dispose.+dqtQualificationTypeId :: Lens' DeleteQualificationType Text+dqtQualificationTypeId = lens _dqtQualificationTypeId (\ s a -> s{_dqtQualificationTypeId = a});++instance AWSRequest DeleteQualificationType where+ type Rs DeleteQualificationType =+ DeleteQualificationTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ DeleteQualificationTypeResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeleteQualificationType where++instance NFData DeleteQualificationType where++instance ToHeaders DeleteQualificationType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.DeleteQualificationType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteQualificationType where+ toJSON DeleteQualificationType'{..}+ = object+ (catMaybes+ [Just+ ("QualificationTypeId" .= _dqtQualificationTypeId)])++instance ToPath DeleteQualificationType where+ toPath = const "/"++instance ToQuery DeleteQualificationType where+ toQuery = const mempty++-- | /See:/ 'deleteQualificationTypeResponse' smart constructor.+newtype DeleteQualificationTypeResponse = DeleteQualificationTypeResponse'+ { _dqtrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteQualificationTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dqtrsResponseStatus' - -- | The response status code.+deleteQualificationTypeResponse+ :: Int -- ^ 'dqtrsResponseStatus'+ -> DeleteQualificationTypeResponse+deleteQualificationTypeResponse pResponseStatus_ =+ DeleteQualificationTypeResponse' {_dqtrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dqtrsResponseStatus :: Lens' DeleteQualificationTypeResponse Int+dqtrsResponseStatus = lens _dqtrsResponseStatus (\ s a -> s{_dqtrsResponseStatus = a});++instance NFData DeleteQualificationTypeResponse where
+ gen/Network/AWS/MechanicalTurk/DeleteWorkerBlock.hs view
@@ -0,0 +1,133 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.DeleteWorkerBlock+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @DeleteWorkerBlock@ operation allows you to reinstate a blocked Worker to work on your HITs. This operation reverses the effects of the CreateWorkerBlock operation. You need the Worker ID to use this operation. If the Worker ID is missing or invalid, this operation fails and returns the message “WorkerId is invalid.” If the specified Worker is not blocked, this operation returns successfully.+--+--+module Network.AWS.MechanicalTurk.DeleteWorkerBlock+ (+ -- * Creating a Request+ deleteWorkerBlock+ , DeleteWorkerBlock+ -- * Request Lenses+ , dwbReason+ , dwbWorkerId++ -- * Destructuring the Response+ , deleteWorkerBlockResponse+ , DeleteWorkerBlockResponse+ -- * Response Lenses+ , dwbrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteWorkerBlock' smart constructor.+data DeleteWorkerBlock = DeleteWorkerBlock'+ { _dwbReason :: !(Maybe Text)+ , _dwbWorkerId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteWorkerBlock' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dwbReason' - A message that explains the reason for unblocking the Worker. The Worker does not see this message.+--+-- * 'dwbWorkerId' - The ID of the Worker to unblock.+deleteWorkerBlock+ :: Text -- ^ 'dwbWorkerId'+ -> DeleteWorkerBlock+deleteWorkerBlock pWorkerId_ =+ DeleteWorkerBlock' {_dwbReason = Nothing, _dwbWorkerId = pWorkerId_}+++-- | A message that explains the reason for unblocking the Worker. The Worker does not see this message.+dwbReason :: Lens' DeleteWorkerBlock (Maybe Text)+dwbReason = lens _dwbReason (\ s a -> s{_dwbReason = a});++-- | The ID of the Worker to unblock.+dwbWorkerId :: Lens' DeleteWorkerBlock Text+dwbWorkerId = lens _dwbWorkerId (\ s a -> s{_dwbWorkerId = a});++instance AWSRequest DeleteWorkerBlock where+ type Rs DeleteWorkerBlock = DeleteWorkerBlockResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ DeleteWorkerBlockResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteWorkerBlock where++instance NFData DeleteWorkerBlock where++instance ToHeaders DeleteWorkerBlock where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.DeleteWorkerBlock"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteWorkerBlock where+ toJSON DeleteWorkerBlock'{..}+ = object+ (catMaybes+ [("Reason" .=) <$> _dwbReason,+ Just ("WorkerId" .= _dwbWorkerId)])++instance ToPath DeleteWorkerBlock where+ toPath = const "/"++instance ToQuery DeleteWorkerBlock where+ toQuery = const mempty++-- | /See:/ 'deleteWorkerBlockResponse' smart constructor.+newtype DeleteWorkerBlockResponse = DeleteWorkerBlockResponse'+ { _dwbrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteWorkerBlockResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dwbrsResponseStatus' - -- | The response status code.+deleteWorkerBlockResponse+ :: Int -- ^ 'dwbrsResponseStatus'+ -> DeleteWorkerBlockResponse+deleteWorkerBlockResponse pResponseStatus_ =+ DeleteWorkerBlockResponse' {_dwbrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dwbrsResponseStatus :: Lens' DeleteWorkerBlockResponse Int+dwbrsResponseStatus = lens _dwbrsResponseStatus (\ s a -> s{_dwbrsResponseStatus = a});++instance NFData DeleteWorkerBlockResponse where
+ gen/Network/AWS/MechanicalTurk/DisassociateQualificationFromWorker.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.DisassociateQualificationFromWorker+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @DisassociateQualificationFromWorker@ revokes a previously granted Qualification from a user.+--+--+-- You can provide a text message explaining why the Qualification was revoked. The user who had the Qualification can see this message.+--+module Network.AWS.MechanicalTurk.DisassociateQualificationFromWorker+ (+ -- * Creating a Request+ disassociateQualificationFromWorker+ , DisassociateQualificationFromWorker+ -- * Request Lenses+ , dqfwReason+ , dqfwWorkerId+ , dqfwQualificationTypeId++ -- * Destructuring the Response+ , disassociateQualificationFromWorkerResponse+ , DisassociateQualificationFromWorkerResponse+ -- * Response Lenses+ , dqfwrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'disassociateQualificationFromWorker' smart constructor.+data DisassociateQualificationFromWorker = DisassociateQualificationFromWorker'+ { _dqfwReason :: !(Maybe Text)+ , _dqfwWorkerId :: !Text+ , _dqfwQualificationTypeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisassociateQualificationFromWorker' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dqfwReason' - A text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.+--+-- * 'dqfwWorkerId' - The ID of the Worker who possesses the Qualification to be revoked.+--+-- * 'dqfwQualificationTypeId' - The ID of the Qualification type of the Qualification to be revoked.+disassociateQualificationFromWorker+ :: Text -- ^ 'dqfwWorkerId'+ -> Text -- ^ 'dqfwQualificationTypeId'+ -> DisassociateQualificationFromWorker+disassociateQualificationFromWorker pWorkerId_ pQualificationTypeId_ =+ DisassociateQualificationFromWorker'+ { _dqfwReason = Nothing+ , _dqfwWorkerId = pWorkerId_+ , _dqfwQualificationTypeId = pQualificationTypeId_+ }+++-- | A text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.+dqfwReason :: Lens' DisassociateQualificationFromWorker (Maybe Text)+dqfwReason = lens _dqfwReason (\ s a -> s{_dqfwReason = a});++-- | The ID of the Worker who possesses the Qualification to be revoked.+dqfwWorkerId :: Lens' DisassociateQualificationFromWorker Text+dqfwWorkerId = lens _dqfwWorkerId (\ s a -> s{_dqfwWorkerId = a});++-- | The ID of the Qualification type of the Qualification to be revoked.+dqfwQualificationTypeId :: Lens' DisassociateQualificationFromWorker Text+dqfwQualificationTypeId = lens _dqfwQualificationTypeId (\ s a -> s{_dqfwQualificationTypeId = a});++instance AWSRequest+ DisassociateQualificationFromWorker+ where+ type Rs DisassociateQualificationFromWorker =+ DisassociateQualificationFromWorkerResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ DisassociateQualificationFromWorkerResponse' <$>+ (pure (fromEnum s)))++instance Hashable DisassociateQualificationFromWorker+ where++instance NFData DisassociateQualificationFromWorker+ where++instance ToHeaders+ DisassociateQualificationFromWorker+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.DisassociateQualificationFromWorker"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DisassociateQualificationFromWorker+ where+ toJSON DisassociateQualificationFromWorker'{..}+ = object+ (catMaybes+ [("Reason" .=) <$> _dqfwReason,+ Just ("WorkerId" .= _dqfwWorkerId),+ Just+ ("QualificationTypeId" .= _dqfwQualificationTypeId)])++instance ToPath DisassociateQualificationFromWorker+ where+ toPath = const "/"++instance ToQuery DisassociateQualificationFromWorker+ where+ toQuery = const mempty++-- | /See:/ 'disassociateQualificationFromWorkerResponse' smart constructor.+newtype DisassociateQualificationFromWorkerResponse = DisassociateQualificationFromWorkerResponse'+ { _dqfwrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisassociateQualificationFromWorkerResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dqfwrsResponseStatus' - -- | The response status code.+disassociateQualificationFromWorkerResponse+ :: Int -- ^ 'dqfwrsResponseStatus'+ -> DisassociateQualificationFromWorkerResponse+disassociateQualificationFromWorkerResponse pResponseStatus_ =+ DisassociateQualificationFromWorkerResponse'+ {_dqfwrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dqfwrsResponseStatus :: Lens' DisassociateQualificationFromWorkerResponse Int+dqfwrsResponseStatus = lens _dqfwrsResponseStatus (\ s a -> s{_dqfwrsResponseStatus = a});++instance NFData+ DisassociateQualificationFromWorkerResponse+ where
+ gen/Network/AWS/MechanicalTurk/GetAccountBalance.hs view
@@ -0,0 +1,133 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.GetAccountBalance+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @GetAccountBalance@ operation retrieves the amount of money in your Amazon Mechanical Turk account.+--+--+module Network.AWS.MechanicalTurk.GetAccountBalance+ (+ -- * Creating a Request+ getAccountBalance+ , GetAccountBalance++ -- * Destructuring the Response+ , getAccountBalanceResponse+ , GetAccountBalanceResponse+ -- * Response Lenses+ , gabrsAvailableBalance+ , gabrsOnHoldBalance+ , gabrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getAccountBalance' smart constructor.+data GetAccountBalance =+ GetAccountBalance'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetAccountBalance' with the minimum fields required to make a request.+--+getAccountBalance+ :: GetAccountBalance+getAccountBalance = GetAccountBalance'+++instance AWSRequest GetAccountBalance where+ type Rs GetAccountBalance = GetAccountBalanceResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ GetAccountBalanceResponse' <$>+ (x .?> "AvailableBalance") <*>+ (x .?> "OnHoldBalance")+ <*> (pure (fromEnum s)))++instance Hashable GetAccountBalance where++instance NFData GetAccountBalance where++instance ToHeaders GetAccountBalance where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.GetAccountBalance"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetAccountBalance where+ toJSON = const (Object mempty)++instance ToPath GetAccountBalance where+ toPath = const "/"++instance ToQuery GetAccountBalance where+ toQuery = const mempty++-- | /See:/ 'getAccountBalanceResponse' smart constructor.+data GetAccountBalanceResponse = GetAccountBalanceResponse'+ { _gabrsAvailableBalance :: !(Maybe Text)+ , _gabrsOnHoldBalance :: !(Maybe Text)+ , _gabrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetAccountBalanceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gabrsAvailableBalance' - Undocumented member.+--+-- * 'gabrsOnHoldBalance' - Undocumented member.+--+-- * 'gabrsResponseStatus' - -- | The response status code.+getAccountBalanceResponse+ :: Int -- ^ 'gabrsResponseStatus'+ -> GetAccountBalanceResponse+getAccountBalanceResponse pResponseStatus_ =+ GetAccountBalanceResponse'+ { _gabrsAvailableBalance = Nothing+ , _gabrsOnHoldBalance = Nothing+ , _gabrsResponseStatus = pResponseStatus_+ }+++-- | Undocumented member.+gabrsAvailableBalance :: Lens' GetAccountBalanceResponse (Maybe Text)+gabrsAvailableBalance = lens _gabrsAvailableBalance (\ s a -> s{_gabrsAvailableBalance = a});++-- | Undocumented member.+gabrsOnHoldBalance :: Lens' GetAccountBalanceResponse (Maybe Text)+gabrsOnHoldBalance = lens _gabrsOnHoldBalance (\ s a -> s{_gabrsOnHoldBalance = a});++-- | -- | The response status code.+gabrsResponseStatus :: Lens' GetAccountBalanceResponse Int+gabrsResponseStatus = lens _gabrsResponseStatus (\ s a -> s{_gabrsResponseStatus = a});++instance NFData GetAccountBalanceResponse where
+ gen/Network/AWS/MechanicalTurk/GetAssignment.hs view
@@ -0,0 +1,145 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.GetAssignment+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @GetAssignment@ operation retrieves the details of the specified Assignment.+--+--+module Network.AWS.MechanicalTurk.GetAssignment+ (+ -- * Creating a Request+ getAssignment+ , GetAssignment+ -- * Request Lenses+ , gaAssignmentId++ -- * Destructuring the Response+ , getAssignmentResponse+ , GetAssignmentResponse+ -- * Response Lenses+ , garsHIT+ , garsAssignment+ , garsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getAssignment' smart constructor.+newtype GetAssignment = GetAssignment'+ { _gaAssignmentId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetAssignment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gaAssignmentId' - The ID of the Assignment to be retrieved.+getAssignment+ :: Text -- ^ 'gaAssignmentId'+ -> GetAssignment+getAssignment pAssignmentId_ = GetAssignment' {_gaAssignmentId = pAssignmentId_}+++-- | The ID of the Assignment to be retrieved.+gaAssignmentId :: Lens' GetAssignment Text+gaAssignmentId = lens _gaAssignmentId (\ s a -> s{_gaAssignmentId = a});++instance AWSRequest GetAssignment where+ type Rs GetAssignment = GetAssignmentResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ GetAssignmentResponse' <$>+ (x .?> "HIT") <*> (x .?> "Assignment") <*>+ (pure (fromEnum s)))++instance Hashable GetAssignment where++instance NFData GetAssignment where++instance ToHeaders GetAssignment where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.GetAssignment" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetAssignment where+ toJSON GetAssignment'{..}+ = object+ (catMaybes+ [Just ("AssignmentId" .= _gaAssignmentId)])++instance ToPath GetAssignment where+ toPath = const "/"++instance ToQuery GetAssignment where+ toQuery = const mempty++-- | /See:/ 'getAssignmentResponse' smart constructor.+data GetAssignmentResponse = GetAssignmentResponse'+ { _garsHIT :: !(Maybe HIT)+ , _garsAssignment :: !(Maybe Assignment)+ , _garsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetAssignmentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'garsHIT' - The HIT associated with this assignment. The response includes one HIT element.+--+-- * 'garsAssignment' - The assignment. The response includes one Assignment element.+--+-- * 'garsResponseStatus' - -- | The response status code.+getAssignmentResponse+ :: Int -- ^ 'garsResponseStatus'+ -> GetAssignmentResponse+getAssignmentResponse pResponseStatus_ =+ GetAssignmentResponse'+ { _garsHIT = Nothing+ , _garsAssignment = Nothing+ , _garsResponseStatus = pResponseStatus_+ }+++-- | The HIT associated with this assignment. The response includes one HIT element.+garsHIT :: Lens' GetAssignmentResponse (Maybe HIT)+garsHIT = lens _garsHIT (\ s a -> s{_garsHIT = a});++-- | The assignment. The response includes one Assignment element.+garsAssignment :: Lens' GetAssignmentResponse (Maybe Assignment)+garsAssignment = lens _garsAssignment (\ s a -> s{_garsAssignment = a});++-- | -- | The response status code.+garsResponseStatus :: Lens' GetAssignmentResponse Int+garsResponseStatus = lens _garsResponseStatus (\ s a -> s{_garsResponseStatus = a});++instance NFData GetAssignmentResponse where
+ gen/Network/AWS/MechanicalTurk/GetFileUploadURL.hs view
@@ -0,0 +1,148 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.GetFileUploadURL+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @GetFileUploadURL@ operation generates and returns a temporary URL. You use the temporary URL to retrieve a file uploaded by a Worker as an answer to a FileUploadAnswer question for a HIT. The temporary URL is generated the instant the GetFileUploadURL operation is called, and is valid for 60 seconds. You can get a temporary file upload URL any time until the HIT is disposed. After the HIT is disposed, any uploaded files are deleted, and cannot be retrieved.+--+--+module Network.AWS.MechanicalTurk.GetFileUploadURL+ (+ -- * Creating a Request+ getFileUploadURL+ , GetFileUploadURL+ -- * Request Lenses+ , gfuuAssignmentId+ , gfuuQuestionIdentifier++ -- * Destructuring the Response+ , getFileUploadURLResponse+ , GetFileUploadURLResponse+ -- * Response Lenses+ , gfuursFileUploadURL+ , gfuursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getFileUploadURL' smart constructor.+data GetFileUploadURL = GetFileUploadURL'+ { _gfuuAssignmentId :: !Text+ , _gfuuQuestionIdentifier :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetFileUploadURL' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gfuuAssignmentId' - The ID of the assignment that contains the question with a FileUploadAnswer.+--+-- * 'gfuuQuestionIdentifier' - The identifier of the question with a FileUploadAnswer, as specified in the QuestionForm of the HIT.+getFileUploadURL+ :: Text -- ^ 'gfuuAssignmentId'+ -> Text -- ^ 'gfuuQuestionIdentifier'+ -> GetFileUploadURL+getFileUploadURL pAssignmentId_ pQuestionIdentifier_ =+ GetFileUploadURL'+ { _gfuuAssignmentId = pAssignmentId_+ , _gfuuQuestionIdentifier = pQuestionIdentifier_+ }+++-- | The ID of the assignment that contains the question with a FileUploadAnswer.+gfuuAssignmentId :: Lens' GetFileUploadURL Text+gfuuAssignmentId = lens _gfuuAssignmentId (\ s a -> s{_gfuuAssignmentId = a});++-- | The identifier of the question with a FileUploadAnswer, as specified in the QuestionForm of the HIT.+gfuuQuestionIdentifier :: Lens' GetFileUploadURL Text+gfuuQuestionIdentifier = lens _gfuuQuestionIdentifier (\ s a -> s{_gfuuQuestionIdentifier = a});++instance AWSRequest GetFileUploadURL where+ type Rs GetFileUploadURL = GetFileUploadURLResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ GetFileUploadURLResponse' <$>+ (x .?> "FileUploadURL") <*> (pure (fromEnum s)))++instance Hashable GetFileUploadURL where++instance NFData GetFileUploadURL where++instance ToHeaders GetFileUploadURL where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.GetFileUploadURL" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetFileUploadURL where+ toJSON GetFileUploadURL'{..}+ = object+ (catMaybes+ [Just ("AssignmentId" .= _gfuuAssignmentId),+ Just+ ("QuestionIdentifier" .= _gfuuQuestionIdentifier)])++instance ToPath GetFileUploadURL where+ toPath = const "/"++instance ToQuery GetFileUploadURL where+ toQuery = const mempty++-- | /See:/ 'getFileUploadURLResponse' smart constructor.+data GetFileUploadURLResponse = GetFileUploadURLResponse'+ { _gfuursFileUploadURL :: !(Maybe Text)+ , _gfuursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetFileUploadURLResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gfuursFileUploadURL' - A temporary URL for the file that the Worker uploaded for the answer.+--+-- * 'gfuursResponseStatus' - -- | The response status code.+getFileUploadURLResponse+ :: Int -- ^ 'gfuursResponseStatus'+ -> GetFileUploadURLResponse+getFileUploadURLResponse pResponseStatus_ =+ GetFileUploadURLResponse'+ {_gfuursFileUploadURL = Nothing, _gfuursResponseStatus = pResponseStatus_}+++-- | A temporary URL for the file that the Worker uploaded for the answer.+gfuursFileUploadURL :: Lens' GetFileUploadURLResponse (Maybe Text)+gfuursFileUploadURL = lens _gfuursFileUploadURL (\ s a -> s{_gfuursFileUploadURL = a});++-- | -- | The response status code.+gfuursResponseStatus :: Lens' GetFileUploadURLResponse Int+gfuursResponseStatus = lens _gfuursResponseStatus (\ s a -> s{_gfuursResponseStatus = a});++instance NFData GetFileUploadURLResponse where
+ gen/Network/AWS/MechanicalTurk/GetHIT.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.GetHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @GetHIT@ operation retrieves the details of the specified HIT.+--+--+module Network.AWS.MechanicalTurk.GetHIT+ (+ -- * Creating a Request+ getHIT+ , GetHIT+ -- * Request Lenses+ , ghitHITId++ -- * Destructuring the Response+ , getHITResponse+ , GetHITResponse+ -- * Response Lenses+ , ghitrsHIT+ , ghitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getHIT' smart constructor.+newtype GetHIT = GetHIT'+ { _ghitHITId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ghitHITId' - The ID of the HIT to be retrieved.+getHIT+ :: Text -- ^ 'ghitHITId'+ -> GetHIT+getHIT pHITId_ = GetHIT' {_ghitHITId = pHITId_}+++-- | The ID of the HIT to be retrieved.+ghitHITId :: Lens' GetHIT Text+ghitHITId = lens _ghitHITId (\ s a -> s{_ghitHITId = a});++instance AWSRequest GetHIT where+ type Rs GetHIT = GetHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ GetHITResponse' <$>+ (x .?> "HIT") <*> (pure (fromEnum s)))++instance Hashable GetHIT where++instance NFData GetHIT where++instance ToHeaders GetHIT where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.GetHIT" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetHIT where+ toJSON GetHIT'{..}+ = object (catMaybes [Just ("HITId" .= _ghitHITId)])++instance ToPath GetHIT where+ toPath = const "/"++instance ToQuery GetHIT where+ toQuery = const mempty++-- | /See:/ 'getHITResponse' smart constructor.+data GetHITResponse = GetHITResponse'+ { _ghitrsHIT :: !(Maybe HIT)+ , _ghitrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ghitrsHIT' - Contains the requested HIT data.+--+-- * 'ghitrsResponseStatus' - -- | The response status code.+getHITResponse+ :: Int -- ^ 'ghitrsResponseStatus'+ -> GetHITResponse+getHITResponse pResponseStatus_ =+ GetHITResponse'+ {_ghitrsHIT = Nothing, _ghitrsResponseStatus = pResponseStatus_}+++-- | Contains the requested HIT data.+ghitrsHIT :: Lens' GetHITResponse (Maybe HIT)+ghitrsHIT = lens _ghitrsHIT (\ s a -> s{_ghitrsHIT = a});++-- | -- | The response status code.+ghitrsResponseStatus :: Lens' GetHITResponse Int+ghitrsResponseStatus = lens _ghitrsResponseStatus (\ s a -> s{_ghitrsResponseStatus = a});++instance NFData GetHITResponse where
+ gen/Network/AWS/MechanicalTurk/GetQualificationScore.hs view
@@ -0,0 +1,151 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.GetQualificationScore+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @GetQualificationScore@ operation returns the value of a Worker's Qualification for a given Qualification type.+--+--+-- To get a Worker's Qualification, you must know the Worker's ID. The Worker's ID is included in the assignment data returned by the @ListAssignmentsForHIT@ operation.+--+-- Only the owner of a Qualification type can query the value of a Worker's Qualification of that type.+--+module Network.AWS.MechanicalTurk.GetQualificationScore+ (+ -- * Creating a Request+ getQualificationScore+ , GetQualificationScore+ -- * Request Lenses+ , gqsQualificationTypeId+ , gqsWorkerId++ -- * Destructuring the Response+ , getQualificationScoreResponse+ , GetQualificationScoreResponse+ -- * Response Lenses+ , gqsrsQualification+ , gqsrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getQualificationScore' smart constructor.+data GetQualificationScore = GetQualificationScore'+ { _gqsQualificationTypeId :: !Text+ , _gqsWorkerId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQualificationScore' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqsQualificationTypeId' - The ID of the QualificationType.+--+-- * 'gqsWorkerId' - The ID of the Worker whose Qualification is being updated.+getQualificationScore+ :: Text -- ^ 'gqsQualificationTypeId'+ -> Text -- ^ 'gqsWorkerId'+ -> GetQualificationScore+getQualificationScore pQualificationTypeId_ pWorkerId_ =+ GetQualificationScore'+ {_gqsQualificationTypeId = pQualificationTypeId_, _gqsWorkerId = pWorkerId_}+++-- | The ID of the QualificationType.+gqsQualificationTypeId :: Lens' GetQualificationScore Text+gqsQualificationTypeId = lens _gqsQualificationTypeId (\ s a -> s{_gqsQualificationTypeId = a});++-- | The ID of the Worker whose Qualification is being updated.+gqsWorkerId :: Lens' GetQualificationScore Text+gqsWorkerId = lens _gqsWorkerId (\ s a -> s{_gqsWorkerId = a});++instance AWSRequest GetQualificationScore where+ type Rs GetQualificationScore =+ GetQualificationScoreResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ GetQualificationScoreResponse' <$>+ (x .?> "Qualification") <*> (pure (fromEnum s)))++instance Hashable GetQualificationScore where++instance NFData GetQualificationScore where++instance ToHeaders GetQualificationScore where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.GetQualificationScore"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetQualificationScore where+ toJSON GetQualificationScore'{..}+ = object+ (catMaybes+ [Just+ ("QualificationTypeId" .= _gqsQualificationTypeId),+ Just ("WorkerId" .= _gqsWorkerId)])++instance ToPath GetQualificationScore where+ toPath = const "/"++instance ToQuery GetQualificationScore where+ toQuery = const mempty++-- | /See:/ 'getQualificationScoreResponse' smart constructor.+data GetQualificationScoreResponse = GetQualificationScoreResponse'+ { _gqsrsQualification :: !(Maybe Qualification)+ , _gqsrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQualificationScoreResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqsrsQualification' - The Qualification data structure of the Qualification assigned to a user, including the Qualification type and the value (score).+--+-- * 'gqsrsResponseStatus' - -- | The response status code.+getQualificationScoreResponse+ :: Int -- ^ 'gqsrsResponseStatus'+ -> GetQualificationScoreResponse+getQualificationScoreResponse pResponseStatus_ =+ GetQualificationScoreResponse'+ {_gqsrsQualification = Nothing, _gqsrsResponseStatus = pResponseStatus_}+++-- | The Qualification data structure of the Qualification assigned to a user, including the Qualification type and the value (score).+gqsrsQualification :: Lens' GetQualificationScoreResponse (Maybe Qualification)+gqsrsQualification = lens _gqsrsQualification (\ s a -> s{_gqsrsQualification = a});++-- | -- | The response status code.+gqsrsResponseStatus :: Lens' GetQualificationScoreResponse Int+gqsrsResponseStatus = lens _gqsrsResponseStatus (\ s a -> s{_gqsrsResponseStatus = a});++instance NFData GetQualificationScoreResponse where
+ gen/Network/AWS/MechanicalTurk/GetQualificationType.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.GetQualificationType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @GetQualificationType@ operation retrieves information about a Qualification type using its ID.+--+--+module Network.AWS.MechanicalTurk.GetQualificationType+ (+ -- * Creating a Request+ getQualificationType+ , GetQualificationType+ -- * Request Lenses+ , gqtQualificationTypeId++ -- * Destructuring the Response+ , getQualificationTypeResponse+ , GetQualificationTypeResponse+ -- * Response Lenses+ , gqtrsQualificationType+ , gqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getQualificationType' smart constructor.+newtype GetQualificationType = GetQualificationType'+ { _gqtQualificationTypeId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqtQualificationTypeId' - The ID of the QualificationType.+getQualificationType+ :: Text -- ^ 'gqtQualificationTypeId'+ -> GetQualificationType+getQualificationType pQualificationTypeId_ =+ GetQualificationType' {_gqtQualificationTypeId = pQualificationTypeId_}+++-- | The ID of the QualificationType.+gqtQualificationTypeId :: Lens' GetQualificationType Text+gqtQualificationTypeId = lens _gqtQualificationTypeId (\ s a -> s{_gqtQualificationTypeId = a});++instance AWSRequest GetQualificationType where+ type Rs GetQualificationType =+ GetQualificationTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ GetQualificationTypeResponse' <$>+ (x .?> "QualificationType") <*> (pure (fromEnum s)))++instance Hashable GetQualificationType where++instance NFData GetQualificationType where++instance ToHeaders GetQualificationType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.GetQualificationType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetQualificationType where+ toJSON GetQualificationType'{..}+ = object+ (catMaybes+ [Just+ ("QualificationTypeId" .= _gqtQualificationTypeId)])++instance ToPath GetQualificationType where+ toPath = const "/"++instance ToQuery GetQualificationType where+ toQuery = const mempty++-- | /See:/ 'getQualificationTypeResponse' smart constructor.+data GetQualificationTypeResponse = GetQualificationTypeResponse'+ { _gqtrsQualificationType :: !(Maybe QualificationType)+ , _gqtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQualificationTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqtrsQualificationType' - The returned Qualification Type+--+-- * 'gqtrsResponseStatus' - -- | The response status code.+getQualificationTypeResponse+ :: Int -- ^ 'gqtrsResponseStatus'+ -> GetQualificationTypeResponse+getQualificationTypeResponse pResponseStatus_ =+ GetQualificationTypeResponse'+ {_gqtrsQualificationType = Nothing, _gqtrsResponseStatus = pResponseStatus_}+++-- | The returned Qualification Type+gqtrsQualificationType :: Lens' GetQualificationTypeResponse (Maybe QualificationType)+gqtrsQualificationType = lens _gqtrsQualificationType (\ s a -> s{_gqtrsQualificationType = a});++-- | -- | The response status code.+gqtrsResponseStatus :: Lens' GetQualificationTypeResponse Int+gqtrsResponseStatus = lens _gqtrsResponseStatus (\ s a -> s{_gqtrsResponseStatus = a});++instance NFData GetQualificationTypeResponse where
+ gen/Network/AWS/MechanicalTurk/ListAssignmentsForHIT.hs view
@@ -0,0 +1,198 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListAssignmentsForHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListAssignmentsForHIT@ operation retrieves completed assignments for a HIT. You can use this operation to retrieve the results for a HIT.+--+--+-- You can get assignments for a HIT at any time, even if the HIT is not yet Reviewable. If a HIT requested multiple assignments, and has received some results but has not yet become Reviewable, you can still retrieve the partial results with this operation.+--+-- Use the AssignmentStatus parameter to control which set of assignments for a HIT are returned. The ListAssignmentsForHIT operation can return submitted assignments awaiting approval, or it can return assignments that have already been approved or rejected. You can set AssignmentStatus=Approved,Rejected to get assignments that have already been approved and rejected together in one result set.+--+-- Only the Requester who created the HIT can retrieve the assignments for that HIT.+--+-- Results are sorted and divided into numbered pages and the operation returns a single page of results. You can use the parameters of the operation to control sorting and pagination.+--+module Network.AWS.MechanicalTurk.ListAssignmentsForHIT+ (+ -- * Creating a Request+ listAssignmentsForHIT+ , ListAssignmentsForHIT+ -- * Request Lenses+ , lafhitAssignmentStatuses+ , lafhitNextToken+ , lafhitMaxResults+ , lafhitHITId++ -- * Destructuring the Response+ , listAssignmentsForHITResponse+ , ListAssignmentsForHITResponse+ -- * Response Lenses+ , lafhitrsNextToken+ , lafhitrsNumResults+ , lafhitrsAssignments+ , lafhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listAssignmentsForHIT' smart constructor.+data ListAssignmentsForHIT = ListAssignmentsForHIT'+ { _lafhitAssignmentStatuses :: !(Maybe [AssignmentStatus])+ , _lafhitNextToken :: !(Maybe Text)+ , _lafhitMaxResults :: !(Maybe Nat)+ , _lafhitHITId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAssignmentsForHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lafhitAssignmentStatuses' - The status of the assignments to return: Submitted | Approved | Rejected+--+-- * 'lafhitNextToken' - Pagination token+--+-- * 'lafhitMaxResults' - Undocumented member.+--+-- * 'lafhitHITId' - The ID of the HIT.+listAssignmentsForHIT+ :: Text -- ^ 'lafhitHITId'+ -> ListAssignmentsForHIT+listAssignmentsForHIT pHITId_ =+ ListAssignmentsForHIT'+ { _lafhitAssignmentStatuses = Nothing+ , _lafhitNextToken = Nothing+ , _lafhitMaxResults = Nothing+ , _lafhitHITId = pHITId_+ }+++-- | The status of the assignments to return: Submitted | Approved | Rejected+lafhitAssignmentStatuses :: Lens' ListAssignmentsForHIT [AssignmentStatus]+lafhitAssignmentStatuses = lens _lafhitAssignmentStatuses (\ s a -> s{_lafhitAssignmentStatuses = a}) . _Default . _Coerce;++-- | Pagination token+lafhitNextToken :: Lens' ListAssignmentsForHIT (Maybe Text)+lafhitNextToken = lens _lafhitNextToken (\ s a -> s{_lafhitNextToken = a});++-- | Undocumented member.+lafhitMaxResults :: Lens' ListAssignmentsForHIT (Maybe Natural)+lafhitMaxResults = lens _lafhitMaxResults (\ s a -> s{_lafhitMaxResults = a}) . mapping _Nat;++-- | The ID of the HIT.+lafhitHITId :: Lens' ListAssignmentsForHIT Text+lafhitHITId = lens _lafhitHITId (\ s a -> s{_lafhitHITId = a});++instance AWSRequest ListAssignmentsForHIT where+ type Rs ListAssignmentsForHIT =+ ListAssignmentsForHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListAssignmentsForHITResponse' <$>+ (x .?> "NextToken") <*> (x .?> "NumResults") <*>+ (x .?> "Assignments" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListAssignmentsForHIT where++instance NFData ListAssignmentsForHIT where++instance ToHeaders ListAssignmentsForHIT where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListAssignmentsForHIT"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListAssignmentsForHIT where+ toJSON ListAssignmentsForHIT'{..}+ = object+ (catMaybes+ [("AssignmentStatuses" .=) <$>+ _lafhitAssignmentStatuses,+ ("NextToken" .=) <$> _lafhitNextToken,+ ("MaxResults" .=) <$> _lafhitMaxResults,+ Just ("HITId" .= _lafhitHITId)])++instance ToPath ListAssignmentsForHIT where+ toPath = const "/"++instance ToQuery ListAssignmentsForHIT where+ toQuery = const mempty++-- | /See:/ 'listAssignmentsForHITResponse' smart constructor.+data ListAssignmentsForHITResponse = ListAssignmentsForHITResponse'+ { _lafhitrsNextToken :: !(Maybe Text)+ , _lafhitrsNumResults :: !(Maybe Int)+ , _lafhitrsAssignments :: !(Maybe [Assignment])+ , _lafhitrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAssignmentsForHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lafhitrsNextToken' - Undocumented member.+--+-- * 'lafhitrsNumResults' - The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.+--+-- * 'lafhitrsAssignments' - The collection of Assignment data structures returned by this call.+--+-- * 'lafhitrsResponseStatus' - -- | The response status code.+listAssignmentsForHITResponse+ :: Int -- ^ 'lafhitrsResponseStatus'+ -> ListAssignmentsForHITResponse+listAssignmentsForHITResponse pResponseStatus_ =+ ListAssignmentsForHITResponse'+ { _lafhitrsNextToken = Nothing+ , _lafhitrsNumResults = Nothing+ , _lafhitrsAssignments = Nothing+ , _lafhitrsResponseStatus = pResponseStatus_+ }+++-- | Undocumented member.+lafhitrsNextToken :: Lens' ListAssignmentsForHITResponse (Maybe Text)+lafhitrsNextToken = lens _lafhitrsNextToken (\ s a -> s{_lafhitrsNextToken = a});++-- | The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.+lafhitrsNumResults :: Lens' ListAssignmentsForHITResponse (Maybe Int)+lafhitrsNumResults = lens _lafhitrsNumResults (\ s a -> s{_lafhitrsNumResults = a});++-- | The collection of Assignment data structures returned by this call.+lafhitrsAssignments :: Lens' ListAssignmentsForHITResponse [Assignment]+lafhitrsAssignments = lens _lafhitrsAssignments (\ s a -> s{_lafhitrsAssignments = a}) . _Default . _Coerce;++-- | -- | The response status code.+lafhitrsResponseStatus :: Lens' ListAssignmentsForHITResponse Int+lafhitrsResponseStatus = lens _lafhitrsResponseStatus (\ s a -> s{_lafhitrsResponseStatus = a});++instance NFData ListAssignmentsForHITResponse where
+ gen/Network/AWS/MechanicalTurk/ListBonusPayments.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListBonusPayments+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListBonusPayments@ operation retrieves the amounts of bonuses you have paid to Workers for a given HIT or assignment.+--+--+module Network.AWS.MechanicalTurk.ListBonusPayments+ (+ -- * Creating a Request+ listBonusPayments+ , ListBonusPayments+ -- * Request Lenses+ , lbpNextToken+ , lbpHITId+ , lbpAssignmentId+ , lbpMaxResults++ -- * Destructuring the Response+ , listBonusPaymentsResponse+ , ListBonusPaymentsResponse+ -- * Response Lenses+ , lbprsBonusPayments+ , lbprsNextToken+ , lbprsNumResults+ , lbprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listBonusPayments' smart constructor.+data ListBonusPayments = ListBonusPayments'+ { _lbpNextToken :: !(Maybe Text)+ , _lbpHITId :: !(Maybe Text)+ , _lbpAssignmentId :: !(Maybe Text)+ , _lbpMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListBonusPayments' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lbpNextToken' - Pagination token+--+-- * 'lbpHITId' - The ID of the HIT associated with the bonus payments to retrieve. If not specified, all bonus payments for all assignments for the given HIT are returned. Either the HITId parameter or the AssignmentId parameter must be specified+--+-- * 'lbpAssignmentId' - The ID of the assignment associated with the bonus payments to retrieve. If specified, only bonus payments for the given assignment are returned. Either the HITId parameter or the AssignmentId parameter must be specified+--+-- * 'lbpMaxResults' - Undocumented member.+listBonusPayments+ :: ListBonusPayments+listBonusPayments =+ ListBonusPayments'+ { _lbpNextToken = Nothing+ , _lbpHITId = Nothing+ , _lbpAssignmentId = Nothing+ , _lbpMaxResults = Nothing+ }+++-- | Pagination token+lbpNextToken :: Lens' ListBonusPayments (Maybe Text)+lbpNextToken = lens _lbpNextToken (\ s a -> s{_lbpNextToken = a});++-- | The ID of the HIT associated with the bonus payments to retrieve. If not specified, all bonus payments for all assignments for the given HIT are returned. Either the HITId parameter or the AssignmentId parameter must be specified+lbpHITId :: Lens' ListBonusPayments (Maybe Text)+lbpHITId = lens _lbpHITId (\ s a -> s{_lbpHITId = a});++-- | The ID of the assignment associated with the bonus payments to retrieve. If specified, only bonus payments for the given assignment are returned. Either the HITId parameter or the AssignmentId parameter must be specified+lbpAssignmentId :: Lens' ListBonusPayments (Maybe Text)+lbpAssignmentId = lens _lbpAssignmentId (\ s a -> s{_lbpAssignmentId = a});++-- | Undocumented member.+lbpMaxResults :: Lens' ListBonusPayments (Maybe Natural)+lbpMaxResults = lens _lbpMaxResults (\ s a -> s{_lbpMaxResults = a}) . mapping _Nat;++instance AWSRequest ListBonusPayments where+ type Rs ListBonusPayments = ListBonusPaymentsResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListBonusPaymentsResponse' <$>+ (x .?> "BonusPayments" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (x .?> "NumResults")+ <*> (pure (fromEnum s)))++instance Hashable ListBonusPayments where++instance NFData ListBonusPayments where++instance ToHeaders ListBonusPayments where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListBonusPayments"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListBonusPayments where+ toJSON ListBonusPayments'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lbpNextToken,+ ("HITId" .=) <$> _lbpHITId,+ ("AssignmentId" .=) <$> _lbpAssignmentId,+ ("MaxResults" .=) <$> _lbpMaxResults])++instance ToPath ListBonusPayments where+ toPath = const "/"++instance ToQuery ListBonusPayments where+ toQuery = const mempty++-- | /See:/ 'listBonusPaymentsResponse' smart constructor.+data ListBonusPaymentsResponse = ListBonusPaymentsResponse'+ { _lbprsBonusPayments :: !(Maybe [BonusPayment])+ , _lbprsNextToken :: !(Maybe Text)+ , _lbprsNumResults :: !(Maybe Int)+ , _lbprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListBonusPaymentsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lbprsBonusPayments' - A successful request to the ListBonusPayments operation returns a list of BonusPayment objects.+--+-- * 'lbprsNextToken' - Undocumented member.+--+-- * 'lbprsNumResults' - The number of bonus payments on this page in the filtered results list, equivalent to the number of bonus payments being returned by this call.+--+-- * 'lbprsResponseStatus' - -- | The response status code.+listBonusPaymentsResponse+ :: Int -- ^ 'lbprsResponseStatus'+ -> ListBonusPaymentsResponse+listBonusPaymentsResponse pResponseStatus_ =+ ListBonusPaymentsResponse'+ { _lbprsBonusPayments = Nothing+ , _lbprsNextToken = Nothing+ , _lbprsNumResults = Nothing+ , _lbprsResponseStatus = pResponseStatus_+ }+++-- | A successful request to the ListBonusPayments operation returns a list of BonusPayment objects.+lbprsBonusPayments :: Lens' ListBonusPaymentsResponse [BonusPayment]+lbprsBonusPayments = lens _lbprsBonusPayments (\ s a -> s{_lbprsBonusPayments = a}) . _Default . _Coerce;++-- | Undocumented member.+lbprsNextToken :: Lens' ListBonusPaymentsResponse (Maybe Text)+lbprsNextToken = lens _lbprsNextToken (\ s a -> s{_lbprsNextToken = a});++-- | The number of bonus payments on this page in the filtered results list, equivalent to the number of bonus payments being returned by this call.+lbprsNumResults :: Lens' ListBonusPaymentsResponse (Maybe Int)+lbprsNumResults = lens _lbprsNumResults (\ s a -> s{_lbprsNumResults = a});++-- | -- | The response status code.+lbprsResponseStatus :: Lens' ListBonusPaymentsResponse Int+lbprsResponseStatus = lens _lbprsResponseStatus (\ s a -> s{_lbprsResponseStatus = a});++instance NFData ListBonusPaymentsResponse where
+ gen/Network/AWS/MechanicalTurk/ListHITs.hs view
@@ -0,0 +1,163 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListHITs+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListHITs@ operation returns all of a Requester's HITs. The operation returns HITs of any status, except for HITs that have been deleted of with the DeleteHIT operation or that have been auto-deleted.+--+--+module Network.AWS.MechanicalTurk.ListHITs+ (+ -- * Creating a Request+ listHITs+ , ListHITs+ -- * Request Lenses+ , lhitNextToken+ , lhitMaxResults++ -- * Destructuring the Response+ , listHITsResponse+ , ListHITsResponse+ -- * Response Lenses+ , lhitrsNextToken+ , lhitrsNumResults+ , lhitrsHITs+ , lhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listHITs' smart constructor.+data ListHITs = ListHITs'+ { _lhitNextToken :: !(Maybe Text)+ , _lhitMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHITs' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhitNextToken' - Pagination token+--+-- * 'lhitMaxResults' - Undocumented member.+listHITs+ :: ListHITs+listHITs = ListHITs' {_lhitNextToken = Nothing, _lhitMaxResults = Nothing}+++-- | Pagination token+lhitNextToken :: Lens' ListHITs (Maybe Text)+lhitNextToken = lens _lhitNextToken (\ s a -> s{_lhitNextToken = a});++-- | Undocumented member.+lhitMaxResults :: Lens' ListHITs (Maybe Natural)+lhitMaxResults = lens _lhitMaxResults (\ s a -> s{_lhitMaxResults = a}) . mapping _Nat;++instance AWSRequest ListHITs where+ type Rs ListHITs = ListHITsResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListHITsResponse' <$>+ (x .?> "NextToken") <*> (x .?> "NumResults") <*>+ (x .?> "HITs" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListHITs where++instance NFData ListHITs where++instance ToHeaders ListHITs where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListHITs" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListHITs where+ toJSON ListHITs'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lhitNextToken,+ ("MaxResults" .=) <$> _lhitMaxResults])++instance ToPath ListHITs where+ toPath = const "/"++instance ToQuery ListHITs where+ toQuery = const mempty++-- | /See:/ 'listHITsResponse' smart constructor.+data ListHITsResponse = ListHITsResponse'+ { _lhitrsNextToken :: !(Maybe Text)+ , _lhitrsNumResults :: !(Maybe Int)+ , _lhitrsHITs :: !(Maybe [HIT])+ , _lhitrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHITsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhitrsNextToken' - Undocumented member.+--+-- * 'lhitrsNumResults' - The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.+--+-- * 'lhitrsHITs' - The list of HIT elements returned by the query.+--+-- * 'lhitrsResponseStatus' - -- | The response status code.+listHITsResponse+ :: Int -- ^ 'lhitrsResponseStatus'+ -> ListHITsResponse+listHITsResponse pResponseStatus_ =+ ListHITsResponse'+ { _lhitrsNextToken = Nothing+ , _lhitrsNumResults = Nothing+ , _lhitrsHITs = Nothing+ , _lhitrsResponseStatus = pResponseStatus_+ }+++-- | Undocumented member.+lhitrsNextToken :: Lens' ListHITsResponse (Maybe Text)+lhitrsNextToken = lens _lhitrsNextToken (\ s a -> s{_lhitrsNextToken = a});++-- | The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.+lhitrsNumResults :: Lens' ListHITsResponse (Maybe Int)+lhitrsNumResults = lens _lhitrsNumResults (\ s a -> s{_lhitrsNumResults = a});++-- | The list of HIT elements returned by the query.+lhitrsHITs :: Lens' ListHITsResponse [HIT]+lhitrsHITs = lens _lhitrsHITs (\ s a -> s{_lhitrsHITs = a}) . _Default . _Coerce;++-- | -- | The response status code.+lhitrsResponseStatus :: Lens' ListHITsResponse Int+lhitrsResponseStatus = lens _lhitrsResponseStatus (\ s a -> s{_lhitrsResponseStatus = a});++instance NFData ListHITsResponse where
+ gen/Network/AWS/MechanicalTurk/ListHITsForQualificationType.hs view
@@ -0,0 +1,183 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListHITsForQualificationType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListHITsForQualificationType@ operation returns the HITs that use the given Qualification type for a Qualification requirement. The operation returns HITs of any status, except for HITs that have been deleted with the @DeleteHIT@ operation or that have been auto-deleted.+--+--+module Network.AWS.MechanicalTurk.ListHITsForQualificationType+ (+ -- * Creating a Request+ listHITsForQualificationType+ , ListHITsForQualificationType+ -- * Request Lenses+ , lhitfqtNextToken+ , lhitfqtMaxResults+ , lhitfqtQualificationTypeId++ -- * Destructuring the Response+ , listHITsForQualificationTypeResponse+ , ListHITsForQualificationTypeResponse+ -- * Response Lenses+ , lhitfqtrsNextToken+ , lhitfqtrsNumResults+ , lhitfqtrsHITs+ , lhitfqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listHITsForQualificationType' smart constructor.+data ListHITsForQualificationType = ListHITsForQualificationType'+ { _lhitfqtNextToken :: !(Maybe Text)+ , _lhitfqtMaxResults :: !(Maybe Nat)+ , _lhitfqtQualificationTypeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHITsForQualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhitfqtNextToken' - Pagination Token+--+-- * 'lhitfqtMaxResults' - Limit the number of results returned.+--+-- * 'lhitfqtQualificationTypeId' - The ID of the Qualification type to use when querying HITs.+listHITsForQualificationType+ :: Text -- ^ 'lhitfqtQualificationTypeId'+ -> ListHITsForQualificationType+listHITsForQualificationType pQualificationTypeId_ =+ ListHITsForQualificationType'+ { _lhitfqtNextToken = Nothing+ , _lhitfqtMaxResults = Nothing+ , _lhitfqtQualificationTypeId = pQualificationTypeId_+ }+++-- | Pagination Token+lhitfqtNextToken :: Lens' ListHITsForQualificationType (Maybe Text)+lhitfqtNextToken = lens _lhitfqtNextToken (\ s a -> s{_lhitfqtNextToken = a});++-- | Limit the number of results returned.+lhitfqtMaxResults :: Lens' ListHITsForQualificationType (Maybe Natural)+lhitfqtMaxResults = lens _lhitfqtMaxResults (\ s a -> s{_lhitfqtMaxResults = a}) . mapping _Nat;++-- | The ID of the Qualification type to use when querying HITs.+lhitfqtQualificationTypeId :: Lens' ListHITsForQualificationType Text+lhitfqtQualificationTypeId = lens _lhitfqtQualificationTypeId (\ s a -> s{_lhitfqtQualificationTypeId = a});++instance AWSRequest ListHITsForQualificationType+ where+ type Rs ListHITsForQualificationType =+ ListHITsForQualificationTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListHITsForQualificationTypeResponse' <$>+ (x .?> "NextToken") <*> (x .?> "NumResults") <*>+ (x .?> "HITs" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListHITsForQualificationType where++instance NFData ListHITsForQualificationType where++instance ToHeaders ListHITsForQualificationType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListHITsForQualificationType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListHITsForQualificationType where+ toJSON ListHITsForQualificationType'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lhitfqtNextToken,+ ("MaxResults" .=) <$> _lhitfqtMaxResults,+ Just+ ("QualificationTypeId" .=+ _lhitfqtQualificationTypeId)])++instance ToPath ListHITsForQualificationType where+ toPath = const "/"++instance ToQuery ListHITsForQualificationType where+ toQuery = const mempty++-- | /See:/ 'listHITsForQualificationTypeResponse' smart constructor.+data ListHITsForQualificationTypeResponse = ListHITsForQualificationTypeResponse'+ { _lhitfqtrsNextToken :: !(Maybe Text)+ , _lhitfqtrsNumResults :: !(Maybe Int)+ , _lhitfqtrsHITs :: !(Maybe [HIT])+ , _lhitfqtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHITsForQualificationTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhitfqtrsNextToken' - Undocumented member.+--+-- * 'lhitfqtrsNumResults' - The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.+--+-- * 'lhitfqtrsHITs' - The list of HIT elements returned by the query.+--+-- * 'lhitfqtrsResponseStatus' - -- | The response status code.+listHITsForQualificationTypeResponse+ :: Int -- ^ 'lhitfqtrsResponseStatus'+ -> ListHITsForQualificationTypeResponse+listHITsForQualificationTypeResponse pResponseStatus_ =+ ListHITsForQualificationTypeResponse'+ { _lhitfqtrsNextToken = Nothing+ , _lhitfqtrsNumResults = Nothing+ , _lhitfqtrsHITs = Nothing+ , _lhitfqtrsResponseStatus = pResponseStatus_+ }+++-- | Undocumented member.+lhitfqtrsNextToken :: Lens' ListHITsForQualificationTypeResponse (Maybe Text)+lhitfqtrsNextToken = lens _lhitfqtrsNextToken (\ s a -> s{_lhitfqtrsNextToken = a});++-- | The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.+lhitfqtrsNumResults :: Lens' ListHITsForQualificationTypeResponse (Maybe Int)+lhitfqtrsNumResults = lens _lhitfqtrsNumResults (\ s a -> s{_lhitfqtrsNumResults = a});++-- | The list of HIT elements returned by the query.+lhitfqtrsHITs :: Lens' ListHITsForQualificationTypeResponse [HIT]+lhitfqtrsHITs = lens _lhitfqtrsHITs (\ s a -> s{_lhitfqtrsHITs = a}) . _Default . _Coerce;++-- | -- | The response status code.+lhitfqtrsResponseStatus :: Lens' ListHITsForQualificationTypeResponse Int+lhitfqtrsResponseStatus = lens _lhitfqtrsResponseStatus (\ s a -> s{_lhitfqtrsResponseStatus = a});++instance NFData ListHITsForQualificationTypeResponse+ where
+ gen/Network/AWS/MechanicalTurk/ListQualificationRequests.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListQualificationRequests+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListQualificationRequests@ operation retrieves requests for Qualifications of a particular Qualification type. The owner of the Qualification type calls this operation to poll for pending requests, and accepts them using the AcceptQualification operation.+--+--+module Network.AWS.MechanicalTurk.ListQualificationRequests+ (+ -- * Creating a Request+ listQualificationRequests+ , ListQualificationRequests+ -- * Request Lenses+ , lqrNextToken+ , lqrQualificationTypeId+ , lqrMaxResults++ -- * Destructuring the Response+ , listQualificationRequestsResponse+ , ListQualificationRequestsResponse+ -- * Response Lenses+ , lqrrsQualificationRequests+ , lqrrsNextToken+ , lqrrsNumResults+ , lqrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listQualificationRequests' smart constructor.+data ListQualificationRequests = ListQualificationRequests'+ { _lqrNextToken :: !(Maybe Text)+ , _lqrQualificationTypeId :: !(Maybe Text)+ , _lqrMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListQualificationRequests' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lqrNextToken' - Undocumented member.+--+-- * 'lqrQualificationTypeId' - The ID of the QualificationType.+--+-- * 'lqrMaxResults' - The maximum number of results to return in a single call.+listQualificationRequests+ :: ListQualificationRequests+listQualificationRequests =+ ListQualificationRequests'+ { _lqrNextToken = Nothing+ , _lqrQualificationTypeId = Nothing+ , _lqrMaxResults = Nothing+ }+++-- | Undocumented member.+lqrNextToken :: Lens' ListQualificationRequests (Maybe Text)+lqrNextToken = lens _lqrNextToken (\ s a -> s{_lqrNextToken = a});++-- | The ID of the QualificationType.+lqrQualificationTypeId :: Lens' ListQualificationRequests (Maybe Text)+lqrQualificationTypeId = lens _lqrQualificationTypeId (\ s a -> s{_lqrQualificationTypeId = a});++-- | The maximum number of results to return in a single call.+lqrMaxResults :: Lens' ListQualificationRequests (Maybe Natural)+lqrMaxResults = lens _lqrMaxResults (\ s a -> s{_lqrMaxResults = a}) . mapping _Nat;++instance AWSRequest ListQualificationRequests where+ type Rs ListQualificationRequests =+ ListQualificationRequestsResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListQualificationRequestsResponse' <$>+ (x .?> "QualificationRequests" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (x .?> "NumResults")+ <*> (pure (fromEnum s)))++instance Hashable ListQualificationRequests where++instance NFData ListQualificationRequests where++instance ToHeaders ListQualificationRequests where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListQualificationRequests"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListQualificationRequests where+ toJSON ListQualificationRequests'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lqrNextToken,+ ("QualificationTypeId" .=) <$>+ _lqrQualificationTypeId,+ ("MaxResults" .=) <$> _lqrMaxResults])++instance ToPath ListQualificationRequests where+ toPath = const "/"++instance ToQuery ListQualificationRequests where+ toQuery = const mempty++-- | /See:/ 'listQualificationRequestsResponse' smart constructor.+data ListQualificationRequestsResponse = ListQualificationRequestsResponse'+ { _lqrrsQualificationRequests :: !(Maybe [QualificationRequest])+ , _lqrrsNextToken :: !(Maybe Text)+ , _lqrrsNumResults :: !(Maybe Int)+ , _lqrrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListQualificationRequestsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lqrrsQualificationRequests' - The Qualification request. The response includes one QualificationRequest element for each Qualification request returned by the query.+--+-- * 'lqrrsNextToken' - Undocumented member.+--+-- * 'lqrrsNumResults' - The number of Qualification requests on this page in the filtered results list, equivalent to the number of Qualification requests being returned by this call.+--+-- * 'lqrrsResponseStatus' - -- | The response status code.+listQualificationRequestsResponse+ :: Int -- ^ 'lqrrsResponseStatus'+ -> ListQualificationRequestsResponse+listQualificationRequestsResponse pResponseStatus_ =+ ListQualificationRequestsResponse'+ { _lqrrsQualificationRequests = Nothing+ , _lqrrsNextToken = Nothing+ , _lqrrsNumResults = Nothing+ , _lqrrsResponseStatus = pResponseStatus_+ }+++-- | The Qualification request. The response includes one QualificationRequest element for each Qualification request returned by the query.+lqrrsQualificationRequests :: Lens' ListQualificationRequestsResponse [QualificationRequest]+lqrrsQualificationRequests = lens _lqrrsQualificationRequests (\ s a -> s{_lqrrsQualificationRequests = a}) . _Default . _Coerce;++-- | Undocumented member.+lqrrsNextToken :: Lens' ListQualificationRequestsResponse (Maybe Text)+lqrrsNextToken = lens _lqrrsNextToken (\ s a -> s{_lqrrsNextToken = a});++-- | The number of Qualification requests on this page in the filtered results list, equivalent to the number of Qualification requests being returned by this call.+lqrrsNumResults :: Lens' ListQualificationRequestsResponse (Maybe Int)+lqrrsNumResults = lens _lqrrsNumResults (\ s a -> s{_lqrrsNumResults = a});++-- | -- | The response status code.+lqrrsResponseStatus :: Lens' ListQualificationRequestsResponse Int+lqrrsResponseStatus = lens _lqrrsResponseStatus (\ s a -> s{_lqrrsResponseStatus = a});++instance NFData ListQualificationRequestsResponse+ where
+ gen/Network/AWS/MechanicalTurk/ListQualificationTypes.hs view
@@ -0,0 +1,201 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListQualificationTypes+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListQualificationRequests@ operation retrieves requests for Qualifications of a particular Qualification type. The owner of the Qualification type calls this operation to poll for pending requests, and accepts them using the AcceptQualification operation.+--+--+module Network.AWS.MechanicalTurk.ListQualificationTypes+ (+ -- * Creating a Request+ listQualificationTypes+ , ListQualificationTypes+ -- * Request Lenses+ , lqtMustBeOwnedByCaller+ , lqtNextToken+ , lqtQuery+ , lqtMaxResults+ , lqtMustBeRequestable++ -- * Destructuring the Response+ , listQualificationTypesResponse+ , ListQualificationTypesResponse+ -- * Response Lenses+ , lqtrsQualificationTypes+ , lqtrsNextToken+ , lqtrsNumResults+ , lqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listQualificationTypes' smart constructor.+data ListQualificationTypes = ListQualificationTypes'+ { _lqtMustBeOwnedByCaller :: !(Maybe Bool)+ , _lqtNextToken :: !(Maybe Text)+ , _lqtQuery :: !(Maybe Text)+ , _lqtMaxResults :: !(Maybe Nat)+ , _lqtMustBeRequestable :: !Bool+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListQualificationTypes' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lqtMustBeOwnedByCaller' - Specifies that only Qualification types that the Requester created are returned. If false, the operation returns all Qualification types.+--+-- * 'lqtNextToken' - Undocumented member.+--+-- * 'lqtQuery' - A text query against all of the searchable attributes of Qualification types.+--+-- * 'lqtMaxResults' - The maximum number of results to return in a single call.+--+-- * 'lqtMustBeRequestable' - Specifies that only Qualification types that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test, are returned as results of the search. Some Qualification types, such as those assigned automatically by the system, cannot be requested directly by users. If false, all Qualification types, including those managed by the system, are considered. Valid values are True | False.+listQualificationTypes+ :: Bool -- ^ 'lqtMustBeRequestable'+ -> ListQualificationTypes+listQualificationTypes pMustBeRequestable_ =+ ListQualificationTypes'+ { _lqtMustBeOwnedByCaller = Nothing+ , _lqtNextToken = Nothing+ , _lqtQuery = Nothing+ , _lqtMaxResults = Nothing+ , _lqtMustBeRequestable = pMustBeRequestable_+ }+++-- | Specifies that only Qualification types that the Requester created are returned. If false, the operation returns all Qualification types.+lqtMustBeOwnedByCaller :: Lens' ListQualificationTypes (Maybe Bool)+lqtMustBeOwnedByCaller = lens _lqtMustBeOwnedByCaller (\ s a -> s{_lqtMustBeOwnedByCaller = a});++-- | Undocumented member.+lqtNextToken :: Lens' ListQualificationTypes (Maybe Text)+lqtNextToken = lens _lqtNextToken (\ s a -> s{_lqtNextToken = a});++-- | A text query against all of the searchable attributes of Qualification types.+lqtQuery :: Lens' ListQualificationTypes (Maybe Text)+lqtQuery = lens _lqtQuery (\ s a -> s{_lqtQuery = a});++-- | The maximum number of results to return in a single call.+lqtMaxResults :: Lens' ListQualificationTypes (Maybe Natural)+lqtMaxResults = lens _lqtMaxResults (\ s a -> s{_lqtMaxResults = a}) . mapping _Nat;++-- | Specifies that only Qualification types that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test, are returned as results of the search. Some Qualification types, such as those assigned automatically by the system, cannot be requested directly by users. If false, all Qualification types, including those managed by the system, are considered. Valid values are True | False.+lqtMustBeRequestable :: Lens' ListQualificationTypes Bool+lqtMustBeRequestable = lens _lqtMustBeRequestable (\ s a -> s{_lqtMustBeRequestable = a});++instance AWSRequest ListQualificationTypes where+ type Rs ListQualificationTypes =+ ListQualificationTypesResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListQualificationTypesResponse' <$>+ (x .?> "QualificationTypes" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (x .?> "NumResults")+ <*> (pure (fromEnum s)))++instance Hashable ListQualificationTypes where++instance NFData ListQualificationTypes where++instance ToHeaders ListQualificationTypes where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListQualificationTypes"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListQualificationTypes where+ toJSON ListQualificationTypes'{..}+ = object+ (catMaybes+ [("MustBeOwnedByCaller" .=) <$>+ _lqtMustBeOwnedByCaller,+ ("NextToken" .=) <$> _lqtNextToken,+ ("Query" .=) <$> _lqtQuery,+ ("MaxResults" .=) <$> _lqtMaxResults,+ Just ("MustBeRequestable" .= _lqtMustBeRequestable)])++instance ToPath ListQualificationTypes where+ toPath = const "/"++instance ToQuery ListQualificationTypes where+ toQuery = const mempty++-- | /See:/ 'listQualificationTypesResponse' smart constructor.+data ListQualificationTypesResponse = ListQualificationTypesResponse'+ { _lqtrsQualificationTypes :: !(Maybe [QualificationType])+ , _lqtrsNextToken :: !(Maybe Text)+ , _lqtrsNumResults :: !(Maybe Int)+ , _lqtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListQualificationTypesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lqtrsQualificationTypes' - The list of QualificationType elements returned by the query.+--+-- * 'lqtrsNextToken' - Undocumented member.+--+-- * 'lqtrsNumResults' - The number of Qualification types on this page in the filtered results list, equivalent to the number of types this operation returns.+--+-- * 'lqtrsResponseStatus' - -- | The response status code.+listQualificationTypesResponse+ :: Int -- ^ 'lqtrsResponseStatus'+ -> ListQualificationTypesResponse+listQualificationTypesResponse pResponseStatus_ =+ ListQualificationTypesResponse'+ { _lqtrsQualificationTypes = Nothing+ , _lqtrsNextToken = Nothing+ , _lqtrsNumResults = Nothing+ , _lqtrsResponseStatus = pResponseStatus_+ }+++-- | The list of QualificationType elements returned by the query.+lqtrsQualificationTypes :: Lens' ListQualificationTypesResponse [QualificationType]+lqtrsQualificationTypes = lens _lqtrsQualificationTypes (\ s a -> s{_lqtrsQualificationTypes = a}) . _Default . _Coerce;++-- | Undocumented member.+lqtrsNextToken :: Lens' ListQualificationTypesResponse (Maybe Text)+lqtrsNextToken = lens _lqtrsNextToken (\ s a -> s{_lqtrsNextToken = a});++-- | The number of Qualification types on this page in the filtered results list, equivalent to the number of types this operation returns.+lqtrsNumResults :: Lens' ListQualificationTypesResponse (Maybe Int)+lqtrsNumResults = lens _lqtrsNumResults (\ s a -> s{_lqtrsNumResults = a});++-- | -- | The response status code.+lqtrsResponseStatus :: Lens' ListQualificationTypesResponse Int+lqtrsResponseStatus = lens _lqtrsResponseStatus (\ s a -> s{_lqtrsResponseStatus = a});++instance NFData ListQualificationTypesResponse where
+ gen/Network/AWS/MechanicalTurk/ListReviewPolicyResultsForHIT.hs view
@@ -0,0 +1,243 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListReviewPolicyResultsForHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListReviewPolicyResultsForHIT@ operation retrieves the computed results and the actions taken in the course of executing your Review Policies for a given HIT. For information about how to specify Review Policies when you call CreateHIT, see Review Policies. The ListReviewPolicyResultsForHIT operation can return results for both Assignment-level and HIT-level review results.+--+--+module Network.AWS.MechanicalTurk.ListReviewPolicyResultsForHIT+ (+ -- * Creating a Request+ listReviewPolicyResultsForHIT+ , ListReviewPolicyResultsForHIT+ -- * Request Lenses+ , lrprfhitRetrieveResults+ , lrprfhitPolicyLevels+ , lrprfhitRetrieveActions+ , lrprfhitNextToken+ , lrprfhitMaxResults+ , lrprfhitHITId++ -- * Destructuring the Response+ , listReviewPolicyResultsForHITResponse+ , ListReviewPolicyResultsForHITResponse+ -- * Response Lenses+ , lrprfhitrsHITReviewPolicy+ , lrprfhitrsHITReviewReport+ , lrprfhitrsNextToken+ , lrprfhitrsAssignmentReviewReport+ , lrprfhitrsHITId+ , lrprfhitrsAssignmentReviewPolicy+ , lrprfhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listReviewPolicyResultsForHIT' smart constructor.+data ListReviewPolicyResultsForHIT = ListReviewPolicyResultsForHIT'+ { _lrprfhitRetrieveResults :: !(Maybe Bool)+ , _lrprfhitPolicyLevels :: !(Maybe [ReviewPolicyLevel])+ , _lrprfhitRetrieveActions :: !(Maybe Bool)+ , _lrprfhitNextToken :: !(Maybe Text)+ , _lrprfhitMaxResults :: !(Maybe Nat)+ , _lrprfhitHITId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListReviewPolicyResultsForHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrprfhitRetrieveResults' - Specify if the operation should retrieve a list of the results computed by the Review Policies.+--+-- * 'lrprfhitPolicyLevels' - The Policy Level(s) to retrieve review results for - HIT or Assignment. If omitted, the default behavior is to retrieve all data for both policy levels. For a list of all the described policies, see Review Policies.+--+-- * 'lrprfhitRetrieveActions' - Specify if the operation should retrieve a list of the actions taken executing the Review Policies and their outcomes.+--+-- * 'lrprfhitNextToken' - Pagination token+--+-- * 'lrprfhitMaxResults' - Limit the number of results returned.+--+-- * 'lrprfhitHITId' - The unique identifier of the HIT to retrieve review results for.+listReviewPolicyResultsForHIT+ :: Text -- ^ 'lrprfhitHITId'+ -> ListReviewPolicyResultsForHIT+listReviewPolicyResultsForHIT pHITId_ =+ ListReviewPolicyResultsForHIT'+ { _lrprfhitRetrieveResults = Nothing+ , _lrprfhitPolicyLevels = Nothing+ , _lrprfhitRetrieveActions = Nothing+ , _lrprfhitNextToken = Nothing+ , _lrprfhitMaxResults = Nothing+ , _lrprfhitHITId = pHITId_+ }+++-- | Specify if the operation should retrieve a list of the results computed by the Review Policies.+lrprfhitRetrieveResults :: Lens' ListReviewPolicyResultsForHIT (Maybe Bool)+lrprfhitRetrieveResults = lens _lrprfhitRetrieveResults (\ s a -> s{_lrprfhitRetrieveResults = a});++-- | The Policy Level(s) to retrieve review results for - HIT or Assignment. If omitted, the default behavior is to retrieve all data for both policy levels. For a list of all the described policies, see Review Policies.+lrprfhitPolicyLevels :: Lens' ListReviewPolicyResultsForHIT [ReviewPolicyLevel]+lrprfhitPolicyLevels = lens _lrprfhitPolicyLevels (\ s a -> s{_lrprfhitPolicyLevels = a}) . _Default . _Coerce;++-- | Specify if the operation should retrieve a list of the actions taken executing the Review Policies and their outcomes.+lrprfhitRetrieveActions :: Lens' ListReviewPolicyResultsForHIT (Maybe Bool)+lrprfhitRetrieveActions = lens _lrprfhitRetrieveActions (\ s a -> s{_lrprfhitRetrieveActions = a});++-- | Pagination token+lrprfhitNextToken :: Lens' ListReviewPolicyResultsForHIT (Maybe Text)+lrprfhitNextToken = lens _lrprfhitNextToken (\ s a -> s{_lrprfhitNextToken = a});++-- | Limit the number of results returned.+lrprfhitMaxResults :: Lens' ListReviewPolicyResultsForHIT (Maybe Natural)+lrprfhitMaxResults = lens _lrprfhitMaxResults (\ s a -> s{_lrprfhitMaxResults = a}) . mapping _Nat;++-- | The unique identifier of the HIT to retrieve review results for.+lrprfhitHITId :: Lens' ListReviewPolicyResultsForHIT Text+lrprfhitHITId = lens _lrprfhitHITId (\ s a -> s{_lrprfhitHITId = a});++instance AWSRequest ListReviewPolicyResultsForHIT+ where+ type Rs ListReviewPolicyResultsForHIT =+ ListReviewPolicyResultsForHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListReviewPolicyResultsForHITResponse' <$>+ (x .?> "HITReviewPolicy") <*>+ (x .?> "HITReviewReport")+ <*> (x .?> "NextToken")+ <*> (x .?> "AssignmentReviewReport")+ <*> (x .?> "HITId")+ <*> (x .?> "AssignmentReviewPolicy")+ <*> (pure (fromEnum s)))++instance Hashable ListReviewPolicyResultsForHIT where++instance NFData ListReviewPolicyResultsForHIT where++instance ToHeaders ListReviewPolicyResultsForHIT+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListReviewPolicyResultsForHIT"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListReviewPolicyResultsForHIT where+ toJSON ListReviewPolicyResultsForHIT'{..}+ = object+ (catMaybes+ [("RetrieveResults" .=) <$> _lrprfhitRetrieveResults,+ ("PolicyLevels" .=) <$> _lrprfhitPolicyLevels,+ ("RetrieveActions" .=) <$> _lrprfhitRetrieveActions,+ ("NextToken" .=) <$> _lrprfhitNextToken,+ ("MaxResults" .=) <$> _lrprfhitMaxResults,+ Just ("HITId" .= _lrprfhitHITId)])++instance ToPath ListReviewPolicyResultsForHIT where+ toPath = const "/"++instance ToQuery ListReviewPolicyResultsForHIT where+ toQuery = const mempty++-- | /See:/ 'listReviewPolicyResultsForHITResponse' smart constructor.+data ListReviewPolicyResultsForHITResponse = ListReviewPolicyResultsForHITResponse'+ { _lrprfhitrsHITReviewPolicy :: !(Maybe ReviewPolicy)+ , _lrprfhitrsHITReviewReport :: !(Maybe ReviewReport)+ , _lrprfhitrsNextToken :: !(Maybe Text)+ , _lrprfhitrsAssignmentReviewReport :: !(Maybe ReviewReport)+ , _lrprfhitrsHITId :: !(Maybe Text)+ , _lrprfhitrsAssignmentReviewPolicy :: !(Maybe ReviewPolicy)+ , _lrprfhitrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListReviewPolicyResultsForHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrprfhitrsHITReviewPolicy' - The name of the HIT-level Review Policy. This contains only the PolicyName element.+--+-- * 'lrprfhitrsHITReviewReport' - Contains both ReviewResult and ReviewAction elements for a particular HIT.+--+-- * 'lrprfhitrsNextToken' - Undocumented member.+--+-- * 'lrprfhitrsAssignmentReviewReport' - Contains both ReviewResult and ReviewAction elements for an Assignment.+--+-- * 'lrprfhitrsHITId' - The HITId of the HIT for which results have been returned.+--+-- * 'lrprfhitrsAssignmentReviewPolicy' - The name of the Assignment-level Review Policy. This contains only the PolicyName element.+--+-- * 'lrprfhitrsResponseStatus' - -- | The response status code.+listReviewPolicyResultsForHITResponse+ :: Int -- ^ 'lrprfhitrsResponseStatus'+ -> ListReviewPolicyResultsForHITResponse+listReviewPolicyResultsForHITResponse pResponseStatus_ =+ ListReviewPolicyResultsForHITResponse'+ { _lrprfhitrsHITReviewPolicy = Nothing+ , _lrprfhitrsHITReviewReport = Nothing+ , _lrprfhitrsNextToken = Nothing+ , _lrprfhitrsAssignmentReviewReport = Nothing+ , _lrprfhitrsHITId = Nothing+ , _lrprfhitrsAssignmentReviewPolicy = Nothing+ , _lrprfhitrsResponseStatus = pResponseStatus_+ }+++-- | The name of the HIT-level Review Policy. This contains only the PolicyName element.+lrprfhitrsHITReviewPolicy :: Lens' ListReviewPolicyResultsForHITResponse (Maybe ReviewPolicy)+lrprfhitrsHITReviewPolicy = lens _lrprfhitrsHITReviewPolicy (\ s a -> s{_lrprfhitrsHITReviewPolicy = a});++-- | Contains both ReviewResult and ReviewAction elements for a particular HIT.+lrprfhitrsHITReviewReport :: Lens' ListReviewPolicyResultsForHITResponse (Maybe ReviewReport)+lrprfhitrsHITReviewReport = lens _lrprfhitrsHITReviewReport (\ s a -> s{_lrprfhitrsHITReviewReport = a});++-- | Undocumented member.+lrprfhitrsNextToken :: Lens' ListReviewPolicyResultsForHITResponse (Maybe Text)+lrprfhitrsNextToken = lens _lrprfhitrsNextToken (\ s a -> s{_lrprfhitrsNextToken = a});++-- | Contains both ReviewResult and ReviewAction elements for an Assignment.+lrprfhitrsAssignmentReviewReport :: Lens' ListReviewPolicyResultsForHITResponse (Maybe ReviewReport)+lrprfhitrsAssignmentReviewReport = lens _lrprfhitrsAssignmentReviewReport (\ s a -> s{_lrprfhitrsAssignmentReviewReport = a});++-- | The HITId of the HIT for which results have been returned.+lrprfhitrsHITId :: Lens' ListReviewPolicyResultsForHITResponse (Maybe Text)+lrprfhitrsHITId = lens _lrprfhitrsHITId (\ s a -> s{_lrprfhitrsHITId = a});++-- | The name of the Assignment-level Review Policy. This contains only the PolicyName element.+lrprfhitrsAssignmentReviewPolicy :: Lens' ListReviewPolicyResultsForHITResponse (Maybe ReviewPolicy)+lrprfhitrsAssignmentReviewPolicy = lens _lrprfhitrsAssignmentReviewPolicy (\ s a -> s{_lrprfhitrsAssignmentReviewPolicy = a});++-- | -- | The response status code.+lrprfhitrsResponseStatus :: Lens' ListReviewPolicyResultsForHITResponse Int+lrprfhitrsResponseStatus = lens _lrprfhitrsResponseStatus (\ s a -> s{_lrprfhitrsResponseStatus = a});++instance NFData ListReviewPolicyResultsForHITResponse+ where
+ gen/Network/AWS/MechanicalTurk/ListReviewableHITs.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListReviewableHITs+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListReviewableHITs@ operation retrieves the HITs with Status equal to Reviewable or Status equal to Reviewing that belong to the Requester calling the operation.+--+--+module Network.AWS.MechanicalTurk.ListReviewableHITs+ (+ -- * Creating a Request+ listReviewableHITs+ , ListReviewableHITs+ -- * Request Lenses+ , lrhitStatus+ , lrhitHITTypeId+ , lrhitNextToken+ , lrhitMaxResults++ -- * Destructuring the Response+ , listReviewableHITsResponse+ , ListReviewableHITsResponse+ -- * Response Lenses+ , lrhitrsNextToken+ , lrhitrsNumResults+ , lrhitrsHITs+ , lrhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listReviewableHITs' smart constructor.+data ListReviewableHITs = ListReviewableHITs'+ { _lrhitStatus :: !(Maybe ReviewableHITStatus)+ , _lrhitHITTypeId :: !(Maybe Text)+ , _lrhitNextToken :: !(Maybe Text)+ , _lrhitMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListReviewableHITs' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrhitStatus' - Can be either @Reviewable@ or @Reviewing@ . Reviewable is the default value.+--+-- * 'lrhitHITTypeId' - The ID of the HIT type of the HITs to consider for the query. If not specified, all HITs for the Reviewer are considered+--+-- * 'lrhitNextToken' - Pagination Token+--+-- * 'lrhitMaxResults' - Limit the number of results returned.+listReviewableHITs+ :: ListReviewableHITs+listReviewableHITs =+ ListReviewableHITs'+ { _lrhitStatus = Nothing+ , _lrhitHITTypeId = Nothing+ , _lrhitNextToken = Nothing+ , _lrhitMaxResults = Nothing+ }+++-- | Can be either @Reviewable@ or @Reviewing@ . Reviewable is the default value.+lrhitStatus :: Lens' ListReviewableHITs (Maybe ReviewableHITStatus)+lrhitStatus = lens _lrhitStatus (\ s a -> s{_lrhitStatus = a});++-- | The ID of the HIT type of the HITs to consider for the query. If not specified, all HITs for the Reviewer are considered+lrhitHITTypeId :: Lens' ListReviewableHITs (Maybe Text)+lrhitHITTypeId = lens _lrhitHITTypeId (\ s a -> s{_lrhitHITTypeId = a});++-- | Pagination Token+lrhitNextToken :: Lens' ListReviewableHITs (Maybe Text)+lrhitNextToken = lens _lrhitNextToken (\ s a -> s{_lrhitNextToken = a});++-- | Limit the number of results returned.+lrhitMaxResults :: Lens' ListReviewableHITs (Maybe Natural)+lrhitMaxResults = lens _lrhitMaxResults (\ s a -> s{_lrhitMaxResults = a}) . mapping _Nat;++instance AWSRequest ListReviewableHITs where+ type Rs ListReviewableHITs =+ ListReviewableHITsResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListReviewableHITsResponse' <$>+ (x .?> "NextToken") <*> (x .?> "NumResults") <*>+ (x .?> "HITs" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListReviewableHITs where++instance NFData ListReviewableHITs where++instance ToHeaders ListReviewableHITs where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListReviewableHITs"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListReviewableHITs where+ toJSON ListReviewableHITs'{..}+ = object+ (catMaybes+ [("Status" .=) <$> _lrhitStatus,+ ("HITTypeId" .=) <$> _lrhitHITTypeId,+ ("NextToken" .=) <$> _lrhitNextToken,+ ("MaxResults" .=) <$> _lrhitMaxResults])++instance ToPath ListReviewableHITs where+ toPath = const "/"++instance ToQuery ListReviewableHITs where+ toQuery = const mempty++-- | /See:/ 'listReviewableHITsResponse' smart constructor.+data ListReviewableHITsResponse = ListReviewableHITsResponse'+ { _lrhitrsNextToken :: !(Maybe Text)+ , _lrhitrsNumResults :: !(Maybe Int)+ , _lrhitrsHITs :: !(Maybe [HIT])+ , _lrhitrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListReviewableHITsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrhitrsNextToken' - Undocumented member.+--+-- * 'lrhitrsNumResults' - The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.+--+-- * 'lrhitrsHITs' - The list of HIT elements returned by the query.+--+-- * 'lrhitrsResponseStatus' - -- | The response status code.+listReviewableHITsResponse+ :: Int -- ^ 'lrhitrsResponseStatus'+ -> ListReviewableHITsResponse+listReviewableHITsResponse pResponseStatus_ =+ ListReviewableHITsResponse'+ { _lrhitrsNextToken = Nothing+ , _lrhitrsNumResults = Nothing+ , _lrhitrsHITs = Nothing+ , _lrhitrsResponseStatus = pResponseStatus_+ }+++-- | Undocumented member.+lrhitrsNextToken :: Lens' ListReviewableHITsResponse (Maybe Text)+lrhitrsNextToken = lens _lrhitrsNextToken (\ s a -> s{_lrhitrsNextToken = a});++-- | The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.+lrhitrsNumResults :: Lens' ListReviewableHITsResponse (Maybe Int)+lrhitrsNumResults = lens _lrhitrsNumResults (\ s a -> s{_lrhitrsNumResults = a});++-- | The list of HIT elements returned by the query.+lrhitrsHITs :: Lens' ListReviewableHITsResponse [HIT]+lrhitrsHITs = lens _lrhitrsHITs (\ s a -> s{_lrhitrsHITs = a}) . _Default . _Coerce;++-- | -- | The response status code.+lrhitrsResponseStatus :: Lens' ListReviewableHITsResponse Int+lrhitrsResponseStatus = lens _lrhitrsResponseStatus (\ s a -> s{_lrhitrsResponseStatus = a});++instance NFData ListReviewableHITsResponse where
+ gen/Network/AWS/MechanicalTurk/ListWorkerBlocks.hs view
@@ -0,0 +1,165 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListWorkerBlocks+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListWorkersBlocks@ operation retrieves a list of Workers who are blocked from working on your HITs.+--+--+module Network.AWS.MechanicalTurk.ListWorkerBlocks+ (+ -- * Creating a Request+ listWorkerBlocks+ , ListWorkerBlocks+ -- * Request Lenses+ , lwbNextToken+ , lwbMaxResults++ -- * Destructuring the Response+ , listWorkerBlocksResponse+ , ListWorkerBlocksResponse+ -- * Response Lenses+ , lwbrsWorkerBlocks+ , lwbrsNextToken+ , lwbrsNumResults+ , lwbrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listWorkerBlocks' smart constructor.+data ListWorkerBlocks = ListWorkerBlocks'+ { _lwbNextToken :: !(Maybe Text)+ , _lwbMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListWorkerBlocks' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lwbNextToken' - Pagination token+--+-- * 'lwbMaxResults' - Undocumented member.+listWorkerBlocks+ :: ListWorkerBlocks+listWorkerBlocks =+ ListWorkerBlocks' {_lwbNextToken = Nothing, _lwbMaxResults = Nothing}+++-- | Pagination token+lwbNextToken :: Lens' ListWorkerBlocks (Maybe Text)+lwbNextToken = lens _lwbNextToken (\ s a -> s{_lwbNextToken = a});++-- | Undocumented member.+lwbMaxResults :: Lens' ListWorkerBlocks (Maybe Natural)+lwbMaxResults = lens _lwbMaxResults (\ s a -> s{_lwbMaxResults = a}) . mapping _Nat;++instance AWSRequest ListWorkerBlocks where+ type Rs ListWorkerBlocks = ListWorkerBlocksResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListWorkerBlocksResponse' <$>+ (x .?> "WorkerBlocks" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (x .?> "NumResults")+ <*> (pure (fromEnum s)))++instance Hashable ListWorkerBlocks where++instance NFData ListWorkerBlocks where++instance ToHeaders ListWorkerBlocks where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListWorkerBlocks" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListWorkerBlocks where+ toJSON ListWorkerBlocks'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lwbNextToken,+ ("MaxResults" .=) <$> _lwbMaxResults])++instance ToPath ListWorkerBlocks where+ toPath = const "/"++instance ToQuery ListWorkerBlocks where+ toQuery = const mempty++-- | /See:/ 'listWorkerBlocksResponse' smart constructor.+data ListWorkerBlocksResponse = ListWorkerBlocksResponse'+ { _lwbrsWorkerBlocks :: !(Maybe [WorkerBlock])+ , _lwbrsNextToken :: !(Maybe Text)+ , _lwbrsNumResults :: !(Maybe Int)+ , _lwbrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListWorkerBlocksResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lwbrsWorkerBlocks' - The list of WorkerBlocks, containing the collection of Worker IDs and reasons for blocking.+--+-- * 'lwbrsNextToken' - Undocumented member.+--+-- * 'lwbrsNumResults' - The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.+--+-- * 'lwbrsResponseStatus' - -- | The response status code.+listWorkerBlocksResponse+ :: Int -- ^ 'lwbrsResponseStatus'+ -> ListWorkerBlocksResponse+listWorkerBlocksResponse pResponseStatus_ =+ ListWorkerBlocksResponse'+ { _lwbrsWorkerBlocks = Nothing+ , _lwbrsNextToken = Nothing+ , _lwbrsNumResults = Nothing+ , _lwbrsResponseStatus = pResponseStatus_+ }+++-- | The list of WorkerBlocks, containing the collection of Worker IDs and reasons for blocking.+lwbrsWorkerBlocks :: Lens' ListWorkerBlocksResponse [WorkerBlock]+lwbrsWorkerBlocks = lens _lwbrsWorkerBlocks (\ s a -> s{_lwbrsWorkerBlocks = a}) . _Default . _Coerce;++-- | Undocumented member.+lwbrsNextToken :: Lens' ListWorkerBlocksResponse (Maybe Text)+lwbrsNextToken = lens _lwbrsNextToken (\ s a -> s{_lwbrsNextToken = a});++-- | The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.+lwbrsNumResults :: Lens' ListWorkerBlocksResponse (Maybe Int)+lwbrsNumResults = lens _lwbrsNumResults (\ s a -> s{_lwbrsNumResults = a});++-- | -- | The response status code.+lwbrsResponseStatus :: Lens' ListWorkerBlocksResponse Int+lwbrsResponseStatus = lens _lwbrsResponseStatus (\ s a -> s{_lwbrsResponseStatus = a});++instance NFData ListWorkerBlocksResponse where
+ gen/Network/AWS/MechanicalTurk/ListWorkersWithQualificationType.hs view
@@ -0,0 +1,200 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.ListWorkersWithQualificationType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @ListWorkersWithQualificationType@ operation returns all of the Workers that have been associated with a given Qualification type.+--+--+module Network.AWS.MechanicalTurk.ListWorkersWithQualificationType+ (+ -- * Creating a Request+ listWorkersWithQualificationType+ , ListWorkersWithQualificationType+ -- * Request Lenses+ , lwwqtStatus+ , lwwqtNextToken+ , lwwqtMaxResults+ , lwwqtQualificationTypeId++ -- * Destructuring the Response+ , listWorkersWithQualificationTypeResponse+ , ListWorkersWithQualificationTypeResponse+ -- * Response Lenses+ , lwwqtrsNextToken+ , lwwqtrsNumResults+ , lwwqtrsQualifications+ , lwwqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listWorkersWithQualificationType' smart constructor.+data ListWorkersWithQualificationType = ListWorkersWithQualificationType'+ { _lwwqtStatus :: !(Maybe QualificationStatus)+ , _lwwqtNextToken :: !(Maybe Text)+ , _lwwqtMaxResults :: !(Maybe Nat)+ , _lwwqtQualificationTypeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListWorkersWithQualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lwwqtStatus' - The status of the Qualifications to return. Can be @Granted | Revoked@ .+--+-- * 'lwwqtNextToken' - Pagination Token+--+-- * 'lwwqtMaxResults' - Limit the number of results returned.+--+-- * 'lwwqtQualificationTypeId' - The ID of the Qualification type of the Qualifications to return.+listWorkersWithQualificationType+ :: Text -- ^ 'lwwqtQualificationTypeId'+ -> ListWorkersWithQualificationType+listWorkersWithQualificationType pQualificationTypeId_ =+ ListWorkersWithQualificationType'+ { _lwwqtStatus = Nothing+ , _lwwqtNextToken = Nothing+ , _lwwqtMaxResults = Nothing+ , _lwwqtQualificationTypeId = pQualificationTypeId_+ }+++-- | The status of the Qualifications to return. Can be @Granted | Revoked@ .+lwwqtStatus :: Lens' ListWorkersWithQualificationType (Maybe QualificationStatus)+lwwqtStatus = lens _lwwqtStatus (\ s a -> s{_lwwqtStatus = a});++-- | Pagination Token+lwwqtNextToken :: Lens' ListWorkersWithQualificationType (Maybe Text)+lwwqtNextToken = lens _lwwqtNextToken (\ s a -> s{_lwwqtNextToken = a});++-- | Limit the number of results returned.+lwwqtMaxResults :: Lens' ListWorkersWithQualificationType (Maybe Natural)+lwwqtMaxResults = lens _lwwqtMaxResults (\ s a -> s{_lwwqtMaxResults = a}) . mapping _Nat;++-- | The ID of the Qualification type of the Qualifications to return.+lwwqtQualificationTypeId :: Lens' ListWorkersWithQualificationType Text+lwwqtQualificationTypeId = lens _lwwqtQualificationTypeId (\ s a -> s{_lwwqtQualificationTypeId = a});++instance AWSRequest ListWorkersWithQualificationType+ where+ type Rs ListWorkersWithQualificationType =+ ListWorkersWithQualificationTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ ListWorkersWithQualificationTypeResponse' <$>+ (x .?> "NextToken") <*> (x .?> "NumResults") <*>+ (x .?> "Qualifications" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListWorkersWithQualificationType+ where++instance NFData ListWorkersWithQualificationType+ where++instance ToHeaders ListWorkersWithQualificationType+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.ListWorkersWithQualificationType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListWorkersWithQualificationType+ where+ toJSON ListWorkersWithQualificationType'{..}+ = object+ (catMaybes+ [("Status" .=) <$> _lwwqtStatus,+ ("NextToken" .=) <$> _lwwqtNextToken,+ ("MaxResults" .=) <$> _lwwqtMaxResults,+ Just+ ("QualificationTypeId" .=+ _lwwqtQualificationTypeId)])++instance ToPath ListWorkersWithQualificationType+ where+ toPath = const "/"++instance ToQuery ListWorkersWithQualificationType+ where+ toQuery = const mempty++-- | /See:/ 'listWorkersWithQualificationTypeResponse' smart constructor.+data ListWorkersWithQualificationTypeResponse = ListWorkersWithQualificationTypeResponse'+ { _lwwqtrsNextToken :: !(Maybe Text)+ , _lwwqtrsNumResults :: !(Maybe Int)+ , _lwwqtrsQualifications :: !(Maybe [Qualification])+ , _lwwqtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListWorkersWithQualificationTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lwwqtrsNextToken' - Undocumented member.+--+-- * 'lwwqtrsNumResults' - The number of Qualifications on this page in the filtered results list, equivalent to the number of Qualifications being returned by this call.+--+-- * 'lwwqtrsQualifications' - The list of Qualification elements returned by this call.+--+-- * 'lwwqtrsResponseStatus' - -- | The response status code.+listWorkersWithQualificationTypeResponse+ :: Int -- ^ 'lwwqtrsResponseStatus'+ -> ListWorkersWithQualificationTypeResponse+listWorkersWithQualificationTypeResponse pResponseStatus_ =+ ListWorkersWithQualificationTypeResponse'+ { _lwwqtrsNextToken = Nothing+ , _lwwqtrsNumResults = Nothing+ , _lwwqtrsQualifications = Nothing+ , _lwwqtrsResponseStatus = pResponseStatus_+ }+++-- | Undocumented member.+lwwqtrsNextToken :: Lens' ListWorkersWithQualificationTypeResponse (Maybe Text)+lwwqtrsNextToken = lens _lwwqtrsNextToken (\ s a -> s{_lwwqtrsNextToken = a});++-- | The number of Qualifications on this page in the filtered results list, equivalent to the number of Qualifications being returned by this call.+lwwqtrsNumResults :: Lens' ListWorkersWithQualificationTypeResponse (Maybe Int)+lwwqtrsNumResults = lens _lwwqtrsNumResults (\ s a -> s{_lwwqtrsNumResults = a});++-- | The list of Qualification elements returned by this call.+lwwqtrsQualifications :: Lens' ListWorkersWithQualificationTypeResponse [Qualification]+lwwqtrsQualifications = lens _lwwqtrsQualifications (\ s a -> s{_lwwqtrsQualifications = a}) . _Default . _Coerce;++-- | -- | The response status code.+lwwqtrsResponseStatus :: Lens' ListWorkersWithQualificationTypeResponse Int+lwwqtrsResponseStatus = lens _lwwqtrsResponseStatus (\ s a -> s{_lwwqtrsResponseStatus = a});++instance NFData+ ListWorkersWithQualificationTypeResponse+ where
+ gen/Network/AWS/MechanicalTurk/NotifyWorkers.hs view
@@ -0,0 +1,160 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.NotifyWorkers+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @NotifyWorkers@ operation sends an email to one or more Workers that you specify with the Worker ID. You can specify up to 100 Worker IDs to send the same message with a single call to the NotifyWorkers operation. The NotifyWorkers operation will send a notification email to a Worker only if you have previously approved or rejected work from the Worker.+--+--+module Network.AWS.MechanicalTurk.NotifyWorkers+ (+ -- * Creating a Request+ notifyWorkers+ , NotifyWorkers+ -- * Request Lenses+ , nwSubject+ , nwMessageText+ , nwWorkerIds++ -- * Destructuring the Response+ , notifyWorkersResponse+ , NotifyWorkersResponse+ -- * Response Lenses+ , nwrsNotifyWorkersFailureStatuses+ , nwrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'notifyWorkers' smart constructor.+data NotifyWorkers = NotifyWorkers'+ { _nwSubject :: !Text+ , _nwMessageText :: !Text+ , _nwWorkerIds :: ![Text]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'NotifyWorkers' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'nwSubject' - The subject line of the email message to send. Can include up to 200 characters.+--+-- * 'nwMessageText' - The text of the email message to send. Can include up to 4,096 characters+--+-- * 'nwWorkerIds' - A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.+notifyWorkers+ :: Text -- ^ 'nwSubject'+ -> Text -- ^ 'nwMessageText'+ -> NotifyWorkers+notifyWorkers pSubject_ pMessageText_ =+ NotifyWorkers'+ { _nwSubject = pSubject_+ , _nwMessageText = pMessageText_+ , _nwWorkerIds = mempty+ }+++-- | The subject line of the email message to send. Can include up to 200 characters.+nwSubject :: Lens' NotifyWorkers Text+nwSubject = lens _nwSubject (\ s a -> s{_nwSubject = a});++-- | The text of the email message to send. Can include up to 4,096 characters+nwMessageText :: Lens' NotifyWorkers Text+nwMessageText = lens _nwMessageText (\ s a -> s{_nwMessageText = a});++-- | A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.+nwWorkerIds :: Lens' NotifyWorkers [Text]+nwWorkerIds = lens _nwWorkerIds (\ s a -> s{_nwWorkerIds = a}) . _Coerce;++instance AWSRequest NotifyWorkers where+ type Rs NotifyWorkers = NotifyWorkersResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ NotifyWorkersResponse' <$>+ (x .?> "NotifyWorkersFailureStatuses" .!@ mempty) <*>+ (pure (fromEnum s)))++instance Hashable NotifyWorkers where++instance NFData NotifyWorkers where++instance ToHeaders NotifyWorkers where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.NotifyWorkers" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON NotifyWorkers where+ toJSON NotifyWorkers'{..}+ = object+ (catMaybes+ [Just ("Subject" .= _nwSubject),+ Just ("MessageText" .= _nwMessageText),+ Just ("WorkerIds" .= _nwWorkerIds)])++instance ToPath NotifyWorkers where+ toPath = const "/"++instance ToQuery NotifyWorkers where+ toQuery = const mempty++-- | /See:/ 'notifyWorkersResponse' smart constructor.+data NotifyWorkersResponse = NotifyWorkersResponse'+ { _nwrsNotifyWorkersFailureStatuses :: !(Maybe [NotifyWorkersFailureStatus])+ , _nwrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'NotifyWorkersResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'nwrsNotifyWorkersFailureStatuses' - When MTurk sends notifications to the list of Workers, it returns back any failures it encounters in this list of NotifyWorkersFailureStatus objects.+--+-- * 'nwrsResponseStatus' - -- | The response status code.+notifyWorkersResponse+ :: Int -- ^ 'nwrsResponseStatus'+ -> NotifyWorkersResponse+notifyWorkersResponse pResponseStatus_ =+ NotifyWorkersResponse'+ { _nwrsNotifyWorkersFailureStatuses = Nothing+ , _nwrsResponseStatus = pResponseStatus_+ }+++-- | When MTurk sends notifications to the list of Workers, it returns back any failures it encounters in this list of NotifyWorkersFailureStatus objects.+nwrsNotifyWorkersFailureStatuses :: Lens' NotifyWorkersResponse [NotifyWorkersFailureStatus]+nwrsNotifyWorkersFailureStatuses = lens _nwrsNotifyWorkersFailureStatuses (\ s a -> s{_nwrsNotifyWorkersFailureStatuses = a}) . _Default . _Coerce;++-- | -- | The response status code.+nwrsResponseStatus :: Lens' NotifyWorkersResponse Int+nwrsResponseStatus = lens _nwrsResponseStatus (\ s a -> s{_nwrsResponseStatus = a});++instance NFData NotifyWorkersResponse where
+ gen/Network/AWS/MechanicalTurk/RejectAssignment.hs view
@@ -0,0 +1,139 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.RejectAssignment+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @RejectAssignment@ operation rejects the results of a completed assignment.+--+--+-- You can include an optional feedback message with the rejection, which the Worker can see in the Status section of the web site. When you include a feedback message with the rejection, it helps the Worker understand why the assignment was rejected, and can improve the quality of the results the Worker submits in the future.+--+-- Only the Requester who created the HIT can reject an assignment for the HIT.+--+module Network.AWS.MechanicalTurk.RejectAssignment+ (+ -- * Creating a Request+ rejectAssignment+ , RejectAssignment+ -- * Request Lenses+ , raAssignmentId+ , raRequesterFeedback++ -- * Destructuring the Response+ , rejectAssignmentResponse+ , RejectAssignmentResponse+ -- * Response Lenses+ , rarsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'rejectAssignment' smart constructor.+data RejectAssignment = RejectAssignment'+ { _raAssignmentId :: !Text+ , _raRequesterFeedback :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RejectAssignment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'raAssignmentId' - The ID of the assignment. The assignment must correspond to a HIT created by the Requester.+--+-- * 'raRequesterFeedback' - A message for the Worker, which the Worker can see in the Status section of the web site.+rejectAssignment+ :: Text -- ^ 'raAssignmentId'+ -> Text -- ^ 'raRequesterFeedback'+ -> RejectAssignment+rejectAssignment pAssignmentId_ pRequesterFeedback_ =+ RejectAssignment'+ {_raAssignmentId = pAssignmentId_, _raRequesterFeedback = pRequesterFeedback_}+++-- | The ID of the assignment. The assignment must correspond to a HIT created by the Requester.+raAssignmentId :: Lens' RejectAssignment Text+raAssignmentId = lens _raAssignmentId (\ s a -> s{_raAssignmentId = a});++-- | A message for the Worker, which the Worker can see in the Status section of the web site.+raRequesterFeedback :: Lens' RejectAssignment Text+raRequesterFeedback = lens _raRequesterFeedback (\ s a -> s{_raRequesterFeedback = a});++instance AWSRequest RejectAssignment where+ type Rs RejectAssignment = RejectAssignmentResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ RejectAssignmentResponse' <$> (pure (fromEnum s)))++instance Hashable RejectAssignment where++instance NFData RejectAssignment where++instance ToHeaders RejectAssignment where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.RejectAssignment" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RejectAssignment where+ toJSON RejectAssignment'{..}+ = object+ (catMaybes+ [Just ("AssignmentId" .= _raAssignmentId),+ Just ("RequesterFeedback" .= _raRequesterFeedback)])++instance ToPath RejectAssignment where+ toPath = const "/"++instance ToQuery RejectAssignment where+ toQuery = const mempty++-- | /See:/ 'rejectAssignmentResponse' smart constructor.+newtype RejectAssignmentResponse = RejectAssignmentResponse'+ { _rarsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RejectAssignmentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rarsResponseStatus' - -- | The response status code.+rejectAssignmentResponse+ :: Int -- ^ 'rarsResponseStatus'+ -> RejectAssignmentResponse+rejectAssignmentResponse pResponseStatus_ =+ RejectAssignmentResponse' {_rarsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+rarsResponseStatus :: Lens' RejectAssignmentResponse Int+rarsResponseStatus = lens _rarsResponseStatus (\ s a -> s{_rarsResponseStatus = a});++instance NFData RejectAssignmentResponse where
+ gen/Network/AWS/MechanicalTurk/RejectQualificationRequest.hs view
@@ -0,0 +1,141 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.RejectQualificationRequest+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @RejectQualificationRequest@ operation rejects a user's request for a Qualification.+--+--+-- You can provide a text message explaining why the request was rejected. The Worker who made the request can see this message.+--+module Network.AWS.MechanicalTurk.RejectQualificationRequest+ (+ -- * Creating a Request+ rejectQualificationRequest+ , RejectQualificationRequest+ -- * Request Lenses+ , rqrReason+ , rqrQualificationRequestId++ -- * Destructuring the Response+ , rejectQualificationRequestResponse+ , RejectQualificationRequestResponse+ -- * Response Lenses+ , rqrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'rejectQualificationRequest' smart constructor.+data RejectQualificationRequest = RejectQualificationRequest'+ { _rqrReason :: !(Maybe Text)+ , _rqrQualificationRequestId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RejectQualificationRequest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rqrReason' - A text message explaining why the request was rejected, to be shown to the Worker who made the request.+--+-- * 'rqrQualificationRequestId' - The ID of the Qualification request, as returned by the @ListQualificationRequests@ operation.+rejectQualificationRequest+ :: Text -- ^ 'rqrQualificationRequestId'+ -> RejectQualificationRequest+rejectQualificationRequest pQualificationRequestId_ =+ RejectQualificationRequest'+ {_rqrReason = Nothing, _rqrQualificationRequestId = pQualificationRequestId_}+++-- | A text message explaining why the request was rejected, to be shown to the Worker who made the request.+rqrReason :: Lens' RejectQualificationRequest (Maybe Text)+rqrReason = lens _rqrReason (\ s a -> s{_rqrReason = a});++-- | The ID of the Qualification request, as returned by the @ListQualificationRequests@ operation.+rqrQualificationRequestId :: Lens' RejectQualificationRequest Text+rqrQualificationRequestId = lens _rqrQualificationRequestId (\ s a -> s{_rqrQualificationRequestId = a});++instance AWSRequest RejectQualificationRequest where+ type Rs RejectQualificationRequest =+ RejectQualificationRequestResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ RejectQualificationRequestResponse' <$>+ (pure (fromEnum s)))++instance Hashable RejectQualificationRequest where++instance NFData RejectQualificationRequest where++instance ToHeaders RejectQualificationRequest where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.RejectQualificationRequest"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RejectQualificationRequest where+ toJSON RejectQualificationRequest'{..}+ = object+ (catMaybes+ [("Reason" .=) <$> _rqrReason,+ Just+ ("QualificationRequestId" .=+ _rqrQualificationRequestId)])++instance ToPath RejectQualificationRequest where+ toPath = const "/"++instance ToQuery RejectQualificationRequest where+ toQuery = const mempty++-- | /See:/ 'rejectQualificationRequestResponse' smart constructor.+newtype RejectQualificationRequestResponse = RejectQualificationRequestResponse'+ { _rqrrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RejectQualificationRequestResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rqrrsResponseStatus' - -- | The response status code.+rejectQualificationRequestResponse+ :: Int -- ^ 'rqrrsResponseStatus'+ -> RejectQualificationRequestResponse+rejectQualificationRequestResponse pResponseStatus_ =+ RejectQualificationRequestResponse' {_rqrrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+rqrrsResponseStatus :: Lens' RejectQualificationRequestResponse Int+rqrrsResponseStatus = lens _rqrrsResponseStatus (\ s a -> s{_rqrrsResponseStatus = a});++instance NFData RejectQualificationRequestResponse+ where
+ gen/Network/AWS/MechanicalTurk/SendBonus.hs view
@@ -0,0 +1,169 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.SendBonus+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @SendBonus@ operation issues a payment of money from your account to a Worker. This payment happens separately from the reward you pay to the Worker when you approve the Worker's assignment. The SendBonus operation requires the Worker's ID and the assignment ID as parameters to initiate payment of the bonus. You must include a message that explains the reason for the bonus payment, as the Worker may not be expecting the payment. Amazon Mechanical Turk collects a fee for bonus payments, similar to the HIT listing fee. This operation fails if your account does not have enough funds to pay for both the bonus and the fees.+--+--+module Network.AWS.MechanicalTurk.SendBonus+ (+ -- * Creating a Request+ sendBonus+ , SendBonus+ -- * Request Lenses+ , sbUniqueRequestToken+ , sbWorkerId+ , sbBonusAmount+ , sbAssignmentId+ , sbReason++ -- * Destructuring the Response+ , sendBonusResponse+ , SendBonusResponse+ -- * Response Lenses+ , sbrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'sendBonus' smart constructor.+data SendBonus = SendBonus'+ { _sbUniqueRequestToken :: !(Maybe Text)+ , _sbWorkerId :: !Text+ , _sbBonusAmount :: !Text+ , _sbAssignmentId :: !Text+ , _sbReason :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'SendBonus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sbUniqueRequestToken' - A unique identifier for this request, which allows you to retry the call on error without granting multiple bonuses. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the bonus already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return an error with a message containing the request ID.+--+-- * 'sbWorkerId' - The ID of the Worker being paid the bonus.+--+-- * 'sbBonusAmount' - The Bonus amount is a US Dollar amount specified using a string (for example, "5" represents $5.00 USD and "101.42" represents $101.42 USD). Do not include currency symbols or currency codes.+--+-- * 'sbAssignmentId' - The ID of the assignment for which this bonus is paid.+--+-- * 'sbReason' - A message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message.+sendBonus+ :: Text -- ^ 'sbWorkerId'+ -> Text -- ^ 'sbBonusAmount'+ -> Text -- ^ 'sbAssignmentId'+ -> Text -- ^ 'sbReason'+ -> SendBonus+sendBonus pWorkerId_ pBonusAmount_ pAssignmentId_ pReason_ =+ SendBonus'+ { _sbUniqueRequestToken = Nothing+ , _sbWorkerId = pWorkerId_+ , _sbBonusAmount = pBonusAmount_+ , _sbAssignmentId = pAssignmentId_+ , _sbReason = pReason_+ }+++-- | A unique identifier for this request, which allows you to retry the call on error without granting multiple bonuses. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the bonus already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return an error with a message containing the request ID.+sbUniqueRequestToken :: Lens' SendBonus (Maybe Text)+sbUniqueRequestToken = lens _sbUniqueRequestToken (\ s a -> s{_sbUniqueRequestToken = a});++-- | The ID of the Worker being paid the bonus.+sbWorkerId :: Lens' SendBonus Text+sbWorkerId = lens _sbWorkerId (\ s a -> s{_sbWorkerId = a});++-- | The Bonus amount is a US Dollar amount specified using a string (for example, "5" represents $5.00 USD and "101.42" represents $101.42 USD). Do not include currency symbols or currency codes.+sbBonusAmount :: Lens' SendBonus Text+sbBonusAmount = lens _sbBonusAmount (\ s a -> s{_sbBonusAmount = a});++-- | The ID of the assignment for which this bonus is paid.+sbAssignmentId :: Lens' SendBonus Text+sbAssignmentId = lens _sbAssignmentId (\ s a -> s{_sbAssignmentId = a});++-- | A message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message.+sbReason :: Lens' SendBonus Text+sbReason = lens _sbReason (\ s a -> s{_sbReason = a});++instance AWSRequest SendBonus where+ type Rs SendBonus = SendBonusResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ SendBonusResponse' <$> (pure (fromEnum s)))++instance Hashable SendBonus where++instance NFData SendBonus where++instance ToHeaders SendBonus where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.SendBonus" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON SendBonus where+ toJSON SendBonus'{..}+ = object+ (catMaybes+ [("UniqueRequestToken" .=) <$> _sbUniqueRequestToken,+ Just ("WorkerId" .= _sbWorkerId),+ Just ("BonusAmount" .= _sbBonusAmount),+ Just ("AssignmentId" .= _sbAssignmentId),+ Just ("Reason" .= _sbReason)])++instance ToPath SendBonus where+ toPath = const "/"++instance ToQuery SendBonus where+ toQuery = const mempty++-- | /See:/ 'sendBonusResponse' smart constructor.+newtype SendBonusResponse = SendBonusResponse'+ { _sbrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'SendBonusResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sbrsResponseStatus' - -- | The response status code.+sendBonusResponse+ :: Int -- ^ 'sbrsResponseStatus'+ -> SendBonusResponse+sendBonusResponse pResponseStatus_ =+ SendBonusResponse' {_sbrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+sbrsResponseStatus :: Lens' SendBonusResponse Int+sbrsResponseStatus = lens _sbrsResponseStatus (\ s a -> s{_sbrsResponseStatus = a});++instance NFData SendBonusResponse where
+ gen/Network/AWS/MechanicalTurk/SendTestEventNotification.hs view
@@ -0,0 +1,138 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.SendTestEventNotification+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @SendTestEventNotification@ operation causes Amazon Mechanical Turk to send a notification message as if a HIT event occurred, according to the provided notification specification. This allows you to test notifications without setting up notifications for a real HIT type and trying to trigger them using the website. When you call this operation, the service attempts to send the test notification immediately.+--+--+module Network.AWS.MechanicalTurk.SendTestEventNotification+ (+ -- * Creating a Request+ sendTestEventNotification+ , SendTestEventNotification+ -- * Request Lenses+ , stenNotification+ , stenTestEventType++ -- * Destructuring the Response+ , sendTestEventNotificationResponse+ , SendTestEventNotificationResponse+ -- * Response Lenses+ , stenrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'sendTestEventNotification' smart constructor.+data SendTestEventNotification = SendTestEventNotification'+ { _stenNotification :: !NotificationSpecification+ , _stenTestEventType :: !EventType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'SendTestEventNotification' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'stenNotification' - The notification specification to test. This value is identical to the value you would provide to the UpdateNotificationSettings operation when you establish the notification specification for a HIT type.+--+-- * 'stenTestEventType' - The event to simulate to test the notification specification. This event is included in the test message even if the notification specification does not include the event type. The notification specification does not filter out the test event.+sendTestEventNotification+ :: NotificationSpecification -- ^ 'stenNotification'+ -> EventType -- ^ 'stenTestEventType'+ -> SendTestEventNotification+sendTestEventNotification pNotification_ pTestEventType_ =+ SendTestEventNotification'+ {_stenNotification = pNotification_, _stenTestEventType = pTestEventType_}+++-- | The notification specification to test. This value is identical to the value you would provide to the UpdateNotificationSettings operation when you establish the notification specification for a HIT type.+stenNotification :: Lens' SendTestEventNotification NotificationSpecification+stenNotification = lens _stenNotification (\ s a -> s{_stenNotification = a});++-- | The event to simulate to test the notification specification. This event is included in the test message even if the notification specification does not include the event type. The notification specification does not filter out the test event.+stenTestEventType :: Lens' SendTestEventNotification EventType+stenTestEventType = lens _stenTestEventType (\ s a -> s{_stenTestEventType = a});++instance AWSRequest SendTestEventNotification where+ type Rs SendTestEventNotification =+ SendTestEventNotificationResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ SendTestEventNotificationResponse' <$>+ (pure (fromEnum s)))++instance Hashable SendTestEventNotification where++instance NFData SendTestEventNotification where++instance ToHeaders SendTestEventNotification where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.SendTestEventNotification"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON SendTestEventNotification where+ toJSON SendTestEventNotification'{..}+ = object+ (catMaybes+ [Just ("Notification" .= _stenNotification),+ Just ("TestEventType" .= _stenTestEventType)])++instance ToPath SendTestEventNotification where+ toPath = const "/"++instance ToQuery SendTestEventNotification where+ toQuery = const mempty++-- | /See:/ 'sendTestEventNotificationResponse' smart constructor.+newtype SendTestEventNotificationResponse = SendTestEventNotificationResponse'+ { _stenrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'SendTestEventNotificationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'stenrsResponseStatus' - -- | The response status code.+sendTestEventNotificationResponse+ :: Int -- ^ 'stenrsResponseStatus'+ -> SendTestEventNotificationResponse+sendTestEventNotificationResponse pResponseStatus_ =+ SendTestEventNotificationResponse' {_stenrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+stenrsResponseStatus :: Lens' SendTestEventNotificationResponse Int+stenrsResponseStatus = lens _stenrsResponseStatus (\ s a -> s{_stenrsResponseStatus = a});++instance NFData SendTestEventNotificationResponse+ where
+ gen/Network/AWS/MechanicalTurk/Types.hs view
@@ -0,0 +1,290 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.Types+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MechanicalTurk.Types+ (+ -- * Service Configuration+ mechanicalTurk++ -- * Errors+ , _ServiceFault+ , _RequestError++ -- * AssignmentStatus+ , AssignmentStatus (..)++ -- * Comparator+ , Comparator (..)++ -- * EventType+ , EventType (..)++ -- * HITReviewStatus+ , HITReviewStatus (..)++ -- * HITStatus+ , HITStatus (..)++ -- * NotificationTransport+ , NotificationTransport (..)++ -- * NotifyWorkersFailureCode+ , NotifyWorkersFailureCode (..)++ -- * QualificationStatus+ , QualificationStatus (..)++ -- * QualificationTypeStatus+ , QualificationTypeStatus (..)++ -- * ReviewActionStatus+ , ReviewActionStatus (..)++ -- * ReviewPolicyLevel+ , ReviewPolicyLevel (..)++ -- * ReviewableHITStatus+ , ReviewableHITStatus (..)++ -- * Assignment+ , Assignment+ , assignment+ , aAcceptTime+ , aAnswer+ , aAssignmentStatus+ , aRequesterFeedback+ , aDeadline+ , aApprovalTime+ , aRejectionTime+ , aAutoApprovalTime+ , aHITId+ , aWorkerId+ , aAssignmentId+ , aSubmitTime++ -- * BonusPayment+ , BonusPayment+ , bonusPayment+ , bpReason+ , bpGrantTime+ , bpWorkerId+ , bpAssignmentId+ , bpBonusAmount++ -- * HIT+ , HIT+ , hIT+ , hitCreationTime+ , hitHITGroupId+ , hitNumberOfAssignmentsPending+ , hitHITTypeId+ , hitExpiration+ , hitAutoApprovalDelayInSeconds+ , hitRequesterAnnotation+ , hitHITStatus+ , hitMaxAssignments+ , hitNumberOfAssignmentsCompleted+ , hitReward+ , hitKeywords+ , hitHITLayoutId+ , hitQualificationRequirements+ , hitTitle+ , hitHITId+ , hitHITReviewStatus+ , hitNumberOfAssignmentsAvailable+ , hitDescription+ , hitQuestion+ , hitAssignmentDurationInSeconds++ -- * HITLayoutParameter+ , HITLayoutParameter+ , hITLayoutParameter+ , hitlpName+ , hitlpValue++ -- * Locale+ , Locale+ , locale+ , lSubdivision+ , lCountry++ -- * NotificationSpecification+ , NotificationSpecification+ , notificationSpecification+ , nsDestination+ , nsTransport+ , nsVersion+ , nsEventTypes++ -- * NotifyWorkersFailureStatus+ , NotifyWorkersFailureStatus+ , notifyWorkersFailureStatus+ , nwfsNotifyWorkersFailureMessage+ , nwfsNotifyWorkersFailureCode+ , nwfsWorkerId++ -- * ParameterMapEntry+ , ParameterMapEntry+ , parameterMapEntry+ , pmeValues+ , pmeKey++ -- * PolicyParameter+ , PolicyParameter+ , policyParameter+ , ppValues+ , ppMapEntries+ , ppKey++ -- * Qualification+ , Qualification+ , qualification+ , qStatus+ , qIntegerValue+ , qLocaleValue+ , qQualificationTypeId+ , qGrantTime+ , qWorkerId++ -- * QualificationRequest+ , QualificationRequest+ , qualificationRequest+ , quaQualificationRequestId+ , quaTest+ , quaQualificationTypeId+ , quaAnswer+ , quaWorkerId+ , quaSubmitTime++ -- * QualificationRequirement+ , QualificationRequirement+ , qualificationRequirement+ , qrLocaleValues+ , qrRequiredToPreview+ , qrIntegerValues+ , qrQualificationTypeId+ , qrComparator++ -- * QualificationType+ , QualificationType+ , qualificationType+ , qtCreationTime+ , qtTestDurationInSeconds+ , qtQualificationTypeStatus+ , qtAnswerKey+ , qtTest+ , qtQualificationTypeId+ , qtName+ , qtKeywords+ , qtAutoGranted+ , qtAutoGrantedValue+ , qtDescription+ , qtIsRequestable+ , qtRetryDelayInSeconds++ -- * ReviewActionDetail+ , ReviewActionDetail+ , reviewActionDetail+ , radStatus+ , radTargetId+ , radActionId+ , radTargetType+ , radResult+ , radActionName+ , radCompleteTime+ , radErrorCode++ -- * ReviewPolicy+ , ReviewPolicy+ , reviewPolicy+ , rpParameters+ , rpPolicyName++ -- * ReviewReport+ , ReviewReport+ , reviewReport+ , rrReviewActions+ , rrReviewResults++ -- * ReviewResultDetail+ , ReviewResultDetail+ , reviewResultDetail+ , rrdValue+ , rrdActionId+ , rrdSubjectType+ , rrdKey+ , rrdQuestionId+ , rrdSubjectId++ -- * WorkerBlock+ , WorkerBlock+ , workerBlock+ , wbReason+ , wbWorkerId+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.MechanicalTurk.Types.Sum+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version @2017-01-17@ of the Amazon Mechanical Turk SDK configuration.+mechanicalTurk :: Service+mechanicalTurk =+ Service+ { _svcAbbrev = "MechanicalTurk"+ , _svcSigner = v4+ , _svcPrefix = "mturk-requester"+ , _svcVersion = "2017-01-17"+ , _svcEndpoint = defaultEndpoint mechanicalTurk+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "MechanicalTurk"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception"+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing+++-- | Amazon Mechanical Turk is temporarily unable to process your request. Try your call again.+--+--+_ServiceFault :: AsError a => Getting (First ServiceError) a ServiceError+_ServiceFault = _MatchServiceError mechanicalTurk "ServiceFault"+++-- | Your request is invalid.+--+--+_RequestError :: AsError a => Getting (First ServiceError) a ServiceError+_RequestError = _MatchServiceError mechanicalTurk "RequestError"+
+ gen/Network/AWS/MechanicalTurk/Types/Product.hs view
@@ -0,0 +1,1493 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.Types.Product+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MechanicalTurk.Types.Product where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types.Sum+import Network.AWS.Prelude++-- | The Assignment data structure represents a single assignment of a HIT to a Worker. The assignment tracks the Worker's efforts to complete the HIT, and contains the results for later retrieval.+--+--+--+-- /See:/ 'assignment' smart constructor.+data Assignment = Assignment'+ { _aAcceptTime :: !(Maybe POSIX)+ , _aAnswer :: !(Maybe Text)+ , _aAssignmentStatus :: !(Maybe AssignmentStatus)+ , _aRequesterFeedback :: !(Maybe Text)+ , _aDeadline :: !(Maybe POSIX)+ , _aApprovalTime :: !(Maybe POSIX)+ , _aRejectionTime :: !(Maybe POSIX)+ , _aAutoApprovalTime :: !(Maybe POSIX)+ , _aHITId :: !(Maybe Text)+ , _aWorkerId :: !(Maybe Text)+ , _aAssignmentId :: !(Maybe Text)+ , _aSubmitTime :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Assignment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aAcceptTime' - The date and time the Worker accepted the assignment.+--+-- * 'aAnswer' - The Worker's answers submitted for the HIT contained in a QuestionFormAnswers document, if the Worker provides an answer. If the Worker does not provide any answers, Answer may contain a QuestionFormAnswers document, or Answer may be empty.+--+-- * 'aAssignmentStatus' - The status of the assignment.+--+-- * 'aRequesterFeedback' - The feedback string included with the call to the ApproveAssignment operation or the RejectAssignment operation, if the Requester approved or rejected the assignment and specified feedback.+--+-- * 'aDeadline' - The date and time of the deadline for the assignment. This value is derived from the deadline specification for the HIT and the date and time the Worker accepted the HIT.+--+-- * 'aApprovalTime' - If the Worker has submitted results and the Requester has approved the results, ApprovalTime is the date and time the Requester approved the results. This value is omitted from the assignment if the Requester has not yet approved the results.+--+-- * 'aRejectionTime' - If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.+--+-- * 'aAutoApprovalTime' - If results have been submitted, AutoApprovalTime is the date and time the results of the assignment results are considered Approved automatically if they have not already been explicitly approved or rejected by the Requester. This value is derived from the auto-approval delay specified by the Requester in the HIT. This value is omitted from the assignment if the Worker has not yet submitted results.+--+-- * 'aHITId' - The ID of the HIT.+--+-- * 'aWorkerId' - The ID of the Worker who accepted the HIT.+--+-- * 'aAssignmentId' - A unique identifier for the assignment.+--+-- * 'aSubmitTime' - If the Worker has submitted results, SubmitTime is the date and time the assignment was submitted. This value is omitted from the assignment if the Worker has not yet submitted results.+assignment+ :: Assignment+assignment =+ Assignment'+ { _aAcceptTime = Nothing+ , _aAnswer = Nothing+ , _aAssignmentStatus = Nothing+ , _aRequesterFeedback = Nothing+ , _aDeadline = Nothing+ , _aApprovalTime = Nothing+ , _aRejectionTime = Nothing+ , _aAutoApprovalTime = Nothing+ , _aHITId = Nothing+ , _aWorkerId = Nothing+ , _aAssignmentId = Nothing+ , _aSubmitTime = Nothing+ }+++-- | The date and time the Worker accepted the assignment.+aAcceptTime :: Lens' Assignment (Maybe UTCTime)+aAcceptTime = lens _aAcceptTime (\ s a -> s{_aAcceptTime = a}) . mapping _Time;++-- | The Worker's answers submitted for the HIT contained in a QuestionFormAnswers document, if the Worker provides an answer. If the Worker does not provide any answers, Answer may contain a QuestionFormAnswers document, or Answer may be empty.+aAnswer :: Lens' Assignment (Maybe Text)+aAnswer = lens _aAnswer (\ s a -> s{_aAnswer = a});++-- | The status of the assignment.+aAssignmentStatus :: Lens' Assignment (Maybe AssignmentStatus)+aAssignmentStatus = lens _aAssignmentStatus (\ s a -> s{_aAssignmentStatus = a});++-- | The feedback string included with the call to the ApproveAssignment operation or the RejectAssignment operation, if the Requester approved or rejected the assignment and specified feedback.+aRequesterFeedback :: Lens' Assignment (Maybe Text)+aRequesterFeedback = lens _aRequesterFeedback (\ s a -> s{_aRequesterFeedback = a});++-- | The date and time of the deadline for the assignment. This value is derived from the deadline specification for the HIT and the date and time the Worker accepted the HIT.+aDeadline :: Lens' Assignment (Maybe UTCTime)+aDeadline = lens _aDeadline (\ s a -> s{_aDeadline = a}) . mapping _Time;++-- | If the Worker has submitted results and the Requester has approved the results, ApprovalTime is the date and time the Requester approved the results. This value is omitted from the assignment if the Requester has not yet approved the results.+aApprovalTime :: Lens' Assignment (Maybe UTCTime)+aApprovalTime = lens _aApprovalTime (\ s a -> s{_aApprovalTime = a}) . mapping _Time;++-- | If the Worker has submitted results and the Requester has rejected the results, RejectionTime is the date and time the Requester rejected the results.+aRejectionTime :: Lens' Assignment (Maybe UTCTime)+aRejectionTime = lens _aRejectionTime (\ s a -> s{_aRejectionTime = a}) . mapping _Time;++-- | If results have been submitted, AutoApprovalTime is the date and time the results of the assignment results are considered Approved automatically if they have not already been explicitly approved or rejected by the Requester. This value is derived from the auto-approval delay specified by the Requester in the HIT. This value is omitted from the assignment if the Worker has not yet submitted results.+aAutoApprovalTime :: Lens' Assignment (Maybe UTCTime)+aAutoApprovalTime = lens _aAutoApprovalTime (\ s a -> s{_aAutoApprovalTime = a}) . mapping _Time;++-- | The ID of the HIT.+aHITId :: Lens' Assignment (Maybe Text)+aHITId = lens _aHITId (\ s a -> s{_aHITId = a});++-- | The ID of the Worker who accepted the HIT.+aWorkerId :: Lens' Assignment (Maybe Text)+aWorkerId = lens _aWorkerId (\ s a -> s{_aWorkerId = a});++-- | A unique identifier for the assignment.+aAssignmentId :: Lens' Assignment (Maybe Text)+aAssignmentId = lens _aAssignmentId (\ s a -> s{_aAssignmentId = a});++-- | If the Worker has submitted results, SubmitTime is the date and time the assignment was submitted. This value is omitted from the assignment if the Worker has not yet submitted results.+aSubmitTime :: Lens' Assignment (Maybe UTCTime)+aSubmitTime = lens _aSubmitTime (\ s a -> s{_aSubmitTime = a}) . mapping _Time;++instance FromJSON Assignment where+ parseJSON+ = withObject "Assignment"+ (\ x ->+ Assignment' <$>+ (x .:? "AcceptTime") <*> (x .:? "Answer") <*>+ (x .:? "AssignmentStatus")+ <*> (x .:? "RequesterFeedback")+ <*> (x .:? "Deadline")+ <*> (x .:? "ApprovalTime")+ <*> (x .:? "RejectionTime")+ <*> (x .:? "AutoApprovalTime")+ <*> (x .:? "HITId")+ <*> (x .:? "WorkerId")+ <*> (x .:? "AssignmentId")+ <*> (x .:? "SubmitTime"))++instance Hashable Assignment where++instance NFData Assignment where++-- | An object representing a Bonus payment paid to a Worker.+--+--+--+-- /See:/ 'bonusPayment' smart constructor.+data BonusPayment = BonusPayment'+ { _bpReason :: !(Maybe Text)+ , _bpGrantTime :: !(Maybe POSIX)+ , _bpWorkerId :: !(Maybe Text)+ , _bpAssignmentId :: !(Maybe Text)+ , _bpBonusAmount :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'BonusPayment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bpReason' - The Reason text given when the bonus was granted, if any.+--+-- * 'bpGrantTime' - The date and time of when the bonus was granted.+--+-- * 'bpWorkerId' - The ID of the Worker to whom the bonus was paid.+--+-- * 'bpAssignmentId' - The ID of the assignment associated with this bonus payment.+--+-- * 'bpBonusAmount' - Undocumented member.+bonusPayment+ :: BonusPayment+bonusPayment =+ BonusPayment'+ { _bpReason = Nothing+ , _bpGrantTime = Nothing+ , _bpWorkerId = Nothing+ , _bpAssignmentId = Nothing+ , _bpBonusAmount = Nothing+ }+++-- | The Reason text given when the bonus was granted, if any.+bpReason :: Lens' BonusPayment (Maybe Text)+bpReason = lens _bpReason (\ s a -> s{_bpReason = a});++-- | The date and time of when the bonus was granted.+bpGrantTime :: Lens' BonusPayment (Maybe UTCTime)+bpGrantTime = lens _bpGrantTime (\ s a -> s{_bpGrantTime = a}) . mapping _Time;++-- | The ID of the Worker to whom the bonus was paid.+bpWorkerId :: Lens' BonusPayment (Maybe Text)+bpWorkerId = lens _bpWorkerId (\ s a -> s{_bpWorkerId = a});++-- | The ID of the assignment associated with this bonus payment.+bpAssignmentId :: Lens' BonusPayment (Maybe Text)+bpAssignmentId = lens _bpAssignmentId (\ s a -> s{_bpAssignmentId = a});++-- | Undocumented member.+bpBonusAmount :: Lens' BonusPayment (Maybe Text)+bpBonusAmount = lens _bpBonusAmount (\ s a -> s{_bpBonusAmount = a});++instance FromJSON BonusPayment where+ parseJSON+ = withObject "BonusPayment"+ (\ x ->+ BonusPayment' <$>+ (x .:? "Reason") <*> (x .:? "GrantTime") <*>+ (x .:? "WorkerId")+ <*> (x .:? "AssignmentId")+ <*> (x .:? "BonusAmount"))++instance Hashable BonusPayment where++instance NFData BonusPayment where++-- | The HIT data structure represents a single HIT, including all the information necessary for a Worker to accept and complete the HIT.+--+--+--+-- /See:/ 'hIT' smart constructor.+data HIT = HIT'+ { _hitCreationTime :: !(Maybe POSIX)+ , _hitHITGroupId :: !(Maybe Text)+ , _hitNumberOfAssignmentsPending :: !(Maybe Int)+ , _hitHITTypeId :: !(Maybe Text)+ , _hitExpiration :: !(Maybe POSIX)+ , _hitAutoApprovalDelayInSeconds :: !(Maybe Integer)+ , _hitRequesterAnnotation :: !(Maybe Text)+ , _hitHITStatus :: !(Maybe HITStatus)+ , _hitMaxAssignments :: !(Maybe Int)+ , _hitNumberOfAssignmentsCompleted :: !(Maybe Int)+ , _hitReward :: !(Maybe Text)+ , _hitKeywords :: !(Maybe Text)+ , _hitHITLayoutId :: !(Maybe Text)+ , _hitQualificationRequirements :: !(Maybe [QualificationRequirement])+ , _hitTitle :: !(Maybe Text)+ , _hitHITId :: !(Maybe Text)+ , _hitHITReviewStatus :: !(Maybe HITReviewStatus)+ , _hitNumberOfAssignmentsAvailable :: !(Maybe Int)+ , _hitDescription :: !(Maybe Text)+ , _hitQuestion :: !(Maybe Text)+ , _hitAssignmentDurationInSeconds :: !(Maybe Integer)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'HIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hitCreationTime' - The date and time the HIT was created.+--+-- * 'hitHITGroupId' - The ID of the HIT Group of this HIT.+--+-- * 'hitNumberOfAssignmentsPending' - The number of assignments for this HIT that are being previewed or have been accepted by Workers, but have not yet been submitted, returned, or abandoned.+--+-- * 'hitHITTypeId' - The ID of the HIT type of this HIT+--+-- * 'hitExpiration' - The date and time the HIT expires.+--+-- * 'hitAutoApprovalDelayInSeconds' - The amount of time, in seconds, after the Worker submits an assignment for the HIT that the results are automatically approved by Amazon Mechanical Turk. This is the amount of time the Requester has to reject an assignment submitted by a Worker before the assignment is auto-approved and the Worker is paid.+--+-- * 'hitRequesterAnnotation' - An arbitrary data field the Requester who created the HIT can use. This field is visible only to the creator of the HIT.+--+-- * 'hitHITStatus' - The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.+--+-- * 'hitMaxAssignments' - The number of times the HIT can be accepted and completed before the HIT becomes unavailable.+--+-- * 'hitNumberOfAssignmentsCompleted' - The number of assignments for this HIT that have been approved or rejected.+--+-- * 'hitReward' - Undocumented member.+--+-- * 'hitKeywords' - One or more words or phrases that describe the HIT, separated by commas. Search terms similar to the keywords of a HIT are more likely to have the HIT in the search results.+--+-- * 'hitHITLayoutId' - The ID of the HIT Layout of this HIT.+--+-- * 'hitQualificationRequirements' - A condition that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and ten Qualification requirements. All requirements must be met by a Worker's Qualifications for the Worker to accept the HIT.+--+-- * 'hitTitle' - The title of the HIT.+--+-- * 'hitHITId' - A unique identifier for the HIT.+--+-- * 'hitHITReviewStatus' - Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.+--+-- * 'hitNumberOfAssignmentsAvailable' - The number of assignments for this HIT that are available for Workers to accept.+--+-- * 'hitDescription' - A general description of the HIT.+--+-- * 'hitQuestion' - The data the Worker completing the HIT uses produce the results. This is either either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure.+--+-- * 'hitAssignmentDurationInSeconds' - The length of time, in seconds, that a Worker has to complete the HIT after accepting it.+hIT+ :: HIT+hIT =+ HIT'+ { _hitCreationTime = Nothing+ , _hitHITGroupId = Nothing+ , _hitNumberOfAssignmentsPending = Nothing+ , _hitHITTypeId = Nothing+ , _hitExpiration = Nothing+ , _hitAutoApprovalDelayInSeconds = Nothing+ , _hitRequesterAnnotation = Nothing+ , _hitHITStatus = Nothing+ , _hitMaxAssignments = Nothing+ , _hitNumberOfAssignmentsCompleted = Nothing+ , _hitReward = Nothing+ , _hitKeywords = Nothing+ , _hitHITLayoutId = Nothing+ , _hitQualificationRequirements = Nothing+ , _hitTitle = Nothing+ , _hitHITId = Nothing+ , _hitHITReviewStatus = Nothing+ , _hitNumberOfAssignmentsAvailable = Nothing+ , _hitDescription = Nothing+ , _hitQuestion = Nothing+ , _hitAssignmentDurationInSeconds = Nothing+ }+++-- | The date and time the HIT was created.+hitCreationTime :: Lens' HIT (Maybe UTCTime)+hitCreationTime = lens _hitCreationTime (\ s a -> s{_hitCreationTime = a}) . mapping _Time;++-- | The ID of the HIT Group of this HIT.+hitHITGroupId :: Lens' HIT (Maybe Text)+hitHITGroupId = lens _hitHITGroupId (\ s a -> s{_hitHITGroupId = a});++-- | The number of assignments for this HIT that are being previewed or have been accepted by Workers, but have not yet been submitted, returned, or abandoned.+hitNumberOfAssignmentsPending :: Lens' HIT (Maybe Int)+hitNumberOfAssignmentsPending = lens _hitNumberOfAssignmentsPending (\ s a -> s{_hitNumberOfAssignmentsPending = a});++-- | The ID of the HIT type of this HIT+hitHITTypeId :: Lens' HIT (Maybe Text)+hitHITTypeId = lens _hitHITTypeId (\ s a -> s{_hitHITTypeId = a});++-- | The date and time the HIT expires.+hitExpiration :: Lens' HIT (Maybe UTCTime)+hitExpiration = lens _hitExpiration (\ s a -> s{_hitExpiration = a}) . mapping _Time;++-- | The amount of time, in seconds, after the Worker submits an assignment for the HIT that the results are automatically approved by Amazon Mechanical Turk. This is the amount of time the Requester has to reject an assignment submitted by a Worker before the assignment is auto-approved and the Worker is paid.+hitAutoApprovalDelayInSeconds :: Lens' HIT (Maybe Integer)+hitAutoApprovalDelayInSeconds = lens _hitAutoApprovalDelayInSeconds (\ s a -> s{_hitAutoApprovalDelayInSeconds = a});++-- | An arbitrary data field the Requester who created the HIT can use. This field is visible only to the creator of the HIT.+hitRequesterAnnotation :: Lens' HIT (Maybe Text)+hitRequesterAnnotation = lens _hitRequesterAnnotation (\ s a -> s{_hitRequesterAnnotation = a});++-- | The status of the HIT and its assignments. Valid Values are Assignable | Unassignable | Reviewable | Reviewing | Disposed.+hitHITStatus :: Lens' HIT (Maybe HITStatus)+hitHITStatus = lens _hitHITStatus (\ s a -> s{_hitHITStatus = a});++-- | The number of times the HIT can be accepted and completed before the HIT becomes unavailable.+hitMaxAssignments :: Lens' HIT (Maybe Int)+hitMaxAssignments = lens _hitMaxAssignments (\ s a -> s{_hitMaxAssignments = a});++-- | The number of assignments for this HIT that have been approved or rejected.+hitNumberOfAssignmentsCompleted :: Lens' HIT (Maybe Int)+hitNumberOfAssignmentsCompleted = lens _hitNumberOfAssignmentsCompleted (\ s a -> s{_hitNumberOfAssignmentsCompleted = a});++-- | Undocumented member.+hitReward :: Lens' HIT (Maybe Text)+hitReward = lens _hitReward (\ s a -> s{_hitReward = a});++-- | One or more words or phrases that describe the HIT, separated by commas. Search terms similar to the keywords of a HIT are more likely to have the HIT in the search results.+hitKeywords :: Lens' HIT (Maybe Text)+hitKeywords = lens _hitKeywords (\ s a -> s{_hitKeywords = a});++-- | The ID of the HIT Layout of this HIT.+hitHITLayoutId :: Lens' HIT (Maybe Text)+hitHITLayoutId = lens _hitHITLayoutId (\ s a -> s{_hitHITLayoutId = a});++-- | A condition that a Worker's Qualifications must meet in order to accept the HIT. A HIT can have between zero and ten Qualification requirements. All requirements must be met by a Worker's Qualifications for the Worker to accept the HIT.+hitQualificationRequirements :: Lens' HIT [QualificationRequirement]+hitQualificationRequirements = lens _hitQualificationRequirements (\ s a -> s{_hitQualificationRequirements = a}) . _Default . _Coerce;++-- | The title of the HIT.+hitTitle :: Lens' HIT (Maybe Text)+hitTitle = lens _hitTitle (\ s a -> s{_hitTitle = a});++-- | A unique identifier for the HIT.+hitHITId :: Lens' HIT (Maybe Text)+hitHITId = lens _hitHITId (\ s a -> s{_hitHITId = a});++-- | Indicates the review status of the HIT. Valid Values are NotReviewed | MarkedForReview | ReviewedAppropriate | ReviewedInappropriate.+hitHITReviewStatus :: Lens' HIT (Maybe HITReviewStatus)+hitHITReviewStatus = lens _hitHITReviewStatus (\ s a -> s{_hitHITReviewStatus = a});++-- | The number of assignments for this HIT that are available for Workers to accept.+hitNumberOfAssignmentsAvailable :: Lens' HIT (Maybe Int)+hitNumberOfAssignmentsAvailable = lens _hitNumberOfAssignmentsAvailable (\ s a -> s{_hitNumberOfAssignmentsAvailable = a});++-- | A general description of the HIT.+hitDescription :: Lens' HIT (Maybe Text)+hitDescription = lens _hitDescription (\ s a -> s{_hitDescription = a});++-- | The data the Worker completing the HIT uses produce the results. This is either either a QuestionForm, HTMLQuestion or an ExternalQuestion data structure.+hitQuestion :: Lens' HIT (Maybe Text)+hitQuestion = lens _hitQuestion (\ s a -> s{_hitQuestion = a});++-- | The length of time, in seconds, that a Worker has to complete the HIT after accepting it.+hitAssignmentDurationInSeconds :: Lens' HIT (Maybe Integer)+hitAssignmentDurationInSeconds = lens _hitAssignmentDurationInSeconds (\ s a -> s{_hitAssignmentDurationInSeconds = a});++instance FromJSON HIT where+ parseJSON+ = withObject "HIT"+ (\ x ->+ HIT' <$>+ (x .:? "CreationTime") <*> (x .:? "HITGroupId") <*>+ (x .:? "NumberOfAssignmentsPending")+ <*> (x .:? "HITTypeId")+ <*> (x .:? "Expiration")+ <*> (x .:? "AutoApprovalDelayInSeconds")+ <*> (x .:? "RequesterAnnotation")+ <*> (x .:? "HITStatus")+ <*> (x .:? "MaxAssignments")+ <*> (x .:? "NumberOfAssignmentsCompleted")+ <*> (x .:? "Reward")+ <*> (x .:? "Keywords")+ <*> (x .:? "HITLayoutId")+ <*> (x .:? "QualificationRequirements" .!= mempty)+ <*> (x .:? "Title")+ <*> (x .:? "HITId")+ <*> (x .:? "HITReviewStatus")+ <*> (x .:? "NumberOfAssignmentsAvailable")+ <*> (x .:? "Description")+ <*> (x .:? "Question")+ <*> (x .:? "AssignmentDurationInSeconds"))++instance Hashable HIT where++instance NFData HIT where++-- | The HITLayoutParameter data structure defines parameter values used with a HITLayout. A HITLayout is a reusable Amazon Mechanical Turk project template used to provide Human Intelligence Task (HIT) question data for CreateHIT.+--+--+--+-- /See:/ 'hITLayoutParameter' smart constructor.+data HITLayoutParameter = HITLayoutParameter'+ { _hitlpName :: !Text+ , _hitlpValue :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'HITLayoutParameter' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hitlpName' - The name of the parameter in the HITLayout.+--+-- * 'hitlpValue' - The value substituted for the parameter referenced in the HITLayout.+hITLayoutParameter+ :: Text -- ^ 'hitlpName'+ -> Text -- ^ 'hitlpValue'+ -> HITLayoutParameter+hITLayoutParameter pName_ pValue_ =+ HITLayoutParameter' {_hitlpName = pName_, _hitlpValue = pValue_}+++-- | The name of the parameter in the HITLayout.+hitlpName :: Lens' HITLayoutParameter Text+hitlpName = lens _hitlpName (\ s a -> s{_hitlpName = a});++-- | The value substituted for the parameter referenced in the HITLayout.+hitlpValue :: Lens' HITLayoutParameter Text+hitlpValue = lens _hitlpValue (\ s a -> s{_hitlpValue = a});++instance Hashable HITLayoutParameter where++instance NFData HITLayoutParameter where++instance ToJSON HITLayoutParameter where+ toJSON HITLayoutParameter'{..}+ = object+ (catMaybes+ [Just ("Name" .= _hitlpName),+ Just ("Value" .= _hitlpValue)])++-- | The Locale data structure represents a geographical region or location.+--+--+--+-- /See:/ 'locale' smart constructor.+data Locale = Locale'+ { _lSubdivision :: !(Maybe Text)+ , _lCountry :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Locale' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lSubdivision' - The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.+--+-- * 'lCountry' - The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.+locale+ :: Text -- ^ 'lCountry'+ -> Locale+locale pCountry_ = Locale' {_lSubdivision = Nothing, _lCountry = pCountry_}+++-- | The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.+lSubdivision :: Lens' Locale (Maybe Text)+lSubdivision = lens _lSubdivision (\ s a -> s{_lSubdivision = a});++-- | The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.+lCountry :: Lens' Locale Text+lCountry = lens _lCountry (\ s a -> s{_lCountry = a});++instance FromJSON Locale where+ parseJSON+ = withObject "Locale"+ (\ x ->+ Locale' <$>+ (x .:? "Subdivision") <*> (x .: "Country"))++instance Hashable Locale where++instance NFData Locale where++instance ToJSON Locale where+ toJSON Locale'{..}+ = object+ (catMaybes+ [("Subdivision" .=) <$> _lSubdivision,+ Just ("Country" .= _lCountry)])++-- | The NotificationSpecification data structure describes a HIT event notification for a HIT type.+--+--+--+-- /See:/ 'notificationSpecification' smart constructor.+data NotificationSpecification = NotificationSpecification'+ { _nsDestination :: !Text+ , _nsTransport :: !NotificationTransport+ , _nsVersion :: !Text+ , _nsEventTypes :: ![EventType]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'NotificationSpecification' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'nsDestination' - The target for notification messages. The Destination’s format is determined by the specified Transport: * When Transport is Email, the Destination is your email address. * When Transport is SQS, the Destination is your queue URL. * When Transport is SNS, the Destination is the ARN of your topic.+--+-- * 'nsTransport' - The method Amazon Mechanical Turk uses to send the notification. Valid Values: Email | SQS | SNS.+--+-- * 'nsVersion' - The version of the Notification API to use. Valid value is 2006-05-05.+--+-- * 'nsEventTypes' - The list of events that should cause notifications to be sent. Valid Values: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is only valid for the SendTestEventNotification operation.+notificationSpecification+ :: Text -- ^ 'nsDestination'+ -> NotificationTransport -- ^ 'nsTransport'+ -> Text -- ^ 'nsVersion'+ -> NotificationSpecification+notificationSpecification pDestination_ pTransport_ pVersion_ =+ NotificationSpecification'+ { _nsDestination = pDestination_+ , _nsTransport = pTransport_+ , _nsVersion = pVersion_+ , _nsEventTypes = mempty+ }+++-- | The target for notification messages. The Destination’s format is determined by the specified Transport: * When Transport is Email, the Destination is your email address. * When Transport is SQS, the Destination is your queue URL. * When Transport is SNS, the Destination is the ARN of your topic.+nsDestination :: Lens' NotificationSpecification Text+nsDestination = lens _nsDestination (\ s a -> s{_nsDestination = a});++-- | The method Amazon Mechanical Turk uses to send the notification. Valid Values: Email | SQS | SNS.+nsTransport :: Lens' NotificationSpecification NotificationTransport+nsTransport = lens _nsTransport (\ s a -> s{_nsTransport = a});++-- | The version of the Notification API to use. Valid value is 2006-05-05.+nsVersion :: Lens' NotificationSpecification Text+nsVersion = lens _nsVersion (\ s a -> s{_nsVersion = a});++-- | The list of events that should cause notifications to be sent. Valid Values: AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is only valid for the SendTestEventNotification operation.+nsEventTypes :: Lens' NotificationSpecification [EventType]+nsEventTypes = lens _nsEventTypes (\ s a -> s{_nsEventTypes = a}) . _Coerce;++instance Hashable NotificationSpecification where++instance NFData NotificationSpecification where++instance ToJSON NotificationSpecification where+ toJSON NotificationSpecification'{..}+ = object+ (catMaybes+ [Just ("Destination" .= _nsDestination),+ Just ("Transport" .= _nsTransport),+ Just ("Version" .= _nsVersion),+ Just ("EventTypes" .= _nsEventTypes)])++-- | When MTurk encounters an issue with notifying the Workers you specified, it returns back this object with failure details.+--+--+--+-- /See:/ 'notifyWorkersFailureStatus' smart constructor.+data NotifyWorkersFailureStatus = NotifyWorkersFailureStatus'+ { _nwfsNotifyWorkersFailureMessage :: !(Maybe Text)+ , _nwfsNotifyWorkersFailureCode :: !(Maybe NotifyWorkersFailureCode)+ , _nwfsWorkerId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'NotifyWorkersFailureStatus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'nwfsNotifyWorkersFailureMessage' - A message detailing the reason the Worker could not be notified.+--+-- * 'nwfsNotifyWorkersFailureCode' - Encoded value for the failure type.+--+-- * 'nwfsWorkerId' - The ID of the Worker.+notifyWorkersFailureStatus+ :: NotifyWorkersFailureStatus+notifyWorkersFailureStatus =+ NotifyWorkersFailureStatus'+ { _nwfsNotifyWorkersFailureMessage = Nothing+ , _nwfsNotifyWorkersFailureCode = Nothing+ , _nwfsWorkerId = Nothing+ }+++-- | A message detailing the reason the Worker could not be notified.+nwfsNotifyWorkersFailureMessage :: Lens' NotifyWorkersFailureStatus (Maybe Text)+nwfsNotifyWorkersFailureMessage = lens _nwfsNotifyWorkersFailureMessage (\ s a -> s{_nwfsNotifyWorkersFailureMessage = a});++-- | Encoded value for the failure type.+nwfsNotifyWorkersFailureCode :: Lens' NotifyWorkersFailureStatus (Maybe NotifyWorkersFailureCode)+nwfsNotifyWorkersFailureCode = lens _nwfsNotifyWorkersFailureCode (\ s a -> s{_nwfsNotifyWorkersFailureCode = a});++-- | The ID of the Worker.+nwfsWorkerId :: Lens' NotifyWorkersFailureStatus (Maybe Text)+nwfsWorkerId = lens _nwfsWorkerId (\ s a -> s{_nwfsWorkerId = a});++instance FromJSON NotifyWorkersFailureStatus where+ parseJSON+ = withObject "NotifyWorkersFailureStatus"+ (\ x ->+ NotifyWorkersFailureStatus' <$>+ (x .:? "NotifyWorkersFailureMessage") <*>+ (x .:? "NotifyWorkersFailureCode")+ <*> (x .:? "WorkerId"))++instance Hashable NotifyWorkersFailureStatus where++instance NFData NotifyWorkersFailureStatus where++-- | This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.+--+--+--+-- /See:/ 'parameterMapEntry' smart constructor.+data ParameterMapEntry = ParameterMapEntry'+ { _pmeValues :: !(Maybe [Text])+ , _pmeKey :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ParameterMapEntry' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pmeValues' - The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.+--+-- * 'pmeKey' - The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.+parameterMapEntry+ :: ParameterMapEntry+parameterMapEntry = ParameterMapEntry' {_pmeValues = Nothing, _pmeKey = Nothing}+++-- | The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.+pmeValues :: Lens' ParameterMapEntry [Text]+pmeValues = lens _pmeValues (\ s a -> s{_pmeValues = a}) . _Default . _Coerce;++-- | The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.+pmeKey :: Lens' ParameterMapEntry (Maybe Text)+pmeKey = lens _pmeKey (\ s a -> s{_pmeKey = a});++instance FromJSON ParameterMapEntry where+ parseJSON+ = withObject "ParameterMapEntry"+ (\ x ->+ ParameterMapEntry' <$>+ (x .:? "Values" .!= mempty) <*> (x .:? "Key"))++instance Hashable ParameterMapEntry where++instance NFData ParameterMapEntry where++instance ToJSON ParameterMapEntry where+ toJSON ParameterMapEntry'{..}+ = object+ (catMaybes+ [("Values" .=) <$> _pmeValues,+ ("Key" .=) <$> _pmeKey])++-- | Name of the parameter from the Review policy.+--+--+--+-- /See:/ 'policyParameter' smart constructor.+data PolicyParameter = PolicyParameter'+ { _ppValues :: !(Maybe [Text])+ , _ppMapEntries :: !(Maybe [ParameterMapEntry])+ , _ppKey :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PolicyParameter' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ppValues' - The list of values of the Parameter+--+-- * 'ppMapEntries' - List of ParameterMapEntry objects.+--+-- * 'ppKey' - Name of the parameter from the list of Review Polices.+policyParameter+ :: PolicyParameter+policyParameter =+ PolicyParameter'+ {_ppValues = Nothing, _ppMapEntries = Nothing, _ppKey = Nothing}+++-- | The list of values of the Parameter+ppValues :: Lens' PolicyParameter [Text]+ppValues = lens _ppValues (\ s a -> s{_ppValues = a}) . _Default . _Coerce;++-- | List of ParameterMapEntry objects.+ppMapEntries :: Lens' PolicyParameter [ParameterMapEntry]+ppMapEntries = lens _ppMapEntries (\ s a -> s{_ppMapEntries = a}) . _Default . _Coerce;++-- | Name of the parameter from the list of Review Polices.+ppKey :: Lens' PolicyParameter (Maybe Text)+ppKey = lens _ppKey (\ s a -> s{_ppKey = a});++instance FromJSON PolicyParameter where+ parseJSON+ = withObject "PolicyParameter"+ (\ x ->+ PolicyParameter' <$>+ (x .:? "Values" .!= mempty) <*>+ (x .:? "MapEntries" .!= mempty)+ <*> (x .:? "Key"))++instance Hashable PolicyParameter where++instance NFData PolicyParameter where++instance ToJSON PolicyParameter where+ toJSON PolicyParameter'{..}+ = object+ (catMaybes+ [("Values" .=) <$> _ppValues,+ ("MapEntries" .=) <$> _ppMapEntries,+ ("Key" .=) <$> _ppKey])++-- | The Qualification data structure represents a Qualification assigned to a user, including the Qualification type and the value (score).+--+--+--+-- /See:/ 'qualification' smart constructor.+data Qualification = Qualification'+ { _qStatus :: !(Maybe QualificationStatus)+ , _qIntegerValue :: !(Maybe Int)+ , _qLocaleValue :: !(Maybe Locale)+ , _qQualificationTypeId :: !(Maybe Text)+ , _qGrantTime :: !(Maybe POSIX)+ , _qWorkerId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Qualification' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qStatus' - The status of the Qualification. Valid values are Granted | Revoked.+--+-- * 'qIntegerValue' - The value (score) of the Qualification, if the Qualification has an integer value.+--+-- * 'qLocaleValue' - Undocumented member.+--+-- * 'qQualificationTypeId' - The ID of the Qualification type for the Qualification.+--+-- * 'qGrantTime' - The date and time the Qualification was granted to the Worker. If the Worker's Qualification was revoked, and then re-granted based on a new Qualification request, GrantTime is the date and time of the last call to the AcceptQualificationRequest operation.+--+-- * 'qWorkerId' - The ID of the Worker who possesses the Qualification.+qualification+ :: Qualification+qualification =+ Qualification'+ { _qStatus = Nothing+ , _qIntegerValue = Nothing+ , _qLocaleValue = Nothing+ , _qQualificationTypeId = Nothing+ , _qGrantTime = Nothing+ , _qWorkerId = Nothing+ }+++-- | The status of the Qualification. Valid values are Granted | Revoked.+qStatus :: Lens' Qualification (Maybe QualificationStatus)+qStatus = lens _qStatus (\ s a -> s{_qStatus = a});++-- | The value (score) of the Qualification, if the Qualification has an integer value.+qIntegerValue :: Lens' Qualification (Maybe Int)+qIntegerValue = lens _qIntegerValue (\ s a -> s{_qIntegerValue = a});++-- | Undocumented member.+qLocaleValue :: Lens' Qualification (Maybe Locale)+qLocaleValue = lens _qLocaleValue (\ s a -> s{_qLocaleValue = a});++-- | The ID of the Qualification type for the Qualification.+qQualificationTypeId :: Lens' Qualification (Maybe Text)+qQualificationTypeId = lens _qQualificationTypeId (\ s a -> s{_qQualificationTypeId = a});++-- | The date and time the Qualification was granted to the Worker. If the Worker's Qualification was revoked, and then re-granted based on a new Qualification request, GrantTime is the date and time of the last call to the AcceptQualificationRequest operation.+qGrantTime :: Lens' Qualification (Maybe UTCTime)+qGrantTime = lens _qGrantTime (\ s a -> s{_qGrantTime = a}) . mapping _Time;++-- | The ID of the Worker who possesses the Qualification.+qWorkerId :: Lens' Qualification (Maybe Text)+qWorkerId = lens _qWorkerId (\ s a -> s{_qWorkerId = a});++instance FromJSON Qualification where+ parseJSON+ = withObject "Qualification"+ (\ x ->+ Qualification' <$>+ (x .:? "Status") <*> (x .:? "IntegerValue") <*>+ (x .:? "LocaleValue")+ <*> (x .:? "QualificationTypeId")+ <*> (x .:? "GrantTime")+ <*> (x .:? "WorkerId"))++instance Hashable Qualification where++instance NFData Qualification where++-- | The QualificationRequest data structure represents a request a Worker has made for a Qualification.+--+--+--+-- /See:/ 'qualificationRequest' smart constructor.+data QualificationRequest = QualificationRequest'+ { _quaQualificationRequestId :: !(Maybe Text)+ , _quaTest :: !(Maybe Text)+ , _quaQualificationTypeId :: !(Maybe Text)+ , _quaAnswer :: !(Maybe Text)+ , _quaWorkerId :: !(Maybe Text)+ , _quaSubmitTime :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QualificationRequest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'quaQualificationRequestId' - The ID of the Qualification request, a unique identifier generated when the request was submitted.+--+-- * 'quaTest' - The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the time the Worker requests the Qualification.+--+-- * 'quaQualificationTypeId' - The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation.+--+-- * 'quaAnswer' - The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty.+--+-- * 'quaWorkerId' - The ID of the Worker requesting the Qualification.+--+-- * 'quaSubmitTime' - The date and time the Qualification request had a status of Submitted. This is either the time the Worker submitted answers for a Qualification test, or the time the Worker requested the Qualification if the Qualification type does not have a test.+qualificationRequest+ :: QualificationRequest+qualificationRequest =+ QualificationRequest'+ { _quaQualificationRequestId = Nothing+ , _quaTest = Nothing+ , _quaQualificationTypeId = Nothing+ , _quaAnswer = Nothing+ , _quaWorkerId = Nothing+ , _quaSubmitTime = Nothing+ }+++-- | The ID of the Qualification request, a unique identifier generated when the request was submitted.+quaQualificationRequestId :: Lens' QualificationRequest (Maybe Text)+quaQualificationRequestId = lens _quaQualificationRequestId (\ s a -> s{_quaQualificationRequestId = a});++-- | The contents of the Qualification test that was presented to the Worker, if the type has a test and the Worker has submitted answers. This value is identical to the QuestionForm associated with the Qualification type at the time the Worker requests the Qualification.+quaTest :: Lens' QualificationRequest (Maybe Text)+quaTest = lens _quaTest (\ s a -> s{_quaTest = a});++-- | The ID of the Qualification type the Worker is requesting, as returned by the CreateQualificationType operation.+quaQualificationTypeId :: Lens' QualificationRequest (Maybe Text)+quaQualificationTypeId = lens _quaQualificationTypeId (\ s a -> s{_quaQualificationTypeId = a});++-- | The Worker's answers for the Qualification type's test contained in a QuestionFormAnswers document, if the type has a test and the Worker has submitted answers. If the Worker does not provide any answers, Answer may be empty.+quaAnswer :: Lens' QualificationRequest (Maybe Text)+quaAnswer = lens _quaAnswer (\ s a -> s{_quaAnswer = a});++-- | The ID of the Worker requesting the Qualification.+quaWorkerId :: Lens' QualificationRequest (Maybe Text)+quaWorkerId = lens _quaWorkerId (\ s a -> s{_quaWorkerId = a});++-- | The date and time the Qualification request had a status of Submitted. This is either the time the Worker submitted answers for a Qualification test, or the time the Worker requested the Qualification if the Qualification type does not have a test.+quaSubmitTime :: Lens' QualificationRequest (Maybe UTCTime)+quaSubmitTime = lens _quaSubmitTime (\ s a -> s{_quaSubmitTime = a}) . mapping _Time;++instance FromJSON QualificationRequest where+ parseJSON+ = withObject "QualificationRequest"+ (\ x ->+ QualificationRequest' <$>+ (x .:? "QualificationRequestId") <*> (x .:? "Test")+ <*> (x .:? "QualificationTypeId")+ <*> (x .:? "Answer")+ <*> (x .:? "WorkerId")+ <*> (x .:? "SubmitTime"))++instance Hashable QualificationRequest where++instance NFData QualificationRequest where++-- | The QualificationRequirement data structure describes a Qualification that a Worker must have before the Worker is allowed to accept a HIT. A requirement may optionally state that a Worker must have the Qualification in order to preview the HIT.+--+--+--+-- /See:/ 'qualificationRequirement' smart constructor.+data QualificationRequirement = QualificationRequirement'+ { _qrLocaleValues :: !(Maybe [Locale])+ , _qrRequiredToPreview :: !(Maybe Bool)+ , _qrIntegerValues :: !(Maybe [Int])+ , _qrQualificationTypeId :: !Text+ , _qrComparator :: !Comparator+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QualificationRequirement' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qrLocaleValues' - The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.+--+-- * 'qrRequiredToPreview' - If true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false.+--+-- * 'qrIntegerValues' - The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.+--+-- * 'qrQualificationTypeId' - The ID of the Qualification type for the requirement.+--+-- * 'qrComparator' - The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.+qualificationRequirement+ :: Text -- ^ 'qrQualificationTypeId'+ -> Comparator -- ^ 'qrComparator'+ -> QualificationRequirement+qualificationRequirement pQualificationTypeId_ pComparator_ =+ QualificationRequirement'+ { _qrLocaleValues = Nothing+ , _qrRequiredToPreview = Nothing+ , _qrIntegerValues = Nothing+ , _qrQualificationTypeId = pQualificationTypeId_+ , _qrComparator = pComparator_+ }+++-- | The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.+qrLocaleValues :: Lens' QualificationRequirement [Locale]+qrLocaleValues = lens _qrLocaleValues (\ s a -> s{_qrLocaleValues = a}) . _Default . _Coerce;++-- | If true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false.+qrRequiredToPreview :: Lens' QualificationRequirement (Maybe Bool)+qrRequiredToPreview = lens _qrRequiredToPreview (\ s a -> s{_qrRequiredToPreview = a});++-- | The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.+qrIntegerValues :: Lens' QualificationRequirement [Int]+qrIntegerValues = lens _qrIntegerValues (\ s a -> s{_qrIntegerValues = a}) . _Default . _Coerce;++-- | The ID of the Qualification type for the requirement.+qrQualificationTypeId :: Lens' QualificationRequirement Text+qrQualificationTypeId = lens _qrQualificationTypeId (\ s a -> s{_qrQualificationTypeId = a});++-- | The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.+qrComparator :: Lens' QualificationRequirement Comparator+qrComparator = lens _qrComparator (\ s a -> s{_qrComparator = a});++instance FromJSON QualificationRequirement where+ parseJSON+ = withObject "QualificationRequirement"+ (\ x ->+ QualificationRequirement' <$>+ (x .:? "LocaleValues" .!= mempty) <*>+ (x .:? "RequiredToPreview")+ <*> (x .:? "IntegerValues" .!= mempty)+ <*> (x .: "QualificationTypeId")+ <*> (x .: "Comparator"))++instance Hashable QualificationRequirement where++instance NFData QualificationRequirement where++instance ToJSON QualificationRequirement where+ toJSON QualificationRequirement'{..}+ = object+ (catMaybes+ [("LocaleValues" .=) <$> _qrLocaleValues,+ ("RequiredToPreview" .=) <$> _qrRequiredToPreview,+ ("IntegerValues" .=) <$> _qrIntegerValues,+ Just+ ("QualificationTypeId" .= _qrQualificationTypeId),+ Just ("Comparator" .= _qrComparator)])++-- | The QualificationType data structure represents a Qualification type, a description of a property of a Worker that must match the requirements of a HIT for the Worker to be able to accept the HIT. The type also describes how a Worker can obtain a Qualification of that type, such as through a Qualification test.+--+--+--+-- /See:/ 'qualificationType' smart constructor.+data QualificationType = QualificationType'+ { _qtCreationTime :: !(Maybe POSIX)+ , _qtTestDurationInSeconds :: !(Maybe Integer)+ , _qtQualificationTypeStatus :: !(Maybe QualificationTypeStatus)+ , _qtAnswerKey :: !(Maybe Text)+ , _qtTest :: !(Maybe Text)+ , _qtQualificationTypeId :: !(Maybe Text)+ , _qtName :: !(Maybe Text)+ , _qtKeywords :: !(Maybe Text)+ , _qtAutoGranted :: !(Maybe Bool)+ , _qtAutoGrantedValue :: !(Maybe Int)+ , _qtDescription :: !(Maybe Text)+ , _qtIsRequestable :: !(Maybe Bool)+ , _qtRetryDelayInSeconds :: !(Maybe Integer)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qtCreationTime' - The date and time the Qualification type was created.+--+-- * 'qtTestDurationInSeconds' - The amount of time, in seconds, given to a Worker to complete the Qualification test, beginning from the time the Worker requests the Qualification.+--+-- * 'qtQualificationTypeStatus' - The status of the Qualification type. A Qualification type's status determines if users can apply to receive a Qualification of this type, and if HITs can be created with requirements based on this type. Valid values are Active | Inactive.+--+-- * 'qtAnswerKey' - The answers to the Qualification test specified in the Test parameter.+--+-- * 'qtTest' - The questions for a Qualification test associated with this Qualification type that a user can take to obtain a Qualification of this type. This parameter must be specified if AnswerKey is present. A Qualification type cannot have both a specified Test parameter and an AutoGranted value of true.+--+-- * 'qtQualificationTypeId' - A unique identifier for the Qualification type. A Qualification type is given a Qualification type ID when you call the CreateQualificationType operation.+--+-- * 'qtName' - The name of the Qualification type. The type name is used to identify the type, and to find the type using a Qualification type search.+--+-- * 'qtKeywords' - One or more words or phrases that describe theQualification type, separated by commas. The Keywords make the type easier to find using a search.+--+-- * 'qtAutoGranted' - Specifies that requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Valid values are True | False.+--+-- * 'qtAutoGrantedValue' - The Qualification integer value to use for automatically granted Qualifications, if AutoGranted is true. This is 1 by default.+--+-- * 'qtDescription' - A long description for the Qualification type.+--+-- * 'qtIsRequestable' - Specifies whether the Qualification type is one that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test. This value is False for Qualifications assigned automatically by the system. Valid values are True | False.+--+-- * 'qtRetryDelayInSeconds' - The amount of time, in seconds, Workers must wait after taking the Qualification test before they can take it again. Workers can take a Qualification test multiple times if they were not granted the Qualification from a previous attempt, or if the test offers a gradient score and they want a better score. If not specified, retries are disabled and Workers can request a Qualification only once.+qualificationType+ :: QualificationType+qualificationType =+ QualificationType'+ { _qtCreationTime = Nothing+ , _qtTestDurationInSeconds = Nothing+ , _qtQualificationTypeStatus = Nothing+ , _qtAnswerKey = Nothing+ , _qtTest = Nothing+ , _qtQualificationTypeId = Nothing+ , _qtName = Nothing+ , _qtKeywords = Nothing+ , _qtAutoGranted = Nothing+ , _qtAutoGrantedValue = Nothing+ , _qtDescription = Nothing+ , _qtIsRequestable = Nothing+ , _qtRetryDelayInSeconds = Nothing+ }+++-- | The date and time the Qualification type was created.+qtCreationTime :: Lens' QualificationType (Maybe UTCTime)+qtCreationTime = lens _qtCreationTime (\ s a -> s{_qtCreationTime = a}) . mapping _Time;++-- | The amount of time, in seconds, given to a Worker to complete the Qualification test, beginning from the time the Worker requests the Qualification.+qtTestDurationInSeconds :: Lens' QualificationType (Maybe Integer)+qtTestDurationInSeconds = lens _qtTestDurationInSeconds (\ s a -> s{_qtTestDurationInSeconds = a});++-- | The status of the Qualification type. A Qualification type's status determines if users can apply to receive a Qualification of this type, and if HITs can be created with requirements based on this type. Valid values are Active | Inactive.+qtQualificationTypeStatus :: Lens' QualificationType (Maybe QualificationTypeStatus)+qtQualificationTypeStatus = lens _qtQualificationTypeStatus (\ s a -> s{_qtQualificationTypeStatus = a});++-- | The answers to the Qualification test specified in the Test parameter.+qtAnswerKey :: Lens' QualificationType (Maybe Text)+qtAnswerKey = lens _qtAnswerKey (\ s a -> s{_qtAnswerKey = a});++-- | The questions for a Qualification test associated with this Qualification type that a user can take to obtain a Qualification of this type. This parameter must be specified if AnswerKey is present. A Qualification type cannot have both a specified Test parameter and an AutoGranted value of true.+qtTest :: Lens' QualificationType (Maybe Text)+qtTest = lens _qtTest (\ s a -> s{_qtTest = a});++-- | A unique identifier for the Qualification type. A Qualification type is given a Qualification type ID when you call the CreateQualificationType operation.+qtQualificationTypeId :: Lens' QualificationType (Maybe Text)+qtQualificationTypeId = lens _qtQualificationTypeId (\ s a -> s{_qtQualificationTypeId = a});++-- | The name of the Qualification type. The type name is used to identify the type, and to find the type using a Qualification type search.+qtName :: Lens' QualificationType (Maybe Text)+qtName = lens _qtName (\ s a -> s{_qtName = a});++-- | One or more words or phrases that describe theQualification type, separated by commas. The Keywords make the type easier to find using a search.+qtKeywords :: Lens' QualificationType (Maybe Text)+qtKeywords = lens _qtKeywords (\ s a -> s{_qtKeywords = a});++-- | Specifies that requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Valid values are True | False.+qtAutoGranted :: Lens' QualificationType (Maybe Bool)+qtAutoGranted = lens _qtAutoGranted (\ s a -> s{_qtAutoGranted = a});++-- | The Qualification integer value to use for automatically granted Qualifications, if AutoGranted is true. This is 1 by default.+qtAutoGrantedValue :: Lens' QualificationType (Maybe Int)+qtAutoGrantedValue = lens _qtAutoGrantedValue (\ s a -> s{_qtAutoGrantedValue = a});++-- | A long description for the Qualification type.+qtDescription :: Lens' QualificationType (Maybe Text)+qtDescription = lens _qtDescription (\ s a -> s{_qtDescription = a});++-- | Specifies whether the Qualification type is one that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test. This value is False for Qualifications assigned automatically by the system. Valid values are True | False.+qtIsRequestable :: Lens' QualificationType (Maybe Bool)+qtIsRequestable = lens _qtIsRequestable (\ s a -> s{_qtIsRequestable = a});++-- | The amount of time, in seconds, Workers must wait after taking the Qualification test before they can take it again. Workers can take a Qualification test multiple times if they were not granted the Qualification from a previous attempt, or if the test offers a gradient score and they want a better score. If not specified, retries are disabled and Workers can request a Qualification only once.+qtRetryDelayInSeconds :: Lens' QualificationType (Maybe Integer)+qtRetryDelayInSeconds = lens _qtRetryDelayInSeconds (\ s a -> s{_qtRetryDelayInSeconds = a});++instance FromJSON QualificationType where+ parseJSON+ = withObject "QualificationType"+ (\ x ->+ QualificationType' <$>+ (x .:? "CreationTime") <*>+ (x .:? "TestDurationInSeconds")+ <*> (x .:? "QualificationTypeStatus")+ <*> (x .:? "AnswerKey")+ <*> (x .:? "Test")+ <*> (x .:? "QualificationTypeId")+ <*> (x .:? "Name")+ <*> (x .:? "Keywords")+ <*> (x .:? "AutoGranted")+ <*> (x .:? "AutoGrantedValue")+ <*> (x .:? "Description")+ <*> (x .:? "IsRequestable")+ <*> (x .:? "RetryDelayInSeconds"))++instance Hashable QualificationType where++instance NFData QualificationType where++-- | Both the AssignmentReviewReport and the HITReviewReport elements contains the ReviewActionDetail data structure. This structure is returned multiple times for each action specified in the Review Policy.+--+--+--+-- /See:/ 'reviewActionDetail' smart constructor.+data ReviewActionDetail = ReviewActionDetail'+ { _radStatus :: !(Maybe ReviewActionStatus)+ , _radTargetId :: !(Maybe Text)+ , _radActionId :: !(Maybe Text)+ , _radTargetType :: !(Maybe Text)+ , _radResult :: !(Maybe Text)+ , _radActionName :: !(Maybe Text)+ , _radCompleteTime :: !(Maybe POSIX)+ , _radErrorCode :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ReviewActionDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'radStatus' - The current disposition of the action: INTENDED, SUCCEEDED, FAILED, or CANCELLED.+--+-- * 'radTargetId' - The specific HITId or AssignmentID targeted by the action.+--+-- * 'radActionId' - The unique identifier for the action.+--+-- * 'radTargetType' - The type of object in TargetId.+--+-- * 'radResult' - A description of the outcome of the review.+--+-- * 'radActionName' - The nature of the action itself. The Review Policy is responsible for examining the HIT and Assignments, emitting results, and deciding which other actions will be necessary.+--+-- * 'radCompleteTime' - The date when the action was completed.+--+-- * 'radErrorCode' - Present only when the Results have a FAILED Status.+reviewActionDetail+ :: ReviewActionDetail+reviewActionDetail =+ ReviewActionDetail'+ { _radStatus = Nothing+ , _radTargetId = Nothing+ , _radActionId = Nothing+ , _radTargetType = Nothing+ , _radResult = Nothing+ , _radActionName = Nothing+ , _radCompleteTime = Nothing+ , _radErrorCode = Nothing+ }+++-- | The current disposition of the action: INTENDED, SUCCEEDED, FAILED, or CANCELLED.+radStatus :: Lens' ReviewActionDetail (Maybe ReviewActionStatus)+radStatus = lens _radStatus (\ s a -> s{_radStatus = a});++-- | The specific HITId or AssignmentID targeted by the action.+radTargetId :: Lens' ReviewActionDetail (Maybe Text)+radTargetId = lens _radTargetId (\ s a -> s{_radTargetId = a});++-- | The unique identifier for the action.+radActionId :: Lens' ReviewActionDetail (Maybe Text)+radActionId = lens _radActionId (\ s a -> s{_radActionId = a});++-- | The type of object in TargetId.+radTargetType :: Lens' ReviewActionDetail (Maybe Text)+radTargetType = lens _radTargetType (\ s a -> s{_radTargetType = a});++-- | A description of the outcome of the review.+radResult :: Lens' ReviewActionDetail (Maybe Text)+radResult = lens _radResult (\ s a -> s{_radResult = a});++-- | The nature of the action itself. The Review Policy is responsible for examining the HIT and Assignments, emitting results, and deciding which other actions will be necessary.+radActionName :: Lens' ReviewActionDetail (Maybe Text)+radActionName = lens _radActionName (\ s a -> s{_radActionName = a});++-- | The date when the action was completed.+radCompleteTime :: Lens' ReviewActionDetail (Maybe UTCTime)+radCompleteTime = lens _radCompleteTime (\ s a -> s{_radCompleteTime = a}) . mapping _Time;++-- | Present only when the Results have a FAILED Status.+radErrorCode :: Lens' ReviewActionDetail (Maybe Text)+radErrorCode = lens _radErrorCode (\ s a -> s{_radErrorCode = a});++instance FromJSON ReviewActionDetail where+ parseJSON+ = withObject "ReviewActionDetail"+ (\ x ->+ ReviewActionDetail' <$>+ (x .:? "Status") <*> (x .:? "TargetId") <*>+ (x .:? "ActionId")+ <*> (x .:? "TargetType")+ <*> (x .:? "Result")+ <*> (x .:? "ActionName")+ <*> (x .:? "CompleteTime")+ <*> (x .:? "ErrorCode"))++instance Hashable ReviewActionDetail where++instance NFData ReviewActionDetail where++-- | HIT Review Policy data structures represent HIT review policies, which you specify when you create a HIT.+--+--+--+-- /See:/ 'reviewPolicy' smart constructor.+data ReviewPolicy = ReviewPolicy'+ { _rpParameters :: !(Maybe [PolicyParameter])+ , _rpPolicyName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ReviewPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rpParameters' - Name of the parameter from the Review policy.+--+-- * 'rpPolicyName' - Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01+reviewPolicy+ :: Text -- ^ 'rpPolicyName'+ -> ReviewPolicy+reviewPolicy pPolicyName_ =+ ReviewPolicy' {_rpParameters = Nothing, _rpPolicyName = pPolicyName_}+++-- | Name of the parameter from the Review policy.+rpParameters :: Lens' ReviewPolicy [PolicyParameter]+rpParameters = lens _rpParameters (\ s a -> s{_rpParameters = a}) . _Default . _Coerce;++-- | Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01+rpPolicyName :: Lens' ReviewPolicy Text+rpPolicyName = lens _rpPolicyName (\ s a -> s{_rpPolicyName = a});++instance FromJSON ReviewPolicy where+ parseJSON+ = withObject "ReviewPolicy"+ (\ x ->+ ReviewPolicy' <$>+ (x .:? "Parameters" .!= mempty) <*>+ (x .: "PolicyName"))++instance Hashable ReviewPolicy where++instance NFData ReviewPolicy where++instance ToJSON ReviewPolicy where+ toJSON ReviewPolicy'{..}+ = object+ (catMaybes+ [("Parameters" .=) <$> _rpParameters,+ Just ("PolicyName" .= _rpPolicyName)])++-- | Contains both ReviewResult and ReviewAction elements for a particular HIT.+--+--+--+-- /See:/ 'reviewReport' smart constructor.+data ReviewReport = ReviewReport'+ { _rrReviewActions :: !(Maybe [ReviewActionDetail])+ , _rrReviewResults :: !(Maybe [ReviewResultDetail])+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ReviewReport' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rrReviewActions' - A list of ReviewAction objects for each action specified in the Review Policy.+--+-- * 'rrReviewResults' - A list of ReviewResults objects for each action specified in the Review Policy.+reviewReport+ :: ReviewReport+reviewReport =+ ReviewReport' {_rrReviewActions = Nothing, _rrReviewResults = Nothing}+++-- | A list of ReviewAction objects for each action specified in the Review Policy.+rrReviewActions :: Lens' ReviewReport [ReviewActionDetail]+rrReviewActions = lens _rrReviewActions (\ s a -> s{_rrReviewActions = a}) . _Default . _Coerce;++-- | A list of ReviewResults objects for each action specified in the Review Policy.+rrReviewResults :: Lens' ReviewReport [ReviewResultDetail]+rrReviewResults = lens _rrReviewResults (\ s a -> s{_rrReviewResults = a}) . _Default . _Coerce;++instance FromJSON ReviewReport where+ parseJSON+ = withObject "ReviewReport"+ (\ x ->+ ReviewReport' <$>+ (x .:? "ReviewActions" .!= mempty) <*>+ (x .:? "ReviewResults" .!= mempty))++instance Hashable ReviewReport where++instance NFData ReviewReport where++-- | This data structure is returned multiple times for each result specified in the Review Policy.+--+--+--+-- /See:/ 'reviewResultDetail' smart constructor.+data ReviewResultDetail = ReviewResultDetail'+ { _rrdValue :: !(Maybe Text)+ , _rrdActionId :: !(Maybe Text)+ , _rrdSubjectType :: !(Maybe Text)+ , _rrdKey :: !(Maybe Text)+ , _rrdQuestionId :: !(Maybe Text)+ , _rrdSubjectId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ReviewResultDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rrdValue' - The values of Key provided by the review policies you have selected.+--+-- * 'rrdActionId' - A unique identifier of the Review action result.+--+-- * 'rrdSubjectType' - The type of the object from the SubjectId field.+--+-- * 'rrdKey' - Key identifies the particular piece of reviewed information.+--+-- * 'rrdQuestionId' - Specifies the QuestionId the result is describing. Depending on whether the TargetType is a HIT or Assignment this results could specify multiple values. If TargetType is HIT and QuestionId is absent, then the result describes results of the HIT, including the HIT agreement score. If ObjectType is Assignment and QuestionId is absent, then the result describes the Worker's performance on the HIT.+--+-- * 'rrdSubjectId' - The HITID or AssignmentId about which this result was taken. Note that HIT-level Review Policies will often emit results about both the HIT itself and its Assignments, while Assignment-level review policies generally only emit results about the Assignment itself.+reviewResultDetail+ :: ReviewResultDetail+reviewResultDetail =+ ReviewResultDetail'+ { _rrdValue = Nothing+ , _rrdActionId = Nothing+ , _rrdSubjectType = Nothing+ , _rrdKey = Nothing+ , _rrdQuestionId = Nothing+ , _rrdSubjectId = Nothing+ }+++-- | The values of Key provided by the review policies you have selected.+rrdValue :: Lens' ReviewResultDetail (Maybe Text)+rrdValue = lens _rrdValue (\ s a -> s{_rrdValue = a});++-- | A unique identifier of the Review action result.+rrdActionId :: Lens' ReviewResultDetail (Maybe Text)+rrdActionId = lens _rrdActionId (\ s a -> s{_rrdActionId = a});++-- | The type of the object from the SubjectId field.+rrdSubjectType :: Lens' ReviewResultDetail (Maybe Text)+rrdSubjectType = lens _rrdSubjectType (\ s a -> s{_rrdSubjectType = a});++-- | Key identifies the particular piece of reviewed information.+rrdKey :: Lens' ReviewResultDetail (Maybe Text)+rrdKey = lens _rrdKey (\ s a -> s{_rrdKey = a});++-- | Specifies the QuestionId the result is describing. Depending on whether the TargetType is a HIT or Assignment this results could specify multiple values. If TargetType is HIT and QuestionId is absent, then the result describes results of the HIT, including the HIT agreement score. If ObjectType is Assignment and QuestionId is absent, then the result describes the Worker's performance on the HIT.+rrdQuestionId :: Lens' ReviewResultDetail (Maybe Text)+rrdQuestionId = lens _rrdQuestionId (\ s a -> s{_rrdQuestionId = a});++-- | The HITID or AssignmentId about which this result was taken. Note that HIT-level Review Policies will often emit results about both the HIT itself and its Assignments, while Assignment-level review policies generally only emit results about the Assignment itself.+rrdSubjectId :: Lens' ReviewResultDetail (Maybe Text)+rrdSubjectId = lens _rrdSubjectId (\ s a -> s{_rrdSubjectId = a});++instance FromJSON ReviewResultDetail where+ parseJSON+ = withObject "ReviewResultDetail"+ (\ x ->+ ReviewResultDetail' <$>+ (x .:? "Value") <*> (x .:? "ActionId") <*>+ (x .:? "SubjectType")+ <*> (x .:? "Key")+ <*> (x .:? "QuestionId")+ <*> (x .:? "SubjectId"))++instance Hashable ReviewResultDetail where++instance NFData ReviewResultDetail where++-- | The WorkerBlock data structure represents a Worker who has been blocked. It has two elements: the WorkerId and the Reason for the block.+--+--+--+-- /See:/ 'workerBlock' smart constructor.+data WorkerBlock = WorkerBlock'+ { _wbReason :: !(Maybe Text)+ , _wbWorkerId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'WorkerBlock' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'wbReason' - A message explaining the reason the Worker was blocked.+--+-- * 'wbWorkerId' - The ID of the Worker who accepted the HIT.+workerBlock+ :: WorkerBlock+workerBlock = WorkerBlock' {_wbReason = Nothing, _wbWorkerId = Nothing}+++-- | A message explaining the reason the Worker was blocked.+wbReason :: Lens' WorkerBlock (Maybe Text)+wbReason = lens _wbReason (\ s a -> s{_wbReason = a});++-- | The ID of the Worker who accepted the HIT.+wbWorkerId :: Lens' WorkerBlock (Maybe Text)+wbWorkerId = lens _wbWorkerId (\ s a -> s{_wbWorkerId = a});++instance FromJSON WorkerBlock where+ parseJSON+ = withObject "WorkerBlock"+ (\ x ->+ WorkerBlock' <$>+ (x .:? "Reason") <*> (x .:? "WorkerId"))++instance Hashable WorkerBlock where++instance NFData WorkerBlock where
+ gen/Network/AWS/MechanicalTurk/Types/Sum.hs view
@@ -0,0 +1,437 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.Types.Sum+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MechanicalTurk.Types.Sum where++import Network.AWS.Prelude++data AssignmentStatus+ = Approved+ | Rejected+ | Submitted+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText AssignmentStatus where+ parser = takeLowerText >>= \case+ "approved" -> pure Approved+ "rejected" -> pure Rejected+ "submitted" -> pure Submitted+ e -> fromTextError $ "Failure parsing AssignmentStatus from value: '" <> e+ <> "'. Accepted values: approved, rejected, submitted"++instance ToText AssignmentStatus where+ toText = \case+ Approved -> "Approved"+ Rejected -> "Rejected"+ Submitted -> "Submitted"++instance Hashable AssignmentStatus+instance NFData AssignmentStatus+instance ToByteString AssignmentStatus+instance ToQuery AssignmentStatus+instance ToHeader AssignmentStatus++instance ToJSON AssignmentStatus where+ toJSON = toJSONText++instance FromJSON AssignmentStatus where+ parseJSON = parseJSONText "AssignmentStatus"++data Comparator+ = DoesNotExist+ | EqualTo+ | Exists+ | GreaterThan+ | GreaterThanOrEqualTo+ | IN+ | LessThan+ | LessThanOrEqualTo+ | NotEqualTo+ | NotIn+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText Comparator where+ parser = takeLowerText >>= \case+ "doesnotexist" -> pure DoesNotExist+ "equalto" -> pure EqualTo+ "exists" -> pure Exists+ "greaterthan" -> pure GreaterThan+ "greaterthanorequalto" -> pure GreaterThanOrEqualTo+ "in" -> pure IN+ "lessthan" -> pure LessThan+ "lessthanorequalto" -> pure LessThanOrEqualTo+ "notequalto" -> pure NotEqualTo+ "notin" -> pure NotIn+ e -> fromTextError $ "Failure parsing Comparator from value: '" <> e+ <> "'. Accepted values: doesnotexist, equalto, exists, greaterthan, greaterthanorequalto, in, lessthan, lessthanorequalto, notequalto, notin"++instance ToText Comparator where+ toText = \case+ DoesNotExist -> "DoesNotExist"+ EqualTo -> "EqualTo"+ Exists -> "Exists"+ GreaterThan -> "GreaterThan"+ GreaterThanOrEqualTo -> "GreaterThanOrEqualTo"+ IN -> "In"+ LessThan -> "LessThan"+ LessThanOrEqualTo -> "LessThanOrEqualTo"+ NotEqualTo -> "NotEqualTo"+ NotIn -> "NotIn"++instance Hashable Comparator+instance NFData Comparator+instance ToByteString Comparator+instance ToQuery Comparator+instance ToHeader Comparator++instance ToJSON Comparator where+ toJSON = toJSONText++instance FromJSON Comparator where+ parseJSON = parseJSONText "Comparator"++data EventType+ = AssignmentAbandoned+ | AssignmentAccepted+ | AssignmentApproved+ | AssignmentRejected+ | AssignmentReturned+ | AssignmentSubmitted+ | HITCreated+ | HITDisposed+ | HITExpired+ | HITExtended+ | HITReviewable+ | Ping+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText EventType where+ parser = takeLowerText >>= \case+ "assignmentabandoned" -> pure AssignmentAbandoned+ "assignmentaccepted" -> pure AssignmentAccepted+ "assignmentapproved" -> pure AssignmentApproved+ "assignmentrejected" -> pure AssignmentRejected+ "assignmentreturned" -> pure AssignmentReturned+ "assignmentsubmitted" -> pure AssignmentSubmitted+ "hitcreated" -> pure HITCreated+ "hitdisposed" -> pure HITDisposed+ "hitexpired" -> pure HITExpired+ "hitextended" -> pure HITExtended+ "hitreviewable" -> pure HITReviewable+ "ping" -> pure Ping+ e -> fromTextError $ "Failure parsing EventType from value: '" <> e+ <> "'. Accepted values: assignmentabandoned, assignmentaccepted, assignmentapproved, assignmentrejected, assignmentreturned, assignmentsubmitted, hitcreated, hitdisposed, hitexpired, hitextended, hitreviewable, ping"++instance ToText EventType where+ toText = \case+ AssignmentAbandoned -> "AssignmentAbandoned"+ AssignmentAccepted -> "AssignmentAccepted"+ AssignmentApproved -> "AssignmentApproved"+ AssignmentRejected -> "AssignmentRejected"+ AssignmentReturned -> "AssignmentReturned"+ AssignmentSubmitted -> "AssignmentSubmitted"+ HITCreated -> "HITCreated"+ HITDisposed -> "HITDisposed"+ HITExpired -> "HITExpired"+ HITExtended -> "HITExtended"+ HITReviewable -> "HITReviewable"+ Ping -> "Ping"++instance Hashable EventType+instance NFData EventType+instance ToByteString EventType+instance ToQuery EventType+instance ToHeader EventType++instance ToJSON EventType where+ toJSON = toJSONText++data HITReviewStatus+ = MarkedForReview+ | NotReviewed+ | ReviewedAppropriate+ | ReviewedInappropriate+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText HITReviewStatus where+ parser = takeLowerText >>= \case+ "markedforreview" -> pure MarkedForReview+ "notreviewed" -> pure NotReviewed+ "reviewedappropriate" -> pure ReviewedAppropriate+ "reviewedinappropriate" -> pure ReviewedInappropriate+ e -> fromTextError $ "Failure parsing HITReviewStatus from value: '" <> e+ <> "'. Accepted values: markedforreview, notreviewed, reviewedappropriate, reviewedinappropriate"++instance ToText HITReviewStatus where+ toText = \case+ MarkedForReview -> "MarkedForReview"+ NotReviewed -> "NotReviewed"+ ReviewedAppropriate -> "ReviewedAppropriate"+ ReviewedInappropriate -> "ReviewedInappropriate"++instance Hashable HITReviewStatus+instance NFData HITReviewStatus+instance ToByteString HITReviewStatus+instance ToQuery HITReviewStatus+instance ToHeader HITReviewStatus++instance FromJSON HITReviewStatus where+ parseJSON = parseJSONText "HITReviewStatus"++data HITStatus+ = HITSAssignable+ | HITSDisposed+ | HITSReviewable+ | HITSReviewing+ | HITSUnassignable+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText HITStatus where+ parser = takeLowerText >>= \case+ "assignable" -> pure HITSAssignable+ "disposed" -> pure HITSDisposed+ "reviewable" -> pure HITSReviewable+ "reviewing" -> pure HITSReviewing+ "unassignable" -> pure HITSUnassignable+ e -> fromTextError $ "Failure parsing HITStatus from value: '" <> e+ <> "'. Accepted values: assignable, disposed, reviewable, reviewing, unassignable"++instance ToText HITStatus where+ toText = \case+ HITSAssignable -> "Assignable"+ HITSDisposed -> "Disposed"+ HITSReviewable -> "Reviewable"+ HITSReviewing -> "Reviewing"+ HITSUnassignable -> "Unassignable"++instance Hashable HITStatus+instance NFData HITStatus+instance ToByteString HITStatus+instance ToQuery HITStatus+instance ToHeader HITStatus++instance FromJSON HITStatus where+ parseJSON = parseJSONText "HITStatus"++data NotificationTransport+ = Email+ | SNS+ | Sqs+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText NotificationTransport where+ parser = takeLowerText >>= \case+ "email" -> pure Email+ "sns" -> pure SNS+ "sqs" -> pure Sqs+ e -> fromTextError $ "Failure parsing NotificationTransport from value: '" <> e+ <> "'. Accepted values: email, sns, sqs"++instance ToText NotificationTransport where+ toText = \case+ Email -> "Email"+ SNS -> "SNS"+ Sqs -> "SQS"++instance Hashable NotificationTransport+instance NFData NotificationTransport+instance ToByteString NotificationTransport+instance ToQuery NotificationTransport+instance ToHeader NotificationTransport++instance ToJSON NotificationTransport where+ toJSON = toJSONText++data NotifyWorkersFailureCode+ = HardFailure+ | SoftFailure+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText NotifyWorkersFailureCode where+ parser = takeLowerText >>= \case+ "hardfailure" -> pure HardFailure+ "softfailure" -> pure SoftFailure+ e -> fromTextError $ "Failure parsing NotifyWorkersFailureCode from value: '" <> e+ <> "'. Accepted values: hardfailure, softfailure"++instance ToText NotifyWorkersFailureCode where+ toText = \case+ HardFailure -> "HardFailure"+ SoftFailure -> "SoftFailure"++instance Hashable NotifyWorkersFailureCode+instance NFData NotifyWorkersFailureCode+instance ToByteString NotifyWorkersFailureCode+instance ToQuery NotifyWorkersFailureCode+instance ToHeader NotifyWorkersFailureCode++instance FromJSON NotifyWorkersFailureCode where+ parseJSON = parseJSONText "NotifyWorkersFailureCode"++data QualificationStatus+ = Granted+ | Revoked+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText QualificationStatus where+ parser = takeLowerText >>= \case+ "granted" -> pure Granted+ "revoked" -> pure Revoked+ e -> fromTextError $ "Failure parsing QualificationStatus from value: '" <> e+ <> "'. Accepted values: granted, revoked"++instance ToText QualificationStatus where+ toText = \case+ Granted -> "Granted"+ Revoked -> "Revoked"++instance Hashable QualificationStatus+instance NFData QualificationStatus+instance ToByteString QualificationStatus+instance ToQuery QualificationStatus+instance ToHeader QualificationStatus++instance ToJSON QualificationStatus where+ toJSON = toJSONText++instance FromJSON QualificationStatus where+ parseJSON = parseJSONText "QualificationStatus"++data QualificationTypeStatus+ = Active+ | Inactive+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText QualificationTypeStatus where+ parser = takeLowerText >>= \case+ "active" -> pure Active+ "inactive" -> pure Inactive+ e -> fromTextError $ "Failure parsing QualificationTypeStatus from value: '" <> e+ <> "'. Accepted values: active, inactive"++instance ToText QualificationTypeStatus where+ toText = \case+ Active -> "Active"+ Inactive -> "Inactive"++instance Hashable QualificationTypeStatus+instance NFData QualificationTypeStatus+instance ToByteString QualificationTypeStatus+instance ToQuery QualificationTypeStatus+instance ToHeader QualificationTypeStatus++instance ToJSON QualificationTypeStatus where+ toJSON = toJSONText++instance FromJSON QualificationTypeStatus where+ parseJSON = parseJSONText "QualificationTypeStatus"++data ReviewActionStatus+ = Cancelled+ | Failed+ | Intended+ | Succeeded+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ReviewActionStatus where+ parser = takeLowerText >>= \case+ "cancelled" -> pure Cancelled+ "failed" -> pure Failed+ "intended" -> pure Intended+ "succeeded" -> pure Succeeded+ e -> fromTextError $ "Failure parsing ReviewActionStatus from value: '" <> e+ <> "'. Accepted values: cancelled, failed, intended, succeeded"++instance ToText ReviewActionStatus where+ toText = \case+ Cancelled -> "Cancelled"+ Failed -> "Failed"+ Intended -> "Intended"+ Succeeded -> "Succeeded"++instance Hashable ReviewActionStatus+instance NFData ReviewActionStatus+instance ToByteString ReviewActionStatus+instance ToQuery ReviewActionStatus+instance ToHeader ReviewActionStatus++instance FromJSON ReviewActionStatus where+ parseJSON = parseJSONText "ReviewActionStatus"++data ReviewPolicyLevel+ = Assignment+ | Hit+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ReviewPolicyLevel where+ parser = takeLowerText >>= \case+ "assignment" -> pure Assignment+ "hit" -> pure Hit+ e -> fromTextError $ "Failure parsing ReviewPolicyLevel from value: '" <> e+ <> "'. Accepted values: assignment, hit"++instance ToText ReviewPolicyLevel where+ toText = \case+ Assignment -> "Assignment"+ Hit -> "HIT"++instance Hashable ReviewPolicyLevel+instance NFData ReviewPolicyLevel+instance ToByteString ReviewPolicyLevel+instance ToQuery ReviewPolicyLevel+instance ToHeader ReviewPolicyLevel++instance ToJSON ReviewPolicyLevel where+ toJSON = toJSONText++data ReviewableHITStatus+ = Reviewable+ | Reviewing+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ReviewableHITStatus where+ parser = takeLowerText >>= \case+ "reviewable" -> pure Reviewable+ "reviewing" -> pure Reviewing+ e -> fromTextError $ "Failure parsing ReviewableHITStatus from value: '" <> e+ <> "'. Accepted values: reviewable, reviewing"++instance ToText ReviewableHITStatus where+ toText = \case+ Reviewable -> "Reviewable"+ Reviewing -> "Reviewing"++instance Hashable ReviewableHITStatus+instance NFData ReviewableHITStatus+instance ToByteString ReviewableHITStatus+instance ToQuery ReviewableHITStatus+instance ToHeader ReviewableHITStatus++instance ToJSON ReviewableHITStatus where+ toJSON = toJSONText
+ gen/Network/AWS/MechanicalTurk/UpdateExpirationForHIT.hs view
@@ -0,0 +1,137 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.UpdateExpirationForHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @UpdateExpirationForHIT@ operation allows you update the expiration time of a HIT. If you update it to a time in the past, the HIT will be immediately expired.+--+--+module Network.AWS.MechanicalTurk.UpdateExpirationForHIT+ (+ -- * Creating a Request+ updateExpirationForHIT+ , UpdateExpirationForHIT+ -- * Request Lenses+ , uefhitHITId+ , uefhitExpireAt++ -- * Destructuring the Response+ , updateExpirationForHITResponse+ , UpdateExpirationForHITResponse+ -- * Response Lenses+ , uefhitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateExpirationForHIT' smart constructor.+data UpdateExpirationForHIT = UpdateExpirationForHIT'+ { _uefhitHITId :: !Text+ , _uefhitExpireAt :: !POSIX+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateExpirationForHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uefhitHITId' - The HIT to update.+--+-- * 'uefhitExpireAt' - The date and time at which you want the HIT to expire+updateExpirationForHIT+ :: Text -- ^ 'uefhitHITId'+ -> UTCTime -- ^ 'uefhitExpireAt'+ -> UpdateExpirationForHIT+updateExpirationForHIT pHITId_ pExpireAt_ =+ UpdateExpirationForHIT'+ {_uefhitHITId = pHITId_, _uefhitExpireAt = _Time # pExpireAt_}+++-- | The HIT to update.+uefhitHITId :: Lens' UpdateExpirationForHIT Text+uefhitHITId = lens _uefhitHITId (\ s a -> s{_uefhitHITId = a});++-- | The date and time at which you want the HIT to expire+uefhitExpireAt :: Lens' UpdateExpirationForHIT UTCTime+uefhitExpireAt = lens _uefhitExpireAt (\ s a -> s{_uefhitExpireAt = a}) . _Time;++instance AWSRequest UpdateExpirationForHIT where+ type Rs UpdateExpirationForHIT =+ UpdateExpirationForHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ UpdateExpirationForHITResponse' <$>+ (pure (fromEnum s)))++instance Hashable UpdateExpirationForHIT where++instance NFData UpdateExpirationForHIT where++instance ToHeaders UpdateExpirationForHIT where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.UpdateExpirationForHIT"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateExpirationForHIT where+ toJSON UpdateExpirationForHIT'{..}+ = object+ (catMaybes+ [Just ("HITId" .= _uefhitHITId),+ Just ("ExpireAt" .= _uefhitExpireAt)])++instance ToPath UpdateExpirationForHIT where+ toPath = const "/"++instance ToQuery UpdateExpirationForHIT where+ toQuery = const mempty++-- | /See:/ 'updateExpirationForHITResponse' smart constructor.+newtype UpdateExpirationForHITResponse = UpdateExpirationForHITResponse'+ { _uefhitrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateExpirationForHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uefhitrsResponseStatus' - -- | The response status code.+updateExpirationForHITResponse+ :: Int -- ^ 'uefhitrsResponseStatus'+ -> UpdateExpirationForHITResponse+updateExpirationForHITResponse pResponseStatus_ =+ UpdateExpirationForHITResponse' {_uefhitrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+uefhitrsResponseStatus :: Lens' UpdateExpirationForHITResponse Int+uefhitrsResponseStatus = lens _uefhitrsResponseStatus (\ s a -> s{_uefhitrsResponseStatus = a});++instance NFData UpdateExpirationForHITResponse where
+ gen/Network/AWS/MechanicalTurk/UpdateHITReviewStatus.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.UpdateHITReviewStatus+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @UpdateHITReviewStatus@ operation updates the status of a HIT. If the status is Reviewable, this operation can update the status to Reviewing, or it can revert a Reviewing HIT back to the Reviewable status.+--+--+module Network.AWS.MechanicalTurk.UpdateHITReviewStatus+ (+ -- * Creating a Request+ updateHITReviewStatus+ , UpdateHITReviewStatus+ -- * Request Lenses+ , uhitrsRevert+ , uhitrsHITId++ -- * Destructuring the Response+ , updateHITReviewStatusResponse+ , UpdateHITReviewStatusResponse+ -- * Response Lenses+ , uhitrsrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateHITReviewStatus' smart constructor.+data UpdateHITReviewStatus = UpdateHITReviewStatus'+ { _uhitrsRevert :: !(Maybe Bool)+ , _uhitrsHITId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateHITReviewStatus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uhitrsRevert' - Specifies how to update the HIT status. Default is @False@ . * Setting this to false will only transition a HIT from @Reviewable@ to @Reviewing@ * Setting this to true will only transition a HIT from @Reviewing@ to @Reviewable@+--+-- * 'uhitrsHITId' - The ID of the HIT to update.+updateHITReviewStatus+ :: Text -- ^ 'uhitrsHITId'+ -> UpdateHITReviewStatus+updateHITReviewStatus pHITId_ =+ UpdateHITReviewStatus' {_uhitrsRevert = Nothing, _uhitrsHITId = pHITId_}+++-- | Specifies how to update the HIT status. Default is @False@ . * Setting this to false will only transition a HIT from @Reviewable@ to @Reviewing@ * Setting this to true will only transition a HIT from @Reviewing@ to @Reviewable@+uhitrsRevert :: Lens' UpdateHITReviewStatus (Maybe Bool)+uhitrsRevert = lens _uhitrsRevert (\ s a -> s{_uhitrsRevert = a});++-- | The ID of the HIT to update.+uhitrsHITId :: Lens' UpdateHITReviewStatus Text+uhitrsHITId = lens _uhitrsHITId (\ s a -> s{_uhitrsHITId = a});++instance AWSRequest UpdateHITReviewStatus where+ type Rs UpdateHITReviewStatus =+ UpdateHITReviewStatusResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ UpdateHITReviewStatusResponse' <$>+ (pure (fromEnum s)))++instance Hashable UpdateHITReviewStatus where++instance NFData UpdateHITReviewStatus where++instance ToHeaders UpdateHITReviewStatus where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.UpdateHITReviewStatus"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateHITReviewStatus where+ toJSON UpdateHITReviewStatus'{..}+ = object+ (catMaybes+ [("Revert" .=) <$> _uhitrsRevert,+ Just ("HITId" .= _uhitrsHITId)])++instance ToPath UpdateHITReviewStatus where+ toPath = const "/"++instance ToQuery UpdateHITReviewStatus where+ toQuery = const mempty++-- | /See:/ 'updateHITReviewStatusResponse' smart constructor.+newtype UpdateHITReviewStatusResponse = UpdateHITReviewStatusResponse'+ { _uhitrsrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateHITReviewStatusResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uhitrsrsResponseStatus' - -- | The response status code.+updateHITReviewStatusResponse+ :: Int -- ^ 'uhitrsrsResponseStatus'+ -> UpdateHITReviewStatusResponse+updateHITReviewStatusResponse pResponseStatus_ =+ UpdateHITReviewStatusResponse' {_uhitrsrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+uhitrsrsResponseStatus :: Lens' UpdateHITReviewStatusResponse Int+uhitrsrsResponseStatus = lens _uhitrsrsResponseStatus (\ s a -> s{_uhitrsrsResponseStatus = a});++instance NFData UpdateHITReviewStatusResponse where
+ gen/Network/AWS/MechanicalTurk/UpdateHITTypeOfHIT.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.UpdateHITTypeOfHIT+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @UpdateHITTypeOfHIT@ operation allows you to change the HITType properties of a HIT. This operation disassociates the HIT from its old HITType properties and associates it with the new HITType properties. The HIT takes on the properties of the new HITType in place of the old ones.+--+--+module Network.AWS.MechanicalTurk.UpdateHITTypeOfHIT+ (+ -- * Creating a Request+ updateHITTypeOfHIT+ , UpdateHITTypeOfHIT+ -- * Request Lenses+ , uhittohitHITId+ , uhittohitHITTypeId++ -- * Destructuring the Response+ , updateHITTypeOfHITResponse+ , UpdateHITTypeOfHITResponse+ -- * Response Lenses+ , uhittohitrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateHITTypeOfHIT' smart constructor.+data UpdateHITTypeOfHIT = UpdateHITTypeOfHIT'+ { _uhittohitHITId :: !Text+ , _uhittohitHITTypeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateHITTypeOfHIT' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uhittohitHITId' - The HIT to update.+--+-- * 'uhittohitHITTypeId' - The ID of the new HIT type.+updateHITTypeOfHIT+ :: Text -- ^ 'uhittohitHITId'+ -> Text -- ^ 'uhittohitHITTypeId'+ -> UpdateHITTypeOfHIT+updateHITTypeOfHIT pHITId_ pHITTypeId_ =+ UpdateHITTypeOfHIT'+ {_uhittohitHITId = pHITId_, _uhittohitHITTypeId = pHITTypeId_}+++-- | The HIT to update.+uhittohitHITId :: Lens' UpdateHITTypeOfHIT Text+uhittohitHITId = lens _uhittohitHITId (\ s a -> s{_uhittohitHITId = a});++-- | The ID of the new HIT type.+uhittohitHITTypeId :: Lens' UpdateHITTypeOfHIT Text+uhittohitHITTypeId = lens _uhittohitHITTypeId (\ s a -> s{_uhittohitHITTypeId = a});++instance AWSRequest UpdateHITTypeOfHIT where+ type Rs UpdateHITTypeOfHIT =+ UpdateHITTypeOfHITResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ UpdateHITTypeOfHITResponse' <$> (pure (fromEnum s)))++instance Hashable UpdateHITTypeOfHIT where++instance NFData UpdateHITTypeOfHIT where++instance ToHeaders UpdateHITTypeOfHIT where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.UpdateHITTypeOfHIT"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateHITTypeOfHIT where+ toJSON UpdateHITTypeOfHIT'{..}+ = object+ (catMaybes+ [Just ("HITId" .= _uhittohitHITId),+ Just ("HITTypeId" .= _uhittohitHITTypeId)])++instance ToPath UpdateHITTypeOfHIT where+ toPath = const "/"++instance ToQuery UpdateHITTypeOfHIT where+ toQuery = const mempty++-- | /See:/ 'updateHITTypeOfHITResponse' smart constructor.+newtype UpdateHITTypeOfHITResponse = UpdateHITTypeOfHITResponse'+ { _uhittohitrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateHITTypeOfHITResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uhittohitrsResponseStatus' - -- | The response status code.+updateHITTypeOfHITResponse+ :: Int -- ^ 'uhittohitrsResponseStatus'+ -> UpdateHITTypeOfHITResponse+updateHITTypeOfHITResponse pResponseStatus_ =+ UpdateHITTypeOfHITResponse' {_uhittohitrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+uhittohitrsResponseStatus :: Lens' UpdateHITTypeOfHITResponse Int+uhittohitrsResponseStatus = lens _uhittohitrsResponseStatus (\ s a -> s{_uhittohitrsResponseStatus = a});++instance NFData UpdateHITTypeOfHITResponse where
+ gen/Network/AWS/MechanicalTurk/UpdateNotificationSettings.hs view
@@ -0,0 +1,149 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.UpdateNotificationSettings+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @UpdateNotificationSettings@ operation creates, updates, disables or re-enables notifications for a HIT type. If you call the UpdateNotificationSettings operation for a HIT type that already has a notification specification, the operation replaces the old specification with a new one. You can call the UpdateNotificationSettings operation to enable or disable notifications for the HIT type, without having to modify the notification specification itself by providing updates to the Active status without specifying a new notification specification. To change the Active status of a HIT type's notifications, the HIT type must already have a notification specification, or one must be provided in the same call to @UpdateNotificationSettings@ .+--+--+module Network.AWS.MechanicalTurk.UpdateNotificationSettings+ (+ -- * Creating a Request+ updateNotificationSettings+ , UpdateNotificationSettings+ -- * Request Lenses+ , unsNotification+ , unsActive+ , unsHITTypeId++ -- * Destructuring the Response+ , updateNotificationSettingsResponse+ , UpdateNotificationSettingsResponse+ -- * Response Lenses+ , unsrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateNotificationSettings' smart constructor.+data UpdateNotificationSettings = UpdateNotificationSettings'+ { _unsNotification :: !(Maybe NotificationSpecification)+ , _unsActive :: !(Maybe Bool)+ , _unsHITTypeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateNotificationSettings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'unsNotification' - The notification specification for the HIT type.+--+-- * 'unsActive' - Specifies whether notifications are sent for HITs of this HIT type, according to the notification specification. You must specify either the Notification parameter or the Active parameter for the call to UpdateNotificationSettings to succeed.+--+-- * 'unsHITTypeId' - The ID of the HIT type whose notification specification is being updated.+updateNotificationSettings+ :: Text -- ^ 'unsHITTypeId'+ -> UpdateNotificationSettings+updateNotificationSettings pHITTypeId_ =+ UpdateNotificationSettings'+ { _unsNotification = Nothing+ , _unsActive = Nothing+ , _unsHITTypeId = pHITTypeId_+ }+++-- | The notification specification for the HIT type.+unsNotification :: Lens' UpdateNotificationSettings (Maybe NotificationSpecification)+unsNotification = lens _unsNotification (\ s a -> s{_unsNotification = a});++-- | Specifies whether notifications are sent for HITs of this HIT type, according to the notification specification. You must specify either the Notification parameter or the Active parameter for the call to UpdateNotificationSettings to succeed.+unsActive :: Lens' UpdateNotificationSettings (Maybe Bool)+unsActive = lens _unsActive (\ s a -> s{_unsActive = a});++-- | The ID of the HIT type whose notification specification is being updated.+unsHITTypeId :: Lens' UpdateNotificationSettings Text+unsHITTypeId = lens _unsHITTypeId (\ s a -> s{_unsHITTypeId = a});++instance AWSRequest UpdateNotificationSettings where+ type Rs UpdateNotificationSettings =+ UpdateNotificationSettingsResponse+ request = postJSON mechanicalTurk+ response+ = receiveEmpty+ (\ s h x ->+ UpdateNotificationSettingsResponse' <$>+ (pure (fromEnum s)))++instance Hashable UpdateNotificationSettings where++instance NFData UpdateNotificationSettings where++instance ToHeaders UpdateNotificationSettings where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.UpdateNotificationSettings"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateNotificationSettings where+ toJSON UpdateNotificationSettings'{..}+ = object+ (catMaybes+ [("Notification" .=) <$> _unsNotification,+ ("Active" .=) <$> _unsActive,+ Just ("HITTypeId" .= _unsHITTypeId)])++instance ToPath UpdateNotificationSettings where+ toPath = const "/"++instance ToQuery UpdateNotificationSettings where+ toQuery = const mempty++-- | /See:/ 'updateNotificationSettingsResponse' smart constructor.+newtype UpdateNotificationSettingsResponse = UpdateNotificationSettingsResponse'+ { _unsrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateNotificationSettingsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'unsrsResponseStatus' - -- | The response status code.+updateNotificationSettingsResponse+ :: Int -- ^ 'unsrsResponseStatus'+ -> UpdateNotificationSettingsResponse+updateNotificationSettingsResponse pResponseStatus_ =+ UpdateNotificationSettingsResponse' {_unsrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+unsrsResponseStatus :: Lens' UpdateNotificationSettingsResponse Int+unsrsResponseStatus = lens _unsrsResponseStatus (\ s a -> s{_unsrsResponseStatus = a});++instance NFData UpdateNotificationSettingsResponse+ where
+ gen/Network/AWS/MechanicalTurk/UpdateQualificationType.hs view
@@ -0,0 +1,233 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.UpdateQualificationType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The @UpdateQualificationType@ operation modifies the attributes of an existing Qualification type, which is represented by a QualificationType data structure. Only the owner of a Qualification type can modify its attributes.+--+--+-- Most attributes of a Qualification type can be changed after the type has been created. However, the Name and Keywords fields cannot be modified. The RetryDelayInSeconds parameter can be modified or added to change the delay or to enable retries, but RetryDelayInSeconds cannot be used to disable retries.+--+-- You can use this operation to update the test for a Qualification type. The test is updated based on the values specified for the Test, TestDurationInSeconds and AnswerKey parameters. All three parameters specify the updated test. If you are updating the test for a type, you must specify the Test and TestDurationInSeconds parameters. The AnswerKey parameter is optional; omitting it specifies that the updated test does not have an answer key.+--+-- If you omit the Test parameter, the test for the Qualification type is unchanged. There is no way to remove a test from a Qualification type that has one. If the type already has a test, you cannot update it to be AutoGranted. If the Qualification type does not have a test and one is provided by an update, the type will henceforth have a test.+--+-- If you want to update the test duration or answer key for an existing test without changing the questions, you must specify a Test parameter with the original questions, along with the updated values.+--+-- If you provide an updated Test but no AnswerKey, the new test will not have an answer key. Requests for such Qualifications must be granted manually.+--+-- You can also update the AutoGranted and AutoGrantedValue attributes of the Qualification type.+--+module Network.AWS.MechanicalTurk.UpdateQualificationType+ (+ -- * Creating a Request+ updateQualificationType+ , UpdateQualificationType+ -- * Request Lenses+ , uqtTestDurationInSeconds+ , uqtQualificationTypeStatus+ , uqtAnswerKey+ , uqtTest+ , uqtAutoGranted+ , uqtAutoGrantedValue+ , uqtDescription+ , uqtRetryDelayInSeconds+ , uqtQualificationTypeId++ -- * Destructuring the Response+ , updateQualificationTypeResponse+ , UpdateQualificationTypeResponse+ -- * Response Lenses+ , uqtrsQualificationType+ , uqtrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.MechanicalTurk.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateQualificationType' smart constructor.+data UpdateQualificationType = UpdateQualificationType'+ { _uqtTestDurationInSeconds :: !(Maybe Integer)+ , _uqtQualificationTypeStatus :: !(Maybe QualificationTypeStatus)+ , _uqtAnswerKey :: !(Maybe Text)+ , _uqtTest :: !(Maybe Text)+ , _uqtAutoGranted :: !(Maybe Bool)+ , _uqtAutoGrantedValue :: !(Maybe Int)+ , _uqtDescription :: !(Maybe Text)+ , _uqtRetryDelayInSeconds :: !(Maybe Integer)+ , _uqtQualificationTypeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateQualificationType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uqtTestDurationInSeconds' - The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.+--+-- * 'uqtQualificationTypeStatus' - The new status of the Qualification type - Active | Inactive+--+-- * 'uqtAnswerKey' - The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.+--+-- * 'uqtTest' - The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, @TestDurationInSeconds@ must also be specified. Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true. Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.+--+-- * 'uqtAutoGranted' - Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Constraints: If the Test parameter is specified, this parameter cannot be true.+--+-- * 'uqtAutoGrantedValue' - The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.+--+-- * 'uqtDescription' - The new description of the Qualification type.+--+-- * 'uqtRetryDelayInSeconds' - The amount of time, in seconds, that Workers must wait after requesting a Qualification of the specified Qualification type before they can retry the Qualification request. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must dispose of the existing retry-enabled Qualification type using DisposeQualificationType and then create a new Qualification type with retries disabled using CreateQualificationType.+--+-- * 'uqtQualificationTypeId' - The ID of the Qualification type to update.+updateQualificationType+ :: Text -- ^ 'uqtQualificationTypeId'+ -> UpdateQualificationType+updateQualificationType pQualificationTypeId_ =+ UpdateQualificationType'+ { _uqtTestDurationInSeconds = Nothing+ , _uqtQualificationTypeStatus = Nothing+ , _uqtAnswerKey = Nothing+ , _uqtTest = Nothing+ , _uqtAutoGranted = Nothing+ , _uqtAutoGrantedValue = Nothing+ , _uqtDescription = Nothing+ , _uqtRetryDelayInSeconds = Nothing+ , _uqtQualificationTypeId = pQualificationTypeId_+ }+++-- | The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.+uqtTestDurationInSeconds :: Lens' UpdateQualificationType (Maybe Integer)+uqtTestDurationInSeconds = lens _uqtTestDurationInSeconds (\ s a -> s{_uqtTestDurationInSeconds = a});++-- | The new status of the Qualification type - Active | Inactive+uqtQualificationTypeStatus :: Lens' UpdateQualificationType (Maybe QualificationTypeStatus)+uqtQualificationTypeStatus = lens _uqtQualificationTypeStatus (\ s a -> s{_uqtQualificationTypeStatus = a});++-- | The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.+uqtAnswerKey :: Lens' UpdateQualificationType (Maybe Text)+uqtAnswerKey = lens _uqtAnswerKey (\ s a -> s{_uqtAnswerKey = a});++-- | The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, @TestDurationInSeconds@ must also be specified. Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true. Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.+uqtTest :: Lens' UpdateQualificationType (Maybe Text)+uqtTest = lens _uqtTest (\ s a -> s{_uqtTest = a});++-- | Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test. Constraints: If the Test parameter is specified, this parameter cannot be true.+uqtAutoGranted :: Lens' UpdateQualificationType (Maybe Bool)+uqtAutoGranted = lens _uqtAutoGranted (\ s a -> s{_uqtAutoGranted = a});++-- | The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.+uqtAutoGrantedValue :: Lens' UpdateQualificationType (Maybe Int)+uqtAutoGrantedValue = lens _uqtAutoGrantedValue (\ s a -> s{_uqtAutoGrantedValue = a});++-- | The new description of the Qualification type.+uqtDescription :: Lens' UpdateQualificationType (Maybe Text)+uqtDescription = lens _uqtDescription (\ s a -> s{_uqtDescription = a});++-- | The amount of time, in seconds, that Workers must wait after requesting a Qualification of the specified Qualification type before they can retry the Qualification request. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must dispose of the existing retry-enabled Qualification type using DisposeQualificationType and then create a new Qualification type with retries disabled using CreateQualificationType.+uqtRetryDelayInSeconds :: Lens' UpdateQualificationType (Maybe Integer)+uqtRetryDelayInSeconds = lens _uqtRetryDelayInSeconds (\ s a -> s{_uqtRetryDelayInSeconds = a});++-- | The ID of the Qualification type to update.+uqtQualificationTypeId :: Lens' UpdateQualificationType Text+uqtQualificationTypeId = lens _uqtQualificationTypeId (\ s a -> s{_uqtQualificationTypeId = a});++instance AWSRequest UpdateQualificationType where+ type Rs UpdateQualificationType =+ UpdateQualificationTypeResponse+ request = postJSON mechanicalTurk+ response+ = receiveJSON+ (\ s h x ->+ UpdateQualificationTypeResponse' <$>+ (x .?> "QualificationType") <*> (pure (fromEnum s)))++instance Hashable UpdateQualificationType where++instance NFData UpdateQualificationType where++instance ToHeaders UpdateQualificationType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MTurkRequesterServiceV20170117.UpdateQualificationType"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateQualificationType where+ toJSON UpdateQualificationType'{..}+ = object+ (catMaybes+ [("TestDurationInSeconds" .=) <$>+ _uqtTestDurationInSeconds,+ ("QualificationTypeStatus" .=) <$>+ _uqtQualificationTypeStatus,+ ("AnswerKey" .=) <$> _uqtAnswerKey,+ ("Test" .=) <$> _uqtTest,+ ("AutoGranted" .=) <$> _uqtAutoGranted,+ ("AutoGrantedValue" .=) <$> _uqtAutoGrantedValue,+ ("Description" .=) <$> _uqtDescription,+ ("RetryDelayInSeconds" .=) <$>+ _uqtRetryDelayInSeconds,+ Just+ ("QualificationTypeId" .= _uqtQualificationTypeId)])++instance ToPath UpdateQualificationType where+ toPath = const "/"++instance ToQuery UpdateQualificationType where+ toQuery = const mempty++-- | /See:/ 'updateQualificationTypeResponse' smart constructor.+data UpdateQualificationTypeResponse = UpdateQualificationTypeResponse'+ { _uqtrsQualificationType :: !(Maybe QualificationType)+ , _uqtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateQualificationTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uqtrsQualificationType' - Contains a QualificationType data structure.+--+-- * 'uqtrsResponseStatus' - -- | The response status code.+updateQualificationTypeResponse+ :: Int -- ^ 'uqtrsResponseStatus'+ -> UpdateQualificationTypeResponse+updateQualificationTypeResponse pResponseStatus_ =+ UpdateQualificationTypeResponse'+ {_uqtrsQualificationType = Nothing, _uqtrsResponseStatus = pResponseStatus_}+++-- | Contains a QualificationType data structure.+uqtrsQualificationType :: Lens' UpdateQualificationTypeResponse (Maybe QualificationType)+uqtrsQualificationType = lens _uqtrsQualificationType (\ s a -> s{_uqtrsQualificationType = a});++-- | -- | The response status code.+uqtrsResponseStatus :: Lens' UpdateQualificationTypeResponse Int+uqtrsResponseStatus = lens _uqtrsResponseStatus (\ s a -> s{_uqtrsResponseStatus = a});++instance NFData UpdateQualificationTypeResponse where
+ gen/Network/AWS/MechanicalTurk/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MechanicalTurk.Waiters+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MechanicalTurk.Waiters where++import Network.AWS.Lens+import Network.AWS.MechanicalTurk.Types+import Network.AWS.Prelude+import Network.AWS.Waiter
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.MechanicalTurk+import Test.AWS.MechanicalTurk.Internal++main :: IO ()+main = defaultMain $ testGroup "MechanicalTurk"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/MechanicalTurk.hs view
@@ -0,0 +1,741 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.MechanicalTurk+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.MechanicalTurk where++import Data.Proxy+import Network.AWS.MechanicalTurk+import Test.AWS.Fixture+import Test.AWS.MechanicalTurk.Internal+import Test.AWS.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestApproveAssignment $+-- approveAssignment+--+-- , requestListReviewPolicyResultsForHIT $+-- listReviewPolicyResultsForHIT+--+-- , requestListHITs $+-- listHITs+--+-- , requestListWorkersWithQualificationType $+-- listWorkersWithQualificationType+--+-- , requestDeleteHIT $+-- deleteHIT+--+-- , requestListReviewableHITs $+-- listReviewableHITs+--+-- , requestGetAssignment $+-- getAssignment+--+-- , requestDeleteQualificationType $+-- deleteQualificationType+--+-- , requestUpdateQualificationType $+-- updateQualificationType+--+-- , requestListQualificationTypes $+-- listQualificationTypes+--+-- , requestUpdateHITTypeOfHIT $+-- updateHITTypeOfHIT+--+-- , requestDisassociateQualificationFromWorker $+-- disassociateQualificationFromWorker+--+-- , requestSendTestEventNotification $+-- sendTestEventNotification+--+-- , requestNotifyWorkers $+-- notifyWorkers+--+-- , requestCreateHITWithHITType $+-- createHITWithHITType+--+-- , requestCreateHITType $+-- createHITType+--+-- , requestSendBonus $+-- sendBonus+--+-- , requestListQualificationRequests $+-- listQualificationRequests+--+-- , requestUpdateExpirationForHIT $+-- updateExpirationForHIT+--+-- , requestRejectAssignment $+-- rejectAssignment+--+-- , requestListAssignmentsForHIT $+-- listAssignmentsForHIT+--+-- , requestRejectQualificationRequest $+-- rejectQualificationRequest+--+-- , requestGetQualificationScore $+-- getQualificationScore+--+-- , requestGetQualificationType $+-- getQualificationType+--+-- , requestUpdateHITReviewStatus $+-- updateHITReviewStatus+--+-- , requestCreateQualificationType $+-- createQualificationType+--+-- , requestAcceptQualificationRequest $+-- acceptQualificationRequest+--+-- , requestGetFileUploadURL $+-- getFileUploadURL+--+-- , requestCreateAdditionalAssignmentsForHIT $+-- createAdditionalAssignmentsForHIT+--+-- , requestGetHIT $+-- getHIT+--+-- , requestCreateWorkerBlock $+-- createWorkerBlock+--+-- , requestListHITsForQualificationType $+-- listHITsForQualificationType+--+-- , requestListBonusPayments $+-- listBonusPayments+--+-- , requestListWorkerBlocks $+-- listWorkerBlocks+--+-- , requestDeleteWorkerBlock $+-- deleteWorkerBlock+--+-- , requestUpdateNotificationSettings $+-- updateNotificationSettings+--+-- , requestAssociateQualificationWithWorker $+-- associateQualificationWithWorker+--+-- , requestCreateHIT $+-- createHIT+--+-- , requestGetAccountBalance $+-- getAccountBalance+--+-- ]++-- , testGroup "response"+-- [ responseApproveAssignment $+-- approveAssignmentResponse+--+-- , responseListReviewPolicyResultsForHIT $+-- listReviewPolicyResultsForHITResponse+--+-- , responseListHITs $+-- listHITsResponse+--+-- , responseListWorkersWithQualificationType $+-- listWorkersWithQualificationTypeResponse+--+-- , responseDeleteHIT $+-- deleteHITResponse+--+-- , responseListReviewableHITs $+-- listReviewableHITsResponse+--+-- , responseGetAssignment $+-- getAssignmentResponse+--+-- , responseDeleteQualificationType $+-- deleteQualificationTypeResponse+--+-- , responseUpdateQualificationType $+-- updateQualificationTypeResponse+--+-- , responseListQualificationTypes $+-- listQualificationTypesResponse+--+-- , responseUpdateHITTypeOfHIT $+-- updateHITTypeOfHITResponse+--+-- , responseDisassociateQualificationFromWorker $+-- disassociateQualificationFromWorkerResponse+--+-- , responseSendTestEventNotification $+-- sendTestEventNotificationResponse+--+-- , responseNotifyWorkers $+-- notifyWorkersResponse+--+-- , responseCreateHITWithHITType $+-- createHITWithHITTypeResponse+--+-- , responseCreateHITType $+-- createHITTypeResponse+--+-- , responseSendBonus $+-- sendBonusResponse+--+-- , responseListQualificationRequests $+-- listQualificationRequestsResponse+--+-- , responseUpdateExpirationForHIT $+-- updateExpirationForHITResponse+--+-- , responseRejectAssignment $+-- rejectAssignmentResponse+--+-- , responseListAssignmentsForHIT $+-- listAssignmentsForHITResponse+--+-- , responseRejectQualificationRequest $+-- rejectQualificationRequestResponse+--+-- , responseGetQualificationScore $+-- getQualificationScoreResponse+--+-- , responseGetQualificationType $+-- getQualificationTypeResponse+--+-- , responseUpdateHITReviewStatus $+-- updateHITReviewStatusResponse+--+-- , responseCreateQualificationType $+-- createQualificationTypeResponse+--+-- , responseAcceptQualificationRequest $+-- acceptQualificationRequestResponse+--+-- , responseGetFileUploadURL $+-- getFileUploadURLResponse+--+-- , responseCreateAdditionalAssignmentsForHIT $+-- createAdditionalAssignmentsForHITResponse+--+-- , responseGetHIT $+-- getHITResponse+--+-- , responseCreateWorkerBlock $+-- createWorkerBlockResponse+--+-- , responseListHITsForQualificationType $+-- listHITsForQualificationTypeResponse+--+-- , responseListBonusPayments $+-- listBonusPaymentsResponse+--+-- , responseListWorkerBlocks $+-- listWorkerBlocksResponse+--+-- , responseDeleteWorkerBlock $+-- deleteWorkerBlockResponse+--+-- , responseUpdateNotificationSettings $+-- updateNotificationSettingsResponse+--+-- , responseAssociateQualificationWithWorker $+-- associateQualificationWithWorkerResponse+--+-- , responseCreateHIT $+-- createHITResponse+--+-- , responseGetAccountBalance $+-- getAccountBalanceResponse+--+-- ]+-- ]++-- Requests++requestApproveAssignment :: ApproveAssignment -> TestTree+requestApproveAssignment = req+ "ApproveAssignment"+ "fixture/ApproveAssignment.yaml"++requestListReviewPolicyResultsForHIT :: ListReviewPolicyResultsForHIT -> TestTree+requestListReviewPolicyResultsForHIT = req+ "ListReviewPolicyResultsForHIT"+ "fixture/ListReviewPolicyResultsForHIT.yaml"++requestListHITs :: ListHITs -> TestTree+requestListHITs = req+ "ListHITs"+ "fixture/ListHITs.yaml"++requestListWorkersWithQualificationType :: ListWorkersWithQualificationType -> TestTree+requestListWorkersWithQualificationType = req+ "ListWorkersWithQualificationType"+ "fixture/ListWorkersWithQualificationType.yaml"++requestDeleteHIT :: DeleteHIT -> TestTree+requestDeleteHIT = req+ "DeleteHIT"+ "fixture/DeleteHIT.yaml"++requestListReviewableHITs :: ListReviewableHITs -> TestTree+requestListReviewableHITs = req+ "ListReviewableHITs"+ "fixture/ListReviewableHITs.yaml"++requestGetAssignment :: GetAssignment -> TestTree+requestGetAssignment = req+ "GetAssignment"+ "fixture/GetAssignment.yaml"++requestDeleteQualificationType :: DeleteQualificationType -> TestTree+requestDeleteQualificationType = req+ "DeleteQualificationType"+ "fixture/DeleteQualificationType.yaml"++requestUpdateQualificationType :: UpdateQualificationType -> TestTree+requestUpdateQualificationType = req+ "UpdateQualificationType"+ "fixture/UpdateQualificationType.yaml"++requestListQualificationTypes :: ListQualificationTypes -> TestTree+requestListQualificationTypes = req+ "ListQualificationTypes"+ "fixture/ListQualificationTypes.yaml"++requestUpdateHITTypeOfHIT :: UpdateHITTypeOfHIT -> TestTree+requestUpdateHITTypeOfHIT = req+ "UpdateHITTypeOfHIT"+ "fixture/UpdateHITTypeOfHIT.yaml"++requestDisassociateQualificationFromWorker :: DisassociateQualificationFromWorker -> TestTree+requestDisassociateQualificationFromWorker = req+ "DisassociateQualificationFromWorker"+ "fixture/DisassociateQualificationFromWorker.yaml"++requestSendTestEventNotification :: SendTestEventNotification -> TestTree+requestSendTestEventNotification = req+ "SendTestEventNotification"+ "fixture/SendTestEventNotification.yaml"++requestNotifyWorkers :: NotifyWorkers -> TestTree+requestNotifyWorkers = req+ "NotifyWorkers"+ "fixture/NotifyWorkers.yaml"++requestCreateHITWithHITType :: CreateHITWithHITType -> TestTree+requestCreateHITWithHITType = req+ "CreateHITWithHITType"+ "fixture/CreateHITWithHITType.yaml"++requestCreateHITType :: CreateHITType -> TestTree+requestCreateHITType = req+ "CreateHITType"+ "fixture/CreateHITType.yaml"++requestSendBonus :: SendBonus -> TestTree+requestSendBonus = req+ "SendBonus"+ "fixture/SendBonus.yaml"++requestListQualificationRequests :: ListQualificationRequests -> TestTree+requestListQualificationRequests = req+ "ListQualificationRequests"+ "fixture/ListQualificationRequests.yaml"++requestUpdateExpirationForHIT :: UpdateExpirationForHIT -> TestTree+requestUpdateExpirationForHIT = req+ "UpdateExpirationForHIT"+ "fixture/UpdateExpirationForHIT.yaml"++requestRejectAssignment :: RejectAssignment -> TestTree+requestRejectAssignment = req+ "RejectAssignment"+ "fixture/RejectAssignment.yaml"++requestListAssignmentsForHIT :: ListAssignmentsForHIT -> TestTree+requestListAssignmentsForHIT = req+ "ListAssignmentsForHIT"+ "fixture/ListAssignmentsForHIT.yaml"++requestRejectQualificationRequest :: RejectQualificationRequest -> TestTree+requestRejectQualificationRequest = req+ "RejectQualificationRequest"+ "fixture/RejectQualificationRequest.yaml"++requestGetQualificationScore :: GetQualificationScore -> TestTree+requestGetQualificationScore = req+ "GetQualificationScore"+ "fixture/GetQualificationScore.yaml"++requestGetQualificationType :: GetQualificationType -> TestTree+requestGetQualificationType = req+ "GetQualificationType"+ "fixture/GetQualificationType.yaml"++requestUpdateHITReviewStatus :: UpdateHITReviewStatus -> TestTree+requestUpdateHITReviewStatus = req+ "UpdateHITReviewStatus"+ "fixture/UpdateHITReviewStatus.yaml"++requestCreateQualificationType :: CreateQualificationType -> TestTree+requestCreateQualificationType = req+ "CreateQualificationType"+ "fixture/CreateQualificationType.yaml"++requestAcceptQualificationRequest :: AcceptQualificationRequest -> TestTree+requestAcceptQualificationRequest = req+ "AcceptQualificationRequest"+ "fixture/AcceptQualificationRequest.yaml"++requestGetFileUploadURL :: GetFileUploadURL -> TestTree+requestGetFileUploadURL = req+ "GetFileUploadURL"+ "fixture/GetFileUploadURL.yaml"++requestCreateAdditionalAssignmentsForHIT :: CreateAdditionalAssignmentsForHIT -> TestTree+requestCreateAdditionalAssignmentsForHIT = req+ "CreateAdditionalAssignmentsForHIT"+ "fixture/CreateAdditionalAssignmentsForHIT.yaml"++requestGetHIT :: GetHIT -> TestTree+requestGetHIT = req+ "GetHIT"+ "fixture/GetHIT.yaml"++requestCreateWorkerBlock :: CreateWorkerBlock -> TestTree+requestCreateWorkerBlock = req+ "CreateWorkerBlock"+ "fixture/CreateWorkerBlock.yaml"++requestListHITsForQualificationType :: ListHITsForQualificationType -> TestTree+requestListHITsForQualificationType = req+ "ListHITsForQualificationType"+ "fixture/ListHITsForQualificationType.yaml"++requestListBonusPayments :: ListBonusPayments -> TestTree+requestListBonusPayments = req+ "ListBonusPayments"+ "fixture/ListBonusPayments.yaml"++requestListWorkerBlocks :: ListWorkerBlocks -> TestTree+requestListWorkerBlocks = req+ "ListWorkerBlocks"+ "fixture/ListWorkerBlocks.yaml"++requestDeleteWorkerBlock :: DeleteWorkerBlock -> TestTree+requestDeleteWorkerBlock = req+ "DeleteWorkerBlock"+ "fixture/DeleteWorkerBlock.yaml"++requestUpdateNotificationSettings :: UpdateNotificationSettings -> TestTree+requestUpdateNotificationSettings = req+ "UpdateNotificationSettings"+ "fixture/UpdateNotificationSettings.yaml"++requestAssociateQualificationWithWorker :: AssociateQualificationWithWorker -> TestTree+requestAssociateQualificationWithWorker = req+ "AssociateQualificationWithWorker"+ "fixture/AssociateQualificationWithWorker.yaml"++requestCreateHIT :: CreateHIT -> TestTree+requestCreateHIT = req+ "CreateHIT"+ "fixture/CreateHIT.yaml"++requestGetAccountBalance :: GetAccountBalance -> TestTree+requestGetAccountBalance = req+ "GetAccountBalance"+ "fixture/GetAccountBalance.yaml"++-- Responses++responseApproveAssignment :: ApproveAssignmentResponse -> TestTree+responseApproveAssignment = res+ "ApproveAssignmentResponse"+ "fixture/ApproveAssignmentResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ApproveAssignment)++responseListReviewPolicyResultsForHIT :: ListReviewPolicyResultsForHITResponse -> TestTree+responseListReviewPolicyResultsForHIT = res+ "ListReviewPolicyResultsForHITResponse"+ "fixture/ListReviewPolicyResultsForHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListReviewPolicyResultsForHIT)++responseListHITs :: ListHITsResponse -> TestTree+responseListHITs = res+ "ListHITsResponse"+ "fixture/ListHITsResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListHITs)++responseListWorkersWithQualificationType :: ListWorkersWithQualificationTypeResponse -> TestTree+responseListWorkersWithQualificationType = res+ "ListWorkersWithQualificationTypeResponse"+ "fixture/ListWorkersWithQualificationTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListWorkersWithQualificationType)++responseDeleteHIT :: DeleteHITResponse -> TestTree+responseDeleteHIT = res+ "DeleteHITResponse"+ "fixture/DeleteHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy DeleteHIT)++responseListReviewableHITs :: ListReviewableHITsResponse -> TestTree+responseListReviewableHITs = res+ "ListReviewableHITsResponse"+ "fixture/ListReviewableHITsResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListReviewableHITs)++responseGetAssignment :: GetAssignmentResponse -> TestTree+responseGetAssignment = res+ "GetAssignmentResponse"+ "fixture/GetAssignmentResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy GetAssignment)++responseDeleteQualificationType :: DeleteQualificationTypeResponse -> TestTree+responseDeleteQualificationType = res+ "DeleteQualificationTypeResponse"+ "fixture/DeleteQualificationTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy DeleteQualificationType)++responseUpdateQualificationType :: UpdateQualificationTypeResponse -> TestTree+responseUpdateQualificationType = res+ "UpdateQualificationTypeResponse"+ "fixture/UpdateQualificationTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy UpdateQualificationType)++responseListQualificationTypes :: ListQualificationTypesResponse -> TestTree+responseListQualificationTypes = res+ "ListQualificationTypesResponse"+ "fixture/ListQualificationTypesResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListQualificationTypes)++responseUpdateHITTypeOfHIT :: UpdateHITTypeOfHITResponse -> TestTree+responseUpdateHITTypeOfHIT = res+ "UpdateHITTypeOfHITResponse"+ "fixture/UpdateHITTypeOfHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy UpdateHITTypeOfHIT)++responseDisassociateQualificationFromWorker :: DisassociateQualificationFromWorkerResponse -> TestTree+responseDisassociateQualificationFromWorker = res+ "DisassociateQualificationFromWorkerResponse"+ "fixture/DisassociateQualificationFromWorkerResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy DisassociateQualificationFromWorker)++responseSendTestEventNotification :: SendTestEventNotificationResponse -> TestTree+responseSendTestEventNotification = res+ "SendTestEventNotificationResponse"+ "fixture/SendTestEventNotificationResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy SendTestEventNotification)++responseNotifyWorkers :: NotifyWorkersResponse -> TestTree+responseNotifyWorkers = res+ "NotifyWorkersResponse"+ "fixture/NotifyWorkersResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy NotifyWorkers)++responseCreateHITWithHITType :: CreateHITWithHITTypeResponse -> TestTree+responseCreateHITWithHITType = res+ "CreateHITWithHITTypeResponse"+ "fixture/CreateHITWithHITTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy CreateHITWithHITType)++responseCreateHITType :: CreateHITTypeResponse -> TestTree+responseCreateHITType = res+ "CreateHITTypeResponse"+ "fixture/CreateHITTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy CreateHITType)++responseSendBonus :: SendBonusResponse -> TestTree+responseSendBonus = res+ "SendBonusResponse"+ "fixture/SendBonusResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy SendBonus)++responseListQualificationRequests :: ListQualificationRequestsResponse -> TestTree+responseListQualificationRequests = res+ "ListQualificationRequestsResponse"+ "fixture/ListQualificationRequestsResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListQualificationRequests)++responseUpdateExpirationForHIT :: UpdateExpirationForHITResponse -> TestTree+responseUpdateExpirationForHIT = res+ "UpdateExpirationForHITResponse"+ "fixture/UpdateExpirationForHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy UpdateExpirationForHIT)++responseRejectAssignment :: RejectAssignmentResponse -> TestTree+responseRejectAssignment = res+ "RejectAssignmentResponse"+ "fixture/RejectAssignmentResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy RejectAssignment)++responseListAssignmentsForHIT :: ListAssignmentsForHITResponse -> TestTree+responseListAssignmentsForHIT = res+ "ListAssignmentsForHITResponse"+ "fixture/ListAssignmentsForHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListAssignmentsForHIT)++responseRejectQualificationRequest :: RejectQualificationRequestResponse -> TestTree+responseRejectQualificationRequest = res+ "RejectQualificationRequestResponse"+ "fixture/RejectQualificationRequestResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy RejectQualificationRequest)++responseGetQualificationScore :: GetQualificationScoreResponse -> TestTree+responseGetQualificationScore = res+ "GetQualificationScoreResponse"+ "fixture/GetQualificationScoreResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy GetQualificationScore)++responseGetQualificationType :: GetQualificationTypeResponse -> TestTree+responseGetQualificationType = res+ "GetQualificationTypeResponse"+ "fixture/GetQualificationTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy GetQualificationType)++responseUpdateHITReviewStatus :: UpdateHITReviewStatusResponse -> TestTree+responseUpdateHITReviewStatus = res+ "UpdateHITReviewStatusResponse"+ "fixture/UpdateHITReviewStatusResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy UpdateHITReviewStatus)++responseCreateQualificationType :: CreateQualificationTypeResponse -> TestTree+responseCreateQualificationType = res+ "CreateQualificationTypeResponse"+ "fixture/CreateQualificationTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy CreateQualificationType)++responseAcceptQualificationRequest :: AcceptQualificationRequestResponse -> TestTree+responseAcceptQualificationRequest = res+ "AcceptQualificationRequestResponse"+ "fixture/AcceptQualificationRequestResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy AcceptQualificationRequest)++responseGetFileUploadURL :: GetFileUploadURLResponse -> TestTree+responseGetFileUploadURL = res+ "GetFileUploadURLResponse"+ "fixture/GetFileUploadURLResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy GetFileUploadURL)++responseCreateAdditionalAssignmentsForHIT :: CreateAdditionalAssignmentsForHITResponse -> TestTree+responseCreateAdditionalAssignmentsForHIT = res+ "CreateAdditionalAssignmentsForHITResponse"+ "fixture/CreateAdditionalAssignmentsForHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy CreateAdditionalAssignmentsForHIT)++responseGetHIT :: GetHITResponse -> TestTree+responseGetHIT = res+ "GetHITResponse"+ "fixture/GetHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy GetHIT)++responseCreateWorkerBlock :: CreateWorkerBlockResponse -> TestTree+responseCreateWorkerBlock = res+ "CreateWorkerBlockResponse"+ "fixture/CreateWorkerBlockResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy CreateWorkerBlock)++responseListHITsForQualificationType :: ListHITsForQualificationTypeResponse -> TestTree+responseListHITsForQualificationType = res+ "ListHITsForQualificationTypeResponse"+ "fixture/ListHITsForQualificationTypeResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListHITsForQualificationType)++responseListBonusPayments :: ListBonusPaymentsResponse -> TestTree+responseListBonusPayments = res+ "ListBonusPaymentsResponse"+ "fixture/ListBonusPaymentsResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListBonusPayments)++responseListWorkerBlocks :: ListWorkerBlocksResponse -> TestTree+responseListWorkerBlocks = res+ "ListWorkerBlocksResponse"+ "fixture/ListWorkerBlocksResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy ListWorkerBlocks)++responseDeleteWorkerBlock :: DeleteWorkerBlockResponse -> TestTree+responseDeleteWorkerBlock = res+ "DeleteWorkerBlockResponse"+ "fixture/DeleteWorkerBlockResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy DeleteWorkerBlock)++responseUpdateNotificationSettings :: UpdateNotificationSettingsResponse -> TestTree+responseUpdateNotificationSettings = res+ "UpdateNotificationSettingsResponse"+ "fixture/UpdateNotificationSettingsResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy UpdateNotificationSettings)++responseAssociateQualificationWithWorker :: AssociateQualificationWithWorkerResponse -> TestTree+responseAssociateQualificationWithWorker = res+ "AssociateQualificationWithWorkerResponse"+ "fixture/AssociateQualificationWithWorkerResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy AssociateQualificationWithWorker)++responseCreateHIT :: CreateHITResponse -> TestTree+responseCreateHIT = res+ "CreateHITResponse"+ "fixture/CreateHITResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy CreateHIT)++responseGetAccountBalance :: GetAccountBalanceResponse -> TestTree+responseGetAccountBalance = res+ "GetAccountBalanceResponse"+ "fixture/GetAccountBalanceResponse.proto"+ mechanicalTurk+ (Proxy :: Proxy GetAccountBalance)
+ test/Test/AWS/MechanicalTurk.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.MechanicalTurk+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.MechanicalTurk+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/MechanicalTurk/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.MechanicalTurk.Internal+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.MechanicalTurk.Internal where