{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Lambda.GetFunctionEventInvokeConfig
(
GetFunctionEventInvokeConfig (..),
newGetFunctionEventInvokeConfig,
getFunctionEventInvokeConfig_qualifier,
getFunctionEventInvokeConfig_functionName,
FunctionEventInvokeConfig (..),
newFunctionEventInvokeConfig,
functionEventInvokeConfig_destinationConfig,
functionEventInvokeConfig_functionArn,
functionEventInvokeConfig_lastModified,
functionEventInvokeConfig_maximumEventAgeInSeconds,
functionEventInvokeConfig_maximumRetryAttempts,
)
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
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetFunctionEventInvokeConfig = GetFunctionEventInvokeConfig'
{
GetFunctionEventInvokeConfig -> Maybe Text
qualifier :: Prelude.Maybe Prelude.Text,
GetFunctionEventInvokeConfig -> Text
functionName :: Prelude.Text
}
deriving (GetFunctionEventInvokeConfig
-> GetFunctionEventInvokeConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionEventInvokeConfig
-> GetFunctionEventInvokeConfig -> Bool
$c/= :: GetFunctionEventInvokeConfig
-> GetFunctionEventInvokeConfig -> Bool
== :: GetFunctionEventInvokeConfig
-> GetFunctionEventInvokeConfig -> Bool
$c== :: GetFunctionEventInvokeConfig
-> GetFunctionEventInvokeConfig -> Bool
Prelude.Eq, ReadPrec [GetFunctionEventInvokeConfig]
ReadPrec GetFunctionEventInvokeConfig
Int -> ReadS GetFunctionEventInvokeConfig
ReadS [GetFunctionEventInvokeConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionEventInvokeConfig]
$creadListPrec :: ReadPrec [GetFunctionEventInvokeConfig]
readPrec :: ReadPrec GetFunctionEventInvokeConfig
$creadPrec :: ReadPrec GetFunctionEventInvokeConfig
readList :: ReadS [GetFunctionEventInvokeConfig]
$creadList :: ReadS [GetFunctionEventInvokeConfig]
readsPrec :: Int -> ReadS GetFunctionEventInvokeConfig
$creadsPrec :: Int -> ReadS GetFunctionEventInvokeConfig
Prelude.Read, Int -> GetFunctionEventInvokeConfig -> ShowS
[GetFunctionEventInvokeConfig] -> ShowS
GetFunctionEventInvokeConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionEventInvokeConfig] -> ShowS
$cshowList :: [GetFunctionEventInvokeConfig] -> ShowS
show :: GetFunctionEventInvokeConfig -> String
$cshow :: GetFunctionEventInvokeConfig -> String
showsPrec :: Int -> GetFunctionEventInvokeConfig -> ShowS
$cshowsPrec :: Int -> GetFunctionEventInvokeConfig -> ShowS
Prelude.Show, forall x.
Rep GetFunctionEventInvokeConfig x -> GetFunctionEventInvokeConfig
forall x.
GetFunctionEventInvokeConfig -> Rep GetFunctionEventInvokeConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFunctionEventInvokeConfig x -> GetFunctionEventInvokeConfig
$cfrom :: forall x.
GetFunctionEventInvokeConfig -> Rep GetFunctionEventInvokeConfig x
Prelude.Generic)
newGetFunctionEventInvokeConfig ::
Prelude.Text ->
GetFunctionEventInvokeConfig
newGetFunctionEventInvokeConfig :: Text -> GetFunctionEventInvokeConfig
newGetFunctionEventInvokeConfig Text
pFunctionName_ =
GetFunctionEventInvokeConfig'
{ $sel:qualifier:GetFunctionEventInvokeConfig' :: Maybe Text
qualifier =
forall a. Maybe a
Prelude.Nothing,
$sel:functionName:GetFunctionEventInvokeConfig' :: Text
functionName = Text
pFunctionName_
}
getFunctionEventInvokeConfig_qualifier :: Lens.Lens' GetFunctionEventInvokeConfig (Prelude.Maybe Prelude.Text)
getFunctionEventInvokeConfig_qualifier :: Lens' GetFunctionEventInvokeConfig (Maybe Text)
getFunctionEventInvokeConfig_qualifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionEventInvokeConfig' {Maybe Text
qualifier :: Maybe Text
$sel:qualifier:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Maybe Text
qualifier} -> Maybe Text
qualifier) (\s :: GetFunctionEventInvokeConfig
s@GetFunctionEventInvokeConfig' {} Maybe Text
a -> GetFunctionEventInvokeConfig
s {$sel:qualifier:GetFunctionEventInvokeConfig' :: Maybe Text
qualifier = Maybe Text
a} :: GetFunctionEventInvokeConfig)
getFunctionEventInvokeConfig_functionName :: Lens.Lens' GetFunctionEventInvokeConfig Prelude.Text
getFunctionEventInvokeConfig_functionName :: Lens' GetFunctionEventInvokeConfig Text
getFunctionEventInvokeConfig_functionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionEventInvokeConfig' {Text
functionName :: Text
$sel:functionName:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Text
functionName} -> Text
functionName) (\s :: GetFunctionEventInvokeConfig
s@GetFunctionEventInvokeConfig' {} Text
a -> GetFunctionEventInvokeConfig
s {$sel:functionName:GetFunctionEventInvokeConfig' :: Text
functionName = Text
a} :: GetFunctionEventInvokeConfig)
instance Core.AWSRequest GetFunctionEventInvokeConfig where
type
AWSResponse GetFunctionEventInvokeConfig =
FunctionEventInvokeConfig
request :: (Service -> Service)
-> GetFunctionEventInvokeConfig
-> Request GetFunctionEventInvokeConfig
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetFunctionEventInvokeConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetFunctionEventInvokeConfig)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
(\Int
s ResponseHeaders
h Object
x -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
instance
Prelude.Hashable
GetFunctionEventInvokeConfig
where
hashWithSalt :: Int -> GetFunctionEventInvokeConfig -> Int
hashWithSalt Int
_salt GetFunctionEventInvokeConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Text
$sel:qualifier:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
qualifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionName
instance Prelude.NFData GetFunctionEventInvokeConfig where
rnf :: GetFunctionEventInvokeConfig -> ()
rnf GetFunctionEventInvokeConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Text
$sel:qualifier:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
qualifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionName
instance Data.ToHeaders GetFunctionEventInvokeConfig where
toHeaders :: GetFunctionEventInvokeConfig -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetFunctionEventInvokeConfig where
toPath :: GetFunctionEventInvokeConfig -> ByteString
toPath GetFunctionEventInvokeConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Text
$sel:qualifier:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2019-09-25/functions/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
functionName,
ByteString
"/event-invoke-config"
]
instance Data.ToQuery GetFunctionEventInvokeConfig where
toQuery :: GetFunctionEventInvokeConfig -> QueryString
toQuery GetFunctionEventInvokeConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Text
$sel:qualifier:GetFunctionEventInvokeConfig' :: GetFunctionEventInvokeConfig -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Qualifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
qualifier]