{-# 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 #-}
module Amazonka.SWF.Types.WorkflowExecutionConfiguration 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
data WorkflowExecutionConfiguration = WorkflowExecutionConfiguration'
{
WorkflowExecutionConfiguration -> Maybe Text
lambdaRole :: Prelude.Maybe Prelude.Text,
WorkflowExecutionConfiguration -> Maybe Text
taskPriority :: Prelude.Maybe Prelude.Text,
WorkflowExecutionConfiguration -> Text
taskStartToCloseTimeout :: Prelude.Text,
WorkflowExecutionConfiguration -> Text
executionStartToCloseTimeout :: Prelude.Text,
WorkflowExecutionConfiguration -> TaskList
taskList :: TaskList,
WorkflowExecutionConfiguration -> ChildPolicy
childPolicy :: ChildPolicy
}
deriving (WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool
(WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool)
-> (WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool)
-> Eq WorkflowExecutionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool
$c/= :: WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool
== :: WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool
$c== :: WorkflowExecutionConfiguration
-> WorkflowExecutionConfiguration -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionConfiguration]
ReadPrec WorkflowExecutionConfiguration
Int -> ReadS WorkflowExecutionConfiguration
ReadS [WorkflowExecutionConfiguration]
(Int -> ReadS WorkflowExecutionConfiguration)
-> ReadS [WorkflowExecutionConfiguration]
-> ReadPrec WorkflowExecutionConfiguration
-> ReadPrec [WorkflowExecutionConfiguration]
-> Read WorkflowExecutionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionConfiguration]
$creadListPrec :: ReadPrec [WorkflowExecutionConfiguration]
readPrec :: ReadPrec WorkflowExecutionConfiguration
$creadPrec :: ReadPrec WorkflowExecutionConfiguration
readList :: ReadS [WorkflowExecutionConfiguration]
$creadList :: ReadS [WorkflowExecutionConfiguration]
readsPrec :: Int -> ReadS WorkflowExecutionConfiguration
$creadsPrec :: Int -> ReadS WorkflowExecutionConfiguration
Prelude.Read, Int -> WorkflowExecutionConfiguration -> ShowS
[WorkflowExecutionConfiguration] -> ShowS
WorkflowExecutionConfiguration -> String
(Int -> WorkflowExecutionConfiguration -> ShowS)
-> (WorkflowExecutionConfiguration -> String)
-> ([WorkflowExecutionConfiguration] -> ShowS)
-> Show WorkflowExecutionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionConfiguration] -> ShowS
$cshowList :: [WorkflowExecutionConfiguration] -> ShowS
show :: WorkflowExecutionConfiguration -> String
$cshow :: WorkflowExecutionConfiguration -> String
showsPrec :: Int -> WorkflowExecutionConfiguration -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionConfiguration -> ShowS
Prelude.Show, (forall x.
WorkflowExecutionConfiguration
-> Rep WorkflowExecutionConfiguration x)
-> (forall x.
Rep WorkflowExecutionConfiguration x
-> WorkflowExecutionConfiguration)
-> Generic WorkflowExecutionConfiguration
forall x.
Rep WorkflowExecutionConfiguration x
-> WorkflowExecutionConfiguration
forall x.
WorkflowExecutionConfiguration
-> Rep WorkflowExecutionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowExecutionConfiguration x
-> WorkflowExecutionConfiguration
$cfrom :: forall x.
WorkflowExecutionConfiguration
-> Rep WorkflowExecutionConfiguration x
Prelude.Generic)
newWorkflowExecutionConfiguration ::
Prelude.Text ->
Prelude.Text ->
TaskList ->
ChildPolicy ->
WorkflowExecutionConfiguration
newWorkflowExecutionConfiguration :: Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration
newWorkflowExecutionConfiguration
Text
pTaskStartToCloseTimeout_
Text
pExecutionStartToCloseTimeout_
TaskList
pTaskList_
ChildPolicy
pChildPolicy_ =
WorkflowExecutionConfiguration' :: Maybe Text
-> Maybe Text
-> Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration
WorkflowExecutionConfiguration'
{ $sel:lambdaRole:WorkflowExecutionConfiguration' :: Maybe Text
lambdaRole =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskPriority:WorkflowExecutionConfiguration' :: Maybe Text
taskPriority = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskStartToCloseTimeout:WorkflowExecutionConfiguration' :: Text
taskStartToCloseTimeout =
Text
pTaskStartToCloseTimeout_,
$sel:executionStartToCloseTimeout:WorkflowExecutionConfiguration' :: Text
executionStartToCloseTimeout =
Text
pExecutionStartToCloseTimeout_,
$sel:taskList:WorkflowExecutionConfiguration' :: TaskList
taskList = TaskList
pTaskList_,
$sel:childPolicy:WorkflowExecutionConfiguration' :: ChildPolicy
childPolicy = ChildPolicy
pChildPolicy_
}
workflowExecutionConfiguration_lambdaRole :: Lens.Lens' WorkflowExecutionConfiguration (Prelude.Maybe Prelude.Text)
workflowExecutionConfiguration_lambdaRole :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionConfiguration
-> f WorkflowExecutionConfiguration
workflowExecutionConfiguration_lambdaRole = (WorkflowExecutionConfiguration -> Maybe Text)
-> (WorkflowExecutionConfiguration
-> Maybe Text -> WorkflowExecutionConfiguration)
-> Lens
WorkflowExecutionConfiguration
WorkflowExecutionConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionConfiguration' {Maybe Text
lambdaRole :: Maybe Text
$sel:lambdaRole:WorkflowExecutionConfiguration' :: WorkflowExecutionConfiguration -> Maybe Text
lambdaRole} -> Maybe Text
lambdaRole) (\s :: WorkflowExecutionConfiguration
s@WorkflowExecutionConfiguration' {} Maybe Text
a -> WorkflowExecutionConfiguration
s {$sel:lambdaRole:WorkflowExecutionConfiguration' :: Maybe Text
lambdaRole = Maybe Text
a} :: WorkflowExecutionConfiguration)
workflowExecutionConfiguration_taskPriority :: Lens.Lens' WorkflowExecutionConfiguration (Prelude.Maybe Prelude.Text)
workflowExecutionConfiguration_taskPriority :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionConfiguration
-> f WorkflowExecutionConfiguration
workflowExecutionConfiguration_taskPriority = (WorkflowExecutionConfiguration -> Maybe Text)
-> (WorkflowExecutionConfiguration
-> Maybe Text -> WorkflowExecutionConfiguration)
-> Lens
WorkflowExecutionConfiguration
WorkflowExecutionConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionConfiguration' {Maybe Text
taskPriority :: Maybe Text
$sel:taskPriority:WorkflowExecutionConfiguration' :: WorkflowExecutionConfiguration -> Maybe Text
taskPriority} -> Maybe Text
taskPriority) (\s :: WorkflowExecutionConfiguration
s@WorkflowExecutionConfiguration' {} Maybe Text
a -> WorkflowExecutionConfiguration
s {$sel:taskPriority:WorkflowExecutionConfiguration' :: Maybe Text
taskPriority = Maybe Text
a} :: WorkflowExecutionConfiguration)
workflowExecutionConfiguration_taskStartToCloseTimeout :: Lens.Lens' WorkflowExecutionConfiguration Prelude.Text
workflowExecutionConfiguration_taskStartToCloseTimeout :: (Text -> f Text)
-> WorkflowExecutionConfiguration
-> f WorkflowExecutionConfiguration
workflowExecutionConfiguration_taskStartToCloseTimeout = (WorkflowExecutionConfiguration -> Text)
-> (WorkflowExecutionConfiguration
-> Text -> WorkflowExecutionConfiguration)
-> Lens
WorkflowExecutionConfiguration
WorkflowExecutionConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionConfiguration' {Text
taskStartToCloseTimeout :: Text
$sel:taskStartToCloseTimeout:WorkflowExecutionConfiguration' :: WorkflowExecutionConfiguration -> Text
taskStartToCloseTimeout} -> Text
taskStartToCloseTimeout) (\s :: WorkflowExecutionConfiguration
s@WorkflowExecutionConfiguration' {} Text
a -> WorkflowExecutionConfiguration
s {$sel:taskStartToCloseTimeout:WorkflowExecutionConfiguration' :: Text
taskStartToCloseTimeout = Text
a} :: WorkflowExecutionConfiguration)
workflowExecutionConfiguration_executionStartToCloseTimeout :: Lens.Lens' WorkflowExecutionConfiguration Prelude.Text
workflowExecutionConfiguration_executionStartToCloseTimeout :: (Text -> f Text)
-> WorkflowExecutionConfiguration
-> f WorkflowExecutionConfiguration
workflowExecutionConfiguration_executionStartToCloseTimeout = (WorkflowExecutionConfiguration -> Text)
-> (WorkflowExecutionConfiguration
-> Text -> WorkflowExecutionConfiguration)
-> Lens
WorkflowExecutionConfiguration
WorkflowExecutionConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionConfiguration' {Text
executionStartToCloseTimeout :: Text
$sel:executionStartToCloseTimeout:WorkflowExecutionConfiguration' :: WorkflowExecutionConfiguration -> Text
executionStartToCloseTimeout} -> Text
executionStartToCloseTimeout) (\s :: WorkflowExecutionConfiguration
s@WorkflowExecutionConfiguration' {} Text
a -> WorkflowExecutionConfiguration
s {$sel:executionStartToCloseTimeout:WorkflowExecutionConfiguration' :: Text
executionStartToCloseTimeout = Text
a} :: WorkflowExecutionConfiguration)
workflowExecutionConfiguration_taskList :: Lens.Lens' WorkflowExecutionConfiguration TaskList
workflowExecutionConfiguration_taskList :: (TaskList -> f TaskList)
-> WorkflowExecutionConfiguration
-> f WorkflowExecutionConfiguration
workflowExecutionConfiguration_taskList = (WorkflowExecutionConfiguration -> TaskList)
-> (WorkflowExecutionConfiguration
-> TaskList -> WorkflowExecutionConfiguration)
-> Lens
WorkflowExecutionConfiguration
WorkflowExecutionConfiguration
TaskList
TaskList
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionConfiguration' {TaskList
taskList :: TaskList
$sel:taskList:WorkflowExecutionConfiguration' :: WorkflowExecutionConfiguration -> TaskList
taskList} -> TaskList
taskList) (\s :: WorkflowExecutionConfiguration
s@WorkflowExecutionConfiguration' {} TaskList
a -> WorkflowExecutionConfiguration
s {$sel:taskList:WorkflowExecutionConfiguration' :: TaskList
taskList = TaskList
a} :: WorkflowExecutionConfiguration)
workflowExecutionConfiguration_childPolicy :: Lens.Lens' WorkflowExecutionConfiguration ChildPolicy
workflowExecutionConfiguration_childPolicy :: (ChildPolicy -> f ChildPolicy)
-> WorkflowExecutionConfiguration
-> f WorkflowExecutionConfiguration
workflowExecutionConfiguration_childPolicy = (WorkflowExecutionConfiguration -> ChildPolicy)
-> (WorkflowExecutionConfiguration
-> ChildPolicy -> WorkflowExecutionConfiguration)
-> Lens
WorkflowExecutionConfiguration
WorkflowExecutionConfiguration
ChildPolicy
ChildPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionConfiguration' {ChildPolicy
childPolicy :: ChildPolicy
$sel:childPolicy:WorkflowExecutionConfiguration' :: WorkflowExecutionConfiguration -> ChildPolicy
childPolicy} -> ChildPolicy
childPolicy) (\s :: WorkflowExecutionConfiguration
s@WorkflowExecutionConfiguration' {} ChildPolicy
a -> WorkflowExecutionConfiguration
s {$sel:childPolicy:WorkflowExecutionConfiguration' :: ChildPolicy
childPolicy = ChildPolicy
a} :: WorkflowExecutionConfiguration)
instance Core.FromJSON WorkflowExecutionConfiguration where
parseJSON :: Value -> Parser WorkflowExecutionConfiguration
parseJSON =
String
-> (Object -> Parser WorkflowExecutionConfiguration)
-> Value
-> Parser WorkflowExecutionConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionConfiguration"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration
WorkflowExecutionConfiguration'
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration)
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
"lambdaRole")
Parser
(Maybe Text
-> Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration)
-> Parser (Maybe Text)
-> Parser
(Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskPriority")
Parser
(Text
-> Text
-> TaskList
-> ChildPolicy
-> WorkflowExecutionConfiguration)
-> Parser Text
-> Parser
(Text -> TaskList -> ChildPolicy -> WorkflowExecutionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"taskStartToCloseTimeout")
Parser
(Text -> TaskList -> ChildPolicy -> WorkflowExecutionConfiguration)
-> Parser Text
-> Parser
(TaskList -> ChildPolicy -> WorkflowExecutionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"executionStartToCloseTimeout")
Parser (TaskList -> ChildPolicy -> WorkflowExecutionConfiguration)
-> Parser TaskList
-> Parser (ChildPolicy -> WorkflowExecutionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TaskList
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"taskList")
Parser (ChildPolicy -> WorkflowExecutionConfiguration)
-> Parser ChildPolicy -> Parser WorkflowExecutionConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ChildPolicy
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"childPolicy")
)
instance
Prelude.Hashable
WorkflowExecutionConfiguration
instance
Prelude.NFData
WorkflowExecutionConfiguration