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