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