{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SWF.Types.WorkflowExecutionContinuedAsNewEventAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 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 input provided to the new workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
    -- | The IAM role to attach to the new (continued) workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
lambdaRole :: Prelude.Maybe Prelude.Text,
    -- | The list of tags associated with the new workflow execution.
    WorkflowExecutionContinuedAsNewEventAttributes -> Maybe [Text]
tagList :: 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 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 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
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]
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
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.
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:
--
-- '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.
--
-- 'input', 'workflowExecutionContinuedAsNewEventAttributes_input' - The input provided to the new workflow execution.
--
-- 'lambdaRole', 'workflowExecutionContinuedAsNewEventAttributes_lambdaRole' - The IAM role to attach to the new (continued) workflow execution.
--
-- 'tagList', 'workflowExecutionContinuedAsNewEventAttributes_tagList' - The list of tags associated with the new workflow execution.
--
-- 'taskPriority', 'workflowExecutionContinuedAsNewEventAttributes_taskPriority' - The priority of the task to use for the decisions of the new (continued)
-- 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.
--
-- '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'
      { $sel:executionStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
executionStartToCloseTimeout =
          forall a. Maybe a
Prelude.Nothing,
        $sel:input:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
input = forall a. Maybe a
Prelude.Nothing,
        $sel:lambdaRole:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
lambdaRole =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tagList:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe [Text]
tagList = forall a. Maybe a
Prelude.Nothing,
        $sel:taskPriority:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
taskPriority =
          forall a. Maybe a
Prelude.Nothing,
        $sel:taskStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: Maybe Text
taskStartToCloseTimeout =
          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 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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)
workflowExecutionContinuedAsNewEventAttributes_executionStartToCloseTimeout = 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 input provided to the new workflow execution.
workflowExecutionContinuedAsNewEventAttributes_input :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_input :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)
workflowExecutionContinuedAsNewEventAttributes_input = 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 IAM role to attach to the new (continued) workflow execution.
workflowExecutionContinuedAsNewEventAttributes_lambdaRole :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionContinuedAsNewEventAttributes_lambdaRole :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)
workflowExecutionContinuedAsNewEventAttributes_lambdaRole = 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 list of tags associated with the new workflow execution.
workflowExecutionContinuedAsNewEventAttributes_tagList :: Lens.Lens' WorkflowExecutionContinuedAsNewEventAttributes (Prelude.Maybe [Prelude.Text])
workflowExecutionContinuedAsNewEventAttributes_tagList :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe [Text])
workflowExecutionContinuedAsNewEventAttributes_tagList = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)
workflowExecutionContinuedAsNewEventAttributes_taskPriority = 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 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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes (Maybe Text)
workflowExecutionContinuedAsNewEventAttributes_taskStartToCloseTimeout = 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 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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes Integer
workflowExecutionContinuedAsNewEventAttributes_decisionTaskCompletedEventId = 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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes Text
workflowExecutionContinuedAsNewEventAttributes_newExecutionRunId = 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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes TaskList
workflowExecutionContinuedAsNewEventAttributes_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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes ChildPolicy
workflowExecutionContinuedAsNewEventAttributes_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 :: Lens' WorkflowExecutionContinuedAsNewEventAttributes WorkflowType
workflowExecutionContinuedAsNewEventAttributes_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
  Data.FromJSON
    WorkflowExecutionContinuedAsNewEventAttributes
  where
  parseJSON :: Value -> Parser WorkflowExecutionContinuedAsNewEventAttributes
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"WorkflowExecutionContinuedAsNewEventAttributes"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Integer
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowType
-> WorkflowExecutionContinuedAsNewEventAttributes
WorkflowExecutionContinuedAsNewEventAttributes'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"executionStartToCloseTimeout")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"input")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lambdaRole")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tagList" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"taskPriority")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"taskStartToCloseTimeout")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"decisionTaskCompletedEventId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"newExecutionRunId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"taskList")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"childPolicy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"workflowType")
      )

instance
  Prelude.Hashable
    WorkflowExecutionContinuedAsNewEventAttributes
  where
  hashWithSalt :: Int -> WorkflowExecutionContinuedAsNewEventAttributes -> Int
hashWithSalt
    Int
_salt
    WorkflowExecutionContinuedAsNewEventAttributes' {Integer
Maybe [Text]
Maybe Text
Text
ChildPolicy
TaskList
WorkflowType
workflowType :: WorkflowType
childPolicy :: ChildPolicy
taskList :: TaskList
newExecutionRunId' :: Text
decisionTaskCompletedEventId :: Integer
taskStartToCloseTimeout :: Maybe Text
taskPriority :: Maybe Text
tagList :: Maybe [Text]
lambdaRole :: Maybe Text
input :: Maybe Text
executionStartToCloseTimeout :: Maybe Text
$sel:workflowType:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> WorkflowType
$sel:childPolicy:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> ChildPolicy
$sel:taskList:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> TaskList
$sel:newExecutionRunId':WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Text
$sel:decisionTaskCompletedEventId:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Integer
$sel:taskStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:taskPriority:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:tagList:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe [Text]
$sel:lambdaRole:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:input:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:executionStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionStartToCloseTimeout
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
input
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lambdaRole
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
tagList
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
taskPriority
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
taskStartToCloseTimeout
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
decisionTaskCompletedEventId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
newExecutionRunId'
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TaskList
taskList
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ChildPolicy
childPolicy
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WorkflowType
workflowType

instance
  Prelude.NFData
    WorkflowExecutionContinuedAsNewEventAttributes
  where
  rnf :: WorkflowExecutionContinuedAsNewEventAttributes -> ()
rnf
    WorkflowExecutionContinuedAsNewEventAttributes' {Integer
Maybe [Text]
Maybe Text
Text
ChildPolicy
TaskList
WorkflowType
workflowType :: WorkflowType
childPolicy :: ChildPolicy
taskList :: TaskList
newExecutionRunId' :: Text
decisionTaskCompletedEventId :: Integer
taskStartToCloseTimeout :: Maybe Text
taskPriority :: Maybe Text
tagList :: Maybe [Text]
lambdaRole :: Maybe Text
input :: Maybe Text
executionStartToCloseTimeout :: Maybe Text
$sel:workflowType:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> WorkflowType
$sel:childPolicy:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> ChildPolicy
$sel:taskList:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> TaskList
$sel:newExecutionRunId':WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Text
$sel:decisionTaskCompletedEventId:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Integer
$sel:taskStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:taskPriority:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:tagList:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe [Text]
$sel:lambdaRole:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:input:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
$sel:executionStartToCloseTimeout:WorkflowExecutionContinuedAsNewEventAttributes' :: WorkflowExecutionContinuedAsNewEventAttributes -> Maybe Text
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionStartToCloseTimeout
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
input
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lambdaRole
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tagList
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
taskPriority
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
taskStartToCloseTimeout
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
decisionTaskCompletedEventId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
newExecutionRunId'
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TaskList
taskList
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ChildPolicy
childPolicy
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WorkflowType
workflowType