{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Lambda.Types.EventSourceMappingConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Lambda.Types.EventSourceMappingConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.Lambda.Types.DestinationConfig
import Amazonka.Lambda.Types.EventSourcePosition
import Amazonka.Lambda.Types.FunctionResponseType
import Amazonka.Lambda.Types.SelfManagedEventSource
import Amazonka.Lambda.Types.SourceAccessConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A mapping between an Amazon Web Services resource and a Lambda function.
-- For details, see CreateEventSourceMapping.
--
-- /See:/ 'newEventSourceMappingConfiguration' smart constructor.
data EventSourceMappingConfiguration = EventSourceMappingConfiguration'
  { -- | The Amazon Resource Name (ARN) of the event source.
    EventSourceMappingConfiguration -> Maybe Text
eventSourceArn :: Prelude.Maybe Prelude.Text,
    -- | The state of the event source mapping. It can be one of the following:
    -- @Creating@, @Enabling@, @Enabled@, @Disabling@, @Disabled@, @Updating@,
    -- or @Deleting@.
    EventSourceMappingConfiguration -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
    -- | With @StartingPosition@ set to @AT_TIMESTAMP@, the time from which to
    -- start reading.
    EventSourceMappingConfiguration -> Maybe POSIX
startingPositionTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the Lambda function.
    EventSourceMappingConfiguration -> Maybe Text
functionArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the Kafka topic.
    EventSourceMappingConfiguration -> Maybe (NonEmpty Text)
topics :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | (Amazon MQ) The name of the Amazon MQ broker destination queue to
    -- consume.
    EventSourceMappingConfiguration -> Maybe (NonEmpty Text)
queues :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | (Streams only) If the function returns an error, split the batch in two
    -- and retry. The default value is false.
    EventSourceMappingConfiguration -> Maybe Bool
bisectBatchOnFunctionError :: Prelude.Maybe Prelude.Bool,
    -- | The identifier of the event source mapping.
    EventSourceMappingConfiguration -> Maybe Text
uuid :: Prelude.Maybe Prelude.Text,
    -- | (Streams only) The number of batches to process concurrently from each
    -- shard. The default value is 1.
    EventSourceMappingConfiguration -> Maybe Natural
parallelizationFactor :: Prelude.Maybe Prelude.Natural,
    -- | The result of the last Lambda invocation of your function.
    EventSourceMappingConfiguration -> Maybe Text
lastProcessingResult :: Prelude.Maybe Prelude.Text,
    -- | (Streams only) Discard records after the specified number of retries.
    -- The default value is -1, which sets the maximum number of retries to
    -- infinite. When MaximumRetryAttempts is infinite, Lambda retries failed
    -- records until the record expires in the event source.
    EventSourceMappingConfiguration -> Maybe Int
maximumRetryAttempts :: Prelude.Maybe Prelude.Int,
    -- | The maximum number of records in each batch that Lambda pulls from your
    -- stream or queue and sends to your function. Lambda passes all of the
    -- records in the batch to the function in a single call, up to the payload
    -- limit for synchronous invocation (6 MB).
    --
    -- Default value: Varies by service. For Amazon SQS, the default is 10. For
    -- all other services, the default is 100.
    --
    -- Related setting: When you set @BatchSize@ to a value greater than 10,
    -- you must set @MaximumBatchingWindowInSeconds@ to at least 1.
    EventSourceMappingConfiguration -> Maybe Natural
batchSize :: Prelude.Maybe Prelude.Natural,
    -- | Indicates whether a user or Lambda made the last change to the event
    -- source mapping.
    EventSourceMappingConfiguration -> Maybe Text
stateTransitionReason :: Prelude.Maybe Prelude.Text,
    -- | (Streams and Amazon SQS standard queues) The maximum amount of time, in
    -- seconds, that Lambda spends gathering records before invoking the
    -- function.
    --
    -- Default: 0
    --
    -- Related setting: When you set @BatchSize@ to a value greater than 10,
    -- you must set @MaximumBatchingWindowInSeconds@ to at least 1.
    EventSourceMappingConfiguration -> Maybe Natural
maximumBatchingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | An array of the authentication protocol, VPC components, or virtual host
    -- to secure and define your event source.
    EventSourceMappingConfiguration
-> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Prelude.Maybe [SourceAccessConfiguration],
    -- | (Streams only) Discard records older than the specified age. The default
    -- value is -1, which sets the maximum age to infinite. When the value is
    -- set to infinite, Lambda never discards old records.
    EventSourceMappingConfiguration -> Maybe Int
maximumRecordAgeInSeconds :: Prelude.Maybe Prelude.Int,
    -- | (Streams only) A list of current response type enums applied to the
    -- event source mapping.
    EventSourceMappingConfiguration -> Maybe [FunctionResponseType]
functionResponseTypes :: Prelude.Maybe [FunctionResponseType],
    -- | (Streams only) The duration in seconds of a processing window. The range
    -- is 1–900 seconds.
    EventSourceMappingConfiguration -> Maybe Natural
tumblingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The self-managed Apache Kafka cluster for your event source.
    EventSourceMappingConfiguration -> Maybe SelfManagedEventSource
selfManagedEventSource :: Prelude.Maybe SelfManagedEventSource,
    -- | The date that the event source mapping was last updated or that its
    -- state changed.
    EventSourceMappingConfiguration -> Maybe POSIX
lastModified :: Prelude.Maybe Core.POSIX,
    -- | (Streams only) An Amazon SQS queue or Amazon SNS topic destination for
    -- discarded records.
    EventSourceMappingConfiguration -> Maybe DestinationConfig
destinationConfig :: Prelude.Maybe DestinationConfig,
    -- | The position in a stream from which to start reading. Required for
    -- Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources.
    -- @AT_TIMESTAMP@ is supported only for Amazon Kinesis streams.
    EventSourceMappingConfiguration -> Maybe EventSourcePosition
startingPosition :: Prelude.Maybe EventSourcePosition
  }
  deriving (EventSourceMappingConfiguration
-> EventSourceMappingConfiguration -> Bool
(EventSourceMappingConfiguration
 -> EventSourceMappingConfiguration -> Bool)
-> (EventSourceMappingConfiguration
    -> EventSourceMappingConfiguration -> Bool)
-> Eq EventSourceMappingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventSourceMappingConfiguration
-> EventSourceMappingConfiguration -> Bool
$c/= :: EventSourceMappingConfiguration
-> EventSourceMappingConfiguration -> Bool
== :: EventSourceMappingConfiguration
-> EventSourceMappingConfiguration -> Bool
$c== :: EventSourceMappingConfiguration
-> EventSourceMappingConfiguration -> Bool
Prelude.Eq, ReadPrec [EventSourceMappingConfiguration]
ReadPrec EventSourceMappingConfiguration
Int -> ReadS EventSourceMappingConfiguration
ReadS [EventSourceMappingConfiguration]
(Int -> ReadS EventSourceMappingConfiguration)
-> ReadS [EventSourceMappingConfiguration]
-> ReadPrec EventSourceMappingConfiguration
-> ReadPrec [EventSourceMappingConfiguration]
-> Read EventSourceMappingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventSourceMappingConfiguration]
$creadListPrec :: ReadPrec [EventSourceMappingConfiguration]
readPrec :: ReadPrec EventSourceMappingConfiguration
$creadPrec :: ReadPrec EventSourceMappingConfiguration
readList :: ReadS [EventSourceMappingConfiguration]
$creadList :: ReadS [EventSourceMappingConfiguration]
readsPrec :: Int -> ReadS EventSourceMappingConfiguration
$creadsPrec :: Int -> ReadS EventSourceMappingConfiguration
Prelude.Read, Int -> EventSourceMappingConfiguration -> ShowS
[EventSourceMappingConfiguration] -> ShowS
EventSourceMappingConfiguration -> String
(Int -> EventSourceMappingConfiguration -> ShowS)
-> (EventSourceMappingConfiguration -> String)
-> ([EventSourceMappingConfiguration] -> ShowS)
-> Show EventSourceMappingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventSourceMappingConfiguration] -> ShowS
$cshowList :: [EventSourceMappingConfiguration] -> ShowS
show :: EventSourceMappingConfiguration -> String
$cshow :: EventSourceMappingConfiguration -> String
showsPrec :: Int -> EventSourceMappingConfiguration -> ShowS
$cshowsPrec :: Int -> EventSourceMappingConfiguration -> ShowS
Prelude.Show, (forall x.
 EventSourceMappingConfiguration
 -> Rep EventSourceMappingConfiguration x)
-> (forall x.
    Rep EventSourceMappingConfiguration x
    -> EventSourceMappingConfiguration)
-> Generic EventSourceMappingConfiguration
forall x.
Rep EventSourceMappingConfiguration x
-> EventSourceMappingConfiguration
forall x.
EventSourceMappingConfiguration
-> Rep EventSourceMappingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EventSourceMappingConfiguration x
-> EventSourceMappingConfiguration
$cfrom :: forall x.
EventSourceMappingConfiguration
-> Rep EventSourceMappingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'EventSourceMappingConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'eventSourceArn', 'eventSourceMappingConfiguration_eventSourceArn' - The Amazon Resource Name (ARN) of the event source.
--
-- 'state', 'eventSourceMappingConfiguration_state' - The state of the event source mapping. It can be one of the following:
-- @Creating@, @Enabling@, @Enabled@, @Disabling@, @Disabled@, @Updating@,
-- or @Deleting@.
--
-- 'startingPositionTimestamp', 'eventSourceMappingConfiguration_startingPositionTimestamp' - With @StartingPosition@ set to @AT_TIMESTAMP@, the time from which to
-- start reading.
--
-- 'functionArn', 'eventSourceMappingConfiguration_functionArn' - The ARN of the Lambda function.
--
-- 'topics', 'eventSourceMappingConfiguration_topics' - The name of the Kafka topic.
--
-- 'queues', 'eventSourceMappingConfiguration_queues' - (Amazon MQ) The name of the Amazon MQ broker destination queue to
-- consume.
--
-- 'bisectBatchOnFunctionError', 'eventSourceMappingConfiguration_bisectBatchOnFunctionError' - (Streams only) If the function returns an error, split the batch in two
-- and retry. The default value is false.
--
-- 'uuid', 'eventSourceMappingConfiguration_uuid' - The identifier of the event source mapping.
--
-- 'parallelizationFactor', 'eventSourceMappingConfiguration_parallelizationFactor' - (Streams only) The number of batches to process concurrently from each
-- shard. The default value is 1.
--
-- 'lastProcessingResult', 'eventSourceMappingConfiguration_lastProcessingResult' - The result of the last Lambda invocation of your function.
--
-- 'maximumRetryAttempts', 'eventSourceMappingConfiguration_maximumRetryAttempts' - (Streams only) Discard records after the specified number of retries.
-- The default value is -1, which sets the maximum number of retries to
-- infinite. When MaximumRetryAttempts is infinite, Lambda retries failed
-- records until the record expires in the event source.
--
-- 'batchSize', 'eventSourceMappingConfiguration_batchSize' - The maximum number of records in each batch that Lambda pulls from your
-- stream or queue and sends to your function. Lambda passes all of the
-- records in the batch to the function in a single call, up to the payload
-- limit for synchronous invocation (6 MB).
--
-- Default value: Varies by service. For Amazon SQS, the default is 10. For
-- all other services, the default is 100.
--
-- Related setting: When you set @BatchSize@ to a value greater than 10,
-- you must set @MaximumBatchingWindowInSeconds@ to at least 1.
--
-- 'stateTransitionReason', 'eventSourceMappingConfiguration_stateTransitionReason' - Indicates whether a user or Lambda made the last change to the event
-- source mapping.
--
-- 'maximumBatchingWindowInSeconds', 'eventSourceMappingConfiguration_maximumBatchingWindowInSeconds' - (Streams and Amazon SQS standard queues) The maximum amount of time, in
-- seconds, that Lambda spends gathering records before invoking the
-- function.
--
-- Default: 0
--
-- Related setting: When you set @BatchSize@ to a value greater than 10,
-- you must set @MaximumBatchingWindowInSeconds@ to at least 1.
--
-- 'sourceAccessConfigurations', 'eventSourceMappingConfiguration_sourceAccessConfigurations' - An array of the authentication protocol, VPC components, or virtual host
-- to secure and define your event source.
--
-- 'maximumRecordAgeInSeconds', 'eventSourceMappingConfiguration_maximumRecordAgeInSeconds' - (Streams only) Discard records older than the specified age. The default
-- value is -1, which sets the maximum age to infinite. When the value is
-- set to infinite, Lambda never discards old records.
--
-- 'functionResponseTypes', 'eventSourceMappingConfiguration_functionResponseTypes' - (Streams only) A list of current response type enums applied to the
-- event source mapping.
--
-- 'tumblingWindowInSeconds', 'eventSourceMappingConfiguration_tumblingWindowInSeconds' - (Streams only) The duration in seconds of a processing window. The range
-- is 1–900 seconds.
--
-- 'selfManagedEventSource', 'eventSourceMappingConfiguration_selfManagedEventSource' - The self-managed Apache Kafka cluster for your event source.
--
-- 'lastModified', 'eventSourceMappingConfiguration_lastModified' - The date that the event source mapping was last updated or that its
-- state changed.
--
-- 'destinationConfig', 'eventSourceMappingConfiguration_destinationConfig' - (Streams only) An Amazon SQS queue or Amazon SNS topic destination for
-- discarded records.
--
-- 'startingPosition', 'eventSourceMappingConfiguration_startingPosition' - The position in a stream from which to start reading. Required for
-- Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources.
-- @AT_TIMESTAMP@ is supported only for Amazon Kinesis streams.
newEventSourceMappingConfiguration ::
  EventSourceMappingConfiguration
newEventSourceMappingConfiguration :: EventSourceMappingConfiguration
newEventSourceMappingConfiguration =
  EventSourceMappingConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Int
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe [SourceAccessConfiguration]
-> Maybe Int
-> Maybe [FunctionResponseType]
-> Maybe Natural
-> Maybe SelfManagedEventSource
-> Maybe POSIX
-> Maybe DestinationConfig
-> Maybe EventSourcePosition
-> EventSourceMappingConfiguration
EventSourceMappingConfiguration'
    { $sel:eventSourceArn:EventSourceMappingConfiguration' :: Maybe Text
eventSourceArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:EventSourceMappingConfiguration' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startingPositionTimestamp:EventSourceMappingConfiguration' :: Maybe POSIX
startingPositionTimestamp =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:functionArn:EventSourceMappingConfiguration' :: Maybe Text
functionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:topics:EventSourceMappingConfiguration' :: Maybe (NonEmpty Text)
topics = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:queues:EventSourceMappingConfiguration' :: Maybe (NonEmpty Text)
queues = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:bisectBatchOnFunctionError:EventSourceMappingConfiguration' :: Maybe Bool
bisectBatchOnFunctionError =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:uuid:EventSourceMappingConfiguration' :: Maybe Text
uuid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parallelizationFactor:EventSourceMappingConfiguration' :: Maybe Natural
parallelizationFactor = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:lastProcessingResult:EventSourceMappingConfiguration' :: Maybe Text
lastProcessingResult = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maximumRetryAttempts:EventSourceMappingConfiguration' :: Maybe Int
maximumRetryAttempts = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:batchSize:EventSourceMappingConfiguration' :: Maybe Natural
batchSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:stateTransitionReason:EventSourceMappingConfiguration' :: Maybe Text
stateTransitionReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maximumBatchingWindowInSeconds:EventSourceMappingConfiguration' :: Maybe Natural
maximumBatchingWindowInSeconds =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceAccessConfigurations:EventSourceMappingConfiguration' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations =
        Maybe [SourceAccessConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:maximumRecordAgeInSeconds:EventSourceMappingConfiguration' :: Maybe Int
maximumRecordAgeInSeconds =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:functionResponseTypes:EventSourceMappingConfiguration' :: Maybe [FunctionResponseType]
functionResponseTypes = Maybe [FunctionResponseType]
forall a. Maybe a
Prelude.Nothing,
      $sel:tumblingWindowInSeconds:EventSourceMappingConfiguration' :: Maybe Natural
tumblingWindowInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:selfManagedEventSource:EventSourceMappingConfiguration' :: Maybe SelfManagedEventSource
selfManagedEventSource = Maybe SelfManagedEventSource
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:EventSourceMappingConfiguration' :: Maybe POSIX
lastModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationConfig:EventSourceMappingConfiguration' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:startingPosition:EventSourceMappingConfiguration' :: Maybe EventSourcePosition
startingPosition = Maybe EventSourcePosition
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the event source.
eventSourceMappingConfiguration_eventSourceArn :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Text)
eventSourceMappingConfiguration_eventSourceArn :: (Maybe Text -> f (Maybe Text))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_eventSourceArn = (EventSourceMappingConfiguration -> Maybe Text)
-> (EventSourceMappingConfiguration
    -> Maybe Text -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Text
eventSourceArn :: Maybe Text
$sel:eventSourceArn:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Text
eventSourceArn} -> Maybe Text
eventSourceArn) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Text
a -> EventSourceMappingConfiguration
s {$sel:eventSourceArn:EventSourceMappingConfiguration' :: Maybe Text
eventSourceArn = Maybe Text
a} :: EventSourceMappingConfiguration)

-- | The state of the event source mapping. It can be one of the following:
-- @Creating@, @Enabling@, @Enabled@, @Disabling@, @Disabled@, @Updating@,
-- or @Deleting@.
eventSourceMappingConfiguration_state :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Text)
eventSourceMappingConfiguration_state :: (Maybe Text -> f (Maybe Text))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_state = (EventSourceMappingConfiguration -> Maybe Text)
-> (EventSourceMappingConfiguration
    -> Maybe Text -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Text
state :: Maybe Text
$sel:state:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Text
state} -> Maybe Text
state) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Text
a -> EventSourceMappingConfiguration
s {$sel:state:EventSourceMappingConfiguration' :: Maybe Text
state = Maybe Text
a} :: EventSourceMappingConfiguration)

-- | With @StartingPosition@ set to @AT_TIMESTAMP@, the time from which to
-- start reading.
eventSourceMappingConfiguration_startingPositionTimestamp :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.UTCTime)
eventSourceMappingConfiguration_startingPositionTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_startingPositionTimestamp = (EventSourceMappingConfiguration -> Maybe POSIX)
-> (EventSourceMappingConfiguration
    -> Maybe POSIX -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe POSIX
startingPositionTimestamp :: Maybe POSIX
$sel:startingPositionTimestamp:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe POSIX
startingPositionTimestamp} -> Maybe POSIX
startingPositionTimestamp) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe POSIX
a -> EventSourceMappingConfiguration
s {$sel:startingPositionTimestamp:EventSourceMappingConfiguration' :: Maybe POSIX
startingPositionTimestamp = Maybe POSIX
a} :: EventSourceMappingConfiguration) ((Maybe POSIX -> f (Maybe POSIX))
 -> EventSourceMappingConfiguration
 -> f EventSourceMappingConfiguration)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
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

-- | The ARN of the Lambda function.
eventSourceMappingConfiguration_functionArn :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Text)
eventSourceMappingConfiguration_functionArn :: (Maybe Text -> f (Maybe Text))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_functionArn = (EventSourceMappingConfiguration -> Maybe Text)
-> (EventSourceMappingConfiguration
    -> Maybe Text -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Text
functionArn :: Maybe Text
$sel:functionArn:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Text
functionArn} -> Maybe Text
functionArn) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Text
a -> EventSourceMappingConfiguration
s {$sel:functionArn:EventSourceMappingConfiguration' :: Maybe Text
functionArn = Maybe Text
a} :: EventSourceMappingConfiguration)

-- | The name of the Kafka topic.
eventSourceMappingConfiguration_topics :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
eventSourceMappingConfiguration_topics :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_topics = (EventSourceMappingConfiguration -> Maybe (NonEmpty Text))
-> (EventSourceMappingConfiguration
    -> Maybe (NonEmpty Text) -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe (NonEmpty Text)
topics :: Maybe (NonEmpty Text)
$sel:topics:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe (NonEmpty Text)
topics} -> Maybe (NonEmpty Text)
topics) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe (NonEmpty Text)
a -> EventSourceMappingConfiguration
s {$sel:topics:EventSourceMappingConfiguration' :: Maybe (NonEmpty Text)
topics = Maybe (NonEmpty Text)
a} :: EventSourceMappingConfiguration) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> EventSourceMappingConfiguration
 -> f EventSourceMappingConfiguration)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
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

-- | (Amazon MQ) The name of the Amazon MQ broker destination queue to
-- consume.
eventSourceMappingConfiguration_queues :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
eventSourceMappingConfiguration_queues :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_queues = (EventSourceMappingConfiguration -> Maybe (NonEmpty Text))
-> (EventSourceMappingConfiguration
    -> Maybe (NonEmpty Text) -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe (NonEmpty Text)
queues :: Maybe (NonEmpty Text)
$sel:queues:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe (NonEmpty Text)
queues} -> Maybe (NonEmpty Text)
queues) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe (NonEmpty Text)
a -> EventSourceMappingConfiguration
s {$sel:queues:EventSourceMappingConfiguration' :: Maybe (NonEmpty Text)
queues = Maybe (NonEmpty Text)
a} :: EventSourceMappingConfiguration) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> EventSourceMappingConfiguration
 -> f EventSourceMappingConfiguration)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
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

-- | (Streams only) If the function returns an error, split the batch in two
-- and retry. The default value is false.
eventSourceMappingConfiguration_bisectBatchOnFunctionError :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Bool)
eventSourceMappingConfiguration_bisectBatchOnFunctionError :: (Maybe Bool -> f (Maybe Bool))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_bisectBatchOnFunctionError = (EventSourceMappingConfiguration -> Maybe Bool)
-> (EventSourceMappingConfiguration
    -> Maybe Bool -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Bool
bisectBatchOnFunctionError :: Maybe Bool
$sel:bisectBatchOnFunctionError:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Bool
bisectBatchOnFunctionError} -> Maybe Bool
bisectBatchOnFunctionError) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Bool
a -> EventSourceMappingConfiguration
s {$sel:bisectBatchOnFunctionError:EventSourceMappingConfiguration' :: Maybe Bool
bisectBatchOnFunctionError = Maybe Bool
a} :: EventSourceMappingConfiguration)

-- | The identifier of the event source mapping.
eventSourceMappingConfiguration_uuid :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Text)
eventSourceMappingConfiguration_uuid :: (Maybe Text -> f (Maybe Text))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_uuid = (EventSourceMappingConfiguration -> Maybe Text)
-> (EventSourceMappingConfiguration
    -> Maybe Text -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Text
uuid :: Maybe Text
$sel:uuid:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Text
uuid} -> Maybe Text
uuid) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Text
a -> EventSourceMappingConfiguration
s {$sel:uuid:EventSourceMappingConfiguration' :: Maybe Text
uuid = Maybe Text
a} :: EventSourceMappingConfiguration)

-- | (Streams only) The number of batches to process concurrently from each
-- shard. The default value is 1.
eventSourceMappingConfiguration_parallelizationFactor :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Natural)
eventSourceMappingConfiguration_parallelizationFactor :: (Maybe Natural -> f (Maybe Natural))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_parallelizationFactor = (EventSourceMappingConfiguration -> Maybe Natural)
-> (EventSourceMappingConfiguration
    -> Maybe Natural -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Natural
parallelizationFactor :: Maybe Natural
$sel:parallelizationFactor:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Natural
parallelizationFactor} -> Maybe Natural
parallelizationFactor) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Natural
a -> EventSourceMappingConfiguration
s {$sel:parallelizationFactor:EventSourceMappingConfiguration' :: Maybe Natural
parallelizationFactor = Maybe Natural
a} :: EventSourceMappingConfiguration)

-- | The result of the last Lambda invocation of your function.
eventSourceMappingConfiguration_lastProcessingResult :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Text)
eventSourceMappingConfiguration_lastProcessingResult :: (Maybe Text -> f (Maybe Text))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_lastProcessingResult = (EventSourceMappingConfiguration -> Maybe Text)
-> (EventSourceMappingConfiguration
    -> Maybe Text -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Text
lastProcessingResult :: Maybe Text
$sel:lastProcessingResult:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Text
lastProcessingResult} -> Maybe Text
lastProcessingResult) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Text
a -> EventSourceMappingConfiguration
s {$sel:lastProcessingResult:EventSourceMappingConfiguration' :: Maybe Text
lastProcessingResult = Maybe Text
a} :: EventSourceMappingConfiguration)

-- | (Streams only) Discard records after the specified number of retries.
-- The default value is -1, which sets the maximum number of retries to
-- infinite. When MaximumRetryAttempts is infinite, Lambda retries failed
-- records until the record expires in the event source.
eventSourceMappingConfiguration_maximumRetryAttempts :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Int)
eventSourceMappingConfiguration_maximumRetryAttempts :: (Maybe Int -> f (Maybe Int))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_maximumRetryAttempts = (EventSourceMappingConfiguration -> Maybe Int)
-> (EventSourceMappingConfiguration
    -> Maybe Int -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Int
maximumRetryAttempts :: Maybe Int
$sel:maximumRetryAttempts:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Int
maximumRetryAttempts} -> Maybe Int
maximumRetryAttempts) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Int
a -> EventSourceMappingConfiguration
s {$sel:maximumRetryAttempts:EventSourceMappingConfiguration' :: Maybe Int
maximumRetryAttempts = Maybe Int
a} :: EventSourceMappingConfiguration)

-- | The maximum number of records in each batch that Lambda pulls from your
-- stream or queue and sends to your function. Lambda passes all of the
-- records in the batch to the function in a single call, up to the payload
-- limit for synchronous invocation (6 MB).
--
-- Default value: Varies by service. For Amazon SQS, the default is 10. For
-- all other services, the default is 100.
--
-- Related setting: When you set @BatchSize@ to a value greater than 10,
-- you must set @MaximumBatchingWindowInSeconds@ to at least 1.
eventSourceMappingConfiguration_batchSize :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Natural)
eventSourceMappingConfiguration_batchSize :: (Maybe Natural -> f (Maybe Natural))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_batchSize = (EventSourceMappingConfiguration -> Maybe Natural)
-> (EventSourceMappingConfiguration
    -> Maybe Natural -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Natural
batchSize :: Maybe Natural
$sel:batchSize:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Natural
batchSize} -> Maybe Natural
batchSize) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Natural
a -> EventSourceMappingConfiguration
s {$sel:batchSize:EventSourceMappingConfiguration' :: Maybe Natural
batchSize = Maybe Natural
a} :: EventSourceMappingConfiguration)

-- | Indicates whether a user or Lambda made the last change to the event
-- source mapping.
eventSourceMappingConfiguration_stateTransitionReason :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Text)
eventSourceMappingConfiguration_stateTransitionReason :: (Maybe Text -> f (Maybe Text))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_stateTransitionReason = (EventSourceMappingConfiguration -> Maybe Text)
-> (EventSourceMappingConfiguration
    -> Maybe Text -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Text
stateTransitionReason :: Maybe Text
$sel:stateTransitionReason:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Text
stateTransitionReason} -> Maybe Text
stateTransitionReason) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Text
a -> EventSourceMappingConfiguration
s {$sel:stateTransitionReason:EventSourceMappingConfiguration' :: Maybe Text
stateTransitionReason = Maybe Text
a} :: EventSourceMappingConfiguration)

-- | (Streams and Amazon SQS standard queues) The maximum amount of time, in
-- seconds, that Lambda spends gathering records before invoking the
-- function.
--
-- Default: 0
--
-- Related setting: When you set @BatchSize@ to a value greater than 10,
-- you must set @MaximumBatchingWindowInSeconds@ to at least 1.
eventSourceMappingConfiguration_maximumBatchingWindowInSeconds :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Natural)
eventSourceMappingConfiguration_maximumBatchingWindowInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_maximumBatchingWindowInSeconds = (EventSourceMappingConfiguration -> Maybe Natural)
-> (EventSourceMappingConfiguration
    -> Maybe Natural -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Natural
maximumBatchingWindowInSeconds :: Maybe Natural
$sel:maximumBatchingWindowInSeconds:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Natural
maximumBatchingWindowInSeconds} -> Maybe Natural
maximumBatchingWindowInSeconds) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Natural
a -> EventSourceMappingConfiguration
s {$sel:maximumBatchingWindowInSeconds:EventSourceMappingConfiguration' :: Maybe Natural
maximumBatchingWindowInSeconds = Maybe Natural
a} :: EventSourceMappingConfiguration)

-- | An array of the authentication protocol, VPC components, or virtual host
-- to secure and define your event source.
eventSourceMappingConfiguration_sourceAccessConfigurations :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe [SourceAccessConfiguration])
eventSourceMappingConfiguration_sourceAccessConfigurations :: (Maybe [SourceAccessConfiguration]
 -> f (Maybe [SourceAccessConfiguration]))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_sourceAccessConfigurations = (EventSourceMappingConfiguration
 -> Maybe [SourceAccessConfiguration])
-> (EventSourceMappingConfiguration
    -> Maybe [SourceAccessConfiguration]
    -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe [SourceAccessConfiguration])
     (Maybe [SourceAccessConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe [SourceAccessConfiguration]
sourceAccessConfigurations :: Maybe [SourceAccessConfiguration]
$sel:sourceAccessConfigurations:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration
-> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations} -> Maybe [SourceAccessConfiguration]
sourceAccessConfigurations) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe [SourceAccessConfiguration]
a -> EventSourceMappingConfiguration
s {$sel:sourceAccessConfigurations:EventSourceMappingConfiguration' :: Maybe [SourceAccessConfiguration]
sourceAccessConfigurations = Maybe [SourceAccessConfiguration]
a} :: EventSourceMappingConfiguration) ((Maybe [SourceAccessConfiguration]
  -> f (Maybe [SourceAccessConfiguration]))
 -> EventSourceMappingConfiguration
 -> f EventSourceMappingConfiguration)
-> ((Maybe [SourceAccessConfiguration]
     -> f (Maybe [SourceAccessConfiguration]))
    -> Maybe [SourceAccessConfiguration]
    -> f (Maybe [SourceAccessConfiguration]))
-> (Maybe [SourceAccessConfiguration]
    -> f (Maybe [SourceAccessConfiguration]))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
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

-- | (Streams only) Discard records older than the specified age. The default
-- value is -1, which sets the maximum age to infinite. When the value is
-- set to infinite, Lambda never discards old records.
eventSourceMappingConfiguration_maximumRecordAgeInSeconds :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Int)
eventSourceMappingConfiguration_maximumRecordAgeInSeconds :: (Maybe Int -> f (Maybe Int))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_maximumRecordAgeInSeconds = (EventSourceMappingConfiguration -> Maybe Int)
-> (EventSourceMappingConfiguration
    -> Maybe Int -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
$sel:maximumRecordAgeInSeconds:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Int
maximumRecordAgeInSeconds} -> Maybe Int
maximumRecordAgeInSeconds) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Int
a -> EventSourceMappingConfiguration
s {$sel:maximumRecordAgeInSeconds:EventSourceMappingConfiguration' :: Maybe Int
maximumRecordAgeInSeconds = Maybe Int
a} :: EventSourceMappingConfiguration)

-- | (Streams only) A list of current response type enums applied to the
-- event source mapping.
eventSourceMappingConfiguration_functionResponseTypes :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe [FunctionResponseType])
eventSourceMappingConfiguration_functionResponseTypes :: (Maybe [FunctionResponseType] -> f (Maybe [FunctionResponseType]))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_functionResponseTypes = (EventSourceMappingConfiguration -> Maybe [FunctionResponseType])
-> (EventSourceMappingConfiguration
    -> Maybe [FunctionResponseType] -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe [FunctionResponseType])
     (Maybe [FunctionResponseType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe [FunctionResponseType]
functionResponseTypes :: Maybe [FunctionResponseType]
$sel:functionResponseTypes:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe [FunctionResponseType]
functionResponseTypes} -> Maybe [FunctionResponseType]
functionResponseTypes) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe [FunctionResponseType]
a -> EventSourceMappingConfiguration
s {$sel:functionResponseTypes:EventSourceMappingConfiguration' :: Maybe [FunctionResponseType]
functionResponseTypes = Maybe [FunctionResponseType]
a} :: EventSourceMappingConfiguration) ((Maybe [FunctionResponseType] -> f (Maybe [FunctionResponseType]))
 -> EventSourceMappingConfiguration
 -> f EventSourceMappingConfiguration)
-> ((Maybe [FunctionResponseType]
     -> f (Maybe [FunctionResponseType]))
    -> Maybe [FunctionResponseType]
    -> f (Maybe [FunctionResponseType]))
-> (Maybe [FunctionResponseType]
    -> f (Maybe [FunctionResponseType]))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
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

-- | (Streams only) The duration in seconds of a processing window. The range
-- is 1–900 seconds.
eventSourceMappingConfiguration_tumblingWindowInSeconds :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.Natural)
eventSourceMappingConfiguration_tumblingWindowInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_tumblingWindowInSeconds = (EventSourceMappingConfiguration -> Maybe Natural)
-> (EventSourceMappingConfiguration
    -> Maybe Natural -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe Natural
tumblingWindowInSeconds :: Maybe Natural
$sel:tumblingWindowInSeconds:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe Natural
tumblingWindowInSeconds} -> Maybe Natural
tumblingWindowInSeconds) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe Natural
a -> EventSourceMappingConfiguration
s {$sel:tumblingWindowInSeconds:EventSourceMappingConfiguration' :: Maybe Natural
tumblingWindowInSeconds = Maybe Natural
a} :: EventSourceMappingConfiguration)

-- | The self-managed Apache Kafka cluster for your event source.
eventSourceMappingConfiguration_selfManagedEventSource :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe SelfManagedEventSource)
eventSourceMappingConfiguration_selfManagedEventSource :: (Maybe SelfManagedEventSource -> f (Maybe SelfManagedEventSource))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_selfManagedEventSource = (EventSourceMappingConfiguration -> Maybe SelfManagedEventSource)
-> (EventSourceMappingConfiguration
    -> Maybe SelfManagedEventSource -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe SelfManagedEventSource)
     (Maybe SelfManagedEventSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe SelfManagedEventSource
selfManagedEventSource :: Maybe SelfManagedEventSource
$sel:selfManagedEventSource:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe SelfManagedEventSource
selfManagedEventSource} -> Maybe SelfManagedEventSource
selfManagedEventSource) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe SelfManagedEventSource
a -> EventSourceMappingConfiguration
s {$sel:selfManagedEventSource:EventSourceMappingConfiguration' :: Maybe SelfManagedEventSource
selfManagedEventSource = Maybe SelfManagedEventSource
a} :: EventSourceMappingConfiguration)

-- | The date that the event source mapping was last updated or that its
-- state changed.
eventSourceMappingConfiguration_lastModified :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe Prelude.UTCTime)
eventSourceMappingConfiguration_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_lastModified = (EventSourceMappingConfiguration -> Maybe POSIX)
-> (EventSourceMappingConfiguration
    -> Maybe POSIX -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe POSIX
a -> EventSourceMappingConfiguration
s {$sel:lastModified:EventSourceMappingConfiguration' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: EventSourceMappingConfiguration) ((Maybe POSIX -> f (Maybe POSIX))
 -> EventSourceMappingConfiguration
 -> f EventSourceMappingConfiguration)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
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

-- | (Streams only) An Amazon SQS queue or Amazon SNS topic destination for
-- discarded records.
eventSourceMappingConfiguration_destinationConfig :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe DestinationConfig)
eventSourceMappingConfiguration_destinationConfig :: (Maybe DestinationConfig -> f (Maybe DestinationConfig))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_destinationConfig = (EventSourceMappingConfiguration -> Maybe DestinationConfig)
-> (EventSourceMappingConfiguration
    -> Maybe DestinationConfig -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe DestinationConfig)
     (Maybe DestinationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe DestinationConfig
destinationConfig :: Maybe DestinationConfig
$sel:destinationConfig:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe DestinationConfig
destinationConfig} -> Maybe DestinationConfig
destinationConfig) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe DestinationConfig
a -> EventSourceMappingConfiguration
s {$sel:destinationConfig:EventSourceMappingConfiguration' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
a} :: EventSourceMappingConfiguration)

-- | The position in a stream from which to start reading. Required for
-- Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources.
-- @AT_TIMESTAMP@ is supported only for Amazon Kinesis streams.
eventSourceMappingConfiguration_startingPosition :: Lens.Lens' EventSourceMappingConfiguration (Prelude.Maybe EventSourcePosition)
eventSourceMappingConfiguration_startingPosition :: (Maybe EventSourcePosition -> f (Maybe EventSourcePosition))
-> EventSourceMappingConfiguration
-> f EventSourceMappingConfiguration
eventSourceMappingConfiguration_startingPosition = (EventSourceMappingConfiguration -> Maybe EventSourcePosition)
-> (EventSourceMappingConfiguration
    -> Maybe EventSourcePosition -> EventSourceMappingConfiguration)
-> Lens
     EventSourceMappingConfiguration
     EventSourceMappingConfiguration
     (Maybe EventSourcePosition)
     (Maybe EventSourcePosition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventSourceMappingConfiguration' {Maybe EventSourcePosition
startingPosition :: Maybe EventSourcePosition
$sel:startingPosition:EventSourceMappingConfiguration' :: EventSourceMappingConfiguration -> Maybe EventSourcePosition
startingPosition} -> Maybe EventSourcePosition
startingPosition) (\s :: EventSourceMappingConfiguration
s@EventSourceMappingConfiguration' {} Maybe EventSourcePosition
a -> EventSourceMappingConfiguration
s {$sel:startingPosition:EventSourceMappingConfiguration' :: Maybe EventSourcePosition
startingPosition = Maybe EventSourcePosition
a} :: EventSourceMappingConfiguration)

instance
  Core.FromJSON
    EventSourceMappingConfiguration
  where
  parseJSON :: Value -> Parser EventSourceMappingConfiguration
parseJSON =
    String
-> (Object -> Parser EventSourceMappingConfiguration)
-> Value
-> Parser EventSourceMappingConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EventSourceMappingConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Int
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe [SourceAccessConfiguration]
-> Maybe Int
-> Maybe [FunctionResponseType]
-> Maybe Natural
-> Maybe SelfManagedEventSource
-> Maybe POSIX
-> Maybe DestinationConfig
-> Maybe EventSourcePosition
-> EventSourceMappingConfiguration
EventSourceMappingConfiguration'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe (NonEmpty Text)
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Int
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Natural
 -> Maybe [SourceAccessConfiguration]
 -> Maybe Int
 -> Maybe [FunctionResponseType]
 -> Maybe Natural
 -> Maybe SelfManagedEventSource
 -> Maybe POSIX
 -> Maybe DestinationConfig
 -> Maybe EventSourcePosition
 -> EventSourceMappingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventSourceArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartingPositionTimestamp")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FunctionArn")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Topics")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Queues")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BisectBatchOnFunctionError")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UUID")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ParallelizationFactor")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastProcessingResult")
            Parser
  (Maybe Int
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Int)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumRetryAttempts")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BatchSize")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StateTransitionReason")
            Parser
  (Maybe Natural
   -> Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Natural)
-> Parser
     (Maybe [SourceAccessConfiguration]
      -> Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumBatchingWindowInSeconds")
            Parser
  (Maybe [SourceAccessConfiguration]
   -> Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe [SourceAccessConfiguration])
-> Parser
     (Maybe Int
      -> Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [SourceAccessConfiguration]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceAccessConfigurations"
                            Parser (Maybe (Maybe [SourceAccessConfiguration]))
-> Maybe [SourceAccessConfiguration]
-> Parser (Maybe [SourceAccessConfiguration])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SourceAccessConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Int
   -> Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Int)
-> Parser
     (Maybe [FunctionResponseType]
      -> Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumRecordAgeInSeconds")
            Parser
  (Maybe [FunctionResponseType]
   -> Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe [FunctionResponseType])
-> Parser
     (Maybe Natural
      -> Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [FunctionResponseType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FunctionResponseTypes"
                            Parser (Maybe (Maybe [FunctionResponseType]))
-> Maybe [FunctionResponseType]
-> Parser (Maybe [FunctionResponseType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [FunctionResponseType]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Natural
   -> Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe Natural)
-> Parser
     (Maybe SelfManagedEventSource
      -> Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TumblingWindowInSeconds")
            Parser
  (Maybe SelfManagedEventSource
   -> Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe SelfManagedEventSource)
-> Parser
     (Maybe POSIX
      -> Maybe DestinationConfig
      -> Maybe EventSourcePosition
      -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SelfManagedEventSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SelfManagedEventSource")
            Parser
  (Maybe POSIX
   -> Maybe DestinationConfig
   -> Maybe EventSourcePosition
   -> EventSourceMappingConfiguration)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe DestinationConfig
      -> Maybe EventSourcePosition -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModified")
            Parser
  (Maybe DestinationConfig
   -> Maybe EventSourcePosition -> EventSourceMappingConfiguration)
-> Parser (Maybe DestinationConfig)
-> Parser
     (Maybe EventSourcePosition -> EventSourceMappingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DestinationConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationConfig")
            Parser
  (Maybe EventSourcePosition -> EventSourceMappingConfiguration)
-> Parser (Maybe EventSourcePosition)
-> Parser EventSourceMappingConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EventSourcePosition)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartingPosition")
      )

instance
  Prelude.Hashable
    EventSourceMappingConfiguration

instance
  Prelude.NFData
    EventSourceMappingConfiguration