{-# 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.Lens as Lens
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
(TimerCanceledEventAttributes
-> TimerCanceledEventAttributes -> Bool)
-> (TimerCanceledEventAttributes
-> TimerCanceledEventAttributes -> Bool)
-> Eq TimerCanceledEventAttributes
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]
(Int -> ReadS TimerCanceledEventAttributes)
-> ReadS [TimerCanceledEventAttributes]
-> ReadPrec TimerCanceledEventAttributes
-> ReadPrec [TimerCanceledEventAttributes]
-> Read 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
(Int -> TimerCanceledEventAttributes -> ShowS)
-> (TimerCanceledEventAttributes -> String)
-> ([TimerCanceledEventAttributes] -> ShowS)
-> Show TimerCanceledEventAttributes
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.
TimerCanceledEventAttributes -> Rep TimerCanceledEventAttributes x)
-> (forall x.
Rep TimerCanceledEventAttributes x -> TimerCanceledEventAttributes)
-> Generic TimerCanceledEventAttributes
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' :: Text -> Integer -> Integer -> TimerCanceledEventAttributes
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 :: (Text -> f Text)
-> TimerCanceledEventAttributes -> f TimerCanceledEventAttributes
timerCanceledEventAttributes_timerId = (TimerCanceledEventAttributes -> Text)
-> (TimerCanceledEventAttributes
-> Text -> TimerCanceledEventAttributes)
-> Lens
TimerCanceledEventAttributes TimerCanceledEventAttributes Text Text
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 :: (Integer -> f Integer)
-> TimerCanceledEventAttributes -> f TimerCanceledEventAttributes
timerCanceledEventAttributes_startedEventId = (TimerCanceledEventAttributes -> Integer)
-> (TimerCanceledEventAttributes
-> Integer -> TimerCanceledEventAttributes)
-> Lens
TimerCanceledEventAttributes
TimerCanceledEventAttributes
Integer
Integer
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 :: (Integer -> f Integer)
-> TimerCanceledEventAttributes -> f TimerCanceledEventAttributes
timerCanceledEventAttributes_decisionTaskCompletedEventId = (TimerCanceledEventAttributes -> Integer)
-> (TimerCanceledEventAttributes
-> Integer -> TimerCanceledEventAttributes)
-> Lens
TimerCanceledEventAttributes
TimerCanceledEventAttributes
Integer
Integer
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 Core.FromJSON TimerCanceledEventAttributes where
parseJSON :: Value -> Parser TimerCanceledEventAttributes
parseJSON =
String
-> (Object -> Parser TimerCanceledEventAttributes)
-> Value
-> Parser TimerCanceledEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TimerCanceledEventAttributes"
( \Object
x ->
Text -> Integer -> Integer -> TimerCanceledEventAttributes
TimerCanceledEventAttributes'
(Text -> Integer -> Integer -> TimerCanceledEventAttributes)
-> Parser Text
-> Parser (Integer -> Integer -> TimerCanceledEventAttributes)
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 -> Integer -> TimerCanceledEventAttributes)
-> Parser Integer
-> Parser (Integer -> TimerCanceledEventAttributes)
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")
Parser (Integer -> TimerCanceledEventAttributes)
-> Parser Integer -> Parser TimerCanceledEventAttributes
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
TimerCanceledEventAttributes
instance Prelude.NFData TimerCanceledEventAttributes