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