amazonka-swf (empty) → 0.0.0
raw patch · 37 files changed
+13571/−0 lines, 37 filesdep +amazonka-coredep +basesetup-changed
Dependencies added: amazonka-core, base
Files
- LICENSE +373/−0
- README.md +26/−0
- Setup.hs +2/−0
- amazonka-swf.cabal +80/−0
- gen/Network/AWS/SWF.hs +86/−0
- gen/Network/AWS/SWF/CountClosedWorkflowExecutions.hs +205/−0
- gen/Network/AWS/SWF/CountOpenWorkflowExecutions.hs +180/−0
- gen/Network/AWS/SWF/CountPendingActivityTasks.hs +144/−0
- gen/Network/AWS/SWF/CountPendingDecisionTasks.hs +144/−0
- gen/Network/AWS/SWF/DeprecateActivityType.hs +116/−0
- gen/Network/AWS/SWF/DeprecateDomain.hs +104/−0
- gen/Network/AWS/SWF/DeprecateWorkflowType.hs +117/−0
- gen/Network/AWS/SWF/DescribeActivityType.hs +151/−0
- gen/Network/AWS/SWF/DescribeDomain.hs +128/−0
- gen/Network/AWS/SWF/DescribeWorkflowExecution.hs +188/−0
- gen/Network/AWS/SWF/DescribeWorkflowType.hs +153/−0
- gen/Network/AWS/SWF/GetWorkflowExecutionHistory.hs +193/−0
- gen/Network/AWS/SWF/ListActivityTypes.hs +204/−0
- gen/Network/AWS/SWF/ListClosedWorkflowExecutions.hs +261/−0
- gen/Network/AWS/SWF/ListDomains.hs +181/−0
- gen/Network/AWS/SWF/ListOpenWorkflowExecutions.hs +233/−0
- gen/Network/AWS/SWF/ListWorkflowTypes.hs +202/−0
- gen/Network/AWS/SWF/PollForActivityTask.hs +218/−0
- gen/Network/AWS/SWF/PollForDecisionTask.hs +291/−0
- gen/Network/AWS/SWF/RecordActivityTaskHeartbeat.hs +148/−0
- gen/Network/AWS/SWF/RegisterActivityType.hs +233/−0
- gen/Network/AWS/SWF/RegisterDomain.hs +132/−0
- gen/Network/AWS/SWF/RegisterWorkflowType.hs +218/−0
- gen/Network/AWS/SWF/RequestCancelWorkflowExecution.hs +125/−0
- gen/Network/AWS/SWF/RespondActivityTaskCanceled.hs +123/−0
- gen/Network/AWS/SWF/RespondActivityTaskCompleted.hs +125/−0
- gen/Network/AWS/SWF/RespondActivityTaskFailed.hs +130/−0
- gen/Network/AWS/SWF/RespondDecisionTaskCompleted.hs +129/−0
- gen/Network/AWS/SWF/SignalWorkflowExecution.hs +147/−0
- gen/Network/AWS/SWF/StartWorkflowExecution.hs +255/−0
- gen/Network/AWS/SWF/TerminateWorkflowExecution.hs +165/−0
- gen/Network/AWS/SWF/Types.hs +7661/−0
+ LICENSE view
@@ -0,0 +1,373 @@+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.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++ This Source Code Form is "Incompatible With Secondary Licenses", as+ defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,26 @@+# Amazon Simple Workflow Service SDK++> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!++* [description](#description)+* [Contribute](#contribute)+* [Licence](#licence)++## Description++Amazon Simple Workflow Service (Amazon SWF) makes it easy to build applications that coordinate work across distributed components. In Amazon SWF, a task represents a logical unit of work that is performed by a component of your application. Coordinating tasks across the application involves managing intertask dependencies, scheduling, and concurrency in accordance with the logical flow of the application. Amazon SWF gives you full control over implementing tasks and coordinating them without worrying about underlying complexities such as tracking their progress and maintaining their state.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-swf)+and [AWS API Reference](http://docs.aws.amazon.com/amazonswf/latest/apireference/Welcome.html).+++## 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-swf` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-swf.cabal view
@@ -0,0 +1,80 @@+name: amazonka-swf+version: 0.0.0+synopsis: Amazon Simple Workflow Service SDK.+homepage: https://github.com/brendanhay/amazonka+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2014 Brendan Hay+category: Network, AWS, Cloud+build-type: Simple+extra-source-files: README.md+cabal-version: >= 1.10++description:+ Amazon Simple Workflow Service (Amazon SWF) makes it easy to build+ applications that coordinate work across distributed components. In+ Amazon SWF, a task represents a logical unit of work that is performed+ by a component of your application. Coordinating tasks across the+ application involves managing intertask dependencies, scheduling, and+ concurrency in accordance with the logical flow of the application.+ Amazon SWF gives you full control over implementing tasks and+ coordinating them without worrying about underlying complexities such+ as tracking their progress and maintaining their state.+ .+ /See:/ <http://docs.aws.amazon.com/amazonswf/latest/apireference/Welcome.html AWS API Reference>+ .+ /Warning:/ This is an experimental preview release which is still under+ heavy development and not intended for public consumption, caveat emptor!++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.AWS.SWF+ , Network.AWS.SWF.CountClosedWorkflowExecutions+ , Network.AWS.SWF.CountOpenWorkflowExecutions+ , Network.AWS.SWF.CountPendingActivityTasks+ , Network.AWS.SWF.CountPendingDecisionTasks+ , Network.AWS.SWF.DeprecateActivityType+ , Network.AWS.SWF.DeprecateDomain+ , Network.AWS.SWF.DeprecateWorkflowType+ , Network.AWS.SWF.DescribeActivityType+ , Network.AWS.SWF.DescribeDomain+ , Network.AWS.SWF.DescribeWorkflowExecution+ , Network.AWS.SWF.DescribeWorkflowType+ , Network.AWS.SWF.GetWorkflowExecutionHistory+ , Network.AWS.SWF.ListActivityTypes+ , Network.AWS.SWF.ListClosedWorkflowExecutions+ , Network.AWS.SWF.ListDomains+ , Network.AWS.SWF.ListOpenWorkflowExecutions+ , Network.AWS.SWF.ListWorkflowTypes+ , Network.AWS.SWF.PollForActivityTask+ , Network.AWS.SWF.PollForDecisionTask+ , Network.AWS.SWF.RecordActivityTaskHeartbeat+ , Network.AWS.SWF.RegisterActivityType+ , Network.AWS.SWF.RegisterDomain+ , Network.AWS.SWF.RegisterWorkflowType+ , Network.AWS.SWF.RequestCancelWorkflowExecution+ , Network.AWS.SWF.RespondActivityTaskCanceled+ , Network.AWS.SWF.RespondActivityTaskCompleted+ , Network.AWS.SWF.RespondActivityTaskFailed+ , Network.AWS.SWF.RespondDecisionTaskCompleted+ , Network.AWS.SWF.SignalWorkflowExecution+ , Network.AWS.SWF.StartWorkflowExecution+ , Network.AWS.SWF.TerminateWorkflowExecution+ , Network.AWS.SWF.Types++ other-modules:++ build-depends:+ amazonka-core+ , base >= 4.7 && < 5
+ gen/Network/AWS/SWF.hs view
@@ -0,0 +1,86 @@+-- Module : Network.AWS.SWF+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Amazon Simple Workflow Service (Amazon SWF) makes it easy to build+-- applications that coordinate work across distributed components. In Amazon+-- SWF, a task represents a logical unit of work that is performed by a+-- component of your application. Coordinating tasks across the application+-- involves managing intertask dependencies, scheduling, and concurrency in+-- accordance with the logical flow of the application. Amazon SWF gives you+-- full control over implementing tasks and coordinating them without worrying+-- about underlying complexities such as tracking their progress and+-- maintaining their state.+module Network.AWS.SWF+ ( module Network.AWS.SWF.CountClosedWorkflowExecutions+ , module Network.AWS.SWF.CountOpenWorkflowExecutions+ , module Network.AWS.SWF.CountPendingActivityTasks+ , module Network.AWS.SWF.CountPendingDecisionTasks+ , module Network.AWS.SWF.DeprecateActivityType+ , module Network.AWS.SWF.DeprecateDomain+ , module Network.AWS.SWF.DeprecateWorkflowType+ , module Network.AWS.SWF.DescribeActivityType+ , module Network.AWS.SWF.DescribeDomain+ , module Network.AWS.SWF.DescribeWorkflowExecution+ , module Network.AWS.SWF.DescribeWorkflowType+ , module Network.AWS.SWF.GetWorkflowExecutionHistory+ , module Network.AWS.SWF.ListActivityTypes+ , module Network.AWS.SWF.ListClosedWorkflowExecutions+ , module Network.AWS.SWF.ListDomains+ , module Network.AWS.SWF.ListOpenWorkflowExecutions+ , module Network.AWS.SWF.ListWorkflowTypes+ , module Network.AWS.SWF.PollForActivityTask+ , module Network.AWS.SWF.PollForDecisionTask+ , module Network.AWS.SWF.RecordActivityTaskHeartbeat+ , module Network.AWS.SWF.RegisterActivityType+ , module Network.AWS.SWF.RegisterDomain+ , module Network.AWS.SWF.RegisterWorkflowType+ , module Network.AWS.SWF.RequestCancelWorkflowExecution+ , module Network.AWS.SWF.RespondActivityTaskCanceled+ , module Network.AWS.SWF.RespondActivityTaskCompleted+ , module Network.AWS.SWF.RespondActivityTaskFailed+ , module Network.AWS.SWF.RespondDecisionTaskCompleted+ , module Network.AWS.SWF.SignalWorkflowExecution+ , module Network.AWS.SWF.StartWorkflowExecution+ , module Network.AWS.SWF.TerminateWorkflowExecution+ , module Network.AWS.SWF.Types+ ) where++import Network.AWS.SWF.CountClosedWorkflowExecutions+import Network.AWS.SWF.CountOpenWorkflowExecutions+import Network.AWS.SWF.CountPendingActivityTasks+import Network.AWS.SWF.CountPendingDecisionTasks+import Network.AWS.SWF.DeprecateActivityType+import Network.AWS.SWF.DeprecateDomain+import Network.AWS.SWF.DeprecateWorkflowType+import Network.AWS.SWF.DescribeActivityType+import Network.AWS.SWF.DescribeDomain+import Network.AWS.SWF.DescribeWorkflowExecution+import Network.AWS.SWF.DescribeWorkflowType+import Network.AWS.SWF.GetWorkflowExecutionHistory+import Network.AWS.SWF.ListActivityTypes+import Network.AWS.SWF.ListClosedWorkflowExecutions+import Network.AWS.SWF.ListDomains+import Network.AWS.SWF.ListOpenWorkflowExecutions+import Network.AWS.SWF.ListWorkflowTypes+import Network.AWS.SWF.PollForActivityTask+import Network.AWS.SWF.PollForDecisionTask+import Network.AWS.SWF.RecordActivityTaskHeartbeat+import Network.AWS.SWF.RegisterActivityType+import Network.AWS.SWF.RegisterDomain+import Network.AWS.SWF.RegisterWorkflowType+import Network.AWS.SWF.RequestCancelWorkflowExecution+import Network.AWS.SWF.RespondActivityTaskCanceled+import Network.AWS.SWF.RespondActivityTaskCompleted+import Network.AWS.SWF.RespondActivityTaskFailed+import Network.AWS.SWF.RespondDecisionTaskCompleted+import Network.AWS.SWF.SignalWorkflowExecution+import Network.AWS.SWF.StartWorkflowExecution+import Network.AWS.SWF.TerminateWorkflowExecution+import Network.AWS.SWF.Types
+ gen/Network/AWS/SWF/CountClosedWorkflowExecutions.hs view
@@ -0,0 +1,205 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.CountClosedWorkflowExecutions+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns the number of closed workflow executions within the given domain+-- that meet the specified filtering criteria. Access Control You can use IAM+-- policies to control this action's access to Amazon SWF resources as+-- follows: Use a Resource element with the domain name to limit the action to+-- only specified domains. Use an Action element to allow or deny permission+-- to call this action. Constrain the following parameters by using a+-- Condition element with the appropriate keys. tagFilter.tag: String+-- constraint. The key is swf:tagFilter.tag. typeFilter.name: String+-- constraint. The key is swf:typeFilter.name. typeFilter.version: String+-- constraint. The key is swf:typeFilter.version. If the caller does not have+-- sufficient permissions to invoke the action, or the parameter values fall+-- outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountClosedWorkflowExecutions.html>+module Network.AWS.SWF.CountClosedWorkflowExecutions+ (+ -- * Request+ CountClosedWorkflowExecutions+ -- ** Request constructor+ , countClosedWorkflowExecutions+ -- ** Request lenses+ , ccweCloseStatusFilter+ , ccweCloseTimeFilter+ , ccweDomain+ , ccweExecutionFilter+ , ccweStartTimeFilter+ , ccweTagFilter+ , ccweTypeFilter++ -- * Response+ , CountClosedWorkflowExecutionsResponse+ -- ** Response constructor+ , countClosedWorkflowExecutionsResponse+ -- ** Response lenses+ , ccwerCount+ , ccwerTruncated+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data CountClosedWorkflowExecutions = CountClosedWorkflowExecutions+ { _ccweCloseStatusFilter :: Maybe CloseStatusFilter+ , _ccweCloseTimeFilter :: Maybe ExecutionTimeFilter+ , _ccweDomain :: Text+ , _ccweExecutionFilter :: Maybe WorkflowExecutionFilter+ , _ccweStartTimeFilter :: Maybe ExecutionTimeFilter+ , _ccweTagFilter :: Maybe TagFilter+ , _ccweTypeFilter :: Maybe WorkflowTypeFilter+ } deriving (Eq, Show)++-- | 'CountClosedWorkflowExecutions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ccweCloseStatusFilter' @::@ 'Maybe' 'CloseStatusFilter'+--+-- * 'ccweCloseTimeFilter' @::@ 'Maybe' 'ExecutionTimeFilter'+--+-- * 'ccweDomain' @::@ 'Text'+--+-- * 'ccweExecutionFilter' @::@ 'Maybe' 'WorkflowExecutionFilter'+--+-- * 'ccweStartTimeFilter' @::@ 'Maybe' 'ExecutionTimeFilter'+--+-- * 'ccweTagFilter' @::@ 'Maybe' 'TagFilter'+--+-- * 'ccweTypeFilter' @::@ 'Maybe' 'WorkflowTypeFilter'+--+countClosedWorkflowExecutions :: Text -- ^ 'ccweDomain'+ -> CountClosedWorkflowExecutions+countClosedWorkflowExecutions p1 = CountClosedWorkflowExecutions+ { _ccweDomain = p1+ , _ccweStartTimeFilter = Nothing+ , _ccweCloseTimeFilter = Nothing+ , _ccweExecutionFilter = Nothing+ , _ccweTypeFilter = Nothing+ , _ccweTagFilter = Nothing+ , _ccweCloseStatusFilter = Nothing+ }++-- | If specified, only workflow executions that match this close status are+-- counted. This filter has an affect only if executionStatus is specified+-- as CLOSED.+ccweCloseStatusFilter :: Lens' CountClosedWorkflowExecutions (Maybe CloseStatusFilter)+ccweCloseStatusFilter =+ lens _ccweCloseStatusFilter (\s a -> s { _ccweCloseStatusFilter = a })++-- | If specified, only workflow executions that meet the close time criteria+-- of the filter are counted.+ccweCloseTimeFilter :: Lens' CountClosedWorkflowExecutions (Maybe ExecutionTimeFilter)+ccweCloseTimeFilter =+ lens _ccweCloseTimeFilter (\s a -> s { _ccweCloseTimeFilter = a })++-- | The name of the domain containing the workflow executions to count.+ccweDomain :: Lens' CountClosedWorkflowExecutions Text+ccweDomain = lens _ccweDomain (\s a -> s { _ccweDomain = a })++-- | If specified, only workflow executions matching the WorkflowId in the+-- filter are counted.+ccweExecutionFilter :: Lens' CountClosedWorkflowExecutions (Maybe WorkflowExecutionFilter)+ccweExecutionFilter =+ lens _ccweExecutionFilter (\s a -> s { _ccweExecutionFilter = a })++-- | If specified, only workflow executions that meet the start time criteria+-- of the filter are counted.+ccweStartTimeFilter :: Lens' CountClosedWorkflowExecutions (Maybe ExecutionTimeFilter)+ccweStartTimeFilter =+ lens _ccweStartTimeFilter (\s a -> s { _ccweStartTimeFilter = a })++-- | If specified, only executions that have a tag that matches the filter are+-- counted.+ccweTagFilter :: Lens' CountClosedWorkflowExecutions (Maybe TagFilter)+ccweTagFilter = lens _ccweTagFilter (\s a -> s { _ccweTagFilter = a })++-- | If specified, indicates the type of the workflow executions to be+-- counted.+ccweTypeFilter :: Lens' CountClosedWorkflowExecutions (Maybe WorkflowTypeFilter)+ccweTypeFilter = lens _ccweTypeFilter (\s a -> s { _ccweTypeFilter = a })++data CountClosedWorkflowExecutionsResponse = CountClosedWorkflowExecutionsResponse+ { _ccwerCount :: Nat+ , _ccwerTruncated :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'CountClosedWorkflowExecutionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ccwerCount' @::@ 'Natural'+--+-- * 'ccwerTruncated' @::@ 'Maybe' 'Bool'+--+countClosedWorkflowExecutionsResponse :: Natural -- ^ 'ccwerCount'+ -> CountClosedWorkflowExecutionsResponse+countClosedWorkflowExecutionsResponse p1 = CountClosedWorkflowExecutionsResponse+ { _ccwerCount = withIso _Nat (const id) p1+ , _ccwerTruncated = Nothing+ }++-- | The number of workflow executions.+ccwerCount :: Lens' CountClosedWorkflowExecutionsResponse Natural+ccwerCount = lens _ccwerCount (\s a -> s { _ccwerCount = a }) . _Nat++-- | If set to true, indicates that the actual count was more than the maximum+-- supported by this API and the count returned is the truncated value.+ccwerTruncated :: Lens' CountClosedWorkflowExecutionsResponse (Maybe Bool)+ccwerTruncated = lens _ccwerTruncated (\s a -> s { _ccwerTruncated = a })++instance ToPath CountClosedWorkflowExecutions where+ toPath = const "/"++instance ToQuery CountClosedWorkflowExecutions where+ toQuery = const mempty++instance ToHeaders CountClosedWorkflowExecutions++instance ToJSON CountClosedWorkflowExecutions where+ toJSON CountClosedWorkflowExecutions{..} = object+ [ "domain" .= _ccweDomain+ , "startTimeFilter" .= _ccweStartTimeFilter+ , "closeTimeFilter" .= _ccweCloseTimeFilter+ , "executionFilter" .= _ccweExecutionFilter+ , "typeFilter" .= _ccweTypeFilter+ , "tagFilter" .= _ccweTagFilter+ , "closeStatusFilter" .= _ccweCloseStatusFilter+ ]++instance AWSRequest CountClosedWorkflowExecutions where+ type Sv CountClosedWorkflowExecutions = SWF+ type Rs CountClosedWorkflowExecutions = CountClosedWorkflowExecutionsResponse++ request = post "CountClosedWorkflowExecutions"+ response = jsonResponse++instance FromJSON CountClosedWorkflowExecutionsResponse where+ parseJSON = withObject "CountClosedWorkflowExecutionsResponse" $ \o -> CountClosedWorkflowExecutionsResponse+ <$> o .: "count"+ <*> o .:? "truncated"
+ gen/Network/AWS/SWF/CountOpenWorkflowExecutions.hs view
@@ -0,0 +1,180 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.CountOpenWorkflowExecutions+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns the number of open workflow executions within the given domain that+-- meet the specified filtering criteria. Access Control You can use IAM+-- policies to control this action's access to Amazon SWF resources as+-- follows: Use a Resource element with the domain name to limit the action to+-- only specified domains. Use an Action element to allow or deny permission+-- to call this action. Constrain the following parameters by using a+-- Condition element with the appropriate keys. tagFilter.tag: String+-- constraint. The key is swf:tagFilter.tag. typeFilter.name: String+-- constraint. The key is swf:typeFilter.name. typeFilter.version: String+-- constraint. The key is swf:typeFilter.version. If the caller does not have+-- sufficient permissions to invoke the action, or the parameter values fall+-- outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountOpenWorkflowExecutions.html>+module Network.AWS.SWF.CountOpenWorkflowExecutions+ (+ -- * Request+ CountOpenWorkflowExecutions+ -- ** Request constructor+ , countOpenWorkflowExecutions+ -- ** Request lenses+ , coweDomain+ , coweExecutionFilter+ , coweStartTimeFilter+ , coweTagFilter+ , coweTypeFilter++ -- * Response+ , CountOpenWorkflowExecutionsResponse+ -- ** Response constructor+ , countOpenWorkflowExecutionsResponse+ -- ** Response lenses+ , cowerCount+ , cowerTruncated+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data CountOpenWorkflowExecutions = CountOpenWorkflowExecutions+ { _coweDomain :: Text+ , _coweExecutionFilter :: Maybe WorkflowExecutionFilter+ , _coweStartTimeFilter :: ExecutionTimeFilter+ , _coweTagFilter :: Maybe TagFilter+ , _coweTypeFilter :: Maybe WorkflowTypeFilter+ } deriving (Eq, Show)++-- | 'CountOpenWorkflowExecutions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'coweDomain' @::@ 'Text'+--+-- * 'coweExecutionFilter' @::@ 'Maybe' 'WorkflowExecutionFilter'+--+-- * 'coweStartTimeFilter' @::@ 'ExecutionTimeFilter'+--+-- * 'coweTagFilter' @::@ 'Maybe' 'TagFilter'+--+-- * 'coweTypeFilter' @::@ 'Maybe' 'WorkflowTypeFilter'+--+countOpenWorkflowExecutions :: Text -- ^ 'coweDomain'+ -> ExecutionTimeFilter -- ^ 'coweStartTimeFilter'+ -> CountOpenWorkflowExecutions+countOpenWorkflowExecutions p1 p2 = CountOpenWorkflowExecutions+ { _coweDomain = p1+ , _coweStartTimeFilter = p2+ , _coweTypeFilter = Nothing+ , _coweTagFilter = Nothing+ , _coweExecutionFilter = Nothing+ }++-- | The name of the domain containing the workflow executions to count.+coweDomain :: Lens' CountOpenWorkflowExecutions Text+coweDomain = lens _coweDomain (\s a -> s { _coweDomain = a })++-- | If specified, only workflow executions matching the WorkflowId in the+-- filter are counted.+coweExecutionFilter :: Lens' CountOpenWorkflowExecutions (Maybe WorkflowExecutionFilter)+coweExecutionFilter =+ lens _coweExecutionFilter (\s a -> s { _coweExecutionFilter = a })++-- | Specifies the start time criteria that workflow executions must meet in+-- order to be counted.+coweStartTimeFilter :: Lens' CountOpenWorkflowExecutions ExecutionTimeFilter+coweStartTimeFilter =+ lens _coweStartTimeFilter (\s a -> s { _coweStartTimeFilter = a })++-- | If specified, only executions that have a tag that matches the filter are+-- counted.+coweTagFilter :: Lens' CountOpenWorkflowExecutions (Maybe TagFilter)+coweTagFilter = lens _coweTagFilter (\s a -> s { _coweTagFilter = a })++-- | Specifies the type of the workflow executions to be counted.+coweTypeFilter :: Lens' CountOpenWorkflowExecutions (Maybe WorkflowTypeFilter)+coweTypeFilter = lens _coweTypeFilter (\s a -> s { _coweTypeFilter = a })++data CountOpenWorkflowExecutionsResponse = CountOpenWorkflowExecutionsResponse+ { _cowerCount :: Nat+ , _cowerTruncated :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'CountOpenWorkflowExecutionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cowerCount' @::@ 'Natural'+--+-- * 'cowerTruncated' @::@ 'Maybe' 'Bool'+--+countOpenWorkflowExecutionsResponse :: Natural -- ^ 'cowerCount'+ -> CountOpenWorkflowExecutionsResponse+countOpenWorkflowExecutionsResponse p1 = CountOpenWorkflowExecutionsResponse+ { _cowerCount = withIso _Nat (const id) p1+ , _cowerTruncated = Nothing+ }++-- | The number of workflow executions.+cowerCount :: Lens' CountOpenWorkflowExecutionsResponse Natural+cowerCount = lens _cowerCount (\s a -> s { _cowerCount = a }) . _Nat++-- | If set to true, indicates that the actual count was more than the maximum+-- supported by this API and the count returned is the truncated value.+cowerTruncated :: Lens' CountOpenWorkflowExecutionsResponse (Maybe Bool)+cowerTruncated = lens _cowerTruncated (\s a -> s { _cowerTruncated = a })++instance ToPath CountOpenWorkflowExecutions where+ toPath = const "/"++instance ToQuery CountOpenWorkflowExecutions where+ toQuery = const mempty++instance ToHeaders CountOpenWorkflowExecutions++instance ToJSON CountOpenWorkflowExecutions where+ toJSON CountOpenWorkflowExecutions{..} = object+ [ "domain" .= _coweDomain+ , "startTimeFilter" .= _coweStartTimeFilter+ , "typeFilter" .= _coweTypeFilter+ , "tagFilter" .= _coweTagFilter+ , "executionFilter" .= _coweExecutionFilter+ ]++instance AWSRequest CountOpenWorkflowExecutions where+ type Sv CountOpenWorkflowExecutions = SWF+ type Rs CountOpenWorkflowExecutions = CountOpenWorkflowExecutionsResponse++ request = post "CountOpenWorkflowExecutions"+ response = jsonResponse++instance FromJSON CountOpenWorkflowExecutionsResponse where+ parseJSON = withObject "CountOpenWorkflowExecutionsResponse" $ \o -> CountOpenWorkflowExecutionsResponse+ <$> o .: "count"+ <*> o .:? "truncated"
+ gen/Network/AWS/SWF/CountPendingActivityTasks.hs view
@@ -0,0 +1,144 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.CountPendingActivityTasks+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns the estimated number of activity tasks in the specified task list.+-- The count returned is an approximation and is not guaranteed to be exact.+-- If you specify a task list that no activity task was ever scheduled in then+-- 0 will be returned. Access Control You can use IAM policies to control this+-- action's access to Amazon SWF resources as follows: Use a Resource element+-- with the domain name to limit the action to only specified domains. Use an+-- Action element to allow or deny permission to call this action. Constrain+-- the taskList.name parameter by using a Condition element with the+-- swf:taskList.name key to allow the action to access only certain task+-- lists. If the caller does not have sufficient permissions to invoke the+-- action, or the parameter values fall outside the specified constraints, the+-- action fails by throwing OperationNotPermitted. For details and example IAM+-- policies, see Using IAM to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountPendingActivityTasks.html>+module Network.AWS.SWF.CountPendingActivityTasks+ (+ -- * Request+ CountPendingActivityTasks+ -- ** Request constructor+ , countPendingActivityTasks+ -- ** Request lenses+ , cpatDomain+ , cpatTaskList++ -- * Response+ , CountPendingActivityTasksResponse+ -- ** Response constructor+ , countPendingActivityTasksResponse+ -- ** Response lenses+ , cpatrCount+ , cpatrTruncated+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data CountPendingActivityTasks = CountPendingActivityTasks+ { _cpatDomain :: Text+ , _cpatTaskList :: TaskList+ } deriving (Eq, Show)++-- | 'CountPendingActivityTasks' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpatDomain' @::@ 'Text'+--+-- * 'cpatTaskList' @::@ 'TaskList'+--+countPendingActivityTasks :: Text -- ^ 'cpatDomain'+ -> TaskList -- ^ 'cpatTaskList'+ -> CountPendingActivityTasks+countPendingActivityTasks p1 p2 = CountPendingActivityTasks+ { _cpatDomain = p1+ , _cpatTaskList = p2+ }++-- | The name of the domain that contains the task list.+cpatDomain :: Lens' CountPendingActivityTasks Text+cpatDomain = lens _cpatDomain (\s a -> s { _cpatDomain = a })++-- | The name of the task list.+cpatTaskList :: Lens' CountPendingActivityTasks TaskList+cpatTaskList = lens _cpatTaskList (\s a -> s { _cpatTaskList = a })++data CountPendingActivityTasksResponse = CountPendingActivityTasksResponse+ { _cpatrCount :: Nat+ , _cpatrTruncated :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'CountPendingActivityTasksResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpatrCount' @::@ 'Natural'+--+-- * 'cpatrTruncated' @::@ 'Maybe' 'Bool'+--+countPendingActivityTasksResponse :: Natural -- ^ 'cpatrCount'+ -> CountPendingActivityTasksResponse+countPendingActivityTasksResponse p1 = CountPendingActivityTasksResponse+ { _cpatrCount = withIso _Nat (const id) p1+ , _cpatrTruncated = Nothing+ }++-- | The number of tasks in the task list.+cpatrCount :: Lens' CountPendingActivityTasksResponse Natural+cpatrCount = lens _cpatrCount (\s a -> s { _cpatrCount = a }) . _Nat++-- | If set to true, indicates that the actual count was more than the maximum+-- supported by this API and the count returned is the truncated value.+cpatrTruncated :: Lens' CountPendingActivityTasksResponse (Maybe Bool)+cpatrTruncated = lens _cpatrTruncated (\s a -> s { _cpatrTruncated = a })++instance ToPath CountPendingActivityTasks where+ toPath = const "/"++instance ToQuery CountPendingActivityTasks where+ toQuery = const mempty++instance ToHeaders CountPendingActivityTasks++instance ToJSON CountPendingActivityTasks where+ toJSON CountPendingActivityTasks{..} = object+ [ "domain" .= _cpatDomain+ , "taskList" .= _cpatTaskList+ ]++instance AWSRequest CountPendingActivityTasks where+ type Sv CountPendingActivityTasks = SWF+ type Rs CountPendingActivityTasks = CountPendingActivityTasksResponse++ request = post "CountPendingActivityTasks"+ response = jsonResponse++instance FromJSON CountPendingActivityTasksResponse where+ parseJSON = withObject "CountPendingActivityTasksResponse" $ \o -> CountPendingActivityTasksResponse+ <$> o .: "count"+ <*> o .:? "truncated"
+ gen/Network/AWS/SWF/CountPendingDecisionTasks.hs view
@@ -0,0 +1,144 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.CountPendingDecisionTasks+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns the estimated number of decision tasks in the specified task list.+-- The count returned is an approximation and is not guaranteed to be exact.+-- If you specify a task list that no decision task was ever scheduled in then+-- 0 will be returned. Access Control You can use IAM policies to control this+-- action's access to Amazon SWF resources as follows: Use a Resource element+-- with the domain name to limit the action to only specified domains. Use an+-- Action element to allow or deny permission to call this action. Constrain+-- the taskList.name parameter by using a Condition element with the+-- swf:taskList.name key to allow the action to access only certain task+-- lists. If the caller does not have sufficient permissions to invoke the+-- action, or the parameter values fall outside the specified constraints, the+-- action fails by throwing OperationNotPermitted. For details and example IAM+-- policies, see Using IAM to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountPendingDecisionTasks.html>+module Network.AWS.SWF.CountPendingDecisionTasks+ (+ -- * Request+ CountPendingDecisionTasks+ -- ** Request constructor+ , countPendingDecisionTasks+ -- ** Request lenses+ , cpdtDomain+ , cpdtTaskList++ -- * Response+ , CountPendingDecisionTasksResponse+ -- ** Response constructor+ , countPendingDecisionTasksResponse+ -- ** Response lenses+ , cpdtrCount+ , cpdtrTruncated+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data CountPendingDecisionTasks = CountPendingDecisionTasks+ { _cpdtDomain :: Text+ , _cpdtTaskList :: TaskList+ } deriving (Eq, Show)++-- | 'CountPendingDecisionTasks' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpdtDomain' @::@ 'Text'+--+-- * 'cpdtTaskList' @::@ 'TaskList'+--+countPendingDecisionTasks :: Text -- ^ 'cpdtDomain'+ -> TaskList -- ^ 'cpdtTaskList'+ -> CountPendingDecisionTasks+countPendingDecisionTasks p1 p2 = CountPendingDecisionTasks+ { _cpdtDomain = p1+ , _cpdtTaskList = p2+ }++-- | The name of the domain that contains the task list.+cpdtDomain :: Lens' CountPendingDecisionTasks Text+cpdtDomain = lens _cpdtDomain (\s a -> s { _cpdtDomain = a })++-- | The name of the task list.+cpdtTaskList :: Lens' CountPendingDecisionTasks TaskList+cpdtTaskList = lens _cpdtTaskList (\s a -> s { _cpdtTaskList = a })++data CountPendingDecisionTasksResponse = CountPendingDecisionTasksResponse+ { _cpdtrCount :: Nat+ , _cpdtrTruncated :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'CountPendingDecisionTasksResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpdtrCount' @::@ 'Natural'+--+-- * 'cpdtrTruncated' @::@ 'Maybe' 'Bool'+--+countPendingDecisionTasksResponse :: Natural -- ^ 'cpdtrCount'+ -> CountPendingDecisionTasksResponse+countPendingDecisionTasksResponse p1 = CountPendingDecisionTasksResponse+ { _cpdtrCount = withIso _Nat (const id) p1+ , _cpdtrTruncated = Nothing+ }++-- | The number of tasks in the task list.+cpdtrCount :: Lens' CountPendingDecisionTasksResponse Natural+cpdtrCount = lens _cpdtrCount (\s a -> s { _cpdtrCount = a }) . _Nat++-- | If set to true, indicates that the actual count was more than the maximum+-- supported by this API and the count returned is the truncated value.+cpdtrTruncated :: Lens' CountPendingDecisionTasksResponse (Maybe Bool)+cpdtrTruncated = lens _cpdtrTruncated (\s a -> s { _cpdtrTruncated = a })++instance ToPath CountPendingDecisionTasks where+ toPath = const "/"++instance ToQuery CountPendingDecisionTasks where+ toQuery = const mempty++instance ToHeaders CountPendingDecisionTasks++instance ToJSON CountPendingDecisionTasks where+ toJSON CountPendingDecisionTasks{..} = object+ [ "domain" .= _cpdtDomain+ , "taskList" .= _cpdtTaskList+ ]++instance AWSRequest CountPendingDecisionTasks where+ type Sv CountPendingDecisionTasks = SWF+ type Rs CountPendingDecisionTasks = CountPendingDecisionTasksResponse++ request = post "CountPendingDecisionTasks"+ response = jsonResponse++instance FromJSON CountPendingDecisionTasksResponse where+ parseJSON = withObject "CountPendingDecisionTasksResponse" $ \o -> CountPendingDecisionTasksResponse+ <$> o .: "count"+ <*> o .:? "truncated"
+ gen/Network/AWS/SWF/DeprecateActivityType.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DeprecateActivityType+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Deprecates the specified activity type. After an activity type has been+-- deprecated, you cannot create new tasks of that activity type. Tasks of+-- this type that were scheduled before the type was deprecated will continue+-- to run. Access Control You can use IAM policies to control this action's+-- access to Amazon SWF resources as follows: Use a Resource element with the+-- domain name to limit the action to only specified domains. Use an Action+-- element to allow or deny permission to call this action. Constrain the+-- following parameters by using a Condition element with the appropriate+-- keys. activityType.name: String constraint. The key is+-- swf:activityType.name. activityType.version: String constraint. The key is+-- swf:activityType.version. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeprecateActivityType.html>+module Network.AWS.SWF.DeprecateActivityType+ (+ -- * Request+ DeprecateActivityType+ -- ** Request constructor+ , deprecateActivityType+ -- ** Request lenses+ , dat1ActivityType+ , dat1Domain++ -- * Response+ , DeprecateActivityTypeResponse+ -- ** Response constructor+ , deprecateActivityTypeResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data DeprecateActivityType = DeprecateActivityType+ { _dat1ActivityType :: ActivityType+ , _dat1Domain :: Text+ } deriving (Eq, Show)++-- | 'DeprecateActivityType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dat1ActivityType' @::@ 'ActivityType'+--+-- * 'dat1Domain' @::@ 'Text'+--+deprecateActivityType :: Text -- ^ 'dat1Domain'+ -> ActivityType -- ^ 'dat1ActivityType'+ -> DeprecateActivityType+deprecateActivityType p1 p2 = DeprecateActivityType+ { _dat1Domain = p1+ , _dat1ActivityType = p2+ }++-- | The activity type to deprecate.+dat1ActivityType :: Lens' DeprecateActivityType ActivityType+dat1ActivityType = lens _dat1ActivityType (\s a -> s { _dat1ActivityType = a })++-- | The name of the domain in which the activity type is registered.+dat1Domain :: Lens' DeprecateActivityType Text+dat1Domain = lens _dat1Domain (\s a -> s { _dat1Domain = a })++data DeprecateActivityTypeResponse = DeprecateActivityTypeResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'DeprecateActivityTypeResponse' constructor.+deprecateActivityTypeResponse :: DeprecateActivityTypeResponse+deprecateActivityTypeResponse = DeprecateActivityTypeResponse++instance ToPath DeprecateActivityType where+ toPath = const "/"++instance ToQuery DeprecateActivityType where+ toQuery = const mempty++instance ToHeaders DeprecateActivityType++instance ToJSON DeprecateActivityType where+ toJSON DeprecateActivityType{..} = object+ [ "domain" .= _dat1Domain+ , "activityType" .= _dat1ActivityType+ ]++instance AWSRequest DeprecateActivityType where+ type Sv DeprecateActivityType = SWF+ type Rs DeprecateActivityType = DeprecateActivityTypeResponse++ request = post "DeprecateActivityType"+ response = nullResponse DeprecateActivityTypeResponse
+ gen/Network/AWS/SWF/DeprecateDomain.hs view
@@ -0,0 +1,104 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DeprecateDomain+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Deprecates the specified domain. After a domain has been deprecated it+-- cannot be used to create new workflow executions or register new types.+-- However, you can still use visibility actions on this domain. Deprecating a+-- domain also deprecates all activity and workflow types registered in the+-- domain. Executions that were started before the domain was deprecated will+-- continue to run. Access Control You can use IAM policies to control this+-- action's access to Amazon SWF resources as follows: Use a Resource element+-- with the domain name to limit the action to only specified domains. Use an+-- Action element to allow or deny permission to call this action. You cannot+-- use an IAM policy to constrain this action's parameters. If the caller does+-- not have sufficient permissions to invoke the action, or the parameter+-- values fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeprecateDomain.html>+module Network.AWS.SWF.DeprecateDomain+ (+ -- * Request+ DeprecateDomain+ -- ** Request constructor+ , deprecateDomain+ -- ** Request lenses+ , dd1Name++ -- * Response+ , DeprecateDomainResponse+ -- ** Response constructor+ , deprecateDomainResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++newtype DeprecateDomain = DeprecateDomain+ { _dd1Name :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeprecateDomain' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dd1Name' @::@ 'Text'+--+deprecateDomain :: Text -- ^ 'dd1Name'+ -> DeprecateDomain+deprecateDomain p1 = DeprecateDomain+ { _dd1Name = p1+ }++-- | The name of the domain to deprecate.+dd1Name :: Lens' DeprecateDomain Text+dd1Name = lens _dd1Name (\s a -> s { _dd1Name = a })++data DeprecateDomainResponse = DeprecateDomainResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'DeprecateDomainResponse' constructor.+deprecateDomainResponse :: DeprecateDomainResponse+deprecateDomainResponse = DeprecateDomainResponse++instance ToPath DeprecateDomain where+ toPath = const "/"++instance ToQuery DeprecateDomain where+ toQuery = const mempty++instance ToHeaders DeprecateDomain++instance ToJSON DeprecateDomain where+ toJSON DeprecateDomain{..} = object+ [ "name" .= _dd1Name+ ]++instance AWSRequest DeprecateDomain where+ type Sv DeprecateDomain = SWF+ type Rs DeprecateDomain = DeprecateDomainResponse++ request = post "DeprecateDomain"+ response = nullResponse DeprecateDomainResponse
+ gen/Network/AWS/SWF/DeprecateWorkflowType.hs view
@@ -0,0 +1,117 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DeprecateWorkflowType+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Deprecates the specified workflow type. After a workflow type has been+-- deprecated, you cannot create new executions of that type. Executions that+-- were started before the type was deprecated will continue to run. A+-- deprecated workflow type may still be used when calling visibility actions.+-- Access Control You can use IAM policies to control this action's access to+-- Amazon SWF resources as follows: Use a Resource element with the domain+-- name to limit the action to only specified domains. Use an Action element+-- to allow or deny permission to call this action. Constrain the following+-- parameters by using a Condition element with the appropriate keys.+-- workflowType.name: String constraint. The key is swf:workflowType.name.+-- workflowType.version: String constraint. The key is+-- swf:workflowType.version. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeprecateWorkflowType.html>+module Network.AWS.SWF.DeprecateWorkflowType+ (+ -- * Request+ DeprecateWorkflowType+ -- ** Request constructor+ , deprecateWorkflowType+ -- ** Request lenses+ , dwt1Domain+ , dwt1WorkflowType++ -- * Response+ , DeprecateWorkflowTypeResponse+ -- ** Response constructor+ , deprecateWorkflowTypeResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data DeprecateWorkflowType = DeprecateWorkflowType+ { _dwt1Domain :: Text+ , _dwt1WorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'DeprecateWorkflowType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwt1Domain' @::@ 'Text'+--+-- * 'dwt1WorkflowType' @::@ 'WorkflowType'+--+deprecateWorkflowType :: Text -- ^ 'dwt1Domain'+ -> WorkflowType -- ^ 'dwt1WorkflowType'+ -> DeprecateWorkflowType+deprecateWorkflowType p1 p2 = DeprecateWorkflowType+ { _dwt1Domain = p1+ , _dwt1WorkflowType = p2+ }++-- | The name of the domain in which the workflow type is registered.+dwt1Domain :: Lens' DeprecateWorkflowType Text+dwt1Domain = lens _dwt1Domain (\s a -> s { _dwt1Domain = a })++-- | The workflow type to deprecate.+dwt1WorkflowType :: Lens' DeprecateWorkflowType WorkflowType+dwt1WorkflowType = lens _dwt1WorkflowType (\s a -> s { _dwt1WorkflowType = a })++data DeprecateWorkflowTypeResponse = DeprecateWorkflowTypeResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'DeprecateWorkflowTypeResponse' constructor.+deprecateWorkflowTypeResponse :: DeprecateWorkflowTypeResponse+deprecateWorkflowTypeResponse = DeprecateWorkflowTypeResponse++instance ToPath DeprecateWorkflowType where+ toPath = const "/"++instance ToQuery DeprecateWorkflowType where+ toQuery = const mempty++instance ToHeaders DeprecateWorkflowType++instance ToJSON DeprecateWorkflowType where+ toJSON DeprecateWorkflowType{..} = object+ [ "domain" .= _dwt1Domain+ , "workflowType" .= _dwt1WorkflowType+ ]++instance AWSRequest DeprecateWorkflowType where+ type Sv DeprecateWorkflowType = SWF+ type Rs DeprecateWorkflowType = DeprecateWorkflowTypeResponse++ request = post "DeprecateWorkflowType"+ response = nullResponse DeprecateWorkflowTypeResponse
+ gen/Network/AWS/SWF/DescribeActivityType.hs view
@@ -0,0 +1,151 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DescribeActivityType+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns information about the specified activity type. This includes+-- configuration settings provided at registration time as well as other+-- general information about the type. Access Control You can use IAM policies+-- to control this action's access to Amazon SWF resources as follows: Use a+-- Resource element with the domain name to limit the action to only specified+-- domains. Use an Action element to allow or deny permission to call this+-- action. Constrain the following parameters by using a Condition element+-- with the appropriate keys. activityType.name: String constraint. The key is+-- swf:activityType.name. activityType.version: String constraint. The key is+-- swf:activityType.version. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeActivityType.html>+module Network.AWS.SWF.DescribeActivityType+ (+ -- * Request+ DescribeActivityType+ -- ** Request constructor+ , describeActivityType+ -- ** Request lenses+ , datActivityType+ , datDomain++ -- * Response+ , DescribeActivityTypeResponse+ -- ** Response constructor+ , describeActivityTypeResponse+ -- ** Response lenses+ , datrConfiguration+ , datrTypeInfo+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data DescribeActivityType = DescribeActivityType+ { _datActivityType :: ActivityType+ , _datDomain :: Text+ } deriving (Eq, Show)++-- | 'DescribeActivityType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'datActivityType' @::@ 'ActivityType'+--+-- * 'datDomain' @::@ 'Text'+--+describeActivityType :: Text -- ^ 'datDomain'+ -> ActivityType -- ^ 'datActivityType'+ -> DescribeActivityType+describeActivityType p1 p2 = DescribeActivityType+ { _datDomain = p1+ , _datActivityType = p2+ }++-- | The activity type to describe.+datActivityType :: Lens' DescribeActivityType ActivityType+datActivityType = lens _datActivityType (\s a -> s { _datActivityType = a })++-- | The name of the domain in which the activity type is registered.+datDomain :: Lens' DescribeActivityType Text+datDomain = lens _datDomain (\s a -> s { _datDomain = a })++data DescribeActivityTypeResponse = DescribeActivityTypeResponse+ { _datrConfiguration :: ActivityTypeConfiguration+ , _datrTypeInfo :: ActivityTypeInfo+ } deriving (Eq, Show)++-- | 'DescribeActivityTypeResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'datrConfiguration' @::@ 'ActivityTypeConfiguration'+--+-- * 'datrTypeInfo' @::@ 'ActivityTypeInfo'+--+describeActivityTypeResponse :: ActivityTypeInfo -- ^ 'datrTypeInfo'+ -> ActivityTypeConfiguration -- ^ 'datrConfiguration'+ -> DescribeActivityTypeResponse+describeActivityTypeResponse p1 p2 = DescribeActivityTypeResponse+ { _datrTypeInfo = p1+ , _datrConfiguration = p2+ }++-- | The configuration settings registered with the activity type.+datrConfiguration :: Lens' DescribeActivityTypeResponse ActivityTypeConfiguration+datrConfiguration =+ lens _datrConfiguration (\s a -> s { _datrConfiguration = a })++-- | General information about the activity type. The status of activity type+-- (returned in the ActivityTypeInfo structure) can be one of the following.+-- REGISTERED: The type is registered and available. Workers supporting this+-- type should be running. DEPRECATED: The type was deprecated using+-- DeprecateActivityType, but is still in use. You should keep workers+-- supporting this type running. You cannot create new tasks of this type.+datrTypeInfo :: Lens' DescribeActivityTypeResponse ActivityTypeInfo+datrTypeInfo = lens _datrTypeInfo (\s a -> s { _datrTypeInfo = a })++instance ToPath DescribeActivityType where+ toPath = const "/"++instance ToQuery DescribeActivityType where+ toQuery = const mempty++instance ToHeaders DescribeActivityType++instance ToJSON DescribeActivityType where+ toJSON DescribeActivityType{..} = object+ [ "domain" .= _datDomain+ , "activityType" .= _datActivityType+ ]++instance AWSRequest DescribeActivityType where+ type Sv DescribeActivityType = SWF+ type Rs DescribeActivityType = DescribeActivityTypeResponse++ request = post "DescribeActivityType"+ response = jsonResponse++instance FromJSON DescribeActivityTypeResponse where+ parseJSON = withObject "DescribeActivityTypeResponse" $ \o -> DescribeActivityTypeResponse+ <$> o .: "configuration"+ <*> o .: "typeInfo"
+ gen/Network/AWS/SWF/DescribeDomain.hs view
@@ -0,0 +1,128 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DescribeDomain+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns information about the specified domain including description and+-- status. Access Control You can use IAM policies to control this action's+-- access to Amazon SWF resources as follows: Use a Resource element with the+-- domain name to limit the action to only specified domains. Use an Action+-- element to allow or deny permission to call this action. You cannot use an+-- IAM policy to constrain this action's parameters. If the caller does not+-- have sufficient permissions to invoke the action, or the parameter values+-- fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeDomain.html>+module Network.AWS.SWF.DescribeDomain+ (+ -- * Request+ DescribeDomain+ -- ** Request constructor+ , describeDomain+ -- ** Request lenses+ , ddName++ -- * Response+ , DescribeDomainResponse+ -- ** Response constructor+ , describeDomainResponse+ -- ** Response lenses+ , ddrConfiguration+ , ddrDomainInfo+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++newtype DescribeDomain = DescribeDomain+ { _ddName :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DescribeDomain' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddName' @::@ 'Text'+--+describeDomain :: Text -- ^ 'ddName'+ -> DescribeDomain+describeDomain p1 = DescribeDomain+ { _ddName = p1+ }++-- | The name of the domain to describe.+ddName :: Lens' DescribeDomain Text+ddName = lens _ddName (\s a -> s { _ddName = a })++data DescribeDomainResponse = DescribeDomainResponse+ { _ddrConfiguration :: DomainConfiguration+ , _ddrDomainInfo :: DomainInfo+ } deriving (Eq, Show)++-- | 'DescribeDomainResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddrConfiguration' @::@ 'DomainConfiguration'+--+-- * 'ddrDomainInfo' @::@ 'DomainInfo'+--+describeDomainResponse :: DomainInfo -- ^ 'ddrDomainInfo'+ -> DomainConfiguration -- ^ 'ddrConfiguration'+ -> DescribeDomainResponse+describeDomainResponse p1 p2 = DescribeDomainResponse+ { _ddrDomainInfo = p1+ , _ddrConfiguration = p2+ }++ddrConfiguration :: Lens' DescribeDomainResponse DomainConfiguration+ddrConfiguration = lens _ddrConfiguration (\s a -> s { _ddrConfiguration = a })++ddrDomainInfo :: Lens' DescribeDomainResponse DomainInfo+ddrDomainInfo = lens _ddrDomainInfo (\s a -> s { _ddrDomainInfo = a })++instance ToPath DescribeDomain where+ toPath = const "/"++instance ToQuery DescribeDomain where+ toQuery = const mempty++instance ToHeaders DescribeDomain++instance ToJSON DescribeDomain where+ toJSON DescribeDomain{..} = object+ [ "name" .= _ddName+ ]++instance AWSRequest DescribeDomain where+ type Sv DescribeDomain = SWF+ type Rs DescribeDomain = DescribeDomainResponse++ request = post "DescribeDomain"+ response = jsonResponse++instance FromJSON DescribeDomainResponse where+ parseJSON = withObject "DescribeDomainResponse" $ \o -> DescribeDomainResponse+ <$> o .: "configuration"+ <*> o .: "domainInfo"
+ gen/Network/AWS/SWF/DescribeWorkflowExecution.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DescribeWorkflowExecution+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns information about the specified workflow execution including its+-- type and some statistics. Access Control You can use IAM policies to+-- control this action's access to Amazon SWF resources as follows: Use a+-- Resource element with the domain name to limit the action to only specified+-- domains. Use an Action element to allow or deny permission to call this+-- action. You cannot use an IAM policy to constrain this action's parameters.+-- If the caller does not have sufficient permissions to invoke the action, or+-- the parameter values fall outside the specified constraints, the action+-- fails by throwing OperationNotPermitted. For details and example IAM+-- policies, see Using IAM to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeWorkflowExecution.html>+module Network.AWS.SWF.DescribeWorkflowExecution+ (+ -- * Request+ DescribeWorkflowExecution+ -- ** Request constructor+ , describeWorkflowExecution+ -- ** Request lenses+ , dweDomain+ , dweExecution++ -- * Response+ , DescribeWorkflowExecutionResponse+ -- ** Response constructor+ , describeWorkflowExecutionResponse+ -- ** Response lenses+ , dwerExecutionConfiguration+ , dwerExecutionInfo+ , dwerLatestActivityTaskTimestamp+ , dwerLatestExecutionContext+ , dwerOpenCounts+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data DescribeWorkflowExecution = DescribeWorkflowExecution+ { _dweDomain :: Text+ , _dweExecution :: WorkflowExecution+ } deriving (Eq, Show)++-- | 'DescribeWorkflowExecution' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dweDomain' @::@ 'Text'+--+-- * 'dweExecution' @::@ 'WorkflowExecution'+--+describeWorkflowExecution :: Text -- ^ 'dweDomain'+ -> WorkflowExecution -- ^ 'dweExecution'+ -> DescribeWorkflowExecution+describeWorkflowExecution p1 p2 = DescribeWorkflowExecution+ { _dweDomain = p1+ , _dweExecution = p2+ }++-- | The name of the domain containing the workflow execution.+dweDomain :: Lens' DescribeWorkflowExecution Text+dweDomain = lens _dweDomain (\s a -> s { _dweDomain = a })++-- | The workflow execution to describe.+dweExecution :: Lens' DescribeWorkflowExecution WorkflowExecution+dweExecution = lens _dweExecution (\s a -> s { _dweExecution = a })++data DescribeWorkflowExecutionResponse = DescribeWorkflowExecutionResponse+ { _dwerExecutionConfiguration :: WorkflowExecutionConfiguration+ , _dwerExecutionInfo :: WorkflowExecutionInfo+ , _dwerLatestActivityTaskTimestamp :: Maybe RFC822+ , _dwerLatestExecutionContext :: Maybe Text+ , _dwerOpenCounts :: WorkflowExecutionOpenCounts+ } deriving (Eq, Show)++-- | 'DescribeWorkflowExecutionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwerExecutionConfiguration' @::@ 'WorkflowExecutionConfiguration'+--+-- * 'dwerExecutionInfo' @::@ 'WorkflowExecutionInfo'+--+-- * 'dwerLatestActivityTaskTimestamp' @::@ 'Maybe' 'UTCTime'+--+-- * 'dwerLatestExecutionContext' @::@ 'Maybe' 'Text'+--+-- * 'dwerOpenCounts' @::@ 'WorkflowExecutionOpenCounts'+--+describeWorkflowExecutionResponse :: WorkflowExecutionInfo -- ^ 'dwerExecutionInfo'+ -> WorkflowExecutionConfiguration -- ^ 'dwerExecutionConfiguration'+ -> WorkflowExecutionOpenCounts -- ^ 'dwerOpenCounts'+ -> DescribeWorkflowExecutionResponse+describeWorkflowExecutionResponse p1 p2 p3 = DescribeWorkflowExecutionResponse+ { _dwerExecutionInfo = p1+ , _dwerExecutionConfiguration = p2+ , _dwerOpenCounts = p3+ , _dwerLatestActivityTaskTimestamp = Nothing+ , _dwerLatestExecutionContext = Nothing+ }++-- | The configuration settings for this workflow execution including timeout+-- values, tasklist etc.+dwerExecutionConfiguration :: Lens' DescribeWorkflowExecutionResponse WorkflowExecutionConfiguration+dwerExecutionConfiguration =+ lens _dwerExecutionConfiguration+ (\s a -> s { _dwerExecutionConfiguration = a })++-- | Information about the workflow execution.+dwerExecutionInfo :: Lens' DescribeWorkflowExecutionResponse WorkflowExecutionInfo+dwerExecutionInfo =+ lens _dwerExecutionInfo (\s a -> s { _dwerExecutionInfo = a })++-- | The time when the last activity task was scheduled for this workflow+-- execution. You can use this information to determine if the workflow has+-- not made progress for an unusually long period of time and might require+-- a corrective action.+dwerLatestActivityTaskTimestamp :: Lens' DescribeWorkflowExecutionResponse (Maybe UTCTime)+dwerLatestActivityTaskTimestamp =+ lens _dwerLatestActivityTaskTimestamp+ (\s a -> s { _dwerLatestActivityTaskTimestamp = a })+ . mapping _Time++-- | The latest executionContext provided by the decider for this workflow+-- execution. A decider can provide an executionContext, which is a free+-- form string, when closing a decision task using+-- RespondDecisionTaskCompleted.+dwerLatestExecutionContext :: Lens' DescribeWorkflowExecutionResponse (Maybe Text)+dwerLatestExecutionContext =+ lens _dwerLatestExecutionContext+ (\s a -> s { _dwerLatestExecutionContext = a })++-- | The number of tasks for this workflow execution. This includes open and+-- closed tasks of all types.+dwerOpenCounts :: Lens' DescribeWorkflowExecutionResponse WorkflowExecutionOpenCounts+dwerOpenCounts = lens _dwerOpenCounts (\s a -> s { _dwerOpenCounts = a })++instance ToPath DescribeWorkflowExecution where+ toPath = const "/"++instance ToQuery DescribeWorkflowExecution where+ toQuery = const mempty++instance ToHeaders DescribeWorkflowExecution++instance ToJSON DescribeWorkflowExecution where+ toJSON DescribeWorkflowExecution{..} = object+ [ "domain" .= _dweDomain+ , "execution" .= _dweExecution+ ]++instance AWSRequest DescribeWorkflowExecution where+ type Sv DescribeWorkflowExecution = SWF+ type Rs DescribeWorkflowExecution = DescribeWorkflowExecutionResponse++ request = post "DescribeWorkflowExecution"+ response = jsonResponse++instance FromJSON DescribeWorkflowExecutionResponse where+ parseJSON = withObject "DescribeWorkflowExecutionResponse" $ \o -> DescribeWorkflowExecutionResponse+ <$> o .: "executionConfiguration"+ <*> o .: "executionInfo"+ <*> o .:? "latestActivityTaskTimestamp"+ <*> o .:? "latestExecutionContext"+ <*> o .: "openCounts"
+ gen/Network/AWS/SWF/DescribeWorkflowType.hs view
@@ -0,0 +1,153 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.DescribeWorkflowType+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns information about the specified workflow type. This includes+-- configuration settings specified when the type was registered and other+-- information such as creation date, current status, etc. Access Control You+-- can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. Constrain the following parameters by+-- using a Condition element with the appropriate keys. workflowType.name:+-- String constraint. The key is swf:workflowType.name. workflowType.version:+-- String constraint. The key is swf:workflowType.version. If the caller does+-- not have sufficient permissions to invoke the action, or the parameter+-- values fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeWorkflowType.html>+module Network.AWS.SWF.DescribeWorkflowType+ (+ -- * Request+ DescribeWorkflowType+ -- ** Request constructor+ , describeWorkflowType+ -- ** Request lenses+ , dwtDomain+ , dwtWorkflowType++ -- * Response+ , DescribeWorkflowTypeResponse+ -- ** Response constructor+ , describeWorkflowTypeResponse+ -- ** Response lenses+ , dwtrConfiguration+ , dwtrTypeInfo+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data DescribeWorkflowType = DescribeWorkflowType+ { _dwtDomain :: Text+ , _dwtWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'DescribeWorkflowType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwtDomain' @::@ 'Text'+--+-- * 'dwtWorkflowType' @::@ 'WorkflowType'+--+describeWorkflowType :: Text -- ^ 'dwtDomain'+ -> WorkflowType -- ^ 'dwtWorkflowType'+ -> DescribeWorkflowType+describeWorkflowType p1 p2 = DescribeWorkflowType+ { _dwtDomain = p1+ , _dwtWorkflowType = p2+ }++-- | The name of the domain in which this workflow type is registered.+dwtDomain :: Lens' DescribeWorkflowType Text+dwtDomain = lens _dwtDomain (\s a -> s { _dwtDomain = a })++-- | The workflow type to describe.+dwtWorkflowType :: Lens' DescribeWorkflowType WorkflowType+dwtWorkflowType = lens _dwtWorkflowType (\s a -> s { _dwtWorkflowType = a })++data DescribeWorkflowTypeResponse = DescribeWorkflowTypeResponse+ { _dwtrConfiguration :: WorkflowTypeConfiguration+ , _dwtrTypeInfo :: WorkflowTypeInfo+ } deriving (Eq, Show)++-- | 'DescribeWorkflowTypeResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwtrConfiguration' @::@ 'WorkflowTypeConfiguration'+--+-- * 'dwtrTypeInfo' @::@ 'WorkflowTypeInfo'+--+describeWorkflowTypeResponse :: WorkflowTypeInfo -- ^ 'dwtrTypeInfo'+ -> WorkflowTypeConfiguration -- ^ 'dwtrConfiguration'+ -> DescribeWorkflowTypeResponse+describeWorkflowTypeResponse p1 p2 = DescribeWorkflowTypeResponse+ { _dwtrTypeInfo = p1+ , _dwtrConfiguration = p2+ }++-- | Configuration settings of the workflow type registered through+-- RegisterWorkflowType.+dwtrConfiguration :: Lens' DescribeWorkflowTypeResponse WorkflowTypeConfiguration+dwtrConfiguration =+ lens _dwtrConfiguration (\s a -> s { _dwtrConfiguration = a })++-- | General information about the workflow type. The status of the workflow+-- type (returned in the WorkflowTypeInfo structure) can be one of the+-- following. REGISTERED: The type is registered and available. Workers+-- supporting this type should be running. DEPRECATED: The type was+-- deprecated using DeprecateWorkflowType, but is still in use. You should+-- keep workers supporting this type running. You cannot create new workflow+-- executions of this type.+dwtrTypeInfo :: Lens' DescribeWorkflowTypeResponse WorkflowTypeInfo+dwtrTypeInfo = lens _dwtrTypeInfo (\s a -> s { _dwtrTypeInfo = a })++instance ToPath DescribeWorkflowType where+ toPath = const "/"++instance ToQuery DescribeWorkflowType where+ toQuery = const mempty++instance ToHeaders DescribeWorkflowType++instance ToJSON DescribeWorkflowType where+ toJSON DescribeWorkflowType{..} = object+ [ "domain" .= _dwtDomain+ , "workflowType" .= _dwtWorkflowType+ ]++instance AWSRequest DescribeWorkflowType where+ type Sv DescribeWorkflowType = SWF+ type Rs DescribeWorkflowType = DescribeWorkflowTypeResponse++ request = post "DescribeWorkflowType"+ response = jsonResponse++instance FromJSON DescribeWorkflowTypeResponse where+ parseJSON = withObject "DescribeWorkflowTypeResponse" $ \o -> DescribeWorkflowTypeResponse+ <$> o .: "configuration"+ <*> o .: "typeInfo"
+ gen/Network/AWS/SWF/GetWorkflowExecutionHistory.hs view
@@ -0,0 +1,193 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.GetWorkflowExecutionHistory+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns the history of the specified workflow execution. The results may be+-- split into multiple pages. To retrieve subsequent pages, make the call+-- again using the nextPageToken returned by the initial call. Access Control+-- You can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. You cannot use an IAM policy to+-- constrain this action's parameters. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_GetWorkflowExecutionHistory.html>+module Network.AWS.SWF.GetWorkflowExecutionHistory+ (+ -- * Request+ GetWorkflowExecutionHistory+ -- ** Request constructor+ , getWorkflowExecutionHistory+ -- ** Request lenses+ , gwehDomain+ , gwehExecution+ , gwehMaximumPageSize+ , gwehNextPageToken+ , gwehReverseOrder++ -- * Response+ , GetWorkflowExecutionHistoryResponse+ -- ** Response constructor+ , getWorkflowExecutionHistoryResponse+ -- ** Response lenses+ , gwehrEvents+ , gwehrNextPageToken+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data GetWorkflowExecutionHistory = GetWorkflowExecutionHistory+ { _gwehDomain :: Text+ , _gwehExecution :: WorkflowExecution+ , _gwehMaximumPageSize :: Maybe Nat+ , _gwehNextPageToken :: Maybe Text+ , _gwehReverseOrder :: Maybe Bool+ } deriving (Eq, Show)++-- | 'GetWorkflowExecutionHistory' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gwehDomain' @::@ 'Text'+--+-- * 'gwehExecution' @::@ 'WorkflowExecution'+--+-- * 'gwehMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'gwehNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'gwehReverseOrder' @::@ 'Maybe' 'Bool'+--+getWorkflowExecutionHistory :: Text -- ^ 'gwehDomain'+ -> WorkflowExecution -- ^ 'gwehExecution'+ -> GetWorkflowExecutionHistory+getWorkflowExecutionHistory p1 p2 = GetWorkflowExecutionHistory+ { _gwehDomain = p1+ , _gwehExecution = p2+ , _gwehNextPageToken = Nothing+ , _gwehMaximumPageSize = Nothing+ , _gwehReverseOrder = Nothing+ }++-- | The name of the domain containing the workflow execution.+gwehDomain :: Lens' GetWorkflowExecutionHistory Text+gwehDomain = lens _gwehDomain (\s a -> s { _gwehDomain = a })++-- | Specifies the workflow execution for which to return the history.+gwehExecution :: Lens' GetWorkflowExecutionHistory WorkflowExecution+gwehExecution = lens _gwehExecution (\s a -> s { _gwehExecution = a })++-- | Specifies the maximum number of history events returned in one page. The+-- next page in the result is identified by the NextPageToken returned. By+-- default 100 history events are returned in a page but the caller can+-- override this value to a page size smaller than the default. You cannot+-- specify a page size larger than 100. Note that the number of events may+-- be less than the maxiumum page size, in which case, the returned page+-- will have fewer results than the maximumPageSize specified.+gwehMaximumPageSize :: Lens' GetWorkflowExecutionHistory (Maybe Natural)+gwehMaximumPageSize =+ lens _gwehMaximumPageSize (\s a -> s { _gwehMaximumPageSize = a })+ . mapping _Nat++-- | If a NextPageToken is returned, the result has more than one pages. To+-- get the next page, repeat the call and specify the nextPageToken with all+-- other arguments unchanged.+gwehNextPageToken :: Lens' GetWorkflowExecutionHistory (Maybe Text)+gwehNextPageToken =+ lens _gwehNextPageToken (\s a -> s { _gwehNextPageToken = a })++-- | When set to true, returns the events in reverse order. By default the+-- results are returned in ascending order of the eventTimeStamp of the+-- events.+gwehReverseOrder :: Lens' GetWorkflowExecutionHistory (Maybe Bool)+gwehReverseOrder = lens _gwehReverseOrder (\s a -> s { _gwehReverseOrder = a })++data GetWorkflowExecutionHistoryResponse = GetWorkflowExecutionHistoryResponse+ { _gwehrEvents :: List "events" HistoryEvent+ , _gwehrNextPageToken :: Maybe Text+ } deriving (Eq, Show)++-- | 'GetWorkflowExecutionHistoryResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gwehrEvents' @::@ ['HistoryEvent']+--+-- * 'gwehrNextPageToken' @::@ 'Maybe' 'Text'+--+getWorkflowExecutionHistoryResponse :: GetWorkflowExecutionHistoryResponse+getWorkflowExecutionHistoryResponse = GetWorkflowExecutionHistoryResponse+ { _gwehrEvents = mempty+ , _gwehrNextPageToken = Nothing+ }++-- | The list of history events.+gwehrEvents :: Lens' GetWorkflowExecutionHistoryResponse [HistoryEvent]+gwehrEvents = lens _gwehrEvents (\s a -> s { _gwehrEvents = a }) . _List++-- | The token for the next page. If set, the history consists of more than+-- one page and the next page can be retrieved by repeating the request with+-- this token and all other arguments unchanged.+gwehrNextPageToken :: Lens' GetWorkflowExecutionHistoryResponse (Maybe Text)+gwehrNextPageToken =+ lens _gwehrNextPageToken (\s a -> s { _gwehrNextPageToken = a })++instance ToPath GetWorkflowExecutionHistory where+ toPath = const "/"++instance ToQuery GetWorkflowExecutionHistory where+ toQuery = const mempty++instance ToHeaders GetWorkflowExecutionHistory++instance ToJSON GetWorkflowExecutionHistory where+ toJSON GetWorkflowExecutionHistory{..} = object+ [ "domain" .= _gwehDomain+ , "execution" .= _gwehExecution+ , "nextPageToken" .= _gwehNextPageToken+ , "maximumPageSize" .= _gwehMaximumPageSize+ , "reverseOrder" .= _gwehReverseOrder+ ]++instance AWSRequest GetWorkflowExecutionHistory where+ type Sv GetWorkflowExecutionHistory = SWF+ type Rs GetWorkflowExecutionHistory = GetWorkflowExecutionHistoryResponse++ request = post "GetWorkflowExecutionHistory"+ response = jsonResponse++instance FromJSON GetWorkflowExecutionHistoryResponse where+ parseJSON = withObject "GetWorkflowExecutionHistoryResponse" $ \o -> GetWorkflowExecutionHistoryResponse+ <$> o .: "events"+ <*> o .:? "nextPageToken"++instance AWSPager GetWorkflowExecutionHistory where+ page rq rs+ | stop (rq ^. gwehNextPageToken) = Nothing+ | otherwise = (\x -> rq & gwehNextPageToken ?~ x)+ <$> (rs ^. gwehrNextPageToken)
+ gen/Network/AWS/SWF/ListActivityTypes.hs view
@@ -0,0 +1,204 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.ListActivityTypes+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns information about all activities registered in the specified domain+-- that match the specified name and registration status. The result includes+-- information like creation date, current status of the activity, etc. The+-- results may be split into multiple pages. To retrieve subsequent pages,+-- make the call again using the nextPageToken returned by the initial call.+-- Access Control You can use IAM policies to control this action's access to+-- Amazon SWF resources as follows: Use a Resource element with the domain+-- name to limit the action to only specified domains. Use an Action element+-- to allow or deny permission to call this action. You cannot use an IAM+-- policy to constrain this action's parameters. If the caller does not have+-- sufficient permissions to invoke the action, or the parameter values fall+-- outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListActivityTypes.html>+module Network.AWS.SWF.ListActivityTypes+ (+ -- * Request+ ListActivityTypes+ -- ** Request constructor+ , listActivityTypes+ -- ** Request lenses+ , latDomain+ , latMaximumPageSize+ , latName+ , latNextPageToken+ , latRegistrationStatus+ , latReverseOrder++ -- * Response+ , ListActivityTypesResponse+ -- ** Response constructor+ , listActivityTypesResponse+ -- ** Response lenses+ , latrNextPageToken+ , latrTypeInfos+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data ListActivityTypes = ListActivityTypes+ { _latDomain :: Text+ , _latMaximumPageSize :: Maybe Nat+ , _latName :: Maybe Text+ , _latNextPageToken :: Maybe Text+ , _latRegistrationStatus :: Text+ , _latReverseOrder :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'ListActivityTypes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'latDomain' @::@ 'Text'+--+-- * 'latMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'latName' @::@ 'Maybe' 'Text'+--+-- * 'latNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'latRegistrationStatus' @::@ 'Text'+--+-- * 'latReverseOrder' @::@ 'Maybe' 'Bool'+--+listActivityTypes :: Text -- ^ 'latDomain'+ -> Text -- ^ 'latRegistrationStatus'+ -> ListActivityTypes+listActivityTypes p1 p2 = ListActivityTypes+ { _latDomain = p1+ , _latRegistrationStatus = p2+ , _latName = Nothing+ , _latNextPageToken = Nothing+ , _latMaximumPageSize = Nothing+ , _latReverseOrder = Nothing+ }++-- | The name of the domain in which the activity types have been registered.+latDomain :: Lens' ListActivityTypes Text+latDomain = lens _latDomain (\s a -> s { _latDomain = a })++-- | The maximum number of results returned in each page. The default is 100,+-- but the caller can override this value to a page size smaller than the+-- default. You cannot specify a page size greater than 100. Note that the+-- number of types may be less than the maxiumum page size, in which case,+-- the returned page will have fewer results than the maximumPageSize+-- specified.+latMaximumPageSize :: Lens' ListActivityTypes (Maybe Natural)+latMaximumPageSize =+ lens _latMaximumPageSize (\s a -> s { _latMaximumPageSize = a })+ . mapping _Nat++-- | If specified, only lists the activity types that have this name.+latName :: Lens' ListActivityTypes (Maybe Text)+latName = lens _latName (\s a -> s { _latName = a })++-- | If on a previous call to this method a NextResultToken was returned, the+-- results have more than one page. To get the next page of results, repeat+-- the call with the nextPageToken and keep all other arguments unchanged.+latNextPageToken :: Lens' ListActivityTypes (Maybe Text)+latNextPageToken = lens _latNextPageToken (\s a -> s { _latNextPageToken = a })++-- | Specifies the registration status of the activity types to list.+latRegistrationStatus :: Lens' ListActivityTypes Text+latRegistrationStatus =+ lens _latRegistrationStatus (\s a -> s { _latRegistrationStatus = a })++-- | When set to true, returns the results in reverse order. By default the+-- results are returned in ascending alphabetical order of the name of the+-- activity types.+latReverseOrder :: Lens' ListActivityTypes (Maybe Bool)+latReverseOrder = lens _latReverseOrder (\s a -> s { _latReverseOrder = a })++data ListActivityTypesResponse = ListActivityTypesResponse+ { _latrNextPageToken :: Maybe Text+ , _latrTypeInfos :: List "typeInfos" ActivityTypeInfo+ } deriving (Eq, Show)++-- | 'ListActivityTypesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'latrNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'latrTypeInfos' @::@ ['ActivityTypeInfo']+--+listActivityTypesResponse :: ListActivityTypesResponse+listActivityTypesResponse = ListActivityTypesResponse+ { _latrTypeInfos = mempty+ , _latrNextPageToken = Nothing+ }++-- | Returns a value if the results are paginated. To get the next page of+-- results, repeat the request specifying this token and all other arguments+-- unchanged.+latrNextPageToken :: Lens' ListActivityTypesResponse (Maybe Text)+latrNextPageToken =+ lens _latrNextPageToken (\s a -> s { _latrNextPageToken = a })++-- | List of activity type information.+latrTypeInfos :: Lens' ListActivityTypesResponse [ActivityTypeInfo]+latrTypeInfos = lens _latrTypeInfos (\s a -> s { _latrTypeInfos = a }) . _List++instance ToPath ListActivityTypes where+ toPath = const "/"++instance ToQuery ListActivityTypes where+ toQuery = const mempty++instance ToHeaders ListActivityTypes++instance ToJSON ListActivityTypes where+ toJSON ListActivityTypes{..} = object+ [ "domain" .= _latDomain+ , "name" .= _latName+ , "registrationStatus" .= _latRegistrationStatus+ , "nextPageToken" .= _latNextPageToken+ , "maximumPageSize" .= _latMaximumPageSize+ , "reverseOrder" .= _latReverseOrder+ ]++instance AWSRequest ListActivityTypes where+ type Sv ListActivityTypes = SWF+ type Rs ListActivityTypes = ListActivityTypesResponse++ request = post "ListActivityTypes"+ response = jsonResponse++instance FromJSON ListActivityTypesResponse where+ parseJSON = withObject "ListActivityTypesResponse" $ \o -> ListActivityTypesResponse+ <$> o .:? "nextPageToken"+ <*> o .: "typeInfos"++instance AWSPager ListActivityTypes where+ page rq rs+ | stop (rq ^. latNextPageToken) = Nothing+ | otherwise = (\x -> rq & latNextPageToken ?~ x)+ <$> (rs ^. latrNextPageToken)
+ gen/Network/AWS/SWF/ListClosedWorkflowExecutions.hs view
@@ -0,0 +1,261 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.ListClosedWorkflowExecutions+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns a list of closed workflow executions in the specified domain that+-- meet the filtering criteria. The results may be split into multiple pages.+-- To retrieve subsequent pages, make the call again using the nextPageToken+-- returned by the initial call. Access Control You can use IAM policies to+-- control this action's access to Amazon SWF resources as follows: Use a+-- Resource element with the domain name to limit the action to only specified+-- domains. Use an Action element to allow or deny permission to call this+-- action. Constrain the following parameters by using a Condition element+-- with the appropriate keys. tagFilter.tag: String constraint. The key is+-- swf:tagFilter.tag. typeFilter.name: String constraint. The key is+-- swf:typeFilter.name. typeFilter.version: String constraint. The key is+-- swf:typeFilter.version. If the caller does not have sufficient permissions+-- to invoke the action, or the parameter values fall outside the specified+-- constraints, the action fails by throwing OperationNotPermitted. For+-- details and example IAM policies, see Using IAM to Manage Access to Amazon+-- SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListClosedWorkflowExecutions.html>+module Network.AWS.SWF.ListClosedWorkflowExecutions+ (+ -- * Request+ ListClosedWorkflowExecutions+ -- ** Request constructor+ , listClosedWorkflowExecutions+ -- ** Request lenses+ , lcweCloseStatusFilter+ , lcweCloseTimeFilter+ , lcweDomain+ , lcweExecutionFilter+ , lcweMaximumPageSize+ , lcweNextPageToken+ , lcweReverseOrder+ , lcweStartTimeFilter+ , lcweTagFilter+ , lcweTypeFilter++ -- * Response+ , ListClosedWorkflowExecutionsResponse+ -- ** Response constructor+ , listClosedWorkflowExecutionsResponse+ -- ** Response lenses+ , lcwerExecutionInfos+ , lcwerNextPageToken+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data ListClosedWorkflowExecutions = ListClosedWorkflowExecutions+ { _lcweCloseStatusFilter :: Maybe CloseStatusFilter+ , _lcweCloseTimeFilter :: Maybe ExecutionTimeFilter+ , _lcweDomain :: Text+ , _lcweExecutionFilter :: Maybe WorkflowExecutionFilter+ , _lcweMaximumPageSize :: Maybe Nat+ , _lcweNextPageToken :: Maybe Text+ , _lcweReverseOrder :: Maybe Bool+ , _lcweStartTimeFilter :: Maybe ExecutionTimeFilter+ , _lcweTagFilter :: Maybe TagFilter+ , _lcweTypeFilter :: Maybe WorkflowTypeFilter+ } deriving (Eq, Show)++-- | 'ListClosedWorkflowExecutions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lcweCloseStatusFilter' @::@ 'Maybe' 'CloseStatusFilter'+--+-- * 'lcweCloseTimeFilter' @::@ 'Maybe' 'ExecutionTimeFilter'+--+-- * 'lcweDomain' @::@ 'Text'+--+-- * 'lcweExecutionFilter' @::@ 'Maybe' 'WorkflowExecutionFilter'+--+-- * 'lcweMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'lcweNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'lcweReverseOrder' @::@ 'Maybe' 'Bool'+--+-- * 'lcweStartTimeFilter' @::@ 'Maybe' 'ExecutionTimeFilter'+--+-- * 'lcweTagFilter' @::@ 'Maybe' 'TagFilter'+--+-- * 'lcweTypeFilter' @::@ 'Maybe' 'WorkflowTypeFilter'+--+listClosedWorkflowExecutions :: Text -- ^ 'lcweDomain'+ -> ListClosedWorkflowExecutions+listClosedWorkflowExecutions p1 = ListClosedWorkflowExecutions+ { _lcweDomain = p1+ , _lcweStartTimeFilter = Nothing+ , _lcweCloseTimeFilter = Nothing+ , _lcweExecutionFilter = Nothing+ , _lcweCloseStatusFilter = Nothing+ , _lcweTypeFilter = Nothing+ , _lcweTagFilter = Nothing+ , _lcweNextPageToken = Nothing+ , _lcweMaximumPageSize = Nothing+ , _lcweReverseOrder = Nothing+ }++-- | If specified, only workflow executions that match this close status are+-- listed. For example, if TERMINATED is specified, then only TERMINATED+-- workflow executions are listed.+lcweCloseStatusFilter :: Lens' ListClosedWorkflowExecutions (Maybe CloseStatusFilter)+lcweCloseStatusFilter =+ lens _lcweCloseStatusFilter (\s a -> s { _lcweCloseStatusFilter = a })++-- | If specified, the workflow executions are included in the returned+-- results based on whether their close times are within the range specified+-- by this filter. Also, if this parameter is specified, the returned+-- results are ordered by their close times.+lcweCloseTimeFilter :: Lens' ListClosedWorkflowExecutions (Maybe ExecutionTimeFilter)+lcweCloseTimeFilter =+ lens _lcweCloseTimeFilter (\s a -> s { _lcweCloseTimeFilter = a })++-- | The name of the domain that contains the workflow executions to list.+lcweDomain :: Lens' ListClosedWorkflowExecutions Text+lcweDomain = lens _lcweDomain (\s a -> s { _lcweDomain = a })++-- | If specified, only workflow executions matching the workflow id specified+-- in the filter are returned.+lcweExecutionFilter :: Lens' ListClosedWorkflowExecutions (Maybe WorkflowExecutionFilter)+lcweExecutionFilter =+ lens _lcweExecutionFilter (\s a -> s { _lcweExecutionFilter = a })++-- | The maximum number of results returned in each page. The default is 100,+-- but the caller can override this value to a page size smaller than the+-- default. You cannot specify a page size greater than 100. Note that the+-- number of executions may be less than the maxiumum page size, in which+-- case, the returned page will have fewer results than the maximumPageSize+-- specified.+lcweMaximumPageSize :: Lens' ListClosedWorkflowExecutions (Maybe Natural)+lcweMaximumPageSize =+ lens _lcweMaximumPageSize (\s a -> s { _lcweMaximumPageSize = a })+ . mapping _Nat++-- | If on a previous call to this method a NextPageToken was returned, the+-- results are being paginated. To get the next page of results, repeat the+-- call with the returned token and all other arguments unchanged.+lcweNextPageToken :: Lens' ListClosedWorkflowExecutions (Maybe Text)+lcweNextPageToken =+ lens _lcweNextPageToken (\s a -> s { _lcweNextPageToken = a })++-- | When set to true, returns the results in reverse order. By default the+-- results are returned in descending order of the start or the close time+-- of the executions.+lcweReverseOrder :: Lens' ListClosedWorkflowExecutions (Maybe Bool)+lcweReverseOrder = lens _lcweReverseOrder (\s a -> s { _lcweReverseOrder = a })++-- | If specified, the workflow executions are included in the returned+-- results based on whether their start times are within the range specified+-- by this filter. Also, if this parameter is specified, the returned+-- results are ordered by their start times.+lcweStartTimeFilter :: Lens' ListClosedWorkflowExecutions (Maybe ExecutionTimeFilter)+lcweStartTimeFilter =+ lens _lcweStartTimeFilter (\s a -> s { _lcweStartTimeFilter = a })++-- | If specified, only executions that have the matching tag are listed.+lcweTagFilter :: Lens' ListClosedWorkflowExecutions (Maybe TagFilter)+lcweTagFilter = lens _lcweTagFilter (\s a -> s { _lcweTagFilter = a })++-- | If specified, only executions of the type specified in the filter are+-- returned.+lcweTypeFilter :: Lens' ListClosedWorkflowExecutions (Maybe WorkflowTypeFilter)+lcweTypeFilter = lens _lcweTypeFilter (\s a -> s { _lcweTypeFilter = a })++data ListClosedWorkflowExecutionsResponse = ListClosedWorkflowExecutionsResponse+ { _lcwerExecutionInfos :: List "executionInfos" WorkflowExecutionInfo+ , _lcwerNextPageToken :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListClosedWorkflowExecutionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lcwerExecutionInfos' @::@ ['WorkflowExecutionInfo']+--+-- * 'lcwerNextPageToken' @::@ 'Maybe' 'Text'+--+listClosedWorkflowExecutionsResponse :: ListClosedWorkflowExecutionsResponse+listClosedWorkflowExecutionsResponse = ListClosedWorkflowExecutionsResponse+ { _lcwerExecutionInfos = mempty+ , _lcwerNextPageToken = Nothing+ }++-- | The list of workflow information structures.+lcwerExecutionInfos :: Lens' ListClosedWorkflowExecutionsResponse [WorkflowExecutionInfo]+lcwerExecutionInfos =+ lens _lcwerExecutionInfos (\s a -> s { _lcwerExecutionInfos = a })+ . _List++-- | The token of the next page in the result. If set, the results have more+-- than one page. The next page can be retrieved by repeating the request+-- with this token and all other arguments unchanged.+lcwerNextPageToken :: Lens' ListClosedWorkflowExecutionsResponse (Maybe Text)+lcwerNextPageToken =+ lens _lcwerNextPageToken (\s a -> s { _lcwerNextPageToken = a })++instance ToPath ListClosedWorkflowExecutions where+ toPath = const "/"++instance ToQuery ListClosedWorkflowExecutions where+ toQuery = const mempty++instance ToHeaders ListClosedWorkflowExecutions++instance ToJSON ListClosedWorkflowExecutions where+ toJSON ListClosedWorkflowExecutions{..} = object+ [ "domain" .= _lcweDomain+ , "startTimeFilter" .= _lcweStartTimeFilter+ , "closeTimeFilter" .= _lcweCloseTimeFilter+ , "executionFilter" .= _lcweExecutionFilter+ , "closeStatusFilter" .= _lcweCloseStatusFilter+ , "typeFilter" .= _lcweTypeFilter+ , "tagFilter" .= _lcweTagFilter+ , "nextPageToken" .= _lcweNextPageToken+ , "maximumPageSize" .= _lcweMaximumPageSize+ , "reverseOrder" .= _lcweReverseOrder+ ]++instance AWSRequest ListClosedWorkflowExecutions where+ type Sv ListClosedWorkflowExecutions = SWF+ type Rs ListClosedWorkflowExecutions = ListClosedWorkflowExecutionsResponse++ request = post "ListClosedWorkflowExecutions"+ response = jsonResponse++instance FromJSON ListClosedWorkflowExecutionsResponse where+ parseJSON = withObject "ListClosedWorkflowExecutionsResponse" $ \o -> ListClosedWorkflowExecutionsResponse+ <$> o .: "executionInfos"+ <*> o .:? "nextPageToken"++instance AWSPager ListClosedWorkflowExecutions where+ page rq rs+ | stop (rq ^. lcweNextPageToken) = Nothing+ | otherwise = (\x -> rq & lcweNextPageToken ?~ x)+ <$> (rs ^. lcwerNextPageToken)
+ gen/Network/AWS/SWF/ListDomains.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.ListDomains+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns the list of domains registered in the account. The results may be+-- split into multiple pages. To retrieve subsequent pages, make the call+-- again using the nextPageToken returned by the initial call. Access Control+-- You can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. The element must be set to+-- arn:aws:swf::AccountID:domain/*", where "AccountID" is the account ID, with+-- no dashes. Use an Action element to allow or deny permission to call this+-- action. You cannot use an IAM policy to constrain this action's parameters.+-- If the caller does not have sufficient permissions to invoke the action, or+-- the parameter values fall outside the specified constraints, the action+-- fails by throwing OperationNotPermitted. For details and example IAM+-- policies, see Using IAM to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListDomains.html>+module Network.AWS.SWF.ListDomains+ (+ -- * Request+ ListDomains+ -- ** Request constructor+ , listDomains+ -- ** Request lenses+ , ldMaximumPageSize+ , ldNextPageToken+ , ldRegistrationStatus+ , ldReverseOrder++ -- * Response+ , ListDomainsResponse+ -- ** Response constructor+ , listDomainsResponse+ -- ** Response lenses+ , ldrDomainInfos+ , ldrNextPageToken+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data ListDomains = ListDomains+ { _ldMaximumPageSize :: Maybe Nat+ , _ldNextPageToken :: Maybe Text+ , _ldRegistrationStatus :: Text+ , _ldReverseOrder :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'ListDomains' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'ldNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'ldRegistrationStatus' @::@ 'Text'+--+-- * 'ldReverseOrder' @::@ 'Maybe' 'Bool'+--+listDomains :: Text -- ^ 'ldRegistrationStatus'+ -> ListDomains+listDomains p1 = ListDomains+ { _ldRegistrationStatus = p1+ , _ldNextPageToken = Nothing+ , _ldMaximumPageSize = Nothing+ , _ldReverseOrder = Nothing+ }++-- | The maximum number of results returned in each page. The default is 100,+-- but the caller can override this value to a page size smaller than the+-- default. You cannot specify a page size greater than 100. Note that the+-- number of domains may be less than the maxiumum page size, in which case,+-- the returned page will have fewer results than the maximumPageSize+-- specified.+ldMaximumPageSize :: Lens' ListDomains (Maybe Natural)+ldMaximumPageSize =+ lens _ldMaximumPageSize (\s a -> s { _ldMaximumPageSize = a })+ . mapping _Nat++-- | If on a previous call to this method a NextPageToken was returned, the+-- result has more than one page. To get the next page of results, repeat+-- the call with the returned token and all other arguments unchanged.+ldNextPageToken :: Lens' ListDomains (Maybe Text)+ldNextPageToken = lens _ldNextPageToken (\s a -> s { _ldNextPageToken = a })++-- | Specifies the registration status of the domains to list.+ldRegistrationStatus :: Lens' ListDomains Text+ldRegistrationStatus =+ lens _ldRegistrationStatus (\s a -> s { _ldRegistrationStatus = a })++-- | When set to true, returns the results in reverse order. By default the+-- results are returned in ascending alphabetical order of the name of the+-- domains.+ldReverseOrder :: Lens' ListDomains (Maybe Bool)+ldReverseOrder = lens _ldReverseOrder (\s a -> s { _ldReverseOrder = a })++data ListDomainsResponse = ListDomainsResponse+ { _ldrDomainInfos :: List "domainInfos" DomainInfo+ , _ldrNextPageToken :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListDomainsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldrDomainInfos' @::@ ['DomainInfo']+--+-- * 'ldrNextPageToken' @::@ 'Maybe' 'Text'+--+listDomainsResponse :: ListDomainsResponse+listDomainsResponse = ListDomainsResponse+ { _ldrDomainInfos = mempty+ , _ldrNextPageToken = Nothing+ }++-- | A list of DomainInfo structures.+ldrDomainInfos :: Lens' ListDomainsResponse [DomainInfo]+ldrDomainInfos = lens _ldrDomainInfos (\s a -> s { _ldrDomainInfos = a }) . _List++-- | Returns a value if the results are paginated. To get the next page of+-- results, repeat the request specifying this token and all other arguments+-- unchanged.+ldrNextPageToken :: Lens' ListDomainsResponse (Maybe Text)+ldrNextPageToken = lens _ldrNextPageToken (\s a -> s { _ldrNextPageToken = a })++instance ToPath ListDomains where+ toPath = const "/"++instance ToQuery ListDomains where+ toQuery = const mempty++instance ToHeaders ListDomains++instance ToJSON ListDomains where+ toJSON ListDomains{..} = object+ [ "nextPageToken" .= _ldNextPageToken+ , "registrationStatus" .= _ldRegistrationStatus+ , "maximumPageSize" .= _ldMaximumPageSize+ , "reverseOrder" .= _ldReverseOrder+ ]++instance AWSRequest ListDomains where+ type Sv ListDomains = SWF+ type Rs ListDomains = ListDomainsResponse++ request = post "ListDomains"+ response = jsonResponse++instance FromJSON ListDomainsResponse where+ parseJSON = withObject "ListDomainsResponse" $ \o -> ListDomainsResponse+ <$> o .: "domainInfos"+ <*> o .:? "nextPageToken"++instance AWSPager ListDomains where+ page rq rs+ | stop (rq ^. ldNextPageToken) = Nothing+ | otherwise = (\x -> rq & ldNextPageToken ?~ x)+ <$> (rs ^. ldrNextPageToken)
+ gen/Network/AWS/SWF/ListOpenWorkflowExecutions.hs view
@@ -0,0 +1,233 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.ListOpenWorkflowExecutions+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns a list of open workflow executions in the specified domain that+-- meet the filtering criteria. The results may be split into multiple pages.+-- To retrieve subsequent pages, make the call again using the nextPageToken+-- returned by the initial call. Access Control You can use IAM policies to+-- control this action's access to Amazon SWF resources as follows: Use a+-- Resource element with the domain name to limit the action to only specified+-- domains. Use an Action element to allow or deny permission to call this+-- action. Constrain the following parameters by using a Condition element+-- with the appropriate keys. tagFilter.tag: String constraint. The key is+-- swf:tagFilter.tag. typeFilter.name: String constraint. The key is+-- swf:typeFilter.name. typeFilter.version: String constraint. The key is+-- swf:typeFilter.version. If the caller does not have sufficient permissions+-- to invoke the action, or the parameter values fall outside the specified+-- constraints, the action fails by throwing OperationNotPermitted. For+-- details and example IAM policies, see Using IAM to Manage Access to Amazon+-- SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListOpenWorkflowExecutions.html>+module Network.AWS.SWF.ListOpenWorkflowExecutions+ (+ -- * Request+ ListOpenWorkflowExecutions+ -- ** Request constructor+ , listOpenWorkflowExecutions+ -- ** Request lenses+ , loweDomain+ , loweExecutionFilter+ , loweMaximumPageSize+ , loweNextPageToken+ , loweReverseOrder+ , loweStartTimeFilter+ , loweTagFilter+ , loweTypeFilter++ -- * Response+ , ListOpenWorkflowExecutionsResponse+ -- ** Response constructor+ , listOpenWorkflowExecutionsResponse+ -- ** Response lenses+ , lowerExecutionInfos+ , lowerNextPageToken+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data ListOpenWorkflowExecutions = ListOpenWorkflowExecutions+ { _loweDomain :: Text+ , _loweExecutionFilter :: Maybe WorkflowExecutionFilter+ , _loweMaximumPageSize :: Maybe Nat+ , _loweNextPageToken :: Maybe Text+ , _loweReverseOrder :: Maybe Bool+ , _loweStartTimeFilter :: ExecutionTimeFilter+ , _loweTagFilter :: Maybe TagFilter+ , _loweTypeFilter :: Maybe WorkflowTypeFilter+ } deriving (Eq, Show)++-- | 'ListOpenWorkflowExecutions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'loweDomain' @::@ 'Text'+--+-- * 'loweExecutionFilter' @::@ 'Maybe' 'WorkflowExecutionFilter'+--+-- * 'loweMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'loweNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'loweReverseOrder' @::@ 'Maybe' 'Bool'+--+-- * 'loweStartTimeFilter' @::@ 'ExecutionTimeFilter'+--+-- * 'loweTagFilter' @::@ 'Maybe' 'TagFilter'+--+-- * 'loweTypeFilter' @::@ 'Maybe' 'WorkflowTypeFilter'+--+listOpenWorkflowExecutions :: Text -- ^ 'loweDomain'+ -> ExecutionTimeFilter -- ^ 'loweStartTimeFilter'+ -> ListOpenWorkflowExecutions+listOpenWorkflowExecutions p1 p2 = ListOpenWorkflowExecutions+ { _loweDomain = p1+ , _loweStartTimeFilter = p2+ , _loweTypeFilter = Nothing+ , _loweTagFilter = Nothing+ , _loweNextPageToken = Nothing+ , _loweMaximumPageSize = Nothing+ , _loweReverseOrder = Nothing+ , _loweExecutionFilter = Nothing+ }++-- | The name of the domain that contains the workflow executions to list.+loweDomain :: Lens' ListOpenWorkflowExecutions Text+loweDomain = lens _loweDomain (\s a -> s { _loweDomain = a })++-- | If specified, only workflow executions matching the workflow id specified+-- in the filter are returned.+loweExecutionFilter :: Lens' ListOpenWorkflowExecutions (Maybe WorkflowExecutionFilter)+loweExecutionFilter =+ lens _loweExecutionFilter (\s a -> s { _loweExecutionFilter = a })++-- | The maximum number of results returned in each page. The default is 100,+-- but the caller can override this value to a page size smaller than the+-- default. You cannot specify a page size greater than 100. Note that the+-- number of executions may be less than the maxiumum page size, in which+-- case, the returned page will have fewer results than the maximumPageSize+-- specified.+loweMaximumPageSize :: Lens' ListOpenWorkflowExecutions (Maybe Natural)+loweMaximumPageSize =+ lens _loweMaximumPageSize (\s a -> s { _loweMaximumPageSize = a })+ . mapping _Nat++-- | If on a previous call to this method a NextPageToken was returned, the+-- results are being paginated. To get the next page of results, repeat the+-- call with the returned token and all other arguments unchanged.+loweNextPageToken :: Lens' ListOpenWorkflowExecutions (Maybe Text)+loweNextPageToken =+ lens _loweNextPageToken (\s a -> s { _loweNextPageToken = a })++-- | When set to true, returns the results in reverse order. By default the+-- results are returned in descending order of the start time of the+-- executions.+loweReverseOrder :: Lens' ListOpenWorkflowExecutions (Maybe Bool)+loweReverseOrder = lens _loweReverseOrder (\s a -> s { _loweReverseOrder = a })++-- | Workflow executions are included in the returned results based on whether+-- their start times are within the range specified by this filter.+loweStartTimeFilter :: Lens' ListOpenWorkflowExecutions ExecutionTimeFilter+loweStartTimeFilter =+ lens _loweStartTimeFilter (\s a -> s { _loweStartTimeFilter = a })++-- | If specified, only executions that have the matching tag are listed.+loweTagFilter :: Lens' ListOpenWorkflowExecutions (Maybe TagFilter)+loweTagFilter = lens _loweTagFilter (\s a -> s { _loweTagFilter = a })++-- | If specified, only executions of the type specified in the filter are+-- returned.+loweTypeFilter :: Lens' ListOpenWorkflowExecutions (Maybe WorkflowTypeFilter)+loweTypeFilter = lens _loweTypeFilter (\s a -> s { _loweTypeFilter = a })++data ListOpenWorkflowExecutionsResponse = ListOpenWorkflowExecutionsResponse+ { _lowerExecutionInfos :: List "executionInfos" WorkflowExecutionInfo+ , _lowerNextPageToken :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListOpenWorkflowExecutionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lowerExecutionInfos' @::@ ['WorkflowExecutionInfo']+--+-- * 'lowerNextPageToken' @::@ 'Maybe' 'Text'+--+listOpenWorkflowExecutionsResponse :: ListOpenWorkflowExecutionsResponse+listOpenWorkflowExecutionsResponse = ListOpenWorkflowExecutionsResponse+ { _lowerExecutionInfos = mempty+ , _lowerNextPageToken = Nothing+ }++-- | The list of workflow information structures.+lowerExecutionInfos :: Lens' ListOpenWorkflowExecutionsResponse [WorkflowExecutionInfo]+lowerExecutionInfos =+ lens _lowerExecutionInfos (\s a -> s { _lowerExecutionInfos = a })+ . _List++-- | The token of the next page in the result. If set, the results have more+-- than one page. The next page can be retrieved by repeating the request+-- with this token and all other arguments unchanged.+lowerNextPageToken :: Lens' ListOpenWorkflowExecutionsResponse (Maybe Text)+lowerNextPageToken =+ lens _lowerNextPageToken (\s a -> s { _lowerNextPageToken = a })++instance ToPath ListOpenWorkflowExecutions where+ toPath = const "/"++instance ToQuery ListOpenWorkflowExecutions where+ toQuery = const mempty++instance ToHeaders ListOpenWorkflowExecutions++instance ToJSON ListOpenWorkflowExecutions where+ toJSON ListOpenWorkflowExecutions{..} = object+ [ "domain" .= _loweDomain+ , "startTimeFilter" .= _loweStartTimeFilter+ , "typeFilter" .= _loweTypeFilter+ , "tagFilter" .= _loweTagFilter+ , "nextPageToken" .= _loweNextPageToken+ , "maximumPageSize" .= _loweMaximumPageSize+ , "reverseOrder" .= _loweReverseOrder+ , "executionFilter" .= _loweExecutionFilter+ ]++instance AWSRequest ListOpenWorkflowExecutions where+ type Sv ListOpenWorkflowExecutions = SWF+ type Rs ListOpenWorkflowExecutions = ListOpenWorkflowExecutionsResponse++ request = post "ListOpenWorkflowExecutions"+ response = jsonResponse++instance FromJSON ListOpenWorkflowExecutionsResponse where+ parseJSON = withObject "ListOpenWorkflowExecutionsResponse" $ \o -> ListOpenWorkflowExecutionsResponse+ <$> o .: "executionInfos"+ <*> o .:? "nextPageToken"++instance AWSPager ListOpenWorkflowExecutions where+ page rq rs+ | stop (rq ^. loweNextPageToken) = Nothing+ | otherwise = (\x -> rq & loweNextPageToken ?~ x)+ <$> (rs ^. lowerNextPageToken)
+ gen/Network/AWS/SWF/ListWorkflowTypes.hs view
@@ -0,0 +1,202 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.ListWorkflowTypes+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Returns information about workflow types in the specified domain. The+-- results may be split into multiple pages that can be retrieved by making+-- the call repeatedly. Access Control You can use IAM policies to control+-- this action's access to Amazon SWF resources as follows: Use a Resource+-- element with the domain name to limit the action to only specified domains.+-- Use an Action element to allow or deny permission to call this action. You+-- cannot use an IAM policy to constrain this action's parameters. If the+-- caller does not have sufficient permissions to invoke the action, or the+-- parameter values fall outside the specified constraints, the action fails+-- by throwing OperationNotPermitted. For details and example IAM policies,+-- see Using IAM to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListWorkflowTypes.html>+module Network.AWS.SWF.ListWorkflowTypes+ (+ -- * Request+ ListWorkflowTypes+ -- ** Request constructor+ , listWorkflowTypes+ -- ** Request lenses+ , lwtDomain+ , lwtMaximumPageSize+ , lwtName+ , lwtNextPageToken+ , lwtRegistrationStatus+ , lwtReverseOrder++ -- * Response+ , ListWorkflowTypesResponse+ -- ** Response constructor+ , listWorkflowTypesResponse+ -- ** Response lenses+ , lwtrNextPageToken+ , lwtrTypeInfos+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data ListWorkflowTypes = ListWorkflowTypes+ { _lwtDomain :: Text+ , _lwtMaximumPageSize :: Maybe Nat+ , _lwtName :: Maybe Text+ , _lwtNextPageToken :: Maybe Text+ , _lwtRegistrationStatus :: Text+ , _lwtReverseOrder :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'ListWorkflowTypes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lwtDomain' @::@ 'Text'+--+-- * 'lwtMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'lwtName' @::@ 'Maybe' 'Text'+--+-- * 'lwtNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'lwtRegistrationStatus' @::@ 'Text'+--+-- * 'lwtReverseOrder' @::@ 'Maybe' 'Bool'+--+listWorkflowTypes :: Text -- ^ 'lwtDomain'+ -> Text -- ^ 'lwtRegistrationStatus'+ -> ListWorkflowTypes+listWorkflowTypes p1 p2 = ListWorkflowTypes+ { _lwtDomain = p1+ , _lwtRegistrationStatus = p2+ , _lwtName = Nothing+ , _lwtNextPageToken = Nothing+ , _lwtMaximumPageSize = Nothing+ , _lwtReverseOrder = Nothing+ }++-- | The name of the domain in which the workflow types have been registered.+lwtDomain :: Lens' ListWorkflowTypes Text+lwtDomain = lens _lwtDomain (\s a -> s { _lwtDomain = a })++-- | The maximum number of results returned in each page. The default is 100,+-- but the caller can override this value to a page size smaller than the+-- default. You cannot specify a page size greater than 100. Note that the+-- number of types may be less than the maxiumum page size, in which case,+-- the returned page will have fewer results than the maximumPageSize+-- specified.+lwtMaximumPageSize :: Lens' ListWorkflowTypes (Maybe Natural)+lwtMaximumPageSize =+ lens _lwtMaximumPageSize (\s a -> s { _lwtMaximumPageSize = a })+ . mapping _Nat++-- | If specified, lists the workflow type with this name.+lwtName :: Lens' ListWorkflowTypes (Maybe Text)+lwtName = lens _lwtName (\s a -> s { _lwtName = a })++-- | If on a previous call to this method a NextPageToken was returned, the+-- results are being paginated. To get the next page of results, repeat the+-- call with the returned token and all other arguments unchanged.+lwtNextPageToken :: Lens' ListWorkflowTypes (Maybe Text)+lwtNextPageToken = lens _lwtNextPageToken (\s a -> s { _lwtNextPageToken = a })++-- | Specifies the registration status of the workflow types to list.+lwtRegistrationStatus :: Lens' ListWorkflowTypes Text+lwtRegistrationStatus =+ lens _lwtRegistrationStatus (\s a -> s { _lwtRegistrationStatus = a })++-- | When set to true, returns the results in reverse order. By default the+-- results are returned in ascending alphabetical order of the name of the+-- workflow types.+lwtReverseOrder :: Lens' ListWorkflowTypes (Maybe Bool)+lwtReverseOrder = lens _lwtReverseOrder (\s a -> s { _lwtReverseOrder = a })++data ListWorkflowTypesResponse = ListWorkflowTypesResponse+ { _lwtrNextPageToken :: Maybe Text+ , _lwtrTypeInfos :: List "typeInfos" WorkflowTypeInfo+ } deriving (Eq, Show)++-- | 'ListWorkflowTypesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lwtrNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'lwtrTypeInfos' @::@ ['WorkflowTypeInfo']+--+listWorkflowTypesResponse :: ListWorkflowTypesResponse+listWorkflowTypesResponse = ListWorkflowTypesResponse+ { _lwtrTypeInfos = mempty+ , _lwtrNextPageToken = Nothing+ }++-- | The token for the next page of type information. If set then the list+-- consists of more than one page. You can retrieve the next page by+-- repeating the request (that returned the structure) with the this token+-- and all other arguments unchanged.+lwtrNextPageToken :: Lens' ListWorkflowTypesResponse (Maybe Text)+lwtrNextPageToken =+ lens _lwtrNextPageToken (\s a -> s { _lwtrNextPageToken = a })++-- | The list of workflow type information.+lwtrTypeInfos :: Lens' ListWorkflowTypesResponse [WorkflowTypeInfo]+lwtrTypeInfos = lens _lwtrTypeInfos (\s a -> s { _lwtrTypeInfos = a }) . _List++instance ToPath ListWorkflowTypes where+ toPath = const "/"++instance ToQuery ListWorkflowTypes where+ toQuery = const mempty++instance ToHeaders ListWorkflowTypes++instance ToJSON ListWorkflowTypes where+ toJSON ListWorkflowTypes{..} = object+ [ "domain" .= _lwtDomain+ , "name" .= _lwtName+ , "registrationStatus" .= _lwtRegistrationStatus+ , "nextPageToken" .= _lwtNextPageToken+ , "maximumPageSize" .= _lwtMaximumPageSize+ , "reverseOrder" .= _lwtReverseOrder+ ]++instance AWSRequest ListWorkflowTypes where+ type Sv ListWorkflowTypes = SWF+ type Rs ListWorkflowTypes = ListWorkflowTypesResponse++ request = post "ListWorkflowTypes"+ response = jsonResponse++instance FromJSON ListWorkflowTypesResponse where+ parseJSON = withObject "ListWorkflowTypesResponse" $ \o -> ListWorkflowTypesResponse+ <$> o .:? "nextPageToken"+ <*> o .: "typeInfos"++instance AWSPager ListWorkflowTypes where+ page rq rs+ | stop (rq ^. lwtNextPageToken) = Nothing+ | otherwise = (\x -> rq & lwtNextPageToken ?~ x)+ <$> (rs ^. lwtrNextPageToken)
+ gen/Network/AWS/SWF/PollForActivityTask.hs view
@@ -0,0 +1,218 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.PollForActivityTask+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by workers to get an ActivityTask from the specified activity+-- taskList. This initiates a long poll, where the service holds the HTTP+-- connection open and responds as soon as a task becomes available. The+-- maximum time the service holds on to the request before responding is 60+-- seconds. If no task is available within 60 seconds, the poll will return an+-- empty result. An empty result, in this context, means that an ActivityTask+-- is returned, but that the value of taskToken is an empty string. If a task+-- is returned, the worker should use its type to identify and process it+-- correctly. Workers should set their client side socket timeout to at least+-- 70 seconds (10 seconds higher than the maximum time service may hold the+-- poll request). Access Control You can use IAM policies to control this+-- action's access to Amazon SWF resources as follows: Use a Resource element+-- with the domain name to limit the action to only specified domains. Use an+-- Action element to allow or deny permission to call this action. Constrain+-- the taskList.name parameter by using a Condition element with the+-- swf:taskList.name key to allow the action to access only certain task+-- lists. If the caller does not have sufficient permissions to invoke the+-- action, or the parameter values fall outside the specified constraints, the+-- action fails by throwing OperationNotPermitted. For details and example IAM+-- policies, see Using IAM to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForActivityTask.html>+module Network.AWS.SWF.PollForActivityTask+ (+ -- * Request+ PollForActivityTask+ -- ** Request constructor+ , pollForActivityTask+ -- ** Request lenses+ , pfatDomain+ , pfatIdentity+ , pfatTaskList++ -- * Response+ , PollForActivityTaskResponse+ -- ** Response constructor+ , pollForActivityTaskResponse+ -- ** Response lenses+ , pfatrActivityId+ , pfatrActivityType+ , pfatrInput+ , pfatrStartedEventId+ , pfatrTaskToken+ , pfatrWorkflowExecution+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data PollForActivityTask = PollForActivityTask+ { _pfatDomain :: Text+ , _pfatIdentity :: Maybe Text+ , _pfatTaskList :: TaskList+ } deriving (Eq, Show)++-- | 'PollForActivityTask' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pfatDomain' @::@ 'Text'+--+-- * 'pfatIdentity' @::@ 'Maybe' 'Text'+--+-- * 'pfatTaskList' @::@ 'TaskList'+--+pollForActivityTask :: Text -- ^ 'pfatDomain'+ -> TaskList -- ^ 'pfatTaskList'+ -> PollForActivityTask+pollForActivityTask p1 p2 = PollForActivityTask+ { _pfatDomain = p1+ , _pfatTaskList = p2+ , _pfatIdentity = Nothing+ }++-- | The name of the domain that contains the task lists being polled.+pfatDomain :: Lens' PollForActivityTask Text+pfatDomain = lens _pfatDomain (\s a -> s { _pfatDomain = a })++-- | Identity of the worker making the request, which is recorded in the+-- ActivityTaskStarted event in the workflow history. This enables+-- diagnostic tracing when problems arise. The form of this identity is user+-- defined.+pfatIdentity :: Lens' PollForActivityTask (Maybe Text)+pfatIdentity = lens _pfatIdentity (\s a -> s { _pfatIdentity = a })++-- | Specifies the task list to poll for activity tasks. The specified string+-- must not start or end with whitespace. It must not contain a : (colon), /+-- (slash), | (vertical bar), or any control characters (\u0000-\u001f |+-- \u007f - \u009f). Also, it must not contain the literal string+-- "arn".+pfatTaskList :: Lens' PollForActivityTask TaskList+pfatTaskList = lens _pfatTaskList (\s a -> s { _pfatTaskList = a })++data PollForActivityTaskResponse = PollForActivityTaskResponse+ { _pfatrActivityId :: Text+ , _pfatrActivityType :: ActivityType+ , _pfatrInput :: Maybe Text+ , _pfatrStartedEventId :: Integer+ , _pfatrTaskToken :: Text+ , _pfatrWorkflowExecution :: WorkflowExecution+ } deriving (Eq, Show)++-- | 'PollForActivityTaskResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pfatrActivityId' @::@ 'Text'+--+-- * 'pfatrActivityType' @::@ 'ActivityType'+--+-- * 'pfatrInput' @::@ 'Maybe' 'Text'+--+-- * 'pfatrStartedEventId' @::@ 'Integer'+--+-- * 'pfatrTaskToken' @::@ 'Text'+--+-- * 'pfatrWorkflowExecution' @::@ 'WorkflowExecution'+--+pollForActivityTaskResponse :: Text -- ^ 'pfatrTaskToken'+ -> Text -- ^ 'pfatrActivityId'+ -> Integer -- ^ 'pfatrStartedEventId'+ -> WorkflowExecution -- ^ 'pfatrWorkflowExecution'+ -> ActivityType -- ^ 'pfatrActivityType'+ -> PollForActivityTaskResponse+pollForActivityTaskResponse p1 p2 p3 p4 p5 = PollForActivityTaskResponse+ { _pfatrTaskToken = p1+ , _pfatrActivityId = p2+ , _pfatrStartedEventId = p3+ , _pfatrWorkflowExecution = p4+ , _pfatrActivityType = p5+ , _pfatrInput = Nothing+ }++-- | The unique ID of the task.+pfatrActivityId :: Lens' PollForActivityTaskResponse Text+pfatrActivityId = lens _pfatrActivityId (\s a -> s { _pfatrActivityId = a })++-- | The type of this activity task.+pfatrActivityType :: Lens' PollForActivityTaskResponse ActivityType+pfatrActivityType =+ lens _pfatrActivityType (\s a -> s { _pfatrActivityType = a })++-- | The inputs provided when the activity task was scheduled. The form of the+-- input is user defined and should be meaningful to the activity+-- implementation.+pfatrInput :: Lens' PollForActivityTaskResponse (Maybe Text)+pfatrInput = lens _pfatrInput (\s a -> s { _pfatrInput = a })++-- | The id of the ActivityTaskStarted event recorded in the history.+pfatrStartedEventId :: Lens' PollForActivityTaskResponse Integer+pfatrStartedEventId =+ lens _pfatrStartedEventId (\s a -> s { _pfatrStartedEventId = a })++-- | The opaque string used as a handle on the task. This token is used by+-- workers to communicate progress and response information back to the+-- system about the task.+pfatrTaskToken :: Lens' PollForActivityTaskResponse Text+pfatrTaskToken = lens _pfatrTaskToken (\s a -> s { _pfatrTaskToken = a })++-- | The workflow execution that started this activity task.+pfatrWorkflowExecution :: Lens' PollForActivityTaskResponse WorkflowExecution+pfatrWorkflowExecution =+ lens _pfatrWorkflowExecution (\s a -> s { _pfatrWorkflowExecution = a })++instance ToPath PollForActivityTask where+ toPath = const "/"++instance ToQuery PollForActivityTask where+ toQuery = const mempty++instance ToHeaders PollForActivityTask++instance ToJSON PollForActivityTask where+ toJSON PollForActivityTask{..} = object+ [ "domain" .= _pfatDomain+ , "taskList" .= _pfatTaskList+ , "identity" .= _pfatIdentity+ ]++instance AWSRequest PollForActivityTask where+ type Sv PollForActivityTask = SWF+ type Rs PollForActivityTask = PollForActivityTaskResponse++ request = post "PollForActivityTask"+ response = jsonResponse++instance FromJSON PollForActivityTaskResponse where+ parseJSON = withObject "PollForActivityTaskResponse" $ \o -> PollForActivityTaskResponse+ <$> o .: "activityId"+ <*> o .: "activityType"+ <*> o .:? "input"+ <*> o .: "startedEventId"+ <*> o .: "taskToken"+ <*> o .: "workflowExecution"
+ gen/Network/AWS/SWF/PollForDecisionTask.hs view
@@ -0,0 +1,291 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.PollForDecisionTask+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by deciders to get a DecisionTask from the specified decision+-- taskList. A decision task may be returned for any open workflow execution+-- that is using the specified task list. The task includes a paginated view+-- of the history of the workflow execution. The decider should use the+-- workflow type and the history to determine how to properly handle the task.+-- This action initiates a long poll, where the service holds the HTTP+-- connection open and responds as soon a task becomes available. If no+-- decision task is available in the specified task list before the timeout of+-- 60 seconds expires, an empty result is returned. An empty result, in this+-- context, means that a DecisionTask is returned, but that the value of+-- taskToken is an empty string. Deciders should set their client side socket+-- timeout to at least 70 seconds (10 seconds higher than the timeout).+-- Because the number of workflow history events for a single workflow+-- execution might be very large, the result returned might be split up across+-- a number of pages. To retrieve subsequent pages, make additional calls to+-- PollForDecisionTask using the nextPageToken returned by the initial call.+-- Note that you do not call GetWorkflowExecutionHistory with this+-- nextPageToken. Instead, call PollForDecisionTask again. Access Control You+-- can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. Constrain the taskList.name parameter+-- by using a Condition element with the swf:taskList.name key to allow the+-- action to access only certain task lists. If the caller does not have+-- sufficient permissions to invoke the action, or the parameter values fall+-- outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForDecisionTask.html>+module Network.AWS.SWF.PollForDecisionTask+ (+ -- * Request+ PollForDecisionTask+ -- ** Request constructor+ , pollForDecisionTask+ -- ** Request lenses+ , pfdtDomain+ , pfdtIdentity+ , pfdtMaximumPageSize+ , pfdtNextPageToken+ , pfdtReverseOrder+ , pfdtTaskList++ -- * Response+ , PollForDecisionTaskResponse+ -- ** Response constructor+ , pollForDecisionTaskResponse+ -- ** Response lenses+ , pfdtrEvents+ , pfdtrNextPageToken+ , pfdtrPreviousStartedEventId+ , pfdtrStartedEventId+ , pfdtrTaskToken+ , pfdtrWorkflowExecution+ , pfdtrWorkflowType+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data PollForDecisionTask = PollForDecisionTask+ { _pfdtDomain :: Text+ , _pfdtIdentity :: Maybe Text+ , _pfdtMaximumPageSize :: Maybe Nat+ , _pfdtNextPageToken :: Maybe Text+ , _pfdtReverseOrder :: Maybe Bool+ , _pfdtTaskList :: TaskList+ } deriving (Eq, Show)++-- | 'PollForDecisionTask' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pfdtDomain' @::@ 'Text'+--+-- * 'pfdtIdentity' @::@ 'Maybe' 'Text'+--+-- * 'pfdtMaximumPageSize' @::@ 'Maybe' 'Natural'+--+-- * 'pfdtNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'pfdtReverseOrder' @::@ 'Maybe' 'Bool'+--+-- * 'pfdtTaskList' @::@ 'TaskList'+--+pollForDecisionTask :: Text -- ^ 'pfdtDomain'+ -> TaskList -- ^ 'pfdtTaskList'+ -> PollForDecisionTask+pollForDecisionTask p1 p2 = PollForDecisionTask+ { _pfdtDomain = p1+ , _pfdtTaskList = p2+ , _pfdtIdentity = Nothing+ , _pfdtNextPageToken = Nothing+ , _pfdtMaximumPageSize = Nothing+ , _pfdtReverseOrder = Nothing+ }++-- | The name of the domain containing the task lists to poll.+pfdtDomain :: Lens' PollForDecisionTask Text+pfdtDomain = lens _pfdtDomain (\s a -> s { _pfdtDomain = a })++-- | Identity of the decider making the request, which is recorded in the+-- DecisionTaskStarted event in the workflow history. This enables+-- diagnostic tracing when problems arise. The form of this identity is user+-- defined.+pfdtIdentity :: Lens' PollForDecisionTask (Maybe Text)+pfdtIdentity = lens _pfdtIdentity (\s a -> s { _pfdtIdentity = a })++-- | The maximum number of history events returned in each page. The default+-- is 100, but the caller can override this value to a page size smaller+-- than the default. You cannot specify a page size greater than 100. Note+-- that the number of events may be less than the maxiumum page size, in+-- which case, the returned page will have fewer results than the+-- maximumPageSize specified.+pfdtMaximumPageSize :: Lens' PollForDecisionTask (Maybe Natural)+pfdtMaximumPageSize =+ lens _pfdtMaximumPageSize (\s a -> s { _pfdtMaximumPageSize = a })+ . mapping _Nat++-- | If on a previous call to this method a NextPageToken was returned, the+-- results are being paginated. To get the next page of results, repeat the+-- call with the returned token and all other arguments unchanged. .+pfdtNextPageToken :: Lens' PollForDecisionTask (Maybe Text)+pfdtNextPageToken =+ lens _pfdtNextPageToken (\s a -> s { _pfdtNextPageToken = a })++-- | When set to true, returns the events in reverse order. By default the+-- results are returned in ascending order of the eventTimestamp of the+-- events.+pfdtReverseOrder :: Lens' PollForDecisionTask (Maybe Bool)+pfdtReverseOrder = lens _pfdtReverseOrder (\s a -> s { _pfdtReverseOrder = a })++-- | Specifies the task list to poll for decision tasks. The specified string+-- must not start or end with whitespace. It must not contain a : (colon), /+-- (slash), | (vertical bar), or any control characters (\u0000-\u001f |+-- \u007f - \u009f). Also, it must not contain the literal string+-- "arn".+pfdtTaskList :: Lens' PollForDecisionTask TaskList+pfdtTaskList = lens _pfdtTaskList (\s a -> s { _pfdtTaskList = a })++data PollForDecisionTaskResponse = PollForDecisionTaskResponse+ { _pfdtrEvents :: List "events" HistoryEvent+ , _pfdtrNextPageToken :: Maybe Text+ , _pfdtrPreviousStartedEventId :: Maybe Integer+ , _pfdtrStartedEventId :: Integer+ , _pfdtrTaskToken :: Text+ , _pfdtrWorkflowExecution :: WorkflowExecution+ , _pfdtrWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'PollForDecisionTaskResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pfdtrEvents' @::@ ['HistoryEvent']+--+-- * 'pfdtrNextPageToken' @::@ 'Maybe' 'Text'+--+-- * 'pfdtrPreviousStartedEventId' @::@ 'Maybe' 'Integer'+--+-- * 'pfdtrStartedEventId' @::@ 'Integer'+--+-- * 'pfdtrTaskToken' @::@ 'Text'+--+-- * 'pfdtrWorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'pfdtrWorkflowType' @::@ 'WorkflowType'+--+pollForDecisionTaskResponse :: Text -- ^ 'pfdtrTaskToken'+ -> Integer -- ^ 'pfdtrStartedEventId'+ -> WorkflowExecution -- ^ 'pfdtrWorkflowExecution'+ -> WorkflowType -- ^ 'pfdtrWorkflowType'+ -> PollForDecisionTaskResponse+pollForDecisionTaskResponse p1 p2 p3 p4 = PollForDecisionTaskResponse+ { _pfdtrTaskToken = p1+ , _pfdtrStartedEventId = p2+ , _pfdtrWorkflowExecution = p3+ , _pfdtrWorkflowType = p4+ , _pfdtrEvents = mempty+ , _pfdtrNextPageToken = Nothing+ , _pfdtrPreviousStartedEventId = Nothing+ }++-- | A paginated list of history events of the workflow execution. The decider+-- uses this during the processing of the decision task.+pfdtrEvents :: Lens' PollForDecisionTaskResponse [HistoryEvent]+pfdtrEvents = lens _pfdtrEvents (\s a -> s { _pfdtrEvents = a }) . _List++-- | Returns a value if the results are paginated. To get the next page of+-- results, repeat the request specifying this token and all other arguments+-- unchanged.+pfdtrNextPageToken :: Lens' PollForDecisionTaskResponse (Maybe Text)+pfdtrNextPageToken =+ lens _pfdtrNextPageToken (\s a -> s { _pfdtrNextPageToken = a })++-- | The id of the DecisionTaskStarted event of the previous decision task of+-- this workflow execution that was processed by the decider. This can be+-- used to determine the events in the history new since the last decision+-- task received by the decider.+pfdtrPreviousStartedEventId :: Lens' PollForDecisionTaskResponse (Maybe Integer)+pfdtrPreviousStartedEventId =+ lens _pfdtrPreviousStartedEventId+ (\s a -> s { _pfdtrPreviousStartedEventId = a })++-- | The id of the DecisionTaskStarted event recorded in the history.+pfdtrStartedEventId :: Lens' PollForDecisionTaskResponse Integer+pfdtrStartedEventId =+ lens _pfdtrStartedEventId (\s a -> s { _pfdtrStartedEventId = a })++-- | The opaque string used as a handle on the task. This token is used by+-- workers to communicate progress and response information back to the+-- system about the task.+pfdtrTaskToken :: Lens' PollForDecisionTaskResponse Text+pfdtrTaskToken = lens _pfdtrTaskToken (\s a -> s { _pfdtrTaskToken = a })++-- | The workflow execution for which this decision task was created.+pfdtrWorkflowExecution :: Lens' PollForDecisionTaskResponse WorkflowExecution+pfdtrWorkflowExecution =+ lens _pfdtrWorkflowExecution (\s a -> s { _pfdtrWorkflowExecution = a })++-- | The type of the workflow execution for which this decision task was+-- created.+pfdtrWorkflowType :: Lens' PollForDecisionTaskResponse WorkflowType+pfdtrWorkflowType =+ lens _pfdtrWorkflowType (\s a -> s { _pfdtrWorkflowType = a })++instance ToPath PollForDecisionTask where+ toPath = const "/"++instance ToQuery PollForDecisionTask where+ toQuery = const mempty++instance ToHeaders PollForDecisionTask++instance ToJSON PollForDecisionTask where+ toJSON PollForDecisionTask{..} = object+ [ "domain" .= _pfdtDomain+ , "taskList" .= _pfdtTaskList+ , "identity" .= _pfdtIdentity+ , "nextPageToken" .= _pfdtNextPageToken+ , "maximumPageSize" .= _pfdtMaximumPageSize+ , "reverseOrder" .= _pfdtReverseOrder+ ]++instance AWSRequest PollForDecisionTask where+ type Sv PollForDecisionTask = SWF+ type Rs PollForDecisionTask = PollForDecisionTaskResponse++ request = post "PollForDecisionTask"+ response = jsonResponse++instance FromJSON PollForDecisionTaskResponse where+ parseJSON = withObject "PollForDecisionTaskResponse" $ \o -> PollForDecisionTaskResponse+ <$> o .: "events"+ <*> o .:? "nextPageToken"+ <*> o .:? "previousStartedEventId"+ <*> o .: "startedEventId"+ <*> o .: "taskToken"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance AWSPager PollForDecisionTask where+ page rq rs+ | stop (rq ^. pfdtNextPageToken) = Nothing+ | otherwise = (\x -> rq & pfdtNextPageToken ?~ x)+ <$> (rs ^. pfdtrNextPageToken)
+ gen/Network/AWS/SWF/RecordActivityTaskHeartbeat.hs view
@@ -0,0 +1,148 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RecordActivityTaskHeartbeat+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by activity workers to report to the service that the ActivityTask+-- represented by the specified taskToken is still making progress. The worker+-- can also (optionally) specify details of the progress, for example percent+-- complete, using the details parameter. This action can also be used by the+-- worker as a mechanism to check if cancellation is being requested for the+-- activity task. If a cancellation is being attempted for the specified task,+-- then the boolean cancelRequested flag returned by the service is set to+-- true. This action resets the taskHeartbeatTimeout clock. The+-- taskHeartbeatTimeout is specified in RegisterActivityType. This action does+-- not in itself create an event in the workflow execution history. However,+-- if the task times out, the workflow execution history will contain a+-- ActivityTaskTimedOut event that contains the information from the last+-- heartbeat generated by the activity worker. If the cancelRequested flag+-- returns true, a cancellation is being attempted. If the worker can cancel+-- the activity, it should respond with RespondActivityTaskCanceled.+-- Otherwise, it should ignore the cancellation request. Access Control You+-- can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. You cannot use an IAM policy to+-- constrain this action's parameters. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RecordActivityTaskHeartbeat.html>+module Network.AWS.SWF.RecordActivityTaskHeartbeat+ (+ -- * Request+ RecordActivityTaskHeartbeat+ -- ** Request constructor+ , recordActivityTaskHeartbeat+ -- ** Request lenses+ , rathDetails+ , rathTaskToken++ -- * Response+ , RecordActivityTaskHeartbeatResponse+ -- ** Response constructor+ , recordActivityTaskHeartbeatResponse+ -- ** Response lenses+ , rathrCancelRequested+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RecordActivityTaskHeartbeat = RecordActivityTaskHeartbeat+ { _rathDetails :: Maybe Text+ , _rathTaskToken :: Text+ } deriving (Eq, Ord, Show)++-- | 'RecordActivityTaskHeartbeat' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rathDetails' @::@ 'Maybe' 'Text'+--+-- * 'rathTaskToken' @::@ 'Text'+--+recordActivityTaskHeartbeat :: Text -- ^ 'rathTaskToken'+ -> RecordActivityTaskHeartbeat+recordActivityTaskHeartbeat p1 = RecordActivityTaskHeartbeat+ { _rathTaskToken = p1+ , _rathDetails = Nothing+ }++-- | If specified, contains details about the progress of the task.+rathDetails :: Lens' RecordActivityTaskHeartbeat (Maybe Text)+rathDetails = lens _rathDetails (\s a -> s { _rathDetails = a })++-- | The taskToken of the ActivityTask. The taskToken is generated by the+-- service and should be treated as an opaque value. If the task is passed+-- to another process, its taskToken must also be passed. This enables it to+-- provide its progress and respond with results.+rathTaskToken :: Lens' RecordActivityTaskHeartbeat Text+rathTaskToken = lens _rathTaskToken (\s a -> s { _rathTaskToken = a })++newtype RecordActivityTaskHeartbeatResponse = RecordActivityTaskHeartbeatResponse+ { _rathrCancelRequested :: Bool+ } deriving (Eq, Ord, Show, Enum)++-- | 'RecordActivityTaskHeartbeatResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rathrCancelRequested' @::@ 'Bool'+--+recordActivityTaskHeartbeatResponse :: Bool -- ^ 'rathrCancelRequested'+ -> RecordActivityTaskHeartbeatResponse+recordActivityTaskHeartbeatResponse p1 = RecordActivityTaskHeartbeatResponse+ { _rathrCancelRequested = p1+ }++-- | Set to true if cancellation of the task is requested.+rathrCancelRequested :: Lens' RecordActivityTaskHeartbeatResponse Bool+rathrCancelRequested =+ lens _rathrCancelRequested (\s a -> s { _rathrCancelRequested = a })++instance ToPath RecordActivityTaskHeartbeat where+ toPath = const "/"++instance ToQuery RecordActivityTaskHeartbeat where+ toQuery = const mempty++instance ToHeaders RecordActivityTaskHeartbeat++instance ToJSON RecordActivityTaskHeartbeat where+ toJSON RecordActivityTaskHeartbeat{..} = object+ [ "taskToken" .= _rathTaskToken+ , "details" .= _rathDetails+ ]++instance AWSRequest RecordActivityTaskHeartbeat where+ type Sv RecordActivityTaskHeartbeat = SWF+ type Rs RecordActivityTaskHeartbeat = RecordActivityTaskHeartbeatResponse++ request = post "RecordActivityTaskHeartbeat"+ response = jsonResponse++instance FromJSON RecordActivityTaskHeartbeatResponse where+ parseJSON = withObject "RecordActivityTaskHeartbeatResponse" $ \o -> RecordActivityTaskHeartbeatResponse+ <$> o .: "cancelRequested"
+ gen/Network/AWS/SWF/RegisterActivityType.hs view
@@ -0,0 +1,233 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RegisterActivityType+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Registers a new activity type along with its configuration settings in the+-- specified domain. A TypeAlreadyExists fault is returned if the type already+-- exists in the domain. You cannot change any configuration settings of the+-- type after its registration, and it must be registered as a new version.+-- Access Control You can use IAM policies to control this action's access to+-- Amazon SWF resources as follows: Use a Resource element with the domain+-- name to limit the action to only specified domains. Use an Action element+-- to allow or deny permission to call this action. Constrain the following+-- parameters by using a Condition element with the appropriate keys.+-- defaultTaskList.name: String constraint. The key is+-- swf:defaultTaskList.name. name: String constraint. The key is swf:name.+-- version: String constraint. The key is swf:version. If the caller does not+-- have sufficient permissions to invoke the action, or the parameter values+-- fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterActivityType.html>+module Network.AWS.SWF.RegisterActivityType+ (+ -- * Request+ RegisterActivityType+ -- ** Request constructor+ , registerActivityType+ -- ** Request lenses+ , ratDefaultTaskHeartbeatTimeout+ , ratDefaultTaskList+ , ratDefaultTaskScheduleToCloseTimeout+ , ratDefaultTaskScheduleToStartTimeout+ , ratDefaultTaskStartToCloseTimeout+ , ratDescription+ , ratDomain+ , ratName+ , ratVersion++ -- * Response+ , RegisterActivityTypeResponse+ -- ** Response constructor+ , registerActivityTypeResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RegisterActivityType = RegisterActivityType+ { _ratDefaultTaskHeartbeatTimeout :: Maybe Text+ , _ratDefaultTaskList :: Maybe TaskList+ , _ratDefaultTaskScheduleToCloseTimeout :: Maybe Text+ , _ratDefaultTaskScheduleToStartTimeout :: Maybe Text+ , _ratDefaultTaskStartToCloseTimeout :: Maybe Text+ , _ratDescription :: Maybe Text+ , _ratDomain :: Text+ , _ratName :: Text+ , _ratVersion :: Text+ } deriving (Eq, Show)++-- | 'RegisterActivityType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ratDefaultTaskHeartbeatTimeout' @::@ 'Maybe' 'Text'+--+-- * 'ratDefaultTaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'ratDefaultTaskScheduleToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'ratDefaultTaskScheduleToStartTimeout' @::@ 'Maybe' 'Text'+--+-- * 'ratDefaultTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'ratDescription' @::@ 'Maybe' 'Text'+--+-- * 'ratDomain' @::@ 'Text'+--+-- * 'ratName' @::@ 'Text'+--+-- * 'ratVersion' @::@ 'Text'+--+registerActivityType :: Text -- ^ 'ratDomain'+ -> Text -- ^ 'ratName'+ -> Text -- ^ 'ratVersion'+ -> RegisterActivityType+registerActivityType p1 p2 p3 = RegisterActivityType+ { _ratDomain = p1+ , _ratName = p2+ , _ratVersion = p3+ , _ratDescription = Nothing+ , _ratDefaultTaskStartToCloseTimeout = Nothing+ , _ratDefaultTaskHeartbeatTimeout = Nothing+ , _ratDefaultTaskList = Nothing+ , _ratDefaultTaskScheduleToStartTimeout = Nothing+ , _ratDefaultTaskScheduleToCloseTimeout = Nothing+ }++-- | If set, specifies the default maximum time before which a worker+-- processing a task of this type must report progress by calling+-- RecordActivityTaskHeartbeat. If the timeout is exceeded, the activity+-- task is automatically timed out. This default can be overridden when+-- scheduling an activity task using the ScheduleActivityTask Decision. If+-- the activity worker subsequently attempts to record a heartbeat or+-- returns a result, the activity worker receives an UnknownResource fault.+-- In this case, Amazon SWF no longer considers the activity task to be+-- valid; the activity worker should clean up the activity task. The valid+-- values are integers greater than or equal to 0. An integer value can be+-- used to specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+ratDefaultTaskHeartbeatTimeout :: Lens' RegisterActivityType (Maybe Text)+ratDefaultTaskHeartbeatTimeout =+ lens _ratDefaultTaskHeartbeatTimeout+ (\s a -> s { _ratDefaultTaskHeartbeatTimeout = a })++-- | If set, specifies the default task list to use for scheduling tasks of+-- this activity type. This default task list is used if a task list is not+-- provided when a task is scheduled through the ScheduleActivityTask+-- Decision.+ratDefaultTaskList :: Lens' RegisterActivityType (Maybe TaskList)+ratDefaultTaskList =+ lens _ratDefaultTaskList (\s a -> s { _ratDefaultTaskList = a })++-- | If set, specifies the default maximum duration for a task of this+-- activity type. This default can be overridden when scheduling an activity+-- task using the ScheduleActivityTask Decision. The valid values are+-- integers greater than or equal to 0. An integer value can be used to+-- specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+ratDefaultTaskScheduleToCloseTimeout :: Lens' RegisterActivityType (Maybe Text)+ratDefaultTaskScheduleToCloseTimeout =+ lens _ratDefaultTaskScheduleToCloseTimeout+ (\s a -> s { _ratDefaultTaskScheduleToCloseTimeout = a })++-- | If set, specifies the default maximum duration that a task of this+-- activity type can wait before being assigned to a worker. This default+-- can be overridden when scheduling an activity task using the+-- ScheduleActivityTask Decision. The valid values are integers greater than+-- or equal to 0. An integer value can be used to specify the duration in+-- seconds while NONE can be used to specify unlimited duration.+ratDefaultTaskScheduleToStartTimeout :: Lens' RegisterActivityType (Maybe Text)+ratDefaultTaskScheduleToStartTimeout =+ lens _ratDefaultTaskScheduleToStartTimeout+ (\s a -> s { _ratDefaultTaskScheduleToStartTimeout = a })++-- | If set, specifies the default maximum duration that a worker can take to+-- process tasks of this activity type. This default can be overridden when+-- scheduling an activity task using the ScheduleActivityTask Decision. The+-- valid values are integers greater than or equal to 0. An integer value+-- can be used to specify the duration in seconds while NONE can be used to+-- specify unlimited duration.+ratDefaultTaskStartToCloseTimeout :: Lens' RegisterActivityType (Maybe Text)+ratDefaultTaskStartToCloseTimeout =+ lens _ratDefaultTaskStartToCloseTimeout+ (\s a -> s { _ratDefaultTaskStartToCloseTimeout = a })++-- | A textual description of the activity type.+ratDescription :: Lens' RegisterActivityType (Maybe Text)+ratDescription = lens _ratDescription (\s a -> s { _ratDescription = a })++-- | The name of the domain in which this activity is to be registered.+ratDomain :: Lens' RegisterActivityType Text+ratDomain = lens _ratDomain (\s a -> s { _ratDomain = a })++-- | The name of the activity type within the domain. The specified string+-- must not start or end with whitespace. It must not contain a : (colon), /+-- (slash), | (vertical bar), or any control characters (\u0000-\u001f |+-- \u007f - \u009f). Also, it must not contain the literal string+-- "arn".+ratName :: Lens' RegisterActivityType Text+ratName = lens _ratName (\s a -> s { _ratName = a })++-- | The version of the activity type. The specified string must not start or+-- end with whitespace. It must not contain a : (colon), / (slash), |+-- (vertical bar), or any control characters (\u0000-\u001f | \u007f -+-- \u009f). Also, it must not contain the literal string "arn".+ratVersion :: Lens' RegisterActivityType Text+ratVersion = lens _ratVersion (\s a -> s { _ratVersion = a })++data RegisterActivityTypeResponse = RegisterActivityTypeResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RegisterActivityTypeResponse' constructor.+registerActivityTypeResponse :: RegisterActivityTypeResponse+registerActivityTypeResponse = RegisterActivityTypeResponse++instance ToPath RegisterActivityType where+ toPath = const "/"++instance ToQuery RegisterActivityType where+ toQuery = const mempty++instance ToHeaders RegisterActivityType++instance ToJSON RegisterActivityType where+ toJSON RegisterActivityType{..} = object+ [ "domain" .= _ratDomain+ , "name" .= _ratName+ , "version" .= _ratVersion+ , "description" .= _ratDescription+ , "defaultTaskStartToCloseTimeout" .= _ratDefaultTaskStartToCloseTimeout+ , "defaultTaskHeartbeatTimeout" .= _ratDefaultTaskHeartbeatTimeout+ , "defaultTaskList" .= _ratDefaultTaskList+ , "defaultTaskScheduleToStartTimeout" .= _ratDefaultTaskScheduleToStartTimeout+ , "defaultTaskScheduleToCloseTimeout" .= _ratDefaultTaskScheduleToCloseTimeout+ ]++instance AWSRequest RegisterActivityType where+ type Sv RegisterActivityType = SWF+ type Rs RegisterActivityType = RegisterActivityTypeResponse++ request = post "RegisterActivityType"+ response = nullResponse RegisterActivityTypeResponse
+ gen/Network/AWS/SWF/RegisterDomain.hs view
@@ -0,0 +1,132 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RegisterDomain+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Registers a new domain. Access Control You can use IAM policies to control+-- this action's access to Amazon SWF resources as follows: You cannot use an+-- IAM policy to control domain access for this action. The name of the domain+-- being registered is available as the resource of this action. Use an Action+-- element to allow or deny permission to call this action. You cannot use an+-- IAM policy to constrain this action's parameters. If the caller does not+-- have sufficient permissions to invoke the action, or the parameter values+-- fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterDomain.html>+module Network.AWS.SWF.RegisterDomain+ (+ -- * Request+ RegisterDomain+ -- ** Request constructor+ , registerDomain+ -- ** Request lenses+ , rdDescription+ , rdName+ , rdWorkflowExecutionRetentionPeriodInDays++ -- * Response+ , RegisterDomainResponse+ -- ** Response constructor+ , registerDomainResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RegisterDomain = RegisterDomain+ { _rdDescription :: Maybe Text+ , _rdName :: Text+ , _rdWorkflowExecutionRetentionPeriodInDays :: Text+ } deriving (Eq, Ord, Show)++-- | 'RegisterDomain' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdDescription' @::@ 'Maybe' 'Text'+--+-- * 'rdName' @::@ 'Text'+--+-- * 'rdWorkflowExecutionRetentionPeriodInDays' @::@ 'Text'+--+registerDomain :: Text -- ^ 'rdName'+ -> Text -- ^ 'rdWorkflowExecutionRetentionPeriodInDays'+ -> RegisterDomain+registerDomain p1 p2 = RegisterDomain+ { _rdName = p1+ , _rdWorkflowExecutionRetentionPeriodInDays = p2+ , _rdDescription = Nothing+ }++-- | Textual description of the domain.+rdDescription :: Lens' RegisterDomain (Maybe Text)+rdDescription = lens _rdDescription (\s a -> s { _rdDescription = a })++-- | Name of the domain to register. The name must be unique. The specified+-- string must not start or end with whitespace. It must not contain a :+-- (colon), / (slash), | (vertical bar), or any control characters+-- (\u0000-\u001f | \u007f - \u009f). Also, it must not contain the literal+-- string "arn".+rdName :: Lens' RegisterDomain Text+rdName = lens _rdName (\s a -> s { _rdName = a })++-- | Specifies the duration--in days--for which the record (including the+-- history) of workflow executions in this domain should be kept by the+-- service. After the retention period, the workflow execution will not be+-- available in the results of visibility calls. If a duration of NONE is+-- specified, the records for workflow executions in this domain are not+-- retained at all.+rdWorkflowExecutionRetentionPeriodInDays :: Lens' RegisterDomain Text+rdWorkflowExecutionRetentionPeriodInDays =+ lens _rdWorkflowExecutionRetentionPeriodInDays+ (\s a -> s { _rdWorkflowExecutionRetentionPeriodInDays = a })++data RegisterDomainResponse = RegisterDomainResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RegisterDomainResponse' constructor.+registerDomainResponse :: RegisterDomainResponse+registerDomainResponse = RegisterDomainResponse++instance ToPath RegisterDomain where+ toPath = const "/"++instance ToQuery RegisterDomain where+ toQuery = const mempty++instance ToHeaders RegisterDomain++instance ToJSON RegisterDomain where+ toJSON RegisterDomain{..} = object+ [ "name" .= _rdName+ , "description" .= _rdDescription+ , "workflowExecutionRetentionPeriodInDays" .= _rdWorkflowExecutionRetentionPeriodInDays+ ]++instance AWSRequest RegisterDomain where+ type Sv RegisterDomain = SWF+ type Rs RegisterDomain = RegisterDomainResponse++ request = post "RegisterDomain"+ response = nullResponse RegisterDomainResponse
+ gen/Network/AWS/SWF/RegisterWorkflowType.hs view
@@ -0,0 +1,218 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RegisterWorkflowType+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Registers a new workflow type and its configuration settings in the+-- specified domain. The retention period for the workflow history is set by+-- the RegisterDomain action. If the type already exists, then a+-- TypeAlreadyExists fault is returned. You cannot change the configuration+-- settings of a workflow type once it is registered and it must be registered+-- as a new version. Access Control You can use IAM policies to control this+-- action's access to Amazon SWF resources as follows: Use a Resource element+-- with the domain name to limit the action to only specified domains. Use an+-- Action element to allow or deny permission to call this action. Constrain+-- the following parameters by using a Condition element with the appropriate+-- keys. defaultTaskList.name: String constraint. The key is+-- swf:defaultTaskList.name. name: String constraint. The key is swf:name.+-- version: String constraint. The key is swf:version. If the caller does not+-- have sufficient permissions to invoke the action, or the parameter values+-- fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterWorkflowType.html>+module Network.AWS.SWF.RegisterWorkflowType+ (+ -- * Request+ RegisterWorkflowType+ -- ** Request constructor+ , registerWorkflowType+ -- ** Request lenses+ , rwtDefaultChildPolicy+ , rwtDefaultExecutionStartToCloseTimeout+ , rwtDefaultTaskList+ , rwtDefaultTaskStartToCloseTimeout+ , rwtDescription+ , rwtDomain+ , rwtName+ , rwtVersion++ -- * Response+ , RegisterWorkflowTypeResponse+ -- ** Response constructor+ , registerWorkflowTypeResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RegisterWorkflowType = RegisterWorkflowType+ { _rwtDefaultChildPolicy :: Maybe Text+ , _rwtDefaultExecutionStartToCloseTimeout :: Maybe Text+ , _rwtDefaultTaskList :: Maybe TaskList+ , _rwtDefaultTaskStartToCloseTimeout :: Maybe Text+ , _rwtDescription :: Maybe Text+ , _rwtDomain :: Text+ , _rwtName :: Text+ , _rwtVersion :: Text+ } deriving (Eq, Show)++-- | 'RegisterWorkflowType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rwtDefaultChildPolicy' @::@ 'Maybe' 'Text'+--+-- * 'rwtDefaultExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'rwtDefaultTaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'rwtDefaultTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'rwtDescription' @::@ 'Maybe' 'Text'+--+-- * 'rwtDomain' @::@ 'Text'+--+-- * 'rwtName' @::@ 'Text'+--+-- * 'rwtVersion' @::@ 'Text'+--+registerWorkflowType :: Text -- ^ 'rwtDomain'+ -> Text -- ^ 'rwtName'+ -> Text -- ^ 'rwtVersion'+ -> RegisterWorkflowType+registerWorkflowType p1 p2 p3 = RegisterWorkflowType+ { _rwtDomain = p1+ , _rwtName = p2+ , _rwtVersion = p3+ , _rwtDescription = Nothing+ , _rwtDefaultTaskStartToCloseTimeout = Nothing+ , _rwtDefaultExecutionStartToCloseTimeout = Nothing+ , _rwtDefaultTaskList = Nothing+ , _rwtDefaultChildPolicy = Nothing+ }++-- | If set, specifies the default policy to use for the child workflow+-- executions when a workflow execution of this type is terminated, by+-- calling the TerminateWorkflowExecution action explicitly or due to an+-- expired timeout. This default can be overridden when starting a workflow+-- execution using the StartWorkflowExecution action or the+-- StartChildWorkflowExecution Decision. The supported child policies are:+-- TERMINATE: the child executions will be terminated. REQUEST_CANCEL: a+-- request to cancel will be attempted for each child execution by recording+-- a WorkflowExecutionCancelRequested event in its history. It is up to the+-- decider to take appropriate actions when it receives an execution history+-- with this event. ABANDON: no action will be taken. The child executions+-- will continue to run.+rwtDefaultChildPolicy :: Lens' RegisterWorkflowType (Maybe Text)+rwtDefaultChildPolicy =+ lens _rwtDefaultChildPolicy (\s a -> s { _rwtDefaultChildPolicy = a })++-- | If set, specifies the default maximum duration for executions of this+-- workflow type. You can override this default when starting an execution+-- through the StartWorkflowExecution Action or StartChildWorkflowExecution+-- Decision. The duration is specified in seconds. The valid values are+-- integers greater than or equal to 0. Unlike some of the other timeout+-- parameters in Amazon SWF, you cannot specify a value of "NONE" for+-- defaultExecutionStartToCloseTimeout; there is a one-year max limit on the+-- time that a workflow execution can run. Exceeding this limit will always+-- cause the workflow execution to time out.+rwtDefaultExecutionStartToCloseTimeout :: Lens' RegisterWorkflowType (Maybe Text)+rwtDefaultExecutionStartToCloseTimeout =+ lens _rwtDefaultExecutionStartToCloseTimeout+ (\s a -> s { _rwtDefaultExecutionStartToCloseTimeout = a })++-- | If set, specifies the default task list to use for scheduling decision+-- tasks for executions of this workflow type. This default is used only if+-- a task list is not provided when starting the execution through the+-- StartWorkflowExecution Action or StartChildWorkflowExecution Decision.+rwtDefaultTaskList :: Lens' RegisterWorkflowType (Maybe TaskList)+rwtDefaultTaskList =+ lens _rwtDefaultTaskList (\s a -> s { _rwtDefaultTaskList = a })++-- | If set, specifies the default maximum duration of decision tasks for this+-- workflow type. This default can be overridden when starting a workflow+-- execution using the StartWorkflowExecution action or the+-- StartChildWorkflowExecution Decision. The valid values are integers+-- greater than or equal to 0. An integer value can be used to specify the+-- duration in seconds while NONE can be used to specify unlimited duration.+rwtDefaultTaskStartToCloseTimeout :: Lens' RegisterWorkflowType (Maybe Text)+rwtDefaultTaskStartToCloseTimeout =+ lens _rwtDefaultTaskStartToCloseTimeout+ (\s a -> s { _rwtDefaultTaskStartToCloseTimeout = a })++-- | Textual description of the workflow type.+rwtDescription :: Lens' RegisterWorkflowType (Maybe Text)+rwtDescription = lens _rwtDescription (\s a -> s { _rwtDescription = a })++-- | The name of the domain in which to register the workflow type.+rwtDomain :: Lens' RegisterWorkflowType Text+rwtDomain = lens _rwtDomain (\s a -> s { _rwtDomain = a })++-- | The name of the workflow type. The specified string must not start or end+-- with whitespace. It must not contain a : (colon), / (slash), | (vertical+-- bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also,+-- it must not contain the literal string "arn".+rwtName :: Lens' RegisterWorkflowType Text+rwtName = lens _rwtName (\s a -> s { _rwtName = a })++-- | The version of the workflow type. The specified string must not start or+-- end with whitespace. It must not contain a : (colon), / (slash), |+-- (vertical bar), or any control characters (\u0000-\u001f | \u007f -+-- \u009f). Also, it must not contain the literal string "arn".+rwtVersion :: Lens' RegisterWorkflowType Text+rwtVersion = lens _rwtVersion (\s a -> s { _rwtVersion = a })++data RegisterWorkflowTypeResponse = RegisterWorkflowTypeResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RegisterWorkflowTypeResponse' constructor.+registerWorkflowTypeResponse :: RegisterWorkflowTypeResponse+registerWorkflowTypeResponse = RegisterWorkflowTypeResponse++instance ToPath RegisterWorkflowType where+ toPath = const "/"++instance ToQuery RegisterWorkflowType where+ toQuery = const mempty++instance ToHeaders RegisterWorkflowType++instance ToJSON RegisterWorkflowType where+ toJSON RegisterWorkflowType{..} = object+ [ "domain" .= _rwtDomain+ , "name" .= _rwtName+ , "version" .= _rwtVersion+ , "description" .= _rwtDescription+ , "defaultTaskStartToCloseTimeout" .= _rwtDefaultTaskStartToCloseTimeout+ , "defaultExecutionStartToCloseTimeout" .= _rwtDefaultExecutionStartToCloseTimeout+ , "defaultTaskList" .= _rwtDefaultTaskList+ , "defaultChildPolicy" .= _rwtDefaultChildPolicy+ ]++instance AWSRequest RegisterWorkflowType where+ type Sv RegisterWorkflowType = SWF+ type Rs RegisterWorkflowType = RegisterWorkflowTypeResponse++ request = post "RegisterWorkflowType"+ response = nullResponse RegisterWorkflowTypeResponse
+ gen/Network/AWS/SWF/RequestCancelWorkflowExecution.hs view
@@ -0,0 +1,125 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RequestCancelWorkflowExecution+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Records a WorkflowExecutionCancelRequested event in the currently running+-- workflow execution identified by the given domain, workflowId, and runId.+-- This logically requests the cancellation of the workflow execution as a+-- whole. It is up to the decider to take appropriate actions when it receives+-- an execution history with this event. Access Control You can use IAM+-- policies to control this action's access to Amazon SWF resources as+-- follows: Use a Resource element with the domain name to limit the action to+-- only specified domains. Use an Action element to allow or deny permission+-- to call this action. You cannot use an IAM policy to constrain this+-- action's parameters. If the caller does not have sufficient permissions to+-- invoke the action, or the parameter values fall outside the specified+-- constraints, the action fails by throwing OperationNotPermitted. For+-- details and example IAM policies, see Using IAM to Manage Access to Amazon+-- SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RequestCancelWorkflowExecution.html>+module Network.AWS.SWF.RequestCancelWorkflowExecution+ (+ -- * Request+ RequestCancelWorkflowExecution+ -- ** Request constructor+ , requestCancelWorkflowExecution+ -- ** Request lenses+ , rcweDomain+ , rcweRunId+ , rcweWorkflowId++ -- * Response+ , RequestCancelWorkflowExecutionResponse+ -- ** Response constructor+ , requestCancelWorkflowExecutionResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RequestCancelWorkflowExecution = RequestCancelWorkflowExecution+ { _rcweDomain :: Text+ , _rcweRunId :: Maybe Text+ , _rcweWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'RequestCancelWorkflowExecution' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rcweDomain' @::@ 'Text'+--+-- * 'rcweRunId' @::@ 'Maybe' 'Text'+--+-- * 'rcweWorkflowId' @::@ 'Text'+--+requestCancelWorkflowExecution :: Text -- ^ 'rcweDomain'+ -> Text -- ^ 'rcweWorkflowId'+ -> RequestCancelWorkflowExecution+requestCancelWorkflowExecution p1 p2 = RequestCancelWorkflowExecution+ { _rcweDomain = p1+ , _rcweWorkflowId = p2+ , _rcweRunId = Nothing+ }++-- | The name of the domain containing the workflow execution to cancel.+rcweDomain :: Lens' RequestCancelWorkflowExecution Text+rcweDomain = lens _rcweDomain (\s a -> s { _rcweDomain = a })++-- | The runId of the workflow execution to cancel.+rcweRunId :: Lens' RequestCancelWorkflowExecution (Maybe Text)+rcweRunId = lens _rcweRunId (\s a -> s { _rcweRunId = a })++-- | The workflowId of the workflow execution to cancel.+rcweWorkflowId :: Lens' RequestCancelWorkflowExecution Text+rcweWorkflowId = lens _rcweWorkflowId (\s a -> s { _rcweWorkflowId = a })++data RequestCancelWorkflowExecutionResponse = RequestCancelWorkflowExecutionResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RequestCancelWorkflowExecutionResponse' constructor.+requestCancelWorkflowExecutionResponse :: RequestCancelWorkflowExecutionResponse+requestCancelWorkflowExecutionResponse = RequestCancelWorkflowExecutionResponse++instance ToPath RequestCancelWorkflowExecution where+ toPath = const "/"++instance ToQuery RequestCancelWorkflowExecution where+ toQuery = const mempty++instance ToHeaders RequestCancelWorkflowExecution++instance ToJSON RequestCancelWorkflowExecution where+ toJSON RequestCancelWorkflowExecution{..} = object+ [ "domain" .= _rcweDomain+ , "workflowId" .= _rcweWorkflowId+ , "runId" .= _rcweRunId+ ]++instance AWSRequest RequestCancelWorkflowExecution where+ type Sv RequestCancelWorkflowExecution = SWF+ type Rs RequestCancelWorkflowExecution = RequestCancelWorkflowExecutionResponse++ request = post "RequestCancelWorkflowExecution"+ response = nullResponse RequestCancelWorkflowExecutionResponse
+ gen/Network/AWS/SWF/RespondActivityTaskCanceled.hs view
@@ -0,0 +1,123 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RespondActivityTaskCanceled+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by workers to tell the service that the ActivityTask identified by the+-- taskToken was successfully canceled. Additional details can be optionally+-- provided using the details argument. These details (if provided) appear in+-- the ActivityTaskCanceled event added to the workflow history. Only use this+-- operation if the canceled flag of a RecordActivityTaskHeartbeat request+-- returns true and if the activity can be safely undone or abandoned. A task+-- is considered open from the time that it is scheduled until it is closed.+-- Therefore a task is reported as open while a worker is processing it. A+-- task is closed after it has been specified in a call to+-- RespondActivityTaskCompleted, RespondActivityTaskCanceled,+-- RespondActivityTaskFailed, or the task has timed out. Access Control You+-- can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. You cannot use an IAM policy to+-- constrain this action's parameters. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskCanceled.html>+module Network.AWS.SWF.RespondActivityTaskCanceled+ (+ -- * Request+ RespondActivityTaskCanceled+ -- ** Request constructor+ , respondActivityTaskCanceled+ -- ** Request lenses+ , ratc1Details+ , ratc1TaskToken++ -- * Response+ , RespondActivityTaskCanceledResponse+ -- ** Response constructor+ , respondActivityTaskCanceledResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RespondActivityTaskCanceled = RespondActivityTaskCanceled+ { _ratc1Details :: Maybe Text+ , _ratc1TaskToken :: Text+ } deriving (Eq, Ord, Show)++-- | 'RespondActivityTaskCanceled' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ratc1Details' @::@ 'Maybe' 'Text'+--+-- * 'ratc1TaskToken' @::@ 'Text'+--+respondActivityTaskCanceled :: Text -- ^ 'ratc1TaskToken'+ -> RespondActivityTaskCanceled+respondActivityTaskCanceled p1 = RespondActivityTaskCanceled+ { _ratc1TaskToken = p1+ , _ratc1Details = Nothing+ }++-- | Optional information about the cancellation.+ratc1Details :: Lens' RespondActivityTaskCanceled (Maybe Text)+ratc1Details = lens _ratc1Details (\s a -> s { _ratc1Details = a })++-- | The taskToken of the ActivityTask. The taskToken is generated by the+-- service and should be treated as an opaque value. If the task is passed+-- to another process, its taskToken must also be passed. This enables it to+-- provide its progress and respond with results.+ratc1TaskToken :: Lens' RespondActivityTaskCanceled Text+ratc1TaskToken = lens _ratc1TaskToken (\s a -> s { _ratc1TaskToken = a })++data RespondActivityTaskCanceledResponse = RespondActivityTaskCanceledResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RespondActivityTaskCanceledResponse' constructor.+respondActivityTaskCanceledResponse :: RespondActivityTaskCanceledResponse+respondActivityTaskCanceledResponse = RespondActivityTaskCanceledResponse++instance ToPath RespondActivityTaskCanceled where+ toPath = const "/"++instance ToQuery RespondActivityTaskCanceled where+ toQuery = const mempty++instance ToHeaders RespondActivityTaskCanceled++instance ToJSON RespondActivityTaskCanceled where+ toJSON RespondActivityTaskCanceled{..} = object+ [ "taskToken" .= _ratc1TaskToken+ , "details" .= _ratc1Details+ ]++instance AWSRequest RespondActivityTaskCanceled where+ type Sv RespondActivityTaskCanceled = SWF+ type Rs RespondActivityTaskCanceled = RespondActivityTaskCanceledResponse++ request = post "RespondActivityTaskCanceled"+ response = nullResponse RespondActivityTaskCanceledResponse
+ gen/Network/AWS/SWF/RespondActivityTaskCompleted.hs view
@@ -0,0 +1,125 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RespondActivityTaskCompleted+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by workers to tell the service that the ActivityTask identified by the+-- taskToken completed successfully with a result (if provided). The result+-- appears in the ActivityTaskCompleted event in the workflow history. If the+-- requested task does not complete successfully, use+-- RespondActivityTaskFailed instead. If the worker finds that the task is+-- canceled through the canceled flag returned by RecordActivityTaskHeartbeat,+-- it should cancel the task, clean up and then call+-- RespondActivityTaskCanceled. A task is considered open from the time that+-- it is scheduled until it is closed. Therefore a task is reported as open+-- while a worker is processing it. A task is closed after it has been+-- specified in a call to RespondActivityTaskCompleted,+-- RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has+-- timed out. Access Control You can use IAM policies to control this action's+-- access to Amazon SWF resources as follows: Use a Resource element with the+-- domain name to limit the action to only specified domains. Use an Action+-- element to allow or deny permission to call this action. You cannot use an+-- IAM policy to constrain this action's parameters. If the caller does not+-- have sufficient permissions to invoke the action, or the parameter values+-- fall outside the specified constraints, the action fails by throwing+-- OperationNotPermitted. For details and example IAM policies, see Using IAM+-- to Manage Access to Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskCompleted.html>+module Network.AWS.SWF.RespondActivityTaskCompleted+ (+ -- * Request+ RespondActivityTaskCompleted+ -- ** Request constructor+ , respondActivityTaskCompleted+ -- ** Request lenses+ , ratcResult+ , ratcTaskToken++ -- * Response+ , RespondActivityTaskCompletedResponse+ -- ** Response constructor+ , respondActivityTaskCompletedResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RespondActivityTaskCompleted = RespondActivityTaskCompleted+ { _ratcResult :: Maybe Text+ , _ratcTaskToken :: Text+ } deriving (Eq, Ord, Show)++-- | 'RespondActivityTaskCompleted' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ratcResult' @::@ 'Maybe' 'Text'+--+-- * 'ratcTaskToken' @::@ 'Text'+--+respondActivityTaskCompleted :: Text -- ^ 'ratcTaskToken'+ -> RespondActivityTaskCompleted+respondActivityTaskCompleted p1 = RespondActivityTaskCompleted+ { _ratcTaskToken = p1+ , _ratcResult = Nothing+ }++-- | The result of the activity task. It is a free form string that is+-- implementation specific.+ratcResult :: Lens' RespondActivityTaskCompleted (Maybe Text)+ratcResult = lens _ratcResult (\s a -> s { _ratcResult = a })++-- | The taskToken of the ActivityTask. The taskToken is generated by the+-- service and should be treated as an opaque value. If the task is passed+-- to another process, its taskToken must also be passed. This enables it to+-- provide its progress and respond with results.+ratcTaskToken :: Lens' RespondActivityTaskCompleted Text+ratcTaskToken = lens _ratcTaskToken (\s a -> s { _ratcTaskToken = a })++data RespondActivityTaskCompletedResponse = RespondActivityTaskCompletedResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RespondActivityTaskCompletedResponse' constructor.+respondActivityTaskCompletedResponse :: RespondActivityTaskCompletedResponse+respondActivityTaskCompletedResponse = RespondActivityTaskCompletedResponse++instance ToPath RespondActivityTaskCompleted where+ toPath = const "/"++instance ToQuery RespondActivityTaskCompleted where+ toQuery = const mempty++instance ToHeaders RespondActivityTaskCompleted++instance ToJSON RespondActivityTaskCompleted where+ toJSON RespondActivityTaskCompleted{..} = object+ [ "taskToken" .= _ratcTaskToken+ , "result" .= _ratcResult+ ]++instance AWSRequest RespondActivityTaskCompleted where+ type Sv RespondActivityTaskCompleted = SWF+ type Rs RespondActivityTaskCompleted = RespondActivityTaskCompletedResponse++ request = post "RespondActivityTaskCompleted"+ response = nullResponse RespondActivityTaskCompletedResponse
+ gen/Network/AWS/SWF/RespondActivityTaskFailed.hs view
@@ -0,0 +1,130 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RespondActivityTaskFailed+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by workers to tell the service that the ActivityTask identified by the+-- taskToken has failed with reason (if specified). The reason and details+-- appear in the ActivityTaskFailed event added to the workflow history. A+-- task is considered open from the time that it is scheduled until it is+-- closed. Therefore a task is reported as open while a worker is processing+-- it. A task is closed after it has been specified in a call to+-- RespondActivityTaskCompleted, RespondActivityTaskCanceled,+-- RespondActivityTaskFailed, or the task has timed out. Access Control You+-- can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. You cannot use an IAM policy to+-- constrain this action's parameters. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskFailed.html>+module Network.AWS.SWF.RespondActivityTaskFailed+ (+ -- * Request+ RespondActivityTaskFailed+ -- ** Request constructor+ , respondActivityTaskFailed+ -- ** Request lenses+ , ratfDetails+ , ratfReason+ , ratfTaskToken++ -- * Response+ , RespondActivityTaskFailedResponse+ -- ** Response constructor+ , respondActivityTaskFailedResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RespondActivityTaskFailed = RespondActivityTaskFailed+ { _ratfDetails :: Maybe Text+ , _ratfReason :: Maybe Text+ , _ratfTaskToken :: Text+ } deriving (Eq, Ord, Show)++-- | 'RespondActivityTaskFailed' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ratfDetails' @::@ 'Maybe' 'Text'+--+-- * 'ratfReason' @::@ 'Maybe' 'Text'+--+-- * 'ratfTaskToken' @::@ 'Text'+--+respondActivityTaskFailed :: Text -- ^ 'ratfTaskToken'+ -> RespondActivityTaskFailed+respondActivityTaskFailed p1 = RespondActivityTaskFailed+ { _ratfTaskToken = p1+ , _ratfReason = Nothing+ , _ratfDetails = Nothing+ }++-- | Optional detailed information about the failure.+ratfDetails :: Lens' RespondActivityTaskFailed (Maybe Text)+ratfDetails = lens _ratfDetails (\s a -> s { _ratfDetails = a })++-- | Description of the error that may assist in diagnostics.+ratfReason :: Lens' RespondActivityTaskFailed (Maybe Text)+ratfReason = lens _ratfReason (\s a -> s { _ratfReason = a })++-- | The taskToken of the ActivityTask. The taskToken is generated by the+-- service and should be treated as an opaque value. If the task is passed+-- to another process, its taskToken must also be passed. This enables it to+-- provide its progress and respond with results.+ratfTaskToken :: Lens' RespondActivityTaskFailed Text+ratfTaskToken = lens _ratfTaskToken (\s a -> s { _ratfTaskToken = a })++data RespondActivityTaskFailedResponse = RespondActivityTaskFailedResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RespondActivityTaskFailedResponse' constructor.+respondActivityTaskFailedResponse :: RespondActivityTaskFailedResponse+respondActivityTaskFailedResponse = RespondActivityTaskFailedResponse++instance ToPath RespondActivityTaskFailed where+ toPath = const "/"++instance ToQuery RespondActivityTaskFailed where+ toQuery = const mempty++instance ToHeaders RespondActivityTaskFailed++instance ToJSON RespondActivityTaskFailed where+ toJSON RespondActivityTaskFailed{..} = object+ [ "taskToken" .= _ratfTaskToken+ , "reason" .= _ratfReason+ , "details" .= _ratfDetails+ ]++instance AWSRequest RespondActivityTaskFailed where+ type Sv RespondActivityTaskFailed = SWF+ type Rs RespondActivityTaskFailed = RespondActivityTaskFailedResponse++ request = post "RespondActivityTaskFailed"+ response = nullResponse RespondActivityTaskFailedResponse
+ gen/Network/AWS/SWF/RespondDecisionTaskCompleted.hs view
@@ -0,0 +1,129 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.RespondDecisionTaskCompleted+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Used by deciders to tell the service that the DecisionTask identified by+-- the taskToken has successfully completed. The decisions argument specifies+-- the list of decisions made while processing the task. A+-- DecisionTaskCompleted event is added to the workflow history. The+-- executionContext specified is attached to the event in the workflow+-- execution history. Access Control If an IAM policy grants permission to use+-- RespondDecisionTaskCompleted, it can express permissions for the list of+-- decisions in the decisions parameter. Each of the decisions has one or more+-- parameters, much like a regular API call. To allow for policies to be as+-- readable as possible, you can express permissions on decisions as if they+-- were actual API calls, including applying conditions to some parameters.+-- For more information, see Using IAM to Manage Access to Amazon SWF+-- Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondDecisionTaskCompleted.html>+module Network.AWS.SWF.RespondDecisionTaskCompleted+ (+ -- * Request+ RespondDecisionTaskCompleted+ -- ** Request constructor+ , respondDecisionTaskCompleted+ -- ** Request lenses+ , rdtcDecisions+ , rdtcExecutionContext+ , rdtcTaskToken++ -- * Response+ , RespondDecisionTaskCompletedResponse+ -- ** Response constructor+ , respondDecisionTaskCompletedResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data RespondDecisionTaskCompleted = RespondDecisionTaskCompleted+ { _rdtcDecisions :: List "decisions" Decision+ , _rdtcExecutionContext :: Maybe Text+ , _rdtcTaskToken :: Text+ } deriving (Eq, Show)++-- | 'RespondDecisionTaskCompleted' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdtcDecisions' @::@ ['Decision']+--+-- * 'rdtcExecutionContext' @::@ 'Maybe' 'Text'+--+-- * 'rdtcTaskToken' @::@ 'Text'+--+respondDecisionTaskCompleted :: Text -- ^ 'rdtcTaskToken'+ -> RespondDecisionTaskCompleted+respondDecisionTaskCompleted p1 = RespondDecisionTaskCompleted+ { _rdtcTaskToken = p1+ , _rdtcDecisions = mempty+ , _rdtcExecutionContext = Nothing+ }++-- | The list of decisions (possibly empty) made by the decider while+-- processing this decision task. See the docs for the Decision structure+-- for details.+rdtcDecisions :: Lens' RespondDecisionTaskCompleted [Decision]+rdtcDecisions = lens _rdtcDecisions (\s a -> s { _rdtcDecisions = a }) . _List++-- | User defined context to add to workflow execution.+rdtcExecutionContext :: Lens' RespondDecisionTaskCompleted (Maybe Text)+rdtcExecutionContext =+ lens _rdtcExecutionContext (\s a -> s { _rdtcExecutionContext = a })++-- | The taskToken from the DecisionTask. The taskToken is generated by the+-- service and should be treated as an opaque value. If the task is passed+-- to another process, its taskToken must also be passed. This enables it to+-- provide its progress and respond with results.+rdtcTaskToken :: Lens' RespondDecisionTaskCompleted Text+rdtcTaskToken = lens _rdtcTaskToken (\s a -> s { _rdtcTaskToken = a })++data RespondDecisionTaskCompletedResponse = RespondDecisionTaskCompletedResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RespondDecisionTaskCompletedResponse' constructor.+respondDecisionTaskCompletedResponse :: RespondDecisionTaskCompletedResponse+respondDecisionTaskCompletedResponse = RespondDecisionTaskCompletedResponse++instance ToPath RespondDecisionTaskCompleted where+ toPath = const "/"++instance ToQuery RespondDecisionTaskCompleted where+ toQuery = const mempty++instance ToHeaders RespondDecisionTaskCompleted++instance ToJSON RespondDecisionTaskCompleted where+ toJSON RespondDecisionTaskCompleted{..} = object+ [ "taskToken" .= _rdtcTaskToken+ , "decisions" .= _rdtcDecisions+ , "executionContext" .= _rdtcExecutionContext+ ]++instance AWSRequest RespondDecisionTaskCompleted where+ type Sv RespondDecisionTaskCompleted = SWF+ type Rs RespondDecisionTaskCompleted = RespondDecisionTaskCompletedResponse++ request = post "RespondDecisionTaskCompleted"+ response = nullResponse RespondDecisionTaskCompletedResponse
+ gen/Network/AWS/SWF/SignalWorkflowExecution.hs view
@@ -0,0 +1,147 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.SignalWorkflowExecution+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Records a WorkflowExecutionSignaled event in the workflow execution history+-- and creates a decision task for the workflow execution identified by the+-- given domain, workflowId and runId. The event is recorded with the+-- specified user defined signalName and input (if provided). Access Control+-- You can use IAM policies to control this action's access to Amazon SWF+-- resources as follows: Use a Resource element with the domain name to limit+-- the action to only specified domains. Use an Action element to allow or+-- deny permission to call this action. You cannot use an IAM policy to+-- constrain this action's parameters. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_SignalWorkflowExecution.html>+module Network.AWS.SWF.SignalWorkflowExecution+ (+ -- * Request+ SignalWorkflowExecution+ -- ** Request constructor+ , signalWorkflowExecution+ -- ** Request lenses+ , sweDomain+ , sweInput+ , sweRunId+ , sweSignalName+ , sweWorkflowId++ -- * Response+ , SignalWorkflowExecutionResponse+ -- ** Response constructor+ , signalWorkflowExecutionResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data SignalWorkflowExecution = SignalWorkflowExecution+ { _sweDomain :: Text+ , _sweInput :: Maybe Text+ , _sweRunId :: Maybe Text+ , _sweSignalName :: Text+ , _sweWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'SignalWorkflowExecution' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sweDomain' @::@ 'Text'+--+-- * 'sweInput' @::@ 'Maybe' 'Text'+--+-- * 'sweRunId' @::@ 'Maybe' 'Text'+--+-- * 'sweSignalName' @::@ 'Text'+--+-- * 'sweWorkflowId' @::@ 'Text'+--+signalWorkflowExecution :: Text -- ^ 'sweDomain'+ -> Text -- ^ 'sweWorkflowId'+ -> Text -- ^ 'sweSignalName'+ -> SignalWorkflowExecution+signalWorkflowExecution p1 p2 p3 = SignalWorkflowExecution+ { _sweDomain = p1+ , _sweWorkflowId = p2+ , _sweSignalName = p3+ , _sweRunId = Nothing+ , _sweInput = Nothing+ }++-- | The name of the domain containing the workflow execution to signal.+sweDomain :: Lens' SignalWorkflowExecution Text+sweDomain = lens _sweDomain (\s a -> s { _sweDomain = a })++-- | Data to attach to the WorkflowExecutionSignaled event in the target+-- workflow execution's history.+sweInput :: Lens' SignalWorkflowExecution (Maybe Text)+sweInput = lens _sweInput (\s a -> s { _sweInput = a })++-- | The runId of the workflow execution to signal.+sweRunId :: Lens' SignalWorkflowExecution (Maybe Text)+sweRunId = lens _sweRunId (\s a -> s { _sweRunId = a })++-- | The name of the signal. This name must be meaningful to the target+-- workflow.+sweSignalName :: Lens' SignalWorkflowExecution Text+sweSignalName = lens _sweSignalName (\s a -> s { _sweSignalName = a })++-- | The workflowId of the workflow execution to signal.+sweWorkflowId :: Lens' SignalWorkflowExecution Text+sweWorkflowId = lens _sweWorkflowId (\s a -> s { _sweWorkflowId = a })++data SignalWorkflowExecutionResponse = SignalWorkflowExecutionResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'SignalWorkflowExecutionResponse' constructor.+signalWorkflowExecutionResponse :: SignalWorkflowExecutionResponse+signalWorkflowExecutionResponse = SignalWorkflowExecutionResponse++instance ToPath SignalWorkflowExecution where+ toPath = const "/"++instance ToQuery SignalWorkflowExecution where+ toQuery = const mempty++instance ToHeaders SignalWorkflowExecution++instance ToJSON SignalWorkflowExecution where+ toJSON SignalWorkflowExecution{..} = object+ [ "domain" .= _sweDomain+ , "workflowId" .= _sweWorkflowId+ , "runId" .= _sweRunId+ , "signalName" .= _sweSignalName+ , "input" .= _sweInput+ ]++instance AWSRequest SignalWorkflowExecution where+ type Sv SignalWorkflowExecution = SWF+ type Rs SignalWorkflowExecution = SignalWorkflowExecutionResponse++ request = post "SignalWorkflowExecution"+ response = nullResponse SignalWorkflowExecutionResponse
+ gen/Network/AWS/SWF/StartWorkflowExecution.hs view
@@ -0,0 +1,255 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.StartWorkflowExecution+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Starts an execution of the workflow type in the specified domain using the+-- provided workflowId and input data. This action returns the newly started+-- workflow execution. Access Control You can use IAM policies to control this+-- action's access to Amazon SWF resources as follows: Use a Resource element+-- with the domain name to limit the action to only specified domains. Use an+-- Action element to allow or deny permission to call this action. Constrain+-- the following parameters by using a Condition element with the appropriate+-- keys. tagList.member.0: The key is swf:tagList.member.0. tagList.member.1:+-- The key is swf:tagList.member.1. tagList.member.2: The key is+-- swf:tagList.member.2. tagList.member.3: The key is swf:tagList.member.3.+-- tagList.member.4: The key is swf:tagList.member.4. taskList: String+-- constraint. The key is swf:taskList.name. name: String constraint. The key+-- is swf:workflowType.name. version: String constraint. The key is+-- swf:workflowType.version. If the caller does not have sufficient+-- permissions to invoke the action, or the parameter values fall outside the+-- specified constraints, the action fails by throwing OperationNotPermitted.+-- For details and example IAM policies, see Using IAM to Manage Access to+-- Amazon SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_StartWorkflowExecution.html>+module Network.AWS.SWF.StartWorkflowExecution+ (+ -- * Request+ StartWorkflowExecution+ -- ** Request constructor+ , startWorkflowExecution+ -- ** Request lenses+ , swe1ChildPolicy+ , swe1Domain+ , swe1ExecutionStartToCloseTimeout+ , swe1Input+ , swe1TagList+ , swe1TaskList+ , swe1TaskStartToCloseTimeout+ , swe1WorkflowId+ , swe1WorkflowType++ -- * Response+ , StartWorkflowExecutionResponse+ -- ** Response constructor+ , startWorkflowExecutionResponse+ -- ** Response lenses+ , swerRunId+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data StartWorkflowExecution = StartWorkflowExecution+ { _swe1ChildPolicy :: Maybe Text+ , _swe1Domain :: Text+ , _swe1ExecutionStartToCloseTimeout :: Maybe Text+ , _swe1Input :: Maybe Text+ , _swe1TagList :: List "tagList" Text+ , _swe1TaskList :: Maybe TaskList+ , _swe1TaskStartToCloseTimeout :: Maybe Text+ , _swe1WorkflowId :: Text+ , _swe1WorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'StartWorkflowExecution' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'swe1ChildPolicy' @::@ 'Maybe' 'Text'+--+-- * 'swe1Domain' @::@ 'Text'+--+-- * 'swe1ExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'swe1Input' @::@ 'Maybe' 'Text'+--+-- * 'swe1TagList' @::@ ['Text']+--+-- * 'swe1TaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'swe1TaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'swe1WorkflowId' @::@ 'Text'+--+-- * 'swe1WorkflowType' @::@ 'WorkflowType'+--+startWorkflowExecution :: Text -- ^ 'swe1Domain'+ -> Text -- ^ 'swe1WorkflowId'+ -> WorkflowType -- ^ 'swe1WorkflowType'+ -> StartWorkflowExecution+startWorkflowExecution p1 p2 p3 = StartWorkflowExecution+ { _swe1Domain = p1+ , _swe1WorkflowId = p2+ , _swe1WorkflowType = p3+ , _swe1TaskList = Nothing+ , _swe1Input = Nothing+ , _swe1ExecutionStartToCloseTimeout = Nothing+ , _swe1TagList = mempty+ , _swe1TaskStartToCloseTimeout = Nothing+ , _swe1ChildPolicy = Nothing+ }++-- | If set, specifies the policy to use for the child workflow executions of+-- this workflow execution if it is terminated, by calling the+-- TerminateWorkflowExecution action explicitly or due to an expired+-- timeout. This policy overrides the default child policy specified when+-- registering the workflow type using RegisterWorkflowType. The supported+-- child policies are: TERMINATE: the child executions will be terminated.+-- REQUEST_CANCEL: a request to cancel will be attempted for each child+-- execution by recording a WorkflowExecutionCancelRequested event in its+-- history. It is up to the decider to take appropriate actions when it+-- receives an execution history with this event. ABANDON: no action will be+-- taken. The child executions will continue to run.+swe1ChildPolicy :: Lens' StartWorkflowExecution (Maybe Text)+swe1ChildPolicy = lens _swe1ChildPolicy (\s a -> s { _swe1ChildPolicy = a })++-- | The name of the domain in which the workflow execution is created.+swe1Domain :: Lens' StartWorkflowExecution Text+swe1Domain = lens _swe1Domain (\s a -> s { _swe1Domain = a })++-- | The total duration for this workflow execution. This overrides the+-- defaultExecutionStartToCloseTimeout specified when registering the+-- workflow type. The duration is specified in seconds. The valid values are+-- integers greater than or equal to 0. Exceeding this limit will cause the+-- workflow execution to time out. Unlike some of the other timeout+-- parameters in Amazon SWF, you cannot specify a value of "NONE" for this+-- timeout; there is a one-year max limit on the time that a workflow+-- execution can run.+swe1ExecutionStartToCloseTimeout :: Lens' StartWorkflowExecution (Maybe Text)+swe1ExecutionStartToCloseTimeout =+ lens _swe1ExecutionStartToCloseTimeout+ (\s a -> s { _swe1ExecutionStartToCloseTimeout = a })++-- | The input for the workflow execution. This is a free form string which+-- should be meaningful to the workflow you are starting. This input is made+-- available to the new workflow execution in the WorkflowExecutionStarted+-- history event.+swe1Input :: Lens' StartWorkflowExecution (Maybe Text)+swe1Input = lens _swe1Input (\s a -> s { _swe1Input = a })++-- | The list of tags to associate with the workflow execution. You can+-- specify a maximum of 5 tags. You can list workflow executions with a+-- specific tag by calling ListOpenWorkflowExecutions or+-- ListClosedWorkflowExecutions and specifying a TagFilter.+swe1TagList :: Lens' StartWorkflowExecution [Text]+swe1TagList = lens _swe1TagList (\s a -> s { _swe1TagList = a }) . _List++-- | The task list to use for the decision tasks generated for this workflow+-- execution. This overrides the defaultTaskList specified when registering+-- the workflow type. The specified string must not start or end with+-- whitespace. It must not contain a : (colon), / (slash), | (vertical bar),+-- or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it+-- must not contain the literal string "arn".+swe1TaskList :: Lens' StartWorkflowExecution (Maybe TaskList)+swe1TaskList = lens _swe1TaskList (\s a -> s { _swe1TaskList = a })++-- | Specifies the maximum duration of decision tasks for this workflow+-- execution. This parameter overrides the defaultTaskStartToCloseTimout+-- specified when registering the workflow type using RegisterWorkflowType.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+swe1TaskStartToCloseTimeout :: Lens' StartWorkflowExecution (Maybe Text)+swe1TaskStartToCloseTimeout =+ lens _swe1TaskStartToCloseTimeout+ (\s a -> s { _swe1TaskStartToCloseTimeout = a })++-- | The user defined identifier associated with the workflow execution. You+-- can use this to associate a custom identifier with the workflow+-- execution. You may specify the same identifier if a workflow execution is+-- logically a restart of a previous execution. You cannot have two open+-- workflow executions with the same workflowId at the same time. The+-- specified string must not start or end with whitespace. It must not+-- contain a : (colon), / (slash), | (vertical bar), or any control+-- characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain+-- the literal string "arn".+swe1WorkflowId :: Lens' StartWorkflowExecution Text+swe1WorkflowId = lens _swe1WorkflowId (\s a -> s { _swe1WorkflowId = a })++-- | The type of the workflow to start.+swe1WorkflowType :: Lens' StartWorkflowExecution WorkflowType+swe1WorkflowType = lens _swe1WorkflowType (\s a -> s { _swe1WorkflowType = a })++newtype StartWorkflowExecutionResponse = StartWorkflowExecutionResponse+ { _swerRunId :: Maybe Text+ } deriving (Eq, Ord, Show, Monoid)++-- | 'StartWorkflowExecutionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'swerRunId' @::@ 'Maybe' 'Text'+--+startWorkflowExecutionResponse :: StartWorkflowExecutionResponse+startWorkflowExecutionResponse = StartWorkflowExecutionResponse+ { _swerRunId = Nothing+ }++-- | The runId of a workflow execution. This Id is generated by the service+-- and can be used to uniquely identify the workflow execution within a+-- domain.+swerRunId :: Lens' StartWorkflowExecutionResponse (Maybe Text)+swerRunId = lens _swerRunId (\s a -> s { _swerRunId = a })++instance ToPath StartWorkflowExecution where+ toPath = const "/"++instance ToQuery StartWorkflowExecution where+ toQuery = const mempty++instance ToHeaders StartWorkflowExecution++instance ToJSON StartWorkflowExecution where+ toJSON StartWorkflowExecution{..} = object+ [ "domain" .= _swe1Domain+ , "workflowId" .= _swe1WorkflowId+ , "workflowType" .= _swe1WorkflowType+ , "taskList" .= _swe1TaskList+ , "input" .= _swe1Input+ , "executionStartToCloseTimeout" .= _swe1ExecutionStartToCloseTimeout+ , "tagList" .= _swe1TagList+ , "taskStartToCloseTimeout" .= _swe1TaskStartToCloseTimeout+ , "childPolicy" .= _swe1ChildPolicy+ ]++instance AWSRequest StartWorkflowExecution where+ type Sv StartWorkflowExecution = SWF+ type Rs StartWorkflowExecution = StartWorkflowExecutionResponse++ request = post "StartWorkflowExecution"+ response = jsonResponse++instance FromJSON StartWorkflowExecutionResponse where+ parseJSON = withObject "StartWorkflowExecutionResponse" $ \o -> StartWorkflowExecutionResponse+ <$> o .:? "runId"
+ gen/Network/AWS/SWF/TerminateWorkflowExecution.hs view
@@ -0,0 +1,165 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.TerminateWorkflowExecution+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Records a WorkflowExecutionTerminated event and forces closure of the+-- workflow execution identified by the given domain, runId, and workflowId.+-- The child policy, registered with the workflow type or specified when+-- starting this execution, is applied to any open child workflow executions+-- of this workflow execution. If the identified workflow execution was in+-- progress, it is terminated immediately. Access Control You can use IAM+-- policies to control this action's access to Amazon SWF resources as+-- follows: Use a Resource element with the domain name to limit the action to+-- only specified domains. Use an Action element to allow or deny permission+-- to call this action. You cannot use an IAM policy to constrain this+-- action's parameters. If the caller does not have sufficient permissions to+-- invoke the action, or the parameter values fall outside the specified+-- constraints, the action fails by throwing OperationNotPermitted. For+-- details and example IAM policies, see Using IAM to Manage Access to Amazon+-- SWF Workflows.+--+-- <http://docs.aws.amazon.com/amazonswf/latest/apireference/API_TerminateWorkflowExecution.html>+module Network.AWS.SWF.TerminateWorkflowExecution+ (+ -- * Request+ TerminateWorkflowExecution+ -- ** Request constructor+ , terminateWorkflowExecution+ -- ** Request lenses+ , tweChildPolicy+ , tweDetails+ , tweDomain+ , tweReason+ , tweRunId+ , tweWorkflowId++ -- * Response+ , TerminateWorkflowExecutionResponse+ -- ** Response constructor+ , terminateWorkflowExecutionResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SWF.Types+import qualified GHC.Exts++data TerminateWorkflowExecution = TerminateWorkflowExecution+ { _tweChildPolicy :: Maybe Text+ , _tweDetails :: Maybe Text+ , _tweDomain :: Text+ , _tweReason :: Maybe Text+ , _tweRunId :: Maybe Text+ , _tweWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'TerminateWorkflowExecution' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tweChildPolicy' @::@ 'Maybe' 'Text'+--+-- * 'tweDetails' @::@ 'Maybe' 'Text'+--+-- * 'tweDomain' @::@ 'Text'+--+-- * 'tweReason' @::@ 'Maybe' 'Text'+--+-- * 'tweRunId' @::@ 'Maybe' 'Text'+--+-- * 'tweWorkflowId' @::@ 'Text'+--+terminateWorkflowExecution :: Text -- ^ 'tweDomain'+ -> Text -- ^ 'tweWorkflowId'+ -> TerminateWorkflowExecution+terminateWorkflowExecution p1 p2 = TerminateWorkflowExecution+ { _tweDomain = p1+ , _tweWorkflowId = p2+ , _tweRunId = Nothing+ , _tweReason = Nothing+ , _tweDetails = Nothing+ , _tweChildPolicy = Nothing+ }++-- | If set, specifies the policy to use for the child workflow executions of+-- the workflow execution being terminated. This policy overrides the child+-- policy specified for the workflow execution at registration time or when+-- starting the execution. The supported child policies are: TERMINATE: the+-- child executions will be terminated. REQUEST_CANCEL: a request to cancel+-- will be attempted for each child execution by recording a+-- WorkflowExecutionCancelRequested event in its history. It is up to the+-- decider to take appropriate actions when it receives an execution history+-- with this event. ABANDON: no action will be taken. The child executions+-- will continue to run.+tweChildPolicy :: Lens' TerminateWorkflowExecution (Maybe Text)+tweChildPolicy = lens _tweChildPolicy (\s a -> s { _tweChildPolicy = a })++-- | Optional details for terminating the workflow execution.+tweDetails :: Lens' TerminateWorkflowExecution (Maybe Text)+tweDetails = lens _tweDetails (\s a -> s { _tweDetails = a })++-- | The domain of the workflow execution to terminate.+tweDomain :: Lens' TerminateWorkflowExecution Text+tweDomain = lens _tweDomain (\s a -> s { _tweDomain = a })++-- | An optional descriptive reason for terminating the workflow execution.+tweReason :: Lens' TerminateWorkflowExecution (Maybe Text)+tweReason = lens _tweReason (\s a -> s { _tweReason = a })++-- | The runId of the workflow execution to terminate.+tweRunId :: Lens' TerminateWorkflowExecution (Maybe Text)+tweRunId = lens _tweRunId (\s a -> s { _tweRunId = a })++-- | The workflowId of the workflow execution to terminate.+tweWorkflowId :: Lens' TerminateWorkflowExecution Text+tweWorkflowId = lens _tweWorkflowId (\s a -> s { _tweWorkflowId = a })++data TerminateWorkflowExecutionResponse = TerminateWorkflowExecutionResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'TerminateWorkflowExecutionResponse' constructor.+terminateWorkflowExecutionResponse :: TerminateWorkflowExecutionResponse+terminateWorkflowExecutionResponse = TerminateWorkflowExecutionResponse++instance ToPath TerminateWorkflowExecution where+ toPath = const "/"++instance ToQuery TerminateWorkflowExecution where+ toQuery = const mempty++instance ToHeaders TerminateWorkflowExecution++instance ToJSON TerminateWorkflowExecution where+ toJSON TerminateWorkflowExecution{..} = object+ [ "domain" .= _tweDomain+ , "workflowId" .= _tweWorkflowId+ , "runId" .= _tweRunId+ , "reason" .= _tweReason+ , "details" .= _tweDetails+ , "childPolicy" .= _tweChildPolicy+ ]++instance AWSRequest TerminateWorkflowExecution where+ type Sv TerminateWorkflowExecution = SWF+ type Rs TerminateWorkflowExecution = TerminateWorkflowExecutionResponse++ request = post "TerminateWorkflowExecution"+ response = nullResponse TerminateWorkflowExecutionResponse
+ gen/Network/AWS/SWF/Types.hs view
@@ -0,0 +1,7661 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SWF.Types+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Network.AWS.SWF.Types+ (+ -- * Service+ SWF+ -- ** Error+ , JSONError++ -- * WorkflowExecutionCancelRequestedEventAttributes+ , WorkflowExecutionCancelRequestedEventAttributes+ , workflowExecutionCancelRequestedEventAttributes+ , wecreaCause+ , wecreaExternalInitiatedEventId+ , wecreaExternalWorkflowExecution++ -- * RequestCancelExternalWorkflowExecutionDecisionAttributes+ , RequestCancelExternalWorkflowExecutionDecisionAttributes+ , requestCancelExternalWorkflowExecutionDecisionAttributes+ , rcewedaControl+ , rcewedaRunId+ , rcewedaWorkflowId++ -- * DecisionTaskScheduledEventAttributes+ , DecisionTaskScheduledEventAttributes+ , decisionTaskScheduledEventAttributes+ , dtseaStartToCloseTimeout+ , dtseaTaskList++ -- * WorkflowExecutionCompletedEventAttributes+ , WorkflowExecutionCompletedEventAttributes+ , workflowExecutionCompletedEventAttributes+ , weceaDecisionTaskCompletedEventId+ , weceaResult++ -- * ExecutionTimeFilter+ , ExecutionTimeFilter+ , executionTimeFilter+ , etfLatestDate+ , etfOldestDate++ -- * StartTimerFailedEventAttributes+ , StartTimerFailedEventAttributes+ , startTimerFailedEventAttributes+ , stfeaCause+ , stfeaDecisionTaskCompletedEventId+ , stfeaTimerId++ -- * RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ , RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ , requestCancelExternalWorkflowExecutionInitiatedEventAttributes+ , rceweieaControl+ , rceweieaDecisionTaskCompletedEventId+ , rceweieaRunId+ , rceweieaWorkflowId++ -- * RecordMarkerFailedEventAttributes+ , RecordMarkerFailedEventAttributes+ , recordMarkerFailedEventAttributes+ , rmfeaCause+ , rmfeaDecisionTaskCompletedEventId+ , rmfeaMarkerName++ -- * WorkflowExecutionCount+ , WorkflowExecutionCount+ , workflowExecutionCount+ , wecCount+ , wecTruncated++ -- * ActivityTaskScheduledEventAttributes+ , ActivityTaskScheduledEventAttributes+ , activityTaskScheduledEventAttributes+ , atseaActivityId+ , atseaActivityType+ , atseaControl+ , atseaDecisionTaskCompletedEventId+ , atseaHeartbeatTimeout+ , atseaInput+ , atseaScheduleToCloseTimeout+ , atseaScheduleToStartTimeout+ , atseaStartToCloseTimeout+ , atseaTaskList++ -- * CloseStatusFilter+ , CloseStatusFilter+ , closeStatusFilter+ , csfStatus++ -- * WorkflowExecutionTimeoutType+ , WorkflowExecutionTimeoutType (..)++ -- * ScheduleActivityTaskDecisionAttributes+ , ScheduleActivityTaskDecisionAttributes+ , scheduleActivityTaskDecisionAttributes+ , satdaActivityId+ , satdaActivityType+ , satdaControl+ , satdaHeartbeatTimeout+ , satdaInput+ , satdaScheduleToCloseTimeout+ , satdaScheduleToStartTimeout+ , satdaStartToCloseTimeout+ , satdaTaskList++ -- * ActivityTypeConfiguration+ , ActivityTypeConfiguration+ , activityTypeConfiguration+ , atcDefaultTaskHeartbeatTimeout+ , atcDefaultTaskList+ , atcDefaultTaskScheduleToCloseTimeout+ , atcDefaultTaskScheduleToStartTimeout+ , atcDefaultTaskStartToCloseTimeout++ -- * ActivityType+ , ActivityType+ , activityType+ , atName+ , atVersion++ -- * WorkflowTypeInfo+ , WorkflowTypeInfo+ , workflowTypeInfo+ , wtiCreationDate+ , wtiDeprecationDate+ , wtiDescription+ , wtiStatus+ , wtiWorkflowType++ -- * ChildWorkflowExecutionCompletedEventAttributes+ , ChildWorkflowExecutionCompletedEventAttributes+ , childWorkflowExecutionCompletedEventAttributes+ , cweceaInitiatedEventId+ , cweceaResult+ , cweceaStartedEventId+ , cweceaWorkflowExecution+ , cweceaWorkflowType++ -- * WorkflowExecutionOpenCounts+ , WorkflowExecutionOpenCounts+ , workflowExecutionOpenCounts+ , weocOpenActivityTasks+ , weocOpenChildWorkflowExecutions+ , weocOpenDecisionTasks+ , weocOpenTimers++ -- * RequestCancelActivityTaskFailedCause+ , RequestCancelActivityTaskFailedCause (..)++ -- * ScheduleActivityTaskFailedEventAttributes+ , ScheduleActivityTaskFailedEventAttributes+ , scheduleActivityTaskFailedEventAttributes+ , satfeaActivityId+ , satfeaActivityType+ , satfeaCause+ , satfeaDecisionTaskCompletedEventId++ -- * MarkerRecordedEventAttributes+ , MarkerRecordedEventAttributes+ , markerRecordedEventAttributes+ , mreaDecisionTaskCompletedEventId+ , mreaDetails+ , mreaMarkerName++ -- * SignalExternalWorkflowExecutionDecisionAttributes+ , SignalExternalWorkflowExecutionDecisionAttributes+ , signalExternalWorkflowExecutionDecisionAttributes+ , sewedaControl+ , sewedaInput+ , sewedaRunId+ , sewedaSignalName+ , sewedaWorkflowId++ -- * WorkflowExecutionTerminatedCause+ , WorkflowExecutionTerminatedCause (..)++ -- * CancelWorkflowExecutionFailedCause+ , CancelWorkflowExecutionFailedCause (..)++ -- * SignalExternalWorkflowExecutionFailedCause+ , SignalExternalWorkflowExecutionFailedCause (..)++ -- * RecordMarkerDecisionAttributes+ , RecordMarkerDecisionAttributes+ , recordMarkerDecisionAttributes+ , rmdaDetails+ , rmdaMarkerName++ -- * CompleteWorkflowExecutionFailedEventAttributes+ , CompleteWorkflowExecutionFailedEventAttributes+ , completeWorkflowExecutionFailedEventAttributes+ , cwefeaCause+ , cwefeaDecisionTaskCompletedEventId++ -- * StartTimerDecisionAttributes+ , StartTimerDecisionAttributes+ , startTimerDecisionAttributes+ , stdaControl+ , stdaStartToFireTimeout+ , stdaTimerId++ -- * DecisionType+ , DecisionType (..)++ -- * RequestCancelExternalWorkflowExecutionFailedEventAttributes+ , RequestCancelExternalWorkflowExecutionFailedEventAttributes+ , requestCancelExternalWorkflowExecutionFailedEventAttributes+ , rcewefeaCause+ , rcewefeaControl+ , rcewefeaDecisionTaskCompletedEventId+ , rcewefeaInitiatedEventId+ , rcewefeaRunId+ , rcewefeaWorkflowId++ -- * ActivityTypeInfo+ , ActivityTypeInfo+ , activityTypeInfo+ , atiActivityType+ , atiCreationDate+ , atiDeprecationDate+ , atiDescription+ , atiStatus++ -- * TimerCanceledEventAttributes+ , TimerCanceledEventAttributes+ , timerCanceledEventAttributes+ , tceaDecisionTaskCompletedEventId+ , tceaStartedEventId+ , tceaTimerId++ -- * WorkflowExecutionStartedEventAttributes+ , WorkflowExecutionStartedEventAttributes+ , workflowExecutionStartedEventAttributes+ , weseaChildPolicy+ , weseaContinuedExecutionRunId+ , weseaExecutionStartToCloseTimeout+ , weseaInput+ , weseaParentInitiatedEventId+ , weseaParentWorkflowExecution+ , weseaTagList+ , weseaTaskList+ , weseaTaskStartToCloseTimeout+ , weseaWorkflowType++ -- * WorkflowTypeConfiguration+ , WorkflowTypeConfiguration+ , workflowTypeConfiguration+ , wtcDefaultChildPolicy+ , wtcDefaultExecutionStartToCloseTimeout+ , wtcDefaultTaskList+ , wtcDefaultTaskStartToCloseTimeout++ -- * ActivityTaskTimeoutType+ , ActivityTaskTimeoutType (..)++ -- * WorkflowType+ , WorkflowType+ , workflowType+ , wtName+ , wtVersion++ -- * ActivityTaskCompletedEventAttributes+ , ActivityTaskCompletedEventAttributes+ , activityTaskCompletedEventAttributes+ , atceaResult+ , atceaScheduledEventId+ , atceaStartedEventId++ -- * ExecutionStatus+ , ExecutionStatus (..)++ -- * DecisionTaskTimeoutType+ , DecisionTaskTimeoutType (..)++ -- * WorkflowExecutionCancelRequestedCause+ , WorkflowExecutionCancelRequestedCause (..)++ -- * StartChildWorkflowExecutionFailedCause+ , StartChildWorkflowExecutionFailedCause (..)++ -- * DecisionTaskTimedOutEventAttributes+ , DecisionTaskTimedOutEventAttributes+ , decisionTaskTimedOutEventAttributes+ , dttoeaScheduledEventId+ , dttoeaStartedEventId+ , dttoeaTimeoutType++ -- * ChildWorkflowExecutionStartedEventAttributes+ , ChildWorkflowExecutionStartedEventAttributes+ , childWorkflowExecutionStartedEventAttributes+ , cweseaInitiatedEventId+ , cweseaWorkflowExecution+ , cweseaWorkflowType++ -- * CancelTimerFailedEventAttributes+ , CancelTimerFailedEventAttributes+ , cancelTimerFailedEventAttributes+ , ctfeaCause+ , ctfeaDecisionTaskCompletedEventId+ , ctfeaTimerId++ -- * FailWorkflowExecutionFailedCause+ , FailWorkflowExecutionFailedCause (..)++ -- * WorkflowExecutionFilter+ , WorkflowExecutionFilter+ , workflowExecutionFilter+ , wefWorkflowId++ -- * ActivityTaskCanceledEventAttributes+ , ActivityTaskCanceledEventAttributes+ , activityTaskCanceledEventAttributes+ , atcea1Details+ , atcea1LatestCancelRequestedEventId+ , atcea1ScheduledEventId+ , atcea1StartedEventId++ -- * WorkflowExecutionInfos+ , WorkflowExecutionInfos+ , workflowExecutionInfos+ , weiExecutionInfos+ , weiNextPageToken++ -- * StartChildWorkflowExecutionDecisionAttributes+ , StartChildWorkflowExecutionDecisionAttributes+ , startChildWorkflowExecutionDecisionAttributes+ , scwedaChildPolicy+ , scwedaControl+ , scwedaExecutionStartToCloseTimeout+ , scwedaInput+ , scwedaTagList+ , scwedaTaskList+ , scwedaTaskStartToCloseTimeout+ , scwedaWorkflowId+ , scwedaWorkflowType++ -- * ContinueAsNewWorkflowExecutionFailedCause+ , ContinueAsNewWorkflowExecutionFailedCause (..)++ -- * FailWorkflowExecutionDecisionAttributes+ , FailWorkflowExecutionDecisionAttributes+ , failWorkflowExecutionDecisionAttributes+ , fwedaDetails+ , fwedaReason++ -- * EventType+ , EventType (..)++ -- * ActivityTaskTimedOutEventAttributes+ , ActivityTaskTimedOutEventAttributes+ , activityTaskTimedOutEventAttributes+ , attoeaDetails+ , attoeaScheduledEventId+ , attoeaStartedEventId+ , attoeaTimeoutType++ -- * RequestCancelActivityTaskFailedEventAttributes+ , RequestCancelActivityTaskFailedEventAttributes+ , requestCancelActivityTaskFailedEventAttributes+ , rcatfeaActivityId+ , rcatfeaCause+ , rcatfeaDecisionTaskCompletedEventId++ -- * CompleteWorkflowExecutionDecisionAttributes+ , CompleteWorkflowExecutionDecisionAttributes+ , completeWorkflowExecutionDecisionAttributes+ , cwedaResult++ -- * DecisionTaskStartedEventAttributes+ , DecisionTaskStartedEventAttributes+ , decisionTaskStartedEventAttributes+ , dtseaIdentity+ , dtseaScheduledEventId++ -- * ChildWorkflowExecutionTimedOutEventAttributes+ , ChildWorkflowExecutionTimedOutEventAttributes+ , childWorkflowExecutionTimedOutEventAttributes+ , cwetoeaInitiatedEventId+ , cwetoeaStartedEventId+ , cwetoeaTimeoutType+ , cwetoeaWorkflowExecution+ , cwetoeaWorkflowType++ -- * StartChildWorkflowExecutionInitiatedEventAttributes+ , StartChildWorkflowExecutionInitiatedEventAttributes+ , startChildWorkflowExecutionInitiatedEventAttributes+ , scweieaChildPolicy+ , scweieaControl+ , scweieaDecisionTaskCompletedEventId+ , scweieaExecutionStartToCloseTimeout+ , scweieaInput+ , scweieaTagList+ , scweieaTaskList+ , scweieaTaskStartToCloseTimeout+ , scweieaWorkflowId+ , scweieaWorkflowType++ -- * CancelWorkflowExecutionFailedEventAttributes+ , CancelWorkflowExecutionFailedEventAttributes+ , cancelWorkflowExecutionFailedEventAttributes+ , cwefea1Cause+ , cwefea1DecisionTaskCompletedEventId++ -- * WorkflowExecutionTerminatedEventAttributes+ , WorkflowExecutionTerminatedEventAttributes+ , workflowExecutionTerminatedEventAttributes+ , weteaCause+ , weteaChildPolicy+ , weteaDetails+ , weteaReason++ -- * TaskList+ , TaskList+ , taskList+ , tlName++ -- * ScheduleActivityTaskFailedCause+ , ScheduleActivityTaskFailedCause (..)++ -- * ChildWorkflowExecutionCanceledEventAttributes+ , ChildWorkflowExecutionCanceledEventAttributes+ , childWorkflowExecutionCanceledEventAttributes+ , cwecea1Details+ , cwecea1InitiatedEventId+ , cwecea1StartedEventId+ , cwecea1WorkflowExecution+ , cwecea1WorkflowType++ -- * WorkflowExecutionInfo+ , WorkflowExecutionInfo+ , workflowExecutionInfo+ , weiCancelRequested+ , weiCloseStatus+ , weiCloseTimestamp+ , weiExecution+ , weiExecutionStatus+ , weiParent+ , weiStartTimestamp+ , weiTagList+ , weiWorkflowType++ -- * SignalExternalWorkflowExecutionFailedEventAttributes+ , SignalExternalWorkflowExecutionFailedEventAttributes+ , signalExternalWorkflowExecutionFailedEventAttributes+ , sewefeaCause+ , sewefeaControl+ , sewefeaDecisionTaskCompletedEventId+ , sewefeaInitiatedEventId+ , sewefeaRunId+ , sewefeaWorkflowId++ -- * TagFilter+ , TagFilter+ , tagFilter+ , tfTag++ -- * ChildPolicy+ , ChildPolicy (..)++ -- * ActivityTaskStartedEventAttributes+ , ActivityTaskStartedEventAttributes+ , activityTaskStartedEventAttributes+ , atseaIdentity+ , atseaScheduledEventId++ -- * CloseStatus+ , CloseStatus (..)++ -- * CompleteWorkflowExecutionFailedCause+ , CompleteWorkflowExecutionFailedCause (..)++ -- * StartTimerFailedCause+ , StartTimerFailedCause (..)++ -- * ActivityTaskCancelRequestedEventAttributes+ , ActivityTaskCancelRequestedEventAttributes+ , activityTaskCancelRequestedEventAttributes+ , atcreaActivityId+ , atcreaDecisionTaskCompletedEventId++ -- * WorkflowExecutionTimedOutEventAttributes+ , WorkflowExecutionTimedOutEventAttributes+ , workflowExecutionTimedOutEventAttributes+ , wetoeaChildPolicy+ , wetoeaTimeoutType++ -- * ChildWorkflowExecutionTerminatedEventAttributes+ , ChildWorkflowExecutionTerminatedEventAttributes+ , childWorkflowExecutionTerminatedEventAttributes+ , cweteaInitiatedEventId+ , cweteaStartedEventId+ , cweteaWorkflowExecution+ , cweteaWorkflowType++ -- * WorkflowExecutionCanceledEventAttributes+ , WorkflowExecutionCanceledEventAttributes+ , workflowExecutionCanceledEventAttributes+ , wecea1DecisionTaskCompletedEventId+ , wecea1Details++ -- * WorkflowExecutionSignaledEventAttributes+ , WorkflowExecutionSignaledEventAttributes+ , workflowExecutionSignaledEventAttributes+ , wesea1ExternalInitiatedEventId+ , wesea1ExternalWorkflowExecution+ , wesea1Input+ , wesea1SignalName++ -- * RecordMarkerFailedCause+ , RecordMarkerFailedCause (..)++ -- * RegistrationStatus+ , RegistrationStatus (..)++ -- * TimerStartedEventAttributes+ , TimerStartedEventAttributes+ , timerStartedEventAttributes+ , tseaControl+ , tseaDecisionTaskCompletedEventId+ , tseaStartToFireTimeout+ , tseaTimerId++ -- * RequestCancelActivityTaskDecisionAttributes+ , RequestCancelActivityTaskDecisionAttributes+ , requestCancelActivityTaskDecisionAttributes+ , rcatdaActivityId++ -- * Decision+ , Decision+ , decision+ , dCancelTimerDecisionAttributes+ , dCancelWorkflowExecutionDecisionAttributes+ , dCompleteWorkflowExecutionDecisionAttributes+ , dContinueAsNewWorkflowExecutionDecisionAttributes+ , dDecisionType+ , dFailWorkflowExecutionDecisionAttributes+ , dRecordMarkerDecisionAttributes+ , dRequestCancelActivityTaskDecisionAttributes+ , dRequestCancelExternalWorkflowExecutionDecisionAttributes+ , dScheduleActivityTaskDecisionAttributes+ , dSignalExternalWorkflowExecutionDecisionAttributes+ , dStartChildWorkflowExecutionDecisionAttributes+ , dStartTimerDecisionAttributes++ -- * TimerFiredEventAttributes+ , TimerFiredEventAttributes+ , timerFiredEventAttributes+ , tfeaStartedEventId+ , tfeaTimerId++ -- * DomainConfiguration+ , DomainConfiguration+ , domainConfiguration+ , dcWorkflowExecutionRetentionPeriodInDays++ -- * ExternalWorkflowExecutionSignaledEventAttributes+ , ExternalWorkflowExecutionSignaledEventAttributes+ , externalWorkflowExecutionSignaledEventAttributes+ , eweseaInitiatedEventId+ , eweseaWorkflowExecution++ -- * CancelWorkflowExecutionDecisionAttributes+ , CancelWorkflowExecutionDecisionAttributes+ , cancelWorkflowExecutionDecisionAttributes+ , cwedaDetails++ -- * ActivityTaskFailedEventAttributes+ , ActivityTaskFailedEventAttributes+ , activityTaskFailedEventAttributes+ , atfeaDetails+ , atfeaReason+ , atfeaScheduledEventId+ , atfeaStartedEventId++ -- * FailWorkflowExecutionFailedEventAttributes+ , FailWorkflowExecutionFailedEventAttributes+ , failWorkflowExecutionFailedEventAttributes+ , fwefeaCause+ , fwefeaDecisionTaskCompletedEventId++ -- * StartChildWorkflowExecutionFailedEventAttributes+ , StartChildWorkflowExecutionFailedEventAttributes+ , startChildWorkflowExecutionFailedEventAttributes+ , scwefeaCause+ , scwefeaControl+ , scwefeaDecisionTaskCompletedEventId+ , scwefeaInitiatedEventId+ , scwefeaWorkflowId+ , scwefeaWorkflowType++ -- * WorkflowTypeFilter+ , WorkflowTypeFilter+ , workflowTypeFilter+ , wtfName+ , wtfVersion++ -- * CancelTimerFailedCause+ , CancelTimerFailedCause (..)++ -- * DecisionTaskCompletedEventAttributes+ , DecisionTaskCompletedEventAttributes+ , decisionTaskCompletedEventAttributes+ , dtceaExecutionContext+ , dtceaScheduledEventId+ , dtceaStartedEventId++ -- * ChildWorkflowExecutionFailedEventAttributes+ , ChildWorkflowExecutionFailedEventAttributes+ , childWorkflowExecutionFailedEventAttributes+ , cwefeaDetails+ , cwefeaInitiatedEventId+ , cwefeaReason+ , cwefeaStartedEventId+ , cwefeaWorkflowExecution+ , cwefeaWorkflowType++ -- * DomainInfo+ , DomainInfo+ , domainInfo+ , diDescription+ , diName+ , diStatus++ -- * HistoryEvent+ , HistoryEvent+ , historyEvent+ , heActivityTaskCancelRequestedEventAttributes+ , heActivityTaskCanceledEventAttributes+ , heActivityTaskCompletedEventAttributes+ , heActivityTaskFailedEventAttributes+ , heActivityTaskScheduledEventAttributes+ , heActivityTaskStartedEventAttributes+ , heActivityTaskTimedOutEventAttributes+ , heCancelTimerFailedEventAttributes+ , heCancelWorkflowExecutionFailedEventAttributes+ , heChildWorkflowExecutionCanceledEventAttributes+ , heChildWorkflowExecutionCompletedEventAttributes+ , heChildWorkflowExecutionFailedEventAttributes+ , heChildWorkflowExecutionStartedEventAttributes+ , heChildWorkflowExecutionTerminatedEventAttributes+ , heChildWorkflowExecutionTimedOutEventAttributes+ , heCompleteWorkflowExecutionFailedEventAttributes+ , heContinueAsNewWorkflowExecutionFailedEventAttributes+ , heDecisionTaskCompletedEventAttributes+ , heDecisionTaskScheduledEventAttributes+ , heDecisionTaskStartedEventAttributes+ , heDecisionTaskTimedOutEventAttributes+ , heEventId+ , heEventTimestamp+ , heEventType+ , heExternalWorkflowExecutionCancelRequestedEventAttributes+ , heExternalWorkflowExecutionSignaledEventAttributes+ , heFailWorkflowExecutionFailedEventAttributes+ , heMarkerRecordedEventAttributes+ , heRecordMarkerFailedEventAttributes+ , heRequestCancelActivityTaskFailedEventAttributes+ , heRequestCancelExternalWorkflowExecutionFailedEventAttributes+ , heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ , heScheduleActivityTaskFailedEventAttributes+ , heSignalExternalWorkflowExecutionFailedEventAttributes+ , heSignalExternalWorkflowExecutionInitiatedEventAttributes+ , heStartChildWorkflowExecutionFailedEventAttributes+ , heStartChildWorkflowExecutionInitiatedEventAttributes+ , heStartTimerFailedEventAttributes+ , heTimerCanceledEventAttributes+ , heTimerFiredEventAttributes+ , heTimerStartedEventAttributes+ , heWorkflowExecutionCancelRequestedEventAttributes+ , heWorkflowExecutionCanceledEventAttributes+ , heWorkflowExecutionCompletedEventAttributes+ , heWorkflowExecutionContinuedAsNewEventAttributes+ , heWorkflowExecutionFailedEventAttributes+ , heWorkflowExecutionSignaledEventAttributes+ , heWorkflowExecutionStartedEventAttributes+ , heWorkflowExecutionTerminatedEventAttributes+ , heWorkflowExecutionTimedOutEventAttributes++ -- * ContinueAsNewWorkflowExecutionFailedEventAttributes+ , ContinueAsNewWorkflowExecutionFailedEventAttributes+ , continueAsNewWorkflowExecutionFailedEventAttributes+ , canwefeaCause+ , canwefeaDecisionTaskCompletedEventId++ -- * SignalExternalWorkflowExecutionInitiatedEventAttributes+ , SignalExternalWorkflowExecutionInitiatedEventAttributes+ , signalExternalWorkflowExecutionInitiatedEventAttributes+ , seweieaControl+ , seweieaDecisionTaskCompletedEventId+ , seweieaInput+ , seweieaRunId+ , seweieaSignalName+ , seweieaWorkflowId++ -- * CancelTimerDecisionAttributes+ , CancelTimerDecisionAttributes+ , cancelTimerDecisionAttributes+ , ctdaTimerId++ -- * WorkflowExecutionFailedEventAttributes+ , WorkflowExecutionFailedEventAttributes+ , workflowExecutionFailedEventAttributes+ , wefeaDecisionTaskCompletedEventId+ , wefeaDetails+ , wefeaReason++ -- * WorkflowExecutionConfiguration+ , WorkflowExecutionConfiguration+ , workflowExecutionConfiguration+ , wecChildPolicy+ , wecExecutionStartToCloseTimeout+ , wecTaskList+ , wecTaskStartToCloseTimeout++ -- * WorkflowExecution+ , WorkflowExecution+ , workflowExecution+ , weRunId+ , weWorkflowId++ -- * RequestCancelExternalWorkflowExecutionFailedCause+ , RequestCancelExternalWorkflowExecutionFailedCause (..)++ -- * ContinueAsNewWorkflowExecutionDecisionAttributes+ , ContinueAsNewWorkflowExecutionDecisionAttributes+ , continueAsNewWorkflowExecutionDecisionAttributes+ , canwedaChildPolicy+ , canwedaExecutionStartToCloseTimeout+ , canwedaInput+ , canwedaTagList+ , canwedaTaskList+ , canwedaTaskStartToCloseTimeout+ , canwedaWorkflowTypeVersion++ -- * ExternalWorkflowExecutionCancelRequestedEventAttributes+ , ExternalWorkflowExecutionCancelRequestedEventAttributes+ , externalWorkflowExecutionCancelRequestedEventAttributes+ , ewecreaInitiatedEventId+ , ewecreaWorkflowExecution++ -- * PendingTaskCount+ , PendingTaskCount+ , pendingTaskCount+ , ptcCount+ , ptcTruncated++ -- * WorkflowExecutionContinuedAsNewEventAttributes+ , WorkflowExecutionContinuedAsNewEventAttributes+ , workflowExecutionContinuedAsNewEventAttributes+ , wecaneaChildPolicy+ , wecaneaDecisionTaskCompletedEventId+ , wecaneaExecutionStartToCloseTimeout+ , wecaneaInput+ , wecaneaNewExecutionRunId+ , wecaneaTagList+ , wecaneaTaskList+ , wecaneaTaskStartToCloseTimeout+ , wecaneaWorkflowType+ ) where++import Data.Char (isUpper)+import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V4+import qualified GHC.Exts++-- | Version @2012-01-25@ of the Amazon Simple Workflow Service service.+data SWF++instance AWSService SWF where+ type Sg SWF = V4+ type Er SWF = JSONError++ service = Service+ { _svcEndpoint = regional+ , _svcAbbrev = "SWF"+ , _svcPrefix = "swf"+ , _svcVersion = "2012-01-25"+ , _svcTargetPrefix = Just "SimpleWorkflowService"+ , _svcJSONVersion = Just "1.0"+ }++ handle = jsonError statusSuccess++data WorkflowExecutionCancelRequestedEventAttributes = WorkflowExecutionCancelRequestedEventAttributes+ { _wecreaCause :: Maybe Text+ , _wecreaExternalInitiatedEventId :: Maybe Integer+ , _wecreaExternalWorkflowExecution :: Maybe WorkflowExecution+ } deriving (Eq, Show)++-- | 'WorkflowExecutionCancelRequestedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wecreaCause' @::@ 'Maybe' 'Text'+--+-- * 'wecreaExternalInitiatedEventId' @::@ 'Maybe' 'Integer'+--+-- * 'wecreaExternalWorkflowExecution' @::@ 'Maybe' 'WorkflowExecution'+--+workflowExecutionCancelRequestedEventAttributes :: WorkflowExecutionCancelRequestedEventAttributes+workflowExecutionCancelRequestedEventAttributes = WorkflowExecutionCancelRequestedEventAttributes+ { _wecreaExternalWorkflowExecution = Nothing+ , _wecreaExternalInitiatedEventId = Nothing+ , _wecreaCause = Nothing+ }++-- | If set, indicates that the request to cancel the workflow execution was+-- automatically generated, and specifies the cause. This happens if the+-- parent workflow execution times out or is terminated, and the child+-- policy is set to cancel child executions.+wecreaCause :: Lens' WorkflowExecutionCancelRequestedEventAttributes (Maybe Text)+wecreaCause = lens _wecreaCause (\s a -> s { _wecreaCause = a })++-- | The id of the RequestCancelExternalWorkflowExecutionInitiated event+-- corresponding to the RequestCancelExternalWorkflowExecution decision to+-- cancel this workflow execution.The source event with this Id can be found+-- in the history of the source workflow execution. This information can be+-- useful for diagnosing problems by tracing back the chain of events+-- leading up to this event.+wecreaExternalInitiatedEventId :: Lens' WorkflowExecutionCancelRequestedEventAttributes (Maybe Integer)+wecreaExternalInitiatedEventId =+ lens _wecreaExternalInitiatedEventId+ (\s a -> s { _wecreaExternalInitiatedEventId = a })++-- | The external workflow execution for which the cancellation was requested.+wecreaExternalWorkflowExecution :: Lens' WorkflowExecutionCancelRequestedEventAttributes (Maybe WorkflowExecution)+wecreaExternalWorkflowExecution =+ lens _wecreaExternalWorkflowExecution+ (\s a -> s { _wecreaExternalWorkflowExecution = a })++instance FromJSON WorkflowExecutionCancelRequestedEventAttributes where+ parseJSON = withObject "WorkflowExecutionCancelRequestedEventAttributes" $ \o -> WorkflowExecutionCancelRequestedEventAttributes+ <$> o .:? "cause"+ <*> o .:? "externalInitiatedEventId"+ <*> o .:? "externalWorkflowExecution"++instance ToJSON WorkflowExecutionCancelRequestedEventAttributes where+ toJSON WorkflowExecutionCancelRequestedEventAttributes{..} = object+ [ "externalWorkflowExecution" .= _wecreaExternalWorkflowExecution+ , "externalInitiatedEventId" .= _wecreaExternalInitiatedEventId+ , "cause" .= _wecreaCause+ ]++data RequestCancelExternalWorkflowExecutionDecisionAttributes = RequestCancelExternalWorkflowExecutionDecisionAttributes+ { _rcewedaControl :: Maybe Text+ , _rcewedaRunId :: Maybe Text+ , _rcewedaWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'RequestCancelExternalWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rcewedaControl' @::@ 'Maybe' 'Text'+--+-- * 'rcewedaRunId' @::@ 'Maybe' 'Text'+--+-- * 'rcewedaWorkflowId' @::@ 'Text'+--+requestCancelExternalWorkflowExecutionDecisionAttributes :: Text -- ^ 'rcewedaWorkflowId'+ -> RequestCancelExternalWorkflowExecutionDecisionAttributes+requestCancelExternalWorkflowExecutionDecisionAttributes p1 = RequestCancelExternalWorkflowExecutionDecisionAttributes+ { _rcewedaWorkflowId = p1+ , _rcewedaRunId = Nothing+ , _rcewedaControl = Nothing+ }++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks.+rcewedaControl :: Lens' RequestCancelExternalWorkflowExecutionDecisionAttributes (Maybe Text)+rcewedaControl = lens _rcewedaControl (\s a -> s { _rcewedaControl = a })++-- | The runId of the external workflow execution to cancel.+rcewedaRunId :: Lens' RequestCancelExternalWorkflowExecutionDecisionAttributes (Maybe Text)+rcewedaRunId = lens _rcewedaRunId (\s a -> s { _rcewedaRunId = a })++-- | The workflowId of the external workflow execution to cancel. This field+-- is required.+rcewedaWorkflowId :: Lens' RequestCancelExternalWorkflowExecutionDecisionAttributes Text+rcewedaWorkflowId =+ lens _rcewedaWorkflowId (\s a -> s { _rcewedaWorkflowId = a })++instance FromJSON RequestCancelExternalWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "RequestCancelExternalWorkflowExecutionDecisionAttributes" $ \o -> RequestCancelExternalWorkflowExecutionDecisionAttributes+ <$> o .:? "control"+ <*> o .:? "runId"+ <*> o .: "workflowId"++instance ToJSON RequestCancelExternalWorkflowExecutionDecisionAttributes where+ toJSON RequestCancelExternalWorkflowExecutionDecisionAttributes{..} = object+ [ "workflowId" .= _rcewedaWorkflowId+ , "runId" .= _rcewedaRunId+ , "control" .= _rcewedaControl+ ]++data DecisionTaskScheduledEventAttributes = DecisionTaskScheduledEventAttributes+ { _dtseaStartToCloseTimeout :: Maybe Text+ , _dtseaTaskList :: TaskList+ } deriving (Eq, Show)++-- | 'DecisionTaskScheduledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dtseaStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'dtseaTaskList' @::@ 'TaskList'+--+decisionTaskScheduledEventAttributes :: TaskList -- ^ 'dtseaTaskList'+ -> DecisionTaskScheduledEventAttributes+decisionTaskScheduledEventAttributes p1 = DecisionTaskScheduledEventAttributes+ { _dtseaTaskList = p1+ , _dtseaStartToCloseTimeout = Nothing+ }++-- | The maximum duration for this decision task. The task is considered timed+-- out if it does not completed within this duration. The valid values are+-- integers greater than or equal to 0. An integer value can be used to+-- specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+dtseaStartToCloseTimeout :: Lens' DecisionTaskScheduledEventAttributes (Maybe Text)+dtseaStartToCloseTimeout =+ lens _dtseaStartToCloseTimeout+ (\s a -> s { _dtseaStartToCloseTimeout = a })++-- | The name of the task list in which the decision task was scheduled.+dtseaTaskList :: Lens' DecisionTaskScheduledEventAttributes TaskList+dtseaTaskList = lens _dtseaTaskList (\s a -> s { _dtseaTaskList = a })++instance FromJSON DecisionTaskScheduledEventAttributes where+ parseJSON = withObject "DecisionTaskScheduledEventAttributes" $ \o -> DecisionTaskScheduledEventAttributes+ <$> o .:? "startToCloseTimeout"+ <*> o .: "taskList"++instance ToJSON DecisionTaskScheduledEventAttributes where+ toJSON DecisionTaskScheduledEventAttributes{..} = object+ [ "taskList" .= _dtseaTaskList+ , "startToCloseTimeout" .= _dtseaStartToCloseTimeout+ ]++data WorkflowExecutionCompletedEventAttributes = WorkflowExecutionCompletedEventAttributes+ { _weceaDecisionTaskCompletedEventId :: Integer+ , _weceaResult :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionCompletedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weceaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'weceaResult' @::@ 'Maybe' 'Text'+--+workflowExecutionCompletedEventAttributes :: Integer -- ^ 'weceaDecisionTaskCompletedEventId'+ -> WorkflowExecutionCompletedEventAttributes+workflowExecutionCompletedEventAttributes p1 = WorkflowExecutionCompletedEventAttributes+ { _weceaDecisionTaskCompletedEventId = p1+ , _weceaResult = Nothing+ }++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the CompleteWorkflowExecution decision to complete+-- this execution. This information can be useful for diagnosing problems by+-- tracing back the cause of events.+weceaDecisionTaskCompletedEventId :: Lens' WorkflowExecutionCompletedEventAttributes Integer+weceaDecisionTaskCompletedEventId =+ lens _weceaDecisionTaskCompletedEventId+ (\s a -> s { _weceaDecisionTaskCompletedEventId = a })++-- | The result produced by the workflow execution upon successful completion.+weceaResult :: Lens' WorkflowExecutionCompletedEventAttributes (Maybe Text)+weceaResult = lens _weceaResult (\s a -> s { _weceaResult = a })++instance FromJSON WorkflowExecutionCompletedEventAttributes where+ parseJSON = withObject "WorkflowExecutionCompletedEventAttributes" $ \o -> WorkflowExecutionCompletedEventAttributes+ <$> o .: "decisionTaskCompletedEventId"+ <*> o .:? "result"++instance ToJSON WorkflowExecutionCompletedEventAttributes where+ toJSON WorkflowExecutionCompletedEventAttributes{..} = object+ [ "result" .= _weceaResult+ , "decisionTaskCompletedEventId" .= _weceaDecisionTaskCompletedEventId+ ]++data ExecutionTimeFilter = ExecutionTimeFilter+ { _etfLatestDate :: Maybe RFC822+ , _etfOldestDate :: RFC822+ } deriving (Eq, Ord, Show)++-- | 'ExecutionTimeFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'etfLatestDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'etfOldestDate' @::@ 'UTCTime'+--+executionTimeFilter :: UTCTime -- ^ 'etfOldestDate'+ -> ExecutionTimeFilter+executionTimeFilter p1 = ExecutionTimeFilter+ { _etfOldestDate = withIso _Time (const id) p1+ , _etfLatestDate = Nothing+ }++-- | Specifies the latest start or close date and time to return.+etfLatestDate :: Lens' ExecutionTimeFilter (Maybe UTCTime)+etfLatestDate = lens _etfLatestDate (\s a -> s { _etfLatestDate = a }) . mapping _Time++-- | Specifies the oldest start or close date and time to return.+etfOldestDate :: Lens' ExecutionTimeFilter UTCTime+etfOldestDate = lens _etfOldestDate (\s a -> s { _etfOldestDate = a }) . _Time++instance FromJSON ExecutionTimeFilter where+ parseJSON = withObject "ExecutionTimeFilter" $ \o -> ExecutionTimeFilter+ <$> o .:? "latestDate"+ <*> o .: "oldestDate"++instance ToJSON ExecutionTimeFilter where+ toJSON ExecutionTimeFilter{..} = object+ [ "oldestDate" .= _etfOldestDate+ , "latestDate" .= _etfLatestDate+ ]++data StartTimerFailedEventAttributes = StartTimerFailedEventAttributes+ { _stfeaCause :: Text+ , _stfeaDecisionTaskCompletedEventId :: Integer+ , _stfeaTimerId :: Text+ } deriving (Eq, Ord, Show)++-- | 'StartTimerFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'stfeaCause' @::@ 'Text'+--+-- * 'stfeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'stfeaTimerId' @::@ 'Text'+--+startTimerFailedEventAttributes :: Text -- ^ 'stfeaTimerId'+ -> Text -- ^ 'stfeaCause'+ -> Integer -- ^ 'stfeaDecisionTaskCompletedEventId'+ -> StartTimerFailedEventAttributes+startTimerFailedEventAttributes p1 p2 p3 = StartTimerFailedEventAttributes+ { _stfeaTimerId = p1+ , _stfeaCause = p2+ , _stfeaDecisionTaskCompletedEventId = p3+ }++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+stfeaCause :: Lens' StartTimerFailedEventAttributes Text+stfeaCause = lens _stfeaCause (\s a -> s { _stfeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the StartTimer decision for this activity task.+-- This information can be useful for diagnosing problems by tracing back+-- the cause of events.+stfeaDecisionTaskCompletedEventId :: Lens' StartTimerFailedEventAttributes Integer+stfeaDecisionTaskCompletedEventId =+ lens _stfeaDecisionTaskCompletedEventId+ (\s a -> s { _stfeaDecisionTaskCompletedEventId = a })++-- | The timerId provided in the StartTimer decision that failed.+stfeaTimerId :: Lens' StartTimerFailedEventAttributes Text+stfeaTimerId = lens _stfeaTimerId (\s a -> s { _stfeaTimerId = a })++instance FromJSON StartTimerFailedEventAttributes where+ parseJSON = withObject "StartTimerFailedEventAttributes" $ \o -> StartTimerFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "timerId"++instance ToJSON StartTimerFailedEventAttributes where+ toJSON StartTimerFailedEventAttributes{..} = object+ [ "timerId" .= _stfeaTimerId+ , "cause" .= _stfeaCause+ , "decisionTaskCompletedEventId" .= _stfeaDecisionTaskCompletedEventId+ ]++data RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ { _rceweieaControl :: Maybe Text+ , _rceweieaDecisionTaskCompletedEventId :: Integer+ , _rceweieaRunId :: Maybe Text+ , _rceweieaWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'RequestCancelExternalWorkflowExecutionInitiatedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rceweieaControl' @::@ 'Maybe' 'Text'+--+-- * 'rceweieaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'rceweieaRunId' @::@ 'Maybe' 'Text'+--+-- * 'rceweieaWorkflowId' @::@ 'Text'+--+requestCancelExternalWorkflowExecutionInitiatedEventAttributes :: Text -- ^ 'rceweieaWorkflowId'+ -> Integer -- ^ 'rceweieaDecisionTaskCompletedEventId'+ -> RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+requestCancelExternalWorkflowExecutionInitiatedEventAttributes p1 p2 = RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ { _rceweieaWorkflowId = p1+ , _rceweieaDecisionTaskCompletedEventId = p2+ , _rceweieaRunId = Nothing+ , _rceweieaControl = Nothing+ }++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks.+rceweieaControl :: Lens' RequestCancelExternalWorkflowExecutionInitiatedEventAttributes (Maybe Text)+rceweieaControl = lens _rceweieaControl (\s a -> s { _rceweieaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the RequestCancelExternalWorkflowExecution decision+-- for this cancellation request. This information can be useful for+-- diagnosing problems by tracing back the cause of events.+rceweieaDecisionTaskCompletedEventId :: Lens' RequestCancelExternalWorkflowExecutionInitiatedEventAttributes Integer+rceweieaDecisionTaskCompletedEventId =+ lens _rceweieaDecisionTaskCompletedEventId+ (\s a -> s { _rceweieaDecisionTaskCompletedEventId = a })++-- | The runId of the external workflow execution to be canceled.+rceweieaRunId :: Lens' RequestCancelExternalWorkflowExecutionInitiatedEventAttributes (Maybe Text)+rceweieaRunId = lens _rceweieaRunId (\s a -> s { _rceweieaRunId = a })++-- | The workflowId of the external workflow execution to be canceled.+rceweieaWorkflowId :: Lens' RequestCancelExternalWorkflowExecutionInitiatedEventAttributes Text+rceweieaWorkflowId =+ lens _rceweieaWorkflowId (\s a -> s { _rceweieaWorkflowId = a })++instance FromJSON RequestCancelExternalWorkflowExecutionInitiatedEventAttributes where+ parseJSON = withObject "RequestCancelExternalWorkflowExecutionInitiatedEventAttributes" $ \o -> RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ <$> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .:? "runId"+ <*> o .: "workflowId"++instance ToJSON RequestCancelExternalWorkflowExecutionInitiatedEventAttributes where+ toJSON RequestCancelExternalWorkflowExecutionInitiatedEventAttributes{..} = object+ [ "workflowId" .= _rceweieaWorkflowId+ , "runId" .= _rceweieaRunId+ , "decisionTaskCompletedEventId" .= _rceweieaDecisionTaskCompletedEventId+ , "control" .= _rceweieaControl+ ]++data RecordMarkerFailedEventAttributes = RecordMarkerFailedEventAttributes+ { _rmfeaCause :: Text+ , _rmfeaDecisionTaskCompletedEventId :: Integer+ , _rmfeaMarkerName :: Text+ } deriving (Eq, Ord, Show)++-- | 'RecordMarkerFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rmfeaCause' @::@ 'Text'+--+-- * 'rmfeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'rmfeaMarkerName' @::@ 'Text'+--+recordMarkerFailedEventAttributes :: Text -- ^ 'rmfeaMarkerName'+ -> Text -- ^ 'rmfeaCause'+ -> Integer -- ^ 'rmfeaDecisionTaskCompletedEventId'+ -> RecordMarkerFailedEventAttributes+recordMarkerFailedEventAttributes p1 p2 p3 = RecordMarkerFailedEventAttributes+ { _rmfeaMarkerName = p1+ , _rmfeaCause = p2+ , _rmfeaDecisionTaskCompletedEventId = p3+ }++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+rmfeaCause :: Lens' RecordMarkerFailedEventAttributes Text+rmfeaCause = lens _rmfeaCause (\s a -> s { _rmfeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the RecordMarkerFailed decision for this+-- cancellation request. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+rmfeaDecisionTaskCompletedEventId :: Lens' RecordMarkerFailedEventAttributes Integer+rmfeaDecisionTaskCompletedEventId =+ lens _rmfeaDecisionTaskCompletedEventId+ (\s a -> s { _rmfeaDecisionTaskCompletedEventId = a })++-- | The marker's name.+rmfeaMarkerName :: Lens' RecordMarkerFailedEventAttributes Text+rmfeaMarkerName = lens _rmfeaMarkerName (\s a -> s { _rmfeaMarkerName = a })++instance FromJSON RecordMarkerFailedEventAttributes where+ parseJSON = withObject "RecordMarkerFailedEventAttributes" $ \o -> RecordMarkerFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "markerName"++instance ToJSON RecordMarkerFailedEventAttributes where+ toJSON RecordMarkerFailedEventAttributes{..} = object+ [ "markerName" .= _rmfeaMarkerName+ , "cause" .= _rmfeaCause+ , "decisionTaskCompletedEventId" .= _rmfeaDecisionTaskCompletedEventId+ ]++data WorkflowExecutionCount = WorkflowExecutionCount+ { _wecCount :: Nat+ , _wecTruncated :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionCount' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wecCount' @::@ 'Natural'+--+-- * 'wecTruncated' @::@ 'Maybe' 'Bool'+--+workflowExecutionCount :: Natural -- ^ 'wecCount'+ -> WorkflowExecutionCount+workflowExecutionCount p1 = WorkflowExecutionCount+ { _wecCount = withIso _Nat (const id) p1+ , _wecTruncated = Nothing+ }++-- | The number of workflow executions.+wecCount :: Lens' WorkflowExecutionCount Natural+wecCount = lens _wecCount (\s a -> s { _wecCount = a }) . _Nat++-- | If set to true, indicates that the actual count was more than the maximum+-- supported by this API and the count returned is the truncated value.+wecTruncated :: Lens' WorkflowExecutionCount (Maybe Bool)+wecTruncated = lens _wecTruncated (\s a -> s { _wecTruncated = a })++instance FromJSON WorkflowExecutionCount where+ parseJSON = withObject "WorkflowExecutionCount" $ \o -> WorkflowExecutionCount+ <$> o .: "count"+ <*> o .:? "truncated"++instance ToJSON WorkflowExecutionCount where+ toJSON WorkflowExecutionCount{..} = object+ [ "count" .= _wecCount+ , "truncated" .= _wecTruncated+ ]++data ActivityTaskScheduledEventAttributes = ActivityTaskScheduledEventAttributes+ { _atseaActivityId :: Text+ , _atseaActivityType :: ActivityType+ , _atseaControl :: Maybe Text+ , _atseaDecisionTaskCompletedEventId :: Integer+ , _atseaHeartbeatTimeout :: Maybe Text+ , _atseaInput :: Maybe Text+ , _atseaScheduleToCloseTimeout :: Maybe Text+ , _atseaScheduleToStartTimeout :: Maybe Text+ , _atseaStartToCloseTimeout :: Maybe Text+ , _atseaTaskList :: TaskList+ } deriving (Eq, Show)++-- | 'ActivityTaskScheduledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atseaActivityId' @::@ 'Text'+--+-- * 'atseaActivityType' @::@ 'ActivityType'+--+-- * 'atseaControl' @::@ 'Maybe' 'Text'+--+-- * 'atseaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'atseaHeartbeatTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atseaInput' @::@ 'Maybe' 'Text'+--+-- * 'atseaScheduleToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atseaScheduleToStartTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atseaStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atseaTaskList' @::@ 'TaskList'+--+activityTaskScheduledEventAttributes :: ActivityType -- ^ 'atseaActivityType'+ -> Text -- ^ 'atseaActivityId'+ -> TaskList -- ^ 'atseaTaskList'+ -> Integer -- ^ 'atseaDecisionTaskCompletedEventId'+ -> ActivityTaskScheduledEventAttributes+activityTaskScheduledEventAttributes p1 p2 p3 p4 = ActivityTaskScheduledEventAttributes+ { _atseaActivityType = p1+ , _atseaActivityId = p2+ , _atseaTaskList = p3+ , _atseaDecisionTaskCompletedEventId = p4+ , _atseaInput = Nothing+ , _atseaControl = Nothing+ , _atseaScheduleToStartTimeout = Nothing+ , _atseaScheduleToCloseTimeout = Nothing+ , _atseaStartToCloseTimeout = Nothing+ , _atseaHeartbeatTimeout = Nothing+ }++-- | The unique id of the activity task.+atseaActivityId :: Lens' ActivityTaskScheduledEventAttributes Text+atseaActivityId = lens _atseaActivityId (\s a -> s { _atseaActivityId = a })++-- | The type of the activity task.+atseaActivityType :: Lens' ActivityTaskScheduledEventAttributes ActivityType+atseaActivityType =+ lens _atseaActivityType (\s a -> s { _atseaActivityType = a })++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks. This data is not sent to the activity.+atseaControl :: Lens' ActivityTaskScheduledEventAttributes (Maybe Text)+atseaControl = lens _atseaControl (\s a -> s { _atseaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- that resulted in the scheduling of this activity task. This information+-- can be useful for diagnosing problems by tracing back the chain of events+-- leading up to this event.+atseaDecisionTaskCompletedEventId :: Lens' ActivityTaskScheduledEventAttributes Integer+atseaDecisionTaskCompletedEventId =+ lens _atseaDecisionTaskCompletedEventId+ (\s a -> s { _atseaDecisionTaskCompletedEventId = a })++-- | The maximum time before which the worker processing this task must report+-- progress by calling RecordActivityTaskHeartbeat. If the timeout is+-- exceeded, the activity task is automatically timed out. If the worker+-- subsequently attempts to record a heartbeat or return a result, it will+-- be ignored.+atseaHeartbeatTimeout :: Lens' ActivityTaskScheduledEventAttributes (Maybe Text)+atseaHeartbeatTimeout =+ lens _atseaHeartbeatTimeout (\s a -> s { _atseaHeartbeatTimeout = a })++-- | The input provided to the activity task.+atseaInput :: Lens' ActivityTaskScheduledEventAttributes (Maybe Text)+atseaInput = lens _atseaInput (\s a -> s { _atseaInput = a })++-- | The maximum amount of time for this activity task.+atseaScheduleToCloseTimeout :: Lens' ActivityTaskScheduledEventAttributes (Maybe Text)+atseaScheduleToCloseTimeout =+ lens _atseaScheduleToCloseTimeout+ (\s a -> s { _atseaScheduleToCloseTimeout = a })++-- | The maximum amount of time the activity task can wait to be assigned to a+-- worker.+atseaScheduleToStartTimeout :: Lens' ActivityTaskScheduledEventAttributes (Maybe Text)+atseaScheduleToStartTimeout =+ lens _atseaScheduleToStartTimeout+ (\s a -> s { _atseaScheduleToStartTimeout = a })++-- | The maximum amount of time a worker may take to process the activity+-- task.+atseaStartToCloseTimeout :: Lens' ActivityTaskScheduledEventAttributes (Maybe Text)+atseaStartToCloseTimeout =+ lens _atseaStartToCloseTimeout+ (\s a -> s { _atseaStartToCloseTimeout = a })++-- | The task list in which the activity task has been scheduled.+atseaTaskList :: Lens' ActivityTaskScheduledEventAttributes TaskList+atseaTaskList = lens _atseaTaskList (\s a -> s { _atseaTaskList = a })++instance FromJSON ActivityTaskScheduledEventAttributes where+ parseJSON = withObject "ActivityTaskScheduledEventAttributes" $ \o -> ActivityTaskScheduledEventAttributes+ <$> o .: "activityId"+ <*> o .: "activityType"+ <*> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .:? "heartbeatTimeout"+ <*> o .:? "input"+ <*> o .:? "scheduleToCloseTimeout"+ <*> o .:? "scheduleToStartTimeout"+ <*> o .:? "startToCloseTimeout"+ <*> o .: "taskList"++instance ToJSON ActivityTaskScheduledEventAttributes where+ toJSON ActivityTaskScheduledEventAttributes{..} = object+ [ "activityType" .= _atseaActivityType+ , "activityId" .= _atseaActivityId+ , "input" .= _atseaInput+ , "control" .= _atseaControl+ , "scheduleToStartTimeout" .= _atseaScheduleToStartTimeout+ , "scheduleToCloseTimeout" .= _atseaScheduleToCloseTimeout+ , "startToCloseTimeout" .= _atseaStartToCloseTimeout+ , "taskList" .= _atseaTaskList+ , "decisionTaskCompletedEventId" .= _atseaDecisionTaskCompletedEventId+ , "heartbeatTimeout" .= _atseaHeartbeatTimeout+ ]++newtype CloseStatusFilter = CloseStatusFilter+ { _csfStatus :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'CloseStatusFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'csfStatus' @::@ 'Text'+--+closeStatusFilter :: Text -- ^ 'csfStatus'+ -> CloseStatusFilter+closeStatusFilter p1 = CloseStatusFilter+ { _csfStatus = p1+ }++-- | The close status that must match the close status of an execution for it+-- to meet the criteria of this filter. This field is required.+csfStatus :: Lens' CloseStatusFilter Text+csfStatus = lens _csfStatus (\s a -> s { _csfStatus = a })++instance FromJSON CloseStatusFilter where+ parseJSON = withObject "CloseStatusFilter" $ \o -> CloseStatusFilter+ <$> o .: "status"++instance ToJSON CloseStatusFilter where+ toJSON CloseStatusFilter{..} = object+ [ "status" .= _csfStatus+ ]++data WorkflowExecutionTimeoutType+ = StartToClose -- ^ START_TO_CLOSE+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable WorkflowExecutionTimeoutType++instance FromText WorkflowExecutionTimeoutType where+ parser = match "START_TO_CLOSE" StartToClose++instance ToText WorkflowExecutionTimeoutType where+ toText StartToClose = "START_TO_CLOSE"++instance FromJSON WorkflowExecutionTimeoutType where+ parseJSON = parseJSONText "WorkflowExecutionTimeoutType"++instance ToJSON WorkflowExecutionTimeoutType where+ toJSON = toJSONText++data ScheduleActivityTaskDecisionAttributes = ScheduleActivityTaskDecisionAttributes+ { _satdaActivityId :: Text+ , _satdaActivityType :: ActivityType+ , _satdaControl :: Maybe Text+ , _satdaHeartbeatTimeout :: Maybe Text+ , _satdaInput :: Maybe Text+ , _satdaScheduleToCloseTimeout :: Maybe Text+ , _satdaScheduleToStartTimeout :: Maybe Text+ , _satdaStartToCloseTimeout :: Maybe Text+ , _satdaTaskList :: Maybe TaskList+ } deriving (Eq, Show)++-- | 'ScheduleActivityTaskDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'satdaActivityId' @::@ 'Text'+--+-- * 'satdaActivityType' @::@ 'ActivityType'+--+-- * 'satdaControl' @::@ 'Maybe' 'Text'+--+-- * 'satdaHeartbeatTimeout' @::@ 'Maybe' 'Text'+--+-- * 'satdaInput' @::@ 'Maybe' 'Text'+--+-- * 'satdaScheduleToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'satdaScheduleToStartTimeout' @::@ 'Maybe' 'Text'+--+-- * 'satdaStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'satdaTaskList' @::@ 'Maybe' 'TaskList'+--+scheduleActivityTaskDecisionAttributes :: ActivityType -- ^ 'satdaActivityType'+ -> Text -- ^ 'satdaActivityId'+ -> ScheduleActivityTaskDecisionAttributes+scheduleActivityTaskDecisionAttributes p1 p2 = ScheduleActivityTaskDecisionAttributes+ { _satdaActivityType = p1+ , _satdaActivityId = p2+ , _satdaControl = Nothing+ , _satdaInput = Nothing+ , _satdaScheduleToCloseTimeout = Nothing+ , _satdaTaskList = Nothing+ , _satdaScheduleToStartTimeout = Nothing+ , _satdaStartToCloseTimeout = Nothing+ , _satdaHeartbeatTimeout = Nothing+ }++-- | The activityId of the activity task. This field is required. The+-- specified string must not start or end with whitespace. It must not+-- contain a : (colon), / (slash), | (vertical bar), or any control+-- characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain+-- the literal string "arn".+satdaActivityId :: Lens' ScheduleActivityTaskDecisionAttributes Text+satdaActivityId = lens _satdaActivityId (\s a -> s { _satdaActivityId = a })++-- | The type of the activity task to schedule. This field is required.+satdaActivityType :: Lens' ScheduleActivityTaskDecisionAttributes ActivityType+satdaActivityType =+ lens _satdaActivityType (\s a -> s { _satdaActivityType = a })++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks. This data is not sent to the activity.+satdaControl :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)+satdaControl = lens _satdaControl (\s a -> s { _satdaControl = a })++-- | If set, specifies the maximum time before which a worker processing a+-- task of this type must report progress by calling+-- RecordActivityTaskHeartbeat. If the timeout is exceeded, the activity+-- task is automatically timed out. If the worker subsequently attempts to+-- record a heartbeat or returns a result, it will be ignored. This+-- overrides the default heartbeat timeout specified when registering the+-- activity type using RegisterActivityType. The valid values are integers+-- greater than or equal to 0. An integer value can be used to specify the+-- duration in seconds while NONE can be used to specify unlimited duration.+satdaHeartbeatTimeout :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)+satdaHeartbeatTimeout =+ lens _satdaHeartbeatTimeout (\s a -> s { _satdaHeartbeatTimeout = a })++-- | The input provided to the activity task.+satdaInput :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)+satdaInput = lens _satdaInput (\s a -> s { _satdaInput = a })++-- | The maximum duration for this activity task. The valid values are+-- integers greater than or equal to 0. An integer value can be used to+-- specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+satdaScheduleToCloseTimeout :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)+satdaScheduleToCloseTimeout =+ lens _satdaScheduleToCloseTimeout+ (\s a -> s { _satdaScheduleToCloseTimeout = a })++-- | If set, specifies the maximum duration the activity task can wait to be+-- assigned to a worker. This overrides the default schedule-to-start+-- timeout specified when registering the activity type using+-- RegisterActivityType. The valid values are integers greater than or equal+-- to 0. An integer value can be used to specify the duration in seconds+-- while NONE can be used to specify unlimited duration.+satdaScheduleToStartTimeout :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)+satdaScheduleToStartTimeout =+ lens _satdaScheduleToStartTimeout+ (\s a -> s { _satdaScheduleToStartTimeout = a })++-- | If set, specifies the maximum duration a worker may take to process this+-- activity task. This overrides the default start-to-close timeout+-- specified when registering the activity type using RegisterActivityType.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+satdaStartToCloseTimeout :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe Text)+satdaStartToCloseTimeout =+ lens _satdaStartToCloseTimeout+ (\s a -> s { _satdaStartToCloseTimeout = a })++-- | If set, specifies the name of the task list in which to schedule the+-- activity task. If not specified, the defaultTaskList registered with the+-- activity type will be used. The specified string must not start or end+-- with whitespace. It must not contain a : (colon), / (slash), | (vertical+-- bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also,+-- it must not contain the literal string "arn".+satdaTaskList :: Lens' ScheduleActivityTaskDecisionAttributes (Maybe TaskList)+satdaTaskList = lens _satdaTaskList (\s a -> s { _satdaTaskList = a })++instance FromJSON ScheduleActivityTaskDecisionAttributes where+ parseJSON = withObject "ScheduleActivityTaskDecisionAttributes" $ \o -> ScheduleActivityTaskDecisionAttributes+ <$> o .: "activityId"+ <*> o .: "activityType"+ <*> o .:? "control"+ <*> o .:? "heartbeatTimeout"+ <*> o .:? "input"+ <*> o .:? "scheduleToCloseTimeout"+ <*> o .:? "scheduleToStartTimeout"+ <*> o .:? "startToCloseTimeout"+ <*> o .:? "taskList"++instance ToJSON ScheduleActivityTaskDecisionAttributes where+ toJSON ScheduleActivityTaskDecisionAttributes{..} = object+ [ "activityType" .= _satdaActivityType+ , "activityId" .= _satdaActivityId+ , "control" .= _satdaControl+ , "input" .= _satdaInput+ , "scheduleToCloseTimeout" .= _satdaScheduleToCloseTimeout+ , "taskList" .= _satdaTaskList+ , "scheduleToStartTimeout" .= _satdaScheduleToStartTimeout+ , "startToCloseTimeout" .= _satdaStartToCloseTimeout+ , "heartbeatTimeout" .= _satdaHeartbeatTimeout+ ]++data ActivityTypeConfiguration = ActivityTypeConfiguration+ { _atcDefaultTaskHeartbeatTimeout :: Maybe Text+ , _atcDefaultTaskList :: Maybe TaskList+ , _atcDefaultTaskScheduleToCloseTimeout :: Maybe Text+ , _atcDefaultTaskScheduleToStartTimeout :: Maybe Text+ , _atcDefaultTaskStartToCloseTimeout :: Maybe Text+ } deriving (Eq, Show)++-- | 'ActivityTypeConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atcDefaultTaskHeartbeatTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atcDefaultTaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'atcDefaultTaskScheduleToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atcDefaultTaskScheduleToStartTimeout' @::@ 'Maybe' 'Text'+--+-- * 'atcDefaultTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+activityTypeConfiguration :: ActivityTypeConfiguration+activityTypeConfiguration = ActivityTypeConfiguration+ { _atcDefaultTaskStartToCloseTimeout = Nothing+ , _atcDefaultTaskHeartbeatTimeout = Nothing+ , _atcDefaultTaskList = Nothing+ , _atcDefaultTaskScheduleToStartTimeout = Nothing+ , _atcDefaultTaskScheduleToCloseTimeout = Nothing+ }++-- | The optional default maximum time, specified when registering the+-- activity type, before which a worker processing a task must report+-- progress by calling RecordActivityTaskHeartbeat. You can override this+-- default when scheduling a task through the ScheduleActivityTask Decision.+-- If the activity worker subsequently attempts to record a heartbeat or+-- returns a result, the activity worker receives an UnknownResource fault.+-- In this case, Amazon SWF no longer considers the activity task to be+-- valid; the activity worker should clean up the activity task. The valid+-- values are integers greater than or equal to 0. An integer value can be+-- used to specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+atcDefaultTaskHeartbeatTimeout :: Lens' ActivityTypeConfiguration (Maybe Text)+atcDefaultTaskHeartbeatTimeout =+ lens _atcDefaultTaskHeartbeatTimeout+ (\s a -> s { _atcDefaultTaskHeartbeatTimeout = a })++-- | The optional default task list specified for this activity type at+-- registration. This default task list is used if a task list is not+-- provided when a task is scheduled through the ScheduleActivityTask+-- Decision. You can override this default when scheduling a task through+-- the ScheduleActivityTask Decision.+atcDefaultTaskList :: Lens' ActivityTypeConfiguration (Maybe TaskList)+atcDefaultTaskList =+ lens _atcDefaultTaskList (\s a -> s { _atcDefaultTaskList = a })++-- | The optional default maximum duration, specified when registering the+-- activity type, for tasks of this activity type. You can override this+-- default when scheduling a task through the ScheduleActivityTask Decision.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+atcDefaultTaskScheduleToCloseTimeout :: Lens' ActivityTypeConfiguration (Maybe Text)+atcDefaultTaskScheduleToCloseTimeout =+ lens _atcDefaultTaskScheduleToCloseTimeout+ (\s a -> s { _atcDefaultTaskScheduleToCloseTimeout = a })++-- | The optional default maximum duration, specified when registering the+-- activity type, that a task of an activity type can wait before being+-- assigned to a worker. You can override this default when scheduling a+-- task through the ScheduleActivityTask Decision. The valid values are+-- integers greater than or equal to 0. An integer value can be used to+-- specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+atcDefaultTaskScheduleToStartTimeout :: Lens' ActivityTypeConfiguration (Maybe Text)+atcDefaultTaskScheduleToStartTimeout =+ lens _atcDefaultTaskScheduleToStartTimeout+ (\s a -> s { _atcDefaultTaskScheduleToStartTimeout = a })++-- | The optional default maximum duration for tasks of an activity type+-- specified when registering the activity type. You can override this+-- default when scheduling a task through the ScheduleActivityTask Decision.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+atcDefaultTaskStartToCloseTimeout :: Lens' ActivityTypeConfiguration (Maybe Text)+atcDefaultTaskStartToCloseTimeout =+ lens _atcDefaultTaskStartToCloseTimeout+ (\s a -> s { _atcDefaultTaskStartToCloseTimeout = a })++instance FromJSON ActivityTypeConfiguration where+ parseJSON = withObject "ActivityTypeConfiguration" $ \o -> ActivityTypeConfiguration+ <$> o .:? "defaultTaskHeartbeatTimeout"+ <*> o .:? "defaultTaskList"+ <*> o .:? "defaultTaskScheduleToCloseTimeout"+ <*> o .:? "defaultTaskScheduleToStartTimeout"+ <*> o .:? "defaultTaskStartToCloseTimeout"++instance ToJSON ActivityTypeConfiguration where+ toJSON ActivityTypeConfiguration{..} = object+ [ "defaultTaskStartToCloseTimeout" .= _atcDefaultTaskStartToCloseTimeout+ , "defaultTaskHeartbeatTimeout" .= _atcDefaultTaskHeartbeatTimeout+ , "defaultTaskList" .= _atcDefaultTaskList+ , "defaultTaskScheduleToStartTimeout" .= _atcDefaultTaskScheduleToStartTimeout+ , "defaultTaskScheduleToCloseTimeout" .= _atcDefaultTaskScheduleToCloseTimeout+ ]++data ActivityType = ActivityType+ { _atName :: Text+ , _atVersion :: Text+ } deriving (Eq, Ord, Show)++-- | 'ActivityType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atName' @::@ 'Text'+--+-- * 'atVersion' @::@ 'Text'+--+activityType :: Text -- ^ 'atName'+ -> Text -- ^ 'atVersion'+ -> ActivityType+activityType p1 p2 = ActivityType+ { _atName = p1+ , _atVersion = p2+ }++-- | The name of this activity.+atName :: Lens' ActivityType Text+atName = lens _atName (\s a -> s { _atName = a })++-- | The version of this activity.+atVersion :: Lens' ActivityType Text+atVersion = lens _atVersion (\s a -> s { _atVersion = a })++instance FromJSON ActivityType where+ parseJSON = withObject "ActivityType" $ \o -> ActivityType+ <$> o .: "name"+ <*> o .: "version"++instance ToJSON ActivityType where+ toJSON ActivityType{..} = object+ [ "name" .= _atName+ , "version" .= _atVersion+ ]++data WorkflowTypeInfo = WorkflowTypeInfo+ { _wtiCreationDate :: RFC822+ , _wtiDeprecationDate :: Maybe RFC822+ , _wtiDescription :: Maybe Text+ , _wtiStatus :: Text+ , _wtiWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'WorkflowTypeInfo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wtiCreationDate' @::@ 'UTCTime'+--+-- * 'wtiDeprecationDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'wtiDescription' @::@ 'Maybe' 'Text'+--+-- * 'wtiStatus' @::@ 'Text'+--+-- * 'wtiWorkflowType' @::@ 'WorkflowType'+--+workflowTypeInfo :: WorkflowType -- ^ 'wtiWorkflowType'+ -> Text -- ^ 'wtiStatus'+ -> UTCTime -- ^ 'wtiCreationDate'+ -> WorkflowTypeInfo+workflowTypeInfo p1 p2 p3 = WorkflowTypeInfo+ { _wtiWorkflowType = p1+ , _wtiStatus = p2+ , _wtiCreationDate = withIso _Time (const id) p3+ , _wtiDescription = Nothing+ , _wtiDeprecationDate = Nothing+ }++-- | The date when this type was registered.+wtiCreationDate :: Lens' WorkflowTypeInfo UTCTime+wtiCreationDate = lens _wtiCreationDate (\s a -> s { _wtiCreationDate = a }) . _Time++-- | If the type is in deprecated state, then it is set to the date when the+-- type was deprecated.+wtiDeprecationDate :: Lens' WorkflowTypeInfo (Maybe UTCTime)+wtiDeprecationDate =+ lens _wtiDeprecationDate (\s a -> s { _wtiDeprecationDate = a })+ . mapping _Time++-- | The description of the type registered through RegisterWorkflowType.+wtiDescription :: Lens' WorkflowTypeInfo (Maybe Text)+wtiDescription = lens _wtiDescription (\s a -> s { _wtiDescription = a })++-- | The current status of the workflow type.+wtiStatus :: Lens' WorkflowTypeInfo Text+wtiStatus = lens _wtiStatus (\s a -> s { _wtiStatus = a })++-- | The workflow type this information is about.+wtiWorkflowType :: Lens' WorkflowTypeInfo WorkflowType+wtiWorkflowType = lens _wtiWorkflowType (\s a -> s { _wtiWorkflowType = a })++instance FromJSON WorkflowTypeInfo where+ parseJSON = withObject "WorkflowTypeInfo" $ \o -> WorkflowTypeInfo+ <$> o .: "creationDate"+ <*> o .:? "deprecationDate"+ <*> o .:? "description"+ <*> o .: "status"+ <*> o .: "workflowType"++instance ToJSON WorkflowTypeInfo where+ toJSON WorkflowTypeInfo{..} = object+ [ "workflowType" .= _wtiWorkflowType+ , "status" .= _wtiStatus+ , "description" .= _wtiDescription+ , "creationDate" .= _wtiCreationDate+ , "deprecationDate" .= _wtiDeprecationDate+ ]++data ChildWorkflowExecutionCompletedEventAttributes = ChildWorkflowExecutionCompletedEventAttributes+ { _cweceaInitiatedEventId :: Integer+ , _cweceaResult :: Maybe Text+ , _cweceaStartedEventId :: Integer+ , _cweceaWorkflowExecution :: WorkflowExecution+ , _cweceaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'ChildWorkflowExecutionCompletedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cweceaInitiatedEventId' @::@ 'Integer'+--+-- * 'cweceaResult' @::@ 'Maybe' 'Text'+--+-- * 'cweceaStartedEventId' @::@ 'Integer'+--+-- * 'cweceaWorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'cweceaWorkflowType' @::@ 'WorkflowType'+--+childWorkflowExecutionCompletedEventAttributes :: WorkflowExecution -- ^ 'cweceaWorkflowExecution'+ -> WorkflowType -- ^ 'cweceaWorkflowType'+ -> Integer -- ^ 'cweceaInitiatedEventId'+ -> Integer -- ^ 'cweceaStartedEventId'+ -> ChildWorkflowExecutionCompletedEventAttributes+childWorkflowExecutionCompletedEventAttributes p1 p2 p3 p4 = ChildWorkflowExecutionCompletedEventAttributes+ { _cweceaWorkflowExecution = p1+ , _cweceaWorkflowType = p2+ , _cweceaInitiatedEventId = p3+ , _cweceaStartedEventId = p4+ , _cweceaResult = Nothing+ }++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+cweceaInitiatedEventId :: Lens' ChildWorkflowExecutionCompletedEventAttributes Integer+cweceaInitiatedEventId =+ lens _cweceaInitiatedEventId (\s a -> s { _cweceaInitiatedEventId = a })++-- | The result of the child workflow execution (if any).+cweceaResult :: Lens' ChildWorkflowExecutionCompletedEventAttributes (Maybe Text)+cweceaResult = lens _cweceaResult (\s a -> s { _cweceaResult = a })++-- | The Id of the ChildWorkflowExecutionStarted event recorded when this+-- child workflow execution was started. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+cweceaStartedEventId :: Lens' ChildWorkflowExecutionCompletedEventAttributes Integer+cweceaStartedEventId =+ lens _cweceaStartedEventId (\s a -> s { _cweceaStartedEventId = a })++-- | The child workflow execution that was completed.+cweceaWorkflowExecution :: Lens' ChildWorkflowExecutionCompletedEventAttributes WorkflowExecution+cweceaWorkflowExecution =+ lens _cweceaWorkflowExecution (\s a -> s { _cweceaWorkflowExecution = a })++-- | The type of the child workflow execution.+cweceaWorkflowType :: Lens' ChildWorkflowExecutionCompletedEventAttributes WorkflowType+cweceaWorkflowType =+ lens _cweceaWorkflowType (\s a -> s { _cweceaWorkflowType = a })++instance FromJSON ChildWorkflowExecutionCompletedEventAttributes where+ parseJSON = withObject "ChildWorkflowExecutionCompletedEventAttributes" $ \o -> ChildWorkflowExecutionCompletedEventAttributes+ <$> o .: "initiatedEventId"+ <*> o .:? "result"+ <*> o .: "startedEventId"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance ToJSON ChildWorkflowExecutionCompletedEventAttributes where+ toJSON ChildWorkflowExecutionCompletedEventAttributes{..} = object+ [ "workflowExecution" .= _cweceaWorkflowExecution+ , "workflowType" .= _cweceaWorkflowType+ , "result" .= _cweceaResult+ , "initiatedEventId" .= _cweceaInitiatedEventId+ , "startedEventId" .= _cweceaStartedEventId+ ]++data WorkflowExecutionOpenCounts = WorkflowExecutionOpenCounts+ { _weocOpenActivityTasks :: Nat+ , _weocOpenChildWorkflowExecutions :: Nat+ , _weocOpenDecisionTasks :: Nat+ , _weocOpenTimers :: Nat+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionOpenCounts' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weocOpenActivityTasks' @::@ 'Natural'+--+-- * 'weocOpenChildWorkflowExecutions' @::@ 'Natural'+--+-- * 'weocOpenDecisionTasks' @::@ 'Natural'+--+-- * 'weocOpenTimers' @::@ 'Natural'+--+workflowExecutionOpenCounts :: Natural -- ^ 'weocOpenActivityTasks'+ -> Natural -- ^ 'weocOpenDecisionTasks'+ -> Natural -- ^ 'weocOpenTimers'+ -> Natural -- ^ 'weocOpenChildWorkflowExecutions'+ -> WorkflowExecutionOpenCounts+workflowExecutionOpenCounts p1 p2 p3 p4 = WorkflowExecutionOpenCounts+ { _weocOpenActivityTasks = withIso _Nat (const id) p1+ , _weocOpenDecisionTasks = withIso _Nat (const id) p2+ , _weocOpenTimers = withIso _Nat (const id) p3+ , _weocOpenChildWorkflowExecutions = withIso _Nat (const id) p4+ }++-- | The count of activity tasks whose status is OPEN.+weocOpenActivityTasks :: Lens' WorkflowExecutionOpenCounts Natural+weocOpenActivityTasks =+ lens _weocOpenActivityTasks (\s a -> s { _weocOpenActivityTasks = a })+ . _Nat++-- | The count of child workflow executions whose status is OPEN.+weocOpenChildWorkflowExecutions :: Lens' WorkflowExecutionOpenCounts Natural+weocOpenChildWorkflowExecutions =+ lens _weocOpenChildWorkflowExecutions+ (\s a -> s { _weocOpenChildWorkflowExecutions = a })+ . _Nat++-- | The count of decision tasks whose status is OPEN. A workflow execution+-- can have at most one open decision task.+weocOpenDecisionTasks :: Lens' WorkflowExecutionOpenCounts Natural+weocOpenDecisionTasks =+ lens _weocOpenDecisionTasks (\s a -> s { _weocOpenDecisionTasks = a })+ . _Nat++-- | The count of timers started by this workflow execution that have not+-- fired yet.+weocOpenTimers :: Lens' WorkflowExecutionOpenCounts Natural+weocOpenTimers = lens _weocOpenTimers (\s a -> s { _weocOpenTimers = a }) . _Nat++instance FromJSON WorkflowExecutionOpenCounts where+ parseJSON = withObject "WorkflowExecutionOpenCounts" $ \o -> WorkflowExecutionOpenCounts+ <$> o .: "openActivityTasks"+ <*> o .: "openChildWorkflowExecutions"+ <*> o .: "openDecisionTasks"+ <*> o .: "openTimers"++instance ToJSON WorkflowExecutionOpenCounts where+ toJSON WorkflowExecutionOpenCounts{..} = object+ [ "openActivityTasks" .= _weocOpenActivityTasks+ , "openDecisionTasks" .= _weocOpenDecisionTasks+ , "openTimers" .= _weocOpenTimers+ , "openChildWorkflowExecutions" .= _weocOpenChildWorkflowExecutions+ ]++data RequestCancelActivityTaskFailedCause+ = ActivityIdUnknown -- ^ ACTIVITY_ID_UNKNOWN+ | OperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable RequestCancelActivityTaskFailedCause++instance FromText RequestCancelActivityTaskFailedCause where+ parser = match "ACTIVITY_ID_UNKNOWN" ActivityIdUnknown+ <|> match "OPERATION_NOT_PERMITTED" OperationNotPermitted++instance ToText RequestCancelActivityTaskFailedCause where+ toText = \case+ ActivityIdUnknown -> "ACTIVITY_ID_UNKNOWN"+ OperationNotPermitted -> "OPERATION_NOT_PERMITTED"++instance FromJSON RequestCancelActivityTaskFailedCause where+ parseJSON = parseJSONText "RequestCancelActivityTaskFailedCause"++instance ToJSON RequestCancelActivityTaskFailedCause where+ toJSON = toJSONText++data ScheduleActivityTaskFailedEventAttributes = ScheduleActivityTaskFailedEventAttributes+ { _satfeaActivityId :: Text+ , _satfeaActivityType :: ActivityType+ , _satfeaCause :: Text+ , _satfeaDecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Show)++-- | 'ScheduleActivityTaskFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'satfeaActivityId' @::@ 'Text'+--+-- * 'satfeaActivityType' @::@ 'ActivityType'+--+-- * 'satfeaCause' @::@ 'Text'+--+-- * 'satfeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+scheduleActivityTaskFailedEventAttributes :: ActivityType -- ^ 'satfeaActivityType'+ -> Text -- ^ 'satfeaActivityId'+ -> Text -- ^ 'satfeaCause'+ -> Integer -- ^ 'satfeaDecisionTaskCompletedEventId'+ -> ScheduleActivityTaskFailedEventAttributes+scheduleActivityTaskFailedEventAttributes p1 p2 p3 p4 = ScheduleActivityTaskFailedEventAttributes+ { _satfeaActivityType = p1+ , _satfeaActivityId = p2+ , _satfeaCause = p3+ , _satfeaDecisionTaskCompletedEventId = p4+ }++-- | The activityId provided in the ScheduleActivityTask decision that failed.+satfeaActivityId :: Lens' ScheduleActivityTaskFailedEventAttributes Text+satfeaActivityId = lens _satfeaActivityId (\s a -> s { _satfeaActivityId = a })++-- | The activity type provided in the ScheduleActivityTask decision that+-- failed.+satfeaActivityType :: Lens' ScheduleActivityTaskFailedEventAttributes ActivityType+satfeaActivityType =+ lens _satfeaActivityType (\s a -> s { _satfeaActivityType = a })++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+satfeaCause :: Lens' ScheduleActivityTaskFailedEventAttributes Text+satfeaCause = lens _satfeaCause (\s a -> s { _satfeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- that resulted in the scheduling of this activity task. This information+-- can be useful for diagnosing problems by tracing back the chain of events+-- leading up to this event.+satfeaDecisionTaskCompletedEventId :: Lens' ScheduleActivityTaskFailedEventAttributes Integer+satfeaDecisionTaskCompletedEventId =+ lens _satfeaDecisionTaskCompletedEventId+ (\s a -> s { _satfeaDecisionTaskCompletedEventId = a })++instance FromJSON ScheduleActivityTaskFailedEventAttributes where+ parseJSON = withObject "ScheduleActivityTaskFailedEventAttributes" $ \o -> ScheduleActivityTaskFailedEventAttributes+ <$> o .: "activityId"+ <*> o .: "activityType"+ <*> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON ScheduleActivityTaskFailedEventAttributes where+ toJSON ScheduleActivityTaskFailedEventAttributes{..} = object+ [ "activityType" .= _satfeaActivityType+ , "activityId" .= _satfeaActivityId+ , "cause" .= _satfeaCause+ , "decisionTaskCompletedEventId" .= _satfeaDecisionTaskCompletedEventId+ ]++data MarkerRecordedEventAttributes = MarkerRecordedEventAttributes+ { _mreaDecisionTaskCompletedEventId :: Integer+ , _mreaDetails :: Maybe Text+ , _mreaMarkerName :: Text+ } deriving (Eq, Ord, Show)++-- | 'MarkerRecordedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'mreaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'mreaDetails' @::@ 'Maybe' 'Text'+--+-- * 'mreaMarkerName' @::@ 'Text'+--+markerRecordedEventAttributes :: Text -- ^ 'mreaMarkerName'+ -> Integer -- ^ 'mreaDecisionTaskCompletedEventId'+ -> MarkerRecordedEventAttributes+markerRecordedEventAttributes p1 p2 = MarkerRecordedEventAttributes+ { _mreaMarkerName = p1+ , _mreaDecisionTaskCompletedEventId = p2+ , _mreaDetails = Nothing+ }++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the RecordMarker decision that requested this+-- marker. This information can be useful for diagnosing problems by tracing+-- back the cause of events.+mreaDecisionTaskCompletedEventId :: Lens' MarkerRecordedEventAttributes Integer+mreaDecisionTaskCompletedEventId =+ lens _mreaDecisionTaskCompletedEventId+ (\s a -> s { _mreaDecisionTaskCompletedEventId = a })++-- | Details of the marker (if any).+mreaDetails :: Lens' MarkerRecordedEventAttributes (Maybe Text)+mreaDetails = lens _mreaDetails (\s a -> s { _mreaDetails = a })++-- | The name of the marker.+mreaMarkerName :: Lens' MarkerRecordedEventAttributes Text+mreaMarkerName = lens _mreaMarkerName (\s a -> s { _mreaMarkerName = a })++instance FromJSON MarkerRecordedEventAttributes where+ parseJSON = withObject "MarkerRecordedEventAttributes" $ \o -> MarkerRecordedEventAttributes+ <$> o .: "decisionTaskCompletedEventId"+ <*> o .:? "details"+ <*> o .: "markerName"++instance ToJSON MarkerRecordedEventAttributes where+ toJSON MarkerRecordedEventAttributes{..} = object+ [ "markerName" .= _mreaMarkerName+ , "details" .= _mreaDetails+ , "decisionTaskCompletedEventId" .= _mreaDecisionTaskCompletedEventId+ ]++data SignalExternalWorkflowExecutionDecisionAttributes = SignalExternalWorkflowExecutionDecisionAttributes+ { _sewedaControl :: Maybe Text+ , _sewedaInput :: Maybe Text+ , _sewedaRunId :: Maybe Text+ , _sewedaSignalName :: Text+ , _sewedaWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'SignalExternalWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sewedaControl' @::@ 'Maybe' 'Text'+--+-- * 'sewedaInput' @::@ 'Maybe' 'Text'+--+-- * 'sewedaRunId' @::@ 'Maybe' 'Text'+--+-- * 'sewedaSignalName' @::@ 'Text'+--+-- * 'sewedaWorkflowId' @::@ 'Text'+--+signalExternalWorkflowExecutionDecisionAttributes :: Text -- ^ 'sewedaWorkflowId'+ -> Text -- ^ 'sewedaSignalName'+ -> SignalExternalWorkflowExecutionDecisionAttributes+signalExternalWorkflowExecutionDecisionAttributes p1 p2 = SignalExternalWorkflowExecutionDecisionAttributes+ { _sewedaWorkflowId = p1+ , _sewedaSignalName = p2+ , _sewedaRunId = Nothing+ , _sewedaInput = Nothing+ , _sewedaControl = Nothing+ }++-- | Optional data attached to the event that can be used by the decider in+-- subsequent decision tasks.+sewedaControl :: Lens' SignalExternalWorkflowExecutionDecisionAttributes (Maybe Text)+sewedaControl = lens _sewedaControl (\s a -> s { _sewedaControl = a })++-- | Optional input to be provided with the signal.The target workflow+-- execution will use the signal name and input to process the signal.+sewedaInput :: Lens' SignalExternalWorkflowExecutionDecisionAttributes (Maybe Text)+sewedaInput = lens _sewedaInput (\s a -> s { _sewedaInput = a })++-- | The runId of the workflow execution to be signaled.+sewedaRunId :: Lens' SignalExternalWorkflowExecutionDecisionAttributes (Maybe Text)+sewedaRunId = lens _sewedaRunId (\s a -> s { _sewedaRunId = a })++-- | The name of the signal.The target workflow execution will use the signal+-- name and input to process the signal. This field is required.+sewedaSignalName :: Lens' SignalExternalWorkflowExecutionDecisionAttributes Text+sewedaSignalName = lens _sewedaSignalName (\s a -> s { _sewedaSignalName = a })++-- | The workflowId of the workflow execution to be signaled. This field is+-- required.+sewedaWorkflowId :: Lens' SignalExternalWorkflowExecutionDecisionAttributes Text+sewedaWorkflowId = lens _sewedaWorkflowId (\s a -> s { _sewedaWorkflowId = a })++instance FromJSON SignalExternalWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "SignalExternalWorkflowExecutionDecisionAttributes" $ \o -> SignalExternalWorkflowExecutionDecisionAttributes+ <$> o .:? "control"+ <*> o .:? "input"+ <*> o .:? "runId"+ <*> o .: "signalName"+ <*> o .: "workflowId"++instance ToJSON SignalExternalWorkflowExecutionDecisionAttributes where+ toJSON SignalExternalWorkflowExecutionDecisionAttributes{..} = object+ [ "workflowId" .= _sewedaWorkflowId+ , "runId" .= _sewedaRunId+ , "signalName" .= _sewedaSignalName+ , "input" .= _sewedaInput+ , "control" .= _sewedaControl+ ]++data WorkflowExecutionTerminatedCause+ = ChildPolicyApplied -- ^ CHILD_POLICY_APPLIED+ | EventLimitExceeded -- ^ EVENT_LIMIT_EXCEEDED+ | OperatorInitiated -- ^ OPERATOR_INITIATED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable WorkflowExecutionTerminatedCause++instance FromText WorkflowExecutionTerminatedCause where+ parser = match "CHILD_POLICY_APPLIED" ChildPolicyApplied+ <|> match "EVENT_LIMIT_EXCEEDED" EventLimitExceeded+ <|> match "OPERATOR_INITIATED" OperatorInitiated++instance ToText WorkflowExecutionTerminatedCause where+ toText = \case+ ChildPolicyApplied -> "CHILD_POLICY_APPLIED"+ EventLimitExceeded -> "EVENT_LIMIT_EXCEEDED"+ OperatorInitiated -> "OPERATOR_INITIATED"++instance FromJSON WorkflowExecutionTerminatedCause where+ parseJSON = parseJSONText "WorkflowExecutionTerminatedCause"++instance ToJSON WorkflowExecutionTerminatedCause where+ toJSON = toJSONText++data CancelWorkflowExecutionFailedCause+ = CWEFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | CWEFCUnhandledDecision -- ^ UNHANDLED_DECISION+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable CancelWorkflowExecutionFailedCause++instance FromText CancelWorkflowExecutionFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" CWEFCOperationNotPermitted+ <|> match "UNHANDLED_DECISION" CWEFCUnhandledDecision++instance ToText CancelWorkflowExecutionFailedCause where+ toText = \case+ CWEFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ CWEFCUnhandledDecision -> "UNHANDLED_DECISION"++instance FromJSON CancelWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "CancelWorkflowExecutionFailedCause"++instance ToJSON CancelWorkflowExecutionFailedCause where+ toJSON = toJSONText++data SignalExternalWorkflowExecutionFailedCause+ = SEWEFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | SEWEFCSignalExternalWorkflowExecutionRateExceeded -- ^ SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED+ | SEWEFCUnknownExternalWorkflowExecution -- ^ UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable SignalExternalWorkflowExecutionFailedCause++instance FromText SignalExternalWorkflowExecutionFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" SEWEFCOperationNotPermitted+ <|> match "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED" SEWEFCSignalExternalWorkflowExecutionRateExceeded+ <|> match "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION" SEWEFCUnknownExternalWorkflowExecution++instance ToText SignalExternalWorkflowExecutionFailedCause where+ toText = \case+ SEWEFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ SEWEFCSignalExternalWorkflowExecutionRateExceeded -> "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED"+ SEWEFCUnknownExternalWorkflowExecution -> "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION"++instance FromJSON SignalExternalWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "SignalExternalWorkflowExecutionFailedCause"++instance ToJSON SignalExternalWorkflowExecutionFailedCause where+ toJSON = toJSONText++data RecordMarkerDecisionAttributes = RecordMarkerDecisionAttributes+ { _rmdaDetails :: Maybe Text+ , _rmdaMarkerName :: Text+ } deriving (Eq, Ord, Show)++-- | 'RecordMarkerDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rmdaDetails' @::@ 'Maybe' 'Text'+--+-- * 'rmdaMarkerName' @::@ 'Text'+--+recordMarkerDecisionAttributes :: Text -- ^ 'rmdaMarkerName'+ -> RecordMarkerDecisionAttributes+recordMarkerDecisionAttributes p1 = RecordMarkerDecisionAttributes+ { _rmdaMarkerName = p1+ , _rmdaDetails = Nothing+ }++-- | Optional details of the marker.+rmdaDetails :: Lens' RecordMarkerDecisionAttributes (Maybe Text)+rmdaDetails = lens _rmdaDetails (\s a -> s { _rmdaDetails = a })++-- | The name of the marker. This file is required.+rmdaMarkerName :: Lens' RecordMarkerDecisionAttributes Text+rmdaMarkerName = lens _rmdaMarkerName (\s a -> s { _rmdaMarkerName = a })++instance FromJSON RecordMarkerDecisionAttributes where+ parseJSON = withObject "RecordMarkerDecisionAttributes" $ \o -> RecordMarkerDecisionAttributes+ <$> o .:? "details"+ <*> o .: "markerName"++instance ToJSON RecordMarkerDecisionAttributes where+ toJSON RecordMarkerDecisionAttributes{..} = object+ [ "markerName" .= _rmdaMarkerName+ , "details" .= _rmdaDetails+ ]++data CompleteWorkflowExecutionFailedEventAttributes = CompleteWorkflowExecutionFailedEventAttributes+ { _cwefeaCause :: Text+ , _cwefeaDecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'CompleteWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwefeaCause' @::@ 'Text'+--+-- * 'cwefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+completeWorkflowExecutionFailedEventAttributes :: Text -- ^ 'cwefeaCause'+ -> Integer -- ^ 'cwefeaDecisionTaskCompletedEventId'+ -> CompleteWorkflowExecutionFailedEventAttributes+completeWorkflowExecutionFailedEventAttributes p1 p2 = CompleteWorkflowExecutionFailedEventAttributes+ { _cwefeaCause = p1+ , _cwefeaDecisionTaskCompletedEventId = p2+ }++-- | The cause of the failure. This information is generated by the system and+-- can be useful for diagnostic purposes.+cwefeaCause :: Lens' CompleteWorkflowExecutionFailedEventAttributes Text+cwefeaCause = lens _cwefeaCause (\s a -> s { _cwefeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the CompleteWorkflowExecution decision to complete+-- this execution. This information can be useful for diagnosing problems by+-- tracing back the cause of events.+cwefeaDecisionTaskCompletedEventId :: Lens' CompleteWorkflowExecutionFailedEventAttributes Integer+cwefeaDecisionTaskCompletedEventId =+ lens _cwefeaDecisionTaskCompletedEventId+ (\s a -> s { _cwefeaDecisionTaskCompletedEventId = a })++instance FromJSON CompleteWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "CompleteWorkflowExecutionFailedEventAttributes" $ \o -> CompleteWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON CompleteWorkflowExecutionFailedEventAttributes where+ toJSON CompleteWorkflowExecutionFailedEventAttributes{..} = object+ [ "cause" .= _cwefeaCause+ , "decisionTaskCompletedEventId" .= _cwefeaDecisionTaskCompletedEventId+ ]++data StartTimerDecisionAttributes = StartTimerDecisionAttributes+ { _stdaControl :: Maybe Text+ , _stdaStartToFireTimeout :: Text+ , _stdaTimerId :: Text+ } deriving (Eq, Ord, Show)++-- | 'StartTimerDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'stdaControl' @::@ 'Maybe' 'Text'+--+-- * 'stdaStartToFireTimeout' @::@ 'Text'+--+-- * 'stdaTimerId' @::@ 'Text'+--+startTimerDecisionAttributes :: Text -- ^ 'stdaTimerId'+ -> Text -- ^ 'stdaStartToFireTimeout'+ -> StartTimerDecisionAttributes+startTimerDecisionAttributes p1 p2 = StartTimerDecisionAttributes+ { _stdaTimerId = p1+ , _stdaStartToFireTimeout = p2+ , _stdaControl = Nothing+ }++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks.+stdaControl :: Lens' StartTimerDecisionAttributes (Maybe Text)+stdaControl = lens _stdaControl (\s a -> s { _stdaControl = a })++-- | The duration to wait before firing the timer. This field is required. The+-- duration is specified in seconds. The valid values are integers greater+-- than or equal to 0.+stdaStartToFireTimeout :: Lens' StartTimerDecisionAttributes Text+stdaStartToFireTimeout =+ lens _stdaStartToFireTimeout (\s a -> s { _stdaStartToFireTimeout = a })++-- | The unique Id of the timer. This field is required. The specified string+-- must not start or end with whitespace. It must not contain a : (colon), /+-- (slash), | (vertical bar), or any control characters (\u0000-\u001f |+-- \u007f - \u009f). Also, it must not contain the literal string+-- "arn".+stdaTimerId :: Lens' StartTimerDecisionAttributes Text+stdaTimerId = lens _stdaTimerId (\s a -> s { _stdaTimerId = a })++instance FromJSON StartTimerDecisionAttributes where+ parseJSON = withObject "StartTimerDecisionAttributes" $ \o -> StartTimerDecisionAttributes+ <$> o .:? "control"+ <*> o .: "startToFireTimeout"+ <*> o .: "timerId"++instance ToJSON StartTimerDecisionAttributes where+ toJSON StartTimerDecisionAttributes{..} = object+ [ "timerId" .= _stdaTimerId+ , "control" .= _stdaControl+ , "startToFireTimeout" .= _stdaStartToFireTimeout+ ]++data DecisionType+ = CancelTimer -- ^ CancelTimer+ | CancelWorkflowExecution -- ^ CancelWorkflowExecution+ | CompleteWorkflowExecution -- ^ CompleteWorkflowExecution+ | ContinueAsNewWorkflowExecution -- ^ ContinueAsNewWorkflowExecution+ | FailWorkflowExecution -- ^ FailWorkflowExecution+ | RecordMarker -- ^ RecordMarker+ | RequestCancelActivityTask -- ^ RequestCancelActivityTask+ | RequestCancelExternalWorkflowExecution -- ^ RequestCancelExternalWorkflowExecution+ | ScheduleActivityTask -- ^ ScheduleActivityTask+ | SignalExternalWorkflowExecution -- ^ SignalExternalWorkflowExecution+ | StartChildWorkflowExecution -- ^ StartChildWorkflowExecution+ | StartTimer -- ^ StartTimer+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable DecisionType++instance FromText DecisionType where+ parser = match "CancelTimer" CancelTimer+ <|> match "CancelWorkflowExecution" CancelWorkflowExecution+ <|> match "CompleteWorkflowExecution" CompleteWorkflowExecution+ <|> match "ContinueAsNewWorkflowExecution" ContinueAsNewWorkflowExecution+ <|> match "FailWorkflowExecution" FailWorkflowExecution+ <|> match "RecordMarker" RecordMarker+ <|> match "RequestCancelActivityTask" RequestCancelActivityTask+ <|> match "RequestCancelExternalWorkflowExecution" RequestCancelExternalWorkflowExecution+ <|> match "ScheduleActivityTask" ScheduleActivityTask+ <|> match "SignalExternalWorkflowExecution" SignalExternalWorkflowExecution+ <|> match "StartChildWorkflowExecution" StartChildWorkflowExecution+ <|> match "StartTimer" StartTimer++instance ToText DecisionType where+ toText = \case+ CancelTimer -> "CancelTimer"+ CancelWorkflowExecution -> "CancelWorkflowExecution"+ CompleteWorkflowExecution -> "CompleteWorkflowExecution"+ ContinueAsNewWorkflowExecution -> "ContinueAsNewWorkflowExecution"+ FailWorkflowExecution -> "FailWorkflowExecution"+ RecordMarker -> "RecordMarker"+ RequestCancelActivityTask -> "RequestCancelActivityTask"+ RequestCancelExternalWorkflowExecution -> "RequestCancelExternalWorkflowExecution"+ ScheduleActivityTask -> "ScheduleActivityTask"+ SignalExternalWorkflowExecution -> "SignalExternalWorkflowExecution"+ StartChildWorkflowExecution -> "StartChildWorkflowExecution"+ StartTimer -> "StartTimer"++instance FromJSON DecisionType where+ parseJSON = parseJSONText "DecisionType"++instance ToJSON DecisionType where+ toJSON = toJSONText++data RequestCancelExternalWorkflowExecutionFailedEventAttributes = RequestCancelExternalWorkflowExecutionFailedEventAttributes+ { _rcewefeaCause :: Text+ , _rcewefeaControl :: Maybe Text+ , _rcewefeaDecisionTaskCompletedEventId :: Integer+ , _rcewefeaInitiatedEventId :: Integer+ , _rcewefeaRunId :: Maybe Text+ , _rcewefeaWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'RequestCancelExternalWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rcewefeaCause' @::@ 'Text'+--+-- * 'rcewefeaControl' @::@ 'Maybe' 'Text'+--+-- * 'rcewefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'rcewefeaInitiatedEventId' @::@ 'Integer'+--+-- * 'rcewefeaRunId' @::@ 'Maybe' 'Text'+--+-- * 'rcewefeaWorkflowId' @::@ 'Text'+--+requestCancelExternalWorkflowExecutionFailedEventAttributes :: Text -- ^ 'rcewefeaWorkflowId'+ -> Text -- ^ 'rcewefeaCause'+ -> Integer -- ^ 'rcewefeaInitiatedEventId'+ -> Integer -- ^ 'rcewefeaDecisionTaskCompletedEventId'+ -> RequestCancelExternalWorkflowExecutionFailedEventAttributes+requestCancelExternalWorkflowExecutionFailedEventAttributes p1 p2 p3 p4 = RequestCancelExternalWorkflowExecutionFailedEventAttributes+ { _rcewefeaWorkflowId = p1+ , _rcewefeaCause = p2+ , _rcewefeaInitiatedEventId = p3+ , _rcewefeaDecisionTaskCompletedEventId = p4+ , _rcewefeaRunId = Nothing+ , _rcewefeaControl = Nothing+ }++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+rcewefeaCause :: Lens' RequestCancelExternalWorkflowExecutionFailedEventAttributes Text+rcewefeaCause = lens _rcewefeaCause (\s a -> s { _rcewefeaCause = a })++rcewefeaControl :: Lens' RequestCancelExternalWorkflowExecutionFailedEventAttributes (Maybe Text)+rcewefeaControl = lens _rcewefeaControl (\s a -> s { _rcewefeaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the RequestCancelExternalWorkflowExecution decision+-- for this cancellation request. This information can be useful for+-- diagnosing problems by tracing back the cause of events.+rcewefeaDecisionTaskCompletedEventId :: Lens' RequestCancelExternalWorkflowExecutionFailedEventAttributes Integer+rcewefeaDecisionTaskCompletedEventId =+ lens _rcewefeaDecisionTaskCompletedEventId+ (\s a -> s { _rcewefeaDecisionTaskCompletedEventId = a })++-- | The id of the RequestCancelExternalWorkflowExecutionInitiated event+-- corresponding to the RequestCancelExternalWorkflowExecution decision to+-- cancel this external workflow execution. This information can be useful+-- for diagnosing problems by tracing back the chain of events leading up to+-- this event.+rcewefeaInitiatedEventId :: Lens' RequestCancelExternalWorkflowExecutionFailedEventAttributes Integer+rcewefeaInitiatedEventId =+ lens _rcewefeaInitiatedEventId+ (\s a -> s { _rcewefeaInitiatedEventId = a })++-- | The runId of the external workflow execution.+rcewefeaRunId :: Lens' RequestCancelExternalWorkflowExecutionFailedEventAttributes (Maybe Text)+rcewefeaRunId = lens _rcewefeaRunId (\s a -> s { _rcewefeaRunId = a })++-- | The workflowId of the external workflow to which the cancel request was+-- to be delivered.+rcewefeaWorkflowId :: Lens' RequestCancelExternalWorkflowExecutionFailedEventAttributes Text+rcewefeaWorkflowId =+ lens _rcewefeaWorkflowId (\s a -> s { _rcewefeaWorkflowId = a })++instance FromJSON RequestCancelExternalWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "RequestCancelExternalWorkflowExecutionFailedEventAttributes" $ \o -> RequestCancelExternalWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "initiatedEventId"+ <*> o .:? "runId"+ <*> o .: "workflowId"++instance ToJSON RequestCancelExternalWorkflowExecutionFailedEventAttributes where+ toJSON RequestCancelExternalWorkflowExecutionFailedEventAttributes{..} = object+ [ "workflowId" .= _rcewefeaWorkflowId+ , "runId" .= _rcewefeaRunId+ , "cause" .= _rcewefeaCause+ , "initiatedEventId" .= _rcewefeaInitiatedEventId+ , "decisionTaskCompletedEventId" .= _rcewefeaDecisionTaskCompletedEventId+ , "control" .= _rcewefeaControl+ ]++data ActivityTypeInfo = ActivityTypeInfo+ { _atiActivityType :: ActivityType+ , _atiCreationDate :: RFC822+ , _atiDeprecationDate :: Maybe RFC822+ , _atiDescription :: Maybe Text+ , _atiStatus :: Text+ } deriving (Eq, Show)++-- | 'ActivityTypeInfo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atiActivityType' @::@ 'ActivityType'+--+-- * 'atiCreationDate' @::@ 'UTCTime'+--+-- * 'atiDeprecationDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'atiDescription' @::@ 'Maybe' 'Text'+--+-- * 'atiStatus' @::@ 'Text'+--+activityTypeInfo :: ActivityType -- ^ 'atiActivityType'+ -> Text -- ^ 'atiStatus'+ -> UTCTime -- ^ 'atiCreationDate'+ -> ActivityTypeInfo+activityTypeInfo p1 p2 p3 = ActivityTypeInfo+ { _atiActivityType = p1+ , _atiStatus = p2+ , _atiCreationDate = withIso _Time (const id) p3+ , _atiDescription = Nothing+ , _atiDeprecationDate = Nothing+ }++-- | The ActivityType type structure representing the activity type.+atiActivityType :: Lens' ActivityTypeInfo ActivityType+atiActivityType = lens _atiActivityType (\s a -> s { _atiActivityType = a })++-- | The date and time this activity type was created through+-- RegisterActivityType.+atiCreationDate :: Lens' ActivityTypeInfo UTCTime+atiCreationDate = lens _atiCreationDate (\s a -> s { _atiCreationDate = a }) . _Time++-- | If DEPRECATED, the date and time DeprecateActivityType was called.+atiDeprecationDate :: Lens' ActivityTypeInfo (Maybe UTCTime)+atiDeprecationDate =+ lens _atiDeprecationDate (\s a -> s { _atiDeprecationDate = a })+ . mapping _Time++-- | The description of the activity type provided in RegisterActivityType.+atiDescription :: Lens' ActivityTypeInfo (Maybe Text)+atiDescription = lens _atiDescription (\s a -> s { _atiDescription = a })++-- | The current status of the activity type.+atiStatus :: Lens' ActivityTypeInfo Text+atiStatus = lens _atiStatus (\s a -> s { _atiStatus = a })++instance FromJSON ActivityTypeInfo where+ parseJSON = withObject "ActivityTypeInfo" $ \o -> ActivityTypeInfo+ <$> o .: "activityType"+ <*> o .: "creationDate"+ <*> o .:? "deprecationDate"+ <*> o .:? "description"+ <*> o .: "status"++instance ToJSON ActivityTypeInfo where+ toJSON ActivityTypeInfo{..} = object+ [ "activityType" .= _atiActivityType+ , "status" .= _atiStatus+ , "description" .= _atiDescription+ , "creationDate" .= _atiCreationDate+ , "deprecationDate" .= _atiDeprecationDate+ ]++data TimerCanceledEventAttributes = TimerCanceledEventAttributes+ { _tceaDecisionTaskCompletedEventId :: Integer+ , _tceaStartedEventId :: Integer+ , _tceaTimerId :: Text+ } deriving (Eq, Ord, Show)++-- | 'TimerCanceledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tceaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'tceaStartedEventId' @::@ 'Integer'+--+-- * 'tceaTimerId' @::@ 'Text'+--+timerCanceledEventAttributes :: Text -- ^ 'tceaTimerId'+ -> Integer -- ^ 'tceaStartedEventId'+ -> Integer -- ^ 'tceaDecisionTaskCompletedEventId'+ -> TimerCanceledEventAttributes+timerCanceledEventAttributes p1 p2 p3 = TimerCanceledEventAttributes+ { _tceaTimerId = p1+ , _tceaStartedEventId = p2+ , _tceaDecisionTaskCompletedEventId = p3+ }++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the CancelTimer decision to cancel this timer. This+-- information can be useful for diagnosing problems by tracing back the+-- cause of events.+tceaDecisionTaskCompletedEventId :: Lens' TimerCanceledEventAttributes Integer+tceaDecisionTaskCompletedEventId =+ lens _tceaDecisionTaskCompletedEventId+ (\s a -> s { _tceaDecisionTaskCompletedEventId = a })++-- | The id of the TimerStarted event that was recorded when this timer was+-- started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+tceaStartedEventId :: Lens' TimerCanceledEventAttributes Integer+tceaStartedEventId =+ lens _tceaStartedEventId (\s a -> s { _tceaStartedEventId = a })++-- | The unique Id of the timer that was canceled.+tceaTimerId :: Lens' TimerCanceledEventAttributes Text+tceaTimerId = lens _tceaTimerId (\s a -> s { _tceaTimerId = a })++instance FromJSON TimerCanceledEventAttributes where+ parseJSON = withObject "TimerCanceledEventAttributes" $ \o -> TimerCanceledEventAttributes+ <$> o .: "decisionTaskCompletedEventId"+ <*> o .: "startedEventId"+ <*> o .: "timerId"++instance ToJSON TimerCanceledEventAttributes where+ toJSON TimerCanceledEventAttributes{..} = object+ [ "timerId" .= _tceaTimerId+ , "startedEventId" .= _tceaStartedEventId+ , "decisionTaskCompletedEventId" .= _tceaDecisionTaskCompletedEventId+ ]++data WorkflowExecutionStartedEventAttributes = WorkflowExecutionStartedEventAttributes+ { _weseaChildPolicy :: Text+ , _weseaContinuedExecutionRunId :: Maybe Text+ , _weseaExecutionStartToCloseTimeout :: Maybe Text+ , _weseaInput :: Maybe Text+ , _weseaParentInitiatedEventId :: Maybe Integer+ , _weseaParentWorkflowExecution :: Maybe WorkflowExecution+ , _weseaTagList :: List "tagList" Text+ , _weseaTaskList :: TaskList+ , _weseaTaskStartToCloseTimeout :: Maybe Text+ , _weseaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'WorkflowExecutionStartedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weseaChildPolicy' @::@ 'Text'+--+-- * 'weseaContinuedExecutionRunId' @::@ 'Maybe' 'Text'+--+-- * 'weseaExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'weseaInput' @::@ 'Maybe' 'Text'+--+-- * 'weseaParentInitiatedEventId' @::@ 'Maybe' 'Integer'+--+-- * 'weseaParentWorkflowExecution' @::@ 'Maybe' 'WorkflowExecution'+--+-- * 'weseaTagList' @::@ ['Text']+--+-- * 'weseaTaskList' @::@ 'TaskList'+--+-- * 'weseaTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'weseaWorkflowType' @::@ 'WorkflowType'+--+workflowExecutionStartedEventAttributes :: Text -- ^ 'weseaChildPolicy'+ -> TaskList -- ^ 'weseaTaskList'+ -> WorkflowType -- ^ 'weseaWorkflowType'+ -> WorkflowExecutionStartedEventAttributes+workflowExecutionStartedEventAttributes p1 p2 p3 = WorkflowExecutionStartedEventAttributes+ { _weseaChildPolicy = p1+ , _weseaTaskList = p2+ , _weseaWorkflowType = p3+ , _weseaInput = Nothing+ , _weseaExecutionStartToCloseTimeout = Nothing+ , _weseaTaskStartToCloseTimeout = Nothing+ , _weseaTagList = mempty+ , _weseaContinuedExecutionRunId = Nothing+ , _weseaParentWorkflowExecution = Nothing+ , _weseaParentInitiatedEventId = Nothing+ }++-- | The policy to use for the child workflow executions if this workflow+-- execution is terminated, by calling the TerminateWorkflowExecution action+-- explicitly or due to an expired timeout. The supported child policies+-- are: TERMINATE: the child executions will be terminated. REQUEST_CANCEL:+-- a request to cancel will be attempted for each child execution by+-- recording a WorkflowExecutionCancelRequested event in its history. It is+-- up to the decider to take appropriate actions when it receives an+-- execution history with this event. ABANDON: no action will be taken. The+-- child executions will continue to run.+weseaChildPolicy :: Lens' WorkflowExecutionStartedEventAttributes Text+weseaChildPolicy = lens _weseaChildPolicy (\s a -> s { _weseaChildPolicy = a })++-- | If this workflow execution was started due to a+-- ContinueAsNewWorkflowExecution decision, then it contains the runId of+-- the previous workflow execution that was closed and continued as this+-- execution.+weseaContinuedExecutionRunId :: Lens' WorkflowExecutionStartedEventAttributes (Maybe Text)+weseaContinuedExecutionRunId =+ lens _weseaContinuedExecutionRunId+ (\s a -> s { _weseaContinuedExecutionRunId = a })++-- | The maximum duration for this workflow execution. The valid values are+-- integers greater than or equal to 0. An integer value can be used to+-- specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+weseaExecutionStartToCloseTimeout :: Lens' WorkflowExecutionStartedEventAttributes (Maybe Text)+weseaExecutionStartToCloseTimeout =+ lens _weseaExecutionStartToCloseTimeout+ (\s a -> s { _weseaExecutionStartToCloseTimeout = a })++-- | The input provided to the workflow execution (if any).+weseaInput :: Lens' WorkflowExecutionStartedEventAttributes (Maybe Text)+weseaInput = lens _weseaInput (\s a -> s { _weseaInput = a })++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this workflow+-- execution. The source event with this Id can be found in the history of+-- the source workflow execution. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+weseaParentInitiatedEventId :: Lens' WorkflowExecutionStartedEventAttributes (Maybe Integer)+weseaParentInitiatedEventId =+ lens _weseaParentInitiatedEventId+ (\s a -> s { _weseaParentInitiatedEventId = a })++-- | The source workflow execution that started this workflow execution. The+-- member is not set if the workflow execution was not started by a+-- workflow.+weseaParentWorkflowExecution :: Lens' WorkflowExecutionStartedEventAttributes (Maybe WorkflowExecution)+weseaParentWorkflowExecution =+ lens _weseaParentWorkflowExecution+ (\s a -> s { _weseaParentWorkflowExecution = a })++-- | The list of tags associated with this workflow execution. An execution+-- can have up to 5 tags.+weseaTagList :: Lens' WorkflowExecutionStartedEventAttributes [Text]+weseaTagList = lens _weseaTagList (\s a -> s { _weseaTagList = a }) . _List++-- | The name of the task list for scheduling the decision tasks for this+-- workflow execution.+weseaTaskList :: Lens' WorkflowExecutionStartedEventAttributes TaskList+weseaTaskList = lens _weseaTaskList (\s a -> s { _weseaTaskList = a })++-- | The maximum duration of decision tasks for this workflow type. The valid+-- values are integers greater than or equal to 0. An integer value can be+-- used to specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+weseaTaskStartToCloseTimeout :: Lens' WorkflowExecutionStartedEventAttributes (Maybe Text)+weseaTaskStartToCloseTimeout =+ lens _weseaTaskStartToCloseTimeout+ (\s a -> s { _weseaTaskStartToCloseTimeout = a })++-- | The workflow type of this execution.+weseaWorkflowType :: Lens' WorkflowExecutionStartedEventAttributes WorkflowType+weseaWorkflowType =+ lens _weseaWorkflowType (\s a -> s { _weseaWorkflowType = a })++instance FromJSON WorkflowExecutionStartedEventAttributes where+ parseJSON = withObject "WorkflowExecutionStartedEventAttributes" $ \o -> WorkflowExecutionStartedEventAttributes+ <$> o .: "childPolicy"+ <*> o .:? "continuedExecutionRunId"+ <*> o .:? "executionStartToCloseTimeout"+ <*> o .:? "input"+ <*> o .:? "parentInitiatedEventId"+ <*> o .:? "parentWorkflowExecution"+ <*> o .: "tagList"+ <*> o .: "taskList"+ <*> o .:? "taskStartToCloseTimeout"+ <*> o .: "workflowType"++instance ToJSON WorkflowExecutionStartedEventAttributes where+ toJSON WorkflowExecutionStartedEventAttributes{..} = object+ [ "input" .= _weseaInput+ , "executionStartToCloseTimeout" .= _weseaExecutionStartToCloseTimeout+ , "taskStartToCloseTimeout" .= _weseaTaskStartToCloseTimeout+ , "childPolicy" .= _weseaChildPolicy+ , "taskList" .= _weseaTaskList+ , "workflowType" .= _weseaWorkflowType+ , "tagList" .= _weseaTagList+ , "continuedExecutionRunId" .= _weseaContinuedExecutionRunId+ , "parentWorkflowExecution" .= _weseaParentWorkflowExecution+ , "parentInitiatedEventId" .= _weseaParentInitiatedEventId+ ]++data WorkflowTypeConfiguration = WorkflowTypeConfiguration+ { _wtcDefaultChildPolicy :: Maybe Text+ , _wtcDefaultExecutionStartToCloseTimeout :: Maybe Text+ , _wtcDefaultTaskList :: Maybe TaskList+ , _wtcDefaultTaskStartToCloseTimeout :: Maybe Text+ } deriving (Eq, Show)++-- | 'WorkflowTypeConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wtcDefaultChildPolicy' @::@ 'Maybe' 'Text'+--+-- * 'wtcDefaultExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'wtcDefaultTaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'wtcDefaultTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+workflowTypeConfiguration :: WorkflowTypeConfiguration+workflowTypeConfiguration = WorkflowTypeConfiguration+ { _wtcDefaultTaskStartToCloseTimeout = Nothing+ , _wtcDefaultExecutionStartToCloseTimeout = Nothing+ , _wtcDefaultTaskList = Nothing+ , _wtcDefaultChildPolicy = Nothing+ }++-- | The optional default policy to use for the child workflow executions when+-- a workflow execution of this type is terminated, by calling the+-- TerminateWorkflowExecution action explicitly or due to an expired+-- timeout. This default can be overridden when starting a workflow+-- execution using the StartWorkflowExecution action or the+-- StartChildWorkflowExecution Decision. The supported child policies are:+-- TERMINATE: the child executions will be terminated. REQUEST_CANCEL: a+-- request to cancel will be attempted for each child execution by recording+-- a WorkflowExecutionCancelRequested event in its history. It is up to the+-- decider to take appropriate actions when it receives an execution history+-- with this event. ABANDON: no action will be taken. The child executions+-- will continue to run.+wtcDefaultChildPolicy :: Lens' WorkflowTypeConfiguration (Maybe Text)+wtcDefaultChildPolicy =+ lens _wtcDefaultChildPolicy (\s a -> s { _wtcDefaultChildPolicy = a })++-- | The optional default maximum duration, specified when registering the+-- workflow type, for executions of this workflow type. This default can be+-- overridden when starting a workflow execution using the+-- StartWorkflowExecution action or the StartChildWorkflowExecution+-- Decision. The valid values are integers greater than or equal to 0. An+-- integer value can be used to specify the duration in seconds while NONE+-- can be used to specify unlimited duration.+wtcDefaultExecutionStartToCloseTimeout :: Lens' WorkflowTypeConfiguration (Maybe Text)+wtcDefaultExecutionStartToCloseTimeout =+ lens _wtcDefaultExecutionStartToCloseTimeout+ (\s a -> s { _wtcDefaultExecutionStartToCloseTimeout = a })++-- | The optional default task list, specified when registering the workflow+-- type, for decisions tasks scheduled for workflow executions of this type.+-- This default can be overridden when starting a workflow execution using+-- the StartWorkflowExecution action or the StartChildWorkflowExecution+-- Decision.+wtcDefaultTaskList :: Lens' WorkflowTypeConfiguration (Maybe TaskList)+wtcDefaultTaskList =+ lens _wtcDefaultTaskList (\s a -> s { _wtcDefaultTaskList = a })++-- | The optional default maximum duration, specified when registering the+-- workflow type, that a decision task for executions of this workflow type+-- might take before returning completion or failure. If the task does not+-- close in the specified time then the task is automatically timed out and+-- rescheduled. If the decider eventually reports a completion or failure,+-- it is ignored. This default can be overridden when starting a workflow+-- execution using the StartWorkflowExecution action or the+-- StartChildWorkflowExecution Decision. The valid values are integers+-- greater than or equal to 0. An integer value can be used to specify the+-- duration in seconds while NONE can be used to specify unlimited duration.+wtcDefaultTaskStartToCloseTimeout :: Lens' WorkflowTypeConfiguration (Maybe Text)+wtcDefaultTaskStartToCloseTimeout =+ lens _wtcDefaultTaskStartToCloseTimeout+ (\s a -> s { _wtcDefaultTaskStartToCloseTimeout = a })++instance FromJSON WorkflowTypeConfiguration where+ parseJSON = withObject "WorkflowTypeConfiguration" $ \o -> WorkflowTypeConfiguration+ <$> o .:? "defaultChildPolicy"+ <*> o .:? "defaultExecutionStartToCloseTimeout"+ <*> o .:? "defaultTaskList"+ <*> o .:? "defaultTaskStartToCloseTimeout"++instance ToJSON WorkflowTypeConfiguration where+ toJSON WorkflowTypeConfiguration{..} = object+ [ "defaultTaskStartToCloseTimeout" .= _wtcDefaultTaskStartToCloseTimeout+ , "defaultExecutionStartToCloseTimeout" .= _wtcDefaultExecutionStartToCloseTimeout+ , "defaultTaskList" .= _wtcDefaultTaskList+ , "defaultChildPolicy" .= _wtcDefaultChildPolicy+ ]++data ActivityTaskTimeoutType+ = ATTTHeartbeat -- ^ HEARTBEAT+ | ATTTScheduleToClose -- ^ SCHEDULE_TO_CLOSE+ | ATTTScheduleToStart -- ^ SCHEDULE_TO_START+ | ATTTStartToClose -- ^ START_TO_CLOSE+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ActivityTaskTimeoutType++instance FromText ActivityTaskTimeoutType where+ parser = match "HEARTBEAT" ATTTHeartbeat+ <|> match "SCHEDULE_TO_CLOSE" ATTTScheduleToClose+ <|> match "SCHEDULE_TO_START" ATTTScheduleToStart+ <|> match "START_TO_CLOSE" ATTTStartToClose++instance ToText ActivityTaskTimeoutType where+ toText = \case+ ATTTHeartbeat -> "HEARTBEAT"+ ATTTScheduleToClose -> "SCHEDULE_TO_CLOSE"+ ATTTScheduleToStart -> "SCHEDULE_TO_START"+ ATTTStartToClose -> "START_TO_CLOSE"++instance FromJSON ActivityTaskTimeoutType where+ parseJSON = parseJSONText "ActivityTaskTimeoutType"++instance ToJSON ActivityTaskTimeoutType where+ toJSON = toJSONText++data WorkflowType = WorkflowType+ { _wtName :: Text+ , _wtVersion :: Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wtName' @::@ 'Text'+--+-- * 'wtVersion' @::@ 'Text'+--+workflowType :: Text -- ^ 'wtName'+ -> Text -- ^ 'wtVersion'+ -> WorkflowType+workflowType p1 p2 = WorkflowType+ { _wtName = p1+ , _wtVersion = p2+ }++-- | The name of the workflow type. This field is required.+wtName :: Lens' WorkflowType Text+wtName = lens _wtName (\s a -> s { _wtName = a })++-- | The version of the workflow type. This field is required.+wtVersion :: Lens' WorkflowType Text+wtVersion = lens _wtVersion (\s a -> s { _wtVersion = a })++instance FromJSON WorkflowType where+ parseJSON = withObject "WorkflowType" $ \o -> WorkflowType+ <$> o .: "name"+ <*> o .: "version"++instance ToJSON WorkflowType where+ toJSON WorkflowType{..} = object+ [ "name" .= _wtName+ , "version" .= _wtVersion+ ]++data ActivityTaskCompletedEventAttributes = ActivityTaskCompletedEventAttributes+ { _atceaResult :: Maybe Text+ , _atceaScheduledEventId :: Integer+ , _atceaStartedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'ActivityTaskCompletedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atceaResult' @::@ 'Maybe' 'Text'+--+-- * 'atceaScheduledEventId' @::@ 'Integer'+--+-- * 'atceaStartedEventId' @::@ 'Integer'+--+activityTaskCompletedEventAttributes :: Integer -- ^ 'atceaScheduledEventId'+ -> Integer -- ^ 'atceaStartedEventId'+ -> ActivityTaskCompletedEventAttributes+activityTaskCompletedEventAttributes p1 p2 = ActivityTaskCompletedEventAttributes+ { _atceaScheduledEventId = p1+ , _atceaStartedEventId = p2+ , _atceaResult = Nothing+ }++-- | The results of the activity task (if any).+atceaResult :: Lens' ActivityTaskCompletedEventAttributes (Maybe Text)+atceaResult = lens _atceaResult (\s a -> s { _atceaResult = a })++-- | The id of the ActivityTaskScheduled event that was recorded when this+-- activity task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+atceaScheduledEventId :: Lens' ActivityTaskCompletedEventAttributes Integer+atceaScheduledEventId =+ lens _atceaScheduledEventId (\s a -> s { _atceaScheduledEventId = a })++-- | The Id of the ActivityTaskStarted event recorded when this activity task+-- was started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+atceaStartedEventId :: Lens' ActivityTaskCompletedEventAttributes Integer+atceaStartedEventId =+ lens _atceaStartedEventId (\s a -> s { _atceaStartedEventId = a })++instance FromJSON ActivityTaskCompletedEventAttributes where+ parseJSON = withObject "ActivityTaskCompletedEventAttributes" $ \o -> ActivityTaskCompletedEventAttributes+ <$> o .:? "result"+ <*> o .: "scheduledEventId"+ <*> o .: "startedEventId"++instance ToJSON ActivityTaskCompletedEventAttributes where+ toJSON ActivityTaskCompletedEventAttributes{..} = object+ [ "result" .= _atceaResult+ , "scheduledEventId" .= _atceaScheduledEventId+ , "startedEventId" .= _atceaStartedEventId+ ]++data ExecutionStatus+ = Closed -- ^ CLOSED+ | Open -- ^ OPEN+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ExecutionStatus++instance FromText ExecutionStatus where+ parser = match "CLOSED" Closed+ <|> match "OPEN" Open++instance ToText ExecutionStatus where+ toText = \case+ Closed -> "CLOSED"+ Open -> "OPEN"++instance FromJSON ExecutionStatus where+ parseJSON = parseJSONText "ExecutionStatus"++instance ToJSON ExecutionStatus where+ toJSON = toJSONText++data DecisionTaskTimeoutType+ = DTTTStartToClose -- ^ START_TO_CLOSE+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable DecisionTaskTimeoutType++instance FromText DecisionTaskTimeoutType where+ parser = match "START_TO_CLOSE" DTTTStartToClose++instance ToText DecisionTaskTimeoutType where+ toText DTTTStartToClose = "START_TO_CLOSE"++instance FromJSON DecisionTaskTimeoutType where+ parseJSON = parseJSONText "DecisionTaskTimeoutType"++instance ToJSON DecisionTaskTimeoutType where+ toJSON = toJSONText++data WorkflowExecutionCancelRequestedCause+ = WECRCChildPolicyApplied -- ^ CHILD_POLICY_APPLIED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable WorkflowExecutionCancelRequestedCause++instance FromText WorkflowExecutionCancelRequestedCause where+ parser = match "CHILD_POLICY_APPLIED" WECRCChildPolicyApplied++instance ToText WorkflowExecutionCancelRequestedCause where+ toText WECRCChildPolicyApplied = "CHILD_POLICY_APPLIED"++instance FromJSON WorkflowExecutionCancelRequestedCause where+ parseJSON = parseJSONText "WorkflowExecutionCancelRequestedCause"++instance ToJSON WorkflowExecutionCancelRequestedCause where+ toJSON = toJSONText++data StartChildWorkflowExecutionFailedCause+ = SCWEFCChildCreationRateExceeded -- ^ CHILD_CREATION_RATE_EXCEEDED+ | SCWEFCDefaultChildPolicyUndefined -- ^ DEFAULT_CHILD_POLICY_UNDEFINED+ | SCWEFCDefaultExecutionStartToCloseTimeoutUndefined -- ^ DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED+ | SCWEFCDefaultTaskListUndefined -- ^ DEFAULT_TASK_LIST_UNDEFINED+ | SCWEFCDefaultTaskStartToCloseTimeoutUndefined -- ^ DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED+ | SCWEFCOpenChildrenLimitExceeded -- ^ OPEN_CHILDREN_LIMIT_EXCEEDED+ | SCWEFCOpenWorkflowsLimitExceeded -- ^ OPEN_WORKFLOWS_LIMIT_EXCEEDED+ | SCWEFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | SCWEFCWorkflowAlreadyRunning -- ^ WORKFLOW_ALREADY_RUNNING+ | SCWEFCWorkflowTypeDeprecated -- ^ WORKFLOW_TYPE_DEPRECATED+ | SCWEFCWorkflowTypeDoesNotExist -- ^ WORKFLOW_TYPE_DOES_NOT_EXIST+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable StartChildWorkflowExecutionFailedCause++instance FromText StartChildWorkflowExecutionFailedCause where+ parser = match "CHILD_CREATION_RATE_EXCEEDED" SCWEFCChildCreationRateExceeded+ <|> match "DEFAULT_CHILD_POLICY_UNDEFINED" SCWEFCDefaultChildPolicyUndefined+ <|> match "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED" SCWEFCDefaultExecutionStartToCloseTimeoutUndefined+ <|> match "DEFAULT_TASK_LIST_UNDEFINED" SCWEFCDefaultTaskListUndefined+ <|> match "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED" SCWEFCDefaultTaskStartToCloseTimeoutUndefined+ <|> match "OPEN_CHILDREN_LIMIT_EXCEEDED" SCWEFCOpenChildrenLimitExceeded+ <|> match "OPEN_WORKFLOWS_LIMIT_EXCEEDED" SCWEFCOpenWorkflowsLimitExceeded+ <|> match "OPERATION_NOT_PERMITTED" SCWEFCOperationNotPermitted+ <|> match "WORKFLOW_ALREADY_RUNNING" SCWEFCWorkflowAlreadyRunning+ <|> match "WORKFLOW_TYPE_DEPRECATED" SCWEFCWorkflowTypeDeprecated+ <|> match "WORKFLOW_TYPE_DOES_NOT_EXIST" SCWEFCWorkflowTypeDoesNotExist++instance ToText StartChildWorkflowExecutionFailedCause where+ toText = \case+ SCWEFCChildCreationRateExceeded -> "CHILD_CREATION_RATE_EXCEEDED"+ SCWEFCDefaultChildPolicyUndefined -> "DEFAULT_CHILD_POLICY_UNDEFINED"+ SCWEFCDefaultExecutionStartToCloseTimeoutUndefined -> "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED"+ SCWEFCDefaultTaskListUndefined -> "DEFAULT_TASK_LIST_UNDEFINED"+ SCWEFCDefaultTaskStartToCloseTimeoutUndefined -> "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED"+ SCWEFCOpenChildrenLimitExceeded -> "OPEN_CHILDREN_LIMIT_EXCEEDED"+ SCWEFCOpenWorkflowsLimitExceeded -> "OPEN_WORKFLOWS_LIMIT_EXCEEDED"+ SCWEFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ SCWEFCWorkflowAlreadyRunning -> "WORKFLOW_ALREADY_RUNNING"+ SCWEFCWorkflowTypeDeprecated -> "WORKFLOW_TYPE_DEPRECATED"+ SCWEFCWorkflowTypeDoesNotExist -> "WORKFLOW_TYPE_DOES_NOT_EXIST"++instance FromJSON StartChildWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "StartChildWorkflowExecutionFailedCause"++instance ToJSON StartChildWorkflowExecutionFailedCause where+ toJSON = toJSONText++data DecisionTaskTimedOutEventAttributes = DecisionTaskTimedOutEventAttributes+ { _dttoeaScheduledEventId :: Integer+ , _dttoeaStartedEventId :: Integer+ , _dttoeaTimeoutType :: Text+ } deriving (Eq, Ord, Show)++-- | 'DecisionTaskTimedOutEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dttoeaScheduledEventId' @::@ 'Integer'+--+-- * 'dttoeaStartedEventId' @::@ 'Integer'+--+-- * 'dttoeaTimeoutType' @::@ 'Text'+--+decisionTaskTimedOutEventAttributes :: Text -- ^ 'dttoeaTimeoutType'+ -> Integer -- ^ 'dttoeaScheduledEventId'+ -> Integer -- ^ 'dttoeaStartedEventId'+ -> DecisionTaskTimedOutEventAttributes+decisionTaskTimedOutEventAttributes p1 p2 p3 = DecisionTaskTimedOutEventAttributes+ { _dttoeaTimeoutType = p1+ , _dttoeaScheduledEventId = p2+ , _dttoeaStartedEventId = p3+ }++-- | The id of the DecisionTaskScheduled event that was recorded when this+-- decision task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+dttoeaScheduledEventId :: Lens' DecisionTaskTimedOutEventAttributes Integer+dttoeaScheduledEventId =+ lens _dttoeaScheduledEventId (\s a -> s { _dttoeaScheduledEventId = a })++-- | The Id of the DecisionTaskStarted event recorded when this decision task+-- was started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+dttoeaStartedEventId :: Lens' DecisionTaskTimedOutEventAttributes Integer+dttoeaStartedEventId =+ lens _dttoeaStartedEventId (\s a -> s { _dttoeaStartedEventId = a })++-- | The type of timeout that expired before the decision task could be+-- completed.+dttoeaTimeoutType :: Lens' DecisionTaskTimedOutEventAttributes Text+dttoeaTimeoutType =+ lens _dttoeaTimeoutType (\s a -> s { _dttoeaTimeoutType = a })++instance FromJSON DecisionTaskTimedOutEventAttributes where+ parseJSON = withObject "DecisionTaskTimedOutEventAttributes" $ \o -> DecisionTaskTimedOutEventAttributes+ <$> o .: "scheduledEventId"+ <*> o .: "startedEventId"+ <*> o .: "timeoutType"++instance ToJSON DecisionTaskTimedOutEventAttributes where+ toJSON DecisionTaskTimedOutEventAttributes{..} = object+ [ "timeoutType" .= _dttoeaTimeoutType+ , "scheduledEventId" .= _dttoeaScheduledEventId+ , "startedEventId" .= _dttoeaStartedEventId+ ]++data ChildWorkflowExecutionStartedEventAttributes = ChildWorkflowExecutionStartedEventAttributes+ { _cweseaInitiatedEventId :: Integer+ , _cweseaWorkflowExecution :: WorkflowExecution+ , _cweseaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'ChildWorkflowExecutionStartedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cweseaInitiatedEventId' @::@ 'Integer'+--+-- * 'cweseaWorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'cweseaWorkflowType' @::@ 'WorkflowType'+--+childWorkflowExecutionStartedEventAttributes :: WorkflowExecution -- ^ 'cweseaWorkflowExecution'+ -> WorkflowType -- ^ 'cweseaWorkflowType'+ -> Integer -- ^ 'cweseaInitiatedEventId'+ -> ChildWorkflowExecutionStartedEventAttributes+childWorkflowExecutionStartedEventAttributes p1 p2 p3 = ChildWorkflowExecutionStartedEventAttributes+ { _cweseaWorkflowExecution = p1+ , _cweseaWorkflowType = p2+ , _cweseaInitiatedEventId = p3+ }++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+cweseaInitiatedEventId :: Lens' ChildWorkflowExecutionStartedEventAttributes Integer+cweseaInitiatedEventId =+ lens _cweseaInitiatedEventId (\s a -> s { _cweseaInitiatedEventId = a })++-- | The child workflow execution that was started.+cweseaWorkflowExecution :: Lens' ChildWorkflowExecutionStartedEventAttributes WorkflowExecution+cweseaWorkflowExecution =+ lens _cweseaWorkflowExecution (\s a -> s { _cweseaWorkflowExecution = a })++-- | The type of the child workflow execution.+cweseaWorkflowType :: Lens' ChildWorkflowExecutionStartedEventAttributes WorkflowType+cweseaWorkflowType =+ lens _cweseaWorkflowType (\s a -> s { _cweseaWorkflowType = a })++instance FromJSON ChildWorkflowExecutionStartedEventAttributes where+ parseJSON = withObject "ChildWorkflowExecutionStartedEventAttributes" $ \o -> ChildWorkflowExecutionStartedEventAttributes+ <$> o .: "initiatedEventId"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance ToJSON ChildWorkflowExecutionStartedEventAttributes where+ toJSON ChildWorkflowExecutionStartedEventAttributes{..} = object+ [ "workflowExecution" .= _cweseaWorkflowExecution+ , "workflowType" .= _cweseaWorkflowType+ , "initiatedEventId" .= _cweseaInitiatedEventId+ ]++data CancelTimerFailedEventAttributes = CancelTimerFailedEventAttributes+ { _ctfeaCause :: Text+ , _ctfeaDecisionTaskCompletedEventId :: Integer+ , _ctfeaTimerId :: Text+ } deriving (Eq, Ord, Show)++-- | 'CancelTimerFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ctfeaCause' @::@ 'Text'+--+-- * 'ctfeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'ctfeaTimerId' @::@ 'Text'+--+cancelTimerFailedEventAttributes :: Text -- ^ 'ctfeaTimerId'+ -> Text -- ^ 'ctfeaCause'+ -> Integer -- ^ 'ctfeaDecisionTaskCompletedEventId'+ -> CancelTimerFailedEventAttributes+cancelTimerFailedEventAttributes p1 p2 p3 = CancelTimerFailedEventAttributes+ { _ctfeaTimerId = p1+ , _ctfeaCause = p2+ , _ctfeaDecisionTaskCompletedEventId = p3+ }++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+ctfeaCause :: Lens' CancelTimerFailedEventAttributes Text+ctfeaCause = lens _ctfeaCause (\s a -> s { _ctfeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the CancelTimer decision to cancel this timer. This+-- information can be useful for diagnosing problems by tracing back the+-- cause of events.+ctfeaDecisionTaskCompletedEventId :: Lens' CancelTimerFailedEventAttributes Integer+ctfeaDecisionTaskCompletedEventId =+ lens _ctfeaDecisionTaskCompletedEventId+ (\s a -> s { _ctfeaDecisionTaskCompletedEventId = a })++-- | The timerId provided in the CancelTimer decision that failed.+ctfeaTimerId :: Lens' CancelTimerFailedEventAttributes Text+ctfeaTimerId = lens _ctfeaTimerId (\s a -> s { _ctfeaTimerId = a })++instance FromJSON CancelTimerFailedEventAttributes where+ parseJSON = withObject "CancelTimerFailedEventAttributes" $ \o -> CancelTimerFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "timerId"++instance ToJSON CancelTimerFailedEventAttributes where+ toJSON CancelTimerFailedEventAttributes{..} = object+ [ "timerId" .= _ctfeaTimerId+ , "cause" .= _ctfeaCause+ , "decisionTaskCompletedEventId" .= _ctfeaDecisionTaskCompletedEventId+ ]++data FailWorkflowExecutionFailedCause+ = FWEFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | FWEFCUnhandledDecision -- ^ UNHANDLED_DECISION+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable FailWorkflowExecutionFailedCause++instance FromText FailWorkflowExecutionFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" FWEFCOperationNotPermitted+ <|> match "UNHANDLED_DECISION" FWEFCUnhandledDecision++instance ToText FailWorkflowExecutionFailedCause where+ toText = \case+ FWEFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ FWEFCUnhandledDecision -> "UNHANDLED_DECISION"++instance FromJSON FailWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "FailWorkflowExecutionFailedCause"++instance ToJSON FailWorkflowExecutionFailedCause where+ toJSON = toJSONText++newtype WorkflowExecutionFilter = WorkflowExecutionFilter+ { _wefWorkflowId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'WorkflowExecutionFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wefWorkflowId' @::@ 'Text'+--+workflowExecutionFilter :: Text -- ^ 'wefWorkflowId'+ -> WorkflowExecutionFilter+workflowExecutionFilter p1 = WorkflowExecutionFilter+ { _wefWorkflowId = p1+ }++-- | The workflowId to pass of match the criteria of this filter.+wefWorkflowId :: Lens' WorkflowExecutionFilter Text+wefWorkflowId = lens _wefWorkflowId (\s a -> s { _wefWorkflowId = a })++instance FromJSON WorkflowExecutionFilter where+ parseJSON = withObject "WorkflowExecutionFilter" $ \o -> WorkflowExecutionFilter+ <$> o .: "workflowId"++instance ToJSON WorkflowExecutionFilter where+ toJSON WorkflowExecutionFilter{..} = object+ [ "workflowId" .= _wefWorkflowId+ ]++data ActivityTaskCanceledEventAttributes = ActivityTaskCanceledEventAttributes+ { _atcea1Details :: Maybe Text+ , _atcea1LatestCancelRequestedEventId :: Maybe Integer+ , _atcea1ScheduledEventId :: Integer+ , _atcea1StartedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'ActivityTaskCanceledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atcea1Details' @::@ 'Maybe' 'Text'+--+-- * 'atcea1LatestCancelRequestedEventId' @::@ 'Maybe' 'Integer'+--+-- * 'atcea1ScheduledEventId' @::@ 'Integer'+--+-- * 'atcea1StartedEventId' @::@ 'Integer'+--+activityTaskCanceledEventAttributes :: Integer -- ^ 'atcea1ScheduledEventId'+ -> Integer -- ^ 'atcea1StartedEventId'+ -> ActivityTaskCanceledEventAttributes+activityTaskCanceledEventAttributes p1 p2 = ActivityTaskCanceledEventAttributes+ { _atcea1ScheduledEventId = p1+ , _atcea1StartedEventId = p2+ , _atcea1Details = Nothing+ , _atcea1LatestCancelRequestedEventId = Nothing+ }++-- | Details of the cancellation (if any).+atcea1Details :: Lens' ActivityTaskCanceledEventAttributes (Maybe Text)+atcea1Details = lens _atcea1Details (\s a -> s { _atcea1Details = a })++-- | If set, contains the Id of the last ActivityTaskCancelRequested event+-- recorded for this activity task. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+atcea1LatestCancelRequestedEventId :: Lens' ActivityTaskCanceledEventAttributes (Maybe Integer)+atcea1LatestCancelRequestedEventId =+ lens _atcea1LatestCancelRequestedEventId+ (\s a -> s { _atcea1LatestCancelRequestedEventId = a })++-- | The id of the ActivityTaskScheduled event that was recorded when this+-- activity task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+atcea1ScheduledEventId :: Lens' ActivityTaskCanceledEventAttributes Integer+atcea1ScheduledEventId =+ lens _atcea1ScheduledEventId (\s a -> s { _atcea1ScheduledEventId = a })++-- | The Id of the ActivityTaskStarted event recorded when this activity task+-- was started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+atcea1StartedEventId :: Lens' ActivityTaskCanceledEventAttributes Integer+atcea1StartedEventId =+ lens _atcea1StartedEventId (\s a -> s { _atcea1StartedEventId = a })++instance FromJSON ActivityTaskCanceledEventAttributes where+ parseJSON = withObject "ActivityTaskCanceledEventAttributes" $ \o -> ActivityTaskCanceledEventAttributes+ <$> o .:? "details"+ <*> o .:? "latestCancelRequestedEventId"+ <*> o .: "scheduledEventId"+ <*> o .: "startedEventId"++instance ToJSON ActivityTaskCanceledEventAttributes where+ toJSON ActivityTaskCanceledEventAttributes{..} = object+ [ "details" .= _atcea1Details+ , "scheduledEventId" .= _atcea1ScheduledEventId+ , "startedEventId" .= _atcea1StartedEventId+ , "latestCancelRequestedEventId" .= _atcea1LatestCancelRequestedEventId+ ]++data WorkflowExecutionInfos = WorkflowExecutionInfos+ { _weiExecutionInfos :: List "executionInfos" WorkflowExecutionInfo+ , _weiNextPageToken :: Maybe Text+ } deriving (Eq, Show)++-- | 'WorkflowExecutionInfos' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weiExecutionInfos' @::@ ['WorkflowExecutionInfo']+--+-- * 'weiNextPageToken' @::@ 'Maybe' 'Text'+--+workflowExecutionInfos :: WorkflowExecutionInfos+workflowExecutionInfos = WorkflowExecutionInfos+ { _weiExecutionInfos = mempty+ , _weiNextPageToken = Nothing+ }++-- | The list of workflow information structures.+weiExecutionInfos :: Lens' WorkflowExecutionInfos [WorkflowExecutionInfo]+weiExecutionInfos =+ lens _weiExecutionInfos (\s a -> s { _weiExecutionInfos = a })+ . _List++-- | The token of the next page in the result. If set, the results have more+-- than one page. The next page can be retrieved by repeating the request+-- with this token and all other arguments unchanged.+weiNextPageToken :: Lens' WorkflowExecutionInfos (Maybe Text)+weiNextPageToken = lens _weiNextPageToken (\s a -> s { _weiNextPageToken = a })++instance FromJSON WorkflowExecutionInfos where+ parseJSON = withObject "WorkflowExecutionInfos" $ \o -> WorkflowExecutionInfos+ <$> o .: "executionInfos"+ <*> o .:? "nextPageToken"++instance ToJSON WorkflowExecutionInfos where+ toJSON WorkflowExecutionInfos{..} = object+ [ "executionInfos" .= _weiExecutionInfos+ , "nextPageToken" .= _weiNextPageToken+ ]++data StartChildWorkflowExecutionDecisionAttributes = StartChildWorkflowExecutionDecisionAttributes+ { _scwedaChildPolicy :: Maybe Text+ , _scwedaControl :: Maybe Text+ , _scwedaExecutionStartToCloseTimeout :: Maybe Text+ , _scwedaInput :: Maybe Text+ , _scwedaTagList :: List "tagList" Text+ , _scwedaTaskList :: Maybe TaskList+ , _scwedaTaskStartToCloseTimeout :: Maybe Text+ , _scwedaWorkflowId :: Text+ , _scwedaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'StartChildWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'scwedaChildPolicy' @::@ 'Maybe' 'Text'+--+-- * 'scwedaControl' @::@ 'Maybe' 'Text'+--+-- * 'scwedaExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'scwedaInput' @::@ 'Maybe' 'Text'+--+-- * 'scwedaTagList' @::@ ['Text']+--+-- * 'scwedaTaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'scwedaTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'scwedaWorkflowId' @::@ 'Text'+--+-- * 'scwedaWorkflowType' @::@ 'WorkflowType'+--+startChildWorkflowExecutionDecisionAttributes :: WorkflowType -- ^ 'scwedaWorkflowType'+ -> Text -- ^ 'scwedaWorkflowId'+ -> StartChildWorkflowExecutionDecisionAttributes+startChildWorkflowExecutionDecisionAttributes p1 p2 = StartChildWorkflowExecutionDecisionAttributes+ { _scwedaWorkflowType = p1+ , _scwedaWorkflowId = p2+ , _scwedaControl = Nothing+ , _scwedaInput = Nothing+ , _scwedaExecutionStartToCloseTimeout = Nothing+ , _scwedaTaskList = Nothing+ , _scwedaTaskStartToCloseTimeout = Nothing+ , _scwedaChildPolicy = Nothing+ , _scwedaTagList = mempty+ }++-- | If set, specifies the policy to use for the child workflow executions if+-- the workflow execution being started is terminated by calling the+-- TerminateWorkflowExecution action explicitly or due to an expired+-- timeout. This policy overrides the default child policy specified when+-- registering the workflow type using RegisterWorkflowType. The supported+-- child policies are: TERMINATE: the child executions will be terminated.+-- REQUEST_CANCEL: a request to cancel will be attempted for each child+-- execution by recording a WorkflowExecutionCancelRequested event in its+-- history. It is up to the decider to take appropriate actions when it+-- receives an execution history with this event. ABANDON: no action will be+-- taken. The child executions will continue to run.+scwedaChildPolicy :: Lens' StartChildWorkflowExecutionDecisionAttributes (Maybe Text)+scwedaChildPolicy =+ lens _scwedaChildPolicy (\s a -> s { _scwedaChildPolicy = a })++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks. This data is not sent to the child workflow+-- execution.+scwedaControl :: Lens' StartChildWorkflowExecutionDecisionAttributes (Maybe Text)+scwedaControl = lens _scwedaControl (\s a -> s { _scwedaControl = a })++-- | The total duration for this workflow execution. This overrides the+-- defaultExecutionStartToCloseTimeout specified when registering the+-- workflow type. The valid values are integers greater than or equal to 0.+-- An integer value can be used to specify the duration in seconds while+-- NONE can be used to specify unlimited duration.+scwedaExecutionStartToCloseTimeout :: Lens' StartChildWorkflowExecutionDecisionAttributes (Maybe Text)+scwedaExecutionStartToCloseTimeout =+ lens _scwedaExecutionStartToCloseTimeout+ (\s a -> s { _scwedaExecutionStartToCloseTimeout = a })++-- | The input to be provided to the workflow execution.+scwedaInput :: Lens' StartChildWorkflowExecutionDecisionAttributes (Maybe Text)+scwedaInput = lens _scwedaInput (\s a -> s { _scwedaInput = a })++-- | The list of tags to associate with the child workflow execution. A+-- maximum of 5 tags can be specified. You can list workflow executions with+-- a specific tag by calling ListOpenWorkflowExecutions or+-- ListClosedWorkflowExecutions and specifying a TagFilter.+scwedaTagList :: Lens' StartChildWorkflowExecutionDecisionAttributes [Text]+scwedaTagList = lens _scwedaTagList (\s a -> s { _scwedaTagList = a }) . _List++-- | The name of the task list to be used for decision tasks of the child+-- workflow execution. The specified string must not start or end with+-- whitespace. It must not contain a : (colon), / (slash), | (vertical bar),+-- or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it+-- must not contain the literal string "arn".+scwedaTaskList :: Lens' StartChildWorkflowExecutionDecisionAttributes (Maybe TaskList)+scwedaTaskList = lens _scwedaTaskList (\s a -> s { _scwedaTaskList = a })++-- | Specifies the maximum duration of decision tasks for this workflow+-- execution. This parameter overrides the defaultTaskStartToCloseTimout+-- specified when registering the workflow type using RegisterWorkflowType.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+scwedaTaskStartToCloseTimeout :: Lens' StartChildWorkflowExecutionDecisionAttributes (Maybe Text)+scwedaTaskStartToCloseTimeout =+ lens _scwedaTaskStartToCloseTimeout+ (\s a -> s { _scwedaTaskStartToCloseTimeout = a })++-- | The workflowId of the workflow execution. This field is required. The+-- specified string must not start or end with whitespace. It must not+-- contain a : (colon), / (slash), | (vertical bar), or any control+-- characters (\u0000-\u001f | \u007f - \u009f). Also, it must not contain+-- the literal string "arn".+scwedaWorkflowId :: Lens' StartChildWorkflowExecutionDecisionAttributes Text+scwedaWorkflowId = lens _scwedaWorkflowId (\s a -> s { _scwedaWorkflowId = a })++-- | The type of the workflow execution to be started. This field is required.+scwedaWorkflowType :: Lens' StartChildWorkflowExecutionDecisionAttributes WorkflowType+scwedaWorkflowType =+ lens _scwedaWorkflowType (\s a -> s { _scwedaWorkflowType = a })++instance FromJSON StartChildWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "StartChildWorkflowExecutionDecisionAttributes" $ \o -> StartChildWorkflowExecutionDecisionAttributes+ <$> o .:? "childPolicy"+ <*> o .:? "control"+ <*> o .:? "executionStartToCloseTimeout"+ <*> o .:? "input"+ <*> o .: "tagList"+ <*> o .:? "taskList"+ <*> o .:? "taskStartToCloseTimeout"+ <*> o .: "workflowId"+ <*> o .: "workflowType"++instance ToJSON StartChildWorkflowExecutionDecisionAttributes where+ toJSON StartChildWorkflowExecutionDecisionAttributes{..} = object+ [ "workflowType" .= _scwedaWorkflowType+ , "workflowId" .= _scwedaWorkflowId+ , "control" .= _scwedaControl+ , "input" .= _scwedaInput+ , "executionStartToCloseTimeout" .= _scwedaExecutionStartToCloseTimeout+ , "taskList" .= _scwedaTaskList+ , "taskStartToCloseTimeout" .= _scwedaTaskStartToCloseTimeout+ , "childPolicy" .= _scwedaChildPolicy+ , "tagList" .= _scwedaTagList+ ]++data ContinueAsNewWorkflowExecutionFailedCause+ = CANWEFCDefaultChildPolicyUndefined -- ^ DEFAULT_CHILD_POLICY_UNDEFINED+ | CANWEFCDefaultExecutionStartToCloseTimeoutUndefined -- ^ DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED+ | CANWEFCDefaultTaskListUndefined -- ^ DEFAULT_TASK_LIST_UNDEFINED+ | CANWEFCDefaultTaskStartToCloseTimeoutUndefined -- ^ DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED+ | CANWEFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | CANWEFCUnhandledDecision -- ^ UNHANDLED_DECISION+ | CANWEFCWorkflowTypeDeprecated -- ^ WORKFLOW_TYPE_DEPRECATED+ | CANWEFCWorkflowTypeDoesNotExist -- ^ WORKFLOW_TYPE_DOES_NOT_EXIST+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ContinueAsNewWorkflowExecutionFailedCause++instance FromText ContinueAsNewWorkflowExecutionFailedCause where+ parser = match "DEFAULT_CHILD_POLICY_UNDEFINED" CANWEFCDefaultChildPolicyUndefined+ <|> match "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED" CANWEFCDefaultExecutionStartToCloseTimeoutUndefined+ <|> match "DEFAULT_TASK_LIST_UNDEFINED" CANWEFCDefaultTaskListUndefined+ <|> match "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED" CANWEFCDefaultTaskStartToCloseTimeoutUndefined+ <|> match "OPERATION_NOT_PERMITTED" CANWEFCOperationNotPermitted+ <|> match "UNHANDLED_DECISION" CANWEFCUnhandledDecision+ <|> match "WORKFLOW_TYPE_DEPRECATED" CANWEFCWorkflowTypeDeprecated+ <|> match "WORKFLOW_TYPE_DOES_NOT_EXIST" CANWEFCWorkflowTypeDoesNotExist++instance ToText ContinueAsNewWorkflowExecutionFailedCause where+ toText = \case+ CANWEFCDefaultChildPolicyUndefined -> "DEFAULT_CHILD_POLICY_UNDEFINED"+ CANWEFCDefaultExecutionStartToCloseTimeoutUndefined -> "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED"+ CANWEFCDefaultTaskListUndefined -> "DEFAULT_TASK_LIST_UNDEFINED"+ CANWEFCDefaultTaskStartToCloseTimeoutUndefined -> "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED"+ CANWEFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ CANWEFCUnhandledDecision -> "UNHANDLED_DECISION"+ CANWEFCWorkflowTypeDeprecated -> "WORKFLOW_TYPE_DEPRECATED"+ CANWEFCWorkflowTypeDoesNotExist -> "WORKFLOW_TYPE_DOES_NOT_EXIST"++instance FromJSON ContinueAsNewWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "ContinueAsNewWorkflowExecutionFailedCause"++instance ToJSON ContinueAsNewWorkflowExecutionFailedCause where+ toJSON = toJSONText++data FailWorkflowExecutionDecisionAttributes = FailWorkflowExecutionDecisionAttributes+ { _fwedaDetails :: Maybe Text+ , _fwedaReason :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'FailWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fwedaDetails' @::@ 'Maybe' 'Text'+--+-- * 'fwedaReason' @::@ 'Maybe' 'Text'+--+failWorkflowExecutionDecisionAttributes :: FailWorkflowExecutionDecisionAttributes+failWorkflowExecutionDecisionAttributes = FailWorkflowExecutionDecisionAttributes+ { _fwedaReason = Nothing+ , _fwedaDetails = Nothing+ }++-- | Optional details of the failure.+fwedaDetails :: Lens' FailWorkflowExecutionDecisionAttributes (Maybe Text)+fwedaDetails = lens _fwedaDetails (\s a -> s { _fwedaDetails = a })++-- | A descriptive reason for the failure that may help in diagnostics.+fwedaReason :: Lens' FailWorkflowExecutionDecisionAttributes (Maybe Text)+fwedaReason = lens _fwedaReason (\s a -> s { _fwedaReason = a })++instance FromJSON FailWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "FailWorkflowExecutionDecisionAttributes" $ \o -> FailWorkflowExecutionDecisionAttributes+ <$> o .:? "details"+ <*> o .:? "reason"++instance ToJSON FailWorkflowExecutionDecisionAttributes where+ toJSON FailWorkflowExecutionDecisionAttributes{..} = object+ [ "reason" .= _fwedaReason+ , "details" .= _fwedaDetails+ ]++data EventType+ = ActivityTaskCancelRequested -- ^ ActivityTaskCancelRequested+ | ActivityTaskCanceled -- ^ ActivityTaskCanceled+ | ActivityTaskCompleted -- ^ ActivityTaskCompleted+ | ActivityTaskFailed -- ^ ActivityTaskFailed+ | ActivityTaskScheduled -- ^ ActivityTaskScheduled+ | ActivityTaskStarted -- ^ ActivityTaskStarted+ | ActivityTaskTimedOut -- ^ ActivityTaskTimedOut+ | CancelTimerFailed -- ^ CancelTimerFailed+ | CancelWorkflowExecutionFailed -- ^ CancelWorkflowExecutionFailed+ | ChildWorkflowExecutionCanceled -- ^ ChildWorkflowExecutionCanceled+ | ChildWorkflowExecutionCompleted -- ^ ChildWorkflowExecutionCompleted+ | ChildWorkflowExecutionFailed -- ^ ChildWorkflowExecutionFailed+ | ChildWorkflowExecutionStarted -- ^ ChildWorkflowExecutionStarted+ | ChildWorkflowExecutionTerminated -- ^ ChildWorkflowExecutionTerminated+ | ChildWorkflowExecutionTimedOut -- ^ ChildWorkflowExecutionTimedOut+ | CompleteWorkflowExecutionFailed -- ^ CompleteWorkflowExecutionFailed+ | ContinueAsNewWorkflowExecutionFailed -- ^ ContinueAsNewWorkflowExecutionFailed+ | DecisionTaskCompleted -- ^ DecisionTaskCompleted+ | DecisionTaskScheduled -- ^ DecisionTaskScheduled+ | DecisionTaskStarted -- ^ DecisionTaskStarted+ | DecisionTaskTimedOut -- ^ DecisionTaskTimedOut+ | ExternalWorkflowExecutionCancelRequested -- ^ ExternalWorkflowExecutionCancelRequested+ | ExternalWorkflowExecutionSignaled -- ^ ExternalWorkflowExecutionSignaled+ | FailWorkflowExecutionFailed -- ^ FailWorkflowExecutionFailed+ | MarkerRecorded -- ^ MarkerRecorded+ | RecordMarkerFailed -- ^ RecordMarkerFailed+ | RequestCancelActivityTaskFailed -- ^ RequestCancelActivityTaskFailed+ | RequestCancelExternalWorkflowExecutionFailed -- ^ RequestCancelExternalWorkflowExecutionFailed+ | RequestCancelExternalWorkflowExecutionInitiated -- ^ RequestCancelExternalWorkflowExecutionInitiated+ | ScheduleActivityTaskFailed -- ^ ScheduleActivityTaskFailed+ | SignalExternalWorkflowExecutionFailed -- ^ SignalExternalWorkflowExecutionFailed+ | SignalExternalWorkflowExecutionInitiated -- ^ SignalExternalWorkflowExecutionInitiated+ | StartChildWorkflowExecutionFailed -- ^ StartChildWorkflowExecutionFailed+ | StartChildWorkflowExecutionInitiated -- ^ StartChildWorkflowExecutionInitiated+ | StartTimerFailed -- ^ StartTimerFailed+ | TimerCanceled -- ^ TimerCanceled+ | TimerFired -- ^ TimerFired+ | TimerStarted -- ^ TimerStarted+ | WorkflowExecutionCancelRequested -- ^ WorkflowExecutionCancelRequested+ | WorkflowExecutionCanceled -- ^ WorkflowExecutionCanceled+ | WorkflowExecutionCompleted -- ^ WorkflowExecutionCompleted+ | WorkflowExecutionContinuedAsNew -- ^ WorkflowExecutionContinuedAsNew+ | WorkflowExecutionFailed -- ^ WorkflowExecutionFailed+ | WorkflowExecutionSignaled -- ^ WorkflowExecutionSignaled+ | WorkflowExecutionStarted -- ^ WorkflowExecutionStarted+ | WorkflowExecutionTerminated -- ^ WorkflowExecutionTerminated+ | WorkflowExecutionTimedOut -- ^ WorkflowExecutionTimedOut+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable EventType++instance FromText EventType where+ parser = match "ActivityTaskCancelRequested" ActivityTaskCancelRequested+ <|> match "ActivityTaskCanceled" ActivityTaskCanceled+ <|> match "ActivityTaskCompleted" ActivityTaskCompleted+ <|> match "ActivityTaskFailed" ActivityTaskFailed+ <|> match "ActivityTaskScheduled" ActivityTaskScheduled+ <|> match "ActivityTaskStarted" ActivityTaskStarted+ <|> match "ActivityTaskTimedOut" ActivityTaskTimedOut+ <|> match "CancelTimerFailed" CancelTimerFailed+ <|> match "CancelWorkflowExecutionFailed" CancelWorkflowExecutionFailed+ <|> match "ChildWorkflowExecutionCanceled" ChildWorkflowExecutionCanceled+ <|> match "ChildWorkflowExecutionCompleted" ChildWorkflowExecutionCompleted+ <|> match "ChildWorkflowExecutionFailed" ChildWorkflowExecutionFailed+ <|> match "ChildWorkflowExecutionStarted" ChildWorkflowExecutionStarted+ <|> match "ChildWorkflowExecutionTerminated" ChildWorkflowExecutionTerminated+ <|> match "ChildWorkflowExecutionTimedOut" ChildWorkflowExecutionTimedOut+ <|> match "CompleteWorkflowExecutionFailed" CompleteWorkflowExecutionFailed+ <|> match "ContinueAsNewWorkflowExecutionFailed" ContinueAsNewWorkflowExecutionFailed+ <|> match "DecisionTaskCompleted" DecisionTaskCompleted+ <|> match "DecisionTaskScheduled" DecisionTaskScheduled+ <|> match "DecisionTaskStarted" DecisionTaskStarted+ <|> match "DecisionTaskTimedOut" DecisionTaskTimedOut+ <|> match "ExternalWorkflowExecutionCancelRequested" ExternalWorkflowExecutionCancelRequested+ <|> match "ExternalWorkflowExecutionSignaled" ExternalWorkflowExecutionSignaled+ <|> match "FailWorkflowExecutionFailed" FailWorkflowExecutionFailed+ <|> match "MarkerRecorded" MarkerRecorded+ <|> match "RecordMarkerFailed" RecordMarkerFailed+ <|> match "RequestCancelActivityTaskFailed" RequestCancelActivityTaskFailed+ <|> match "RequestCancelExternalWorkflowExecutionFailed" RequestCancelExternalWorkflowExecutionFailed+ <|> match "RequestCancelExternalWorkflowExecutionInitiated" RequestCancelExternalWorkflowExecutionInitiated+ <|> match "ScheduleActivityTaskFailed" ScheduleActivityTaskFailed+ <|> match "SignalExternalWorkflowExecutionFailed" SignalExternalWorkflowExecutionFailed+ <|> match "SignalExternalWorkflowExecutionInitiated" SignalExternalWorkflowExecutionInitiated+ <|> match "StartChildWorkflowExecutionFailed" StartChildWorkflowExecutionFailed+ <|> match "StartChildWorkflowExecutionInitiated" StartChildWorkflowExecutionInitiated+ <|> match "StartTimerFailed" StartTimerFailed+ <|> match "TimerCanceled" TimerCanceled+ <|> match "TimerFired" TimerFired+ <|> match "TimerStarted" TimerStarted+ <|> match "WorkflowExecutionCancelRequested" WorkflowExecutionCancelRequested+ <|> match "WorkflowExecutionCanceled" WorkflowExecutionCanceled+ <|> match "WorkflowExecutionCompleted" WorkflowExecutionCompleted+ <|> match "WorkflowExecutionContinuedAsNew" WorkflowExecutionContinuedAsNew+ <|> match "WorkflowExecutionFailed" WorkflowExecutionFailed+ <|> match "WorkflowExecutionSignaled" WorkflowExecutionSignaled+ <|> match "WorkflowExecutionStarted" WorkflowExecutionStarted+ <|> match "WorkflowExecutionTerminated" WorkflowExecutionTerminated+ <|> match "WorkflowExecutionTimedOut" WorkflowExecutionTimedOut++instance ToText EventType where+ toText = \case+ ActivityTaskCancelRequested -> "ActivityTaskCancelRequested"+ ActivityTaskCanceled -> "ActivityTaskCanceled"+ ActivityTaskCompleted -> "ActivityTaskCompleted"+ ActivityTaskFailed -> "ActivityTaskFailed"+ ActivityTaskScheduled -> "ActivityTaskScheduled"+ ActivityTaskStarted -> "ActivityTaskStarted"+ ActivityTaskTimedOut -> "ActivityTaskTimedOut"+ CancelTimerFailed -> "CancelTimerFailed"+ CancelWorkflowExecutionFailed -> "CancelWorkflowExecutionFailed"+ ChildWorkflowExecutionCanceled -> "ChildWorkflowExecutionCanceled"+ ChildWorkflowExecutionCompleted -> "ChildWorkflowExecutionCompleted"+ ChildWorkflowExecutionFailed -> "ChildWorkflowExecutionFailed"+ ChildWorkflowExecutionStarted -> "ChildWorkflowExecutionStarted"+ ChildWorkflowExecutionTerminated -> "ChildWorkflowExecutionTerminated"+ ChildWorkflowExecutionTimedOut -> "ChildWorkflowExecutionTimedOut"+ CompleteWorkflowExecutionFailed -> "CompleteWorkflowExecutionFailed"+ ContinueAsNewWorkflowExecutionFailed -> "ContinueAsNewWorkflowExecutionFailed"+ DecisionTaskCompleted -> "DecisionTaskCompleted"+ DecisionTaskScheduled -> "DecisionTaskScheduled"+ DecisionTaskStarted -> "DecisionTaskStarted"+ DecisionTaskTimedOut -> "DecisionTaskTimedOut"+ ExternalWorkflowExecutionCancelRequested -> "ExternalWorkflowExecutionCancelRequested"+ ExternalWorkflowExecutionSignaled -> "ExternalWorkflowExecutionSignaled"+ FailWorkflowExecutionFailed -> "FailWorkflowExecutionFailed"+ MarkerRecorded -> "MarkerRecorded"+ RecordMarkerFailed -> "RecordMarkerFailed"+ RequestCancelActivityTaskFailed -> "RequestCancelActivityTaskFailed"+ RequestCancelExternalWorkflowExecutionFailed -> "RequestCancelExternalWorkflowExecutionFailed"+ RequestCancelExternalWorkflowExecutionInitiated -> "RequestCancelExternalWorkflowExecutionInitiated"+ ScheduleActivityTaskFailed -> "ScheduleActivityTaskFailed"+ SignalExternalWorkflowExecutionFailed -> "SignalExternalWorkflowExecutionFailed"+ SignalExternalWorkflowExecutionInitiated -> "SignalExternalWorkflowExecutionInitiated"+ StartChildWorkflowExecutionFailed -> "StartChildWorkflowExecutionFailed"+ StartChildWorkflowExecutionInitiated -> "StartChildWorkflowExecutionInitiated"+ StartTimerFailed -> "StartTimerFailed"+ TimerCanceled -> "TimerCanceled"+ TimerFired -> "TimerFired"+ TimerStarted -> "TimerStarted"+ WorkflowExecutionCancelRequested -> "WorkflowExecutionCancelRequested"+ WorkflowExecutionCanceled -> "WorkflowExecutionCanceled"+ WorkflowExecutionCompleted -> "WorkflowExecutionCompleted"+ WorkflowExecutionContinuedAsNew -> "WorkflowExecutionContinuedAsNew"+ WorkflowExecutionFailed -> "WorkflowExecutionFailed"+ WorkflowExecutionSignaled -> "WorkflowExecutionSignaled"+ WorkflowExecutionStarted -> "WorkflowExecutionStarted"+ WorkflowExecutionTerminated -> "WorkflowExecutionTerminated"+ WorkflowExecutionTimedOut -> "WorkflowExecutionTimedOut"++instance FromJSON EventType where+ parseJSON = parseJSONText "EventType"++instance ToJSON EventType where+ toJSON = toJSONText++data ActivityTaskTimedOutEventAttributes = ActivityTaskTimedOutEventAttributes+ { _attoeaDetails :: Maybe Text+ , _attoeaScheduledEventId :: Integer+ , _attoeaStartedEventId :: Integer+ , _attoeaTimeoutType :: Text+ } deriving (Eq, Ord, Show)++-- | 'ActivityTaskTimedOutEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'attoeaDetails' @::@ 'Maybe' 'Text'+--+-- * 'attoeaScheduledEventId' @::@ 'Integer'+--+-- * 'attoeaStartedEventId' @::@ 'Integer'+--+-- * 'attoeaTimeoutType' @::@ 'Text'+--+activityTaskTimedOutEventAttributes :: Text -- ^ 'attoeaTimeoutType'+ -> Integer -- ^ 'attoeaScheduledEventId'+ -> Integer -- ^ 'attoeaStartedEventId'+ -> ActivityTaskTimedOutEventAttributes+activityTaskTimedOutEventAttributes p1 p2 p3 = ActivityTaskTimedOutEventAttributes+ { _attoeaTimeoutType = p1+ , _attoeaScheduledEventId = p2+ , _attoeaStartedEventId = p3+ , _attoeaDetails = Nothing+ }++-- | Contains the content of the details parameter for the last call made by+-- the activity to RecordActivityTaskHeartbeat.+attoeaDetails :: Lens' ActivityTaskTimedOutEventAttributes (Maybe Text)+attoeaDetails = lens _attoeaDetails (\s a -> s { _attoeaDetails = a })++-- | The id of the ActivityTaskScheduled event that was recorded when this+-- activity task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+attoeaScheduledEventId :: Lens' ActivityTaskTimedOutEventAttributes Integer+attoeaScheduledEventId =+ lens _attoeaScheduledEventId (\s a -> s { _attoeaScheduledEventId = a })++-- | The Id of the ActivityTaskStarted event recorded when this activity task+-- was started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+attoeaStartedEventId :: Lens' ActivityTaskTimedOutEventAttributes Integer+attoeaStartedEventId =+ lens _attoeaStartedEventId (\s a -> s { _attoeaStartedEventId = a })++-- | The type of the timeout that caused this event.+attoeaTimeoutType :: Lens' ActivityTaskTimedOutEventAttributes Text+attoeaTimeoutType =+ lens _attoeaTimeoutType (\s a -> s { _attoeaTimeoutType = a })++instance FromJSON ActivityTaskTimedOutEventAttributes where+ parseJSON = withObject "ActivityTaskTimedOutEventAttributes" $ \o -> ActivityTaskTimedOutEventAttributes+ <$> o .:? "details"+ <*> o .: "scheduledEventId"+ <*> o .: "startedEventId"+ <*> o .: "timeoutType"++instance ToJSON ActivityTaskTimedOutEventAttributes where+ toJSON ActivityTaskTimedOutEventAttributes{..} = object+ [ "timeoutType" .= _attoeaTimeoutType+ , "scheduledEventId" .= _attoeaScheduledEventId+ , "startedEventId" .= _attoeaStartedEventId+ , "details" .= _attoeaDetails+ ]++data RequestCancelActivityTaskFailedEventAttributes = RequestCancelActivityTaskFailedEventAttributes+ { _rcatfeaActivityId :: Text+ , _rcatfeaCause :: Text+ , _rcatfeaDecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'RequestCancelActivityTaskFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rcatfeaActivityId' @::@ 'Text'+--+-- * 'rcatfeaCause' @::@ 'Text'+--+-- * 'rcatfeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+requestCancelActivityTaskFailedEventAttributes :: Text -- ^ 'rcatfeaActivityId'+ -> Text -- ^ 'rcatfeaCause'+ -> Integer -- ^ 'rcatfeaDecisionTaskCompletedEventId'+ -> RequestCancelActivityTaskFailedEventAttributes+requestCancelActivityTaskFailedEventAttributes p1 p2 p3 = RequestCancelActivityTaskFailedEventAttributes+ { _rcatfeaActivityId = p1+ , _rcatfeaCause = p2+ , _rcatfeaDecisionTaskCompletedEventId = p3+ }++-- | The activityId provided in the RequestCancelActivityTask decision that+-- failed.+rcatfeaActivityId :: Lens' RequestCancelActivityTaskFailedEventAttributes Text+rcatfeaActivityId =+ lens _rcatfeaActivityId (\s a -> s { _rcatfeaActivityId = a })++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+rcatfeaCause :: Lens' RequestCancelActivityTaskFailedEventAttributes Text+rcatfeaCause = lens _rcatfeaCause (\s a -> s { _rcatfeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the RequestCancelActivityTask decision for this+-- cancellation request. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+rcatfeaDecisionTaskCompletedEventId :: Lens' RequestCancelActivityTaskFailedEventAttributes Integer+rcatfeaDecisionTaskCompletedEventId =+ lens _rcatfeaDecisionTaskCompletedEventId+ (\s a -> s { _rcatfeaDecisionTaskCompletedEventId = a })++instance FromJSON RequestCancelActivityTaskFailedEventAttributes where+ parseJSON = withObject "RequestCancelActivityTaskFailedEventAttributes" $ \o -> RequestCancelActivityTaskFailedEventAttributes+ <$> o .: "activityId"+ <*> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON RequestCancelActivityTaskFailedEventAttributes where+ toJSON RequestCancelActivityTaskFailedEventAttributes{..} = object+ [ "activityId" .= _rcatfeaActivityId+ , "cause" .= _rcatfeaCause+ , "decisionTaskCompletedEventId" .= _rcatfeaDecisionTaskCompletedEventId+ ]++newtype CompleteWorkflowExecutionDecisionAttributes = CompleteWorkflowExecutionDecisionAttributes+ { _cwedaResult :: Maybe Text+ } deriving (Eq, Ord, Show, Monoid)++-- | 'CompleteWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwedaResult' @::@ 'Maybe' 'Text'+--+completeWorkflowExecutionDecisionAttributes :: CompleteWorkflowExecutionDecisionAttributes+completeWorkflowExecutionDecisionAttributes = CompleteWorkflowExecutionDecisionAttributes+ { _cwedaResult = Nothing+ }++-- | The result of the workflow execution. The form of the result is+-- implementation defined.+cwedaResult :: Lens' CompleteWorkflowExecutionDecisionAttributes (Maybe Text)+cwedaResult = lens _cwedaResult (\s a -> s { _cwedaResult = a })++instance FromJSON CompleteWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "CompleteWorkflowExecutionDecisionAttributes" $ \o -> CompleteWorkflowExecutionDecisionAttributes+ <$> o .:? "result"++instance ToJSON CompleteWorkflowExecutionDecisionAttributes where+ toJSON CompleteWorkflowExecutionDecisionAttributes{..} = object+ [ "result" .= _cwedaResult+ ]++data DecisionTaskStartedEventAttributes = DecisionTaskStartedEventAttributes+ { _dtseaIdentity :: Maybe Text+ , _dtseaScheduledEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'DecisionTaskStartedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dtseaIdentity' @::@ 'Maybe' 'Text'+--+-- * 'dtseaScheduledEventId' @::@ 'Integer'+--+decisionTaskStartedEventAttributes :: Integer -- ^ 'dtseaScheduledEventId'+ -> DecisionTaskStartedEventAttributes+decisionTaskStartedEventAttributes p1 = DecisionTaskStartedEventAttributes+ { _dtseaScheduledEventId = p1+ , _dtseaIdentity = Nothing+ }++-- | Identity of the decider making the request. This enables diagnostic+-- tracing when problems arise. The form of this identity is user defined.+dtseaIdentity :: Lens' DecisionTaskStartedEventAttributes (Maybe Text)+dtseaIdentity = lens _dtseaIdentity (\s a -> s { _dtseaIdentity = a })++-- | The id of the DecisionTaskScheduled event that was recorded when this+-- decision task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+dtseaScheduledEventId :: Lens' DecisionTaskStartedEventAttributes Integer+dtseaScheduledEventId =+ lens _dtseaScheduledEventId (\s a -> s { _dtseaScheduledEventId = a })++instance FromJSON DecisionTaskStartedEventAttributes where+ parseJSON = withObject "DecisionTaskStartedEventAttributes" $ \o -> DecisionTaskStartedEventAttributes+ <$> o .:? "identity"+ <*> o .: "scheduledEventId"++instance ToJSON DecisionTaskStartedEventAttributes where+ toJSON DecisionTaskStartedEventAttributes{..} = object+ [ "identity" .= _dtseaIdentity+ , "scheduledEventId" .= _dtseaScheduledEventId+ ]++data ChildWorkflowExecutionTimedOutEventAttributes = ChildWorkflowExecutionTimedOutEventAttributes+ { _cwetoeaInitiatedEventId :: Integer+ , _cwetoeaStartedEventId :: Integer+ , _cwetoeaTimeoutType :: Text+ , _cwetoeaWorkflowExecution :: WorkflowExecution+ , _cwetoeaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'ChildWorkflowExecutionTimedOutEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwetoeaInitiatedEventId' @::@ 'Integer'+--+-- * 'cwetoeaStartedEventId' @::@ 'Integer'+--+-- * 'cwetoeaTimeoutType' @::@ 'Text'+--+-- * 'cwetoeaWorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'cwetoeaWorkflowType' @::@ 'WorkflowType'+--+childWorkflowExecutionTimedOutEventAttributes :: WorkflowExecution -- ^ 'cwetoeaWorkflowExecution'+ -> WorkflowType -- ^ 'cwetoeaWorkflowType'+ -> Text -- ^ 'cwetoeaTimeoutType'+ -> Integer -- ^ 'cwetoeaInitiatedEventId'+ -> Integer -- ^ 'cwetoeaStartedEventId'+ -> ChildWorkflowExecutionTimedOutEventAttributes+childWorkflowExecutionTimedOutEventAttributes p1 p2 p3 p4 p5 = ChildWorkflowExecutionTimedOutEventAttributes+ { _cwetoeaWorkflowExecution = p1+ , _cwetoeaWorkflowType = p2+ , _cwetoeaTimeoutType = p3+ , _cwetoeaInitiatedEventId = p4+ , _cwetoeaStartedEventId = p5+ }++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+cwetoeaInitiatedEventId :: Lens' ChildWorkflowExecutionTimedOutEventAttributes Integer+cwetoeaInitiatedEventId =+ lens _cwetoeaInitiatedEventId (\s a -> s { _cwetoeaInitiatedEventId = a })++-- | The Id of the ChildWorkflowExecutionStarted event recorded when this+-- child workflow execution was started. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+cwetoeaStartedEventId :: Lens' ChildWorkflowExecutionTimedOutEventAttributes Integer+cwetoeaStartedEventId =+ lens _cwetoeaStartedEventId (\s a -> s { _cwetoeaStartedEventId = a })++-- | The type of the timeout that caused the child workflow execution to time+-- out.+cwetoeaTimeoutType :: Lens' ChildWorkflowExecutionTimedOutEventAttributes Text+cwetoeaTimeoutType =+ lens _cwetoeaTimeoutType (\s a -> s { _cwetoeaTimeoutType = a })++-- | The child workflow execution that timed out.+cwetoeaWorkflowExecution :: Lens' ChildWorkflowExecutionTimedOutEventAttributes WorkflowExecution+cwetoeaWorkflowExecution =+ lens _cwetoeaWorkflowExecution+ (\s a -> s { _cwetoeaWorkflowExecution = a })++-- | The type of the child workflow execution.+cwetoeaWorkflowType :: Lens' ChildWorkflowExecutionTimedOutEventAttributes WorkflowType+cwetoeaWorkflowType =+ lens _cwetoeaWorkflowType (\s a -> s { _cwetoeaWorkflowType = a })++instance FromJSON ChildWorkflowExecutionTimedOutEventAttributes where+ parseJSON = withObject "ChildWorkflowExecutionTimedOutEventAttributes" $ \o -> ChildWorkflowExecutionTimedOutEventAttributes+ <$> o .: "initiatedEventId"+ <*> o .: "startedEventId"+ <*> o .: "timeoutType"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance ToJSON ChildWorkflowExecutionTimedOutEventAttributes where+ toJSON ChildWorkflowExecutionTimedOutEventAttributes{..} = object+ [ "workflowExecution" .= _cwetoeaWorkflowExecution+ , "workflowType" .= _cwetoeaWorkflowType+ , "timeoutType" .= _cwetoeaTimeoutType+ , "initiatedEventId" .= _cwetoeaInitiatedEventId+ , "startedEventId" .= _cwetoeaStartedEventId+ ]++data StartChildWorkflowExecutionInitiatedEventAttributes = StartChildWorkflowExecutionInitiatedEventAttributes+ { _scweieaChildPolicy :: Text+ , _scweieaControl :: Maybe Text+ , _scweieaDecisionTaskCompletedEventId :: Integer+ , _scweieaExecutionStartToCloseTimeout :: Maybe Text+ , _scweieaInput :: Maybe Text+ , _scweieaTagList :: List "tagList" Text+ , _scweieaTaskList :: TaskList+ , _scweieaTaskStartToCloseTimeout :: Maybe Text+ , _scweieaWorkflowId :: Text+ , _scweieaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'StartChildWorkflowExecutionInitiatedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'scweieaChildPolicy' @::@ 'Text'+--+-- * 'scweieaControl' @::@ 'Maybe' 'Text'+--+-- * 'scweieaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'scweieaExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'scweieaInput' @::@ 'Maybe' 'Text'+--+-- * 'scweieaTagList' @::@ ['Text']+--+-- * 'scweieaTaskList' @::@ 'TaskList'+--+-- * 'scweieaTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'scweieaWorkflowId' @::@ 'Text'+--+-- * 'scweieaWorkflowType' @::@ 'WorkflowType'+--+startChildWorkflowExecutionInitiatedEventAttributes :: Text -- ^ 'scweieaWorkflowId'+ -> WorkflowType -- ^ 'scweieaWorkflowType'+ -> TaskList -- ^ 'scweieaTaskList'+ -> Integer -- ^ 'scweieaDecisionTaskCompletedEventId'+ -> Text -- ^ 'scweieaChildPolicy'+ -> StartChildWorkflowExecutionInitiatedEventAttributes+startChildWorkflowExecutionInitiatedEventAttributes p1 p2 p3 p4 p5 = StartChildWorkflowExecutionInitiatedEventAttributes+ { _scweieaWorkflowId = p1+ , _scweieaWorkflowType = p2+ , _scweieaTaskList = p3+ , _scweieaDecisionTaskCompletedEventId = p4+ , _scweieaChildPolicy = p5+ , _scweieaControl = Nothing+ , _scweieaInput = Nothing+ , _scweieaExecutionStartToCloseTimeout = Nothing+ , _scweieaTaskStartToCloseTimeout = Nothing+ , _scweieaTagList = mempty+ }++-- | The policy to use for the child workflow executions if this execution+-- gets terminated by explicitly calling the TerminateWorkflowExecution+-- action or due to an expired timeout. The supported child policies are:+-- TERMINATE: the child executions will be terminated. REQUEST_CANCEL: a+-- request to cancel will be attempted for each child execution by recording+-- a WorkflowExecutionCancelRequested event in its history. It is up to the+-- decider to take appropriate actions when it receives an execution history+-- with this event. ABANDON: no action will be taken. The child executions+-- will continue to run.+scweieaChildPolicy :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes Text+scweieaChildPolicy =+ lens _scweieaChildPolicy (\s a -> s { _scweieaChildPolicy = a })++-- | Optional data attached to the event that can be used by the decider in+-- subsequent decision tasks. This data is not sent to the activity.+scweieaControl :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)+scweieaControl = lens _scweieaControl (\s a -> s { _scweieaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the StartChildWorkflowExecution Decision to request+-- this child workflow execution. This information can be useful for+-- diagnosing problems by tracing back the cause of events.+scweieaDecisionTaskCompletedEventId :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes Integer+scweieaDecisionTaskCompletedEventId =+ lens _scweieaDecisionTaskCompletedEventId+ (\s a -> s { _scweieaDecisionTaskCompletedEventId = a })++-- | The maximum duration for the child workflow execution. If the workflow+-- execution is not closed within this duration, it will be timed out and+-- force terminated. The valid values are integers greater than or equal to+-- 0. An integer value can be used to specify the duration in seconds while+-- NONE can be used to specify unlimited duration.+scweieaExecutionStartToCloseTimeout :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)+scweieaExecutionStartToCloseTimeout =+ lens _scweieaExecutionStartToCloseTimeout+ (\s a -> s { _scweieaExecutionStartToCloseTimeout = a })++-- | The inputs provided to the child workflow execution (if any).+scweieaInput :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)+scweieaInput = lens _scweieaInput (\s a -> s { _scweieaInput = a })++-- | The list of tags to associated with the child workflow execution.+scweieaTagList :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes [Text]+scweieaTagList = lens _scweieaTagList (\s a -> s { _scweieaTagList = a }) . _List++-- | The name of the task list used for the decision tasks of the child+-- workflow execution.+scweieaTaskList :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes TaskList+scweieaTaskList = lens _scweieaTaskList (\s a -> s { _scweieaTaskList = a })++-- | The maximum duration allowed for the decision tasks for this workflow+-- execution. The valid values are integers greater than or equal to 0. An+-- integer value can be used to specify the duration in seconds while NONE+-- can be used to specify unlimited duration.+scweieaTaskStartToCloseTimeout :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)+scweieaTaskStartToCloseTimeout =+ lens _scweieaTaskStartToCloseTimeout+ (\s a -> s { _scweieaTaskStartToCloseTimeout = a })++-- | The workflowId of the child workflow execution.+scweieaWorkflowId :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes Text+scweieaWorkflowId =+ lens _scweieaWorkflowId (\s a -> s { _scweieaWorkflowId = a })++-- | The type of the child workflow execution.+scweieaWorkflowType :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes WorkflowType+scweieaWorkflowType =+ lens _scweieaWorkflowType (\s a -> s { _scweieaWorkflowType = a })++instance FromJSON StartChildWorkflowExecutionInitiatedEventAttributes where+ parseJSON = withObject "StartChildWorkflowExecutionInitiatedEventAttributes" $ \o -> StartChildWorkflowExecutionInitiatedEventAttributes+ <$> o .: "childPolicy"+ <*> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .:? "executionStartToCloseTimeout"+ <*> o .:? "input"+ <*> o .: "tagList"+ <*> o .: "taskList"+ <*> o .:? "taskStartToCloseTimeout"+ <*> o .: "workflowId"+ <*> o .: "workflowType"++instance ToJSON StartChildWorkflowExecutionInitiatedEventAttributes where+ toJSON StartChildWorkflowExecutionInitiatedEventAttributes{..} = object+ [ "workflowId" .= _scweieaWorkflowId+ , "workflowType" .= _scweieaWorkflowType+ , "control" .= _scweieaControl+ , "input" .= _scweieaInput+ , "executionStartToCloseTimeout" .= _scweieaExecutionStartToCloseTimeout+ , "taskList" .= _scweieaTaskList+ , "decisionTaskCompletedEventId" .= _scweieaDecisionTaskCompletedEventId+ , "childPolicy" .= _scweieaChildPolicy+ , "taskStartToCloseTimeout" .= _scweieaTaskStartToCloseTimeout+ , "tagList" .= _scweieaTagList+ ]++data CancelWorkflowExecutionFailedEventAttributes = CancelWorkflowExecutionFailedEventAttributes+ { _cwefea1Cause :: Text+ , _cwefea1DecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'CancelWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwefea1Cause' @::@ 'Text'+--+-- * 'cwefea1DecisionTaskCompletedEventId' @::@ 'Integer'+--+cancelWorkflowExecutionFailedEventAttributes :: Text -- ^ 'cwefea1Cause'+ -> Integer -- ^ 'cwefea1DecisionTaskCompletedEventId'+ -> CancelWorkflowExecutionFailedEventAttributes+cancelWorkflowExecutionFailedEventAttributes p1 p2 = CancelWorkflowExecutionFailedEventAttributes+ { _cwefea1Cause = p1+ , _cwefea1DecisionTaskCompletedEventId = p2+ }++-- | The cause of the failure. This information is generated by the system and+-- can be useful for diagnostic purposes.+cwefea1Cause :: Lens' CancelWorkflowExecutionFailedEventAttributes Text+cwefea1Cause = lens _cwefea1Cause (\s a -> s { _cwefea1Cause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the CancelWorkflowExecution decision for this+-- cancellation request. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+cwefea1DecisionTaskCompletedEventId :: Lens' CancelWorkflowExecutionFailedEventAttributes Integer+cwefea1DecisionTaskCompletedEventId =+ lens _cwefea1DecisionTaskCompletedEventId+ (\s a -> s { _cwefea1DecisionTaskCompletedEventId = a })++instance FromJSON CancelWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "CancelWorkflowExecutionFailedEventAttributes" $ \o -> CancelWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON CancelWorkflowExecutionFailedEventAttributes where+ toJSON CancelWorkflowExecutionFailedEventAttributes{..} = object+ [ "cause" .= _cwefea1Cause+ , "decisionTaskCompletedEventId" .= _cwefea1DecisionTaskCompletedEventId+ ]++data WorkflowExecutionTerminatedEventAttributes = WorkflowExecutionTerminatedEventAttributes+ { _weteaCause :: Maybe Text+ , _weteaChildPolicy :: Text+ , _weteaDetails :: Maybe Text+ , _weteaReason :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionTerminatedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weteaCause' @::@ 'Maybe' 'Text'+--+-- * 'weteaChildPolicy' @::@ 'Text'+--+-- * 'weteaDetails' @::@ 'Maybe' 'Text'+--+-- * 'weteaReason' @::@ 'Maybe' 'Text'+--+workflowExecutionTerminatedEventAttributes :: Text -- ^ 'weteaChildPolicy'+ -> WorkflowExecutionTerminatedEventAttributes+workflowExecutionTerminatedEventAttributes p1 = WorkflowExecutionTerminatedEventAttributes+ { _weteaChildPolicy = p1+ , _weteaReason = Nothing+ , _weteaDetails = Nothing+ , _weteaCause = Nothing+ }++-- | If set, indicates that the workflow execution was automatically+-- terminated, and specifies the cause. This happens if the parent workflow+-- execution times out or is terminated and the child policy is set to+-- terminate child executions.+weteaCause :: Lens' WorkflowExecutionTerminatedEventAttributes (Maybe Text)+weteaCause = lens _weteaCause (\s a -> s { _weteaCause = a })++-- | The policy used for the child workflow executions of this workflow+-- execution. The supported child policies are: TERMINATE: the child+-- executions will be terminated. REQUEST_CANCEL: a request to cancel will+-- be attempted for each child execution by recording a+-- WorkflowExecutionCancelRequested event in its history. It is up to the+-- decider to take appropriate actions when it receives an execution history+-- with this event. ABANDON: no action will be taken. The child executions+-- will continue to run.+weteaChildPolicy :: Lens' WorkflowExecutionTerminatedEventAttributes Text+weteaChildPolicy = lens _weteaChildPolicy (\s a -> s { _weteaChildPolicy = a })++-- | The details provided for the termination (if any).+weteaDetails :: Lens' WorkflowExecutionTerminatedEventAttributes (Maybe Text)+weteaDetails = lens _weteaDetails (\s a -> s { _weteaDetails = a })++-- | The reason provided for the termination (if any).+weteaReason :: Lens' WorkflowExecutionTerminatedEventAttributes (Maybe Text)+weteaReason = lens _weteaReason (\s a -> s { _weteaReason = a })++instance FromJSON WorkflowExecutionTerminatedEventAttributes where+ parseJSON = withObject "WorkflowExecutionTerminatedEventAttributes" $ \o -> WorkflowExecutionTerminatedEventAttributes+ <$> o .:? "cause"+ <*> o .: "childPolicy"+ <*> o .:? "details"+ <*> o .:? "reason"++instance ToJSON WorkflowExecutionTerminatedEventAttributes where+ toJSON WorkflowExecutionTerminatedEventAttributes{..} = object+ [ "reason" .= _weteaReason+ , "details" .= _weteaDetails+ , "childPolicy" .= _weteaChildPolicy+ , "cause" .= _weteaCause+ ]++newtype TaskList = TaskList+ { _tlName :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'TaskList' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tlName' @::@ 'Text'+--+taskList :: Text -- ^ 'tlName'+ -> TaskList+taskList p1 = TaskList+ { _tlName = p1+ }++-- | The name of the task list.+tlName :: Lens' TaskList Text+tlName = lens _tlName (\s a -> s { _tlName = a })++instance FromJSON TaskList where+ parseJSON = withObject "TaskList" $ \o -> TaskList+ <$> o .: "name"++instance ToJSON TaskList where+ toJSON TaskList{..} = object+ [ "name" .= _tlName+ ]++data ScheduleActivityTaskFailedCause+ = SATFCActivityCreationRateExceeded -- ^ ACTIVITY_CREATION_RATE_EXCEEDED+ | SATFCActivityIdAlreadyInUse -- ^ ACTIVITY_ID_ALREADY_IN_USE+ | SATFCActivityTypeDeprecated -- ^ ACTIVITY_TYPE_DEPRECATED+ | SATFCActivityTypeDoesNotExist -- ^ ACTIVITY_TYPE_DOES_NOT_EXIST+ | SATFCDefaultHeartbeatTimeoutUndefined -- ^ DEFAULT_HEARTBEAT_TIMEOUT_UNDEFINED+ | SATFCDefaultScheduleToCloseTimeoutUndefined -- ^ DEFAULT_SCHEDULE_TO_CLOSE_TIMEOUT_UNDEFINED+ | SATFCDefaultScheduleToStartTimeoutUndefined -- ^ DEFAULT_SCHEDULE_TO_START_TIMEOUT_UNDEFINED+ | SATFCDefaultStartToCloseTimeoutUndefined -- ^ DEFAULT_START_TO_CLOSE_TIMEOUT_UNDEFINED+ | SATFCDefaultTaskListUndefined -- ^ DEFAULT_TASK_LIST_UNDEFINED+ | SATFCOpenActivitiesLimitExceeded -- ^ OPEN_ACTIVITIES_LIMIT_EXCEEDED+ | SATFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ScheduleActivityTaskFailedCause++instance FromText ScheduleActivityTaskFailedCause where+ parser = match "ACTIVITY_CREATION_RATE_EXCEEDED" SATFCActivityCreationRateExceeded+ <|> match "ACTIVITY_ID_ALREADY_IN_USE" SATFCActivityIdAlreadyInUse+ <|> match "ACTIVITY_TYPE_DEPRECATED" SATFCActivityTypeDeprecated+ <|> match "ACTIVITY_TYPE_DOES_NOT_EXIST" SATFCActivityTypeDoesNotExist+ <|> match "DEFAULT_HEARTBEAT_TIMEOUT_UNDEFINED" SATFCDefaultHeartbeatTimeoutUndefined+ <|> match "DEFAULT_SCHEDULE_TO_CLOSE_TIMEOUT_UNDEFINED" SATFCDefaultScheduleToCloseTimeoutUndefined+ <|> match "DEFAULT_SCHEDULE_TO_START_TIMEOUT_UNDEFINED" SATFCDefaultScheduleToStartTimeoutUndefined+ <|> match "DEFAULT_START_TO_CLOSE_TIMEOUT_UNDEFINED" SATFCDefaultStartToCloseTimeoutUndefined+ <|> match "DEFAULT_TASK_LIST_UNDEFINED" SATFCDefaultTaskListUndefined+ <|> match "OPEN_ACTIVITIES_LIMIT_EXCEEDED" SATFCOpenActivitiesLimitExceeded+ <|> match "OPERATION_NOT_PERMITTED" SATFCOperationNotPermitted++instance ToText ScheduleActivityTaskFailedCause where+ toText = \case+ SATFCActivityCreationRateExceeded -> "ACTIVITY_CREATION_RATE_EXCEEDED"+ SATFCActivityIdAlreadyInUse -> "ACTIVITY_ID_ALREADY_IN_USE"+ SATFCActivityTypeDeprecated -> "ACTIVITY_TYPE_DEPRECATED"+ SATFCActivityTypeDoesNotExist -> "ACTIVITY_TYPE_DOES_NOT_EXIST"+ SATFCDefaultHeartbeatTimeoutUndefined -> "DEFAULT_HEARTBEAT_TIMEOUT_UNDEFINED"+ SATFCDefaultScheduleToCloseTimeoutUndefined -> "DEFAULT_SCHEDULE_TO_CLOSE_TIMEOUT_UNDEFINED"+ SATFCDefaultScheduleToStartTimeoutUndefined -> "DEFAULT_SCHEDULE_TO_START_TIMEOUT_UNDEFINED"+ SATFCDefaultStartToCloseTimeoutUndefined -> "DEFAULT_START_TO_CLOSE_TIMEOUT_UNDEFINED"+ SATFCDefaultTaskListUndefined -> "DEFAULT_TASK_LIST_UNDEFINED"+ SATFCOpenActivitiesLimitExceeded -> "OPEN_ACTIVITIES_LIMIT_EXCEEDED"+ SATFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"++instance FromJSON ScheduleActivityTaskFailedCause where+ parseJSON = parseJSONText "ScheduleActivityTaskFailedCause"++instance ToJSON ScheduleActivityTaskFailedCause where+ toJSON = toJSONText++data ChildWorkflowExecutionCanceledEventAttributes = ChildWorkflowExecutionCanceledEventAttributes+ { _cwecea1Details :: Maybe Text+ , _cwecea1InitiatedEventId :: Integer+ , _cwecea1StartedEventId :: Integer+ , _cwecea1WorkflowExecution :: WorkflowExecution+ , _cwecea1WorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'ChildWorkflowExecutionCanceledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwecea1Details' @::@ 'Maybe' 'Text'+--+-- * 'cwecea1InitiatedEventId' @::@ 'Integer'+--+-- * 'cwecea1StartedEventId' @::@ 'Integer'+--+-- * 'cwecea1WorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'cwecea1WorkflowType' @::@ 'WorkflowType'+--+childWorkflowExecutionCanceledEventAttributes :: WorkflowExecution -- ^ 'cwecea1WorkflowExecution'+ -> WorkflowType -- ^ 'cwecea1WorkflowType'+ -> Integer -- ^ 'cwecea1InitiatedEventId'+ -> Integer -- ^ 'cwecea1StartedEventId'+ -> ChildWorkflowExecutionCanceledEventAttributes+childWorkflowExecutionCanceledEventAttributes p1 p2 p3 p4 = ChildWorkflowExecutionCanceledEventAttributes+ { _cwecea1WorkflowExecution = p1+ , _cwecea1WorkflowType = p2+ , _cwecea1InitiatedEventId = p3+ , _cwecea1StartedEventId = p4+ , _cwecea1Details = Nothing+ }++-- | Details of the cancellation (if provided).+cwecea1Details :: Lens' ChildWorkflowExecutionCanceledEventAttributes (Maybe Text)+cwecea1Details = lens _cwecea1Details (\s a -> s { _cwecea1Details = a })++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+cwecea1InitiatedEventId :: Lens' ChildWorkflowExecutionCanceledEventAttributes Integer+cwecea1InitiatedEventId =+ lens _cwecea1InitiatedEventId (\s a -> s { _cwecea1InitiatedEventId = a })++-- | The Id of the ChildWorkflowExecutionStarted event recorded when this+-- child workflow execution was started. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+cwecea1StartedEventId :: Lens' ChildWorkflowExecutionCanceledEventAttributes Integer+cwecea1StartedEventId =+ lens _cwecea1StartedEventId (\s a -> s { _cwecea1StartedEventId = a })++-- | The child workflow execution that was canceled.+cwecea1WorkflowExecution :: Lens' ChildWorkflowExecutionCanceledEventAttributes WorkflowExecution+cwecea1WorkflowExecution =+ lens _cwecea1WorkflowExecution+ (\s a -> s { _cwecea1WorkflowExecution = a })++-- | The type of the child workflow execution.+cwecea1WorkflowType :: Lens' ChildWorkflowExecutionCanceledEventAttributes WorkflowType+cwecea1WorkflowType =+ lens _cwecea1WorkflowType (\s a -> s { _cwecea1WorkflowType = a })++instance FromJSON ChildWorkflowExecutionCanceledEventAttributes where+ parseJSON = withObject "ChildWorkflowExecutionCanceledEventAttributes" $ \o -> ChildWorkflowExecutionCanceledEventAttributes+ <$> o .:? "details"+ <*> o .: "initiatedEventId"+ <*> o .: "startedEventId"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance ToJSON ChildWorkflowExecutionCanceledEventAttributes where+ toJSON ChildWorkflowExecutionCanceledEventAttributes{..} = object+ [ "workflowExecution" .= _cwecea1WorkflowExecution+ , "workflowType" .= _cwecea1WorkflowType+ , "details" .= _cwecea1Details+ , "initiatedEventId" .= _cwecea1InitiatedEventId+ , "startedEventId" .= _cwecea1StartedEventId+ ]++data WorkflowExecutionInfo = WorkflowExecutionInfo+ { _weiCancelRequested :: Maybe Bool+ , _weiCloseStatus :: Maybe Text+ , _weiCloseTimestamp :: Maybe RFC822+ , _weiExecution :: WorkflowExecution+ , _weiExecutionStatus :: Text+ , _weiParent :: Maybe WorkflowExecution+ , _weiStartTimestamp :: RFC822+ , _weiTagList :: List "tagList" Text+ , _weiWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'WorkflowExecutionInfo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weiCancelRequested' @::@ 'Maybe' 'Bool'+--+-- * 'weiCloseStatus' @::@ 'Maybe' 'Text'+--+-- * 'weiCloseTimestamp' @::@ 'Maybe' 'UTCTime'+--+-- * 'weiExecution' @::@ 'WorkflowExecution'+--+-- * 'weiExecutionStatus' @::@ 'Text'+--+-- * 'weiParent' @::@ 'Maybe' 'WorkflowExecution'+--+-- * 'weiStartTimestamp' @::@ 'UTCTime'+--+-- * 'weiTagList' @::@ ['Text']+--+-- * 'weiWorkflowType' @::@ 'WorkflowType'+--+workflowExecutionInfo :: WorkflowExecution -- ^ 'weiExecution'+ -> WorkflowType -- ^ 'weiWorkflowType'+ -> UTCTime -- ^ 'weiStartTimestamp'+ -> Text -- ^ 'weiExecutionStatus'+ -> WorkflowExecutionInfo+workflowExecutionInfo p1 p2 p3 p4 = WorkflowExecutionInfo+ { _weiExecution = p1+ , _weiWorkflowType = p2+ , _weiStartTimestamp = withIso _Time (const id) p3+ , _weiExecutionStatus = p4+ , _weiCloseTimestamp = Nothing+ , _weiCloseStatus = Nothing+ , _weiParent = Nothing+ , _weiTagList = mempty+ , _weiCancelRequested = Nothing+ }++-- | Set to true if a cancellation is requested for this workflow execution.+weiCancelRequested :: Lens' WorkflowExecutionInfo (Maybe Bool)+weiCancelRequested =+ lens _weiCancelRequested (\s a -> s { _weiCancelRequested = a })++-- | If the execution status is closed then this specifies how the execution+-- was closed: COMPLETED: the execution was successfully completed.+-- CANCELED: the execution was canceled.Cancellation allows the+-- implementation to gracefully clean up before the execution is closed.+-- TERMINATED: the execution was force terminated. FAILED: the execution+-- failed to complete. TIMED_OUT: the execution did not complete in the+-- alloted time and was automatically timed out. CONTINUED_AS_NEW: the+-- execution is logically continued. This means the current execution was+-- completed and a new execution was started to carry on the workflow.+weiCloseStatus :: Lens' WorkflowExecutionInfo (Maybe Text)+weiCloseStatus = lens _weiCloseStatus (\s a -> s { _weiCloseStatus = a })++-- | The time when the workflow execution was closed. Set only if the+-- execution status is CLOSED.+weiCloseTimestamp :: Lens' WorkflowExecutionInfo (Maybe UTCTime)+weiCloseTimestamp =+ lens _weiCloseTimestamp (\s a -> s { _weiCloseTimestamp = a })+ . mapping _Time++-- | The workflow execution this information is about.+weiExecution :: Lens' WorkflowExecutionInfo WorkflowExecution+weiExecution = lens _weiExecution (\s a -> s { _weiExecution = a })++-- | The current status of the execution.+weiExecutionStatus :: Lens' WorkflowExecutionInfo Text+weiExecutionStatus =+ lens _weiExecutionStatus (\s a -> s { _weiExecutionStatus = a })++-- | If this workflow execution is a child of another execution then contains+-- the workflow execution that started this execution.+weiParent :: Lens' WorkflowExecutionInfo (Maybe WorkflowExecution)+weiParent = lens _weiParent (\s a -> s { _weiParent = a })++-- | The time when the execution was started.+weiStartTimestamp :: Lens' WorkflowExecutionInfo UTCTime+weiStartTimestamp =+ lens _weiStartTimestamp (\s a -> s { _weiStartTimestamp = a })+ . _Time++-- | The list of tags associated with the workflow execution. Tags can be used+-- to identify and list workflow executions of interest through the+-- visibility APIs. A workflow execution can have a maximum of 5 tags.+weiTagList :: Lens' WorkflowExecutionInfo [Text]+weiTagList = lens _weiTagList (\s a -> s { _weiTagList = a }) . _List++-- | The type of the workflow execution.+weiWorkflowType :: Lens' WorkflowExecutionInfo WorkflowType+weiWorkflowType = lens _weiWorkflowType (\s a -> s { _weiWorkflowType = a })++instance FromJSON WorkflowExecutionInfo where+ parseJSON = withObject "WorkflowExecutionInfo" $ \o -> WorkflowExecutionInfo+ <$> o .:? "cancelRequested"+ <*> o .:? "closeStatus"+ <*> o .:? "closeTimestamp"+ <*> o .: "execution"+ <*> o .: "executionStatus"+ <*> o .:? "parent"+ <*> o .: "startTimestamp"+ <*> o .: "tagList"+ <*> o .: "workflowType"++instance ToJSON WorkflowExecutionInfo where+ toJSON WorkflowExecutionInfo{..} = object+ [ "execution" .= _weiExecution+ , "workflowType" .= _weiWorkflowType+ , "startTimestamp" .= _weiStartTimestamp+ , "closeTimestamp" .= _weiCloseTimestamp+ , "executionStatus" .= _weiExecutionStatus+ , "closeStatus" .= _weiCloseStatus+ , "parent" .= _weiParent+ , "tagList" .= _weiTagList+ , "cancelRequested" .= _weiCancelRequested+ ]++data SignalExternalWorkflowExecutionFailedEventAttributes = SignalExternalWorkflowExecutionFailedEventAttributes+ { _sewefeaCause :: Text+ , _sewefeaControl :: Maybe Text+ , _sewefeaDecisionTaskCompletedEventId :: Integer+ , _sewefeaInitiatedEventId :: Integer+ , _sewefeaRunId :: Maybe Text+ , _sewefeaWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'SignalExternalWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sewefeaCause' @::@ 'Text'+--+-- * 'sewefeaControl' @::@ 'Maybe' 'Text'+--+-- * 'sewefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'sewefeaInitiatedEventId' @::@ 'Integer'+--+-- * 'sewefeaRunId' @::@ 'Maybe' 'Text'+--+-- * 'sewefeaWorkflowId' @::@ 'Text'+--+signalExternalWorkflowExecutionFailedEventAttributes :: Text -- ^ 'sewefeaWorkflowId'+ -> Text -- ^ 'sewefeaCause'+ -> Integer -- ^ 'sewefeaInitiatedEventId'+ -> Integer -- ^ 'sewefeaDecisionTaskCompletedEventId'+ -> SignalExternalWorkflowExecutionFailedEventAttributes+signalExternalWorkflowExecutionFailedEventAttributes p1 p2 p3 p4 = SignalExternalWorkflowExecutionFailedEventAttributes+ { _sewefeaWorkflowId = p1+ , _sewefeaCause = p2+ , _sewefeaInitiatedEventId = p3+ , _sewefeaDecisionTaskCompletedEventId = p4+ , _sewefeaRunId = Nothing+ , _sewefeaControl = Nothing+ }++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+sewefeaCause :: Lens' SignalExternalWorkflowExecutionFailedEventAttributes Text+sewefeaCause = lens _sewefeaCause (\s a -> s { _sewefeaCause = a })++sewefeaControl :: Lens' SignalExternalWorkflowExecutionFailedEventAttributes (Maybe Text)+sewefeaControl = lens _sewefeaControl (\s a -> s { _sewefeaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the SignalExternalWorkflowExecution decision for+-- this signal. This information can be useful for diagnosing problems by+-- tracing back the cause of events leading up to this event.+sewefeaDecisionTaskCompletedEventId :: Lens' SignalExternalWorkflowExecutionFailedEventAttributes Integer+sewefeaDecisionTaskCompletedEventId =+ lens _sewefeaDecisionTaskCompletedEventId+ (\s a -> s { _sewefeaDecisionTaskCompletedEventId = a })++-- | The id of the SignalExternalWorkflowExecutionInitiated event+-- corresponding to the SignalExternalWorkflowExecution decision to request+-- this signal. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+sewefeaInitiatedEventId :: Lens' SignalExternalWorkflowExecutionFailedEventAttributes Integer+sewefeaInitiatedEventId =+ lens _sewefeaInitiatedEventId (\s a -> s { _sewefeaInitiatedEventId = a })++-- | The runId of the external workflow execution that the signal was being+-- delivered to.+sewefeaRunId :: Lens' SignalExternalWorkflowExecutionFailedEventAttributes (Maybe Text)+sewefeaRunId = lens _sewefeaRunId (\s a -> s { _sewefeaRunId = a })++-- | The workflowId of the external workflow execution that the signal was+-- being delivered to.+sewefeaWorkflowId :: Lens' SignalExternalWorkflowExecutionFailedEventAttributes Text+sewefeaWorkflowId =+ lens _sewefeaWorkflowId (\s a -> s { _sewefeaWorkflowId = a })++instance FromJSON SignalExternalWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "SignalExternalWorkflowExecutionFailedEventAttributes" $ \o -> SignalExternalWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "initiatedEventId"+ <*> o .:? "runId"+ <*> o .: "workflowId"++instance ToJSON SignalExternalWorkflowExecutionFailedEventAttributes where+ toJSON SignalExternalWorkflowExecutionFailedEventAttributes{..} = object+ [ "workflowId" .= _sewefeaWorkflowId+ , "runId" .= _sewefeaRunId+ , "cause" .= _sewefeaCause+ , "initiatedEventId" .= _sewefeaInitiatedEventId+ , "decisionTaskCompletedEventId" .= _sewefeaDecisionTaskCompletedEventId+ , "control" .= _sewefeaControl+ ]++newtype TagFilter = TagFilter+ { _tfTag :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'TagFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tfTag' @::@ 'Text'+--+tagFilter :: Text -- ^ 'tfTag'+ -> TagFilter+tagFilter p1 = TagFilter+ { _tfTag = p1+ }++-- | Specifies the tag that must be associated with the execution for it to+-- meet the filter criteria. This field is required.+tfTag :: Lens' TagFilter Text+tfTag = lens _tfTag (\s a -> s { _tfTag = a })++instance FromJSON TagFilter where+ parseJSON = withObject "TagFilter" $ \o -> TagFilter+ <$> o .: "tag"++instance ToJSON TagFilter where+ toJSON TagFilter{..} = object+ [ "tag" .= _tfTag+ ]++data ChildPolicy+ = Abandon -- ^ ABANDON+ | RequestCancel -- ^ REQUEST_CANCEL+ | Terminate -- ^ TERMINATE+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ChildPolicy++instance FromText ChildPolicy where+ parser = match "ABANDON" Abandon+ <|> match "REQUEST_CANCEL" RequestCancel+ <|> match "TERMINATE" Terminate++instance ToText ChildPolicy where+ toText = \case+ Abandon -> "ABANDON"+ RequestCancel -> "REQUEST_CANCEL"+ Terminate -> "TERMINATE"++instance FromJSON ChildPolicy where+ parseJSON = parseJSONText "ChildPolicy"++instance ToJSON ChildPolicy where+ toJSON = toJSONText++data ActivityTaskStartedEventAttributes = ActivityTaskStartedEventAttributes+ { _atseaIdentity :: Maybe Text+ , _atseaScheduledEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'ActivityTaskStartedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atseaIdentity' @::@ 'Maybe' 'Text'+--+-- * 'atseaScheduledEventId' @::@ 'Integer'+--+activityTaskStartedEventAttributes :: Integer -- ^ 'atseaScheduledEventId'+ -> ActivityTaskStartedEventAttributes+activityTaskStartedEventAttributes p1 = ActivityTaskStartedEventAttributes+ { _atseaScheduledEventId = p1+ , _atseaIdentity = Nothing+ }++-- | Identity of the worker that was assigned this task. This aids diagnostics+-- when problems arise. The form of this identity is user defined.+atseaIdentity :: Lens' ActivityTaskStartedEventAttributes (Maybe Text)+atseaIdentity = lens _atseaIdentity (\s a -> s { _atseaIdentity = a })++-- | The id of the ActivityTaskScheduled event that was recorded when this+-- activity task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+atseaScheduledEventId :: Lens' ActivityTaskStartedEventAttributes Integer+atseaScheduledEventId =+ lens _atseaScheduledEventId (\s a -> s { _atseaScheduledEventId = a })++instance FromJSON ActivityTaskStartedEventAttributes where+ parseJSON = withObject "ActivityTaskStartedEventAttributes" $ \o -> ActivityTaskStartedEventAttributes+ <$> o .:? "identity"+ <*> o .: "scheduledEventId"++instance ToJSON ActivityTaskStartedEventAttributes where+ toJSON ActivityTaskStartedEventAttributes{..} = object+ [ "identity" .= _atseaIdentity+ , "scheduledEventId" .= _atseaScheduledEventId+ ]++data CloseStatus+ = CSCanceled -- ^ CANCELED+ | CSCompleted -- ^ COMPLETED+ | CSContinuedAsNew -- ^ CONTINUED_AS_NEW+ | CSFailed -- ^ FAILED+ | CSTerminated -- ^ TERMINATED+ | CSTimedOut -- ^ TIMED_OUT+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable CloseStatus++instance FromText CloseStatus where+ parser = match "CANCELED" CSCanceled+ <|> match "COMPLETED" CSCompleted+ <|> match "CONTINUED_AS_NEW" CSContinuedAsNew+ <|> match "FAILED" CSFailed+ <|> match "TERMINATED" CSTerminated+ <|> match "TIMED_OUT" CSTimedOut++instance ToText CloseStatus where+ toText = \case+ CSCanceled -> "CANCELED"+ CSCompleted -> "COMPLETED"+ CSContinuedAsNew -> "CONTINUED_AS_NEW"+ CSFailed -> "FAILED"+ CSTerminated -> "TERMINATED"+ CSTimedOut -> "TIMED_OUT"++instance FromJSON CloseStatus where+ parseJSON = parseJSONText "CloseStatus"++instance ToJSON CloseStatus where+ toJSON = toJSONText++data CompleteWorkflowExecutionFailedCause+ = CompleteWorkflowExecutionFailedCauseOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | CompleteWorkflowExecutionFailedCauseUnhandledDecision -- ^ UNHANDLED_DECISION+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable CompleteWorkflowExecutionFailedCause++instance FromText CompleteWorkflowExecutionFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" CompleteWorkflowExecutionFailedCauseOperationNotPermitted+ <|> match "UNHANDLED_DECISION" CompleteWorkflowExecutionFailedCauseUnhandledDecision++instance ToText CompleteWorkflowExecutionFailedCause where+ toText = \case+ CompleteWorkflowExecutionFailedCauseOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ CompleteWorkflowExecutionFailedCauseUnhandledDecision -> "UNHANDLED_DECISION"++instance FromJSON CompleteWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "CompleteWorkflowExecutionFailedCause"++instance ToJSON CompleteWorkflowExecutionFailedCause where+ toJSON = toJSONText++data StartTimerFailedCause+ = STFCOpenTimersLimitExceeded -- ^ OPEN_TIMERS_LIMIT_EXCEEDED+ | STFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | STFCTimerCreationRateExceeded -- ^ TIMER_CREATION_RATE_EXCEEDED+ | STFCTimerIdAlreadyInUse -- ^ TIMER_ID_ALREADY_IN_USE+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable StartTimerFailedCause++instance FromText StartTimerFailedCause where+ parser = match "OPEN_TIMERS_LIMIT_EXCEEDED" STFCOpenTimersLimitExceeded+ <|> match "OPERATION_NOT_PERMITTED" STFCOperationNotPermitted+ <|> match "TIMER_CREATION_RATE_EXCEEDED" STFCTimerCreationRateExceeded+ <|> match "TIMER_ID_ALREADY_IN_USE" STFCTimerIdAlreadyInUse++instance ToText StartTimerFailedCause where+ toText = \case+ STFCOpenTimersLimitExceeded -> "OPEN_TIMERS_LIMIT_EXCEEDED"+ STFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ STFCTimerCreationRateExceeded -> "TIMER_CREATION_RATE_EXCEEDED"+ STFCTimerIdAlreadyInUse -> "TIMER_ID_ALREADY_IN_USE"++instance FromJSON StartTimerFailedCause where+ parseJSON = parseJSONText "StartTimerFailedCause"++instance ToJSON StartTimerFailedCause where+ toJSON = toJSONText++data ActivityTaskCancelRequestedEventAttributes = ActivityTaskCancelRequestedEventAttributes+ { _atcreaActivityId :: Text+ , _atcreaDecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'ActivityTaskCancelRequestedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atcreaActivityId' @::@ 'Text'+--+-- * 'atcreaDecisionTaskCompletedEventId' @::@ 'Integer'+--+activityTaskCancelRequestedEventAttributes :: Integer -- ^ 'atcreaDecisionTaskCompletedEventId'+ -> Text -- ^ 'atcreaActivityId'+ -> ActivityTaskCancelRequestedEventAttributes+activityTaskCancelRequestedEventAttributes p1 p2 = ActivityTaskCancelRequestedEventAttributes+ { _atcreaDecisionTaskCompletedEventId = p1+ , _atcreaActivityId = p2+ }++-- | The unique ID of the task.+atcreaActivityId :: Lens' ActivityTaskCancelRequestedEventAttributes Text+atcreaActivityId = lens _atcreaActivityId (\s a -> s { _atcreaActivityId = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the RequestCancelActivityTask decision for this+-- cancellation request. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+atcreaDecisionTaskCompletedEventId :: Lens' ActivityTaskCancelRequestedEventAttributes Integer+atcreaDecisionTaskCompletedEventId =+ lens _atcreaDecisionTaskCompletedEventId+ (\s a -> s { _atcreaDecisionTaskCompletedEventId = a })++instance FromJSON ActivityTaskCancelRequestedEventAttributes where+ parseJSON = withObject "ActivityTaskCancelRequestedEventAttributes" $ \o -> ActivityTaskCancelRequestedEventAttributes+ <$> o .: "activityId"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON ActivityTaskCancelRequestedEventAttributes where+ toJSON ActivityTaskCancelRequestedEventAttributes{..} = object+ [ "decisionTaskCompletedEventId" .= _atcreaDecisionTaskCompletedEventId+ , "activityId" .= _atcreaActivityId+ ]++data WorkflowExecutionTimedOutEventAttributes = WorkflowExecutionTimedOutEventAttributes+ { _wetoeaChildPolicy :: Text+ , _wetoeaTimeoutType :: Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionTimedOutEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wetoeaChildPolicy' @::@ 'Text'+--+-- * 'wetoeaTimeoutType' @::@ 'Text'+--+workflowExecutionTimedOutEventAttributes :: Text -- ^ 'wetoeaTimeoutType'+ -> Text -- ^ 'wetoeaChildPolicy'+ -> WorkflowExecutionTimedOutEventAttributes+workflowExecutionTimedOutEventAttributes p1 p2 = WorkflowExecutionTimedOutEventAttributes+ { _wetoeaTimeoutType = p1+ , _wetoeaChildPolicy = p2+ }++-- | The policy used for the child workflow executions of this workflow+-- execution. The supported child policies are: TERMINATE: the child+-- executions will be terminated. REQUEST_CANCEL: a request to cancel will+-- be attempted for each child execution by recording a+-- WorkflowExecutionCancelRequested event in its history. It is up to the+-- decider to take appropriate actions when it receives an execution history+-- with this event. ABANDON: no action will be taken. The child executions+-- will continue to run.+wetoeaChildPolicy :: Lens' WorkflowExecutionTimedOutEventAttributes Text+wetoeaChildPolicy =+ lens _wetoeaChildPolicy (\s a -> s { _wetoeaChildPolicy = a })++-- | The type of timeout that caused this event.+wetoeaTimeoutType :: Lens' WorkflowExecutionTimedOutEventAttributes Text+wetoeaTimeoutType =+ lens _wetoeaTimeoutType (\s a -> s { _wetoeaTimeoutType = a })++instance FromJSON WorkflowExecutionTimedOutEventAttributes where+ parseJSON = withObject "WorkflowExecutionTimedOutEventAttributes" $ \o -> WorkflowExecutionTimedOutEventAttributes+ <$> o .: "childPolicy"+ <*> o .: "timeoutType"++instance ToJSON WorkflowExecutionTimedOutEventAttributes where+ toJSON WorkflowExecutionTimedOutEventAttributes{..} = object+ [ "timeoutType" .= _wetoeaTimeoutType+ , "childPolicy" .= _wetoeaChildPolicy+ ]++data ChildWorkflowExecutionTerminatedEventAttributes = ChildWorkflowExecutionTerminatedEventAttributes+ { _cweteaInitiatedEventId :: Integer+ , _cweteaStartedEventId :: Integer+ , _cweteaWorkflowExecution :: WorkflowExecution+ , _cweteaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'ChildWorkflowExecutionTerminatedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cweteaInitiatedEventId' @::@ 'Integer'+--+-- * 'cweteaStartedEventId' @::@ 'Integer'+--+-- * 'cweteaWorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'cweteaWorkflowType' @::@ 'WorkflowType'+--+childWorkflowExecutionTerminatedEventAttributes :: WorkflowExecution -- ^ 'cweteaWorkflowExecution'+ -> WorkflowType -- ^ 'cweteaWorkflowType'+ -> Integer -- ^ 'cweteaInitiatedEventId'+ -> Integer -- ^ 'cweteaStartedEventId'+ -> ChildWorkflowExecutionTerminatedEventAttributes+childWorkflowExecutionTerminatedEventAttributes p1 p2 p3 p4 = ChildWorkflowExecutionTerminatedEventAttributes+ { _cweteaWorkflowExecution = p1+ , _cweteaWorkflowType = p2+ , _cweteaInitiatedEventId = p3+ , _cweteaStartedEventId = p4+ }++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+cweteaInitiatedEventId :: Lens' ChildWorkflowExecutionTerminatedEventAttributes Integer+cweteaInitiatedEventId =+ lens _cweteaInitiatedEventId (\s a -> s { _cweteaInitiatedEventId = a })++-- | The Id of the ChildWorkflowExecutionStarted event recorded when this+-- child workflow execution was started. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+cweteaStartedEventId :: Lens' ChildWorkflowExecutionTerminatedEventAttributes Integer+cweteaStartedEventId =+ lens _cweteaStartedEventId (\s a -> s { _cweteaStartedEventId = a })++-- | The child workflow execution that was terminated.+cweteaWorkflowExecution :: Lens' ChildWorkflowExecutionTerminatedEventAttributes WorkflowExecution+cweteaWorkflowExecution =+ lens _cweteaWorkflowExecution (\s a -> s { _cweteaWorkflowExecution = a })++-- | The type of the child workflow execution.+cweteaWorkflowType :: Lens' ChildWorkflowExecutionTerminatedEventAttributes WorkflowType+cweteaWorkflowType =+ lens _cweteaWorkflowType (\s a -> s { _cweteaWorkflowType = a })++instance FromJSON ChildWorkflowExecutionTerminatedEventAttributes where+ parseJSON = withObject "ChildWorkflowExecutionTerminatedEventAttributes" $ \o -> ChildWorkflowExecutionTerminatedEventAttributes+ <$> o .: "initiatedEventId"+ <*> o .: "startedEventId"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance ToJSON ChildWorkflowExecutionTerminatedEventAttributes where+ toJSON ChildWorkflowExecutionTerminatedEventAttributes{..} = object+ [ "workflowExecution" .= _cweteaWorkflowExecution+ , "workflowType" .= _cweteaWorkflowType+ , "initiatedEventId" .= _cweteaInitiatedEventId+ , "startedEventId" .= _cweteaStartedEventId+ ]++data WorkflowExecutionCanceledEventAttributes = WorkflowExecutionCanceledEventAttributes+ { _wecea1DecisionTaskCompletedEventId :: Integer+ , _wecea1Details :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionCanceledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wecea1DecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'wecea1Details' @::@ 'Maybe' 'Text'+--+workflowExecutionCanceledEventAttributes :: Integer -- ^ 'wecea1DecisionTaskCompletedEventId'+ -> WorkflowExecutionCanceledEventAttributes+workflowExecutionCanceledEventAttributes p1 = WorkflowExecutionCanceledEventAttributes+ { _wecea1DecisionTaskCompletedEventId = p1+ , _wecea1Details = Nothing+ }++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the CancelWorkflowExecution decision for this+-- cancellation request. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+wecea1DecisionTaskCompletedEventId :: Lens' WorkflowExecutionCanceledEventAttributes Integer+wecea1DecisionTaskCompletedEventId =+ lens _wecea1DecisionTaskCompletedEventId+ (\s a -> s { _wecea1DecisionTaskCompletedEventId = a })++-- | Details for the cancellation (if any).+wecea1Details :: Lens' WorkflowExecutionCanceledEventAttributes (Maybe Text)+wecea1Details = lens _wecea1Details (\s a -> s { _wecea1Details = a })++instance FromJSON WorkflowExecutionCanceledEventAttributes where+ parseJSON = withObject "WorkflowExecutionCanceledEventAttributes" $ \o -> WorkflowExecutionCanceledEventAttributes+ <$> o .: "decisionTaskCompletedEventId"+ <*> o .:? "details"++instance ToJSON WorkflowExecutionCanceledEventAttributes where+ toJSON WorkflowExecutionCanceledEventAttributes{..} = object+ [ "details" .= _wecea1Details+ , "decisionTaskCompletedEventId" .= _wecea1DecisionTaskCompletedEventId+ ]++data WorkflowExecutionSignaledEventAttributes = WorkflowExecutionSignaledEventAttributes+ { _wesea1ExternalInitiatedEventId :: Maybe Integer+ , _wesea1ExternalWorkflowExecution :: Maybe WorkflowExecution+ , _wesea1Input :: Maybe Text+ , _wesea1SignalName :: Text+ } deriving (Eq, Show)++-- | 'WorkflowExecutionSignaledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wesea1ExternalInitiatedEventId' @::@ 'Maybe' 'Integer'+--+-- * 'wesea1ExternalWorkflowExecution' @::@ 'Maybe' 'WorkflowExecution'+--+-- * 'wesea1Input' @::@ 'Maybe' 'Text'+--+-- * 'wesea1SignalName' @::@ 'Text'+--+workflowExecutionSignaledEventAttributes :: Text -- ^ 'wesea1SignalName'+ -> WorkflowExecutionSignaledEventAttributes+workflowExecutionSignaledEventAttributes p1 = WorkflowExecutionSignaledEventAttributes+ { _wesea1SignalName = p1+ , _wesea1Input = Nothing+ , _wesea1ExternalWorkflowExecution = Nothing+ , _wesea1ExternalInitiatedEventId = Nothing+ }++-- | The id of the SignalExternalWorkflowExecutionInitiated event+-- corresponding to the SignalExternalWorkflow decision to signal this+-- workflow execution.The source event with this Id can be found in the+-- history of the source workflow execution. This information can be useful+-- for diagnosing problems by tracing back the chain of events leading up to+-- this event. This field is set only if the signal was initiated by another+-- workflow execution.+wesea1ExternalInitiatedEventId :: Lens' WorkflowExecutionSignaledEventAttributes (Maybe Integer)+wesea1ExternalInitiatedEventId =+ lens _wesea1ExternalInitiatedEventId+ (\s a -> s { _wesea1ExternalInitiatedEventId = a })++-- | The workflow execution that sent the signal. This is set only of the+-- signal was sent by another workflow execution.+wesea1ExternalWorkflowExecution :: Lens' WorkflowExecutionSignaledEventAttributes (Maybe WorkflowExecution)+wesea1ExternalWorkflowExecution =+ lens _wesea1ExternalWorkflowExecution+ (\s a -> s { _wesea1ExternalWorkflowExecution = a })++-- | Inputs provided with the signal (if any). The decider can use the signal+-- name and inputs to determine how to process the signal.+wesea1Input :: Lens' WorkflowExecutionSignaledEventAttributes (Maybe Text)+wesea1Input = lens _wesea1Input (\s a -> s { _wesea1Input = a })++-- | The name of the signal received. The decider can use the signal name and+-- inputs to determine how to the process the signal.+wesea1SignalName :: Lens' WorkflowExecutionSignaledEventAttributes Text+wesea1SignalName = lens _wesea1SignalName (\s a -> s { _wesea1SignalName = a })++instance FromJSON WorkflowExecutionSignaledEventAttributes where+ parseJSON = withObject "WorkflowExecutionSignaledEventAttributes" $ \o -> WorkflowExecutionSignaledEventAttributes+ <$> o .:? "externalInitiatedEventId"+ <*> o .:? "externalWorkflowExecution"+ <*> o .:? "input"+ <*> o .: "signalName"++instance ToJSON WorkflowExecutionSignaledEventAttributes where+ toJSON WorkflowExecutionSignaledEventAttributes{..} = object+ [ "signalName" .= _wesea1SignalName+ , "input" .= _wesea1Input+ , "externalWorkflowExecution" .= _wesea1ExternalWorkflowExecution+ , "externalInitiatedEventId" .= _wesea1ExternalInitiatedEventId+ ]++data RecordMarkerFailedCause+ = RMFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable RecordMarkerFailedCause++instance FromText RecordMarkerFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" RMFCOperationNotPermitted++instance ToText RecordMarkerFailedCause where+ toText RMFCOperationNotPermitted = "OPERATION_NOT_PERMITTED"++instance FromJSON RecordMarkerFailedCause where+ parseJSON = parseJSONText "RecordMarkerFailedCause"++instance ToJSON RecordMarkerFailedCause where+ toJSON = toJSONText++data RegistrationStatus+ = Deprecated -- ^ DEPRECATED+ | Registered -- ^ REGISTERED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable RegistrationStatus++instance FromText RegistrationStatus where+ parser = match "DEPRECATED" Deprecated+ <|> match "REGISTERED" Registered++instance ToText RegistrationStatus where+ toText = \case+ Deprecated -> "DEPRECATED"+ Registered -> "REGISTERED"++instance FromJSON RegistrationStatus where+ parseJSON = parseJSONText "RegistrationStatus"++instance ToJSON RegistrationStatus where+ toJSON = toJSONText++data TimerStartedEventAttributes = TimerStartedEventAttributes+ { _tseaControl :: Maybe Text+ , _tseaDecisionTaskCompletedEventId :: Integer+ , _tseaStartToFireTimeout :: Text+ , _tseaTimerId :: Text+ } deriving (Eq, Ord, Show)++-- | 'TimerStartedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tseaControl' @::@ 'Maybe' 'Text'+--+-- * 'tseaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'tseaStartToFireTimeout' @::@ 'Text'+--+-- * 'tseaTimerId' @::@ 'Text'+--+timerStartedEventAttributes :: Text -- ^ 'tseaTimerId'+ -> Text -- ^ 'tseaStartToFireTimeout'+ -> Integer -- ^ 'tseaDecisionTaskCompletedEventId'+ -> TimerStartedEventAttributes+timerStartedEventAttributes p1 p2 p3 = TimerStartedEventAttributes+ { _tseaTimerId = p1+ , _tseaStartToFireTimeout = p2+ , _tseaDecisionTaskCompletedEventId = p3+ , _tseaControl = Nothing+ }++-- | Optional data attached to the event that can be used by the decider in+-- subsequent workflow tasks.+tseaControl :: Lens' TimerStartedEventAttributes (Maybe Text)+tseaControl = lens _tseaControl (\s a -> s { _tseaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the StartTimer decision for this activity task.+-- This information can be useful for diagnosing problems by tracing back+-- the cause of events.+tseaDecisionTaskCompletedEventId :: Lens' TimerStartedEventAttributes Integer+tseaDecisionTaskCompletedEventId =+ lens _tseaDecisionTaskCompletedEventId+ (\s a -> s { _tseaDecisionTaskCompletedEventId = a })++-- | The duration of time after which the timer will fire. The duration is+-- specified in seconds. The valid values are integers greater than or equal+-- to 0.+tseaStartToFireTimeout :: Lens' TimerStartedEventAttributes Text+tseaStartToFireTimeout =+ lens _tseaStartToFireTimeout (\s a -> s { _tseaStartToFireTimeout = a })++-- | The unique Id of the timer that was started.+tseaTimerId :: Lens' TimerStartedEventAttributes Text+tseaTimerId = lens _tseaTimerId (\s a -> s { _tseaTimerId = a })++instance FromJSON TimerStartedEventAttributes where+ parseJSON = withObject "TimerStartedEventAttributes" $ \o -> TimerStartedEventAttributes+ <$> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "startToFireTimeout"+ <*> o .: "timerId"++instance ToJSON TimerStartedEventAttributes where+ toJSON TimerStartedEventAttributes{..} = object+ [ "timerId" .= _tseaTimerId+ , "control" .= _tseaControl+ , "startToFireTimeout" .= _tseaStartToFireTimeout+ , "decisionTaskCompletedEventId" .= _tseaDecisionTaskCompletedEventId+ ]++newtype RequestCancelActivityTaskDecisionAttributes = RequestCancelActivityTaskDecisionAttributes+ { _rcatdaActivityId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'RequestCancelActivityTaskDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rcatdaActivityId' @::@ 'Text'+--+requestCancelActivityTaskDecisionAttributes :: Text -- ^ 'rcatdaActivityId'+ -> RequestCancelActivityTaskDecisionAttributes+requestCancelActivityTaskDecisionAttributes p1 = RequestCancelActivityTaskDecisionAttributes+ { _rcatdaActivityId = p1+ }++-- | The activityId of the activity task to be canceled.+rcatdaActivityId :: Lens' RequestCancelActivityTaskDecisionAttributes Text+rcatdaActivityId = lens _rcatdaActivityId (\s a -> s { _rcatdaActivityId = a })++instance FromJSON RequestCancelActivityTaskDecisionAttributes where+ parseJSON = withObject "RequestCancelActivityTaskDecisionAttributes" $ \o -> RequestCancelActivityTaskDecisionAttributes+ <$> o .: "activityId"++instance ToJSON RequestCancelActivityTaskDecisionAttributes where+ toJSON RequestCancelActivityTaskDecisionAttributes{..} = object+ [ "activityId" .= _rcatdaActivityId+ ]++data Decision = Decision+ { _dCancelTimerDecisionAttributes :: Maybe CancelTimerDecisionAttributes+ , _dCancelWorkflowExecutionDecisionAttributes :: Maybe CancelWorkflowExecutionDecisionAttributes+ , _dCompleteWorkflowExecutionDecisionAttributes :: Maybe CompleteWorkflowExecutionDecisionAttributes+ , _dContinueAsNewWorkflowExecutionDecisionAttributes :: Maybe ContinueAsNewWorkflowExecutionDecisionAttributes+ , _dDecisionType :: Text+ , _dFailWorkflowExecutionDecisionAttributes :: Maybe FailWorkflowExecutionDecisionAttributes+ , _dRecordMarkerDecisionAttributes :: Maybe RecordMarkerDecisionAttributes+ , _dRequestCancelActivityTaskDecisionAttributes :: Maybe RequestCancelActivityTaskDecisionAttributes+ , _dRequestCancelExternalWorkflowExecutionDecisionAttributes :: Maybe RequestCancelExternalWorkflowExecutionDecisionAttributes+ , _dScheduleActivityTaskDecisionAttributes :: Maybe ScheduleActivityTaskDecisionAttributes+ , _dSignalExternalWorkflowExecutionDecisionAttributes :: Maybe SignalExternalWorkflowExecutionDecisionAttributes+ , _dStartChildWorkflowExecutionDecisionAttributes :: Maybe StartChildWorkflowExecutionDecisionAttributes+ , _dStartTimerDecisionAttributes :: Maybe StartTimerDecisionAttributes+ } deriving (Eq, Show)++-- | 'Decision' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dCancelTimerDecisionAttributes' @::@ 'Maybe' 'CancelTimerDecisionAttributes'+--+-- * 'dCancelWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'CancelWorkflowExecutionDecisionAttributes'+--+-- * 'dCompleteWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'CompleteWorkflowExecutionDecisionAttributes'+--+-- * 'dContinueAsNewWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'ContinueAsNewWorkflowExecutionDecisionAttributes'+--+-- * 'dDecisionType' @::@ 'Text'+--+-- * 'dFailWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'FailWorkflowExecutionDecisionAttributes'+--+-- * 'dRecordMarkerDecisionAttributes' @::@ 'Maybe' 'RecordMarkerDecisionAttributes'+--+-- * 'dRequestCancelActivityTaskDecisionAttributes' @::@ 'Maybe' 'RequestCancelActivityTaskDecisionAttributes'+--+-- * 'dRequestCancelExternalWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'RequestCancelExternalWorkflowExecutionDecisionAttributes'+--+-- * 'dScheduleActivityTaskDecisionAttributes' @::@ 'Maybe' 'ScheduleActivityTaskDecisionAttributes'+--+-- * 'dSignalExternalWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'SignalExternalWorkflowExecutionDecisionAttributes'+--+-- * 'dStartChildWorkflowExecutionDecisionAttributes' @::@ 'Maybe' 'StartChildWorkflowExecutionDecisionAttributes'+--+-- * 'dStartTimerDecisionAttributes' @::@ 'Maybe' 'StartTimerDecisionAttributes'+--+decision :: Text -- ^ 'dDecisionType'+ -> Decision+decision p1 = Decision+ { _dDecisionType = p1+ , _dScheduleActivityTaskDecisionAttributes = Nothing+ , _dRequestCancelActivityTaskDecisionAttributes = Nothing+ , _dCompleteWorkflowExecutionDecisionAttributes = Nothing+ , _dFailWorkflowExecutionDecisionAttributes = Nothing+ , _dCancelWorkflowExecutionDecisionAttributes = Nothing+ , _dContinueAsNewWorkflowExecutionDecisionAttributes = Nothing+ , _dRecordMarkerDecisionAttributes = Nothing+ , _dStartTimerDecisionAttributes = Nothing+ , _dCancelTimerDecisionAttributes = Nothing+ , _dSignalExternalWorkflowExecutionDecisionAttributes = Nothing+ , _dRequestCancelExternalWorkflowExecutionDecisionAttributes = Nothing+ , _dStartChildWorkflowExecutionDecisionAttributes = Nothing+ }++-- | Provides details of the CancelTimer decision. It is not set for other+-- decision types.+dCancelTimerDecisionAttributes :: Lens' Decision (Maybe CancelTimerDecisionAttributes)+dCancelTimerDecisionAttributes =+ lens _dCancelTimerDecisionAttributes+ (\s a -> s { _dCancelTimerDecisionAttributes = a })++-- | Provides details of the CancelWorkflowExecution decision. It is not set+-- for other decision types.+dCancelWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe CancelWorkflowExecutionDecisionAttributes)+dCancelWorkflowExecutionDecisionAttributes =+ lens _dCancelWorkflowExecutionDecisionAttributes+ (\s a -> s { _dCancelWorkflowExecutionDecisionAttributes = a })++-- | Provides details of the CompleteWorkflowExecution decision. It is not set+-- for other decision types.+dCompleteWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe CompleteWorkflowExecutionDecisionAttributes)+dCompleteWorkflowExecutionDecisionAttributes =+ lens _dCompleteWorkflowExecutionDecisionAttributes+ (\s a -> s { _dCompleteWorkflowExecutionDecisionAttributes = a })++-- | Provides details of the ContinueAsNewWorkflowExecution decision. It is+-- not set for other decision types.+dContinueAsNewWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe ContinueAsNewWorkflowExecutionDecisionAttributes)+dContinueAsNewWorkflowExecutionDecisionAttributes =+ lens _dContinueAsNewWorkflowExecutionDecisionAttributes+ (\s a -> s { _dContinueAsNewWorkflowExecutionDecisionAttributes = a })++-- | Specifies the type of the decision.+dDecisionType :: Lens' Decision Text+dDecisionType = lens _dDecisionType (\s a -> s { _dDecisionType = a })++-- | Provides details of the FailWorkflowExecution decision. It is not set for+-- other decision types.+dFailWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe FailWorkflowExecutionDecisionAttributes)+dFailWorkflowExecutionDecisionAttributes =+ lens _dFailWorkflowExecutionDecisionAttributes+ (\s a -> s { _dFailWorkflowExecutionDecisionAttributes = a })++-- | Provides details of the RecordMarker decision. It is not set for other+-- decision types.+dRecordMarkerDecisionAttributes :: Lens' Decision (Maybe RecordMarkerDecisionAttributes)+dRecordMarkerDecisionAttributes =+ lens _dRecordMarkerDecisionAttributes+ (\s a -> s { _dRecordMarkerDecisionAttributes = a })++-- | Provides details of the RequestCancelActivityTask decision. It is not set+-- for other decision types.+dRequestCancelActivityTaskDecisionAttributes :: Lens' Decision (Maybe RequestCancelActivityTaskDecisionAttributes)+dRequestCancelActivityTaskDecisionAttributes =+ lens _dRequestCancelActivityTaskDecisionAttributes+ (\s a -> s { _dRequestCancelActivityTaskDecisionAttributes = a })++-- | Provides details of the RequestCancelExternalWorkflowExecution decision.+-- It is not set for other decision types.+dRequestCancelExternalWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe RequestCancelExternalWorkflowExecutionDecisionAttributes)+dRequestCancelExternalWorkflowExecutionDecisionAttributes =+ lens _dRequestCancelExternalWorkflowExecutionDecisionAttributes+ (\s a -> s { _dRequestCancelExternalWorkflowExecutionDecisionAttributes = a })++-- | Provides details of the ScheduleActivityTask decision. It is not set for+-- other decision types.+dScheduleActivityTaskDecisionAttributes :: Lens' Decision (Maybe ScheduleActivityTaskDecisionAttributes)+dScheduleActivityTaskDecisionAttributes =+ lens _dScheduleActivityTaskDecisionAttributes+ (\s a -> s { _dScheduleActivityTaskDecisionAttributes = a })++-- | Provides details of the SignalExternalWorkflowExecution decision. It is+-- not set for other decision types.+dSignalExternalWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe SignalExternalWorkflowExecutionDecisionAttributes)+dSignalExternalWorkflowExecutionDecisionAttributes =+ lens _dSignalExternalWorkflowExecutionDecisionAttributes+ (\s a -> s { _dSignalExternalWorkflowExecutionDecisionAttributes = a })++-- | Provides details of the StartChildWorkflowExecution decision. It is not+-- set for other decision types.+dStartChildWorkflowExecutionDecisionAttributes :: Lens' Decision (Maybe StartChildWorkflowExecutionDecisionAttributes)+dStartChildWorkflowExecutionDecisionAttributes =+ lens _dStartChildWorkflowExecutionDecisionAttributes+ (\s a -> s { _dStartChildWorkflowExecutionDecisionAttributes = a })++-- | Provides details of the StartTimer decision. It is not set for other+-- decision types.+dStartTimerDecisionAttributes :: Lens' Decision (Maybe StartTimerDecisionAttributes)+dStartTimerDecisionAttributes =+ lens _dStartTimerDecisionAttributes+ (\s a -> s { _dStartTimerDecisionAttributes = a })++instance FromJSON Decision where+ parseJSON = withObject "Decision" $ \o -> Decision+ <$> o .:? "cancelTimerDecisionAttributes"+ <*> o .:? "cancelWorkflowExecutionDecisionAttributes"+ <*> o .:? "completeWorkflowExecutionDecisionAttributes"+ <*> o .:? "continueAsNewWorkflowExecutionDecisionAttributes"+ <*> o .: "decisionType"+ <*> o .:? "failWorkflowExecutionDecisionAttributes"+ <*> o .:? "recordMarkerDecisionAttributes"+ <*> o .:? "requestCancelActivityTaskDecisionAttributes"+ <*> o .:? "requestCancelExternalWorkflowExecutionDecisionAttributes"+ <*> o .:? "scheduleActivityTaskDecisionAttributes"+ <*> o .:? "signalExternalWorkflowExecutionDecisionAttributes"+ <*> o .:? "startChildWorkflowExecutionDecisionAttributes"+ <*> o .:? "startTimerDecisionAttributes"++instance ToJSON Decision where+ toJSON Decision{..} = object+ [ "decisionType" .= _dDecisionType+ , "scheduleActivityTaskDecisionAttributes" .= _dScheduleActivityTaskDecisionAttributes+ , "requestCancelActivityTaskDecisionAttributes" .= _dRequestCancelActivityTaskDecisionAttributes+ , "completeWorkflowExecutionDecisionAttributes" .= _dCompleteWorkflowExecutionDecisionAttributes+ , "failWorkflowExecutionDecisionAttributes" .= _dFailWorkflowExecutionDecisionAttributes+ , "cancelWorkflowExecutionDecisionAttributes" .= _dCancelWorkflowExecutionDecisionAttributes+ , "continueAsNewWorkflowExecutionDecisionAttributes" .= _dContinueAsNewWorkflowExecutionDecisionAttributes+ , "recordMarkerDecisionAttributes" .= _dRecordMarkerDecisionAttributes+ , "startTimerDecisionAttributes" .= _dStartTimerDecisionAttributes+ , "cancelTimerDecisionAttributes" .= _dCancelTimerDecisionAttributes+ , "signalExternalWorkflowExecutionDecisionAttributes" .= _dSignalExternalWorkflowExecutionDecisionAttributes+ , "requestCancelExternalWorkflowExecutionDecisionAttributes" .= _dRequestCancelExternalWorkflowExecutionDecisionAttributes+ , "startChildWorkflowExecutionDecisionAttributes" .= _dStartChildWorkflowExecutionDecisionAttributes+ ]++data TimerFiredEventAttributes = TimerFiredEventAttributes+ { _tfeaStartedEventId :: Integer+ , _tfeaTimerId :: Text+ } deriving (Eq, Ord, Show)++-- | 'TimerFiredEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tfeaStartedEventId' @::@ 'Integer'+--+-- * 'tfeaTimerId' @::@ 'Text'+--+timerFiredEventAttributes :: Text -- ^ 'tfeaTimerId'+ -> Integer -- ^ 'tfeaStartedEventId'+ -> TimerFiredEventAttributes+timerFiredEventAttributes p1 p2 = TimerFiredEventAttributes+ { _tfeaTimerId = p1+ , _tfeaStartedEventId = p2+ }++-- | The id of the TimerStarted event that was recorded when this timer was+-- started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+tfeaStartedEventId :: Lens' TimerFiredEventAttributes Integer+tfeaStartedEventId =+ lens _tfeaStartedEventId (\s a -> s { _tfeaStartedEventId = a })++-- | The unique Id of the timer that fired.+tfeaTimerId :: Lens' TimerFiredEventAttributes Text+tfeaTimerId = lens _tfeaTimerId (\s a -> s { _tfeaTimerId = a })++instance FromJSON TimerFiredEventAttributes where+ parseJSON = withObject "TimerFiredEventAttributes" $ \o -> TimerFiredEventAttributes+ <$> o .: "startedEventId"+ <*> o .: "timerId"++instance ToJSON TimerFiredEventAttributes where+ toJSON TimerFiredEventAttributes{..} = object+ [ "timerId" .= _tfeaTimerId+ , "startedEventId" .= _tfeaStartedEventId+ ]++newtype DomainConfiguration = DomainConfiguration+ { _dcWorkflowExecutionRetentionPeriodInDays :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DomainConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dcWorkflowExecutionRetentionPeriodInDays' @::@ 'Text'+--+domainConfiguration :: Text -- ^ 'dcWorkflowExecutionRetentionPeriodInDays'+ -> DomainConfiguration+domainConfiguration p1 = DomainConfiguration+ { _dcWorkflowExecutionRetentionPeriodInDays = p1+ }++-- | The retention period for workflow executions in this domain.+dcWorkflowExecutionRetentionPeriodInDays :: Lens' DomainConfiguration Text+dcWorkflowExecutionRetentionPeriodInDays =+ lens _dcWorkflowExecutionRetentionPeriodInDays+ (\s a -> s { _dcWorkflowExecutionRetentionPeriodInDays = a })++instance FromJSON DomainConfiguration where+ parseJSON = withObject "DomainConfiguration" $ \o -> DomainConfiguration+ <$> o .: "workflowExecutionRetentionPeriodInDays"++instance ToJSON DomainConfiguration where+ toJSON DomainConfiguration{..} = object+ [ "workflowExecutionRetentionPeriodInDays" .= _dcWorkflowExecutionRetentionPeriodInDays+ ]++data ExternalWorkflowExecutionSignaledEventAttributes = ExternalWorkflowExecutionSignaledEventAttributes+ { _eweseaInitiatedEventId :: Integer+ , _eweseaWorkflowExecution :: WorkflowExecution+ } deriving (Eq, Show)++-- | 'ExternalWorkflowExecutionSignaledEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'eweseaInitiatedEventId' @::@ 'Integer'+--+-- * 'eweseaWorkflowExecution' @::@ 'WorkflowExecution'+--+externalWorkflowExecutionSignaledEventAttributes :: WorkflowExecution -- ^ 'eweseaWorkflowExecution'+ -> Integer -- ^ 'eweseaInitiatedEventId'+ -> ExternalWorkflowExecutionSignaledEventAttributes+externalWorkflowExecutionSignaledEventAttributes p1 p2 = ExternalWorkflowExecutionSignaledEventAttributes+ { _eweseaWorkflowExecution = p1+ , _eweseaInitiatedEventId = p2+ }++-- | The id of the SignalExternalWorkflowExecutionInitiated event+-- corresponding to the SignalExternalWorkflowExecution decision to request+-- this signal. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+eweseaInitiatedEventId :: Lens' ExternalWorkflowExecutionSignaledEventAttributes Integer+eweseaInitiatedEventId =+ lens _eweseaInitiatedEventId (\s a -> s { _eweseaInitiatedEventId = a })++-- | The external workflow execution that the signal was delivered to.+eweseaWorkflowExecution :: Lens' ExternalWorkflowExecutionSignaledEventAttributes WorkflowExecution+eweseaWorkflowExecution =+ lens _eweseaWorkflowExecution (\s a -> s { _eweseaWorkflowExecution = a })++instance FromJSON ExternalWorkflowExecutionSignaledEventAttributes where+ parseJSON = withObject "ExternalWorkflowExecutionSignaledEventAttributes" $ \o -> ExternalWorkflowExecutionSignaledEventAttributes+ <$> o .: "initiatedEventId"+ <*> o .: "workflowExecution"++instance ToJSON ExternalWorkflowExecutionSignaledEventAttributes where+ toJSON ExternalWorkflowExecutionSignaledEventAttributes{..} = object+ [ "workflowExecution" .= _eweseaWorkflowExecution+ , "initiatedEventId" .= _eweseaInitiatedEventId+ ]++newtype CancelWorkflowExecutionDecisionAttributes = CancelWorkflowExecutionDecisionAttributes+ { _cwedaDetails :: Maybe Text+ } deriving (Eq, Ord, Show, Monoid)++-- | 'CancelWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwedaDetails' @::@ 'Maybe' 'Text'+--+cancelWorkflowExecutionDecisionAttributes :: CancelWorkflowExecutionDecisionAttributes+cancelWorkflowExecutionDecisionAttributes = CancelWorkflowExecutionDecisionAttributes+ { _cwedaDetails = Nothing+ }++-- | Optional details of the cancellation.+cwedaDetails :: Lens' CancelWorkflowExecutionDecisionAttributes (Maybe Text)+cwedaDetails = lens _cwedaDetails (\s a -> s { _cwedaDetails = a })++instance FromJSON CancelWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "CancelWorkflowExecutionDecisionAttributes" $ \o -> CancelWorkflowExecutionDecisionAttributes+ <$> o .:? "details"++instance ToJSON CancelWorkflowExecutionDecisionAttributes where+ toJSON CancelWorkflowExecutionDecisionAttributes{..} = object+ [ "details" .= _cwedaDetails+ ]++data ActivityTaskFailedEventAttributes = ActivityTaskFailedEventAttributes+ { _atfeaDetails :: Maybe Text+ , _atfeaReason :: Maybe Text+ , _atfeaScheduledEventId :: Integer+ , _atfeaStartedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'ActivityTaskFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atfeaDetails' @::@ 'Maybe' 'Text'+--+-- * 'atfeaReason' @::@ 'Maybe' 'Text'+--+-- * 'atfeaScheduledEventId' @::@ 'Integer'+--+-- * 'atfeaStartedEventId' @::@ 'Integer'+--+activityTaskFailedEventAttributes :: Integer -- ^ 'atfeaScheduledEventId'+ -> Integer -- ^ 'atfeaStartedEventId'+ -> ActivityTaskFailedEventAttributes+activityTaskFailedEventAttributes p1 p2 = ActivityTaskFailedEventAttributes+ { _atfeaScheduledEventId = p1+ , _atfeaStartedEventId = p2+ , _atfeaReason = Nothing+ , _atfeaDetails = Nothing+ }++-- | The details of the failure (if any).+atfeaDetails :: Lens' ActivityTaskFailedEventAttributes (Maybe Text)+atfeaDetails = lens _atfeaDetails (\s a -> s { _atfeaDetails = a })++-- | The reason provided for the failure (if any).+atfeaReason :: Lens' ActivityTaskFailedEventAttributes (Maybe Text)+atfeaReason = lens _atfeaReason (\s a -> s { _atfeaReason = a })++-- | The id of the ActivityTaskScheduled event that was recorded when this+-- activity task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+atfeaScheduledEventId :: Lens' ActivityTaskFailedEventAttributes Integer+atfeaScheduledEventId =+ lens _atfeaScheduledEventId (\s a -> s { _atfeaScheduledEventId = a })++-- | The Id of the ActivityTaskStarted event recorded when this activity task+-- was started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+atfeaStartedEventId :: Lens' ActivityTaskFailedEventAttributes Integer+atfeaStartedEventId =+ lens _atfeaStartedEventId (\s a -> s { _atfeaStartedEventId = a })++instance FromJSON ActivityTaskFailedEventAttributes where+ parseJSON = withObject "ActivityTaskFailedEventAttributes" $ \o -> ActivityTaskFailedEventAttributes+ <$> o .:? "details"+ <*> o .:? "reason"+ <*> o .: "scheduledEventId"+ <*> o .: "startedEventId"++instance ToJSON ActivityTaskFailedEventAttributes where+ toJSON ActivityTaskFailedEventAttributes{..} = object+ [ "reason" .= _atfeaReason+ , "details" .= _atfeaDetails+ , "scheduledEventId" .= _atfeaScheduledEventId+ , "startedEventId" .= _atfeaStartedEventId+ ]++data FailWorkflowExecutionFailedEventAttributes = FailWorkflowExecutionFailedEventAttributes+ { _fwefeaCause :: Text+ , _fwefeaDecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'FailWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fwefeaCause' @::@ 'Text'+--+-- * 'fwefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+failWorkflowExecutionFailedEventAttributes :: Text -- ^ 'fwefeaCause'+ -> Integer -- ^ 'fwefeaDecisionTaskCompletedEventId'+ -> FailWorkflowExecutionFailedEventAttributes+failWorkflowExecutionFailedEventAttributes p1 p2 = FailWorkflowExecutionFailedEventAttributes+ { _fwefeaCause = p1+ , _fwefeaDecisionTaskCompletedEventId = p2+ }++-- | The cause of the failure. This information is generated by the system and+-- can be useful for diagnostic purposes.+fwefeaCause :: Lens' FailWorkflowExecutionFailedEventAttributes Text+fwefeaCause = lens _fwefeaCause (\s a -> s { _fwefeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the FailWorkflowExecution decision to fail this+-- execution. This information can be useful for diagnosing problems by+-- tracing back the cause of events.+fwefeaDecisionTaskCompletedEventId :: Lens' FailWorkflowExecutionFailedEventAttributes Integer+fwefeaDecisionTaskCompletedEventId =+ lens _fwefeaDecisionTaskCompletedEventId+ (\s a -> s { _fwefeaDecisionTaskCompletedEventId = a })++instance FromJSON FailWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "FailWorkflowExecutionFailedEventAttributes" $ \o -> FailWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON FailWorkflowExecutionFailedEventAttributes where+ toJSON FailWorkflowExecutionFailedEventAttributes{..} = object+ [ "cause" .= _fwefeaCause+ , "decisionTaskCompletedEventId" .= _fwefeaDecisionTaskCompletedEventId+ ]++data StartChildWorkflowExecutionFailedEventAttributes = StartChildWorkflowExecutionFailedEventAttributes+ { _scwefeaCause :: Text+ , _scwefeaControl :: Maybe Text+ , _scwefeaDecisionTaskCompletedEventId :: Integer+ , _scwefeaInitiatedEventId :: Integer+ , _scwefeaWorkflowId :: Text+ , _scwefeaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'StartChildWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'scwefeaCause' @::@ 'Text'+--+-- * 'scwefeaControl' @::@ 'Maybe' 'Text'+--+-- * 'scwefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'scwefeaInitiatedEventId' @::@ 'Integer'+--+-- * 'scwefeaWorkflowId' @::@ 'Text'+--+-- * 'scwefeaWorkflowType' @::@ 'WorkflowType'+--+startChildWorkflowExecutionFailedEventAttributes :: WorkflowType -- ^ 'scwefeaWorkflowType'+ -> Text -- ^ 'scwefeaCause'+ -> Text -- ^ 'scwefeaWorkflowId'+ -> Integer -- ^ 'scwefeaInitiatedEventId'+ -> Integer -- ^ 'scwefeaDecisionTaskCompletedEventId'+ -> StartChildWorkflowExecutionFailedEventAttributes+startChildWorkflowExecutionFailedEventAttributes p1 p2 p3 p4 p5 = StartChildWorkflowExecutionFailedEventAttributes+ { _scwefeaWorkflowType = p1+ , _scwefeaCause = p2+ , _scwefeaWorkflowId = p3+ , _scwefeaInitiatedEventId = p4+ , _scwefeaDecisionTaskCompletedEventId = p5+ , _scwefeaControl = Nothing+ }++-- | The cause of the failure to process the decision. This information is+-- generated by the system and can be useful for diagnostic purposes.+scwefeaCause :: Lens' StartChildWorkflowExecutionFailedEventAttributes Text+scwefeaCause = lens _scwefeaCause (\s a -> s { _scwefeaCause = a })++scwefeaControl :: Lens' StartChildWorkflowExecutionFailedEventAttributes (Maybe Text)+scwefeaControl = lens _scwefeaControl (\s a -> s { _scwefeaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the StartChildWorkflowExecution Decision to request+-- this child workflow execution. This information can be useful for+-- diagnosing problems by tracing back the cause of events.+scwefeaDecisionTaskCompletedEventId :: Lens' StartChildWorkflowExecutionFailedEventAttributes Integer+scwefeaDecisionTaskCompletedEventId =+ lens _scwefeaDecisionTaskCompletedEventId+ (\s a -> s { _scwefeaDecisionTaskCompletedEventId = a })++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+scwefeaInitiatedEventId :: Lens' StartChildWorkflowExecutionFailedEventAttributes Integer+scwefeaInitiatedEventId =+ lens _scwefeaInitiatedEventId (\s a -> s { _scwefeaInitiatedEventId = a })++-- | The workflowId of the child workflow execution.+scwefeaWorkflowId :: Lens' StartChildWorkflowExecutionFailedEventAttributes Text+scwefeaWorkflowId =+ lens _scwefeaWorkflowId (\s a -> s { _scwefeaWorkflowId = a })++-- | The workflow type provided in the StartChildWorkflowExecution Decision+-- that failed.+scwefeaWorkflowType :: Lens' StartChildWorkflowExecutionFailedEventAttributes WorkflowType+scwefeaWorkflowType =+ lens _scwefeaWorkflowType (\s a -> s { _scwefeaWorkflowType = a })++instance FromJSON StartChildWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "StartChildWorkflowExecutionFailedEventAttributes" $ \o -> StartChildWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .: "initiatedEventId"+ <*> o .: "workflowId"+ <*> o .: "workflowType"++instance ToJSON StartChildWorkflowExecutionFailedEventAttributes where+ toJSON StartChildWorkflowExecutionFailedEventAttributes{..} = object+ [ "workflowType" .= _scwefeaWorkflowType+ , "cause" .= _scwefeaCause+ , "workflowId" .= _scwefeaWorkflowId+ , "initiatedEventId" .= _scwefeaInitiatedEventId+ , "decisionTaskCompletedEventId" .= _scwefeaDecisionTaskCompletedEventId+ , "control" .= _scwefeaControl+ ]++data WorkflowTypeFilter = WorkflowTypeFilter+ { _wtfName :: Text+ , _wtfVersion :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowTypeFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wtfName' @::@ 'Text'+--+-- * 'wtfVersion' @::@ 'Maybe' 'Text'+--+workflowTypeFilter :: Text -- ^ 'wtfName'+ -> WorkflowTypeFilter+workflowTypeFilter p1 = WorkflowTypeFilter+ { _wtfName = p1+ , _wtfVersion = Nothing+ }++-- | Name of the workflow type. This field is required.+wtfName :: Lens' WorkflowTypeFilter Text+wtfName = lens _wtfName (\s a -> s { _wtfName = a })++-- | Version of the workflow type.+wtfVersion :: Lens' WorkflowTypeFilter (Maybe Text)+wtfVersion = lens _wtfVersion (\s a -> s { _wtfVersion = a })++instance FromJSON WorkflowTypeFilter where+ parseJSON = withObject "WorkflowTypeFilter" $ \o -> WorkflowTypeFilter+ <$> o .: "name"+ <*> o .:? "version"++instance ToJSON WorkflowTypeFilter where+ toJSON WorkflowTypeFilter{..} = object+ [ "name" .= _wtfName+ , "version" .= _wtfVersion+ ]++data CancelTimerFailedCause+ = CTFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | CTFCTimerIdUnknown -- ^ TIMER_ID_UNKNOWN+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable CancelTimerFailedCause++instance FromText CancelTimerFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" CTFCOperationNotPermitted+ <|> match "TIMER_ID_UNKNOWN" CTFCTimerIdUnknown++instance ToText CancelTimerFailedCause where+ toText = \case+ CTFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ CTFCTimerIdUnknown -> "TIMER_ID_UNKNOWN"++instance FromJSON CancelTimerFailedCause where+ parseJSON = parseJSONText "CancelTimerFailedCause"++instance ToJSON CancelTimerFailedCause where+ toJSON = toJSONText++data DecisionTaskCompletedEventAttributes = DecisionTaskCompletedEventAttributes+ { _dtceaExecutionContext :: Maybe Text+ , _dtceaScheduledEventId :: Integer+ , _dtceaStartedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'DecisionTaskCompletedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dtceaExecutionContext' @::@ 'Maybe' 'Text'+--+-- * 'dtceaScheduledEventId' @::@ 'Integer'+--+-- * 'dtceaStartedEventId' @::@ 'Integer'+--+decisionTaskCompletedEventAttributes :: Integer -- ^ 'dtceaScheduledEventId'+ -> Integer -- ^ 'dtceaStartedEventId'+ -> DecisionTaskCompletedEventAttributes+decisionTaskCompletedEventAttributes p1 p2 = DecisionTaskCompletedEventAttributes+ { _dtceaScheduledEventId = p1+ , _dtceaStartedEventId = p2+ , _dtceaExecutionContext = Nothing+ }++-- | User defined context for the workflow execution.+dtceaExecutionContext :: Lens' DecisionTaskCompletedEventAttributes (Maybe Text)+dtceaExecutionContext =+ lens _dtceaExecutionContext (\s a -> s { _dtceaExecutionContext = a })++-- | The id of the DecisionTaskScheduled event that was recorded when this+-- decision task was scheduled. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+dtceaScheduledEventId :: Lens' DecisionTaskCompletedEventAttributes Integer+dtceaScheduledEventId =+ lens _dtceaScheduledEventId (\s a -> s { _dtceaScheduledEventId = a })++-- | The Id of the DecisionTaskStarted event recorded when this decision task+-- was started. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+dtceaStartedEventId :: Lens' DecisionTaskCompletedEventAttributes Integer+dtceaStartedEventId =+ lens _dtceaStartedEventId (\s a -> s { _dtceaStartedEventId = a })++instance FromJSON DecisionTaskCompletedEventAttributes where+ parseJSON = withObject "DecisionTaskCompletedEventAttributes" $ \o -> DecisionTaskCompletedEventAttributes+ <$> o .:? "executionContext"+ <*> o .: "scheduledEventId"+ <*> o .: "startedEventId"++instance ToJSON DecisionTaskCompletedEventAttributes where+ toJSON DecisionTaskCompletedEventAttributes{..} = object+ [ "executionContext" .= _dtceaExecutionContext+ , "scheduledEventId" .= _dtceaScheduledEventId+ , "startedEventId" .= _dtceaStartedEventId+ ]++data ChildWorkflowExecutionFailedEventAttributes = ChildWorkflowExecutionFailedEventAttributes+ { _cwefeaDetails :: Maybe Text+ , _cwefeaInitiatedEventId :: Integer+ , _cwefeaReason :: Maybe Text+ , _cwefeaStartedEventId :: Integer+ , _cwefeaWorkflowExecution :: WorkflowExecution+ , _cwefeaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'ChildWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwefeaDetails' @::@ 'Maybe' 'Text'+--+-- * 'cwefeaInitiatedEventId' @::@ 'Integer'+--+-- * 'cwefeaReason' @::@ 'Maybe' 'Text'+--+-- * 'cwefeaStartedEventId' @::@ 'Integer'+--+-- * 'cwefeaWorkflowExecution' @::@ 'WorkflowExecution'+--+-- * 'cwefeaWorkflowType' @::@ 'WorkflowType'+--+childWorkflowExecutionFailedEventAttributes :: WorkflowExecution -- ^ 'cwefeaWorkflowExecution'+ -> WorkflowType -- ^ 'cwefeaWorkflowType'+ -> Integer -- ^ 'cwefeaInitiatedEventId'+ -> Integer -- ^ 'cwefeaStartedEventId'+ -> ChildWorkflowExecutionFailedEventAttributes+childWorkflowExecutionFailedEventAttributes p1 p2 p3 p4 = ChildWorkflowExecutionFailedEventAttributes+ { _cwefeaWorkflowExecution = p1+ , _cwefeaWorkflowType = p2+ , _cwefeaInitiatedEventId = p3+ , _cwefeaStartedEventId = p4+ , _cwefeaReason = Nothing+ , _cwefeaDetails = Nothing+ }++-- | The details of the failure (if provided).+cwefeaDetails :: Lens' ChildWorkflowExecutionFailedEventAttributes (Maybe Text)+cwefeaDetails = lens _cwefeaDetails (\s a -> s { _cwefeaDetails = a })++-- | The id of the StartChildWorkflowExecutionInitiated event corresponding to+-- the StartChildWorkflowExecution Decision to start this child workflow+-- execution. This information can be useful for diagnosing problems by+-- tracing back the chain of events leading up to this event.+cwefeaInitiatedEventId :: Lens' ChildWorkflowExecutionFailedEventAttributes Integer+cwefeaInitiatedEventId =+ lens _cwefeaInitiatedEventId (\s a -> s { _cwefeaInitiatedEventId = a })++-- | The reason for the failure (if provided).+cwefeaReason :: Lens' ChildWorkflowExecutionFailedEventAttributes (Maybe Text)+cwefeaReason = lens _cwefeaReason (\s a -> s { _cwefeaReason = a })++-- | The Id of the ChildWorkflowExecutionStarted event recorded when this+-- child workflow execution was started. This information can be useful for+-- diagnosing problems by tracing back the chain of events leading up to+-- this event.+cwefeaStartedEventId :: Lens' ChildWorkflowExecutionFailedEventAttributes Integer+cwefeaStartedEventId =+ lens _cwefeaStartedEventId (\s a -> s { _cwefeaStartedEventId = a })++-- | The child workflow execution that failed.+cwefeaWorkflowExecution :: Lens' ChildWorkflowExecutionFailedEventAttributes WorkflowExecution+cwefeaWorkflowExecution =+ lens _cwefeaWorkflowExecution (\s a -> s { _cwefeaWorkflowExecution = a })++-- | The type of the child workflow execution.+cwefeaWorkflowType :: Lens' ChildWorkflowExecutionFailedEventAttributes WorkflowType+cwefeaWorkflowType =+ lens _cwefeaWorkflowType (\s a -> s { _cwefeaWorkflowType = a })++instance FromJSON ChildWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "ChildWorkflowExecutionFailedEventAttributes" $ \o -> ChildWorkflowExecutionFailedEventAttributes+ <$> o .:? "details"+ <*> o .: "initiatedEventId"+ <*> o .:? "reason"+ <*> o .: "startedEventId"+ <*> o .: "workflowExecution"+ <*> o .: "workflowType"++instance ToJSON ChildWorkflowExecutionFailedEventAttributes where+ toJSON ChildWorkflowExecutionFailedEventAttributes{..} = object+ [ "workflowExecution" .= _cwefeaWorkflowExecution+ , "workflowType" .= _cwefeaWorkflowType+ , "reason" .= _cwefeaReason+ , "details" .= _cwefeaDetails+ , "initiatedEventId" .= _cwefeaInitiatedEventId+ , "startedEventId" .= _cwefeaStartedEventId+ ]++data DomainInfo = DomainInfo+ { _diDescription :: Maybe Text+ , _diName :: Text+ , _diStatus :: Text+ } deriving (Eq, Ord, Show)++-- | 'DomainInfo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'diDescription' @::@ 'Maybe' 'Text'+--+-- * 'diName' @::@ 'Text'+--+-- * 'diStatus' @::@ 'Text'+--+domainInfo :: Text -- ^ 'diName'+ -> Text -- ^ 'diStatus'+ -> DomainInfo+domainInfo p1 p2 = DomainInfo+ { _diName = p1+ , _diStatus = p2+ , _diDescription = Nothing+ }++-- | The description of the domain provided through RegisterDomain.+diDescription :: Lens' DomainInfo (Maybe Text)+diDescription = lens _diDescription (\s a -> s { _diDescription = a })++-- | The name of the domain. This name is unique within the account.+diName :: Lens' DomainInfo Text+diName = lens _diName (\s a -> s { _diName = a })++-- | The status of the domain: REGISTERED: The domain is properly registered+-- and available. You can use this domain for registering types and creating+-- new workflow executions. DEPRECATED: The domain was deprecated using+-- DeprecateDomain, but is still in use. You should not create new workflow+-- executions in this domain.+diStatus :: Lens' DomainInfo Text+diStatus = lens _diStatus (\s a -> s { _diStatus = a })++instance FromJSON DomainInfo where+ parseJSON = withObject "DomainInfo" $ \o -> DomainInfo+ <$> o .:? "description"+ <*> o .: "name"+ <*> o .: "status"++instance ToJSON DomainInfo where+ toJSON DomainInfo{..} = object+ [ "name" .= _diName+ , "status" .= _diStatus+ , "description" .= _diDescription+ ]++data HistoryEvent = HistoryEvent+ { _heActivityTaskCancelRequestedEventAttributes :: Maybe ActivityTaskCancelRequestedEventAttributes+ , _heActivityTaskCanceledEventAttributes :: Maybe ActivityTaskCanceledEventAttributes+ , _heActivityTaskCompletedEventAttributes :: Maybe ActivityTaskCompletedEventAttributes+ , _heActivityTaskFailedEventAttributes :: Maybe ActivityTaskFailedEventAttributes+ , _heActivityTaskScheduledEventAttributes :: Maybe ActivityTaskScheduledEventAttributes+ , _heActivityTaskStartedEventAttributes :: Maybe ActivityTaskStartedEventAttributes+ , _heActivityTaskTimedOutEventAttributes :: Maybe ActivityTaskTimedOutEventAttributes+ , _heCancelTimerFailedEventAttributes :: Maybe CancelTimerFailedEventAttributes+ , _heCancelWorkflowExecutionFailedEventAttributes :: Maybe CancelWorkflowExecutionFailedEventAttributes+ , _heChildWorkflowExecutionCanceledEventAttributes :: Maybe ChildWorkflowExecutionCanceledEventAttributes+ , _heChildWorkflowExecutionCompletedEventAttributes :: Maybe ChildWorkflowExecutionCompletedEventAttributes+ , _heChildWorkflowExecutionFailedEventAttributes :: Maybe ChildWorkflowExecutionFailedEventAttributes+ , _heChildWorkflowExecutionStartedEventAttributes :: Maybe ChildWorkflowExecutionStartedEventAttributes+ , _heChildWorkflowExecutionTerminatedEventAttributes :: Maybe ChildWorkflowExecutionTerminatedEventAttributes+ , _heChildWorkflowExecutionTimedOutEventAttributes :: Maybe ChildWorkflowExecutionTimedOutEventAttributes+ , _heCompleteWorkflowExecutionFailedEventAttributes :: Maybe CompleteWorkflowExecutionFailedEventAttributes+ , _heContinueAsNewWorkflowExecutionFailedEventAttributes :: Maybe ContinueAsNewWorkflowExecutionFailedEventAttributes+ , _heDecisionTaskCompletedEventAttributes :: Maybe DecisionTaskCompletedEventAttributes+ , _heDecisionTaskScheduledEventAttributes :: Maybe DecisionTaskScheduledEventAttributes+ , _heDecisionTaskStartedEventAttributes :: Maybe DecisionTaskStartedEventAttributes+ , _heDecisionTaskTimedOutEventAttributes :: Maybe DecisionTaskTimedOutEventAttributes+ , _heEventId :: Integer+ , _heEventTimestamp :: RFC822+ , _heEventType :: Text+ , _heExternalWorkflowExecutionCancelRequestedEventAttributes :: Maybe ExternalWorkflowExecutionCancelRequestedEventAttributes+ , _heExternalWorkflowExecutionSignaledEventAttributes :: Maybe ExternalWorkflowExecutionSignaledEventAttributes+ , _heFailWorkflowExecutionFailedEventAttributes :: Maybe FailWorkflowExecutionFailedEventAttributes+ , _heMarkerRecordedEventAttributes :: Maybe MarkerRecordedEventAttributes+ , _heRecordMarkerFailedEventAttributes :: Maybe RecordMarkerFailedEventAttributes+ , _heRequestCancelActivityTaskFailedEventAttributes :: Maybe RequestCancelActivityTaskFailedEventAttributes+ , _heRequestCancelExternalWorkflowExecutionFailedEventAttributes :: Maybe RequestCancelExternalWorkflowExecutionFailedEventAttributes+ , _heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes :: Maybe RequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ , _heScheduleActivityTaskFailedEventAttributes :: Maybe ScheduleActivityTaskFailedEventAttributes+ , _heSignalExternalWorkflowExecutionFailedEventAttributes :: Maybe SignalExternalWorkflowExecutionFailedEventAttributes+ , _heSignalExternalWorkflowExecutionInitiatedEventAttributes :: Maybe SignalExternalWorkflowExecutionInitiatedEventAttributes+ , _heStartChildWorkflowExecutionFailedEventAttributes :: Maybe StartChildWorkflowExecutionFailedEventAttributes+ , _heStartChildWorkflowExecutionInitiatedEventAttributes :: Maybe StartChildWorkflowExecutionInitiatedEventAttributes+ , _heStartTimerFailedEventAttributes :: Maybe StartTimerFailedEventAttributes+ , _heTimerCanceledEventAttributes :: Maybe TimerCanceledEventAttributes+ , _heTimerFiredEventAttributes :: Maybe TimerFiredEventAttributes+ , _heTimerStartedEventAttributes :: Maybe TimerStartedEventAttributes+ , _heWorkflowExecutionCancelRequestedEventAttributes :: Maybe WorkflowExecutionCancelRequestedEventAttributes+ , _heWorkflowExecutionCanceledEventAttributes :: Maybe WorkflowExecutionCanceledEventAttributes+ , _heWorkflowExecutionCompletedEventAttributes :: Maybe WorkflowExecutionCompletedEventAttributes+ , _heWorkflowExecutionContinuedAsNewEventAttributes :: Maybe WorkflowExecutionContinuedAsNewEventAttributes+ , _heWorkflowExecutionFailedEventAttributes :: Maybe WorkflowExecutionFailedEventAttributes+ , _heWorkflowExecutionSignaledEventAttributes :: Maybe WorkflowExecutionSignaledEventAttributes+ , _heWorkflowExecutionStartedEventAttributes :: Maybe WorkflowExecutionStartedEventAttributes+ , _heWorkflowExecutionTerminatedEventAttributes :: Maybe WorkflowExecutionTerminatedEventAttributes+ , _heWorkflowExecutionTimedOutEventAttributes :: Maybe WorkflowExecutionTimedOutEventAttributes+ } deriving (Eq, Show)++-- | 'HistoryEvent' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'heActivityTaskCancelRequestedEventAttributes' @::@ 'Maybe' 'ActivityTaskCancelRequestedEventAttributes'+--+-- * 'heActivityTaskCanceledEventAttributes' @::@ 'Maybe' 'ActivityTaskCanceledEventAttributes'+--+-- * 'heActivityTaskCompletedEventAttributes' @::@ 'Maybe' 'ActivityTaskCompletedEventAttributes'+--+-- * 'heActivityTaskFailedEventAttributes' @::@ 'Maybe' 'ActivityTaskFailedEventAttributes'+--+-- * 'heActivityTaskScheduledEventAttributes' @::@ 'Maybe' 'ActivityTaskScheduledEventAttributes'+--+-- * 'heActivityTaskStartedEventAttributes' @::@ 'Maybe' 'ActivityTaskStartedEventAttributes'+--+-- * 'heActivityTaskTimedOutEventAttributes' @::@ 'Maybe' 'ActivityTaskTimedOutEventAttributes'+--+-- * 'heCancelTimerFailedEventAttributes' @::@ 'Maybe' 'CancelTimerFailedEventAttributes'+--+-- * 'heCancelWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'CancelWorkflowExecutionFailedEventAttributes'+--+-- * 'heChildWorkflowExecutionCanceledEventAttributes' @::@ 'Maybe' 'ChildWorkflowExecutionCanceledEventAttributes'+--+-- * 'heChildWorkflowExecutionCompletedEventAttributes' @::@ 'Maybe' 'ChildWorkflowExecutionCompletedEventAttributes'+--+-- * 'heChildWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'ChildWorkflowExecutionFailedEventAttributes'+--+-- * 'heChildWorkflowExecutionStartedEventAttributes' @::@ 'Maybe' 'ChildWorkflowExecutionStartedEventAttributes'+--+-- * 'heChildWorkflowExecutionTerminatedEventAttributes' @::@ 'Maybe' 'ChildWorkflowExecutionTerminatedEventAttributes'+--+-- * 'heChildWorkflowExecutionTimedOutEventAttributes' @::@ 'Maybe' 'ChildWorkflowExecutionTimedOutEventAttributes'+--+-- * 'heCompleteWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'CompleteWorkflowExecutionFailedEventAttributes'+--+-- * 'heContinueAsNewWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'ContinueAsNewWorkflowExecutionFailedEventAttributes'+--+-- * 'heDecisionTaskCompletedEventAttributes' @::@ 'Maybe' 'DecisionTaskCompletedEventAttributes'+--+-- * 'heDecisionTaskScheduledEventAttributes' @::@ 'Maybe' 'DecisionTaskScheduledEventAttributes'+--+-- * 'heDecisionTaskStartedEventAttributes' @::@ 'Maybe' 'DecisionTaskStartedEventAttributes'+--+-- * 'heDecisionTaskTimedOutEventAttributes' @::@ 'Maybe' 'DecisionTaskTimedOutEventAttributes'+--+-- * 'heEventId' @::@ 'Integer'+--+-- * 'heEventTimestamp' @::@ 'UTCTime'+--+-- * 'heEventType' @::@ 'Text'+--+-- * 'heExternalWorkflowExecutionCancelRequestedEventAttributes' @::@ 'Maybe' 'ExternalWorkflowExecutionCancelRequestedEventAttributes'+--+-- * 'heExternalWorkflowExecutionSignaledEventAttributes' @::@ 'Maybe' 'ExternalWorkflowExecutionSignaledEventAttributes'+--+-- * 'heFailWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'FailWorkflowExecutionFailedEventAttributes'+--+-- * 'heMarkerRecordedEventAttributes' @::@ 'Maybe' 'MarkerRecordedEventAttributes'+--+-- * 'heRecordMarkerFailedEventAttributes' @::@ 'Maybe' 'RecordMarkerFailedEventAttributes'+--+-- * 'heRequestCancelActivityTaskFailedEventAttributes' @::@ 'Maybe' 'RequestCancelActivityTaskFailedEventAttributes'+--+-- * 'heRequestCancelExternalWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'RequestCancelExternalWorkflowExecutionFailedEventAttributes'+--+-- * 'heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes' @::@ 'Maybe' 'RequestCancelExternalWorkflowExecutionInitiatedEventAttributes'+--+-- * 'heScheduleActivityTaskFailedEventAttributes' @::@ 'Maybe' 'ScheduleActivityTaskFailedEventAttributes'+--+-- * 'heSignalExternalWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'SignalExternalWorkflowExecutionFailedEventAttributes'+--+-- * 'heSignalExternalWorkflowExecutionInitiatedEventAttributes' @::@ 'Maybe' 'SignalExternalWorkflowExecutionInitiatedEventAttributes'+--+-- * 'heStartChildWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'StartChildWorkflowExecutionFailedEventAttributes'+--+-- * 'heStartChildWorkflowExecutionInitiatedEventAttributes' @::@ 'Maybe' 'StartChildWorkflowExecutionInitiatedEventAttributes'+--+-- * 'heStartTimerFailedEventAttributes' @::@ 'Maybe' 'StartTimerFailedEventAttributes'+--+-- * 'heTimerCanceledEventAttributes' @::@ 'Maybe' 'TimerCanceledEventAttributes'+--+-- * 'heTimerFiredEventAttributes' @::@ 'Maybe' 'TimerFiredEventAttributes'+--+-- * 'heTimerStartedEventAttributes' @::@ 'Maybe' 'TimerStartedEventAttributes'+--+-- * 'heWorkflowExecutionCancelRequestedEventAttributes' @::@ 'Maybe' 'WorkflowExecutionCancelRequestedEventAttributes'+--+-- * 'heWorkflowExecutionCanceledEventAttributes' @::@ 'Maybe' 'WorkflowExecutionCanceledEventAttributes'+--+-- * 'heWorkflowExecutionCompletedEventAttributes' @::@ 'Maybe' 'WorkflowExecutionCompletedEventAttributes'+--+-- * 'heWorkflowExecutionContinuedAsNewEventAttributes' @::@ 'Maybe' 'WorkflowExecutionContinuedAsNewEventAttributes'+--+-- * 'heWorkflowExecutionFailedEventAttributes' @::@ 'Maybe' 'WorkflowExecutionFailedEventAttributes'+--+-- * 'heWorkflowExecutionSignaledEventAttributes' @::@ 'Maybe' 'WorkflowExecutionSignaledEventAttributes'+--+-- * 'heWorkflowExecutionStartedEventAttributes' @::@ 'Maybe' 'WorkflowExecutionStartedEventAttributes'+--+-- * 'heWorkflowExecutionTerminatedEventAttributes' @::@ 'Maybe' 'WorkflowExecutionTerminatedEventAttributes'+--+-- * 'heWorkflowExecutionTimedOutEventAttributes' @::@ 'Maybe' 'WorkflowExecutionTimedOutEventAttributes'+--+historyEvent :: UTCTime -- ^ 'heEventTimestamp'+ -> Text -- ^ 'heEventType'+ -> Integer -- ^ 'heEventId'+ -> HistoryEvent+historyEvent p1 p2 p3 = HistoryEvent+ { _heEventTimestamp = withIso _Time (const id) p1+ , _heEventType = p2+ , _heEventId = p3+ , _heWorkflowExecutionStartedEventAttributes = Nothing+ , _heWorkflowExecutionCompletedEventAttributes = Nothing+ , _heCompleteWorkflowExecutionFailedEventAttributes = Nothing+ , _heWorkflowExecutionFailedEventAttributes = Nothing+ , _heFailWorkflowExecutionFailedEventAttributes = Nothing+ , _heWorkflowExecutionTimedOutEventAttributes = Nothing+ , _heWorkflowExecutionCanceledEventAttributes = Nothing+ , _heCancelWorkflowExecutionFailedEventAttributes = Nothing+ , _heWorkflowExecutionContinuedAsNewEventAttributes = Nothing+ , _heContinueAsNewWorkflowExecutionFailedEventAttributes = Nothing+ , _heWorkflowExecutionTerminatedEventAttributes = Nothing+ , _heWorkflowExecutionCancelRequestedEventAttributes = Nothing+ , _heDecisionTaskScheduledEventAttributes = Nothing+ , _heDecisionTaskStartedEventAttributes = Nothing+ , _heDecisionTaskCompletedEventAttributes = Nothing+ , _heDecisionTaskTimedOutEventAttributes = Nothing+ , _heActivityTaskScheduledEventAttributes = Nothing+ , _heActivityTaskStartedEventAttributes = Nothing+ , _heActivityTaskCompletedEventAttributes = Nothing+ , _heActivityTaskFailedEventAttributes = Nothing+ , _heActivityTaskTimedOutEventAttributes = Nothing+ , _heActivityTaskCanceledEventAttributes = Nothing+ , _heActivityTaskCancelRequestedEventAttributes = Nothing+ , _heWorkflowExecutionSignaledEventAttributes = Nothing+ , _heMarkerRecordedEventAttributes = Nothing+ , _heRecordMarkerFailedEventAttributes = Nothing+ , _heTimerStartedEventAttributes = Nothing+ , _heTimerFiredEventAttributes = Nothing+ , _heTimerCanceledEventAttributes = Nothing+ , _heStartChildWorkflowExecutionInitiatedEventAttributes = Nothing+ , _heChildWorkflowExecutionStartedEventAttributes = Nothing+ , _heChildWorkflowExecutionCompletedEventAttributes = Nothing+ , _heChildWorkflowExecutionFailedEventAttributes = Nothing+ , _heChildWorkflowExecutionTimedOutEventAttributes = Nothing+ , _heChildWorkflowExecutionCanceledEventAttributes = Nothing+ , _heChildWorkflowExecutionTerminatedEventAttributes = Nothing+ , _heSignalExternalWorkflowExecutionInitiatedEventAttributes = Nothing+ , _heExternalWorkflowExecutionSignaledEventAttributes = Nothing+ , _heSignalExternalWorkflowExecutionFailedEventAttributes = Nothing+ , _heExternalWorkflowExecutionCancelRequestedEventAttributes = Nothing+ , _heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes = Nothing+ , _heRequestCancelExternalWorkflowExecutionFailedEventAttributes = Nothing+ , _heScheduleActivityTaskFailedEventAttributes = Nothing+ , _heRequestCancelActivityTaskFailedEventAttributes = Nothing+ , _heStartTimerFailedEventAttributes = Nothing+ , _heCancelTimerFailedEventAttributes = Nothing+ , _heStartChildWorkflowExecutionFailedEventAttributes = Nothing+ }++-- | If the event is of type ActivityTaskcancelRequested then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heActivityTaskCancelRequestedEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskCancelRequestedEventAttributes)+heActivityTaskCancelRequestedEventAttributes =+ lens _heActivityTaskCancelRequestedEventAttributes+ (\s a -> s { _heActivityTaskCancelRequestedEventAttributes = a })++-- | If the event is of type ActivityTaskCanceled then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heActivityTaskCanceledEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskCanceledEventAttributes)+heActivityTaskCanceledEventAttributes =+ lens _heActivityTaskCanceledEventAttributes+ (\s a -> s { _heActivityTaskCanceledEventAttributes = a })++-- | If the event is of type ActivityTaskCompleted then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heActivityTaskCompletedEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskCompletedEventAttributes)+heActivityTaskCompletedEventAttributes =+ lens _heActivityTaskCompletedEventAttributes+ (\s a -> s { _heActivityTaskCompletedEventAttributes = a })++-- | If the event is of type ActivityTaskFailed then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heActivityTaskFailedEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskFailedEventAttributes)+heActivityTaskFailedEventAttributes =+ lens _heActivityTaskFailedEventAttributes+ (\s a -> s { _heActivityTaskFailedEventAttributes = a })++-- | If the event is of type ActivityTaskScheduled then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heActivityTaskScheduledEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskScheduledEventAttributes)+heActivityTaskScheduledEventAttributes =+ lens _heActivityTaskScheduledEventAttributes+ (\s a -> s { _heActivityTaskScheduledEventAttributes = a })++-- | If the event is of type ActivityTaskStarted then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heActivityTaskStartedEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskStartedEventAttributes)+heActivityTaskStartedEventAttributes =+ lens _heActivityTaskStartedEventAttributes+ (\s a -> s { _heActivityTaskStartedEventAttributes = a })++-- | If the event is of type ActivityTaskTimedOut then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heActivityTaskTimedOutEventAttributes :: Lens' HistoryEvent (Maybe ActivityTaskTimedOutEventAttributes)+heActivityTaskTimedOutEventAttributes =+ lens _heActivityTaskTimedOutEventAttributes+ (\s a -> s { _heActivityTaskTimedOutEventAttributes = a })++-- | If the event is of type CancelTimerFailed then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heCancelTimerFailedEventAttributes :: Lens' HistoryEvent (Maybe CancelTimerFailedEventAttributes)+heCancelTimerFailedEventAttributes =+ lens _heCancelTimerFailedEventAttributes+ (\s a -> s { _heCancelTimerFailedEventAttributes = a })++-- | If the event is of type CancelWorkflowExecutionFailed then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heCancelWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe CancelWorkflowExecutionFailedEventAttributes)+heCancelWorkflowExecutionFailedEventAttributes =+ lens _heCancelWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heCancelWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type ChildWorkflowExecutionCanceled then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heChildWorkflowExecutionCanceledEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionCanceledEventAttributes)+heChildWorkflowExecutionCanceledEventAttributes =+ lens _heChildWorkflowExecutionCanceledEventAttributes+ (\s a -> s { _heChildWorkflowExecutionCanceledEventAttributes = a })++-- | If the event is of type ChildWorkflowExecutionCompleted then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heChildWorkflowExecutionCompletedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionCompletedEventAttributes)+heChildWorkflowExecutionCompletedEventAttributes =+ lens _heChildWorkflowExecutionCompletedEventAttributes+ (\s a -> s { _heChildWorkflowExecutionCompletedEventAttributes = a })++-- | If the event is of type ChildWorkflowExecutionFailed then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heChildWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionFailedEventAttributes)+heChildWorkflowExecutionFailedEventAttributes =+ lens _heChildWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heChildWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type ChildWorkflowExecutionStarted then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heChildWorkflowExecutionStartedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionStartedEventAttributes)+heChildWorkflowExecutionStartedEventAttributes =+ lens _heChildWorkflowExecutionStartedEventAttributes+ (\s a -> s { _heChildWorkflowExecutionStartedEventAttributes = a })++-- | If the event is of type ChildWorkflowExecutionTerminated then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heChildWorkflowExecutionTerminatedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionTerminatedEventAttributes)+heChildWorkflowExecutionTerminatedEventAttributes =+ lens _heChildWorkflowExecutionTerminatedEventAttributes+ (\s a -> s { _heChildWorkflowExecutionTerminatedEventAttributes = a })++-- | If the event is of type ChildWorkflowExecutionTimedOut then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heChildWorkflowExecutionTimedOutEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionTimedOutEventAttributes)+heChildWorkflowExecutionTimedOutEventAttributes =+ lens _heChildWorkflowExecutionTimedOutEventAttributes+ (\s a -> s { _heChildWorkflowExecutionTimedOutEventAttributes = a })++-- | If the event is of type CompleteWorkflowExecutionFailed then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heCompleteWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe CompleteWorkflowExecutionFailedEventAttributes)+heCompleteWorkflowExecutionFailedEventAttributes =+ lens _heCompleteWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heCompleteWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type ContinueAsNewWorkflowExecutionFailed then this+-- member is set and provides detailed information about the event. It is+-- not set for other event types.+heContinueAsNewWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe ContinueAsNewWorkflowExecutionFailedEventAttributes)+heContinueAsNewWorkflowExecutionFailedEventAttributes =+ lens _heContinueAsNewWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heContinueAsNewWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type DecisionTaskCompleted then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heDecisionTaskCompletedEventAttributes :: Lens' HistoryEvent (Maybe DecisionTaskCompletedEventAttributes)+heDecisionTaskCompletedEventAttributes =+ lens _heDecisionTaskCompletedEventAttributes+ (\s a -> s { _heDecisionTaskCompletedEventAttributes = a })++-- | If the event is of type DecisionTaskScheduled then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heDecisionTaskScheduledEventAttributes :: Lens' HistoryEvent (Maybe DecisionTaskScheduledEventAttributes)+heDecisionTaskScheduledEventAttributes =+ lens _heDecisionTaskScheduledEventAttributes+ (\s a -> s { _heDecisionTaskScheduledEventAttributes = a })++-- | If the event is of type DecisionTaskStarted then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heDecisionTaskStartedEventAttributes :: Lens' HistoryEvent (Maybe DecisionTaskStartedEventAttributes)+heDecisionTaskStartedEventAttributes =+ lens _heDecisionTaskStartedEventAttributes+ (\s a -> s { _heDecisionTaskStartedEventAttributes = a })++-- | If the event is of type DecisionTaskTimedOut then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heDecisionTaskTimedOutEventAttributes :: Lens' HistoryEvent (Maybe DecisionTaskTimedOutEventAttributes)+heDecisionTaskTimedOutEventAttributes =+ lens _heDecisionTaskTimedOutEventAttributes+ (\s a -> s { _heDecisionTaskTimedOutEventAttributes = a })++-- | The system generated id of the event. This id uniquely identifies the+-- event with in the workflow execution history.+heEventId :: Lens' HistoryEvent Integer+heEventId = lens _heEventId (\s a -> s { _heEventId = a })++-- | The date and time when the event occurred.+heEventTimestamp :: Lens' HistoryEvent UTCTime+heEventTimestamp = lens _heEventTimestamp (\s a -> s { _heEventTimestamp = a }) . _Time++-- | The type of the history event.+heEventType :: Lens' HistoryEvent Text+heEventType = lens _heEventType (\s a -> s { _heEventType = a })++-- | If the event is of type ExternalWorkflowExecutionCancelRequested then+-- this member is set and provides detailed information about the event. It+-- is not set for other event types.+heExternalWorkflowExecutionCancelRequestedEventAttributes :: Lens' HistoryEvent (Maybe ExternalWorkflowExecutionCancelRequestedEventAttributes)+heExternalWorkflowExecutionCancelRequestedEventAttributes =+ lens _heExternalWorkflowExecutionCancelRequestedEventAttributes+ (\s a -> s { _heExternalWorkflowExecutionCancelRequestedEventAttributes = a })++-- | If the event is of type ExternalWorkflowExecutionSignaled then this+-- member is set and provides detailed information about the event. It is+-- not set for other event types.+heExternalWorkflowExecutionSignaledEventAttributes :: Lens' HistoryEvent (Maybe ExternalWorkflowExecutionSignaledEventAttributes)+heExternalWorkflowExecutionSignaledEventAttributes =+ lens _heExternalWorkflowExecutionSignaledEventAttributes+ (\s a -> s { _heExternalWorkflowExecutionSignaledEventAttributes = a })++-- | If the event is of type FailWorkflowExecutionFailed then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heFailWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe FailWorkflowExecutionFailedEventAttributes)+heFailWorkflowExecutionFailedEventAttributes =+ lens _heFailWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heFailWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type MarkerRecorded then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heMarkerRecordedEventAttributes :: Lens' HistoryEvent (Maybe MarkerRecordedEventAttributes)+heMarkerRecordedEventAttributes =+ lens _heMarkerRecordedEventAttributes+ (\s a -> s { _heMarkerRecordedEventAttributes = a })++-- | If the event is of type DecisionTaskFailed then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heRecordMarkerFailedEventAttributes :: Lens' HistoryEvent (Maybe RecordMarkerFailedEventAttributes)+heRecordMarkerFailedEventAttributes =+ lens _heRecordMarkerFailedEventAttributes+ (\s a -> s { _heRecordMarkerFailedEventAttributes = a })++-- | If the event is of type RequestCancelActivityTaskFailed then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heRequestCancelActivityTaskFailedEventAttributes :: Lens' HistoryEvent (Maybe RequestCancelActivityTaskFailedEventAttributes)+heRequestCancelActivityTaskFailedEventAttributes =+ lens _heRequestCancelActivityTaskFailedEventAttributes+ (\s a -> s { _heRequestCancelActivityTaskFailedEventAttributes = a })++-- | If the event is of type RequestCancelExternalWorkflowExecutionFailed then+-- this member is set and provides detailed information about the event. It+-- is not set for other event types.+heRequestCancelExternalWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe RequestCancelExternalWorkflowExecutionFailedEventAttributes)+heRequestCancelExternalWorkflowExecutionFailedEventAttributes =+ lens _heRequestCancelExternalWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heRequestCancelExternalWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type RequestCancelExternalWorkflowExecutionInitiated+-- then this member is set and provides detailed information about the+-- event. It is not set for other event types.+heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes :: Lens' HistoryEvent (Maybe RequestCancelExternalWorkflowExecutionInitiatedEventAttributes)+heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes =+ lens _heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ (\s a -> s { _heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes = a })++-- | If the event is of type ScheduleActivityTaskFailed then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heScheduleActivityTaskFailedEventAttributes :: Lens' HistoryEvent (Maybe ScheduleActivityTaskFailedEventAttributes)+heScheduleActivityTaskFailedEventAttributes =+ lens _heScheduleActivityTaskFailedEventAttributes+ (\s a -> s { _heScheduleActivityTaskFailedEventAttributes = a })++-- | If the event is of type SignalExternalWorkflowExecutionFailed then this+-- member is set and provides detailed information about the event. It is+-- not set for other event types.+heSignalExternalWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe SignalExternalWorkflowExecutionFailedEventAttributes)+heSignalExternalWorkflowExecutionFailedEventAttributes =+ lens _heSignalExternalWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heSignalExternalWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type SignalExternalWorkflowExecutionInitiated then+-- this member is set and provides detailed information about the event. It+-- is not set for other event types.+heSignalExternalWorkflowExecutionInitiatedEventAttributes :: Lens' HistoryEvent (Maybe SignalExternalWorkflowExecutionInitiatedEventAttributes)+heSignalExternalWorkflowExecutionInitiatedEventAttributes =+ lens _heSignalExternalWorkflowExecutionInitiatedEventAttributes+ (\s a -> s { _heSignalExternalWorkflowExecutionInitiatedEventAttributes = a })++-- | If the event is of type StartChildWorkflowExecutionFailed then this+-- member is set and provides detailed information about the event. It is+-- not set for other event types.+heStartChildWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe StartChildWorkflowExecutionFailedEventAttributes)+heStartChildWorkflowExecutionFailedEventAttributes =+ lens _heStartChildWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heStartChildWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type StartChildWorkflowExecutionInitiated then this+-- member is set and provides detailed information about the event. It is+-- not set for other event types.+heStartChildWorkflowExecutionInitiatedEventAttributes :: Lens' HistoryEvent (Maybe StartChildWorkflowExecutionInitiatedEventAttributes)+heStartChildWorkflowExecutionInitiatedEventAttributes =+ lens _heStartChildWorkflowExecutionInitiatedEventAttributes+ (\s a -> s { _heStartChildWorkflowExecutionInitiatedEventAttributes = a })++-- | If the event is of type StartTimerFailed then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heStartTimerFailedEventAttributes :: Lens' HistoryEvent (Maybe StartTimerFailedEventAttributes)+heStartTimerFailedEventAttributes =+ lens _heStartTimerFailedEventAttributes+ (\s a -> s { _heStartTimerFailedEventAttributes = a })++-- | If the event is of type TimerCanceled then this member is set and+-- provides detailed information about the event. It is not set for other+-- event types.+heTimerCanceledEventAttributes :: Lens' HistoryEvent (Maybe TimerCanceledEventAttributes)+heTimerCanceledEventAttributes =+ lens _heTimerCanceledEventAttributes+ (\s a -> s { _heTimerCanceledEventAttributes = a })++-- | If the event is of type TimerFired then this member is set and provides+-- detailed information about the event. It is not set for other event+-- types.+heTimerFiredEventAttributes :: Lens' HistoryEvent (Maybe TimerFiredEventAttributes)+heTimerFiredEventAttributes =+ lens _heTimerFiredEventAttributes+ (\s a -> s { _heTimerFiredEventAttributes = a })++-- | If the event is of type TimerStarted then this member is set and provides+-- detailed information about the event. It is not set for other event+-- types.+heTimerStartedEventAttributes :: Lens' HistoryEvent (Maybe TimerStartedEventAttributes)+heTimerStartedEventAttributes =+ lens _heTimerStartedEventAttributes+ (\s a -> s { _heTimerStartedEventAttributes = a })++-- | If the event is of type WorkflowExecutionCancelRequested then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heWorkflowExecutionCancelRequestedEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionCancelRequestedEventAttributes)+heWorkflowExecutionCancelRequestedEventAttributes =+ lens _heWorkflowExecutionCancelRequestedEventAttributes+ (\s a -> s { _heWorkflowExecutionCancelRequestedEventAttributes = a })++-- | If the event is of type WorkflowExecutionCanceled then this member is set+-- and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionCanceledEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionCanceledEventAttributes)+heWorkflowExecutionCanceledEventAttributes =+ lens _heWorkflowExecutionCanceledEventAttributes+ (\s a -> s { _heWorkflowExecutionCanceledEventAttributes = a })++-- | If the event is of type WorkflowExecutionCompleted then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionCompletedEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionCompletedEventAttributes)+heWorkflowExecutionCompletedEventAttributes =+ lens _heWorkflowExecutionCompletedEventAttributes+ (\s a -> s { _heWorkflowExecutionCompletedEventAttributes = a })++-- | If the event is of type WorkflowExecutionContinuedAsNew then this member+-- is set and provides detailed information about the event. It is not set+-- for other event types.+heWorkflowExecutionContinuedAsNewEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionContinuedAsNewEventAttributes)+heWorkflowExecutionContinuedAsNewEventAttributes =+ lens _heWorkflowExecutionContinuedAsNewEventAttributes+ (\s a -> s { _heWorkflowExecutionContinuedAsNewEventAttributes = a })++-- | If the event is of type WorkflowExecutionFailed then this member is set+-- and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionFailedEventAttributes)+heWorkflowExecutionFailedEventAttributes =+ lens _heWorkflowExecutionFailedEventAttributes+ (\s a -> s { _heWorkflowExecutionFailedEventAttributes = a })++-- | If the event is of type WorkflowExecutionSignaled then this member is set+-- and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionSignaledEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionSignaledEventAttributes)+heWorkflowExecutionSignaledEventAttributes =+ lens _heWorkflowExecutionSignaledEventAttributes+ (\s a -> s { _heWorkflowExecutionSignaledEventAttributes = a })++-- | If the event is of type WorkflowExecutionStarted then this member is set+-- and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionStartedEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionStartedEventAttributes)+heWorkflowExecutionStartedEventAttributes =+ lens _heWorkflowExecutionStartedEventAttributes+ (\s a -> s { _heWorkflowExecutionStartedEventAttributes = a })++-- | If the event is of type WorkflowExecutionTerminated then this member is+-- set and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionTerminatedEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionTerminatedEventAttributes)+heWorkflowExecutionTerminatedEventAttributes =+ lens _heWorkflowExecutionTerminatedEventAttributes+ (\s a -> s { _heWorkflowExecutionTerminatedEventAttributes = a })++-- | If the event is of type WorkflowExecutionTimedOut then this member is set+-- and provides detailed information about the event. It is not set for+-- other event types.+heWorkflowExecutionTimedOutEventAttributes :: Lens' HistoryEvent (Maybe WorkflowExecutionTimedOutEventAttributes)+heWorkflowExecutionTimedOutEventAttributes =+ lens _heWorkflowExecutionTimedOutEventAttributes+ (\s a -> s { _heWorkflowExecutionTimedOutEventAttributes = a })++instance FromJSON HistoryEvent where+ parseJSON = withObject "HistoryEvent" $ \o -> HistoryEvent+ <$> o .:? "activityTaskCancelRequestedEventAttributes"+ <*> o .:? "activityTaskCanceledEventAttributes"+ <*> o .:? "activityTaskCompletedEventAttributes"+ <*> o .:? "activityTaskFailedEventAttributes"+ <*> o .:? "activityTaskScheduledEventAttributes"+ <*> o .:? "activityTaskStartedEventAttributes"+ <*> o .:? "activityTaskTimedOutEventAttributes"+ <*> o .:? "cancelTimerFailedEventAttributes"+ <*> o .:? "cancelWorkflowExecutionFailedEventAttributes"+ <*> o .:? "childWorkflowExecutionCanceledEventAttributes"+ <*> o .:? "childWorkflowExecutionCompletedEventAttributes"+ <*> o .:? "childWorkflowExecutionFailedEventAttributes"+ <*> o .:? "childWorkflowExecutionStartedEventAttributes"+ <*> o .:? "childWorkflowExecutionTerminatedEventAttributes"+ <*> o .:? "childWorkflowExecutionTimedOutEventAttributes"+ <*> o .:? "completeWorkflowExecutionFailedEventAttributes"+ <*> o .:? "continueAsNewWorkflowExecutionFailedEventAttributes"+ <*> o .:? "decisionTaskCompletedEventAttributes"+ <*> o .:? "decisionTaskScheduledEventAttributes"+ <*> o .:? "decisionTaskStartedEventAttributes"+ <*> o .:? "decisionTaskTimedOutEventAttributes"+ <*> o .: "eventId"+ <*> o .: "eventTimestamp"+ <*> o .: "eventType"+ <*> o .:? "externalWorkflowExecutionCancelRequestedEventAttributes"+ <*> o .:? "externalWorkflowExecutionSignaledEventAttributes"+ <*> o .:? "failWorkflowExecutionFailedEventAttributes"+ <*> o .:? "markerRecordedEventAttributes"+ <*> o .:? "recordMarkerFailedEventAttributes"+ <*> o .:? "requestCancelActivityTaskFailedEventAttributes"+ <*> o .:? "requestCancelExternalWorkflowExecutionFailedEventAttributes"+ <*> o .:? "requestCancelExternalWorkflowExecutionInitiatedEventAttributes"+ <*> o .:? "scheduleActivityTaskFailedEventAttributes"+ <*> o .:? "signalExternalWorkflowExecutionFailedEventAttributes"+ <*> o .:? "signalExternalWorkflowExecutionInitiatedEventAttributes"+ <*> o .:? "startChildWorkflowExecutionFailedEventAttributes"+ <*> o .:? "startChildWorkflowExecutionInitiatedEventAttributes"+ <*> o .:? "startTimerFailedEventAttributes"+ <*> o .:? "timerCanceledEventAttributes"+ <*> o .:? "timerFiredEventAttributes"+ <*> o .:? "timerStartedEventAttributes"+ <*> o .:? "workflowExecutionCancelRequestedEventAttributes"+ <*> o .:? "workflowExecutionCanceledEventAttributes"+ <*> o .:? "workflowExecutionCompletedEventAttributes"+ <*> o .:? "workflowExecutionContinuedAsNewEventAttributes"+ <*> o .:? "workflowExecutionFailedEventAttributes"+ <*> o .:? "workflowExecutionSignaledEventAttributes"+ <*> o .:? "workflowExecutionStartedEventAttributes"+ <*> o .:? "workflowExecutionTerminatedEventAttributes"+ <*> o .:? "workflowExecutionTimedOutEventAttributes"++instance ToJSON HistoryEvent where+ toJSON HistoryEvent{..} = object+ [ "eventTimestamp" .= _heEventTimestamp+ , "eventType" .= _heEventType+ , "eventId" .= _heEventId+ , "workflowExecutionStartedEventAttributes" .= _heWorkflowExecutionStartedEventAttributes+ , "workflowExecutionCompletedEventAttributes" .= _heWorkflowExecutionCompletedEventAttributes+ , "completeWorkflowExecutionFailedEventAttributes" .= _heCompleteWorkflowExecutionFailedEventAttributes+ , "workflowExecutionFailedEventAttributes" .= _heWorkflowExecutionFailedEventAttributes+ , "failWorkflowExecutionFailedEventAttributes" .= _heFailWorkflowExecutionFailedEventAttributes+ , "workflowExecutionTimedOutEventAttributes" .= _heWorkflowExecutionTimedOutEventAttributes+ , "workflowExecutionCanceledEventAttributes" .= _heWorkflowExecutionCanceledEventAttributes+ , "cancelWorkflowExecutionFailedEventAttributes" .= _heCancelWorkflowExecutionFailedEventAttributes+ , "workflowExecutionContinuedAsNewEventAttributes" .= _heWorkflowExecutionContinuedAsNewEventAttributes+ , "continueAsNewWorkflowExecutionFailedEventAttributes" .= _heContinueAsNewWorkflowExecutionFailedEventAttributes+ , "workflowExecutionTerminatedEventAttributes" .= _heWorkflowExecutionTerminatedEventAttributes+ , "workflowExecutionCancelRequestedEventAttributes" .= _heWorkflowExecutionCancelRequestedEventAttributes+ , "decisionTaskScheduledEventAttributes" .= _heDecisionTaskScheduledEventAttributes+ , "decisionTaskStartedEventAttributes" .= _heDecisionTaskStartedEventAttributes+ , "decisionTaskCompletedEventAttributes" .= _heDecisionTaskCompletedEventAttributes+ , "decisionTaskTimedOutEventAttributes" .= _heDecisionTaskTimedOutEventAttributes+ , "activityTaskScheduledEventAttributes" .= _heActivityTaskScheduledEventAttributes+ , "activityTaskStartedEventAttributes" .= _heActivityTaskStartedEventAttributes+ , "activityTaskCompletedEventAttributes" .= _heActivityTaskCompletedEventAttributes+ , "activityTaskFailedEventAttributes" .= _heActivityTaskFailedEventAttributes+ , "activityTaskTimedOutEventAttributes" .= _heActivityTaskTimedOutEventAttributes+ , "activityTaskCanceledEventAttributes" .= _heActivityTaskCanceledEventAttributes+ , "activityTaskCancelRequestedEventAttributes" .= _heActivityTaskCancelRequestedEventAttributes+ , "workflowExecutionSignaledEventAttributes" .= _heWorkflowExecutionSignaledEventAttributes+ , "markerRecordedEventAttributes" .= _heMarkerRecordedEventAttributes+ , "recordMarkerFailedEventAttributes" .= _heRecordMarkerFailedEventAttributes+ , "timerStartedEventAttributes" .= _heTimerStartedEventAttributes+ , "timerFiredEventAttributes" .= _heTimerFiredEventAttributes+ , "timerCanceledEventAttributes" .= _heTimerCanceledEventAttributes+ , "startChildWorkflowExecutionInitiatedEventAttributes" .= _heStartChildWorkflowExecutionInitiatedEventAttributes+ , "childWorkflowExecutionStartedEventAttributes" .= _heChildWorkflowExecutionStartedEventAttributes+ , "childWorkflowExecutionCompletedEventAttributes" .= _heChildWorkflowExecutionCompletedEventAttributes+ , "childWorkflowExecutionFailedEventAttributes" .= _heChildWorkflowExecutionFailedEventAttributes+ , "childWorkflowExecutionTimedOutEventAttributes" .= _heChildWorkflowExecutionTimedOutEventAttributes+ , "childWorkflowExecutionCanceledEventAttributes" .= _heChildWorkflowExecutionCanceledEventAttributes+ , "childWorkflowExecutionTerminatedEventAttributes" .= _heChildWorkflowExecutionTerminatedEventAttributes+ , "signalExternalWorkflowExecutionInitiatedEventAttributes" .= _heSignalExternalWorkflowExecutionInitiatedEventAttributes+ , "externalWorkflowExecutionSignaledEventAttributes" .= _heExternalWorkflowExecutionSignaledEventAttributes+ , "signalExternalWorkflowExecutionFailedEventAttributes" .= _heSignalExternalWorkflowExecutionFailedEventAttributes+ , "externalWorkflowExecutionCancelRequestedEventAttributes" .= _heExternalWorkflowExecutionCancelRequestedEventAttributes+ , "requestCancelExternalWorkflowExecutionInitiatedEventAttributes" .= _heRequestCancelExternalWorkflowExecutionInitiatedEventAttributes+ , "requestCancelExternalWorkflowExecutionFailedEventAttributes" .= _heRequestCancelExternalWorkflowExecutionFailedEventAttributes+ , "scheduleActivityTaskFailedEventAttributes" .= _heScheduleActivityTaskFailedEventAttributes+ , "requestCancelActivityTaskFailedEventAttributes" .= _heRequestCancelActivityTaskFailedEventAttributes+ , "startTimerFailedEventAttributes" .= _heStartTimerFailedEventAttributes+ , "cancelTimerFailedEventAttributes" .= _heCancelTimerFailedEventAttributes+ , "startChildWorkflowExecutionFailedEventAttributes" .= _heStartChildWorkflowExecutionFailedEventAttributes+ ]++data ContinueAsNewWorkflowExecutionFailedEventAttributes = ContinueAsNewWorkflowExecutionFailedEventAttributes+ { _canwefeaCause :: Text+ , _canwefeaDecisionTaskCompletedEventId :: Integer+ } deriving (Eq, Ord, Show)++-- | 'ContinueAsNewWorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'canwefeaCause' @::@ 'Text'+--+-- * 'canwefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+continueAsNewWorkflowExecutionFailedEventAttributes :: Text -- ^ 'canwefeaCause'+ -> Integer -- ^ 'canwefeaDecisionTaskCompletedEventId'+ -> ContinueAsNewWorkflowExecutionFailedEventAttributes+continueAsNewWorkflowExecutionFailedEventAttributes p1 p2 = ContinueAsNewWorkflowExecutionFailedEventAttributes+ { _canwefeaCause = p1+ , _canwefeaDecisionTaskCompletedEventId = p2+ }++-- | The cause of the failure. This information is generated by the system and+-- can be useful for diagnostic purposes.+canwefeaCause :: Lens' ContinueAsNewWorkflowExecutionFailedEventAttributes Text+canwefeaCause = lens _canwefeaCause (\s a -> s { _canwefeaCause = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the ContinueAsNewWorkflowExecution decision that+-- started this execution. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+canwefeaDecisionTaskCompletedEventId :: Lens' ContinueAsNewWorkflowExecutionFailedEventAttributes Integer+canwefeaDecisionTaskCompletedEventId =+ lens _canwefeaDecisionTaskCompletedEventId+ (\s a -> s { _canwefeaDecisionTaskCompletedEventId = a })++instance FromJSON ContinueAsNewWorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "ContinueAsNewWorkflowExecutionFailedEventAttributes" $ \o -> ContinueAsNewWorkflowExecutionFailedEventAttributes+ <$> o .: "cause"+ <*> o .: "decisionTaskCompletedEventId"++instance ToJSON ContinueAsNewWorkflowExecutionFailedEventAttributes where+ toJSON ContinueAsNewWorkflowExecutionFailedEventAttributes{..} = object+ [ "cause" .= _canwefeaCause+ , "decisionTaskCompletedEventId" .= _canwefeaDecisionTaskCompletedEventId+ ]++data SignalExternalWorkflowExecutionInitiatedEventAttributes = SignalExternalWorkflowExecutionInitiatedEventAttributes+ { _seweieaControl :: Maybe Text+ , _seweieaDecisionTaskCompletedEventId :: Integer+ , _seweieaInput :: Maybe Text+ , _seweieaRunId :: Maybe Text+ , _seweieaSignalName :: Text+ , _seweieaWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'SignalExternalWorkflowExecutionInitiatedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'seweieaControl' @::@ 'Maybe' 'Text'+--+-- * 'seweieaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'seweieaInput' @::@ 'Maybe' 'Text'+--+-- * 'seweieaRunId' @::@ 'Maybe' 'Text'+--+-- * 'seweieaSignalName' @::@ 'Text'+--+-- * 'seweieaWorkflowId' @::@ 'Text'+--+signalExternalWorkflowExecutionInitiatedEventAttributes :: Text -- ^ 'seweieaWorkflowId'+ -> Text -- ^ 'seweieaSignalName'+ -> Integer -- ^ 'seweieaDecisionTaskCompletedEventId'+ -> SignalExternalWorkflowExecutionInitiatedEventAttributes+signalExternalWorkflowExecutionInitiatedEventAttributes p1 p2 p3 = SignalExternalWorkflowExecutionInitiatedEventAttributes+ { _seweieaWorkflowId = p1+ , _seweieaSignalName = p2+ , _seweieaDecisionTaskCompletedEventId = p3+ , _seweieaRunId = Nothing+ , _seweieaInput = Nothing+ , _seweieaControl = Nothing+ }++-- | Optional data attached to the event that can be used by the decider in+-- subsequent decision tasks.+seweieaControl :: Lens' SignalExternalWorkflowExecutionInitiatedEventAttributes (Maybe Text)+seweieaControl = lens _seweieaControl (\s a -> s { _seweieaControl = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the SignalExternalWorkflowExecution decision for+-- this signal. This information can be useful for diagnosing problems by+-- tracing back the cause of events leading up to this event.+seweieaDecisionTaskCompletedEventId :: Lens' SignalExternalWorkflowExecutionInitiatedEventAttributes Integer+seweieaDecisionTaskCompletedEventId =+ lens _seweieaDecisionTaskCompletedEventId+ (\s a -> s { _seweieaDecisionTaskCompletedEventId = a })++-- | Input provided to the signal (if any).+seweieaInput :: Lens' SignalExternalWorkflowExecutionInitiatedEventAttributes (Maybe Text)+seweieaInput = lens _seweieaInput (\s a -> s { _seweieaInput = a })++-- | The runId of the external workflow execution to send the signal to.+seweieaRunId :: Lens' SignalExternalWorkflowExecutionInitiatedEventAttributes (Maybe Text)+seweieaRunId = lens _seweieaRunId (\s a -> s { _seweieaRunId = a })++-- | The name of the signal.+seweieaSignalName :: Lens' SignalExternalWorkflowExecutionInitiatedEventAttributes Text+seweieaSignalName =+ lens _seweieaSignalName (\s a -> s { _seweieaSignalName = a })++-- | The workflowId of the external workflow execution.+seweieaWorkflowId :: Lens' SignalExternalWorkflowExecutionInitiatedEventAttributes Text+seweieaWorkflowId =+ lens _seweieaWorkflowId (\s a -> s { _seweieaWorkflowId = a })++instance FromJSON SignalExternalWorkflowExecutionInitiatedEventAttributes where+ parseJSON = withObject "SignalExternalWorkflowExecutionInitiatedEventAttributes" $ \o -> SignalExternalWorkflowExecutionInitiatedEventAttributes+ <$> o .:? "control"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .:? "input"+ <*> o .:? "runId"+ <*> o .: "signalName"+ <*> o .: "workflowId"++instance ToJSON SignalExternalWorkflowExecutionInitiatedEventAttributes where+ toJSON SignalExternalWorkflowExecutionInitiatedEventAttributes{..} = object+ [ "workflowId" .= _seweieaWorkflowId+ , "runId" .= _seweieaRunId+ , "signalName" .= _seweieaSignalName+ , "input" .= _seweieaInput+ , "decisionTaskCompletedEventId" .= _seweieaDecisionTaskCompletedEventId+ , "control" .= _seweieaControl+ ]++newtype CancelTimerDecisionAttributes = CancelTimerDecisionAttributes+ { _ctdaTimerId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'CancelTimerDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ctdaTimerId' @::@ 'Text'+--+cancelTimerDecisionAttributes :: Text -- ^ 'ctdaTimerId'+ -> CancelTimerDecisionAttributes+cancelTimerDecisionAttributes p1 = CancelTimerDecisionAttributes+ { _ctdaTimerId = p1+ }++-- | The unique Id of the timer to cancel. This field is required.+ctdaTimerId :: Lens' CancelTimerDecisionAttributes Text+ctdaTimerId = lens _ctdaTimerId (\s a -> s { _ctdaTimerId = a })++instance FromJSON CancelTimerDecisionAttributes where+ parseJSON = withObject "CancelTimerDecisionAttributes" $ \o -> CancelTimerDecisionAttributes+ <$> o .: "timerId"++instance ToJSON CancelTimerDecisionAttributes where+ toJSON CancelTimerDecisionAttributes{..} = object+ [ "timerId" .= _ctdaTimerId+ ]++data WorkflowExecutionFailedEventAttributes = WorkflowExecutionFailedEventAttributes+ { _wefeaDecisionTaskCompletedEventId :: Integer+ , _wefeaDetails :: Maybe Text+ , _wefeaReason :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecutionFailedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wefeaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'wefeaDetails' @::@ 'Maybe' 'Text'+--+-- * 'wefeaReason' @::@ 'Maybe' 'Text'+--+workflowExecutionFailedEventAttributes :: Integer -- ^ 'wefeaDecisionTaskCompletedEventId'+ -> WorkflowExecutionFailedEventAttributes+workflowExecutionFailedEventAttributes p1 = WorkflowExecutionFailedEventAttributes+ { _wefeaDecisionTaskCompletedEventId = p1+ , _wefeaReason = Nothing+ , _wefeaDetails = Nothing+ }++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the FailWorkflowExecution decision to fail this+-- execution. This information can be useful for diagnosing problems by+-- tracing back the cause of events.+wefeaDecisionTaskCompletedEventId :: Lens' WorkflowExecutionFailedEventAttributes Integer+wefeaDecisionTaskCompletedEventId =+ lens _wefeaDecisionTaskCompletedEventId+ (\s a -> s { _wefeaDecisionTaskCompletedEventId = a })++-- | The details of the failure (if any).+wefeaDetails :: Lens' WorkflowExecutionFailedEventAttributes (Maybe Text)+wefeaDetails = lens _wefeaDetails (\s a -> s { _wefeaDetails = a })++-- | The descriptive reason provided for the failure (if any).+wefeaReason :: Lens' WorkflowExecutionFailedEventAttributes (Maybe Text)+wefeaReason = lens _wefeaReason (\s a -> s { _wefeaReason = a })++instance FromJSON WorkflowExecutionFailedEventAttributes where+ parseJSON = withObject "WorkflowExecutionFailedEventAttributes" $ \o -> WorkflowExecutionFailedEventAttributes+ <$> o .: "decisionTaskCompletedEventId"+ <*> o .:? "details"+ <*> o .:? "reason"++instance ToJSON WorkflowExecutionFailedEventAttributes where+ toJSON WorkflowExecutionFailedEventAttributes{..} = object+ [ "reason" .= _wefeaReason+ , "details" .= _wefeaDetails+ , "decisionTaskCompletedEventId" .= _wefeaDecisionTaskCompletedEventId+ ]++data WorkflowExecutionConfiguration = WorkflowExecutionConfiguration+ { _wecChildPolicy :: Text+ , _wecExecutionStartToCloseTimeout :: Text+ , _wecTaskList :: TaskList+ , _wecTaskStartToCloseTimeout :: Text+ } deriving (Eq, Show)++-- | 'WorkflowExecutionConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wecChildPolicy' @::@ 'Text'+--+-- * 'wecExecutionStartToCloseTimeout' @::@ 'Text'+--+-- * 'wecTaskList' @::@ 'TaskList'+--+-- * 'wecTaskStartToCloseTimeout' @::@ 'Text'+--+workflowExecutionConfiguration :: Text -- ^ 'wecTaskStartToCloseTimeout'+ -> Text -- ^ 'wecExecutionStartToCloseTimeout'+ -> TaskList -- ^ 'wecTaskList'+ -> Text -- ^ 'wecChildPolicy'+ -> WorkflowExecutionConfiguration+workflowExecutionConfiguration p1 p2 p3 p4 = WorkflowExecutionConfiguration+ { _wecTaskStartToCloseTimeout = p1+ , _wecExecutionStartToCloseTimeout = p2+ , _wecTaskList = p3+ , _wecChildPolicy = p4+ }++-- | The policy to use for the child workflow executions if this workflow+-- execution is terminated, by calling the TerminateWorkflowExecution action+-- explicitly or due to an expired timeout. The supported child policies+-- are: TERMINATE: the child executions will be terminated. REQUEST_CANCEL:+-- a request to cancel will be attempted for each child execution by+-- recording a WorkflowExecutionCancelRequested event in its history. It is+-- up to the decider to take appropriate actions when it receives an+-- execution history with this event. ABANDON: no action will be taken. The+-- child executions will continue to run.+wecChildPolicy :: Lens' WorkflowExecutionConfiguration Text+wecChildPolicy = lens _wecChildPolicy (\s a -> s { _wecChildPolicy = a })++-- | The total duration for this workflow execution. The valid values are+-- integers greater than or equal to 0. An integer value can be used to+-- specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+wecExecutionStartToCloseTimeout :: Lens' WorkflowExecutionConfiguration Text+wecExecutionStartToCloseTimeout =+ lens _wecExecutionStartToCloseTimeout+ (\s a -> s { _wecExecutionStartToCloseTimeout = a })++-- | The task list used for the decision tasks generated for this workflow+-- execution.+wecTaskList :: Lens' WorkflowExecutionConfiguration TaskList+wecTaskList = lens _wecTaskList (\s a -> s { _wecTaskList = a })++-- | The maximum duration allowed for decision tasks for this workflow+-- execution. The valid values are integers greater than or equal to 0. An+-- integer value can be used to specify the duration in seconds while NONE+-- can be used to specify unlimited duration.+wecTaskStartToCloseTimeout :: Lens' WorkflowExecutionConfiguration Text+wecTaskStartToCloseTimeout =+ lens _wecTaskStartToCloseTimeout+ (\s a -> s { _wecTaskStartToCloseTimeout = a })++instance FromJSON WorkflowExecutionConfiguration where+ parseJSON = withObject "WorkflowExecutionConfiguration" $ \o -> WorkflowExecutionConfiguration+ <$> o .: "childPolicy"+ <*> o .: "executionStartToCloseTimeout"+ <*> o .: "taskList"+ <*> o .: "taskStartToCloseTimeout"++instance ToJSON WorkflowExecutionConfiguration where+ toJSON WorkflowExecutionConfiguration{..} = object+ [ "taskStartToCloseTimeout" .= _wecTaskStartToCloseTimeout+ , "executionStartToCloseTimeout" .= _wecExecutionStartToCloseTimeout+ , "taskList" .= _wecTaskList+ , "childPolicy" .= _wecChildPolicy+ ]++data WorkflowExecution = WorkflowExecution+ { _weRunId :: Text+ , _weWorkflowId :: Text+ } deriving (Eq, Ord, Show)++-- | 'WorkflowExecution' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'weRunId' @::@ 'Text'+--+-- * 'weWorkflowId' @::@ 'Text'+--+workflowExecution :: Text -- ^ 'weWorkflowId'+ -> Text -- ^ 'weRunId'+ -> WorkflowExecution+workflowExecution p1 p2 = WorkflowExecution+ { _weWorkflowId = p1+ , _weRunId = p2+ }++-- | A system generated unique identifier for the workflow execution.+weRunId :: Lens' WorkflowExecution Text+weRunId = lens _weRunId (\s a -> s { _weRunId = a })++-- | The user defined identifier associated with the workflow execution.+weWorkflowId :: Lens' WorkflowExecution Text+weWorkflowId = lens _weWorkflowId (\s a -> s { _weWorkflowId = a })++instance FromJSON WorkflowExecution where+ parseJSON = withObject "WorkflowExecution" $ \o -> WorkflowExecution+ <$> o .: "runId"+ <*> o .: "workflowId"++instance ToJSON WorkflowExecution where+ toJSON WorkflowExecution{..} = object+ [ "workflowId" .= _weWorkflowId+ , "runId" .= _weRunId+ ]++data RequestCancelExternalWorkflowExecutionFailedCause+ = RCEWEFCOperationNotPermitted -- ^ OPERATION_NOT_PERMITTED+ | RCEWEFCRequestCancelExternalWorkflowExecutionRateExceeded -- ^ REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED+ | RCEWEFCUnknownExternalWorkflowExecution -- ^ UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable RequestCancelExternalWorkflowExecutionFailedCause++instance FromText RequestCancelExternalWorkflowExecutionFailedCause where+ parser = match "OPERATION_NOT_PERMITTED" RCEWEFCOperationNotPermitted+ <|> match "REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED" RCEWEFCRequestCancelExternalWorkflowExecutionRateExceeded+ <|> match "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION" RCEWEFCUnknownExternalWorkflowExecution++instance ToText RequestCancelExternalWorkflowExecutionFailedCause where+ toText = \case+ RCEWEFCOperationNotPermitted -> "OPERATION_NOT_PERMITTED"+ RCEWEFCRequestCancelExternalWorkflowExecutionRateExceeded -> "REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED"+ RCEWEFCUnknownExternalWorkflowExecution -> "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION"++instance FromJSON RequestCancelExternalWorkflowExecutionFailedCause where+ parseJSON = parseJSONText "RequestCancelExternalWorkflowExecutionFailedCause"++instance ToJSON RequestCancelExternalWorkflowExecutionFailedCause where+ toJSON = toJSONText++data ContinueAsNewWorkflowExecutionDecisionAttributes = ContinueAsNewWorkflowExecutionDecisionAttributes+ { _canwedaChildPolicy :: Maybe Text+ , _canwedaExecutionStartToCloseTimeout :: Maybe Text+ , _canwedaInput :: Maybe Text+ , _canwedaTagList :: List "tagList" Text+ , _canwedaTaskList :: Maybe TaskList+ , _canwedaTaskStartToCloseTimeout :: Maybe Text+ , _canwedaWorkflowTypeVersion :: Maybe Text+ } deriving (Eq, Show)++-- | 'ContinueAsNewWorkflowExecutionDecisionAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'canwedaChildPolicy' @::@ 'Maybe' 'Text'+--+-- * 'canwedaExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'canwedaInput' @::@ 'Maybe' 'Text'+--+-- * 'canwedaTagList' @::@ ['Text']+--+-- * 'canwedaTaskList' @::@ 'Maybe' 'TaskList'+--+-- * 'canwedaTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'canwedaWorkflowTypeVersion' @::@ 'Maybe' 'Text'+--+continueAsNewWorkflowExecutionDecisionAttributes :: ContinueAsNewWorkflowExecutionDecisionAttributes+continueAsNewWorkflowExecutionDecisionAttributes = ContinueAsNewWorkflowExecutionDecisionAttributes+ { _canwedaInput = Nothing+ , _canwedaExecutionStartToCloseTimeout = Nothing+ , _canwedaTaskList = Nothing+ , _canwedaTaskStartToCloseTimeout = Nothing+ , _canwedaChildPolicy = Nothing+ , _canwedaTagList = mempty+ , _canwedaWorkflowTypeVersion = Nothing+ }++-- | If set, specifies the policy to use for the child workflow executions of+-- the new execution if it is terminated by calling the+-- TerminateWorkflowExecution action explicitly or due to an expired+-- timeout. This policy overrides the default child policy specified when+-- registering the workflow type using RegisterWorkflowType. The supported+-- child policies are: TERMINATE: the child executions will be terminated.+-- REQUEST_CANCEL: a request to cancel will be attempted for each child+-- execution by recording a WorkflowExecutionCancelRequested event in its+-- history. It is up to the decider to take appropriate actions when it+-- receives an execution history with this event. ABANDON: no action will be+-- taken. The child executions will continue to run.+canwedaChildPolicy :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes (Maybe Text)+canwedaChildPolicy =+ lens _canwedaChildPolicy (\s a -> s { _canwedaChildPolicy = a })++-- | If set, specifies the total duration for this workflow execution. This+-- overrides the defaultExecutionStartToCloseTimeout specified when+-- registering the workflow type. The valid values are integers greater than+-- or equal to 0. An integer value can be used to specify the duration in+-- seconds while NONE can be used to specify unlimited duration.+canwedaExecutionStartToCloseTimeout :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes (Maybe Text)+canwedaExecutionStartToCloseTimeout =+ lens _canwedaExecutionStartToCloseTimeout+ (\s a -> s { _canwedaExecutionStartToCloseTimeout = a })++-- | The input provided to the new workflow execution.+canwedaInput :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes (Maybe Text)+canwedaInput = lens _canwedaInput (\s a -> s { _canwedaInput = a })++-- | The list of tags to associate with the new workflow execution. A maximum+-- of 5 tags can be specified. You can list workflow executions with a+-- specific tag by calling ListOpenWorkflowExecutions or+-- ListClosedWorkflowExecutions and specifying a TagFilter.+canwedaTagList :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes [Text]+canwedaTagList = lens _canwedaTagList (\s a -> s { _canwedaTagList = a }) . _List++canwedaTaskList :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes (Maybe TaskList)+canwedaTaskList = lens _canwedaTaskList (\s a -> s { _canwedaTaskList = a })++-- | Specifies the maximum duration of decision tasks for the new workflow+-- execution. This parameter overrides the defaultTaskStartToCloseTimout+-- specified when registering the workflow type using RegisterWorkflowType.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+canwedaTaskStartToCloseTimeout :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes (Maybe Text)+canwedaTaskStartToCloseTimeout =+ lens _canwedaTaskStartToCloseTimeout+ (\s a -> s { _canwedaTaskStartToCloseTimeout = a })++canwedaWorkflowTypeVersion :: Lens' ContinueAsNewWorkflowExecutionDecisionAttributes (Maybe Text)+canwedaWorkflowTypeVersion =+ lens _canwedaWorkflowTypeVersion+ (\s a -> s { _canwedaWorkflowTypeVersion = a })++instance FromJSON ContinueAsNewWorkflowExecutionDecisionAttributes where+ parseJSON = withObject "ContinueAsNewWorkflowExecutionDecisionAttributes" $ \o -> ContinueAsNewWorkflowExecutionDecisionAttributes+ <$> o .:? "childPolicy"+ <*> o .:? "executionStartToCloseTimeout"+ <*> o .:? "input"+ <*> o .: "tagList"+ <*> o .:? "taskList"+ <*> o .:? "taskStartToCloseTimeout"+ <*> o .:? "workflowTypeVersion"++instance ToJSON ContinueAsNewWorkflowExecutionDecisionAttributes where+ toJSON ContinueAsNewWorkflowExecutionDecisionAttributes{..} = object+ [ "input" .= _canwedaInput+ , "executionStartToCloseTimeout" .= _canwedaExecutionStartToCloseTimeout+ , "taskList" .= _canwedaTaskList+ , "taskStartToCloseTimeout" .= _canwedaTaskStartToCloseTimeout+ , "childPolicy" .= _canwedaChildPolicy+ , "tagList" .= _canwedaTagList+ , "workflowTypeVersion" .= _canwedaWorkflowTypeVersion+ ]++data ExternalWorkflowExecutionCancelRequestedEventAttributes = ExternalWorkflowExecutionCancelRequestedEventAttributes+ { _ewecreaInitiatedEventId :: Integer+ , _ewecreaWorkflowExecution :: WorkflowExecution+ } deriving (Eq, Show)++-- | 'ExternalWorkflowExecutionCancelRequestedEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ewecreaInitiatedEventId' @::@ 'Integer'+--+-- * 'ewecreaWorkflowExecution' @::@ 'WorkflowExecution'+--+externalWorkflowExecutionCancelRequestedEventAttributes :: WorkflowExecution -- ^ 'ewecreaWorkflowExecution'+ -> Integer -- ^ 'ewecreaInitiatedEventId'+ -> ExternalWorkflowExecutionCancelRequestedEventAttributes+externalWorkflowExecutionCancelRequestedEventAttributes p1 p2 = ExternalWorkflowExecutionCancelRequestedEventAttributes+ { _ewecreaWorkflowExecution = p1+ , _ewecreaInitiatedEventId = p2+ }++-- | The id of the RequestCancelExternalWorkflowExecutionInitiated event+-- corresponding to the RequestCancelExternalWorkflowExecution decision to+-- cancel this external workflow execution. This information can be useful+-- for diagnosing problems by tracing back the chain of events leading up to+-- this event.+ewecreaInitiatedEventId :: Lens' ExternalWorkflowExecutionCancelRequestedEventAttributes Integer+ewecreaInitiatedEventId =+ lens _ewecreaInitiatedEventId (\s a -> s { _ewecreaInitiatedEventId = a })++-- | The external workflow execution to which the cancellation request was+-- delivered.+ewecreaWorkflowExecution :: Lens' ExternalWorkflowExecutionCancelRequestedEventAttributes WorkflowExecution+ewecreaWorkflowExecution =+ lens _ewecreaWorkflowExecution+ (\s a -> s { _ewecreaWorkflowExecution = a })++instance FromJSON ExternalWorkflowExecutionCancelRequestedEventAttributes where+ parseJSON = withObject "ExternalWorkflowExecutionCancelRequestedEventAttributes" $ \o -> ExternalWorkflowExecutionCancelRequestedEventAttributes+ <$> o .: "initiatedEventId"+ <*> o .: "workflowExecution"++instance ToJSON ExternalWorkflowExecutionCancelRequestedEventAttributes where+ toJSON ExternalWorkflowExecutionCancelRequestedEventAttributes{..} = object+ [ "workflowExecution" .= _ewecreaWorkflowExecution+ , "initiatedEventId" .= _ewecreaInitiatedEventId+ ]++data PendingTaskCount = PendingTaskCount+ { _ptcCount :: Nat+ , _ptcTruncated :: Maybe Bool+ } deriving (Eq, Ord, Show)++-- | 'PendingTaskCount' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ptcCount' @::@ 'Natural'+--+-- * 'ptcTruncated' @::@ 'Maybe' 'Bool'+--+pendingTaskCount :: Natural -- ^ 'ptcCount'+ -> PendingTaskCount+pendingTaskCount p1 = PendingTaskCount+ { _ptcCount = withIso _Nat (const id) p1+ , _ptcTruncated = Nothing+ }++-- | The number of tasks in the task list.+ptcCount :: Lens' PendingTaskCount Natural+ptcCount = lens _ptcCount (\s a -> s { _ptcCount = a }) . _Nat++-- | If set to true, indicates that the actual count was more than the maximum+-- supported by this API and the count returned is the truncated value.+ptcTruncated :: Lens' PendingTaskCount (Maybe Bool)+ptcTruncated = lens _ptcTruncated (\s a -> s { _ptcTruncated = a })++instance FromJSON PendingTaskCount where+ parseJSON = withObject "PendingTaskCount" $ \o -> PendingTaskCount+ <$> o .: "count"+ <*> o .:? "truncated"++instance ToJSON PendingTaskCount where+ toJSON PendingTaskCount{..} = object+ [ "count" .= _ptcCount+ , "truncated" .= _ptcTruncated+ ]++data WorkflowExecutionContinuedAsNewEventAttributes = WorkflowExecutionContinuedAsNewEventAttributes+ { _wecaneaChildPolicy :: Text+ , _wecaneaDecisionTaskCompletedEventId :: Integer+ , _wecaneaExecutionStartToCloseTimeout :: Maybe Text+ , _wecaneaInput :: Maybe Text+ , _wecaneaNewExecutionRunId :: Text+ , _wecaneaTagList :: List "tagList" Text+ , _wecaneaTaskList :: TaskList+ , _wecaneaTaskStartToCloseTimeout :: Maybe Text+ , _wecaneaWorkflowType :: WorkflowType+ } deriving (Eq, Show)++-- | 'WorkflowExecutionContinuedAsNewEventAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wecaneaChildPolicy' @::@ 'Text'+--+-- * 'wecaneaDecisionTaskCompletedEventId' @::@ 'Integer'+--+-- * 'wecaneaExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'wecaneaInput' @::@ 'Maybe' 'Text'+--+-- * 'wecaneaNewExecutionRunId' @::@ 'Text'+--+-- * 'wecaneaTagList' @::@ ['Text']+--+-- * 'wecaneaTaskList' @::@ 'TaskList'+--+-- * 'wecaneaTaskStartToCloseTimeout' @::@ 'Maybe' 'Text'+--+-- * 'wecaneaWorkflowType' @::@ 'WorkflowType'+--+workflowExecutionContinuedAsNewEventAttributes :: Integer -- ^ 'wecaneaDecisionTaskCompletedEventId'+ -> Text -- ^ 'wecaneaNewExecutionRunId'+ -> TaskList -- ^ 'wecaneaTaskList'+ -> Text -- ^ 'wecaneaChildPolicy'+ -> WorkflowType -- ^ 'wecaneaWorkflowType'+ -> WorkflowExecutionContinuedAsNewEventAttributes+workflowExecutionContinuedAsNewEventAttributes p1 p2 p3 p4 p5 = WorkflowExecutionContinuedAsNewEventAttributes+ { _wecaneaDecisionTaskCompletedEventId = p1+ , _wecaneaNewExecutionRunId = p2+ , _wecaneaTaskList = p3+ , _wecaneaChildPolicy = p4+ , _wecaneaWorkflowType = p5+ , _wecaneaInput = Nothing+ , _wecaneaExecutionStartToCloseTimeout = Nothing+ , _wecaneaTaskStartToCloseTimeout = Nothing+ , _wecaneaTagList = mempty+ }++-- | The policy to use for the child workflow executions of the new execution+-- if it is terminated by calling the TerminateWorkflowExecution action+-- explicitly or due to an expired timeout. The supported child policies+-- are: TERMINATE: the child executions will be terminated. REQUEST_CANCEL:+-- a request to cancel will be attempted for each child execution by+-- recording a WorkflowExecutionCancelRequested event in its history. It is+-- up to the decider to take appropriate actions when it receives an+-- execution history with this event. ABANDON: no action will be taken. The+-- child executions will continue to run.+wecaneaChildPolicy :: Lens' WorkflowExecutionContinuedAsNewEventAttributes Text+wecaneaChildPolicy =+ lens _wecaneaChildPolicy (\s a -> s { _wecaneaChildPolicy = a })++-- | The id of the DecisionTaskCompleted event corresponding to the decision+-- task that resulted in the ContinueAsNewWorkflowExecution decision that+-- started this execution. This information can be useful for diagnosing+-- problems by tracing back the cause of events.+wecaneaDecisionTaskCompletedEventId :: Lens' WorkflowExecutionContinuedAsNewEventAttributes Integer+wecaneaDecisionTaskCompletedEventId =+ lens _wecaneaDecisionTaskCompletedEventId+ (\s a -> s { _wecaneaDecisionTaskCompletedEventId = a })++-- | The total duration allowed for the new workflow execution. The valid+-- values are integers greater than or equal to 0. An integer value can be+-- used to specify the duration in seconds while NONE can be used to specify+-- unlimited duration.+wecaneaExecutionStartToCloseTimeout :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)+wecaneaExecutionStartToCloseTimeout =+ lens _wecaneaExecutionStartToCloseTimeout+ (\s a -> s { _wecaneaExecutionStartToCloseTimeout = a })++-- | The input provided to the new workflow execution.+wecaneaInput :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)+wecaneaInput = lens _wecaneaInput (\s a -> s { _wecaneaInput = a })++-- | The runId of the new workflow execution.+wecaneaNewExecutionRunId :: Lens' WorkflowExecutionContinuedAsNewEventAttributes Text+wecaneaNewExecutionRunId =+ lens _wecaneaNewExecutionRunId+ (\s a -> s { _wecaneaNewExecutionRunId = a })++-- | The list of tags associated with the new workflow execution.+wecaneaTagList :: Lens' WorkflowExecutionContinuedAsNewEventAttributes [Text]+wecaneaTagList = lens _wecaneaTagList (\s a -> s { _wecaneaTagList = a }) . _List++wecaneaTaskList :: Lens' WorkflowExecutionContinuedAsNewEventAttributes TaskList+wecaneaTaskList = lens _wecaneaTaskList (\s a -> s { _wecaneaTaskList = a })++-- | The maximum duration of decision tasks for the new workflow execution.+-- The valid values are integers greater than or equal to 0. An integer+-- value can be used to specify the duration in seconds while NONE can be+-- used to specify unlimited duration.+wecaneaTaskStartToCloseTimeout :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)+wecaneaTaskStartToCloseTimeout =+ lens _wecaneaTaskStartToCloseTimeout+ (\s a -> s { _wecaneaTaskStartToCloseTimeout = a })++wecaneaWorkflowType :: Lens' WorkflowExecutionContinuedAsNewEventAttributes WorkflowType+wecaneaWorkflowType =+ lens _wecaneaWorkflowType (\s a -> s { _wecaneaWorkflowType = a })++instance FromJSON WorkflowExecutionContinuedAsNewEventAttributes where+ parseJSON = withObject "WorkflowExecutionContinuedAsNewEventAttributes" $ \o -> WorkflowExecutionContinuedAsNewEventAttributes+ <$> o .: "childPolicy"+ <*> o .: "decisionTaskCompletedEventId"+ <*> o .:? "executionStartToCloseTimeout"+ <*> o .:? "input"+ <*> o .: "newExecutionRunId"+ <*> o .: "tagList"+ <*> o .: "taskList"+ <*> o .:? "taskStartToCloseTimeout"+ <*> o .: "workflowType"++instance ToJSON WorkflowExecutionContinuedAsNewEventAttributes where+ toJSON WorkflowExecutionContinuedAsNewEventAttributes{..} = object+ [ "input" .= _wecaneaInput+ , "decisionTaskCompletedEventId" .= _wecaneaDecisionTaskCompletedEventId+ , "newExecutionRunId" .= _wecaneaNewExecutionRunId+ , "executionStartToCloseTimeout" .= _wecaneaExecutionStartToCloseTimeout+ , "taskList" .= _wecaneaTaskList+ , "taskStartToCloseTimeout" .= _wecaneaTaskStartToCloseTimeout+ , "childPolicy" .= _wecaneaChildPolicy+ , "tagList" .= _wecaneaTagList+ , "workflowType" .= _wecaneaWorkflowType+ ]