{-# 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.Firehose.Types.HttpEndpointDestinationConfiguration
-- 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.Firehose.Types.HttpEndpointDestinationConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.CloudWatchLoggingOptions
import Amazonka.Firehose.Types.HttpEndpointBufferingHints
import Amazonka.Firehose.Types.HttpEndpointConfiguration
import Amazonka.Firehose.Types.HttpEndpointRequestConfiguration
import Amazonka.Firehose.Types.HttpEndpointRetryOptions
import Amazonka.Firehose.Types.HttpEndpointS3BackupMode
import Amazonka.Firehose.Types.ProcessingConfiguration
import Amazonka.Firehose.Types.S3DestinationConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the configuration of the HTTP endpoint destination.
--
-- /See:/ 'newHttpEndpointDestinationConfiguration' smart constructor.
data HttpEndpointDestinationConfiguration = HttpEndpointDestinationConfiguration'
  { -- | Describes the S3 bucket backup options for the data that Kinesis Data
    -- Firehose delivers to the HTTP endpoint destination. You can back up all
    -- documents (@AllData@) or only the documents that Kinesis Data Firehose
    -- could not deliver to the specified HTTP endpoint destination
    -- (@FailedDataOnly@).
    HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointS3BackupMode
s3BackupMode :: Prelude.Maybe HttpEndpointS3BackupMode,
    HttpEndpointDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The buffering options that can be used before data is delivered to the
    -- specified destination. Kinesis Data Firehose treats these options as
    -- hints, and it might choose to use more optimal values. The @SizeInMBs@
    -- and @IntervalInSeconds@ parameters are optional. However, if you specify
    -- a value for one of them, you must also provide a value for the other.
    HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointBufferingHints
bufferingHints :: Prelude.Maybe HttpEndpointBufferingHints,
    -- | Describes the retry behavior in case Kinesis Data Firehose is unable to
    -- deliver data to the specified HTTP endpoint destination, or if it
    -- doesn\'t receive a valid acknowledgment of receipt from the specified
    -- HTTP endpoint destination.
    HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointRetryOptions
retryOptions :: Prelude.Maybe HttpEndpointRetryOptions,
    HttpEndpointDestinationConfiguration
-> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
    -- | The configuration of the requeste sent to the HTTP endpoint specified as
    -- the destination.
    HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointRequestConfiguration
requestConfiguration :: Prelude.Maybe HttpEndpointRequestConfiguration,
    -- | Kinesis Data Firehose uses this IAM role for all the permissions that
    -- the delivery stream needs.
    HttpEndpointDestinationConfiguration -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The configuration of the HTTP endpoint selected as the destination.
    HttpEndpointDestinationConfiguration -> HttpEndpointConfiguration
endpointConfiguration :: HttpEndpointConfiguration,
    HttpEndpointDestinationConfiguration -> S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
  }
  deriving (HttpEndpointDestinationConfiguration
-> HttpEndpointDestinationConfiguration -> Bool
(HttpEndpointDestinationConfiguration
 -> HttpEndpointDestinationConfiguration -> Bool)
-> (HttpEndpointDestinationConfiguration
    -> HttpEndpointDestinationConfiguration -> Bool)
-> Eq HttpEndpointDestinationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HttpEndpointDestinationConfiguration
-> HttpEndpointDestinationConfiguration -> Bool
$c/= :: HttpEndpointDestinationConfiguration
-> HttpEndpointDestinationConfiguration -> Bool
== :: HttpEndpointDestinationConfiguration
-> HttpEndpointDestinationConfiguration -> Bool
$c== :: HttpEndpointDestinationConfiguration
-> HttpEndpointDestinationConfiguration -> Bool
Prelude.Eq, Int -> HttpEndpointDestinationConfiguration -> ShowS
[HttpEndpointDestinationConfiguration] -> ShowS
HttpEndpointDestinationConfiguration -> String
(Int -> HttpEndpointDestinationConfiguration -> ShowS)
-> (HttpEndpointDestinationConfiguration -> String)
-> ([HttpEndpointDestinationConfiguration] -> ShowS)
-> Show HttpEndpointDestinationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HttpEndpointDestinationConfiguration] -> ShowS
$cshowList :: [HttpEndpointDestinationConfiguration] -> ShowS
show :: HttpEndpointDestinationConfiguration -> String
$cshow :: HttpEndpointDestinationConfiguration -> String
showsPrec :: Int -> HttpEndpointDestinationConfiguration -> ShowS
$cshowsPrec :: Int -> HttpEndpointDestinationConfiguration -> ShowS
Prelude.Show, (forall x.
 HttpEndpointDestinationConfiguration
 -> Rep HttpEndpointDestinationConfiguration x)
-> (forall x.
    Rep HttpEndpointDestinationConfiguration x
    -> HttpEndpointDestinationConfiguration)
-> Generic HttpEndpointDestinationConfiguration
forall x.
Rep HttpEndpointDestinationConfiguration x
-> HttpEndpointDestinationConfiguration
forall x.
HttpEndpointDestinationConfiguration
-> Rep HttpEndpointDestinationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HttpEndpointDestinationConfiguration x
-> HttpEndpointDestinationConfiguration
$cfrom :: forall x.
HttpEndpointDestinationConfiguration
-> Rep HttpEndpointDestinationConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'HttpEndpointDestinationConfiguration' 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:
--
-- 's3BackupMode', 'httpEndpointDestinationConfiguration_s3BackupMode' - Describes the S3 bucket backup options for the data that Kinesis Data
-- Firehose delivers to the HTTP endpoint destination. You can back up all
-- documents (@AllData@) or only the documents that Kinesis Data Firehose
-- could not deliver to the specified HTTP endpoint destination
-- (@FailedDataOnly@).
--
-- 'cloudWatchLoggingOptions', 'httpEndpointDestinationConfiguration_cloudWatchLoggingOptions' - Undocumented member.
--
-- 'bufferingHints', 'httpEndpointDestinationConfiguration_bufferingHints' - The buffering options that can be used before data is delivered to the
-- specified destination. Kinesis Data Firehose treats these options as
-- hints, and it might choose to use more optimal values. The @SizeInMBs@
-- and @IntervalInSeconds@ parameters are optional. However, if you specify
-- a value for one of them, you must also provide a value for the other.
--
-- 'retryOptions', 'httpEndpointDestinationConfiguration_retryOptions' - Describes the retry behavior in case Kinesis Data Firehose is unable to
-- deliver data to the specified HTTP endpoint destination, or if it
-- doesn\'t receive a valid acknowledgment of receipt from the specified
-- HTTP endpoint destination.
--
-- 'processingConfiguration', 'httpEndpointDestinationConfiguration_processingConfiguration' - Undocumented member.
--
-- 'requestConfiguration', 'httpEndpointDestinationConfiguration_requestConfiguration' - The configuration of the requeste sent to the HTTP endpoint specified as
-- the destination.
--
-- 'roleARN', 'httpEndpointDestinationConfiguration_roleARN' - Kinesis Data Firehose uses this IAM role for all the permissions that
-- the delivery stream needs.
--
-- 'endpointConfiguration', 'httpEndpointDestinationConfiguration_endpointConfiguration' - The configuration of the HTTP endpoint selected as the destination.
--
-- 's3Configuration', 'httpEndpointDestinationConfiguration_s3Configuration' - Undocumented member.
newHttpEndpointDestinationConfiguration ::
  -- | 'endpointConfiguration'
  HttpEndpointConfiguration ->
  -- | 's3Configuration'
  S3DestinationConfiguration ->
  HttpEndpointDestinationConfiguration
newHttpEndpointDestinationConfiguration :: HttpEndpointConfiguration
-> S3DestinationConfiguration
-> HttpEndpointDestinationConfiguration
newHttpEndpointDestinationConfiguration
  HttpEndpointConfiguration
pEndpointConfiguration_
  S3DestinationConfiguration
pS3Configuration_ =
    HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointS3BackupMode
-> Maybe CloudWatchLoggingOptions
-> Maybe HttpEndpointBufferingHints
-> Maybe HttpEndpointRetryOptions
-> Maybe ProcessingConfiguration
-> Maybe HttpEndpointRequestConfiguration
-> Maybe Text
-> HttpEndpointConfiguration
-> S3DestinationConfiguration
-> HttpEndpointDestinationConfiguration
HttpEndpointDestinationConfiguration'
      { $sel:s3BackupMode:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointS3BackupMode
s3BackupMode =
          Maybe HttpEndpointS3BackupMode
forall a. Maybe a
Prelude.Nothing,
        $sel:cloudWatchLoggingOptions:HttpEndpointDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions =
          Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:bufferingHints:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointBufferingHints
bufferingHints = Maybe HttpEndpointBufferingHints
forall a. Maybe a
Prelude.Nothing,
        $sel:retryOptions:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointRetryOptions
retryOptions = Maybe HttpEndpointRetryOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:processingConfiguration:HttpEndpointDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration =
          Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:requestConfiguration:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointRequestConfiguration
requestConfiguration =
          Maybe HttpEndpointRequestConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:roleARN:HttpEndpointDestinationConfiguration' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:endpointConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointConfiguration
endpointConfiguration =
          HttpEndpointConfiguration
pEndpointConfiguration_,
        $sel:s3Configuration:HttpEndpointDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
pS3Configuration_
      }

-- | Describes the S3 bucket backup options for the data that Kinesis Data
-- Firehose delivers to the HTTP endpoint destination. You can back up all
-- documents (@AllData@) or only the documents that Kinesis Data Firehose
-- could not deliver to the specified HTTP endpoint destination
-- (@FailedDataOnly@).
httpEndpointDestinationConfiguration_s3BackupMode :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe HttpEndpointS3BackupMode)
httpEndpointDestinationConfiguration_s3BackupMode :: (Maybe HttpEndpointS3BackupMode
 -> f (Maybe HttpEndpointS3BackupMode))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_s3BackupMode = (HttpEndpointDestinationConfiguration
 -> Maybe HttpEndpointS3BackupMode)
-> (HttpEndpointDestinationConfiguration
    -> Maybe HttpEndpointS3BackupMode
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe HttpEndpointS3BackupMode)
     (Maybe HttpEndpointS3BackupMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe HttpEndpointS3BackupMode
s3BackupMode :: Maybe HttpEndpointS3BackupMode
$sel:s3BackupMode:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointS3BackupMode
s3BackupMode} -> Maybe HttpEndpointS3BackupMode
s3BackupMode) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe HttpEndpointS3BackupMode
a -> HttpEndpointDestinationConfiguration
s {$sel:s3BackupMode:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointS3BackupMode
s3BackupMode = Maybe HttpEndpointS3BackupMode
a} :: HttpEndpointDestinationConfiguration)

-- | Undocumented member.
httpEndpointDestinationConfiguration_cloudWatchLoggingOptions :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe CloudWatchLoggingOptions)
httpEndpointDestinationConfiguration_cloudWatchLoggingOptions :: (Maybe CloudWatchLoggingOptions
 -> f (Maybe CloudWatchLoggingOptions))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_cloudWatchLoggingOptions = (HttpEndpointDestinationConfiguration
 -> Maybe CloudWatchLoggingOptions)
-> (HttpEndpointDestinationConfiguration
    -> Maybe CloudWatchLoggingOptions
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe CloudWatchLoggingOptions)
     (Maybe CloudWatchLoggingOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
$sel:cloudWatchLoggingOptions:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions} -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe CloudWatchLoggingOptions
a -> HttpEndpointDestinationConfiguration
s {$sel:cloudWatchLoggingOptions:HttpEndpointDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
a} :: HttpEndpointDestinationConfiguration)

-- | The buffering options that can be used before data is delivered to the
-- specified destination. Kinesis Data Firehose treats these options as
-- hints, and it might choose to use more optimal values. The @SizeInMBs@
-- and @IntervalInSeconds@ parameters are optional. However, if you specify
-- a value for one of them, you must also provide a value for the other.
httpEndpointDestinationConfiguration_bufferingHints :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe HttpEndpointBufferingHints)
httpEndpointDestinationConfiguration_bufferingHints :: (Maybe HttpEndpointBufferingHints
 -> f (Maybe HttpEndpointBufferingHints))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_bufferingHints = (HttpEndpointDestinationConfiguration
 -> Maybe HttpEndpointBufferingHints)
-> (HttpEndpointDestinationConfiguration
    -> Maybe HttpEndpointBufferingHints
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe HttpEndpointBufferingHints)
     (Maybe HttpEndpointBufferingHints)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe HttpEndpointBufferingHints
bufferingHints :: Maybe HttpEndpointBufferingHints
$sel:bufferingHints:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointBufferingHints
bufferingHints} -> Maybe HttpEndpointBufferingHints
bufferingHints) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe HttpEndpointBufferingHints
a -> HttpEndpointDestinationConfiguration
s {$sel:bufferingHints:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointBufferingHints
bufferingHints = Maybe HttpEndpointBufferingHints
a} :: HttpEndpointDestinationConfiguration)

-- | Describes the retry behavior in case Kinesis Data Firehose is unable to
-- deliver data to the specified HTTP endpoint destination, or if it
-- doesn\'t receive a valid acknowledgment of receipt from the specified
-- HTTP endpoint destination.
httpEndpointDestinationConfiguration_retryOptions :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe HttpEndpointRetryOptions)
httpEndpointDestinationConfiguration_retryOptions :: (Maybe HttpEndpointRetryOptions
 -> f (Maybe HttpEndpointRetryOptions))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_retryOptions = (HttpEndpointDestinationConfiguration
 -> Maybe HttpEndpointRetryOptions)
-> (HttpEndpointDestinationConfiguration
    -> Maybe HttpEndpointRetryOptions
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe HttpEndpointRetryOptions)
     (Maybe HttpEndpointRetryOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe HttpEndpointRetryOptions
retryOptions :: Maybe HttpEndpointRetryOptions
$sel:retryOptions:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointRetryOptions
retryOptions} -> Maybe HttpEndpointRetryOptions
retryOptions) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe HttpEndpointRetryOptions
a -> HttpEndpointDestinationConfiguration
s {$sel:retryOptions:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointRetryOptions
retryOptions = Maybe HttpEndpointRetryOptions
a} :: HttpEndpointDestinationConfiguration)

-- | Undocumented member.
httpEndpointDestinationConfiguration_processingConfiguration :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe ProcessingConfiguration)
httpEndpointDestinationConfiguration_processingConfiguration :: (Maybe ProcessingConfiguration
 -> f (Maybe ProcessingConfiguration))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_processingConfiguration = (HttpEndpointDestinationConfiguration
 -> Maybe ProcessingConfiguration)
-> (HttpEndpointDestinationConfiguration
    -> Maybe ProcessingConfiguration
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe ProcessingConfiguration)
     (Maybe ProcessingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe ProcessingConfiguration
processingConfiguration :: Maybe ProcessingConfiguration
$sel:processingConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe ProcessingConfiguration
processingConfiguration} -> Maybe ProcessingConfiguration
processingConfiguration) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe ProcessingConfiguration
a -> HttpEndpointDestinationConfiguration
s {$sel:processingConfiguration:HttpEndpointDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
a} :: HttpEndpointDestinationConfiguration)

-- | The configuration of the requeste sent to the HTTP endpoint specified as
-- the destination.
httpEndpointDestinationConfiguration_requestConfiguration :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe HttpEndpointRequestConfiguration)
httpEndpointDestinationConfiguration_requestConfiguration :: (Maybe HttpEndpointRequestConfiguration
 -> f (Maybe HttpEndpointRequestConfiguration))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_requestConfiguration = (HttpEndpointDestinationConfiguration
 -> Maybe HttpEndpointRequestConfiguration)
-> (HttpEndpointDestinationConfiguration
    -> Maybe HttpEndpointRequestConfiguration
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe HttpEndpointRequestConfiguration)
     (Maybe HttpEndpointRequestConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe HttpEndpointRequestConfiguration
requestConfiguration :: Maybe HttpEndpointRequestConfiguration
$sel:requestConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointRequestConfiguration
requestConfiguration} -> Maybe HttpEndpointRequestConfiguration
requestConfiguration) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe HttpEndpointRequestConfiguration
a -> HttpEndpointDestinationConfiguration
s {$sel:requestConfiguration:HttpEndpointDestinationConfiguration' :: Maybe HttpEndpointRequestConfiguration
requestConfiguration = Maybe HttpEndpointRequestConfiguration
a} :: HttpEndpointDestinationConfiguration)

-- | Kinesis Data Firehose uses this IAM role for all the permissions that
-- the delivery stream needs.
httpEndpointDestinationConfiguration_roleARN :: Lens.Lens' HttpEndpointDestinationConfiguration (Prelude.Maybe Prelude.Text)
httpEndpointDestinationConfiguration_roleARN :: (Maybe Text -> f (Maybe Text))
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_roleARN = (HttpEndpointDestinationConfiguration -> Maybe Text)
-> (HttpEndpointDestinationConfiguration
    -> Maybe Text -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} Maybe Text
a -> HttpEndpointDestinationConfiguration
s {$sel:roleARN:HttpEndpointDestinationConfiguration' :: Maybe Text
roleARN = Maybe Text
a} :: HttpEndpointDestinationConfiguration)

-- | The configuration of the HTTP endpoint selected as the destination.
httpEndpointDestinationConfiguration_endpointConfiguration :: Lens.Lens' HttpEndpointDestinationConfiguration HttpEndpointConfiguration
httpEndpointDestinationConfiguration_endpointConfiguration :: (HttpEndpointConfiguration -> f HttpEndpointConfiguration)
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_endpointConfiguration = (HttpEndpointDestinationConfiguration -> HttpEndpointConfiguration)
-> (HttpEndpointDestinationConfiguration
    -> HttpEndpointConfiguration
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     HttpEndpointConfiguration
     HttpEndpointConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {HttpEndpointConfiguration
endpointConfiguration :: HttpEndpointConfiguration
$sel:endpointConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration -> HttpEndpointConfiguration
endpointConfiguration} -> HttpEndpointConfiguration
endpointConfiguration) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} HttpEndpointConfiguration
a -> HttpEndpointDestinationConfiguration
s {$sel:endpointConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointConfiguration
endpointConfiguration = HttpEndpointConfiguration
a} :: HttpEndpointDestinationConfiguration)

-- | Undocumented member.
httpEndpointDestinationConfiguration_s3Configuration :: Lens.Lens' HttpEndpointDestinationConfiguration S3DestinationConfiguration
httpEndpointDestinationConfiguration_s3Configuration :: (S3DestinationConfiguration -> f S3DestinationConfiguration)
-> HttpEndpointDestinationConfiguration
-> f HttpEndpointDestinationConfiguration
httpEndpointDestinationConfiguration_s3Configuration = (HttpEndpointDestinationConfiguration
 -> S3DestinationConfiguration)
-> (HttpEndpointDestinationConfiguration
    -> S3DestinationConfiguration
    -> HttpEndpointDestinationConfiguration)
-> Lens
     HttpEndpointDestinationConfiguration
     HttpEndpointDestinationConfiguration
     S3DestinationConfiguration
     S3DestinationConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpEndpointDestinationConfiguration' {S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
$sel:s3Configuration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration -> S3DestinationConfiguration
s3Configuration} -> S3DestinationConfiguration
s3Configuration) (\s :: HttpEndpointDestinationConfiguration
s@HttpEndpointDestinationConfiguration' {} S3DestinationConfiguration
a -> HttpEndpointDestinationConfiguration
s {$sel:s3Configuration:HttpEndpointDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
a} :: HttpEndpointDestinationConfiguration)

instance
  Prelude.Hashable
    HttpEndpointDestinationConfiguration

instance
  Prelude.NFData
    HttpEndpointDestinationConfiguration

instance
  Core.ToJSON
    HttpEndpointDestinationConfiguration
  where
  toJSON :: HttpEndpointDestinationConfiguration -> Value
toJSON HttpEndpointDestinationConfiguration' {Maybe Text
Maybe CloudWatchLoggingOptions
Maybe HttpEndpointBufferingHints
Maybe HttpEndpointRequestConfiguration
Maybe HttpEndpointRetryOptions
Maybe HttpEndpointS3BackupMode
Maybe ProcessingConfiguration
HttpEndpointConfiguration
S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
endpointConfiguration :: HttpEndpointConfiguration
roleARN :: Maybe Text
requestConfiguration :: Maybe HttpEndpointRequestConfiguration
processingConfiguration :: Maybe ProcessingConfiguration
retryOptions :: Maybe HttpEndpointRetryOptions
bufferingHints :: Maybe HttpEndpointBufferingHints
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
s3BackupMode :: Maybe HttpEndpointS3BackupMode
$sel:s3Configuration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration -> S3DestinationConfiguration
$sel:endpointConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration -> HttpEndpointConfiguration
$sel:roleARN:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration -> Maybe Text
$sel:requestConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointRequestConfiguration
$sel:processingConfiguration:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe ProcessingConfiguration
$sel:retryOptions:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointRetryOptions
$sel:bufferingHints:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointBufferingHints
$sel:cloudWatchLoggingOptions:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
$sel:s3BackupMode:HttpEndpointDestinationConfiguration' :: HttpEndpointDestinationConfiguration
-> Maybe HttpEndpointS3BackupMode
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"S3BackupMode" Text -> HttpEndpointS3BackupMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HttpEndpointS3BackupMode -> Pair)
-> Maybe HttpEndpointS3BackupMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpEndpointS3BackupMode
s3BackupMode,
            (Text
"CloudWatchLoggingOptions" Text -> CloudWatchLoggingOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CloudWatchLoggingOptions -> Pair)
-> Maybe CloudWatchLoggingOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions,
            (Text
"BufferingHints" Text -> HttpEndpointBufferingHints -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HttpEndpointBufferingHints -> Pair)
-> Maybe HttpEndpointBufferingHints -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpEndpointBufferingHints
bufferingHints,
            (Text
"RetryOptions" Text -> HttpEndpointRetryOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HttpEndpointRetryOptions -> Pair)
-> Maybe HttpEndpointRetryOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpEndpointRetryOptions
retryOptions,
            (Text
"ProcessingConfiguration" Text -> ProcessingConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProcessingConfiguration -> Pair)
-> Maybe ProcessingConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingConfiguration
processingConfiguration,
            (Text
"RequestConfiguration" Text -> HttpEndpointRequestConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HttpEndpointRequestConfiguration -> Pair)
-> Maybe HttpEndpointRequestConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpEndpointRequestConfiguration
requestConfiguration,
            (Text
"RoleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleARN,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"EndpointConfiguration"
                  Text -> HttpEndpointConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HttpEndpointConfiguration
endpointConfiguration
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"S3Configuration" Text -> S3DestinationConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3DestinationConfiguration
s3Configuration)
          ]
      )