{-# 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.StartChildWorkflowExecutionInitiatedEventAttributes
-- 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.StartChildWorkflowExecutionInitiatedEventAttributes 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 @StartChildWorkflowExecutionInitiated@
-- event.
--
-- /See:/ 'newStartChildWorkflowExecutionInitiatedEventAttributes' smart constructor.
data StartChildWorkflowExecutionInitiatedEventAttributes = StartChildWorkflowExecutionInitiatedEventAttributes'
  { -- | Data attached to the event that can be used by the decider in subsequent
    -- decision tasks. This data isn\'t sent to the activity.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
control :: Prelude.Maybe Prelude.Text,
    -- | The maximum duration for the child workflow execution. If the workflow
    -- execution isn\'t closed within this duration, it is timed out and
    -- force-terminated.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
executionStartToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The inputs provided to the child workflow execution.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
    -- | The IAM role to attach to the child workflow execution.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
lambdaRole :: Prelude.Maybe Prelude.Text,
    -- | The list of tags to associated with the child workflow execution.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe [Text]
tagList :: Prelude.Maybe [Prelude.Text],
    -- | The priority assigned for the decision tasks for this workflow
    -- execution. Valid values are integers that range from Java\'s
    -- @Integer.MIN_VALUE@ (-2147483648) to @Integer.MAX_VALUE@ (2147483647).
    -- Higher numbers indicate higher priority.
    --
    -- For more information about setting task priority, see
    -- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html Setting Task Priority>
    -- in the /Amazon SWF Developer Guide/.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
taskPriority :: Prelude.Maybe Prelude.Text,
    -- | The maximum duration allowed for the decision tasks for this workflow
    -- execution.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
taskStartToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The @workflowId@ of the child workflow execution.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Text
workflowId :: Prelude.Text,
    -- | The type of the child workflow execution.
    StartChildWorkflowExecutionInitiatedEventAttributes -> WorkflowType
workflowType :: WorkflowType,
    -- | The name of the task list used for the decision tasks of the child
    -- workflow execution.
    StartChildWorkflowExecutionInitiatedEventAttributes -> TaskList
taskList :: TaskList,
    -- | 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.
    StartChildWorkflowExecutionInitiatedEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer,
    -- | 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 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.
    StartChildWorkflowExecutionInitiatedEventAttributes -> ChildPolicy
childPolicy :: ChildPolicy
  }
  deriving (StartChildWorkflowExecutionInitiatedEventAttributes
-> StartChildWorkflowExecutionInitiatedEventAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChildWorkflowExecutionInitiatedEventAttributes
-> StartChildWorkflowExecutionInitiatedEventAttributes -> Bool
$c/= :: StartChildWorkflowExecutionInitiatedEventAttributes
-> StartChildWorkflowExecutionInitiatedEventAttributes -> Bool
== :: StartChildWorkflowExecutionInitiatedEventAttributes
-> StartChildWorkflowExecutionInitiatedEventAttributes -> Bool
$c== :: StartChildWorkflowExecutionInitiatedEventAttributes
-> StartChildWorkflowExecutionInitiatedEventAttributes -> Bool
Prelude.Eq, ReadPrec [StartChildWorkflowExecutionInitiatedEventAttributes]
ReadPrec StartChildWorkflowExecutionInitiatedEventAttributes
Int -> ReadS StartChildWorkflowExecutionInitiatedEventAttributes
ReadS [StartChildWorkflowExecutionInitiatedEventAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChildWorkflowExecutionInitiatedEventAttributes]
$creadListPrec :: ReadPrec [StartChildWorkflowExecutionInitiatedEventAttributes]
readPrec :: ReadPrec StartChildWorkflowExecutionInitiatedEventAttributes
$creadPrec :: ReadPrec StartChildWorkflowExecutionInitiatedEventAttributes
readList :: ReadS [StartChildWorkflowExecutionInitiatedEventAttributes]
$creadList :: ReadS [StartChildWorkflowExecutionInitiatedEventAttributes]
readsPrec :: Int -> ReadS StartChildWorkflowExecutionInitiatedEventAttributes
$creadsPrec :: Int -> ReadS StartChildWorkflowExecutionInitiatedEventAttributes
Prelude.Read, Int -> StartChildWorkflowExecutionInitiatedEventAttributes -> ShowS
[StartChildWorkflowExecutionInitiatedEventAttributes] -> ShowS
StartChildWorkflowExecutionInitiatedEventAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChildWorkflowExecutionInitiatedEventAttributes] -> ShowS
$cshowList :: [StartChildWorkflowExecutionInitiatedEventAttributes] -> ShowS
show :: StartChildWorkflowExecutionInitiatedEventAttributes -> String
$cshow :: StartChildWorkflowExecutionInitiatedEventAttributes -> String
showsPrec :: Int -> StartChildWorkflowExecutionInitiatedEventAttributes -> ShowS
$cshowsPrec :: Int -> StartChildWorkflowExecutionInitiatedEventAttributes -> ShowS
Prelude.Show, forall x.
Rep StartChildWorkflowExecutionInitiatedEventAttributes x
-> StartChildWorkflowExecutionInitiatedEventAttributes
forall x.
StartChildWorkflowExecutionInitiatedEventAttributes
-> Rep StartChildWorkflowExecutionInitiatedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartChildWorkflowExecutionInitiatedEventAttributes x
-> StartChildWorkflowExecutionInitiatedEventAttributes
$cfrom :: forall x.
StartChildWorkflowExecutionInitiatedEventAttributes
-> Rep StartChildWorkflowExecutionInitiatedEventAttributes x
Prelude.Generic)

-- |
-- Create a value of 'StartChildWorkflowExecutionInitiatedEventAttributes' 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:
--
-- 'control', 'startChildWorkflowExecutionInitiatedEventAttributes_control' - Data attached to the event that can be used by the decider in subsequent
-- decision tasks. This data isn\'t sent to the activity.
--
-- 'executionStartToCloseTimeout', 'startChildWorkflowExecutionInitiatedEventAttributes_executionStartToCloseTimeout' - The maximum duration for the child workflow execution. If the workflow
-- execution isn\'t closed within this duration, it is timed out and
-- force-terminated.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- 'input', 'startChildWorkflowExecutionInitiatedEventAttributes_input' - The inputs provided to the child workflow execution.
--
-- 'lambdaRole', 'startChildWorkflowExecutionInitiatedEventAttributes_lambdaRole' - The IAM role to attach to the child workflow execution.
--
-- 'tagList', 'startChildWorkflowExecutionInitiatedEventAttributes_tagList' - The list of tags to associated with the child workflow execution.
--
-- 'taskPriority', 'startChildWorkflowExecutionInitiatedEventAttributes_taskPriority' - The priority assigned for the decision tasks for this workflow
-- execution. Valid values are integers that range from Java\'s
-- @Integer.MIN_VALUE@ (-2147483648) to @Integer.MAX_VALUE@ (2147483647).
-- Higher numbers indicate higher priority.
--
-- For more information about setting task priority, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html Setting Task Priority>
-- in the /Amazon SWF Developer Guide/.
--
-- 'taskStartToCloseTimeout', 'startChildWorkflowExecutionInitiatedEventAttributes_taskStartToCloseTimeout' - The maximum duration allowed for the decision tasks for this workflow
-- execution.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- 'workflowId', 'startChildWorkflowExecutionInitiatedEventAttributes_workflowId' - The @workflowId@ of the child workflow execution.
--
-- 'workflowType', 'startChildWorkflowExecutionInitiatedEventAttributes_workflowType' - The type of the child workflow execution.
--
-- 'taskList', 'startChildWorkflowExecutionInitiatedEventAttributes_taskList' - The name of the task list used for the decision tasks of the child
-- workflow execution.
--
-- 'decisionTaskCompletedEventId', 'startChildWorkflowExecutionInitiatedEventAttributes_decisionTaskCompletedEventId' - 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.
--
-- 'childPolicy', 'startChildWorkflowExecutionInitiatedEventAttributes_childPolicy' - 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 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.
newStartChildWorkflowExecutionInitiatedEventAttributes ::
  -- | 'workflowId'
  Prelude.Text ->
  -- | 'workflowType'
  WorkflowType ->
  -- | 'taskList'
  TaskList ->
  -- | 'decisionTaskCompletedEventId'
  Prelude.Integer ->
  -- | 'childPolicy'
  ChildPolicy ->
  StartChildWorkflowExecutionInitiatedEventAttributes
newStartChildWorkflowExecutionInitiatedEventAttributes :: Text
-> WorkflowType
-> TaskList
-> Integer
-> ChildPolicy
-> StartChildWorkflowExecutionInitiatedEventAttributes
newStartChildWorkflowExecutionInitiatedEventAttributes
  Text
pWorkflowId_
  WorkflowType
pWorkflowType_
  TaskList
pTaskList_
  Integer
pDecisionTaskCompletedEventId_
  ChildPolicy
pChildPolicy_ =
    StartChildWorkflowExecutionInitiatedEventAttributes'
      { $sel:control:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
control =
          forall a. Maybe a
Prelude.Nothing,
        $sel:executionStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
executionStartToCloseTimeout =
          forall a. Maybe a
Prelude.Nothing,
        $sel:input:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
input =
          forall a. Maybe a
Prelude.Nothing,
        $sel:lambdaRole:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
lambdaRole =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tagList:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe [Text]
tagList =
          forall a. Maybe a
Prelude.Nothing,
        $sel:taskPriority:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
taskPriority =
          forall a. Maybe a
Prelude.Nothing,
        $sel:taskStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
taskStartToCloseTimeout =
          forall a. Maybe a
Prelude.Nothing,
        $sel:workflowId:StartChildWorkflowExecutionInitiatedEventAttributes' :: Text
workflowId =
          Text
pWorkflowId_,
        $sel:workflowType:StartChildWorkflowExecutionInitiatedEventAttributes' :: WorkflowType
workflowType =
          WorkflowType
pWorkflowType_,
        $sel:taskList:StartChildWorkflowExecutionInitiatedEventAttributes' :: TaskList
taskList = TaskList
pTaskList_,
        $sel:decisionTaskCompletedEventId:StartChildWorkflowExecutionInitiatedEventAttributes' :: Integer
decisionTaskCompletedEventId =
          Integer
pDecisionTaskCompletedEventId_,
        $sel:childPolicy:StartChildWorkflowExecutionInitiatedEventAttributes' :: ChildPolicy
childPolicy =
          ChildPolicy
pChildPolicy_
      }

-- | Data attached to the event that can be used by the decider in subsequent
-- decision tasks. This data isn\'t sent to the activity.
startChildWorkflowExecutionInitiatedEventAttributes_control :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Prelude.Maybe Prelude.Text)
startChildWorkflowExecutionInitiatedEventAttributes_control :: Lens'
  StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)
startChildWorkflowExecutionInitiatedEventAttributes_control = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {Maybe Text
control :: Maybe Text
$sel:control:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
control} -> Maybe Text
control) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} Maybe Text
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:control:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
control = Maybe Text
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

-- | The maximum duration for the child workflow execution. If the workflow
-- execution isn\'t closed within this duration, it is timed out and
-- force-terminated.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
startChildWorkflowExecutionInitiatedEventAttributes_executionStartToCloseTimeout :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Prelude.Maybe Prelude.Text)
startChildWorkflowExecutionInitiatedEventAttributes_executionStartToCloseTimeout :: Lens'
  StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)
startChildWorkflowExecutionInitiatedEventAttributes_executionStartToCloseTimeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {Maybe Text
executionStartToCloseTimeout :: Maybe Text
$sel:executionStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
executionStartToCloseTimeout} -> Maybe Text
executionStartToCloseTimeout) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} Maybe Text
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:executionStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
executionStartToCloseTimeout = Maybe Text
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

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

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

-- | The list of tags to associated with the child workflow execution.
startChildWorkflowExecutionInitiatedEventAttributes_tagList :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Prelude.Maybe [Prelude.Text])
startChildWorkflowExecutionInitiatedEventAttributes_tagList :: Lens'
  StartChildWorkflowExecutionInitiatedEventAttributes (Maybe [Text])
startChildWorkflowExecutionInitiatedEventAttributes_tagList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {Maybe [Text]
tagList :: Maybe [Text]
$sel:tagList:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe [Text]
tagList} -> Maybe [Text]
tagList) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} Maybe [Text]
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:tagList:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe [Text]
tagList = Maybe [Text]
a} :: StartChildWorkflowExecutionInitiatedEventAttributes) 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 assigned for the decision tasks for this workflow
-- execution. Valid values are integers that range from Java\'s
-- @Integer.MIN_VALUE@ (-2147483648) to @Integer.MAX_VALUE@ (2147483647).
-- Higher numbers indicate higher priority.
--
-- For more information about setting task priority, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html Setting Task Priority>
-- in the /Amazon SWF Developer Guide/.
startChildWorkflowExecutionInitiatedEventAttributes_taskPriority :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Prelude.Maybe Prelude.Text)
startChildWorkflowExecutionInitiatedEventAttributes_taskPriority :: Lens'
  StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text)
startChildWorkflowExecutionInitiatedEventAttributes_taskPriority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {Maybe Text
taskPriority :: Maybe Text
$sel:taskPriority:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
taskPriority} -> Maybe Text
taskPriority) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} Maybe Text
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:taskPriority:StartChildWorkflowExecutionInitiatedEventAttributes' :: Maybe Text
taskPriority = Maybe Text
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

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

-- | The @workflowId@ of the child workflow execution.
startChildWorkflowExecutionInitiatedEventAttributes_workflowId :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes Prelude.Text
startChildWorkflowExecutionInitiatedEventAttributes_workflowId :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes Text
startChildWorkflowExecutionInitiatedEventAttributes_workflowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {Text
workflowId :: Text
$sel:workflowId:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Text
workflowId} -> Text
workflowId) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} Text
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:workflowId:StartChildWorkflowExecutionInitiatedEventAttributes' :: Text
workflowId = Text
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

-- | The type of the child workflow execution.
startChildWorkflowExecutionInitiatedEventAttributes_workflowType :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes WorkflowType
startChildWorkflowExecutionInitiatedEventAttributes_workflowType :: Lens'
  StartChildWorkflowExecutionInitiatedEventAttributes WorkflowType
startChildWorkflowExecutionInitiatedEventAttributes_workflowType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {WorkflowType
workflowType :: WorkflowType
$sel:workflowType:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> WorkflowType
workflowType} -> WorkflowType
workflowType) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} WorkflowType
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:workflowType:StartChildWorkflowExecutionInitiatedEventAttributes' :: WorkflowType
workflowType = WorkflowType
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

-- | The name of the task list used for the decision tasks of the child
-- workflow execution.
startChildWorkflowExecutionInitiatedEventAttributes_taskList :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes TaskList
startChildWorkflowExecutionInitiatedEventAttributes_taskList :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes TaskList
startChildWorkflowExecutionInitiatedEventAttributes_taskList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {TaskList
taskList :: TaskList
$sel:taskList:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> TaskList
taskList} -> TaskList
taskList) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} TaskList
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:taskList:StartChildWorkflowExecutionInitiatedEventAttributes' :: TaskList
taskList = TaskList
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

-- | 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.
startChildWorkflowExecutionInitiatedEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes Prelude.Integer
startChildWorkflowExecutionInitiatedEventAttributes_decisionTaskCompletedEventId :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes Integer
startChildWorkflowExecutionInitiatedEventAttributes_decisionTaskCompletedEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} Integer
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:decisionTaskCompletedEventId:StartChildWorkflowExecutionInitiatedEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

-- | 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 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.
startChildWorkflowExecutionInitiatedEventAttributes_childPolicy :: Lens.Lens' StartChildWorkflowExecutionInitiatedEventAttributes ChildPolicy
startChildWorkflowExecutionInitiatedEventAttributes_childPolicy :: Lens'
  StartChildWorkflowExecutionInitiatedEventAttributes ChildPolicy
startChildWorkflowExecutionInitiatedEventAttributes_childPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChildWorkflowExecutionInitiatedEventAttributes' {ChildPolicy
childPolicy :: ChildPolicy
$sel:childPolicy:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> ChildPolicy
childPolicy} -> ChildPolicy
childPolicy) (\s :: StartChildWorkflowExecutionInitiatedEventAttributes
s@StartChildWorkflowExecutionInitiatedEventAttributes' {} ChildPolicy
a -> StartChildWorkflowExecutionInitiatedEventAttributes
s {$sel:childPolicy:StartChildWorkflowExecutionInitiatedEventAttributes' :: ChildPolicy
childPolicy = ChildPolicy
a} :: StartChildWorkflowExecutionInitiatedEventAttributes)

instance
  Data.FromJSON
    StartChildWorkflowExecutionInitiatedEventAttributes
  where
  parseJSON :: Value -> Parser StartChildWorkflowExecutionInitiatedEventAttributes
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"StartChildWorkflowExecutionInitiatedEventAttributes"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Text
-> WorkflowType
-> TaskList
-> Integer
-> ChildPolicy
-> StartChildWorkflowExecutionInitiatedEventAttributes
StartChildWorkflowExecutionInitiatedEventAttributes'
            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
"control")
            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
"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
"workflowId")
            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")
            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
"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
"childPolicy")
      )

instance
  Prelude.Hashable
    StartChildWorkflowExecutionInitiatedEventAttributes
  where
  hashWithSalt :: Int -> StartChildWorkflowExecutionInitiatedEventAttributes -> Int
hashWithSalt
    Int
_salt
    StartChildWorkflowExecutionInitiatedEventAttributes' {Integer
Maybe [Text]
Maybe Text
Text
ChildPolicy
TaskList
WorkflowType
childPolicy :: ChildPolicy
decisionTaskCompletedEventId :: Integer
taskList :: TaskList
workflowType :: WorkflowType
workflowId :: Text
taskStartToCloseTimeout :: Maybe Text
taskPriority :: Maybe Text
tagList :: Maybe [Text]
lambdaRole :: Maybe Text
input :: Maybe Text
executionStartToCloseTimeout :: Maybe Text
control :: Maybe Text
$sel:childPolicy:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> ChildPolicy
$sel:decisionTaskCompletedEventId:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Integer
$sel:taskList:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> TaskList
$sel:workflowType:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> WorkflowType
$sel:workflowId:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Text
$sel:taskStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:taskPriority:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:tagList:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe [Text]
$sel:lambdaRole:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:input:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:executionStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:control:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
control
        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` Text
workflowId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WorkflowType
workflowType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TaskList
taskList
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
decisionTaskCompletedEventId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ChildPolicy
childPolicy

instance
  Prelude.NFData
    StartChildWorkflowExecutionInitiatedEventAttributes
  where
  rnf :: StartChildWorkflowExecutionInitiatedEventAttributes -> ()
rnf
    StartChildWorkflowExecutionInitiatedEventAttributes' {Integer
Maybe [Text]
Maybe Text
Text
ChildPolicy
TaskList
WorkflowType
childPolicy :: ChildPolicy
decisionTaskCompletedEventId :: Integer
taskList :: TaskList
workflowType :: WorkflowType
workflowId :: Text
taskStartToCloseTimeout :: Maybe Text
taskPriority :: Maybe Text
tagList :: Maybe [Text]
lambdaRole :: Maybe Text
input :: Maybe Text
executionStartToCloseTimeout :: Maybe Text
control :: Maybe Text
$sel:childPolicy:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> ChildPolicy
$sel:decisionTaskCompletedEventId:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Integer
$sel:taskList:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> TaskList
$sel:workflowType:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> WorkflowType
$sel:workflowId:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Text
$sel:taskStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:taskPriority:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:tagList:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe [Text]
$sel:lambdaRole:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:input:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:executionStartToCloseTimeout:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
$sel:control:StartChildWorkflowExecutionInitiatedEventAttributes' :: StartChildWorkflowExecutionInitiatedEventAttributes -> Maybe Text
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
control
        seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
workflowId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WorkflowType
workflowType
        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 Integer
decisionTaskCompletedEventId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ChildPolicy
childPolicy