{-# 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.CancelTimerFailedEventAttributes 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
import Amazonka.SWF.Types.CancelTimerFailedCause
data CancelTimerFailedEventAttributes = CancelTimerFailedEventAttributes'
{
CancelTimerFailedEventAttributes -> Text
timerId :: Prelude.Text,
CancelTimerFailedEventAttributes -> CancelTimerFailedCause
cause :: CancelTimerFailedCause,
CancelTimerFailedEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer
}
deriving (CancelTimerFailedEventAttributes
-> CancelTimerFailedEventAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelTimerFailedEventAttributes
-> CancelTimerFailedEventAttributes -> Bool
$c/= :: CancelTimerFailedEventAttributes
-> CancelTimerFailedEventAttributes -> Bool
== :: CancelTimerFailedEventAttributes
-> CancelTimerFailedEventAttributes -> Bool
$c== :: CancelTimerFailedEventAttributes
-> CancelTimerFailedEventAttributes -> Bool
Prelude.Eq, ReadPrec [CancelTimerFailedEventAttributes]
ReadPrec CancelTimerFailedEventAttributes
Int -> ReadS CancelTimerFailedEventAttributes
ReadS [CancelTimerFailedEventAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelTimerFailedEventAttributes]
$creadListPrec :: ReadPrec [CancelTimerFailedEventAttributes]
readPrec :: ReadPrec CancelTimerFailedEventAttributes
$creadPrec :: ReadPrec CancelTimerFailedEventAttributes
readList :: ReadS [CancelTimerFailedEventAttributes]
$creadList :: ReadS [CancelTimerFailedEventAttributes]
readsPrec :: Int -> ReadS CancelTimerFailedEventAttributes
$creadsPrec :: Int -> ReadS CancelTimerFailedEventAttributes
Prelude.Read, Int -> CancelTimerFailedEventAttributes -> ShowS
[CancelTimerFailedEventAttributes] -> ShowS
CancelTimerFailedEventAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelTimerFailedEventAttributes] -> ShowS
$cshowList :: [CancelTimerFailedEventAttributes] -> ShowS
show :: CancelTimerFailedEventAttributes -> String
$cshow :: CancelTimerFailedEventAttributes -> String
showsPrec :: Int -> CancelTimerFailedEventAttributes -> ShowS
$cshowsPrec :: Int -> CancelTimerFailedEventAttributes -> ShowS
Prelude.Show, forall x.
Rep CancelTimerFailedEventAttributes x
-> CancelTimerFailedEventAttributes
forall x.
CancelTimerFailedEventAttributes
-> Rep CancelTimerFailedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelTimerFailedEventAttributes x
-> CancelTimerFailedEventAttributes
$cfrom :: forall x.
CancelTimerFailedEventAttributes
-> Rep CancelTimerFailedEventAttributes x
Prelude.Generic)
newCancelTimerFailedEventAttributes ::
Prelude.Text ->
CancelTimerFailedCause ->
Prelude.Integer ->
CancelTimerFailedEventAttributes
newCancelTimerFailedEventAttributes :: Text
-> CancelTimerFailedCause
-> Integer
-> CancelTimerFailedEventAttributes
newCancelTimerFailedEventAttributes
Text
pTimerId_
CancelTimerFailedCause
pCause_
Integer
pDecisionTaskCompletedEventId_ =
CancelTimerFailedEventAttributes'
{ $sel:timerId:CancelTimerFailedEventAttributes' :: Text
timerId =
Text
pTimerId_,
$sel:cause:CancelTimerFailedEventAttributes' :: CancelTimerFailedCause
cause = CancelTimerFailedCause
pCause_,
$sel:decisionTaskCompletedEventId:CancelTimerFailedEventAttributes' :: Integer
decisionTaskCompletedEventId =
Integer
pDecisionTaskCompletedEventId_
}
cancelTimerFailedEventAttributes_timerId :: Lens.Lens' CancelTimerFailedEventAttributes Prelude.Text
cancelTimerFailedEventAttributes_timerId :: Lens' CancelTimerFailedEventAttributes Text
cancelTimerFailedEventAttributes_timerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelTimerFailedEventAttributes' {Text
timerId :: Text
$sel:timerId:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> Text
timerId} -> Text
timerId) (\s :: CancelTimerFailedEventAttributes
s@CancelTimerFailedEventAttributes' {} Text
a -> CancelTimerFailedEventAttributes
s {$sel:timerId:CancelTimerFailedEventAttributes' :: Text
timerId = Text
a} :: CancelTimerFailedEventAttributes)
cancelTimerFailedEventAttributes_cause :: Lens.Lens' CancelTimerFailedEventAttributes CancelTimerFailedCause
cancelTimerFailedEventAttributes_cause :: Lens' CancelTimerFailedEventAttributes CancelTimerFailedCause
cancelTimerFailedEventAttributes_cause = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelTimerFailedEventAttributes' {CancelTimerFailedCause
cause :: CancelTimerFailedCause
$sel:cause:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> CancelTimerFailedCause
cause} -> CancelTimerFailedCause
cause) (\s :: CancelTimerFailedEventAttributes
s@CancelTimerFailedEventAttributes' {} CancelTimerFailedCause
a -> CancelTimerFailedEventAttributes
s {$sel:cause:CancelTimerFailedEventAttributes' :: CancelTimerFailedCause
cause = CancelTimerFailedCause
a} :: CancelTimerFailedEventAttributes)
cancelTimerFailedEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' CancelTimerFailedEventAttributes Prelude.Integer
cancelTimerFailedEventAttributes_decisionTaskCompletedEventId :: Lens' CancelTimerFailedEventAttributes Integer
cancelTimerFailedEventAttributes_decisionTaskCompletedEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelTimerFailedEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: CancelTimerFailedEventAttributes
s@CancelTimerFailedEventAttributes' {} Integer
a -> CancelTimerFailedEventAttributes
s {$sel:decisionTaskCompletedEventId:CancelTimerFailedEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: CancelTimerFailedEventAttributes)
instance
Data.FromJSON
CancelTimerFailedEventAttributes
where
parseJSON :: Value -> Parser CancelTimerFailedEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CancelTimerFailedEventAttributes"
( \Object
x ->
Text
-> CancelTimerFailedCause
-> Integer
-> CancelTimerFailedEventAttributes
CancelTimerFailedEventAttributes'
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
"cause")
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
CancelTimerFailedEventAttributes
where
hashWithSalt :: Int -> CancelTimerFailedEventAttributes -> Int
hashWithSalt
Int
_salt
CancelTimerFailedEventAttributes' {Integer
Text
CancelTimerFailedCause
decisionTaskCompletedEventId :: Integer
cause :: CancelTimerFailedCause
timerId :: Text
$sel:decisionTaskCompletedEventId:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> Integer
$sel:cause:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> CancelTimerFailedCause
$sel:timerId:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
timerId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` CancelTimerFailedCause
cause
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
decisionTaskCompletedEventId
instance
Prelude.NFData
CancelTimerFailedEventAttributes
where
rnf :: CancelTimerFailedEventAttributes -> ()
rnf CancelTimerFailedEventAttributes' {Integer
Text
CancelTimerFailedCause
decisionTaskCompletedEventId :: Integer
cause :: CancelTimerFailedCause
timerId :: Text
$sel:decisionTaskCompletedEventId:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> Integer
$sel:cause:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> CancelTimerFailedCause
$sel:timerId:CancelTimerFailedEventAttributes' :: CancelTimerFailedEventAttributes -> 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 CancelTimerFailedCause
cause
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
decisionTaskCompletedEventId