{-# 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.WorkflowTypeConfiguration
-- 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.WorkflowTypeConfiguration 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

-- | The configuration settings of a workflow type.
--
-- /See:/ 'newWorkflowTypeConfiguration' smart constructor.
data WorkflowTypeConfiguration = WorkflowTypeConfiguration'
  { -- | The default IAM role attached to this workflow type.
    --
    -- Executions of this workflow type need IAM roles to invoke Lambda
    -- functions. If you don\'t specify an IAM role when starting this workflow
    -- type, the default Lambda role is attached to the execution. For more
    -- information, see
    -- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html>
    -- in the /Amazon SWF Developer Guide/.
    WorkflowTypeConfiguration -> Maybe Text
defaultLambdaRole :: Prelude.Maybe Prelude.Text,
    -- | The default policy to use for the child workflow executions when a
    -- workflow execution of this type is terminated, by calling the
    -- TerminateWorkflowExecution action explicitly or due to an expired
    -- timeout. This default can be overridden when starting a workflow
    -- execution using the StartWorkflowExecution action or the
    -- @StartChildWorkflowExecution@ Decision.
    --
    -- The supported child policies are:
    --
    -- -   @TERMINATE@ – The child executions 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.
    WorkflowTypeConfiguration -> Maybe ChildPolicy
defaultChildPolicy :: Prelude.Maybe ChildPolicy,
    -- | The default task list, specified when registering the workflow type, for
    -- decisions tasks scheduled for workflow executions of this type. This
    -- default can be overridden when starting a workflow execution using the
    -- StartWorkflowExecution action or the @StartChildWorkflowExecution@
    -- Decision.
    WorkflowTypeConfiguration -> Maybe TaskList
defaultTaskList :: Prelude.Maybe TaskList,
    -- | The default task priority, specified when registering the workflow type,
    -- for all decision tasks of this workflow type. This default can be
    -- overridden when starting a workflow execution using the
    -- StartWorkflowExecution action or the @StartChildWorkflowExecution@
    -- decision.
    --
    -- 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/.
    WorkflowTypeConfiguration -> Maybe Text
defaultTaskPriority :: Prelude.Maybe Prelude.Text,
    -- | The default maximum duration, specified when registering the workflow
    -- type, for executions of this workflow type. This default can be
    -- overridden when starting a workflow execution using the
    -- StartWorkflowExecution action or the @StartChildWorkflowExecution@
    -- Decision.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    WorkflowTypeConfiguration -> Maybe Text
defaultExecutionStartToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The default maximum duration, specified when registering the workflow
    -- type, that a decision task for executions of this workflow type might
    -- take before returning completion or failure. If the task doesn\'tdo
    -- close in the specified time then the task is automatically timed out and
    -- rescheduled. If the decider eventually reports a completion or failure,
    -- it is ignored. This default can be overridden when starting a workflow
    -- execution using the StartWorkflowExecution action or the
    -- @StartChildWorkflowExecution@ Decision.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    WorkflowTypeConfiguration -> Maybe Text
defaultTaskStartToCloseTimeout :: Prelude.Maybe Prelude.Text
  }
  deriving (WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool
(WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool)
-> (WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool)
-> Eq WorkflowTypeConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool
$c/= :: WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool
== :: WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool
$c== :: WorkflowTypeConfiguration -> WorkflowTypeConfiguration -> Bool
Prelude.Eq, ReadPrec [WorkflowTypeConfiguration]
ReadPrec WorkflowTypeConfiguration
Int -> ReadS WorkflowTypeConfiguration
ReadS [WorkflowTypeConfiguration]
(Int -> ReadS WorkflowTypeConfiguration)
-> ReadS [WorkflowTypeConfiguration]
-> ReadPrec WorkflowTypeConfiguration
-> ReadPrec [WorkflowTypeConfiguration]
-> Read WorkflowTypeConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowTypeConfiguration]
$creadListPrec :: ReadPrec [WorkflowTypeConfiguration]
readPrec :: ReadPrec WorkflowTypeConfiguration
$creadPrec :: ReadPrec WorkflowTypeConfiguration
readList :: ReadS [WorkflowTypeConfiguration]
$creadList :: ReadS [WorkflowTypeConfiguration]
readsPrec :: Int -> ReadS WorkflowTypeConfiguration
$creadsPrec :: Int -> ReadS WorkflowTypeConfiguration
Prelude.Read, Int -> WorkflowTypeConfiguration -> ShowS
[WorkflowTypeConfiguration] -> ShowS
WorkflowTypeConfiguration -> String
(Int -> WorkflowTypeConfiguration -> ShowS)
-> (WorkflowTypeConfiguration -> String)
-> ([WorkflowTypeConfiguration] -> ShowS)
-> Show WorkflowTypeConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowTypeConfiguration] -> ShowS
$cshowList :: [WorkflowTypeConfiguration] -> ShowS
show :: WorkflowTypeConfiguration -> String
$cshow :: WorkflowTypeConfiguration -> String
showsPrec :: Int -> WorkflowTypeConfiguration -> ShowS
$cshowsPrec :: Int -> WorkflowTypeConfiguration -> ShowS
Prelude.Show, (forall x.
 WorkflowTypeConfiguration -> Rep WorkflowTypeConfiguration x)
-> (forall x.
    Rep WorkflowTypeConfiguration x -> WorkflowTypeConfiguration)
-> Generic WorkflowTypeConfiguration
forall x.
Rep WorkflowTypeConfiguration x -> WorkflowTypeConfiguration
forall x.
WorkflowTypeConfiguration -> Rep WorkflowTypeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowTypeConfiguration x -> WorkflowTypeConfiguration
$cfrom :: forall x.
WorkflowTypeConfiguration -> Rep WorkflowTypeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'WorkflowTypeConfiguration' 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:
--
-- 'defaultLambdaRole', 'workflowTypeConfiguration_defaultLambdaRole' - The default IAM role attached to this workflow type.
--
-- Executions of this workflow type need IAM roles to invoke Lambda
-- functions. If you don\'t specify an IAM role when starting this workflow
-- type, the default Lambda role is attached to the execution. For more
-- information, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html>
-- in the /Amazon SWF Developer Guide/.
--
-- 'defaultChildPolicy', 'workflowTypeConfiguration_defaultChildPolicy' - The default policy to use for the child workflow executions when a
-- workflow execution of this type is terminated, by calling the
-- TerminateWorkflowExecution action explicitly or due to an expired
-- timeout. This default can be overridden when starting a workflow
-- execution using the StartWorkflowExecution action or the
-- @StartChildWorkflowExecution@ Decision.
--
-- The supported child policies are:
--
-- -   @TERMINATE@ – The child executions 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.
--
-- 'defaultTaskList', 'workflowTypeConfiguration_defaultTaskList' - The default task list, specified when registering the workflow type, for
-- decisions tasks scheduled for workflow executions of this type. This
-- default can be overridden when starting a workflow execution using the
-- StartWorkflowExecution action or the @StartChildWorkflowExecution@
-- Decision.
--
-- 'defaultTaskPriority', 'workflowTypeConfiguration_defaultTaskPriority' - The default task priority, specified when registering the workflow type,
-- for all decision tasks of this workflow type. This default can be
-- overridden when starting a workflow execution using the
-- StartWorkflowExecution action or the @StartChildWorkflowExecution@
-- decision.
--
-- 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/.
--
-- 'defaultExecutionStartToCloseTimeout', 'workflowTypeConfiguration_defaultExecutionStartToCloseTimeout' - The default maximum duration, specified when registering the workflow
-- type, for executions of this workflow type. This default can be
-- overridden when starting a workflow execution using the
-- StartWorkflowExecution action or the @StartChildWorkflowExecution@
-- Decision.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- 'defaultTaskStartToCloseTimeout', 'workflowTypeConfiguration_defaultTaskStartToCloseTimeout' - The default maximum duration, specified when registering the workflow
-- type, that a decision task for executions of this workflow type might
-- take before returning completion or failure. If the task doesn\'tdo
-- close in the specified time then the task is automatically timed out and
-- rescheduled. If the decider eventually reports a completion or failure,
-- it is ignored. This default can be overridden when starting a workflow
-- execution using the StartWorkflowExecution action or the
-- @StartChildWorkflowExecution@ Decision.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
newWorkflowTypeConfiguration ::
  WorkflowTypeConfiguration
newWorkflowTypeConfiguration :: WorkflowTypeConfiguration
newWorkflowTypeConfiguration =
  WorkflowTypeConfiguration' :: Maybe Text
-> Maybe ChildPolicy
-> Maybe TaskList
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WorkflowTypeConfiguration
WorkflowTypeConfiguration'
    { $sel:defaultLambdaRole:WorkflowTypeConfiguration' :: Maybe Text
defaultLambdaRole =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultChildPolicy:WorkflowTypeConfiguration' :: Maybe ChildPolicy
defaultChildPolicy = Maybe ChildPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultTaskList:WorkflowTypeConfiguration' :: Maybe TaskList
defaultTaskList = Maybe TaskList
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultTaskPriority:WorkflowTypeConfiguration' :: Maybe Text
defaultTaskPriority = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultExecutionStartToCloseTimeout:WorkflowTypeConfiguration' :: Maybe Text
defaultExecutionStartToCloseTimeout =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultTaskStartToCloseTimeout:WorkflowTypeConfiguration' :: Maybe Text
defaultTaskStartToCloseTimeout = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The default IAM role attached to this workflow type.
--
-- Executions of this workflow type need IAM roles to invoke Lambda
-- functions. If you don\'t specify an IAM role when starting this workflow
-- type, the default Lambda role is attached to the execution. For more
-- information, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html>
-- in the /Amazon SWF Developer Guide/.
workflowTypeConfiguration_defaultLambdaRole :: Lens.Lens' WorkflowTypeConfiguration (Prelude.Maybe Prelude.Text)
workflowTypeConfiguration_defaultLambdaRole :: (Maybe Text -> f (Maybe Text))
-> WorkflowTypeConfiguration -> f WorkflowTypeConfiguration
workflowTypeConfiguration_defaultLambdaRole = (WorkflowTypeConfiguration -> Maybe Text)
-> (WorkflowTypeConfiguration
    -> Maybe Text -> WorkflowTypeConfiguration)
-> Lens
     WorkflowTypeConfiguration
     WorkflowTypeConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowTypeConfiguration' {Maybe Text
defaultLambdaRole :: Maybe Text
$sel:defaultLambdaRole:WorkflowTypeConfiguration' :: WorkflowTypeConfiguration -> Maybe Text
defaultLambdaRole} -> Maybe Text
defaultLambdaRole) (\s :: WorkflowTypeConfiguration
s@WorkflowTypeConfiguration' {} Maybe Text
a -> WorkflowTypeConfiguration
s {$sel:defaultLambdaRole:WorkflowTypeConfiguration' :: Maybe Text
defaultLambdaRole = Maybe Text
a} :: WorkflowTypeConfiguration)

-- | The default policy to use for the child workflow executions when a
-- workflow execution of this type is terminated, by calling the
-- TerminateWorkflowExecution action explicitly or due to an expired
-- timeout. This default can be overridden when starting a workflow
-- execution using the StartWorkflowExecution action or the
-- @StartChildWorkflowExecution@ Decision.
--
-- The supported child policies are:
--
-- -   @TERMINATE@ – The child executions 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.
workflowTypeConfiguration_defaultChildPolicy :: Lens.Lens' WorkflowTypeConfiguration (Prelude.Maybe ChildPolicy)
workflowTypeConfiguration_defaultChildPolicy :: (Maybe ChildPolicy -> f (Maybe ChildPolicy))
-> WorkflowTypeConfiguration -> f WorkflowTypeConfiguration
workflowTypeConfiguration_defaultChildPolicy = (WorkflowTypeConfiguration -> Maybe ChildPolicy)
-> (WorkflowTypeConfiguration
    -> Maybe ChildPolicy -> WorkflowTypeConfiguration)
-> Lens
     WorkflowTypeConfiguration
     WorkflowTypeConfiguration
     (Maybe ChildPolicy)
     (Maybe ChildPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowTypeConfiguration' {Maybe ChildPolicy
defaultChildPolicy :: Maybe ChildPolicy
$sel:defaultChildPolicy:WorkflowTypeConfiguration' :: WorkflowTypeConfiguration -> Maybe ChildPolicy
defaultChildPolicy} -> Maybe ChildPolicy
defaultChildPolicy) (\s :: WorkflowTypeConfiguration
s@WorkflowTypeConfiguration' {} Maybe ChildPolicy
a -> WorkflowTypeConfiguration
s {$sel:defaultChildPolicy:WorkflowTypeConfiguration' :: Maybe ChildPolicy
defaultChildPolicy = Maybe ChildPolicy
a} :: WorkflowTypeConfiguration)

-- | The default task list, specified when registering the workflow type, for
-- decisions tasks scheduled for workflow executions of this type. This
-- default can be overridden when starting a workflow execution using the
-- StartWorkflowExecution action or the @StartChildWorkflowExecution@
-- Decision.
workflowTypeConfiguration_defaultTaskList :: Lens.Lens' WorkflowTypeConfiguration (Prelude.Maybe TaskList)
workflowTypeConfiguration_defaultTaskList :: (Maybe TaskList -> f (Maybe TaskList))
-> WorkflowTypeConfiguration -> f WorkflowTypeConfiguration
workflowTypeConfiguration_defaultTaskList = (WorkflowTypeConfiguration -> Maybe TaskList)
-> (WorkflowTypeConfiguration
    -> Maybe TaskList -> WorkflowTypeConfiguration)
-> Lens
     WorkflowTypeConfiguration
     WorkflowTypeConfiguration
     (Maybe TaskList)
     (Maybe TaskList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowTypeConfiguration' {Maybe TaskList
defaultTaskList :: Maybe TaskList
$sel:defaultTaskList:WorkflowTypeConfiguration' :: WorkflowTypeConfiguration -> Maybe TaskList
defaultTaskList} -> Maybe TaskList
defaultTaskList) (\s :: WorkflowTypeConfiguration
s@WorkflowTypeConfiguration' {} Maybe TaskList
a -> WorkflowTypeConfiguration
s {$sel:defaultTaskList:WorkflowTypeConfiguration' :: Maybe TaskList
defaultTaskList = Maybe TaskList
a} :: WorkflowTypeConfiguration)

-- | The default task priority, specified when registering the workflow type,
-- for all decision tasks of this workflow type. This default can be
-- overridden when starting a workflow execution using the
-- StartWorkflowExecution action or the @StartChildWorkflowExecution@
-- decision.
--
-- 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/.
workflowTypeConfiguration_defaultTaskPriority :: Lens.Lens' WorkflowTypeConfiguration (Prelude.Maybe Prelude.Text)
workflowTypeConfiguration_defaultTaskPriority :: (Maybe Text -> f (Maybe Text))
-> WorkflowTypeConfiguration -> f WorkflowTypeConfiguration
workflowTypeConfiguration_defaultTaskPriority = (WorkflowTypeConfiguration -> Maybe Text)
-> (WorkflowTypeConfiguration
    -> Maybe Text -> WorkflowTypeConfiguration)
-> Lens
     WorkflowTypeConfiguration
     WorkflowTypeConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowTypeConfiguration' {Maybe Text
defaultTaskPriority :: Maybe Text
$sel:defaultTaskPriority:WorkflowTypeConfiguration' :: WorkflowTypeConfiguration -> Maybe Text
defaultTaskPriority} -> Maybe Text
defaultTaskPriority) (\s :: WorkflowTypeConfiguration
s@WorkflowTypeConfiguration' {} Maybe Text
a -> WorkflowTypeConfiguration
s {$sel:defaultTaskPriority:WorkflowTypeConfiguration' :: Maybe Text
defaultTaskPriority = Maybe Text
a} :: WorkflowTypeConfiguration)

-- | The default maximum duration, specified when registering the workflow
-- type, for executions of this workflow type. This default can be
-- overridden when starting a workflow execution using the
-- StartWorkflowExecution action or the @StartChildWorkflowExecution@
-- Decision.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
workflowTypeConfiguration_defaultExecutionStartToCloseTimeout :: Lens.Lens' WorkflowTypeConfiguration (Prelude.Maybe Prelude.Text)
workflowTypeConfiguration_defaultExecutionStartToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> WorkflowTypeConfiguration -> f WorkflowTypeConfiguration
workflowTypeConfiguration_defaultExecutionStartToCloseTimeout = (WorkflowTypeConfiguration -> Maybe Text)
-> (WorkflowTypeConfiguration
    -> Maybe Text -> WorkflowTypeConfiguration)
-> Lens
     WorkflowTypeConfiguration
     WorkflowTypeConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowTypeConfiguration' {Maybe Text
defaultExecutionStartToCloseTimeout :: Maybe Text
$sel:defaultExecutionStartToCloseTimeout:WorkflowTypeConfiguration' :: WorkflowTypeConfiguration -> Maybe Text
defaultExecutionStartToCloseTimeout} -> Maybe Text
defaultExecutionStartToCloseTimeout) (\s :: WorkflowTypeConfiguration
s@WorkflowTypeConfiguration' {} Maybe Text
a -> WorkflowTypeConfiguration
s {$sel:defaultExecutionStartToCloseTimeout:WorkflowTypeConfiguration' :: Maybe Text
defaultExecutionStartToCloseTimeout = Maybe Text
a} :: WorkflowTypeConfiguration)

-- | The default maximum duration, specified when registering the workflow
-- type, that a decision task for executions of this workflow type might
-- take before returning completion or failure. If the task doesn\'tdo
-- close in the specified time then the task is automatically timed out and
-- rescheduled. If the decider eventually reports a completion or failure,
-- it is ignored. This default can be overridden when starting a workflow
-- execution using the StartWorkflowExecution action or the
-- @StartChildWorkflowExecution@ Decision.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
workflowTypeConfiguration_defaultTaskStartToCloseTimeout :: Lens.Lens' WorkflowTypeConfiguration (Prelude.Maybe Prelude.Text)
workflowTypeConfiguration_defaultTaskStartToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> WorkflowTypeConfiguration -> f WorkflowTypeConfiguration
workflowTypeConfiguration_defaultTaskStartToCloseTimeout = (WorkflowTypeConfiguration -> Maybe Text)
-> (WorkflowTypeConfiguration
    -> Maybe Text -> WorkflowTypeConfiguration)
-> Lens
     WorkflowTypeConfiguration
     WorkflowTypeConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowTypeConfiguration' {Maybe Text
defaultTaskStartToCloseTimeout :: Maybe Text
$sel:defaultTaskStartToCloseTimeout:WorkflowTypeConfiguration' :: WorkflowTypeConfiguration -> Maybe Text
defaultTaskStartToCloseTimeout} -> Maybe Text
defaultTaskStartToCloseTimeout) (\s :: WorkflowTypeConfiguration
s@WorkflowTypeConfiguration' {} Maybe Text
a -> WorkflowTypeConfiguration
s {$sel:defaultTaskStartToCloseTimeout:WorkflowTypeConfiguration' :: Maybe Text
defaultTaskStartToCloseTimeout = Maybe Text
a} :: WorkflowTypeConfiguration)

instance Core.FromJSON WorkflowTypeConfiguration where
  parseJSON :: Value -> Parser WorkflowTypeConfiguration
parseJSON =
    String
-> (Object -> Parser WorkflowTypeConfiguration)
-> Value
-> Parser WorkflowTypeConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"WorkflowTypeConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe ChildPolicy
-> Maybe TaskList
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WorkflowTypeConfiguration
WorkflowTypeConfiguration'
            (Maybe Text
 -> Maybe ChildPolicy
 -> Maybe TaskList
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> WorkflowTypeConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe ChildPolicy
      -> Maybe TaskList
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkflowTypeConfiguration)
forall (f :: * -> *) a b. Functor 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
"defaultLambdaRole")
            Parser
  (Maybe ChildPolicy
   -> Maybe TaskList
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkflowTypeConfiguration)
-> Parser (Maybe ChildPolicy)
-> Parser
     (Maybe TaskList
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> WorkflowTypeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChildPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"defaultChildPolicy")
            Parser
  (Maybe TaskList
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> WorkflowTypeConfiguration)
-> Parser (Maybe TaskList)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> WorkflowTypeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TaskList)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"defaultTaskList")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> WorkflowTypeConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> WorkflowTypeConfiguration)
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
"defaultTaskPriority")
            Parser (Maybe Text -> Maybe Text -> WorkflowTypeConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> WorkflowTypeConfiguration)
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
"defaultExecutionStartToCloseTimeout")
            Parser (Maybe Text -> WorkflowTypeConfiguration)
-> Parser (Maybe Text) -> Parser WorkflowTypeConfiguration
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
"defaultTaskStartToCloseTimeout")
      )

instance Prelude.Hashable WorkflowTypeConfiguration

instance Prelude.NFData WorkflowTypeConfiguration