{-# 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_amazonManagedKafkaEventSourceConfig,
createEventSourceMapping_batchSize,
createEventSourceMapping_bisectBatchOnFunctionError,
createEventSourceMapping_destinationConfig,
createEventSourceMapping_enabled,
createEventSourceMapping_eventSourceArn,
createEventSourceMapping_filterCriteria,
createEventSourceMapping_functionResponseTypes,
createEventSourceMapping_maximumBatchingWindowInSeconds,
createEventSourceMapping_maximumRecordAgeInSeconds,
createEventSourceMapping_maximumRetryAttempts,
createEventSourceMapping_parallelizationFactor,
createEventSourceMapping_queues,
createEventSourceMapping_selfManagedEventSource,
createEventSourceMapping_selfManagedKafkaEventSourceConfig,
createEventSourceMapping_sourceAccessConfigurations,
createEventSourceMapping_startingPosition,
createEventSourceMapping_startingPositionTimestamp,
createEventSourceMapping_topics,
createEventSourceMapping_tumblingWindowInSeconds,
createEventSourceMapping_functionName,
EventSourceMappingConfiguration (..),
newEventSourceMappingConfiguration,
eventSourceMappingConfiguration_amazonManagedKafkaEventSourceConfig,
eventSourceMappingConfiguration_batchSize,
eventSourceMappingConfiguration_bisectBatchOnFunctionError,
eventSourceMappingConfiguration_destinationConfig,
eventSourceMappingConfiguration_eventSourceArn,
eventSourceMappingConfiguration_filterCriteria,
eventSourceMappingConfiguration_functionArn,
eventSourceMappingConfiguration_functionResponseTypes,
eventSourceMappingConfiguration_lastModified,
eventSourceMappingConfiguration_lastProcessingResult,
eventSourceMappingConfiguration_maximumBatchingWindowInSeconds,
eventSourceMappingConfiguration_maximumRecordAgeInSeconds,
eventSourceMappingConfiguration_maximumRetryAttempts,
eventSourceMappingConfiguration_parallelizationFactor,
eventSourceMappingConfiguration_queues,
eventSourceMappingConfiguration_selfManagedEventSource,
eventSourceMappingConfiguration_selfManagedKafkaEventSourceConfig,
eventSourceMappingConfiguration_sourceAccessConfigurations,
eventSourceMappingConfiguration_startingPosition,
eventSourceMappingConfiguration_startingPositionTimestamp,
eventSourceMappingConfiguration_state,
eventSourceMappingConfiguration_stateTransitionReason,
eventSourceMappingConfiguration_topics,
eventSourceMappingConfiguration_tumblingWindowInSeconds,
eventSourceMappingConfiguration_uuid,
)
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 CreateEventSourceMapping = CreateEventSourceMapping'
{
CreateEventSourceMapping
-> Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig :: Prelude.Maybe AmazonManagedKafkaEventSourceConfig,
CreateEventSourceMapping -> Maybe Natural
batchSize :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe Bool
bisectBatchOnFunctionError :: Prelude.Maybe Prelude.Bool,
CreateEventSourceMapping -> Maybe DestinationConfig
destinationConfig :: Prelude.Maybe DestinationConfig,
CreateEventSourceMapping -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
CreateEventSourceMapping -> Maybe Text
eventSourceArn :: Prelude.Maybe Prelude.Text,
CreateEventSourceMapping -> Maybe FilterCriteria
filterCriteria :: Prelude.Maybe FilterCriteria,
CreateEventSourceMapping -> Maybe [FunctionResponseType]
functionResponseTypes :: Prelude.Maybe [FunctionResponseType],
CreateEventSourceMapping -> Maybe Natural
maximumBatchingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe Int
maximumRecordAgeInSeconds :: Prelude.Maybe Prelude.Int,
CreateEventSourceMapping -> Maybe Int
maximumRetryAttempts :: Prelude.Maybe Prelude.Int,
CreateEventSourceMapping -> Maybe Natural
parallelizationFactor :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Maybe (NonEmpty Text)
queues :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateEventSourceMapping -> Maybe SelfManagedEventSource
selfManagedEventSource :: Prelude.Maybe SelfManagedEventSource,
CreateEventSourceMapping -> Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig :: Prelude.Maybe SelfManagedKafkaEventSourceConfig,
CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Prelude.Maybe [SourceAccessConfiguration],
CreateEventSourceMapping -> Maybe EventSourcePosition
startingPosition :: Prelude.Maybe EventSourcePosition,
CreateEventSourceMapping -> Maybe POSIX
startingPositionTimestamp :: Prelude.Maybe Data.POSIX,
CreateEventSourceMapping -> Maybe (NonEmpty Text)
topics :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateEventSourceMapping -> Maybe Natural
tumblingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
CreateEventSourceMapping -> Text
functionName :: Prelude.Text
}
deriving (CreateEventSourceMapping -> CreateEventSourceMapping -> Bool
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]
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
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.
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'
{ $sel:amazonManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:batchSize:CreateEventSourceMapping' :: Maybe Natural
batchSize = forall a. Maybe a
Prelude.Nothing,
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: Maybe Bool
bisectBatchOnFunctionError = forall a. Maybe a
Prelude.Nothing,
$sel:destinationConfig:CreateEventSourceMapping' :: Maybe DestinationConfig
destinationConfig = forall a. Maybe a
Prelude.Nothing,
$sel:enabled:CreateEventSourceMapping' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
$sel:eventSourceArn:CreateEventSourceMapping' :: Maybe Text
eventSourceArn = forall a. Maybe a
Prelude.Nothing,
$sel:filterCriteria:CreateEventSourceMapping' :: Maybe FilterCriteria
filterCriteria = forall a. Maybe a
Prelude.Nothing,
$sel:functionResponseTypes:CreateEventSourceMapping' :: Maybe [FunctionResponseType]
functionResponseTypes = forall a. Maybe a
Prelude.Nothing,
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: Maybe Natural
maximumBatchingWindowInSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: Maybe Int
maximumRecordAgeInSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: Maybe Int
maximumRetryAttempts = forall a. Maybe a
Prelude.Nothing,
$sel:parallelizationFactor:CreateEventSourceMapping' :: Maybe Natural
parallelizationFactor = forall a. Maybe a
Prelude.Nothing,
$sel:queues:CreateEventSourceMapping' :: Maybe (NonEmpty Text)
queues = forall a. Maybe a
Prelude.Nothing,
$sel:selfManagedEventSource:CreateEventSourceMapping' :: Maybe SelfManagedEventSource
selfManagedEventSource = forall a. Maybe a
Prelude.Nothing,
$sel:selfManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations = forall a. Maybe a
Prelude.Nothing,
$sel:startingPosition:CreateEventSourceMapping' :: Maybe EventSourcePosition
startingPosition = forall a. Maybe a
Prelude.Nothing,
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: Maybe POSIX
startingPositionTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:topics:CreateEventSourceMapping' :: Maybe (NonEmpty Text)
topics = forall a. Maybe a
Prelude.Nothing,
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: Maybe Natural
tumblingWindowInSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:functionName:CreateEventSourceMapping' :: Text
functionName = Text
pFunctionName_
}
createEventSourceMapping_amazonManagedKafkaEventSourceConfig :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe AmazonManagedKafkaEventSourceConfig)
createEventSourceMapping_amazonManagedKafkaEventSourceConfig :: Lens'
CreateEventSourceMapping
(Maybe AmazonManagedKafkaEventSourceConfig)
createEventSourceMapping_amazonManagedKafkaEventSourceConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig :: Maybe AmazonManagedKafkaEventSourceConfig
$sel:amazonManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping
-> Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig} -> Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe AmazonManagedKafkaEventSourceConfig
a -> CreateEventSourceMapping
s {$sel:amazonManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig = Maybe AmazonManagedKafkaEventSourceConfig
a} :: CreateEventSourceMapping)
createEventSourceMapping_batchSize :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_batchSize :: Lens' CreateEventSourceMapping (Maybe Natural)
createEventSourceMapping_batchSize = 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_bisectBatchOnFunctionError :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Bool)
createEventSourceMapping_bisectBatchOnFunctionError :: Lens' CreateEventSourceMapping (Maybe Bool)
createEventSourceMapping_bisectBatchOnFunctionError = 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_destinationConfig :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe DestinationConfig)
createEventSourceMapping_destinationConfig :: Lens' CreateEventSourceMapping (Maybe DestinationConfig)
createEventSourceMapping_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_enabled :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Bool)
createEventSourceMapping_enabled :: Lens' CreateEventSourceMapping (Maybe Bool)
createEventSourceMapping_enabled = 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_eventSourceArn :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Text)
createEventSourceMapping_eventSourceArn :: Lens' CreateEventSourceMapping (Maybe Text)
createEventSourceMapping_eventSourceArn = 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_filterCriteria :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe FilterCriteria)
createEventSourceMapping_filterCriteria :: Lens' CreateEventSourceMapping (Maybe FilterCriteria)
createEventSourceMapping_filterCriteria = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe FilterCriteria
filterCriteria :: Maybe FilterCriteria
$sel:filterCriteria:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe FilterCriteria
filterCriteria} -> Maybe FilterCriteria
filterCriteria) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe FilterCriteria
a -> CreateEventSourceMapping
s {$sel:filterCriteria:CreateEventSourceMapping' :: Maybe FilterCriteria
filterCriteria = Maybe FilterCriteria
a} :: CreateEventSourceMapping)
createEventSourceMapping_functionResponseTypes :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe [FunctionResponseType])
createEventSourceMapping_functionResponseTypes :: Lens' CreateEventSourceMapping (Maybe [FunctionResponseType])
createEventSourceMapping_functionResponseTypes = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_maximumBatchingWindowInSeconds :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_maximumBatchingWindowInSeconds :: Lens' CreateEventSourceMapping (Maybe Natural)
createEventSourceMapping_maximumBatchingWindowInSeconds = 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_maximumRecordAgeInSeconds :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Int)
createEventSourceMapping_maximumRecordAgeInSeconds :: Lens' CreateEventSourceMapping (Maybe Int)
createEventSourceMapping_maximumRecordAgeInSeconds = 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_maximumRetryAttempts :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Int)
createEventSourceMapping_maximumRetryAttempts :: Lens' CreateEventSourceMapping (Maybe Int)
createEventSourceMapping_maximumRetryAttempts = 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_parallelizationFactor :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.Natural)
createEventSourceMapping_parallelizationFactor :: Lens' CreateEventSourceMapping (Maybe Natural)
createEventSourceMapping_parallelizationFactor = 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_queues :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createEventSourceMapping_queues :: Lens' CreateEventSourceMapping (Maybe (NonEmpty Text))
createEventSourceMapping_queues = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_selfManagedEventSource :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe SelfManagedEventSource)
createEventSourceMapping_selfManagedEventSource :: Lens' CreateEventSourceMapping (Maybe SelfManagedEventSource)
createEventSourceMapping_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_selfManagedKafkaEventSourceConfig :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe SelfManagedKafkaEventSourceConfig)
createEventSourceMapping_selfManagedKafkaEventSourceConfig :: Lens'
CreateEventSourceMapping (Maybe SelfManagedKafkaEventSourceConfig)
createEventSourceMapping_selfManagedKafkaEventSourceConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEventSourceMapping' {Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig :: Maybe SelfManagedKafkaEventSourceConfig
$sel:selfManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig} -> Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig) (\s :: CreateEventSourceMapping
s@CreateEventSourceMapping' {} Maybe SelfManagedKafkaEventSourceConfig
a -> CreateEventSourceMapping
s {$sel:selfManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig = Maybe SelfManagedKafkaEventSourceConfig
a} :: CreateEventSourceMapping)
createEventSourceMapping_sourceAccessConfigurations :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe [SourceAccessConfiguration])
createEventSourceMapping_sourceAccessConfigurations :: Lens' CreateEventSourceMapping (Maybe [SourceAccessConfiguration])
createEventSourceMapping_sourceAccessConfigurations = 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) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createEventSourceMapping_startingPosition :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe EventSourcePosition)
createEventSourceMapping_startingPosition :: Lens' CreateEventSourceMapping (Maybe EventSourcePosition)
createEventSourceMapping_startingPosition = 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_startingPositionTimestamp :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe Prelude.UTCTime)
createEventSourceMapping_startingPositionTimestamp :: Lens' CreateEventSourceMapping (Maybe UTCTime)
createEventSourceMapping_startingPositionTimestamp = 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) 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
createEventSourceMapping_topics :: Lens.Lens' CreateEventSourceMapping (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createEventSourceMapping_topics :: Lens' CreateEventSourceMapping (Maybe (NonEmpty Text))
createEventSourceMapping_topics = 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) 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 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 :: Lens' CreateEventSourceMapping (Maybe Natural)
createEventSourceMapping_tumblingWindowInSeconds = 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_functionName :: Lens.Lens' CreateEventSourceMapping Prelude.Text
createEventSourceMapping_functionName :: Lens' CreateEventSourceMapping Text
createEventSourceMapping_functionName = 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 :: (Service -> Service)
-> CreateEventSourceMapping -> Request CreateEventSourceMapping
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEventSourceMapping)))
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 CreateEventSourceMapping where
hashWithSalt :: Int -> CreateEventSourceMapping -> Int
hashWithSalt Int
_salt CreateEventSourceMapping' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [FunctionResponseType]
Maybe [SourceAccessConfiguration]
Maybe (NonEmpty Text)
Maybe Text
Maybe POSIX
Maybe AmazonManagedKafkaEventSourceConfig
Maybe EventSourcePosition
Maybe FilterCriteria
Maybe DestinationConfig
Maybe SelfManagedEventSource
Maybe SelfManagedKafkaEventSourceConfig
Text
functionName :: Text
tumblingWindowInSeconds :: Maybe Natural
topics :: Maybe (NonEmpty Text)
startingPositionTimestamp :: Maybe POSIX
startingPosition :: Maybe EventSourcePosition
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
selfManagedKafkaEventSourceConfig :: Maybe SelfManagedKafkaEventSourceConfig
selfManagedEventSource :: Maybe SelfManagedEventSource
queues :: Maybe (NonEmpty Text)
parallelizationFactor :: Maybe Natural
maximumRetryAttempts :: Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
maximumBatchingWindowInSeconds :: Maybe Natural
functionResponseTypes :: Maybe [FunctionResponseType]
filterCriteria :: Maybe FilterCriteria
eventSourceArn :: Maybe Text
enabled :: Maybe Bool
destinationConfig :: Maybe DestinationConfig
bisectBatchOnFunctionError :: Maybe Bool
batchSize :: Maybe Natural
amazonManagedKafkaEventSourceConfig :: Maybe AmazonManagedKafkaEventSourceConfig
$sel:functionName:CreateEventSourceMapping' :: CreateEventSourceMapping -> Text
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:topics:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe POSIX
$sel:startingPosition:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe EventSourcePosition
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
$sel:selfManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedKafkaEventSourceConfig
$sel:selfManagedEventSource:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedEventSource
$sel:queues:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:parallelizationFactor:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:functionResponseTypes:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [FunctionResponseType]
$sel:filterCriteria:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe FilterCriteria
$sel:eventSourceArn:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Text
$sel:enabled:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:destinationConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe DestinationConfig
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:batchSize:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:amazonManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping
-> Maybe AmazonManagedKafkaEventSourceConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
batchSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
bisectBatchOnFunctionError
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationConfig
destinationConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
eventSourceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FilterCriteria
filterCriteria
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [FunctionResponseType]
functionResponseTypes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumBatchingWindowInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maximumRecordAgeInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maximumRetryAttempts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
parallelizationFactor
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
queues
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SelfManagedEventSource
selfManagedEventSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SourceAccessConfiguration]
sourceAccessConfigurations
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EventSourcePosition
startingPosition
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startingPositionTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
topics
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
tumblingWindowInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionName
instance Prelude.NFData CreateEventSourceMapping where
rnf :: CreateEventSourceMapping -> ()
rnf CreateEventSourceMapping' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [FunctionResponseType]
Maybe [SourceAccessConfiguration]
Maybe (NonEmpty Text)
Maybe Text
Maybe POSIX
Maybe AmazonManagedKafkaEventSourceConfig
Maybe EventSourcePosition
Maybe FilterCriteria
Maybe DestinationConfig
Maybe SelfManagedEventSource
Maybe SelfManagedKafkaEventSourceConfig
Text
functionName :: Text
tumblingWindowInSeconds :: Maybe Natural
topics :: Maybe (NonEmpty Text)
startingPositionTimestamp :: Maybe POSIX
startingPosition :: Maybe EventSourcePosition
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
selfManagedKafkaEventSourceConfig :: Maybe SelfManagedKafkaEventSourceConfig
selfManagedEventSource :: Maybe SelfManagedEventSource
queues :: Maybe (NonEmpty Text)
parallelizationFactor :: Maybe Natural
maximumRetryAttempts :: Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
maximumBatchingWindowInSeconds :: Maybe Natural
functionResponseTypes :: Maybe [FunctionResponseType]
filterCriteria :: Maybe FilterCriteria
eventSourceArn :: Maybe Text
enabled :: Maybe Bool
destinationConfig :: Maybe DestinationConfig
bisectBatchOnFunctionError :: Maybe Bool
batchSize :: Maybe Natural
amazonManagedKafkaEventSourceConfig :: Maybe AmazonManagedKafkaEventSourceConfig
$sel:functionName:CreateEventSourceMapping' :: CreateEventSourceMapping -> Text
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:topics:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe POSIX
$sel:startingPosition:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe EventSourcePosition
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
$sel:selfManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedKafkaEventSourceConfig
$sel:selfManagedEventSource:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedEventSource
$sel:queues:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:parallelizationFactor:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:functionResponseTypes:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [FunctionResponseType]
$sel:filterCriteria:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe FilterCriteria
$sel:eventSourceArn:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Text
$sel:enabled:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:destinationConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe DestinationConfig
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:batchSize:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:amazonManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping
-> Maybe AmazonManagedKafkaEventSourceConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
batchSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
bisectBatchOnFunctionError
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Bool
enabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eventSourceArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FilterCriteria
filterCriteria
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [FunctionResponseType]
functionResponseTypes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumBatchingWindowInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maximumRecordAgeInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maximumRetryAttempts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
parallelizationFactor
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
queues
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SelfManagedEventSource
selfManagedEventSource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SourceAccessConfiguration]
sourceAccessConfigurations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EventSourcePosition
startingPosition
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe POSIX
startingPositionTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
topics
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe Natural
tumblingWindowInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionName
instance Data.ToHeaders CreateEventSourceMapping where
toHeaders :: CreateEventSourceMapping -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.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 AmazonManagedKafkaEventSourceConfig
Maybe EventSourcePosition
Maybe FilterCriteria
Maybe DestinationConfig
Maybe SelfManagedEventSource
Maybe SelfManagedKafkaEventSourceConfig
Text
functionName :: Text
tumblingWindowInSeconds :: Maybe Natural
topics :: Maybe (NonEmpty Text)
startingPositionTimestamp :: Maybe POSIX
startingPosition :: Maybe EventSourcePosition
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
selfManagedKafkaEventSourceConfig :: Maybe SelfManagedKafkaEventSourceConfig
selfManagedEventSource :: Maybe SelfManagedEventSource
queues :: Maybe (NonEmpty Text)
parallelizationFactor :: Maybe Natural
maximumRetryAttempts :: Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
maximumBatchingWindowInSeconds :: Maybe Natural
functionResponseTypes :: Maybe [FunctionResponseType]
filterCriteria :: Maybe FilterCriteria
eventSourceArn :: Maybe Text
enabled :: Maybe Bool
destinationConfig :: Maybe DestinationConfig
bisectBatchOnFunctionError :: Maybe Bool
batchSize :: Maybe Natural
amazonManagedKafkaEventSourceConfig :: Maybe AmazonManagedKafkaEventSourceConfig
$sel:functionName:CreateEventSourceMapping' :: CreateEventSourceMapping -> Text
$sel:tumblingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:topics:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:startingPositionTimestamp:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe POSIX
$sel:startingPosition:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe EventSourcePosition
$sel:sourceAccessConfigurations:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [SourceAccessConfiguration]
$sel:selfManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedKafkaEventSourceConfig
$sel:selfManagedEventSource:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe SelfManagedEventSource
$sel:queues:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe (NonEmpty Text)
$sel:parallelizationFactor:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:maximumRetryAttempts:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:maximumRecordAgeInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Int
$sel:maximumBatchingWindowInSeconds:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:functionResponseTypes:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe [FunctionResponseType]
$sel:filterCriteria:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe FilterCriteria
$sel:eventSourceArn:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Text
$sel:enabled:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:destinationConfig:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe DestinationConfig
$sel:bisectBatchOnFunctionError:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Bool
$sel:batchSize:CreateEventSourceMapping' :: CreateEventSourceMapping -> Maybe Natural
$sel:amazonManagedKafkaEventSourceConfig:CreateEventSourceMapping' :: CreateEventSourceMapping
-> Maybe AmazonManagedKafkaEventSourceConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AmazonManagedKafkaEventSourceConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmazonManagedKafkaEventSourceConfig
amazonManagedKafkaEventSourceConfig,
(Key
"BatchSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
batchSize,
(Key
"BisectBatchOnFunctionError" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
bisectBatchOnFunctionError,
(Key
"DestinationConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationConfig
destinationConfig,
(Key
"Enabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enabled,
(Key
"EventSourceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eventSourceArn,
(Key
"FilterCriteria" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterCriteria
filterCriteria,
(Key
"FunctionResponseTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FunctionResponseType]
functionResponseTypes,
(Key
"MaximumBatchingWindowInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumBatchingWindowInSeconds,
(Key
"MaximumRecordAgeInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumRecordAgeInSeconds,
(Key
"MaximumRetryAttempts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumRetryAttempts,
(Key
"ParallelizationFactor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parallelizationFactor,
(Key
"Queues" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
queues,
(Key
"SelfManagedEventSource" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SelfManagedEventSource
selfManagedEventSource,
(Key
"SelfManagedKafkaEventSourceConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SelfManagedKafkaEventSourceConfig
selfManagedKafkaEventSourceConfig,
(Key
"SourceAccessConfigurations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations,
(Key
"StartingPosition" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventSourcePosition
startingPosition,
(Key
"StartingPositionTimestamp" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startingPositionTimestamp,
(Key
"Topics" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
topics,
(Key
"TumblingWindowInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
tumblingWindowInSeconds,
forall a. a -> Maybe a
Prelude.Just (Key
"FunctionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
functionName)
]
)
instance Data.ToPath CreateEventSourceMapping where
toPath :: CreateEventSourceMapping -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/2015-03-31/event-source-mappings/"
instance Data.ToQuery CreateEventSourceMapping where
toQuery :: CreateEventSourceMapping -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty