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