{-# 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.GetEventSourceMapping
(
GetEventSourceMapping (..),
newGetEventSourceMapping,
getEventSourceMapping_uuid,
EventSourceMappingConfiguration (..),
newEventSourceMappingConfiguration,
eventSourceMappingConfiguration_eventSourceArn,
eventSourceMappingConfiguration_state,
eventSourceMappingConfiguration_startingPositionTimestamp,
eventSourceMappingConfiguration_functionArn,
eventSourceMappingConfiguration_topics,
eventSourceMappingConfiguration_queues,
eventSourceMappingConfiguration_bisectBatchOnFunctionError,
eventSourceMappingConfiguration_uuid,
eventSourceMappingConfiguration_parallelizationFactor,
eventSourceMappingConfiguration_lastProcessingResult,
eventSourceMappingConfiguration_maximumRetryAttempts,
eventSourceMappingConfiguration_batchSize,
eventSourceMappingConfiguration_stateTransitionReason,
eventSourceMappingConfiguration_maximumBatchingWindowInSeconds,
eventSourceMappingConfiguration_sourceAccessConfigurations,
eventSourceMappingConfiguration_maximumRecordAgeInSeconds,
eventSourceMappingConfiguration_functionResponseTypes,
eventSourceMappingConfiguration_tumblingWindowInSeconds,
eventSourceMappingConfiguration_selfManagedEventSource,
eventSourceMappingConfiguration_lastModified,
eventSourceMappingConfiguration_destinationConfig,
eventSourceMappingConfiguration_startingPosition,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetEventSourceMapping = GetEventSourceMapping'
{
GetEventSourceMapping -> Text
uuid :: Prelude.Text
}
deriving (GetEventSourceMapping -> GetEventSourceMapping -> Bool
(GetEventSourceMapping -> GetEventSourceMapping -> Bool)
-> (GetEventSourceMapping -> GetEventSourceMapping -> Bool)
-> Eq GetEventSourceMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEventSourceMapping -> GetEventSourceMapping -> Bool
$c/= :: GetEventSourceMapping -> GetEventSourceMapping -> Bool
== :: GetEventSourceMapping -> GetEventSourceMapping -> Bool
$c== :: GetEventSourceMapping -> GetEventSourceMapping -> Bool
Prelude.Eq, ReadPrec [GetEventSourceMapping]
ReadPrec GetEventSourceMapping
Int -> ReadS GetEventSourceMapping
ReadS [GetEventSourceMapping]
(Int -> ReadS GetEventSourceMapping)
-> ReadS [GetEventSourceMapping]
-> ReadPrec GetEventSourceMapping
-> ReadPrec [GetEventSourceMapping]
-> Read GetEventSourceMapping
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEventSourceMapping]
$creadListPrec :: ReadPrec [GetEventSourceMapping]
readPrec :: ReadPrec GetEventSourceMapping
$creadPrec :: ReadPrec GetEventSourceMapping
readList :: ReadS [GetEventSourceMapping]
$creadList :: ReadS [GetEventSourceMapping]
readsPrec :: Int -> ReadS GetEventSourceMapping
$creadsPrec :: Int -> ReadS GetEventSourceMapping
Prelude.Read, Int -> GetEventSourceMapping -> ShowS
[GetEventSourceMapping] -> ShowS
GetEventSourceMapping -> String
(Int -> GetEventSourceMapping -> ShowS)
-> (GetEventSourceMapping -> String)
-> ([GetEventSourceMapping] -> ShowS)
-> Show GetEventSourceMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEventSourceMapping] -> ShowS
$cshowList :: [GetEventSourceMapping] -> ShowS
show :: GetEventSourceMapping -> String
$cshow :: GetEventSourceMapping -> String
showsPrec :: Int -> GetEventSourceMapping -> ShowS
$cshowsPrec :: Int -> GetEventSourceMapping -> ShowS
Prelude.Show, (forall x. GetEventSourceMapping -> Rep GetEventSourceMapping x)
-> (forall x. Rep GetEventSourceMapping x -> GetEventSourceMapping)
-> Generic GetEventSourceMapping
forall x. Rep GetEventSourceMapping x -> GetEventSourceMapping
forall x. GetEventSourceMapping -> Rep GetEventSourceMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEventSourceMapping x -> GetEventSourceMapping
$cfrom :: forall x. GetEventSourceMapping -> Rep GetEventSourceMapping x
Prelude.Generic)
newGetEventSourceMapping ::
Prelude.Text ->
GetEventSourceMapping
newGetEventSourceMapping :: Text -> GetEventSourceMapping
newGetEventSourceMapping Text
pUUID_ =
GetEventSourceMapping' :: Text -> GetEventSourceMapping
GetEventSourceMapping' {$sel:uuid:GetEventSourceMapping' :: Text
uuid = Text
pUUID_}
getEventSourceMapping_uuid :: Lens.Lens' GetEventSourceMapping Prelude.Text
getEventSourceMapping_uuid :: (Text -> f Text)
-> GetEventSourceMapping -> f GetEventSourceMapping
getEventSourceMapping_uuid = (GetEventSourceMapping -> Text)
-> (GetEventSourceMapping -> Text -> GetEventSourceMapping)
-> Lens GetEventSourceMapping GetEventSourceMapping Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventSourceMapping' {Text
uuid :: Text
$sel:uuid:GetEventSourceMapping' :: GetEventSourceMapping -> Text
uuid} -> Text
uuid) (\s :: GetEventSourceMapping
s@GetEventSourceMapping' {} Text
a -> GetEventSourceMapping
s {$sel:uuid:GetEventSourceMapping' :: Text
uuid = Text
a} :: GetEventSourceMapping)
instance Core.AWSRequest GetEventSourceMapping where
type
AWSResponse GetEventSourceMapping =
EventSourceMappingConfiguration
request :: GetEventSourceMapping -> Request GetEventSourceMapping
request = Service -> GetEventSourceMapping -> Request GetEventSourceMapping
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetEventSourceMapping)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetEventSourceMapping))
-> Logger
-> Service
-> Proxy GetEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetEventSourceMapping)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
(\Int
s ResponseHeaders
h Object
x -> Object -> Either String EventSourceMappingConfiguration
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable GetEventSourceMapping
instance Prelude.NFData GetEventSourceMapping
instance Core.ToHeaders GetEventSourceMapping where
toHeaders :: GetEventSourceMapping -> ResponseHeaders
toHeaders = ResponseHeaders -> GetEventSourceMapping -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetEventSourceMapping where
toPath :: GetEventSourceMapping -> ByteString
toPath GetEventSourceMapping' {Text
uuid :: Text
$sel:uuid:GetEventSourceMapping' :: GetEventSourceMapping -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-03-31/event-source-mappings/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
uuid
]
instance Core.ToQuery GetEventSourceMapping where
toQuery :: GetEventSourceMapping -> QueryString
toQuery = QueryString -> GetEventSourceMapping -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty