{-# 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.CreateEventSourceMapping
(
CreateEventSourceMapping (..),
newCreateEventSourceMapping,
createEventSourceMapping_eventSourceArn,
createEventSourceMapping_startingPositionTimestamp,
createEventSourceMapping_topics,
createEventSourceMapping_queues,
createEventSourceMapping_enabled,
createEventSourceMapping_bisectBatchOnFunctionError,
createEventSourceMapping_parallelizationFactor,
createEventSourceMapping_maximumRetryAttempts,
createEventSourceMapping_batchSize,
createEventSourceMapping_maximumBatchingWindowInSeconds,
createEventSourceMapping_sourceAccessConfigurations,
createEventSourceMapping_maximumRecordAgeInSeconds,
createEventSourceMapping_functionResponseTypes,
createEventSourceMapping_tumblingWindowInSeconds,
createEventSourceMapping_selfManagedEventSource,
createEventSourceMapping_destinationConfig,
createEventSourceMapping_startingPosition,
createEventSourceMapping_functionName,
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 CreateEventSourceMapping = CreateEventSourceMapping'
{
CreateEventSourceMapping -> Maybe Text
eventSourceArn :: Prelude.Maybe Prelude.Text,
CreateEventSourceMapping -> Maybe POSIX
startingPositionTimestamp :: Prelude.Maybe Core.POSIX,
CreateEventSourceMapping -> Maybe (NonEmpty Text)
topics :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateEventSourceMapping -> Maybe (NonEmpty Text)
queues :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateEventSourceMapping -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
CreateEventSourceMapping -> Maybe Bool
bisectBatchOnFunctionError :: Prelude.Maybe Prelude.Bool,
CreateEventSourceMapping -> Maybe Natural
parallelizationFactor :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe Int
maximumRetryAttempts :: Prelude.Maybe Prelude.Int,
CreateEventSourceMapping -> Maybe Natural
batchSize :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe Natural
maximumBatchingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Prelude.Maybe [SourceAccessConfiguration],
CreateEventSourceMapping -> Maybe Int
maximumRecordAgeInSeconds :: Prelude.Maybe Prelude.Int,
CreateEventSourceMapping -> Maybe [FunctionResponseType]
functionResponseTypes :: Prelude.Maybe [FunctionResponseType],
CreateEventSourceMapping -> Maybe Natural
tumblingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe SelfManagedEventSource
selfManagedEventSource :: Prelude.Maybe SelfManagedEventSource,
CreateEventSourceMapping -> Maybe DestinationConfig
destinationConfig :: Prelude.Maybe DestinationConfig,
CreateEventSourceMapping -> Maybe EventSourcePosition
startingPosition :: Prelude.Maybe EventSourcePosition,
CreateEventSourceMapping -> Text
functionName :: Prelude.Text
}
deriving (CreateEventSourceMapping -> CreateEventSourceMapping -> Bool
(CreateEventSourceMapping -> CreateEventSourceMapping -> Bool)
-> (CreateEventSourceMapping -> CreateEventSourceMapping -> Bool)
-> Eq CreateEventSourceMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEventSourceMapping -> CreateEventSourceMapping -> Bool
$c/= :: CreateEventSourceMapping -> CreateEventSourceMapping -> Bool
== :: CreateEventSourceMapping -> CreateEventSourceMapping -> Bool
$c== :: CreateEventSourceMapping -> CreateEventSourceMapping -> Bool
Prelude.Eq, ReadPrec [CreateEventSourceMapping]
ReadPrec CreateEventSourceMapping
Int -> ReadS CreateEventSourceMapping
ReadS [CreateEventSourceMapping]
(Int -> ReadS CreateEventSourceMapping)
-> ReadS [CreateEventSourceMapping]
-> ReadPrec CreateEventSourceMapping
-> ReadPrec [CreateEventSourceMapping]
-> Read CreateEventSourceMapping
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEventSourceMapping]
$creadListPrec :: ReadPrec [CreateEventSourceMapping]
readPrec :: ReadPrec CreateEventSourceMapping
$creadPrec :: ReadPrec CreateEventSourceMapping
readList :: ReadS [CreateEventSourceMapping]
$creadList :: ReadS [CreateEventSourceMapping]
readsPrec :: Int -> ReadS CreateEventSourceMapping
$creadsPrec :: Int -> ReadS CreateEventSourceMapping
Prelude.Read, Int -> CreateEventSourceMapping -> ShowS
[CreateEventSourceMapping] -> ShowS
CreateEventSourceMapping -> String
(Int -> CreateEventSourceMapping -> ShowS)
-> (CreateEventSourceMapping -> String)
-> ([CreateEventSourceMapping] -> ShowS)
-> Show CreateEventSourceMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEventSourceMapping] -> ShowS
$cshowList :: [CreateEventSourceMapping] -> ShowS
show :: CreateEventSourceMapping -> String
$cshow :: CreateEventSourceMapping -> String
showsPrec :: Int -> CreateEventSourceMapping -> ShowS
$cshowsPrec :: Int -> CreateEventSourceMapping -> ShowS
Prelude.Show, (forall x.
CreateEventSourceMapping -> Rep CreateEventSourceMapping x)
-> (forall x.
Rep CreateEventSourceMapping x -> CreateEventSourceMapping)
-> Generic CreateEventSourceMapping
forall x.
Rep CreateEventSourceMapping x -> CreateEventSourceMapping
forall x.
CreateEventSourceMapping -> Rep CreateEventSourceMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEventSourceMapping x -> CreateEventSourceMapping
$cfrom :: forall x.
CreateEventSourceMapping -> Rep CreateEventSourceMapping x
Prelude.Generic)
newCreateEventSourceMapping ::
Prelude.Text ->
CreateEventSourceMapping
newCreateEventSourceMapping :: Text -> CreateEventSourceMapping
newCreateEventSourceMapping Text
pFunctionName_ =
CreateEventSourceMapping' :: Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe Bool
-> Maybe Bool
-> Maybe Natural
-> Maybe Int
-> Maybe Natural
-> Maybe Natural
-> Maybe [SourceAccessConfiguration]
-> Maybe Int
-> Maybe [FunctionResponseType]
-> Maybe Natural
-> Maybe SelfManagedEventSource
-> Maybe DestinationConfig
-> Maybe EventSourcePosition
-> Text
-> CreateEventSourceMapping
CreateEventSourceMapping'
{ $sel:eventSourceArn:CreateEventSourceMapping' :: Maybe Text
eventSourceArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: Maybe POSIX
startingPositionTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:topics:CreateEventSourceMapping' :: Maybe (NonEmpty Text)
topics = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:queues:CreateEventSourceMapping' :: Maybe (NonEmpty Text)
queues = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:CreateEventSourceMapping' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: Maybe Bool
bisectBatchOnFunctionError = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parallelizationFactor:CreateEventSourceMapping' :: Maybe Natural
parallelizationFactor = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: Maybe Int
maximumRetryAttempts = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:batchSize:CreateEventSourceMapping' :: Maybe Natural
batchSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: Maybe Natural
maximumBatchingWindowInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations = Maybe [SourceAccessConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: Maybe Int
maximumRecordAgeInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:functionResponseTypes:CreateEventSourceMapping' :: Maybe [FunctionResponseType]
functionResponseTypes = Maybe [FunctionResponseType]
forall a. Maybe a
Prelude.Nothing,
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: Maybe Natural
tumblingWindowInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:selfManagedEventSource:CreateEventSourceMapping' :: Maybe SelfManagedEventSource
selfManagedEventSource = Maybe SelfManagedEventSource
forall a. Maybe a
Prelude.Nothing,
$sel:destinationConfig:CreateEventSourceMapping' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
forall a. Maybe a
Prelude.Nothing,
$sel:startingPosition:CreateEventSourceMapping' :: Maybe EventSourcePosition
startingPosition = Maybe EventSourcePosition
forall a. Maybe a
Prelude.Nothing,
$sel:functionName:CreateEventSourceMapping' :: Text
functionName = Text
pFunctionName_
}
createEventSourceMapping_eventSourceArn :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Text)
createEventSourceMapping_eventSourceArn :: (Maybe Text -> f (Maybe Text))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_eventSourceArn = (CreateEventSourceMapping -> Maybe Text)
-> (CreateEventSourceMapping
-> Maybe Text -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Text
eventSourceArn :: Maybe Text
$sel:eventSourceArn:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Text
eventSourceArn} -> Maybe Text
eventSourceArn) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Text
a -> CreateEventSourceMapping
s {$sel:eventSourceArn:CreateEventSourceMapping' :: Maybe Text
eventSourceArn = Maybe Text
a} :: CreateEventSourceMapping)
createEventSourceMapping_startingPositionTimestamp :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.UTCTime)
createEventSourceMapping_startingPositionTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_startingPositionTimestamp = (CreateEventSourceMapping -> Maybe POSIX)
-> (CreateEventSourceMapping
-> Maybe POSIX -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe POSIX
startingPositionTimestamp :: Maybe POSIX
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe POSIX
startingPositionTimestamp} -> Maybe POSIX
startingPositionTimestamp) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe POSIX
a -> CreateEventSourceMapping
s {$sel:startingPositionTimestamp:CreateEventSourceMapping' :: Maybe POSIX
startingPositionTimestamp = Maybe POSIX
a} :: CreateEventSourceMapping) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateEventSourceMapping -> f CreateEventSourceMapping)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateEventSourceMapping
-> f CreateEventSourceMapping
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createEventSourceMapping_topics :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createEventSourceMapping_topics :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_topics = (CreateEventSourceMapping -> Maybe (NonEmpty Text))
-> (CreateEventSourceMapping
-> Maybe (NonEmpty Text) -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe (NonEmpty Text)
topics :: Maybe (NonEmpty Text)
$sel:topics:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
topics} -> Maybe (NonEmpty Text)
topics) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe (NonEmpty Text)
a -> CreateEventSourceMapping
s {$sel:topics:CreateEventSourceMapping' :: Maybe (NonEmpty Text)
topics = Maybe (NonEmpty Text)
a} :: CreateEventSourceMapping) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateEventSourceMapping -> f CreateEventSourceMapping)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateEventSourceMapping
-> f CreateEventSourceMapping
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_queues :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createEventSourceMapping_queues :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_queues = (CreateEventSourceMapping -> Maybe (NonEmpty Text))
-> (CreateEventSourceMapping
-> Maybe (NonEmpty Text) -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe (NonEmpty Text)
queues :: Maybe (NonEmpty Text)
$sel:queues:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
queues} -> Maybe (NonEmpty Text)
queues) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe (NonEmpty Text)
a -> CreateEventSourceMapping
s {$sel:queues:CreateEventSourceMapping' :: Maybe (NonEmpty Text)
queues = Maybe (NonEmpty Text)
a} :: CreateEventSourceMapping) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateEventSourceMapping -> f CreateEventSourceMapping)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateEventSourceMapping
-> f CreateEventSourceMapping
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_enabled :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Bool)
createEventSourceMapping_enabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_enabled = (CreateEventSourceMapping -> Maybe Bool)
-> (CreateEventSourceMapping
-> Maybe Bool -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Bool
a -> CreateEventSourceMapping
s {$sel:enabled:CreateEventSourceMapping' :: Maybe Bool
enabled = Maybe Bool
a} :: CreateEventSourceMapping)
createEventSourceMapping_bisectBatchOnFunctionError :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Bool)
createEventSourceMapping_bisectBatchOnFunctionError :: (Maybe Bool -> f (Maybe Bool))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_bisectBatchOnFunctionError = (CreateEventSourceMapping -> Maybe Bool)
-> (CreateEventSourceMapping
-> Maybe Bool -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Bool
bisectBatchOnFunctionError :: Maybe Bool
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
bisectBatchOnFunctionError} -> Maybe Bool
bisectBatchOnFunctionError) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Bool
a -> CreateEventSourceMapping
s {$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: Maybe Bool
bisectBatchOnFunctionError = Maybe Bool
a} :: CreateEventSourceMapping)
createEventSourceMapping_parallelizationFactor :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_parallelizationFactor :: (Maybe Natural -> f (Maybe Natural))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_parallelizationFactor = (CreateEventSourceMapping -> Maybe Natural)
-> (CreateEventSourceMapping
-> Maybe Natural -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Natural
parallelizationFactor :: Maybe Natural
$sel:parallelizationFactor:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
parallelizationFactor} -> Maybe Natural
parallelizationFactor) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Natural
a -> CreateEventSourceMapping
s {$sel:parallelizationFactor:CreateEventSourceMapping' :: Maybe Natural
parallelizationFactor = Maybe Natural
a} :: CreateEventSourceMapping)
createEventSourceMapping_maximumRetryAttempts :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Int)
createEventSourceMapping_maximumRetryAttempts :: (Maybe Int -> f (Maybe Int))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_maximumRetryAttempts = (CreateEventSourceMapping -> Maybe Int)
-> (CreateEventSourceMapping
-> Maybe Int -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Int
maximumRetryAttempts :: Maybe Int
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
maximumRetryAttempts} -> Maybe Int
maximumRetryAttempts) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Int
a -> CreateEventSourceMapping
s {$sel:maximumRetryAttempts:CreateEventSourceMapping' :: Maybe Int
maximumRetryAttempts = Maybe Int
a} :: CreateEventSourceMapping)
createEventSourceMapping_batchSize :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_batchSize :: (Maybe Natural -> f (Maybe Natural))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_batchSize = (CreateEventSourceMapping -> Maybe Natural)
-> (CreateEventSourceMapping
-> Maybe Natural -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Natural
batchSize :: Maybe Natural
$sel:batchSize:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
batchSize} -> Maybe Natural
batchSize) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Natural
a -> CreateEventSourceMapping
s {$sel:batchSize:CreateEventSourceMapping' :: Maybe Natural
batchSize = Maybe Natural
a} :: CreateEventSourceMapping)
createEventSourceMapping_maximumBatchingWindowInSeconds :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_maximumBatchingWindowInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_maximumBatchingWindowInSeconds = (CreateEventSourceMapping -> Maybe Natural)
-> (CreateEventSourceMapping
-> Maybe Natural -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Natural
maximumBatchingWindowInSeconds :: Maybe Natural
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
maximumBatchingWindowInSeconds} -> Maybe Natural
maximumBatchingWindowInSeconds) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Natural
a -> CreateEventSourceMapping
s {$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: Maybe Natural
maximumBatchingWindowInSeconds = Maybe Natural
a} :: CreateEventSourceMapping)
createEventSourceMapping_sourceAccessConfigurations :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe [SourceAccessConfiguration])
createEventSourceMapping_sourceAccessConfigurations :: (Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_sourceAccessConfigurations = (CreateEventSourceMapping -> Maybe [SourceAccessConfiguration])
-> (CreateEventSourceMapping
-> Maybe [SourceAccessConfiguration] -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe [SourceAccessConfiguration])
(Maybe [SourceAccessConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations} -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe [SourceAccessConfiguration]
a -> CreateEventSourceMapping
s {$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations = Maybe [SourceAccessConfiguration]
a} :: CreateEventSourceMapping) ((Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> CreateEventSourceMapping -> f CreateEventSourceMapping)
-> ((Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> (Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> CreateEventSourceMapping
-> f CreateEventSourceMapping
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SourceAccessConfiguration]
[SourceAccessConfiguration]
[SourceAccessConfiguration]
[SourceAccessConfiguration]
-> Iso
(Maybe [SourceAccessConfiguration])
(Maybe [SourceAccessConfiguration])
(Maybe [SourceAccessConfiguration])
(Maybe [SourceAccessConfiguration])
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 AnIso
[SourceAccessConfiguration]
[SourceAccessConfiguration]
[SourceAccessConfiguration]
[SourceAccessConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_maximumRecordAgeInSeconds :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Int)
createEventSourceMapping_maximumRecordAgeInSeconds :: (Maybe Int -> f (Maybe Int))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_maximumRecordAgeInSeconds = (CreateEventSourceMapping -> Maybe Int)
-> (CreateEventSourceMapping
-> Maybe Int -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
maximumRecordAgeInSeconds} -> Maybe Int
maximumRecordAgeInSeconds) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Int
a -> CreateEventSourceMapping
s {$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: Maybe Int
maximumRecordAgeInSeconds = Maybe Int
a} :: CreateEventSourceMapping)
createEventSourceMapping_functionResponseTypes :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe [FunctionResponseType])
createEventSourceMapping_functionResponseTypes :: (Maybe [FunctionResponseType] -> f (Maybe [FunctionResponseType]))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_functionResponseTypes = (CreateEventSourceMapping -> Maybe [FunctionResponseType])
-> (CreateEventSourceMapping
-> Maybe [FunctionResponseType] -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe [FunctionResponseType])
(Maybe [FunctionResponseType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe [FunctionResponseType]
functionResponseTypes :: Maybe [FunctionResponseType]
$sel:functionResponseTypes:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [FunctionResponseType]
functionResponseTypes} -> Maybe [FunctionResponseType]
functionResponseTypes) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe [FunctionResponseType]
a -> CreateEventSourceMapping
s {$sel:functionResponseTypes:CreateEventSourceMapping' :: Maybe [FunctionResponseType]
functionResponseTypes = Maybe [FunctionResponseType]
a} :: CreateEventSourceMapping) ((Maybe [FunctionResponseType] -> f (Maybe [FunctionResponseType]))
-> CreateEventSourceMapping -> f CreateEventSourceMapping)
-> ((Maybe [FunctionResponseType]
-> f (Maybe [FunctionResponseType]))
-> Maybe [FunctionResponseType]
-> f (Maybe [FunctionResponseType]))
-> (Maybe [FunctionResponseType]
-> f (Maybe [FunctionResponseType]))
-> CreateEventSourceMapping
-> f CreateEventSourceMapping
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[FunctionResponseType]
[FunctionResponseType]
[FunctionResponseType]
[FunctionResponseType]
-> Iso
(Maybe [FunctionResponseType])
(Maybe [FunctionResponseType])
(Maybe [FunctionResponseType])
(Maybe [FunctionResponseType])
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 AnIso
[FunctionResponseType]
[FunctionResponseType]
[FunctionResponseType]
[FunctionResponseType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_tumblingWindowInSeconds :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_tumblingWindowInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_tumblingWindowInSeconds = (CreateEventSourceMapping -> Maybe Natural)
-> (CreateEventSourceMapping
-> Maybe Natural -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe Natural
tumblingWindowInSeconds :: Maybe Natural
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
tumblingWindowInSeconds} -> Maybe Natural
tumblingWindowInSeconds) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe Natural
a -> CreateEventSourceMapping
s {$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: Maybe Natural
tumblingWindowInSeconds = Maybe Natural
a} :: CreateEventSourceMapping)
createEventSourceMapping_selfManagedEventSource :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe SelfManagedEventSource)
createEventSourceMapping_selfManagedEventSource :: (Maybe SelfManagedEventSource -> f (Maybe SelfManagedEventSource))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_selfManagedEventSource = (CreateEventSourceMapping -> Maybe SelfManagedEventSource)
-> (CreateEventSourceMapping
-> Maybe SelfManagedEventSource -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe SelfManagedEventSource)
(Maybe SelfManagedEventSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe SelfManagedEventSource
selfManagedEventSource :: Maybe SelfManagedEventSource
$sel:selfManagedEventSource:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedEventSource
selfManagedEventSource} -> Maybe SelfManagedEventSource
selfManagedEventSource) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe SelfManagedEventSource
a -> CreateEventSourceMapping
s {$sel:selfManagedEventSource:CreateEventSourceMapping' :: Maybe SelfManagedEventSource
selfManagedEventSource = Maybe SelfManagedEventSource
a} :: CreateEventSourceMapping)
createEventSourceMapping_destinationConfig :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe DestinationConfig)
createEventSourceMapping_destinationConfig :: (Maybe DestinationConfig -> f (Maybe DestinationConfig))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_destinationConfig = (CreateEventSourceMapping -> Maybe DestinationConfig)
-> (CreateEventSourceMapping
-> Maybe DestinationConfig -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe DestinationConfig)
(Maybe DestinationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe DestinationConfig
destinationConfig :: Maybe DestinationConfig
$sel:destinationConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe DestinationConfig
destinationConfig} -> Maybe DestinationConfig
destinationConfig) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe DestinationConfig
a -> CreateEventSourceMapping
s {$sel:destinationConfig:CreateEventSourceMapping' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
a} :: CreateEventSourceMapping)
createEventSourceMapping_startingPosition :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe EventSourcePosition)
createEventSourceMapping_startingPosition :: (Maybe EventSourcePosition -> f (Maybe EventSourcePosition))
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_startingPosition = (CreateEventSourceMapping -> Maybe EventSourcePosition)
-> (CreateEventSourceMapping
-> Maybe EventSourcePosition -> CreateEventSourceMapping)
-> Lens
CreateEventSourceMapping
CreateEventSourceMapping
(Maybe EventSourcePosition)
(Maybe EventSourcePosition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe EventSourcePosition
startingPosition :: Maybe EventSourcePosition
$sel:startingPosition:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe EventSourcePosition
startingPosition} -> Maybe EventSourcePosition
startingPosition) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe EventSourcePosition
a -> CreateEventSourceMapping
s {$sel:startingPosition:CreateEventSourceMapping' :: Maybe EventSourcePosition
startingPosition = Maybe EventSourcePosition
a} :: CreateEventSourceMapping)
createEventSourceMapping_functionName :: Lens.Lens' CreateEventSourceMapping Prelude.Text
createEventSourceMapping_functionName :: (Text -> f Text)
-> CreateEventSourceMapping -> f CreateEventSourceMapping
createEventSourceMapping_functionName = (CreateEventSourceMapping -> Text)
-> (CreateEventSourceMapping -> Text -> CreateEventSourceMapping)
-> Lens CreateEventSourceMapping CreateEventSourceMapping Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Text
functionName :: Text
$sel:functionName:CreateEventSourceMapping' :: CreateEventSourceMapping -> Text
functionName} -> Text
functionName) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Text
a -> CreateEventSourceMapping
s {$sel:functionName:CreateEventSourceMapping' :: Text
functionName = Text
a} :: CreateEventSourceMapping)
instance Core.AWSRequest CreateEventSourceMapping where
type
AWSResponse CreateEventSourceMapping =
EventSourceMappingConfiguration
request :: CreateEventSourceMapping -> Request CreateEventSourceMapping
request = Service
-> CreateEventSourceMapping -> Request CreateEventSourceMapping
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEventSourceMapping)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateEventSourceMapping))
-> Logger
-> Service
-> Proxy CreateEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEventSourceMapping)))
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 CreateEventSourceMapping
instance Prelude.NFData CreateEventSourceMapping
instance Core.ToHeaders CreateEventSourceMapping where
toHeaders :: CreateEventSourceMapping -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateEventSourceMapping -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateEventSourceMapping where
toJSON :: CreateEventSourceMapping -> Value
toJSON CreateEventSourceMapping' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [FunctionResponseType]
Maybe [SourceAccessConfiguration]
Maybe (NonEmpty Text)
Maybe Text
Maybe POSIX
Maybe EventSourcePosition
Maybe DestinationConfig
Maybe SelfManagedEventSource
Text
functionName :: Text
startingPosition :: Maybe EventSourcePosition
destinationConfig :: Maybe DestinationConfig
selfManagedEventSource :: Maybe SelfManagedEventSource
tumblingWindowInSeconds :: Maybe Natural
functionResponseTypes :: Maybe [FunctionResponseType]
maximumRecordAgeInSeconds :: Maybe Int
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
maximumBatchingWindowInSeconds :: Maybe Natural
batchSize :: Maybe Natural
maximumRetryAttempts :: Maybe Int
parallelizationFactor :: Maybe Natural
bisectBatchOnFunctionError :: Maybe Bool
enabled :: Maybe Bool
queues :: Maybe (NonEmpty Text)
topics :: Maybe (NonEmpty Text)
startingPositionTimestamp :: Maybe POSIX
eventSourceArn :: Maybe Text
$sel:functionName:CreateEventSourceMapping' :: CreateEventSourceMapping -> Text
$sel:startingPosition:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe EventSourcePosition
$sel:destinationConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe DestinationConfig
$sel:selfManagedEventSource:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedEventSource
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:functionResponseTypes:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [FunctionResponseType]
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:batchSize:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:parallelizationFactor:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:enabled:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:queues:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:topics:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe POSIX
$sel:eventSourceArn:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EventSourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eventSourceArn,
(Text
"StartingPositionTimestamp" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startingPositionTimestamp,
(Text
"Topics" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
topics,
(Text
"Queues" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
queues,
(Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enabled,
(Text
"BisectBatchOnFunctionError" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
bisectBatchOnFunctionError,
(Text
"ParallelizationFactor" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parallelizationFactor,
(Text
"MaximumRetryAttempts" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumRetryAttempts,
(Text
"BatchSize" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
batchSize,
(Text
"MaximumBatchingWindowInSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumBatchingWindowInSeconds,
(Text
"SourceAccessConfigurations" Text -> [SourceAccessConfiguration] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([SourceAccessConfiguration] -> Pair)
-> Maybe [SourceAccessConfiguration] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations,
(Text
"MaximumRecordAgeInSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumRecordAgeInSeconds,
(Text
"FunctionResponseTypes" Text -> [FunctionResponseType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([FunctionResponseType] -> Pair)
-> Maybe [FunctionResponseType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FunctionResponseType]
functionResponseTypes,
(Text
"TumblingWindowInSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
tumblingWindowInSeconds,
(Text
"SelfManagedEventSource" Text -> SelfManagedEventSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SelfManagedEventSource -> Pair)
-> Maybe SelfManagedEventSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SelfManagedEventSource
selfManagedEventSource,
(Text
"DestinationConfig" Text -> DestinationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DestinationConfig -> Pair)
-> Maybe DestinationConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationConfig
destinationConfig,
(Text
"StartingPosition" Text -> EventSourcePosition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EventSourcePosition -> Pair)
-> Maybe EventSourcePosition -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventSourcePosition
startingPosition,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FunctionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
functionName)
]
)
instance Core.ToPath CreateEventSourceMapping where
toPath :: CreateEventSourceMapping -> ByteString
toPath =
ByteString -> CreateEventSourceMapping -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2015-03-31/event-source-mappings/"
instance Core.ToQuery CreateEventSourceMapping where
toQuery :: CreateEventSourceMapping -> QueryString
toQuery = QueryString -> CreateEventSourceMapping -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty