{-# 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.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
data WorkflowTypeConfiguration = WorkflowTypeConfiguration'
{
WorkflowTypeConfiguration -> Maybe Text
defaultLambdaRole :: Prelude.Maybe Prelude.Text,
WorkflowTypeConfiguration -> Maybe ChildPolicy
defaultChildPolicy :: Prelude.Maybe ChildPolicy,
WorkflowTypeConfiguration -> Maybe TaskList
defaultTaskList :: Prelude.Maybe TaskList,
WorkflowTypeConfiguration -> Maybe Text
defaultTaskPriority :: Prelude.Maybe Prelude.Text,
WorkflowTypeConfiguration -> Maybe Text
defaultExecutionStartToCloseTimeout :: Prelude.Maybe Prelude.Text,
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)
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
}
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)
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)
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)
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)
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)
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