{-# 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.TimerStartedEventAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TimerStartedEventAttributes = TimerStartedEventAttributes'
{
TimerStartedEventAttributes -> Maybe Text
control :: Prelude.Maybe Prelude.Text,
TimerStartedEventAttributes -> Text
timerId :: Prelude.Text,
TimerStartedEventAttributes -> Text
startToFireTimeout :: Prelude.Text,
TimerStartedEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer
}
deriving (TimerStartedEventAttributes -> TimerStartedEventAttributes -> Bool
(TimerStartedEventAttributes
-> TimerStartedEventAttributes -> Bool)
-> (TimerStartedEventAttributes
-> TimerStartedEventAttributes -> Bool)
-> Eq TimerStartedEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimerStartedEventAttributes -> TimerStartedEventAttributes -> Bool
$c/= :: TimerStartedEventAttributes -> TimerStartedEventAttributes -> Bool
== :: TimerStartedEventAttributes -> TimerStartedEventAttributes -> Bool
$c== :: TimerStartedEventAttributes -> TimerStartedEventAttributes -> Bool
Prelude.Eq, ReadPrec [TimerStartedEventAttributes]
ReadPrec TimerStartedEventAttributes
Int -> ReadS TimerStartedEventAttributes
ReadS [TimerStartedEventAttributes]
(Int -> ReadS TimerStartedEventAttributes)
-> ReadS [TimerStartedEventAttributes]
-> ReadPrec TimerStartedEventAttributes
-> ReadPrec [TimerStartedEventAttributes]
-> Read TimerStartedEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimerStartedEventAttributes]
$creadListPrec :: ReadPrec [TimerStartedEventAttributes]
readPrec :: ReadPrec TimerStartedEventAttributes
$creadPrec :: ReadPrec TimerStartedEventAttributes
readList :: ReadS [TimerStartedEventAttributes]
$creadList :: ReadS [TimerStartedEventAttributes]
readsPrec :: Int -> ReadS TimerStartedEventAttributes
$creadsPrec :: Int -> ReadS TimerStartedEventAttributes
Prelude.Read, Int -> TimerStartedEventAttributes -> ShowS
[TimerStartedEventAttributes] -> ShowS
TimerStartedEventAttributes -> String
(Int -> TimerStartedEventAttributes -> ShowS)
-> (TimerStartedEventAttributes -> String)
-> ([TimerStartedEventAttributes] -> ShowS)
-> Show TimerStartedEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimerStartedEventAttributes] -> ShowS
$cshowList :: [TimerStartedEventAttributes] -> ShowS
show :: TimerStartedEventAttributes -> String
$cshow :: TimerStartedEventAttributes -> String
showsPrec :: Int -> TimerStartedEventAttributes -> ShowS
$cshowsPrec :: Int -> TimerStartedEventAttributes -> ShowS
Prelude.Show, (forall x.
TimerStartedEventAttributes -> Rep TimerStartedEventAttributes x)
-> (forall x.
Rep TimerStartedEventAttributes x -> TimerStartedEventAttributes)
-> Generic TimerStartedEventAttributes
forall x.
Rep TimerStartedEventAttributes x -> TimerStartedEventAttributes
forall x.
TimerStartedEventAttributes -> Rep TimerStartedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TimerStartedEventAttributes x -> TimerStartedEventAttributes
$cfrom :: forall x.
TimerStartedEventAttributes -> Rep TimerStartedEventAttributes x
Prelude.Generic)
newTimerStartedEventAttributes ::
Prelude.Text ->
Prelude.Text ->
Prelude.Integer ->
TimerStartedEventAttributes
newTimerStartedEventAttributes :: Text -> Text -> Integer -> TimerStartedEventAttributes
newTimerStartedEventAttributes
Text
pTimerId_
Text
pStartToFireTimeout_
Integer
pDecisionTaskCompletedEventId_ =
TimerStartedEventAttributes' :: Maybe Text
-> Text -> Text -> Integer -> TimerStartedEventAttributes
TimerStartedEventAttributes'
{ $sel:control:TimerStartedEventAttributes' :: Maybe Text
control =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timerId:TimerStartedEventAttributes' :: Text
timerId = Text
pTimerId_,
$sel:startToFireTimeout:TimerStartedEventAttributes' :: Text
startToFireTimeout = Text
pStartToFireTimeout_,
$sel:decisionTaskCompletedEventId:TimerStartedEventAttributes' :: Integer
decisionTaskCompletedEventId =
Integer
pDecisionTaskCompletedEventId_
}
timerStartedEventAttributes_control :: Lens.Lens' TimerStartedEventAttributes (Prelude.Maybe Prelude.Text)
timerStartedEventAttributes_control :: (Maybe Text -> f (Maybe Text))
-> TimerStartedEventAttributes -> f TimerStartedEventAttributes
timerStartedEventAttributes_control = (TimerStartedEventAttributes -> Maybe Text)
-> (TimerStartedEventAttributes
-> Maybe Text -> TimerStartedEventAttributes)
-> Lens
TimerStartedEventAttributes
TimerStartedEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimerStartedEventAttributes' {Maybe Text
control :: Maybe Text
$sel:control:TimerStartedEventAttributes' :: TimerStartedEventAttributes -> Maybe Text
control} -> Maybe Text
control) (\s :: TimerStartedEventAttributes
s@TimerStartedEventAttributes' {} Maybe Text
a -> TimerStartedEventAttributes
s {$sel:control:TimerStartedEventAttributes' :: Maybe Text
control = Maybe Text
a} :: TimerStartedEventAttributes)
timerStartedEventAttributes_timerId :: Lens.Lens' TimerStartedEventAttributes Prelude.Text
timerStartedEventAttributes_timerId :: (Text -> f Text)
-> TimerStartedEventAttributes -> f TimerStartedEventAttributes
timerStartedEventAttributes_timerId = (TimerStartedEventAttributes -> Text)
-> (TimerStartedEventAttributes
-> Text -> TimerStartedEventAttributes)
-> Lens
TimerStartedEventAttributes TimerStartedEventAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimerStartedEventAttributes' {Text
timerId :: Text
$sel:timerId:TimerStartedEventAttributes' :: TimerStartedEventAttributes -> Text
timerId} -> Text
timerId) (\s :: TimerStartedEventAttributes
s@TimerStartedEventAttributes' {} Text
a -> TimerStartedEventAttributes
s {$sel:timerId:TimerStartedEventAttributes' :: Text
timerId = Text
a} :: TimerStartedEventAttributes)
timerStartedEventAttributes_startToFireTimeout :: Lens.Lens' TimerStartedEventAttributes Prelude.Text
timerStartedEventAttributes_startToFireTimeout :: (Text -> f Text)
-> TimerStartedEventAttributes -> f TimerStartedEventAttributes
timerStartedEventAttributes_startToFireTimeout = (TimerStartedEventAttributes -> Text)
-> (TimerStartedEventAttributes
-> Text -> TimerStartedEventAttributes)
-> Lens
TimerStartedEventAttributes TimerStartedEventAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimerStartedEventAttributes' {Text
startToFireTimeout :: Text
$sel:startToFireTimeout:TimerStartedEventAttributes' :: TimerStartedEventAttributes -> Text
startToFireTimeout} -> Text
startToFireTimeout) (\s :: TimerStartedEventAttributes
s@TimerStartedEventAttributes' {} Text
a -> TimerStartedEventAttributes
s {$sel:startToFireTimeout:TimerStartedEventAttributes' :: Text
startToFireTimeout = Text
a} :: TimerStartedEventAttributes)
timerStartedEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' TimerStartedEventAttributes Prelude.Integer
timerStartedEventAttributes_decisionTaskCompletedEventId :: (Integer -> f Integer)
-> TimerStartedEventAttributes -> f TimerStartedEventAttributes
timerStartedEventAttributes_decisionTaskCompletedEventId = (TimerStartedEventAttributes -> Integer)
-> (TimerStartedEventAttributes
-> Integer -> TimerStartedEventAttributes)
-> Lens
TimerStartedEventAttributes
TimerStartedEventAttributes
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimerStartedEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:TimerStartedEventAttributes' :: TimerStartedEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: TimerStartedEventAttributes
s@TimerStartedEventAttributes' {} Integer
a -> TimerStartedEventAttributes
s {$sel:decisionTaskCompletedEventId:TimerStartedEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: TimerStartedEventAttributes)
instance Core.FromJSON TimerStartedEventAttributes where
parseJSON :: Value -> Parser TimerStartedEventAttributes
parseJSON =
String
-> (Object -> Parser TimerStartedEventAttributes)
-> Value
-> Parser TimerStartedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TimerStartedEventAttributes"
( \Object
x ->
Maybe Text
-> Text -> Text -> Integer -> TimerStartedEventAttributes
TimerStartedEventAttributes'
(Maybe Text
-> Text -> Text -> Integer -> TimerStartedEventAttributes)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Integer -> TimerStartedEventAttributes)
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
"control")
Parser (Text -> Text -> Integer -> TimerStartedEventAttributes)
-> Parser Text
-> Parser (Text -> Integer -> TimerStartedEventAttributes)
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
"timerId")
Parser (Text -> Integer -> TimerStartedEventAttributes)
-> Parser Text -> Parser (Integer -> TimerStartedEventAttributes)
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
"startToFireTimeout")
Parser (Integer -> TimerStartedEventAttributes)
-> Parser Integer -> Parser TimerStartedEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"decisionTaskCompletedEventId")
)
instance Prelude.Hashable TimerStartedEventAttributes
instance Prelude.NFData TimerStartedEventAttributes