{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:result:LambdaFunctionCompletedEventAttributes' :: Maybe Text
result =
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 :: Lens' LambdaFunctionCompletedEventAttributes (Maybe Text)
lambdaFunctionCompletedEventAttributes_result = 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 :: Lens' LambdaFunctionCompletedEventAttributes Integer
lambdaFunctionCompletedEventAttributes_scheduledEventId = 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 :: Lens' LambdaFunctionCompletedEventAttributes Integer
lambdaFunctionCompletedEventAttributes_startedEventId = 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
Data.FromJSON
LambdaFunctionCompletedEventAttributes
where
parseJSON :: Value -> Parser LambdaFunctionCompletedEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LambdaFunctionCompletedEventAttributes"
( \Object
x ->
Maybe Text
-> Integer -> Integer -> LambdaFunctionCompletedEventAttributes
LambdaFunctionCompletedEventAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"result")
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
"scheduledEventId")
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
"startedEventId")
)
instance
Prelude.Hashable
LambdaFunctionCompletedEventAttributes
where
hashWithSalt :: Int -> LambdaFunctionCompletedEventAttributes -> Int
hashWithSalt
Int
_salt
LambdaFunctionCompletedEventAttributes' {Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
result :: Maybe Text
$sel:startedEventId:LambdaFunctionCompletedEventAttributes' :: LambdaFunctionCompletedEventAttributes -> Integer
$sel:scheduledEventId:LambdaFunctionCompletedEventAttributes' :: LambdaFunctionCompletedEventAttributes -> Integer
$sel:result:LambdaFunctionCompletedEventAttributes' :: LambdaFunctionCompletedEventAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
result
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
scheduledEventId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
startedEventId
instance
Prelude.NFData
LambdaFunctionCompletedEventAttributes
where
rnf :: LambdaFunctionCompletedEventAttributes -> ()
rnf LambdaFunctionCompletedEventAttributes' {Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
result :: Maybe Text
$sel:startedEventId:LambdaFunctionCompletedEventAttributes' :: LambdaFunctionCompletedEventAttributes -> Integer
$sel:scheduledEventId:LambdaFunctionCompletedEventAttributes' :: LambdaFunctionCompletedEventAttributes -> Integer
$sel:result:LambdaFunctionCompletedEventAttributes' :: LambdaFunctionCompletedEventAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
result
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
scheduledEventId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
startedEventId