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