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