{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SWF.Types.WorkflowExecutionContinuedAsNewEventAttributes
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SWF.Types.WorkflowExecutionContinuedAsNewEventAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.ChildPolicy
import Amazonka.SWF.Types.TaskList
import Amazonka.SWF.Types.WorkflowType

-- | Provides the details of the @WorkflowExecutionContinuedAsNew@ event.
--
-- /See:/ 'newWorkflowExecutionContinuedAsNewEventAttributes' smart constructor.
data WorkflowExecutionContinuedAsNewEventAttributes = WorkflowExecutionContinuedAsNewEventAttributes'
  { -- | The list of tags associated with the new workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe [Text]
tagList :: Prelude.Maybe [Prelude.Text],
    -- | The maximum duration of decision tasks for the new workflow execution.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
taskStartToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The IAM role to attach to the new (continued) workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
lambdaRole :: Prelude.Maybe Prelude.Text,
    -- | The input provided to the new workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
    -- | The total duration allowed for the new workflow execution.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
executionStartToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The priority of the task to use for the decisions of the new (continued)
    -- workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
taskPriority :: Prelude.Maybe Prelude.Text,
    -- | 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 chain of events leading up to
    -- this event.
    WorkflowExecutionContinuedAsNewEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer,
    -- | The @runId@ of the new workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Text
newExecutionRunId' :: Prelude.Text,
    -- | The task list to use for the decisions of the new (continued) workflow
    -- execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> TaskList
taskList :: TaskList,
    -- | 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 are terminated.
    --
    -- -   @REQUEST_CANCEL@ – A request to cancel is 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 is taken. The child executions continue to
    --     run.
    WorkflowExecutionContinuedAsNewEventAttributes -> ChildPolicy
childPolicy :: ChildPolicy,
    -- | The workflow type of this execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> WorkflowType
workflowType :: WorkflowType
  }
  deriving (WorkflowExecutionContinuedAsNewEventAttributes
-> WorkflowExecutionContinuedAsNewEventAttributes -> Bool
(WorkflowExecutionContinuedAsNewEventAttributes
 -> WorkflowExecutionContinuedAsNewEventAttributes -> Bool)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> WorkflowExecutionContinuedAsNewEventAttributes -> Bool)
-> Eq WorkflowExecutionContinuedAsNewEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionContinuedAsNewEventAttributes
-> WorkflowExecutionContinuedAsNewEventAttributes -> Bool
$c/= :: WorkflowExecutionContinuedAsNewEventAttributes
-> WorkflowExecutionContinuedAsNewEventAttributes -> Bool
== :: WorkflowExecutionContinuedAsNewEventAttributes
-> WorkflowExecutionContinuedAsNewEventAttributes -> Bool
$c== :: WorkflowExecutionContinuedAsNewEventAttributes
-> WorkflowExecutionContinuedAsNewEventAttributes -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionContinuedAsNewEventAttributes]
ReadPrec WorkflowExecutionContinuedAsNewEventAttributes
Int -> ReadS WorkflowExecutionContinuedAsNewEventAttributes
ReadS [WorkflowExecutionContinuedAsNewEventAttributes]
(Int -> ReadS WorkflowExecutionContinuedAsNewEventAttributes)
-> ReadS [WorkflowExecutionContinuedAsNewEventAttributes]
-> ReadPrec WorkflowExecutionContinuedAsNewEventAttributes
-> ReadPrec [WorkflowExecutionContinuedAsNewEventAttributes]
-> Read WorkflowExecutionContinuedAsNewEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionContinuedAsNewEventAttributes]
$creadListPrec :: ReadPrec [WorkflowExecutionContinuedAsNewEventAttributes]
readPrec :: ReadPrec WorkflowExecutionContinuedAsNewEventAttributes
$creadPrec :: ReadPrec WorkflowExecutionContinuedAsNewEventAttributes
readList :: ReadS [WorkflowExecutionContinuedAsNewEventAttributes]
$creadList :: ReadS [WorkflowExecutionContinuedAsNewEventAttributes]
readsPrec :: Int -> ReadS WorkflowExecutionContinuedAsNewEventAttributes
$creadsPrec :: Int -> ReadS WorkflowExecutionContinuedAsNewEventAttributes
Prelude.Read, Int -> WorkflowExecutionContinuedAsNewEventAttributes -> ShowS
[WorkflowExecutionContinuedAsNewEventAttributes] -> ShowS
WorkflowExecutionContinuedAsNewEventAttributes -> String
(Int -> WorkflowExecutionContinuedAsNewEventAttributes -> ShowS)
-> (WorkflowExecutionContinuedAsNewEventAttributes -> String)
-> ([WorkflowExecutionContinuedAsNewEventAttributes] -> ShowS)
-> Show WorkflowExecutionContinuedAsNewEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionContinuedAsNewEventAttributes] -> ShowS
$cshowList :: [WorkflowExecutionContinuedAsNewEventAttributes] -> ShowS
show :: WorkflowExecutionContinuedAsNewEventAttributes -> String
$cshow :: WorkflowExecutionContinuedAsNewEventAttributes -> String
showsPrec :: Int -> WorkflowExecutionContinuedAsNewEventAttributes -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionContinuedAsNewEventAttributes -> ShowS
Prelude.Show, (forall x.
 WorkflowExecutionContinuedAsNewEventAttributes
 -> Rep WorkflowExecutionContinuedAsNewEventAttributes x)
-> (forall x.
    Rep WorkflowExecutionContinuedAsNewEventAttributes x
    -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Generic WorkflowExecutionContinuedAsNewEventAttributes
forall x.
Rep WorkflowExecutionContinuedAsNewEventAttributes x
-> WorkflowExecutionContinuedAsNewEventAttributes
forall x.
WorkflowExecutionContinuedAsNewEventAttributes
-> Rep WorkflowExecutionContinuedAsNewEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowExecutionContinuedAsNewEventAttributes x
-> WorkflowExecutionContinuedAsNewEventAttributes
$cfrom :: forall x.
WorkflowExecutionContinuedAsNewEventAttributes
-> Rep WorkflowExecutionContinuedAsNewEventAttributes x
Prelude.Generic)

-- |
-- Create a value of 'WorkflowExecutionContinuedAsNewEventAttributes' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tagList', 'workflowExecutionContinuedAsNewEventAttributes_tagList' - The list of tags associated with the new workflow execution.
--
-- 'taskStartToCloseTimeout', 'workflowExecutionContinuedAsNewEventAttributes_taskStartToCloseTimeout' - The maximum duration of decision tasks for the new workflow execution.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- 'lambdaRole', 'workflowExecutionContinuedAsNewEventAttributes_lambdaRole' - The IAM role to attach to the new (continued) workflow execution.
--
-- 'input', 'workflowExecutionContinuedAsNewEventAttributes_input' - The input provided to the new workflow execution.
--
-- 'executionStartToCloseTimeout', 'workflowExecutionContinuedAsNewEventAttributes_executionStartToCloseTimeout' - The total duration allowed for the new workflow execution.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- 'taskPriority', 'workflowExecutionContinuedAsNewEventAttributes_taskPriority' - The priority of the task to use for the decisions of the new (continued)
-- workflow execution.
--
-- 'decisionTaskCompletedEventId', 'workflowExecutionContinuedAsNewEventAttributes_decisionTaskCompletedEventId' - 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 chain of events leading up to
-- this event.
--
-- 'newExecutionRunId'', 'workflowExecutionContinuedAsNewEventAttributes_newExecutionRunId' - The @runId@ of the new workflow execution.
--
-- 'taskList', 'workflowExecutionContinuedAsNewEventAttributes_taskList' - The task list to use for the decisions of the new (continued) workflow
-- execution.
--
-- 'childPolicy', 'workflowExecutionContinuedAsNewEventAttributes_childPolicy' - 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 are terminated.
--
-- -   @REQUEST_CANCEL@ – A request to cancel is 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 is taken. The child executions continue to
--     run.
--
-- 'workflowType', 'workflowExecutionContinuedAsNewEventAttributes_workflowType' - The workflow type of this execution.
newWorkflowExecutionContinuedAsNewEventAttributes ::
  -- | 'decisionTaskCompletedEventId'
  Prelude.Integer ->
  -- | 'newExecutionRunId''
  Prelude.Text ->
  -- | 'taskList'
  TaskList ->
  -- | 'childPolicy'
  ChildPolicy ->
  -- | 'workflowType'
  WorkflowType ->
  WorkflowExecutionContinuedAsNewEventAttributes
newWorkflowExecutionContinuedAsNewEventAttributes :: Integer
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowType
-> WorkflowExecutionContinuedAsNewEventAttributes
newWorkflowExecutionContinuedAsNewEventAttributes
  Integer
pDecisionTaskCompletedEventId_
  Text
pNewExecutionRunId_
  TaskList
pTaskList_
  ChildPolicy
pChildPolicy_
  WorkflowType
pWorkflowType_ =
    WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Integer
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowType
-> WorkflowExecutionContinuedAsNewEventAttributes
WorkflowExecutionContinuedAsNewEventAttributes'
      { $sel:tagList:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe [Text]
tagList =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:taskStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
taskStartToCloseTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:lambdaRole:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
lambdaRole =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:input:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
input = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:executionStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
executionStartToCloseTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:taskPriority:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
taskPriority =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:decisionTaskCompletedEventId:WorkflowExecutionContinuedAsNewEventAttributes' :: Integer
decisionTaskCompletedEventId =
          Integer
pDecisionTaskCompletedEventId_,
        $sel:newExecutionRunId':WorkflowExecutionContinuedAsNewEventAttributes' :: Text
newExecutionRunId' =
          Text
pNewExecutionRunId_,
        $sel:taskList:WorkflowExecutionContinuedAsNewEventAttributes' :: TaskList
taskList = TaskList
pTaskList_,
        $sel:childPolicy:WorkflowExecutionContinuedAsNewEventAttributes' :: ChildPolicy
childPolicy = ChildPolicy
pChildPolicy_,
        $sel:workflowType:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowType
workflowType =
          WorkflowType
pWorkflowType_
      }

-- | The list of tags associated with the new workflow execution.
workflowExecutionContinuedAsNewEventAttributes_tagList :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe [Prelude.Text])
workflowExecutionContinuedAsNewEventAttributes_tagList :: (Maybe [Text] -> f (Maybe [Text]))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_tagList = (WorkflowExecutionContinuedAsNewEventAttributes -> Maybe [Text])
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Maybe [Text] -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Maybe [Text]
tagList :: Maybe [Text]
$sel:tagList:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe [Text]
tagList} -> Maybe [Text]
tagList) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Maybe [Text]
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:tagList:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe [Text]
tagList = Maybe [Text]
a} :: WorkflowExecutionContinuedAsNewEventAttributes) ((Maybe [Text] -> f (Maybe [Text]))
 -> WorkflowExecutionContinuedAsNewEventAttributes
 -> f WorkflowExecutionContinuedAsNewEventAttributes)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum duration of decision tasks for the new workflow execution.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
workflowExecutionContinuedAsNewEventAttributes_taskStartToCloseTimeout :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_taskStartToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_taskStartToCloseTimeout = (WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Maybe Text -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Maybe Text
taskStartToCloseTimeout :: Maybe Text
$sel:taskStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
taskStartToCloseTimeout} -> Maybe Text
taskStartToCloseTimeout) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Maybe Text
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:taskStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
taskStartToCloseTimeout = Maybe Text
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The IAM role to attach to the new (continued) workflow execution.
workflowExecutionContinuedAsNewEventAttributes_lambdaRole :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_lambdaRole :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_lambdaRole = (WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Maybe Text -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Maybe Text
lambdaRole :: Maybe Text
$sel:lambdaRole:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
lambdaRole} -> Maybe Text
lambdaRole) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Maybe Text
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:lambdaRole:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
lambdaRole = Maybe Text
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The input provided to the new workflow execution.
workflowExecutionContinuedAsNewEventAttributes_input :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_input :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_input = (WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Maybe Text -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Maybe Text
input :: Maybe Text
$sel:input:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
input} -> Maybe Text
input) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Maybe Text
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:input:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
input = Maybe Text
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The total duration allowed for the new workflow execution.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
workflowExecutionContinuedAsNewEventAttributes_executionStartToCloseTimeout :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_executionStartToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_executionStartToCloseTimeout = (WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Maybe Text -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Maybe Text
executionStartToCloseTimeout :: Maybe Text
$sel:executionStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
executionStartToCloseTimeout} -> Maybe Text
executionStartToCloseTimeout) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Maybe Text
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:executionStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
executionStartToCloseTimeout = Maybe Text
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The priority of the task to use for the decisions of the new (continued)
-- workflow execution.
workflowExecutionContinuedAsNewEventAttributes_taskPriority :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_taskPriority :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_taskPriority = (WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Maybe Text -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Maybe Text
taskPriority :: Maybe Text
$sel:taskPriority:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
taskPriority} -> Maybe Text
taskPriority) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Maybe Text
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:taskPriority:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
taskPriority = Maybe Text
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | 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 chain of events leading up to
-- this event.
workflowExecutionContinuedAsNewEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes Prelude.Integer
workflowExecutionContinuedAsNewEventAttributes_decisionTaskCompletedEventId :: (Integer -> f Integer)
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_decisionTaskCompletedEventId = (WorkflowExecutionContinuedAsNewEventAttributes -> Integer)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Integer -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Integer
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:decisionTaskCompletedEventId:WorkflowExecutionContinuedAsNewEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The @runId@ of the new workflow execution.
workflowExecutionContinuedAsNewEventAttributes_newExecutionRunId :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes Prelude.Text
workflowExecutionContinuedAsNewEventAttributes_newExecutionRunId :: (Text -> f Text)
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_newExecutionRunId = (WorkflowExecutionContinuedAsNewEventAttributes -> Text)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> Text -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {Text
newExecutionRunId' :: Text
$sel:newExecutionRunId':WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Text
newExecutionRunId'} -> Text
newExecutionRunId') (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} Text
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:newExecutionRunId':WorkflowExecutionContinuedAsNewEventAttributes' :: Text
newExecutionRunId' = Text
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The task list to use for the decisions of the new (continued) workflow
-- execution.
workflowExecutionContinuedAsNewEventAttributes_taskList :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes TaskList
workflowExecutionContinuedAsNewEventAttributes_taskList :: (TaskList -> f TaskList)
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_taskList = (WorkflowExecutionContinuedAsNewEventAttributes -> TaskList)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> TaskList -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     TaskList
     TaskList
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {TaskList
taskList :: TaskList
$sel:taskList:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> TaskList
taskList} -> TaskList
taskList) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} TaskList
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:taskList:WorkflowExecutionContinuedAsNewEventAttributes' :: TaskList
taskList = TaskList
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | 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 are terminated.
--
-- -   @REQUEST_CANCEL@ – A request to cancel is 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 is taken. The child executions continue to
--     run.
workflowExecutionContinuedAsNewEventAttributes_childPolicy :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes ChildPolicy
workflowExecutionContinuedAsNewEventAttributes_childPolicy :: (ChildPolicy -> f ChildPolicy)
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_childPolicy = (WorkflowExecutionContinuedAsNewEventAttributes -> ChildPolicy)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> ChildPolicy -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     ChildPolicy
     ChildPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {ChildPolicy
childPolicy :: ChildPolicy
$sel:childPolicy:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> ChildPolicy
childPolicy} -> ChildPolicy
childPolicy) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} ChildPolicy
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:childPolicy:WorkflowExecutionContinuedAsNewEventAttributes' :: ChildPolicy
childPolicy = ChildPolicy
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

-- | The workflow type of this execution.
workflowExecutionContinuedAsNewEventAttributes_workflowType :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes WorkflowType
workflowExecutionContinuedAsNewEventAttributes_workflowType :: (WorkflowType -> f WorkflowType)
-> WorkflowExecutionContinuedAsNewEventAttributes
-> f WorkflowExecutionContinuedAsNewEventAttributes
workflowExecutionContinuedAsNewEventAttributes_workflowType = (WorkflowExecutionContinuedAsNewEventAttributes -> WorkflowType)
-> (WorkflowExecutionContinuedAsNewEventAttributes
    -> WorkflowType -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Lens
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowExecutionContinuedAsNewEventAttributes
     WorkflowType
     WorkflowType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionContinuedAsNewEventAttributes' {WorkflowType
workflowType :: WorkflowType
$sel:workflowType:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> WorkflowType
workflowType} -> WorkflowType
workflowType) (\s :: WorkflowExecutionContinuedAsNewEventAttributes
s@WorkflowExecutionContinuedAsNewEventAttributes' {} WorkflowType
a -> WorkflowExecutionContinuedAsNewEventAttributes
s {$sel:workflowType:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowType
workflowType = WorkflowType
a} :: WorkflowExecutionContinuedAsNewEventAttributes)

instance
  Core.FromJSON
    WorkflowExecutionContinuedAsNewEventAttributes
  where
  parseJSON :: Value -> Parser WorkflowExecutionContinuedAsNewEventAttributes
parseJSON =
    String
-> (Object
    -> Parser WorkflowExecutionContinuedAsNewEventAttributes)
-> Value
-> Parser WorkflowExecutionContinuedAsNewEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"WorkflowExecutionContinuedAsNewEventAttributes"
      ( \Object
x ->
          Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Integer
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowType
-> WorkflowExecutionContinuedAsNewEventAttributes
WorkflowExecutionContinuedAsNewEventAttributes'
            (Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Integer
 -> Text
 -> TaskList
 -> ChildPolicy
 -> WorkflowType
 -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Integer
      -> Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tagList" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Integer
   -> Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Integer
      -> Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskStartToCloseTimeout")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Integer
   -> Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Integer
      -> Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lambdaRole")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Integer
   -> Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Integer
      -> Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"input")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Integer
   -> Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Integer
      -> Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"executionStartToCloseTimeout")
              Parser
  (Maybe Text
   -> Integer
   -> Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Integer
      -> Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskPriority")
              Parser
  (Integer
   -> Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser Integer
-> Parser
     (Text
      -> TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"decisionTaskCompletedEventId")
              Parser
  (Text
   -> TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser Text
-> Parser
     (TaskList
      -> ChildPolicy
      -> WorkflowType
      -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"newExecutionRunId")
              Parser
  (TaskList
   -> ChildPolicy
   -> WorkflowType
   -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser TaskList
-> Parser
     (ChildPolicy
      -> WorkflowType -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TaskList
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"taskList")
              Parser
  (ChildPolicy
   -> WorkflowType -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser ChildPolicy
-> Parser
     (WorkflowType -> WorkflowExecutionContinuedAsNewEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ChildPolicy
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"childPolicy")
              Parser
  (WorkflowType -> WorkflowExecutionContinuedAsNewEventAttributes)
-> Parser WorkflowType
-> Parser WorkflowExecutionContinuedAsNewEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser WorkflowType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"workflowType")
      )

instance
  Prelude.Hashable
    WorkflowExecutionContinuedAsNewEventAttributes

instance
  Prelude.NFData
    WorkflowExecutionContinuedAsNewEventAttributes