{-# 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.Pipes.Types.UpdatePipeSourceKinesisStreamParameters
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pipes.Types.UpdatePipeSourceKinesisStreamParameters where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pipes.Types.DeadLetterConfig
import Amazonka.Pipes.Types.OnPartialBatchItemFailureStreams
import qualified Amazonka.Prelude as Prelude

-- | The parameters for using a Kinesis stream as a source.
--
-- /See:/ 'newUpdatePipeSourceKinesisStreamParameters' smart constructor.
data UpdatePipeSourceKinesisStreamParameters = UpdatePipeSourceKinesisStreamParameters'
  { -- | The maximum number of records to include in each batch.
    UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
batchSize :: Prelude.Maybe Prelude.Natural,
    -- | Define the target queue to send dead-letter queue events to.
    UpdatePipeSourceKinesisStreamParameters -> Maybe DeadLetterConfig
deadLetterConfig :: Prelude.Maybe DeadLetterConfig,
    -- | The maximum length of a time to wait for events.
    UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
maximumBatchingWindowInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | (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, EventBridge never discards old records.
    UpdatePipeSourceKinesisStreamParameters -> Maybe Int
maximumRecordAgeInSeconds :: Prelude.Maybe Prelude.Int,
    -- | (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, EventBridge retries
    -- failed records until the record expires in the event source.
    UpdatePipeSourceKinesisStreamParameters -> Maybe Int
maximumRetryAttempts :: Prelude.Maybe Prelude.Int,
    -- | (Streams only) Define how to handle item process failures.
    -- @AUTOMATIC_BISECT@ halves each batch and retry each half until all the
    -- records are processed or there is one failed message left in the batch.
    UpdatePipeSourceKinesisStreamParameters
-> Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure :: Prelude.Maybe OnPartialBatchItemFailureStreams,
    -- | (Streams only) The number of batches to process concurrently from each
    -- shard. The default value is 1.
    UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
parallelizationFactor :: Prelude.Maybe Prelude.Natural
  }
  deriving (UpdatePipeSourceKinesisStreamParameters
-> UpdatePipeSourceKinesisStreamParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePipeSourceKinesisStreamParameters
-> UpdatePipeSourceKinesisStreamParameters -> Bool
$c/= :: UpdatePipeSourceKinesisStreamParameters
-> UpdatePipeSourceKinesisStreamParameters -> Bool
== :: UpdatePipeSourceKinesisStreamParameters
-> UpdatePipeSourceKinesisStreamParameters -> Bool
$c== :: UpdatePipeSourceKinesisStreamParameters
-> UpdatePipeSourceKinesisStreamParameters -> Bool
Prelude.Eq, ReadPrec [UpdatePipeSourceKinesisStreamParameters]
ReadPrec UpdatePipeSourceKinesisStreamParameters
Int -> ReadS UpdatePipeSourceKinesisStreamParameters
ReadS [UpdatePipeSourceKinesisStreamParameters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePipeSourceKinesisStreamParameters]
$creadListPrec :: ReadPrec [UpdatePipeSourceKinesisStreamParameters]
readPrec :: ReadPrec UpdatePipeSourceKinesisStreamParameters
$creadPrec :: ReadPrec UpdatePipeSourceKinesisStreamParameters
readList :: ReadS [UpdatePipeSourceKinesisStreamParameters]
$creadList :: ReadS [UpdatePipeSourceKinesisStreamParameters]
readsPrec :: Int -> ReadS UpdatePipeSourceKinesisStreamParameters
$creadsPrec :: Int -> ReadS UpdatePipeSourceKinesisStreamParameters
Prelude.Read, Int -> UpdatePipeSourceKinesisStreamParameters -> ShowS
[UpdatePipeSourceKinesisStreamParameters] -> ShowS
UpdatePipeSourceKinesisStreamParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePipeSourceKinesisStreamParameters] -> ShowS
$cshowList :: [UpdatePipeSourceKinesisStreamParameters] -> ShowS
show :: UpdatePipeSourceKinesisStreamParameters -> String
$cshow :: UpdatePipeSourceKinesisStreamParameters -> String
showsPrec :: Int -> UpdatePipeSourceKinesisStreamParameters -> ShowS
$cshowsPrec :: Int -> UpdatePipeSourceKinesisStreamParameters -> ShowS
Prelude.Show, forall x.
Rep UpdatePipeSourceKinesisStreamParameters x
-> UpdatePipeSourceKinesisStreamParameters
forall x.
UpdatePipeSourceKinesisStreamParameters
-> Rep UpdatePipeSourceKinesisStreamParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePipeSourceKinesisStreamParameters x
-> UpdatePipeSourceKinesisStreamParameters
$cfrom :: forall x.
UpdatePipeSourceKinesisStreamParameters
-> Rep UpdatePipeSourceKinesisStreamParameters x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePipeSourceKinesisStreamParameters' 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:
--
-- 'batchSize', 'updatePipeSourceKinesisStreamParameters_batchSize' - The maximum number of records to include in each batch.
--
-- 'deadLetterConfig', 'updatePipeSourceKinesisStreamParameters_deadLetterConfig' - Define the target queue to send dead-letter queue events to.
--
-- 'maximumBatchingWindowInSeconds', 'updatePipeSourceKinesisStreamParameters_maximumBatchingWindowInSeconds' - The maximum length of a time to wait for events.
--
-- 'maximumRecordAgeInSeconds', 'updatePipeSourceKinesisStreamParameters_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, EventBridge never discards old records.
--
-- 'maximumRetryAttempts', 'updatePipeSourceKinesisStreamParameters_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, EventBridge retries
-- failed records until the record expires in the event source.
--
-- 'onPartialBatchItemFailure', 'updatePipeSourceKinesisStreamParameters_onPartialBatchItemFailure' - (Streams only) Define how to handle item process failures.
-- @AUTOMATIC_BISECT@ halves each batch and retry each half until all the
-- records are processed or there is one failed message left in the batch.
--
-- 'parallelizationFactor', 'updatePipeSourceKinesisStreamParameters_parallelizationFactor' - (Streams only) The number of batches to process concurrently from each
-- shard. The default value is 1.
newUpdatePipeSourceKinesisStreamParameters ::
  UpdatePipeSourceKinesisStreamParameters
newUpdatePipeSourceKinesisStreamParameters :: UpdatePipeSourceKinesisStreamParameters
newUpdatePipeSourceKinesisStreamParameters =
  UpdatePipeSourceKinesisStreamParameters'
    { $sel:batchSize:UpdatePipeSourceKinesisStreamParameters' :: Maybe Natural
batchSize =
        forall a. Maybe a
Prelude.Nothing,
      $sel:deadLetterConfig:UpdatePipeSourceKinesisStreamParameters' :: Maybe DeadLetterConfig
deadLetterConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:maximumBatchingWindowInSeconds:UpdatePipeSourceKinesisStreamParameters' :: Maybe Natural
maximumBatchingWindowInSeconds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maximumRecordAgeInSeconds:UpdatePipeSourceKinesisStreamParameters' :: Maybe Int
maximumRecordAgeInSeconds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maximumRetryAttempts:UpdatePipeSourceKinesisStreamParameters' :: Maybe Int
maximumRetryAttempts =
        forall a. Maybe a
Prelude.Nothing,
      $sel:onPartialBatchItemFailure:UpdatePipeSourceKinesisStreamParameters' :: Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure =
        forall a. Maybe a
Prelude.Nothing,
      $sel:parallelizationFactor:UpdatePipeSourceKinesisStreamParameters' :: Maybe Natural
parallelizationFactor =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of records to include in each batch.
updatePipeSourceKinesisStreamParameters_batchSize :: Lens.Lens' UpdatePipeSourceKinesisStreamParameters (Prelude.Maybe Prelude.Natural)
updatePipeSourceKinesisStreamParameters_batchSize :: Lens' UpdatePipeSourceKinesisStreamParameters (Maybe Natural)
updatePipeSourceKinesisStreamParameters_batchSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeSourceKinesisStreamParameters' {Maybe Natural
batchSize :: Maybe Natural
$sel:batchSize:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
batchSize} -> Maybe Natural
batchSize) (\s :: UpdatePipeSourceKinesisStreamParameters
s@UpdatePipeSourceKinesisStreamParameters' {} Maybe Natural
a -> UpdatePipeSourceKinesisStreamParameters
s {$sel:batchSize:UpdatePipeSourceKinesisStreamParameters' :: Maybe Natural
batchSize = Maybe Natural
a} :: UpdatePipeSourceKinesisStreamParameters)

-- | Define the target queue to send dead-letter queue events to.
updatePipeSourceKinesisStreamParameters_deadLetterConfig :: Lens.Lens' UpdatePipeSourceKinesisStreamParameters (Prelude.Maybe DeadLetterConfig)
updatePipeSourceKinesisStreamParameters_deadLetterConfig :: Lens'
  UpdatePipeSourceKinesisStreamParameters (Maybe DeadLetterConfig)
updatePipeSourceKinesisStreamParameters_deadLetterConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeSourceKinesisStreamParameters' {Maybe DeadLetterConfig
deadLetterConfig :: Maybe DeadLetterConfig
$sel:deadLetterConfig:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe DeadLetterConfig
deadLetterConfig} -> Maybe DeadLetterConfig
deadLetterConfig) (\s :: UpdatePipeSourceKinesisStreamParameters
s@UpdatePipeSourceKinesisStreamParameters' {} Maybe DeadLetterConfig
a -> UpdatePipeSourceKinesisStreamParameters
s {$sel:deadLetterConfig:UpdatePipeSourceKinesisStreamParameters' :: Maybe DeadLetterConfig
deadLetterConfig = Maybe DeadLetterConfig
a} :: UpdatePipeSourceKinesisStreamParameters)

-- | The maximum length of a time to wait for events.
updatePipeSourceKinesisStreamParameters_maximumBatchingWindowInSeconds :: Lens.Lens' UpdatePipeSourceKinesisStreamParameters (Prelude.Maybe Prelude.Natural)
updatePipeSourceKinesisStreamParameters_maximumBatchingWindowInSeconds :: Lens' UpdatePipeSourceKinesisStreamParameters (Maybe Natural)
updatePipeSourceKinesisStreamParameters_maximumBatchingWindowInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeSourceKinesisStreamParameters' {Maybe Natural
maximumBatchingWindowInSeconds :: Maybe Natural
$sel:maximumBatchingWindowInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
maximumBatchingWindowInSeconds} -> Maybe Natural
maximumBatchingWindowInSeconds) (\s :: UpdatePipeSourceKinesisStreamParameters
s@UpdatePipeSourceKinesisStreamParameters' {} Maybe Natural
a -> UpdatePipeSourceKinesisStreamParameters
s {$sel:maximumBatchingWindowInSeconds:UpdatePipeSourceKinesisStreamParameters' :: Maybe Natural
maximumBatchingWindowInSeconds = Maybe Natural
a} :: UpdatePipeSourceKinesisStreamParameters)

-- | (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, EventBridge never discards old records.
updatePipeSourceKinesisStreamParameters_maximumRecordAgeInSeconds :: Lens.Lens' UpdatePipeSourceKinesisStreamParameters (Prelude.Maybe Prelude.Int)
updatePipeSourceKinesisStreamParameters_maximumRecordAgeInSeconds :: Lens' UpdatePipeSourceKinesisStreamParameters (Maybe Int)
updatePipeSourceKinesisStreamParameters_maximumRecordAgeInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeSourceKinesisStreamParameters' {Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
$sel:maximumRecordAgeInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
maximumRecordAgeInSeconds} -> Maybe Int
maximumRecordAgeInSeconds) (\s :: UpdatePipeSourceKinesisStreamParameters
s@UpdatePipeSourceKinesisStreamParameters' {} Maybe Int
a -> UpdatePipeSourceKinesisStreamParameters
s {$sel:maximumRecordAgeInSeconds:UpdatePipeSourceKinesisStreamParameters' :: Maybe Int
maximumRecordAgeInSeconds = Maybe Int
a} :: UpdatePipeSourceKinesisStreamParameters)

-- | (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, EventBridge retries
-- failed records until the record expires in the event source.
updatePipeSourceKinesisStreamParameters_maximumRetryAttempts :: Lens.Lens' UpdatePipeSourceKinesisStreamParameters (Prelude.Maybe Prelude.Int)
updatePipeSourceKinesisStreamParameters_maximumRetryAttempts :: Lens' UpdatePipeSourceKinesisStreamParameters (Maybe Int)
updatePipeSourceKinesisStreamParameters_maximumRetryAttempts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeSourceKinesisStreamParameters' {Maybe Int
maximumRetryAttempts :: Maybe Int
$sel:maximumRetryAttempts:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
maximumRetryAttempts} -> Maybe Int
maximumRetryAttempts) (\s :: UpdatePipeSourceKinesisStreamParameters
s@UpdatePipeSourceKinesisStreamParameters' {} Maybe Int
a -> UpdatePipeSourceKinesisStreamParameters
s {$sel:maximumRetryAttempts:UpdatePipeSourceKinesisStreamParameters' :: Maybe Int
maximumRetryAttempts = Maybe Int
a} :: UpdatePipeSourceKinesisStreamParameters)

-- | (Streams only) Define how to handle item process failures.
-- @AUTOMATIC_BISECT@ halves each batch and retry each half until all the
-- records are processed or there is one failed message left in the batch.
updatePipeSourceKinesisStreamParameters_onPartialBatchItemFailure :: Lens.Lens' UpdatePipeSourceKinesisStreamParameters (Prelude.Maybe OnPartialBatchItemFailureStreams)
updatePipeSourceKinesisStreamParameters_onPartialBatchItemFailure :: Lens'
  UpdatePipeSourceKinesisStreamParameters
  (Maybe OnPartialBatchItemFailureStreams)
updatePipeSourceKinesisStreamParameters_onPartialBatchItemFailure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeSourceKinesisStreamParameters' {Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure :: Maybe OnPartialBatchItemFailureStreams
$sel:onPartialBatchItemFailure:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters
-> Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure} -> Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure) (\s :: UpdatePipeSourceKinesisStreamParameters
s@UpdatePipeSourceKinesisStreamParameters' {} Maybe OnPartialBatchItemFailureStreams
a -> UpdatePipeSourceKinesisStreamParameters
s {$sel:onPartialBatchItemFailure:UpdatePipeSourceKinesisStreamParameters' :: Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure = Maybe OnPartialBatchItemFailureStreams
a} :: UpdatePipeSourceKinesisStreamParameters)

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

instance
  Prelude.Hashable
    UpdatePipeSourceKinesisStreamParameters
  where
  hashWithSalt :: Int -> UpdatePipeSourceKinesisStreamParameters -> Int
hashWithSalt
    Int
_salt
    UpdatePipeSourceKinesisStreamParameters' {Maybe Int
Maybe Natural
Maybe DeadLetterConfig
Maybe OnPartialBatchItemFailureStreams
parallelizationFactor :: Maybe Natural
onPartialBatchItemFailure :: Maybe OnPartialBatchItemFailureStreams
maximumRetryAttempts :: Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
maximumBatchingWindowInSeconds :: Maybe Natural
deadLetterConfig :: Maybe DeadLetterConfig
batchSize :: Maybe Natural
$sel:parallelizationFactor:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
$sel:onPartialBatchItemFailure:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters
-> Maybe OnPartialBatchItemFailureStreams
$sel:maximumRetryAttempts:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
$sel:maximumRecordAgeInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
$sel:maximumBatchingWindowInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
$sel:deadLetterConfig:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe DeadLetterConfig
$sel:batchSize:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
batchSize
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeadLetterConfig
deadLetterConfig
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumBatchingWindowInSeconds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maximumRecordAgeInSeconds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maximumRetryAttempts
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
parallelizationFactor

instance
  Prelude.NFData
    UpdatePipeSourceKinesisStreamParameters
  where
  rnf :: UpdatePipeSourceKinesisStreamParameters -> ()
rnf UpdatePipeSourceKinesisStreamParameters' {Maybe Int
Maybe Natural
Maybe DeadLetterConfig
Maybe OnPartialBatchItemFailureStreams
parallelizationFactor :: Maybe Natural
onPartialBatchItemFailure :: Maybe OnPartialBatchItemFailureStreams
maximumRetryAttempts :: Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
maximumBatchingWindowInSeconds :: Maybe Natural
deadLetterConfig :: Maybe DeadLetterConfig
batchSize :: Maybe Natural
$sel:parallelizationFactor:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
$sel:onPartialBatchItemFailure:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters
-> Maybe OnPartialBatchItemFailureStreams
$sel:maximumRetryAttempts:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
$sel:maximumRecordAgeInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
$sel:maximumBatchingWindowInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
$sel:deadLetterConfig:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe DeadLetterConfig
$sel:batchSize:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
batchSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeadLetterConfig
deadLetterConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumBatchingWindowInSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maximumRecordAgeInSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maximumRetryAttempts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
parallelizationFactor

instance
  Data.ToJSON
    UpdatePipeSourceKinesisStreamParameters
  where
  toJSON :: UpdatePipeSourceKinesisStreamParameters -> Value
toJSON UpdatePipeSourceKinesisStreamParameters' {Maybe Int
Maybe Natural
Maybe DeadLetterConfig
Maybe OnPartialBatchItemFailureStreams
parallelizationFactor :: Maybe Natural
onPartialBatchItemFailure :: Maybe OnPartialBatchItemFailureStreams
maximumRetryAttempts :: Maybe Int
maximumRecordAgeInSeconds :: Maybe Int
maximumBatchingWindowInSeconds :: Maybe Natural
deadLetterConfig :: Maybe DeadLetterConfig
batchSize :: Maybe Natural
$sel:parallelizationFactor:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
$sel:onPartialBatchItemFailure:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters
-> Maybe OnPartialBatchItemFailureStreams
$sel:maximumRetryAttempts:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
$sel:maximumRecordAgeInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Int
$sel:maximumBatchingWindowInSeconds:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
$sel:deadLetterConfig:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe DeadLetterConfig
$sel:batchSize:UpdatePipeSourceKinesisStreamParameters' :: UpdatePipeSourceKinesisStreamParameters -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"BatchSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
batchSize,
            (Key
"DeadLetterConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeadLetterConfig
deadLetterConfig,
            (Key
"MaximumBatchingWindowInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumBatchingWindowInSeconds,
            (Key
"MaximumRecordAgeInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumRecordAgeInSeconds,
            (Key
"MaximumRetryAttempts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumRetryAttempts,
            (Key
"OnPartialBatchItemFailure" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnPartialBatchItemFailureStreams
onPartialBatchItemFailure,
            (Key
"ParallelizationFactor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parallelizationFactor
          ]
      )