{-# 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.Lambda.Types.FunctionEventInvokeConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.Types.DestinationConfig
import qualified Amazonka.Prelude as Prelude
data FunctionEventInvokeConfig = FunctionEventInvokeConfig'
{
FunctionEventInvokeConfig -> Maybe DestinationConfig
destinationConfig :: Prelude.Maybe DestinationConfig,
FunctionEventInvokeConfig -> Maybe Text
functionArn :: Prelude.Maybe Prelude.Text,
FunctionEventInvokeConfig -> Maybe POSIX
lastModified :: Prelude.Maybe Data.POSIX,
FunctionEventInvokeConfig -> Maybe Natural
maximumEventAgeInSeconds :: Prelude.Maybe Prelude.Natural,
FunctionEventInvokeConfig -> Maybe Natural
maximumRetryAttempts :: Prelude.Maybe Prelude.Natural
}
deriving (FunctionEventInvokeConfig -> FunctionEventInvokeConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionEventInvokeConfig -> FunctionEventInvokeConfig -> Bool
$c/= :: FunctionEventInvokeConfig -> FunctionEventInvokeConfig -> Bool
== :: FunctionEventInvokeConfig -> FunctionEventInvokeConfig -> Bool
$c== :: FunctionEventInvokeConfig -> FunctionEventInvokeConfig -> Bool
Prelude.Eq, ReadPrec [FunctionEventInvokeConfig]
ReadPrec FunctionEventInvokeConfig
Int -> ReadS FunctionEventInvokeConfig
ReadS [FunctionEventInvokeConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FunctionEventInvokeConfig]
$creadListPrec :: ReadPrec [FunctionEventInvokeConfig]
readPrec :: ReadPrec FunctionEventInvokeConfig
$creadPrec :: ReadPrec FunctionEventInvokeConfig
readList :: ReadS [FunctionEventInvokeConfig]
$creadList :: ReadS [FunctionEventInvokeConfig]
readsPrec :: Int -> ReadS FunctionEventInvokeConfig
$creadsPrec :: Int -> ReadS FunctionEventInvokeConfig
Prelude.Read, Int -> FunctionEventInvokeConfig -> ShowS
[FunctionEventInvokeConfig] -> ShowS
FunctionEventInvokeConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunctionEventInvokeConfig] -> ShowS
$cshowList :: [FunctionEventInvokeConfig] -> ShowS
show :: FunctionEventInvokeConfig -> String
$cshow :: FunctionEventInvokeConfig -> String
showsPrec :: Int -> FunctionEventInvokeConfig -> ShowS
$cshowsPrec :: Int -> FunctionEventInvokeConfig -> ShowS
Prelude.Show, forall x.
Rep FunctionEventInvokeConfig x -> FunctionEventInvokeConfig
forall x.
FunctionEventInvokeConfig -> Rep FunctionEventInvokeConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FunctionEventInvokeConfig x -> FunctionEventInvokeConfig
$cfrom :: forall x.
FunctionEventInvokeConfig -> Rep FunctionEventInvokeConfig x
Prelude.Generic)
newFunctionEventInvokeConfig ::
FunctionEventInvokeConfig
newFunctionEventInvokeConfig :: FunctionEventInvokeConfig
newFunctionEventInvokeConfig =
FunctionEventInvokeConfig'
{ $sel:destinationConfig:FunctionEventInvokeConfig' :: Maybe DestinationConfig
destinationConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:functionArn:FunctionEventInvokeConfig' :: Maybe Text
functionArn = forall a. Maybe a
Prelude.Nothing,
$sel:lastModified:FunctionEventInvokeConfig' :: Maybe POSIX
lastModified = forall a. Maybe a
Prelude.Nothing,
$sel:maximumEventAgeInSeconds:FunctionEventInvokeConfig' :: Maybe Natural
maximumEventAgeInSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:maximumRetryAttempts:FunctionEventInvokeConfig' :: Maybe Natural
maximumRetryAttempts = forall a. Maybe a
Prelude.Nothing
}
functionEventInvokeConfig_destinationConfig :: Lens.Lens' FunctionEventInvokeConfig (Prelude.Maybe DestinationConfig)
functionEventInvokeConfig_destinationConfig :: Lens' FunctionEventInvokeConfig (Maybe DestinationConfig)
functionEventInvokeConfig_destinationConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionEventInvokeConfig' {Maybe DestinationConfig
destinationConfig :: Maybe DestinationConfig
$sel:destinationConfig:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe DestinationConfig
destinationConfig} -> Maybe DestinationConfig
destinationConfig) (\s :: FunctionEventInvokeConfig
s@FunctionEventInvokeConfig' {} Maybe DestinationConfig
a -> FunctionEventInvokeConfig
s {$sel:destinationConfig:FunctionEventInvokeConfig' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
a} :: FunctionEventInvokeConfig)
functionEventInvokeConfig_functionArn :: Lens.Lens' FunctionEventInvokeConfig (Prelude.Maybe Prelude.Text)
functionEventInvokeConfig_functionArn :: Lens' FunctionEventInvokeConfig (Maybe Text)
functionEventInvokeConfig_functionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionEventInvokeConfig' {Maybe Text
functionArn :: Maybe Text
$sel:functionArn:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Text
functionArn} -> Maybe Text
functionArn) (\s :: FunctionEventInvokeConfig
s@FunctionEventInvokeConfig' {} Maybe Text
a -> FunctionEventInvokeConfig
s {$sel:functionArn:FunctionEventInvokeConfig' :: Maybe Text
functionArn = Maybe Text
a} :: FunctionEventInvokeConfig)
functionEventInvokeConfig_lastModified :: Lens.Lens' FunctionEventInvokeConfig (Prelude.Maybe Prelude.UTCTime)
functionEventInvokeConfig_lastModified :: Lens' FunctionEventInvokeConfig (Maybe UTCTime)
functionEventInvokeConfig_lastModified = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionEventInvokeConfig' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: FunctionEventInvokeConfig
s@FunctionEventInvokeConfig' {} Maybe POSIX
a -> FunctionEventInvokeConfig
s {$sel:lastModified:FunctionEventInvokeConfig' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: FunctionEventInvokeConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
functionEventInvokeConfig_maximumEventAgeInSeconds :: Lens.Lens' FunctionEventInvokeConfig (Prelude.Maybe Prelude.Natural)
functionEventInvokeConfig_maximumEventAgeInSeconds :: Lens' FunctionEventInvokeConfig (Maybe Natural)
functionEventInvokeConfig_maximumEventAgeInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionEventInvokeConfig' {Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
$sel:maximumEventAgeInSeconds:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Natural
maximumEventAgeInSeconds} -> Maybe Natural
maximumEventAgeInSeconds) (\s :: FunctionEventInvokeConfig
s@FunctionEventInvokeConfig' {} Maybe Natural
a -> FunctionEventInvokeConfig
s {$sel:maximumEventAgeInSeconds:FunctionEventInvokeConfig' :: Maybe Natural
maximumEventAgeInSeconds = Maybe Natural
a} :: FunctionEventInvokeConfig)
functionEventInvokeConfig_maximumRetryAttempts :: Lens.Lens' FunctionEventInvokeConfig (Prelude.Maybe Prelude.Natural)
functionEventInvokeConfig_maximumRetryAttempts :: Lens' FunctionEventInvokeConfig (Maybe Natural)
functionEventInvokeConfig_maximumRetryAttempts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionEventInvokeConfig' {Maybe Natural
maximumRetryAttempts :: Maybe Natural
$sel:maximumRetryAttempts:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Natural
maximumRetryAttempts} -> Maybe Natural
maximumRetryAttempts) (\s :: FunctionEventInvokeConfig
s@FunctionEventInvokeConfig' {} Maybe Natural
a -> FunctionEventInvokeConfig
s {$sel:maximumRetryAttempts:FunctionEventInvokeConfig' :: Maybe Natural
maximumRetryAttempts = Maybe Natural
a} :: FunctionEventInvokeConfig)
instance Data.FromJSON FunctionEventInvokeConfig where
parseJSON :: Value -> Parser FunctionEventInvokeConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FunctionEventInvokeConfig"
( \Object
x ->
Maybe DestinationConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> FunctionEventInvokeConfig
FunctionEventInvokeConfig'
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
"DestinationConfig")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FunctionArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModified")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaximumEventAgeInSeconds")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaximumRetryAttempts")
)
instance Prelude.Hashable FunctionEventInvokeConfig where
hashWithSalt :: Int -> FunctionEventInvokeConfig -> Int
hashWithSalt Int
_salt FunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe DestinationConfig
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
lastModified :: Maybe POSIX
functionArn :: Maybe Text
destinationConfig :: Maybe DestinationConfig
$sel:maximumRetryAttempts:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Natural
$sel:lastModified:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe POSIX
$sel:functionArn:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Text
$sel:destinationConfig:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationConfig
destinationConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
functionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModified
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumEventAgeInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumRetryAttempts
instance Prelude.NFData FunctionEventInvokeConfig where
rnf :: FunctionEventInvokeConfig -> ()
rnf FunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe DestinationConfig
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
lastModified :: Maybe POSIX
functionArn :: Maybe Text
destinationConfig :: Maybe DestinationConfig
$sel:maximumRetryAttempts:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Natural
$sel:lastModified:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe POSIX
$sel:functionArn:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe Text
$sel:destinationConfig:FunctionEventInvokeConfig' :: FunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationConfig
destinationConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
functionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModified
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumEventAgeInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumRetryAttempts