{-# 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.DecisionTaskScheduledEventAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.TaskList
data DecisionTaskScheduledEventAttributes = DecisionTaskScheduledEventAttributes'
{
DecisionTaskScheduledEventAttributes -> Maybe Text
taskPriority :: Prelude.Maybe Prelude.Text,
DecisionTaskScheduledEventAttributes -> Maybe Text
startToCloseTimeout :: Prelude.Maybe Prelude.Text,
DecisionTaskScheduledEventAttributes -> TaskList
taskList :: TaskList
}
deriving (DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool
(DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool)
-> (DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool)
-> Eq DecisionTaskScheduledEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool
$c/= :: DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool
== :: DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool
$c== :: DecisionTaskScheduledEventAttributes
-> DecisionTaskScheduledEventAttributes -> Bool
Prelude.Eq, ReadPrec [DecisionTaskScheduledEventAttributes]
ReadPrec DecisionTaskScheduledEventAttributes
Int -> ReadS DecisionTaskScheduledEventAttributes
ReadS [DecisionTaskScheduledEventAttributes]
(Int -> ReadS DecisionTaskScheduledEventAttributes)
-> ReadS [DecisionTaskScheduledEventAttributes]
-> ReadPrec DecisionTaskScheduledEventAttributes
-> ReadPrec [DecisionTaskScheduledEventAttributes]
-> Read DecisionTaskScheduledEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DecisionTaskScheduledEventAttributes]
$creadListPrec :: ReadPrec [DecisionTaskScheduledEventAttributes]
readPrec :: ReadPrec DecisionTaskScheduledEventAttributes
$creadPrec :: ReadPrec DecisionTaskScheduledEventAttributes
readList :: ReadS [DecisionTaskScheduledEventAttributes]
$creadList :: ReadS [DecisionTaskScheduledEventAttributes]
readsPrec :: Int -> ReadS DecisionTaskScheduledEventAttributes
$creadsPrec :: Int -> ReadS DecisionTaskScheduledEventAttributes
Prelude.Read, Int -> DecisionTaskScheduledEventAttributes -> ShowS
[DecisionTaskScheduledEventAttributes] -> ShowS
DecisionTaskScheduledEventAttributes -> String
(Int -> DecisionTaskScheduledEventAttributes -> ShowS)
-> (DecisionTaskScheduledEventAttributes -> String)
-> ([DecisionTaskScheduledEventAttributes] -> ShowS)
-> Show DecisionTaskScheduledEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DecisionTaskScheduledEventAttributes] -> ShowS
$cshowList :: [DecisionTaskScheduledEventAttributes] -> ShowS
show :: DecisionTaskScheduledEventAttributes -> String
$cshow :: DecisionTaskScheduledEventAttributes -> String
showsPrec :: Int -> DecisionTaskScheduledEventAttributes -> ShowS
$cshowsPrec :: Int -> DecisionTaskScheduledEventAttributes -> ShowS
Prelude.Show, (forall x.
DecisionTaskScheduledEventAttributes
-> Rep DecisionTaskScheduledEventAttributes x)
-> (forall x.
Rep DecisionTaskScheduledEventAttributes x
-> DecisionTaskScheduledEventAttributes)
-> Generic DecisionTaskScheduledEventAttributes
forall x.
Rep DecisionTaskScheduledEventAttributes x
-> DecisionTaskScheduledEventAttributes
forall x.
DecisionTaskScheduledEventAttributes
-> Rep DecisionTaskScheduledEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DecisionTaskScheduledEventAttributes x
-> DecisionTaskScheduledEventAttributes
$cfrom :: forall x.
DecisionTaskScheduledEventAttributes
-> Rep DecisionTaskScheduledEventAttributes x
Prelude.Generic)
newDecisionTaskScheduledEventAttributes ::
TaskList ->
DecisionTaskScheduledEventAttributes
newDecisionTaskScheduledEventAttributes :: TaskList -> DecisionTaskScheduledEventAttributes
newDecisionTaskScheduledEventAttributes TaskList
pTaskList_ =
DecisionTaskScheduledEventAttributes' :: Maybe Text
-> Maybe Text -> TaskList -> DecisionTaskScheduledEventAttributes
DecisionTaskScheduledEventAttributes'
{ $sel:taskPriority:DecisionTaskScheduledEventAttributes' :: Maybe Text
taskPriority =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startToCloseTimeout:DecisionTaskScheduledEventAttributes' :: Maybe Text
startToCloseTimeout = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskList:DecisionTaskScheduledEventAttributes' :: TaskList
taskList = TaskList
pTaskList_
}
decisionTaskScheduledEventAttributes_taskPriority :: Lens.Lens' DecisionTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
decisionTaskScheduledEventAttributes_taskPriority :: (Maybe Text -> f (Maybe Text))
-> DecisionTaskScheduledEventAttributes
-> f DecisionTaskScheduledEventAttributes
decisionTaskScheduledEventAttributes_taskPriority = (DecisionTaskScheduledEventAttributes -> Maybe Text)
-> (DecisionTaskScheduledEventAttributes
-> Maybe Text -> DecisionTaskScheduledEventAttributes)
-> Lens
DecisionTaskScheduledEventAttributes
DecisionTaskScheduledEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DecisionTaskScheduledEventAttributes' {Maybe Text
taskPriority :: Maybe Text
$sel:taskPriority:DecisionTaskScheduledEventAttributes' :: DecisionTaskScheduledEventAttributes -> Maybe Text
taskPriority} -> Maybe Text
taskPriority) (\s :: DecisionTaskScheduledEventAttributes
s@DecisionTaskScheduledEventAttributes' {} Maybe Text
a -> DecisionTaskScheduledEventAttributes
s {$sel:taskPriority:DecisionTaskScheduledEventAttributes' :: Maybe Text
taskPriority = Maybe Text
a} :: DecisionTaskScheduledEventAttributes)
decisionTaskScheduledEventAttributes_startToCloseTimeout :: Lens.Lens' DecisionTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
decisionTaskScheduledEventAttributes_startToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> DecisionTaskScheduledEventAttributes
-> f DecisionTaskScheduledEventAttributes
decisionTaskScheduledEventAttributes_startToCloseTimeout = (DecisionTaskScheduledEventAttributes -> Maybe Text)
-> (DecisionTaskScheduledEventAttributes
-> Maybe Text -> DecisionTaskScheduledEventAttributes)
-> Lens
DecisionTaskScheduledEventAttributes
DecisionTaskScheduledEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DecisionTaskScheduledEventAttributes' {Maybe Text
startToCloseTimeout :: Maybe Text
$sel:startToCloseTimeout:DecisionTaskScheduledEventAttributes' :: DecisionTaskScheduledEventAttributes -> Maybe Text
startToCloseTimeout} -> Maybe Text
startToCloseTimeout) (\s :: DecisionTaskScheduledEventAttributes
s@DecisionTaskScheduledEventAttributes' {} Maybe Text
a -> DecisionTaskScheduledEventAttributes
s {$sel:startToCloseTimeout:DecisionTaskScheduledEventAttributes' :: Maybe Text
startToCloseTimeout = Maybe Text
a} :: DecisionTaskScheduledEventAttributes)
decisionTaskScheduledEventAttributes_taskList :: Lens.Lens' DecisionTaskScheduledEventAttributes TaskList
decisionTaskScheduledEventAttributes_taskList :: (TaskList -> f TaskList)
-> DecisionTaskScheduledEventAttributes
-> f DecisionTaskScheduledEventAttributes
decisionTaskScheduledEventAttributes_taskList = (DecisionTaskScheduledEventAttributes -> TaskList)
-> (DecisionTaskScheduledEventAttributes
-> TaskList -> DecisionTaskScheduledEventAttributes)
-> Lens
DecisionTaskScheduledEventAttributes
DecisionTaskScheduledEventAttributes
TaskList
TaskList
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DecisionTaskScheduledEventAttributes' {TaskList
taskList :: TaskList
$sel:taskList:DecisionTaskScheduledEventAttributes' :: DecisionTaskScheduledEventAttributes -> TaskList
taskList} -> TaskList
taskList) (\s :: DecisionTaskScheduledEventAttributes
s@DecisionTaskScheduledEventAttributes' {} TaskList
a -> DecisionTaskScheduledEventAttributes
s {$sel:taskList:DecisionTaskScheduledEventAttributes' :: TaskList
taskList = TaskList
a} :: DecisionTaskScheduledEventAttributes)
instance
Core.FromJSON
DecisionTaskScheduledEventAttributes
where
parseJSON :: Value -> Parser DecisionTaskScheduledEventAttributes
parseJSON =
String
-> (Object -> Parser DecisionTaskScheduledEventAttributes)
-> Value
-> Parser DecisionTaskScheduledEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DecisionTaskScheduledEventAttributes"
( \Object
x ->
Maybe Text
-> Maybe Text -> TaskList -> DecisionTaskScheduledEventAttributes
DecisionTaskScheduledEventAttributes'
(Maybe Text
-> Maybe Text -> TaskList -> DecisionTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> TaskList -> DecisionTaskScheduledEventAttributes)
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
"taskPriority")
Parser
(Maybe Text -> TaskList -> DecisionTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser (TaskList -> DecisionTaskScheduledEventAttributes)
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
"startToCloseTimeout")
Parser (TaskList -> DecisionTaskScheduledEventAttributes)
-> Parser TaskList -> Parser DecisionTaskScheduledEventAttributes
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")
)
instance
Prelude.Hashable
DecisionTaskScheduledEventAttributes
instance
Prelude.NFData
DecisionTaskScheduledEventAttributes