{-# 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.UpdateEventSourceMapping
(
UpdateEventSourceMapping (..),
newUpdateEventSourceMapping,
updateEventSourceMapping_enabled,
updateEventSourceMapping_bisectBatchOnFunctionError,
updateEventSourceMapping_parallelizationFactor,
updateEventSourceMapping_maximumRetryAttempts,
updateEventSourceMapping_batchSize,
updateEventSourceMapping_maximumBatchingWindowInSeconds,
updateEventSourceMapping_sourceAccessConfigurations,
updateEventSourceMapping_maximumRecordAgeInSeconds,
updateEventSourceMapping_functionResponseTypes,
updateEventSourceMapping_tumblingWindowInSeconds,
updateEventSourceMapping_functionName,
updateEventSourceMapping_destinationConfig,
updateEventSourceMapping_uuid,
EventSourceMappingConfiguration (..),
newEventSourceMappingConfiguration,
eventSourceMappingConfiguration_eventSourceArn,
eventSourceMappingConfiguration_state,
eventSourceMappingConfiguration_startingPositionTimestamp,
eventSourceMappingConfiguration_functionArn,
eventSourceMappingConfiguration_topics,
eventSourceMappingConfiguration_queues,
eventSourceMappingConfiguration_bisectBatchOnFunctionError,
eventSourceMappingConfiguration_uuid,
eventSourceMappingConfiguration_parallelizationFactor,
eventSourceMappingConfiguration_lastProcessingResult,
eventSourceMappingConfiguration_maximumRetryAttempts,
eventSourceMappingConfiguration_batchSize,
eventSourceMappingConfiguration_stateTransitionReason,
eventSourceMappingConfiguration_maximumBatchingWindowInSeconds,
eventSourceMappingConfiguration_sourceAccessConfigurations,
eventSourceMappingConfiguration_maximumRecordAgeInSeconds,
eventSourceMappingConfiguration_functionResponseTypes,
eventSourceMappingConfiguration_tumblingWindowInSeconds,
eventSourceMappingConfiguration_selfManagedEventSource,
eventSourceMappingConfiguration_lastModified,
eventSourceMappingConfiguration_destinationConfig,
eventSourceMappingConfiguration_startingPosition,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateEventSourceMapping = UpdateEventSourceMapping'
{
UpdateEventSourceMapping -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
UpdateEventSourceMapping -> Maybe Bool
bisectBatchOnFunctionError :: Prelude.Maybe Prelude.Bool,
UpdateEventSourceMapping -> Maybe Natural
parallelizationFactor :: Prelude.Maybe Prelude.Natural,
UpdateEventSourceMapping -> Maybe Int
maximumRetryAttempts :: Prelude.Maybe Prelude.Int,
UpdateEventSourceMapping -> Maybe Natural
batchSize :: Prelude.Maybe Prelude.Natural,
UpdateEventSourceMapping -> Maybe Natural
maximumBatchingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
UpdateEventSourceMapping -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Prelude.Maybe [SourceAccessConfiguration],
UpdateEventSourceMapping -> Maybe Int
maximumRecordAgeInSeconds :: Prelude.Maybe Prelude.Int,
UpdateEventSourceMapping -> Maybe [FunctionResponseType]
functionResponseTypes :: Prelude.Maybe [FunctionResponseType],
UpdateEventSourceMapping -> Maybe Natural
tumblingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
UpdateEventSourceMapping -> Maybe Text
functionName :: Prelude.Maybe Prelude.Text,
UpdateEventSourceMapping -> Maybe DestinationConfig
destinationConfig :: Prelude.Maybe DestinationConfig,
UpdateEventSourceMapping -> Text
uuid :: Prelude.Text
}
deriving (UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool
(UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool)
-> (UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool)
-> Eq UpdateEventSourceMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool
$c/= :: UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool
== :: UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool
$c== :: UpdateEventSourceMapping -> UpdateEventSourceMapping -> Bool
Prelude.Eq, ReadPrec [UpdateEventSourceMapping]
ReadPrec UpdateEventSourceMapping
Int -> ReadS UpdateEventSourceMapping
ReadS [UpdateEventSourceMapping]
(Int -> ReadS UpdateEventSourceMapping)
-> ReadS [UpdateEventSourceMapping]
-> ReadPrec UpdateEventSourceMapping
-> ReadPrec [UpdateEventSourceMapping]
-> Read UpdateEventSourceMapping
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEventSourceMapping]
$creadListPrec :: ReadPrec [UpdateEventSourceMapping]
readPrec :: ReadPrec UpdateEventSourceMapping
$creadPrec :: ReadPrec UpdateEventSourceMapping
readList :: ReadS [UpdateEventSourceMapping]
$creadList :: ReadS [UpdateEventSourceMapping]
readsPrec :: Int -> ReadS UpdateEventSourceMapping
$creadsPrec :: Int -> ReadS UpdateEventSourceMapping
Prelude.Read, Int -> UpdateEventSourceMapping -> ShowS
[UpdateEventSourceMapping] -> ShowS
UpdateEventSourceMapping -> String
(Int -> UpdateEventSourceMapping -> ShowS)
-> (UpdateEventSourceMapping -> String)
-> ([UpdateEventSourceMapping] -> ShowS)
-> Show UpdateEventSourceMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEventSourceMapping] -> ShowS
$cshowList :: [UpdateEventSourceMapping] -> ShowS
show :: UpdateEventSourceMapping -> String
$cshow :: UpdateEventSourceMapping -> String
showsPrec :: Int -> UpdateEventSourceMapping -> ShowS
$cshowsPrec :: Int -> UpdateEventSourceMapping -> ShowS
Prelude.Show, (forall x.
UpdateEventSourceMapping -> Rep UpdateEventSourceMapping x)
-> (forall x.
Rep UpdateEventSourceMapping x -> UpdateEventSourceMapping)
-> Generic UpdateEventSourceMapping
forall x.
Rep UpdateEventSourceMapping x -> UpdateEventSourceMapping
forall x.
UpdateEventSourceMapping -> Rep UpdateEventSourceMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEventSourceMapping x -> UpdateEventSourceMapping
$cfrom :: forall x.
UpdateEventSourceMapping -> Rep UpdateEventSourceMapping x
Prelude.Generic)
newUpdateEventSourceMapping ::
Prelude.Text ->
UpdateEventSourceMapping
newUpdateEventSourceMapping :: Text -> UpdateEventSourceMapping
newUpdateEventSourceMapping Text
pUUID_ =
UpdateEventSourceMapping' :: Maybe Bool
-> Maybe Bool
-> Maybe Natural
-> Maybe Int
-> Maybe Natural
-> Maybe Natural
-> Maybe [SourceAccessConfiguration]
-> Maybe Int
-> Maybe [FunctionResponseType]
-> Maybe Natural
-> Maybe Text
-> Maybe DestinationConfig
-> Text
-> UpdateEventSourceMapping
UpdateEventSourceMapping'
{ $sel:enabled:UpdateEventSourceMapping' :: Maybe Bool
enabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:bisectBatchOnFunctionError:UpdateEventSourceMapping' :: Maybe Bool
bisectBatchOnFunctionError = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parallelizationFactor:UpdateEventSourceMapping' :: Maybe Natural
parallelizationFactor = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:maximumRetryAttempts:UpdateEventSourceMapping' :: Maybe Int
maximumRetryAttempts = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:batchSize:UpdateEventSourceMapping' :: Maybe Natural
batchSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:maximumBatchingWindowInSeconds:UpdateEventSourceMapping' :: Maybe Natural
maximumBatchingWindowInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sourceAccessConfigurations:UpdateEventSourceMapping' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations = Maybe [SourceAccessConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:maximumRecordAgeInSeconds:UpdateEventSourceMapping' :: Maybe Int
maximumRecordAgeInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:functionResponseTypes:UpdateEventSourceMapping' :: Maybe [FunctionResponseType]
functionResponseTypes = Maybe [FunctionResponseType]
forall a. Maybe a
Prelude.Nothing,
$sel:tumblingWindowInSeconds:UpdateEventSourceMapping' :: Maybe Natural
tumblingWindowInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:functionName:UpdateEventSourceMapping' :: Maybe Text
functionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinationConfig:UpdateEventSourceMapping' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
forall a. Maybe a
Prelude.Nothing,
$sel:uuid:UpdateEventSourceMapping' :: Text
uuid = Text
pUUID_
}
updateEventSourceMapping_enabled :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Bool)
updateEventSourceMapping_enabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_enabled = (UpdateEventSourceMapping -> Maybe Bool)
-> (UpdateEventSourceMapping
-> Maybe Bool -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Bool
a -> UpdateEventSourceMapping
s {$sel:enabled:UpdateEventSourceMapping' :: Maybe Bool
enabled = Maybe Bool
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_bisectBatchOnFunctionError :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Bool)
updateEventSourceMapping_bisectBatchOnFunctionError :: (Maybe Bool -> f (Maybe Bool))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_bisectBatchOnFunctionError = (UpdateEventSourceMapping -> Maybe Bool)
-> (UpdateEventSourceMapping
-> Maybe Bool -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Bool
bisectBatchOnFunctionError :: Maybe Bool
$sel:bisectBatchOnFunctionError:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Bool
bisectBatchOnFunctionError} -> Maybe Bool
bisectBatchOnFunctionError) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Bool
a -> UpdateEventSourceMapping
s {$sel:bisectBatchOnFunctionError:UpdateEventSourceMapping' :: Maybe Bool
bisectBatchOnFunctionError = Maybe Bool
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_parallelizationFactor :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Natural)
updateEventSourceMapping_parallelizationFactor :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_parallelizationFactor = (UpdateEventSourceMapping -> Maybe Natural)
-> (UpdateEventSourceMapping
-> Maybe Natural -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Natural
parallelizationFactor :: Maybe Natural
$sel:parallelizationFactor:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
parallelizationFactor} -> Maybe Natural
parallelizationFactor) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Natural
a -> UpdateEventSourceMapping
s {$sel:parallelizationFactor:UpdateEventSourceMapping' :: Maybe Natural
parallelizationFactor = Maybe Natural
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_maximumRetryAttempts :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Int)
updateEventSourceMapping_maximumRetryAttempts :: (Maybe Int -> f (Maybe Int))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_maximumRetryAttempts = (UpdateEventSourceMapping -> Maybe Int)
-> (UpdateEventSourceMapping
-> Maybe Int -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Int
maximumRetryAttempts :: Maybe Int
$sel:maximumRetryAttempts:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Int
maximumRetryAttempts} -> Maybe Int
maximumRetryAttempts) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Int
a -> UpdateEventSourceMapping
s {$sel:maximumRetryAttempts:UpdateEventSourceMapping' :: Maybe Int
maximumRetryAttempts = Maybe Int
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_batchSize :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Natural)
updateEventSourceMapping_batchSize :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_batchSize = (UpdateEventSourceMapping -> Maybe Natural)
-> (UpdateEventSourceMapping
-> Maybe Natural -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Natural
batchSize :: Maybe Natural
$sel:batchSize:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
batchSize} -> Maybe Natural
batchSize) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Natural
a -> UpdateEventSourceMapping
s {$sel:batchSize:UpdateEventSourceMapping' :: Maybe Natural
batchSize = Maybe Natural
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_maximumBatchingWindowInSeconds :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Natural)
updateEventSourceMapping_maximumBatchingWindowInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_maximumBatchingWindowInSeconds = (UpdateEventSourceMapping -> Maybe Natural)
-> (UpdateEventSourceMapping
-> Maybe Natural -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Natural
maximumBatchingWindowInSeconds :: Maybe Natural
$sel:maximumBatchingWindowInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
maximumBatchingWindowInSeconds} -> Maybe Natural
maximumBatchingWindowInSeconds) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Natural
a -> UpdateEventSourceMapping
s {$sel:maximumBatchingWindowInSeconds:UpdateEventSourceMapping' :: Maybe Natural
maximumBatchingWindowInSeconds = Maybe Natural
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_sourceAccessConfigurations :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe [SourceAccessConfiguration])
updateEventSourceMapping_sourceAccessConfigurations :: (Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_sourceAccessConfigurations = (UpdateEventSourceMapping -> Maybe [SourceAccessConfiguration])
-> (UpdateEventSourceMapping
-> Maybe [SourceAccessConfiguration] -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe [SourceAccessConfiguration])
(Maybe [SourceAccessConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
$sel:sourceAccessConfigurations:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations} -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe [SourceAccessConfiguration]
a -> UpdateEventSourceMapping
s {$sel:sourceAccessConfigurations:UpdateEventSourceMapping' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations = Maybe [SourceAccessConfiguration]
a} :: UpdateEventSourceMapping) ((Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping)
-> ((Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> (Maybe [SourceAccessConfiguration]
-> f (Maybe [SourceAccessConfiguration]))
-> UpdateEventSourceMapping
-> f UpdateEventSourceMapping
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
updateEventSourceMapping_maximumRecordAgeInSeconds :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Int)
updateEventSourceMapping_maximumRecordAgeInSeconds :: (Maybe Int -> f (Maybe Int))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_maximumRecordAgeInSeconds = (UpdateEventSourceMapping -> Maybe Int)
-> (UpdateEventSourceMapping
-> Maybe Int -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
$sel:maximumRecordAgeInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Int
maximumRecordAgeInSeconds} -> Maybe Int
maximumRecordAgeInSeconds) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Int
a -> UpdateEventSourceMapping
s {$sel:maximumRecordAgeInSeconds:UpdateEventSourceMapping' :: Maybe Int
maximumRecordAgeInSeconds = Maybe Int
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_functionResponseTypes :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe [FunctionResponseType])
updateEventSourceMapping_functionResponseTypes :: (Maybe [FunctionResponseType] -> f (Maybe [FunctionResponseType]))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_functionResponseTypes = (UpdateEventSourceMapping -> Maybe [FunctionResponseType])
-> (UpdateEventSourceMapping
-> Maybe [FunctionResponseType] -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe [FunctionResponseType])
(Maybe [FunctionResponseType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe [FunctionResponseType]
functionResponseTypes :: Maybe [FunctionResponseType]
$sel:functionResponseTypes:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe [FunctionResponseType]
functionResponseTypes} -> Maybe [FunctionResponseType]
functionResponseTypes) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe [FunctionResponseType]
a -> UpdateEventSourceMapping
s {$sel:functionResponseTypes:UpdateEventSourceMapping' :: Maybe [FunctionResponseType]
functionResponseTypes = Maybe [FunctionResponseType]
a} :: UpdateEventSourceMapping) ((Maybe [FunctionResponseType] -> f (Maybe [FunctionResponseType]))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping)
-> ((Maybe [FunctionResponseType]
-> f (Maybe [FunctionResponseType]))
-> Maybe [FunctionResponseType]
-> f (Maybe [FunctionResponseType]))
-> (Maybe [FunctionResponseType]
-> f (Maybe [FunctionResponseType]))
-> UpdateEventSourceMapping
-> f UpdateEventSourceMapping
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
updateEventSourceMapping_tumblingWindowInSeconds :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Natural)
updateEventSourceMapping_tumblingWindowInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_tumblingWindowInSeconds = (UpdateEventSourceMapping -> Maybe Natural)
-> (UpdateEventSourceMapping
-> Maybe Natural -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Natural
tumblingWindowInSeconds :: Maybe Natural
$sel:tumblingWindowInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
tumblingWindowInSeconds} -> Maybe Natural
tumblingWindowInSeconds) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Natural
a -> UpdateEventSourceMapping
s {$sel:tumblingWindowInSeconds:UpdateEventSourceMapping' :: Maybe Natural
tumblingWindowInSeconds = Maybe Natural
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_functionName :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe Prelude.Text)
updateEventSourceMapping_functionName :: (Maybe Text -> f (Maybe Text))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_functionName = (UpdateEventSourceMapping -> Maybe Text)
-> (UpdateEventSourceMapping
-> Maybe Text -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe Text
functionName :: Maybe Text
$sel:functionName:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Text
functionName} -> Maybe Text
functionName) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe Text
a -> UpdateEventSourceMapping
s {$sel:functionName:UpdateEventSourceMapping' :: Maybe Text
functionName = Maybe Text
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_destinationConfig :: Lens.Lens' UpdateEventSourceMapping (Prelude.Maybe DestinationConfig)
updateEventSourceMapping_destinationConfig :: (Maybe DestinationConfig -> f (Maybe DestinationConfig))
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_destinationConfig = (UpdateEventSourceMapping -> Maybe DestinationConfig)
-> (UpdateEventSourceMapping
-> Maybe DestinationConfig -> UpdateEventSourceMapping)
-> Lens
UpdateEventSourceMapping
UpdateEventSourceMapping
(Maybe DestinationConfig)
(Maybe DestinationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Maybe DestinationConfig
destinationConfig :: Maybe DestinationConfig
$sel:destinationConfig:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe DestinationConfig
destinationConfig} -> Maybe DestinationConfig
destinationConfig) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Maybe DestinationConfig
a -> UpdateEventSourceMapping
s {$sel:destinationConfig:UpdateEventSourceMapping' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
a} :: UpdateEventSourceMapping)
updateEventSourceMapping_uuid :: Lens.Lens' UpdateEventSourceMapping Prelude.Text
updateEventSourceMapping_uuid :: (Text -> f Text)
-> UpdateEventSourceMapping -> f UpdateEventSourceMapping
updateEventSourceMapping_uuid = (UpdateEventSourceMapping -> Text)
-> (UpdateEventSourceMapping -> Text -> UpdateEventSourceMapping)
-> Lens UpdateEventSourceMapping UpdateEventSourceMapping Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventSourceMapping' {Text
uuid :: Text
$sel:uuid:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Text
uuid} -> Text
uuid) (\s :: UpdateEventSourceMapping
s@UpdateEventSourceMapping' {} Text
a -> UpdateEventSourceMapping
s {$sel:uuid:UpdateEventSourceMapping' :: Text
uuid = Text
a} :: UpdateEventSourceMapping)
instance Core.AWSRequest UpdateEventSourceMapping where
type
AWSResponse UpdateEventSourceMapping =
EventSourceMappingConfiguration
request :: UpdateEventSourceMapping -> Request UpdateEventSourceMapping
request = Service
-> UpdateEventSourceMapping -> Request UpdateEventSourceMapping
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEventSourceMapping)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateEventSourceMapping))
-> Logger
-> Service
-> Proxy UpdateEventSourceMapping
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEventSourceMapping)))
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 UpdateEventSourceMapping
instance Prelude.NFData UpdateEventSourceMapping
instance Core.ToHeaders UpdateEventSourceMapping where
toHeaders :: UpdateEventSourceMapping -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateEventSourceMapping -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON UpdateEventSourceMapping where
toJSON :: UpdateEventSourceMapping -> Value
toJSON UpdateEventSourceMapping' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [FunctionResponseType]
Maybe [SourceAccessConfiguration]
Maybe Text
Maybe DestinationConfig
Text
uuid :: Text
destinationConfig :: Maybe DestinationConfig
functionName :: Maybe Text
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
$sel:uuid:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Text
$sel:destinationConfig:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe DestinationConfig
$sel:functionName:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Text
$sel:tumblingWindowInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:functionResponseTypes:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe [FunctionResponseType]
$sel:maximumRecordAgeInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Int
$sel:sourceAccessConfigurations:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe [SourceAccessConfiguration]
$sel:maximumBatchingWindowInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:batchSize:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:maximumRetryAttempts:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Int
$sel:parallelizationFactor:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:bisectBatchOnFunctionError:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Bool
$sel:enabled:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"FunctionName" 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
functionName,
(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
]
)
instance Core.ToPath UpdateEventSourceMapping where
toPath :: UpdateEventSourceMapping -> ByteString
toPath UpdateEventSourceMapping' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [FunctionResponseType]
Maybe [SourceAccessConfiguration]
Maybe Text
Maybe DestinationConfig
Text
uuid :: Text
destinationConfig :: Maybe DestinationConfig
functionName :: Maybe Text
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
$sel:uuid:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Text
$sel:destinationConfig:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe DestinationConfig
$sel:functionName:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Text
$sel:tumblingWindowInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:functionResponseTypes:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe [FunctionResponseType]
$sel:maximumRecordAgeInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Int
$sel:sourceAccessConfigurations:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe [SourceAccessConfiguration]
$sel:maximumBatchingWindowInSeconds:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:batchSize:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:maximumRetryAttempts:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Int
$sel:parallelizationFactor:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Natural
$sel:bisectBatchOnFunctionError:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Bool
$sel:enabled:UpdateEventSourceMapping' :: UpdateEventSourceMapping -> Maybe Bool
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-03-31/event-source-mappings/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
uuid
]
instance Core.ToQuery UpdateEventSourceMapping where
toQuery :: UpdateEventSourceMapping -> QueryString
toQuery = QueryString -> UpdateEventSourceMapping -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty