{-# 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.ElasticsearchDestinationConfiguration
-- 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.ElasticsearchDestinationConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.CloudWatchLoggingOptions
import Amazonka.Firehose.Types.ElasticsearchBufferingHints
import Amazonka.Firehose.Types.ElasticsearchIndexRotationPeriod
import Amazonka.Firehose.Types.ElasticsearchRetryOptions
import Amazonka.Firehose.Types.ElasticsearchS3BackupMode
import Amazonka.Firehose.Types.ProcessingConfiguration
import Amazonka.Firehose.Types.S3DestinationConfiguration
import Amazonka.Firehose.Types.VpcConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the configuration of a destination in Amazon ES.
--
-- /See:/ 'newElasticsearchDestinationConfiguration' smart constructor.
data ElasticsearchDestinationConfiguration = ElasticsearchDestinationConfiguration'
  { -- | The Elasticsearch index rotation period. Index rotation appends a
    -- timestamp to the @IndexName@ to facilitate the expiration of old data.
    -- For more information, see
    -- <https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation Index Rotation for the Amazon ES Destination>.
    -- The default value is @OneDay@.
    ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod :: Prelude.Maybe ElasticsearchIndexRotationPeriod,
    -- | The Elasticsearch type name. For Elasticsearch 6.x, there can be only
    -- one type per index. If you try to specify a new type for an existing
    -- index that already has another type, Kinesis Data Firehose returns an
    -- error during run time.
    --
    -- For Elasticsearch 7.x, don\'t specify a @TypeName@.
    ElasticsearchDestinationConfiguration -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | Defines how documents should be delivered to Amazon S3. When it is set
    -- to @FailedDocumentsOnly@, Kinesis Data Firehose writes any documents
    -- that could not be indexed to the configured Amazon S3 destination, with
    -- @elasticsearch-failed\/@ appended to the key prefix. When set to
    -- @AllDocuments@, Kinesis Data Firehose delivers all incoming records to
    -- Amazon S3, and also writes failed documents with
    -- @elasticsearch-failed\/@ appended to the prefix. For more information,
    -- see
    -- <https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup Amazon S3 Backup for the Amazon ES Destination>.
    -- Default value is @FailedDocumentsOnly@.
    --
    -- You can\'t change this backup mode after you create the delivery stream.
    ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchS3BackupMode
s3BackupMode :: Prelude.Maybe ElasticsearchS3BackupMode,
    -- | The ARN of the Amazon ES domain. The IAM role must have permissions
    -- for @DescribeElasticsearchDomain@, @DescribeElasticsearchDomains@, and
    -- @DescribeElasticsearchDomainConfig@ after assuming the role specified in
    -- __RoleARN__. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
    --
    -- Specify either @ClusterEndpoint@ or @DomainARN@.
    ElasticsearchDestinationConfiguration -> Maybe Text
domainARN :: Prelude.Maybe Prelude.Text,
    -- | The Amazon CloudWatch logging options for your delivery stream.
    ElasticsearchDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The details of the VPC of the Amazon ES destination.
    ElasticsearchDestinationConfiguration -> Maybe VpcConfiguration
vpcConfiguration :: Prelude.Maybe VpcConfiguration,
    -- | The buffering options. If no value is specified, the default values for
    -- @ElasticsearchBufferingHints@ are used.
    ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchBufferingHints
bufferingHints :: Prelude.Maybe ElasticsearchBufferingHints,
    -- | The retry behavior in case Kinesis Data Firehose is unable to deliver
    -- documents to Amazon ES. The default value is 300 (5 minutes).
    ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchRetryOptions
retryOptions :: Prelude.Maybe ElasticsearchRetryOptions,
    -- | The data processing configuration.
    ElasticsearchDestinationConfiguration
-> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
    -- | The endpoint to use when communicating with the cluster. Specify either
    -- this @ClusterEndpoint@ or the @DomainARN@ field.
    ElasticsearchDestinationConfiguration -> Maybe Text
clusterEndpoint :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis
    -- Data Firehose for calling the Amazon ES Configuration API and for
    -- indexing documents. For more information, see
    -- <https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3 Grant Kinesis Data Firehose Access to an Amazon S3 Destination>
    -- and
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
    ElasticsearchDestinationConfiguration -> Text
roleARN :: Prelude.Text,
    -- | The Elasticsearch index name.
    ElasticsearchDestinationConfiguration -> Text
indexName :: Prelude.Text,
    -- | The configuration for the backup Amazon S3 location.
    ElasticsearchDestinationConfiguration -> S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
  }
  deriving (ElasticsearchDestinationConfiguration
-> ElasticsearchDestinationConfiguration -> Bool
(ElasticsearchDestinationConfiguration
 -> ElasticsearchDestinationConfiguration -> Bool)
-> (ElasticsearchDestinationConfiguration
    -> ElasticsearchDestinationConfiguration -> Bool)
-> Eq ElasticsearchDestinationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElasticsearchDestinationConfiguration
-> ElasticsearchDestinationConfiguration -> Bool
$c/= :: ElasticsearchDestinationConfiguration
-> ElasticsearchDestinationConfiguration -> Bool
== :: ElasticsearchDestinationConfiguration
-> ElasticsearchDestinationConfiguration -> Bool
$c== :: ElasticsearchDestinationConfiguration
-> ElasticsearchDestinationConfiguration -> Bool
Prelude.Eq, ReadPrec [ElasticsearchDestinationConfiguration]
ReadPrec ElasticsearchDestinationConfiguration
Int -> ReadS ElasticsearchDestinationConfiguration
ReadS [ElasticsearchDestinationConfiguration]
(Int -> ReadS ElasticsearchDestinationConfiguration)
-> ReadS [ElasticsearchDestinationConfiguration]
-> ReadPrec ElasticsearchDestinationConfiguration
-> ReadPrec [ElasticsearchDestinationConfiguration]
-> Read ElasticsearchDestinationConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElasticsearchDestinationConfiguration]
$creadListPrec :: ReadPrec [ElasticsearchDestinationConfiguration]
readPrec :: ReadPrec ElasticsearchDestinationConfiguration
$creadPrec :: ReadPrec ElasticsearchDestinationConfiguration
readList :: ReadS [ElasticsearchDestinationConfiguration]
$creadList :: ReadS [ElasticsearchDestinationConfiguration]
readsPrec :: Int -> ReadS ElasticsearchDestinationConfiguration
$creadsPrec :: Int -> ReadS ElasticsearchDestinationConfiguration
Prelude.Read, Int -> ElasticsearchDestinationConfiguration -> ShowS
[ElasticsearchDestinationConfiguration] -> ShowS
ElasticsearchDestinationConfiguration -> String
(Int -> ElasticsearchDestinationConfiguration -> ShowS)
-> (ElasticsearchDestinationConfiguration -> String)
-> ([ElasticsearchDestinationConfiguration] -> ShowS)
-> Show ElasticsearchDestinationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElasticsearchDestinationConfiguration] -> ShowS
$cshowList :: [ElasticsearchDestinationConfiguration] -> ShowS
show :: ElasticsearchDestinationConfiguration -> String
$cshow :: ElasticsearchDestinationConfiguration -> String
showsPrec :: Int -> ElasticsearchDestinationConfiguration -> ShowS
$cshowsPrec :: Int -> ElasticsearchDestinationConfiguration -> ShowS
Prelude.Show, (forall x.
 ElasticsearchDestinationConfiguration
 -> Rep ElasticsearchDestinationConfiguration x)
-> (forall x.
    Rep ElasticsearchDestinationConfiguration x
    -> ElasticsearchDestinationConfiguration)
-> Generic ElasticsearchDestinationConfiguration
forall x.
Rep ElasticsearchDestinationConfiguration x
-> ElasticsearchDestinationConfiguration
forall x.
ElasticsearchDestinationConfiguration
-> Rep ElasticsearchDestinationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ElasticsearchDestinationConfiguration x
-> ElasticsearchDestinationConfiguration
$cfrom :: forall x.
ElasticsearchDestinationConfiguration
-> Rep ElasticsearchDestinationConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'ElasticsearchDestinationConfiguration' 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:
--
-- 'indexRotationPeriod', 'elasticsearchDestinationConfiguration_indexRotationPeriod' - The Elasticsearch index rotation period. Index rotation appends a
-- timestamp to the @IndexName@ to facilitate the expiration of old data.
-- For more information, see
-- <https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation Index Rotation for the Amazon ES Destination>.
-- The default value is @OneDay@.
--
-- 'typeName', 'elasticsearchDestinationConfiguration_typeName' - The Elasticsearch type name. For Elasticsearch 6.x, there can be only
-- one type per index. If you try to specify a new type for an existing
-- index that already has another type, Kinesis Data Firehose returns an
-- error during run time.
--
-- For Elasticsearch 7.x, don\'t specify a @TypeName@.
--
-- 's3BackupMode', 'elasticsearchDestinationConfiguration_s3BackupMode' - Defines how documents should be delivered to Amazon S3. When it is set
-- to @FailedDocumentsOnly@, Kinesis Data Firehose writes any documents
-- that could not be indexed to the configured Amazon S3 destination, with
-- @elasticsearch-failed\/@ appended to the key prefix. When set to
-- @AllDocuments@, Kinesis Data Firehose delivers all incoming records to
-- Amazon S3, and also writes failed documents with
-- @elasticsearch-failed\/@ appended to the prefix. For more information,
-- see
-- <https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup Amazon S3 Backup for the Amazon ES Destination>.
-- Default value is @FailedDocumentsOnly@.
--
-- You can\'t change this backup mode after you create the delivery stream.
--
-- 'domainARN', 'elasticsearchDestinationConfiguration_domainARN' - The ARN of the Amazon ES domain. The IAM role must have permissions
-- for @DescribeElasticsearchDomain@, @DescribeElasticsearchDomains@, and
-- @DescribeElasticsearchDomainConfig@ after assuming the role specified in
-- __RoleARN__. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- Specify either @ClusterEndpoint@ or @DomainARN@.
--
-- 'cloudWatchLoggingOptions', 'elasticsearchDestinationConfiguration_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options for your delivery stream.
--
-- 'vpcConfiguration', 'elasticsearchDestinationConfiguration_vpcConfiguration' - The details of the VPC of the Amazon ES destination.
--
-- 'bufferingHints', 'elasticsearchDestinationConfiguration_bufferingHints' - The buffering options. If no value is specified, the default values for
-- @ElasticsearchBufferingHints@ are used.
--
-- 'retryOptions', 'elasticsearchDestinationConfiguration_retryOptions' - The retry behavior in case Kinesis Data Firehose is unable to deliver
-- documents to Amazon ES. The default value is 300 (5 minutes).
--
-- 'processingConfiguration', 'elasticsearchDestinationConfiguration_processingConfiguration' - The data processing configuration.
--
-- 'clusterEndpoint', 'elasticsearchDestinationConfiguration_clusterEndpoint' - The endpoint to use when communicating with the cluster. Specify either
-- this @ClusterEndpoint@ or the @DomainARN@ field.
--
-- 'roleARN', 'elasticsearchDestinationConfiguration_roleARN' - The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis
-- Data Firehose for calling the Amazon ES Configuration API and for
-- indexing documents. For more information, see
-- <https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3 Grant Kinesis Data Firehose Access to an Amazon S3 Destination>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- 'indexName', 'elasticsearchDestinationConfiguration_indexName' - The Elasticsearch index name.
--
-- 's3Configuration', 'elasticsearchDestinationConfiguration_s3Configuration' - The configuration for the backup Amazon S3 location.
newElasticsearchDestinationConfiguration ::
  -- | 'roleARN'
  Prelude.Text ->
  -- | 'indexName'
  Prelude.Text ->
  -- | 's3Configuration'
  S3DestinationConfiguration ->
  ElasticsearchDestinationConfiguration
newElasticsearchDestinationConfiguration :: Text
-> Text
-> S3DestinationConfiguration
-> ElasticsearchDestinationConfiguration
newElasticsearchDestinationConfiguration
  Text
pRoleARN_
  Text
pIndexName_
  S3DestinationConfiguration
pS3Configuration_ =
    ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchIndexRotationPeriod
-> Maybe Text
-> Maybe ElasticsearchS3BackupMode
-> Maybe Text
-> Maybe CloudWatchLoggingOptions
-> Maybe VpcConfiguration
-> Maybe ElasticsearchBufferingHints
-> Maybe ElasticsearchRetryOptions
-> Maybe ProcessingConfiguration
-> Maybe Text
-> Text
-> Text
-> S3DestinationConfiguration
-> ElasticsearchDestinationConfiguration
ElasticsearchDestinationConfiguration'
      { $sel:indexRotationPeriod:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod =
          Maybe ElasticsearchIndexRotationPeriod
forall a. Maybe a
Prelude.Nothing,
        $sel:typeName:ElasticsearchDestinationConfiguration' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:s3BackupMode:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchS3BackupMode
s3BackupMode = Maybe ElasticsearchS3BackupMode
forall a. Maybe a
Prelude.Nothing,
        $sel:domainARN:ElasticsearchDestinationConfiguration' :: Maybe Text
domainARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:cloudWatchLoggingOptions:ElasticsearchDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions =
          Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfiguration:ElasticsearchDestinationConfiguration' :: Maybe VpcConfiguration
vpcConfiguration = Maybe VpcConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:bufferingHints:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchBufferingHints
bufferingHints = Maybe ElasticsearchBufferingHints
forall a. Maybe a
Prelude.Nothing,
        $sel:retryOptions:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchRetryOptions
retryOptions = Maybe ElasticsearchRetryOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:processingConfiguration:ElasticsearchDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration =
          Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterEndpoint:ElasticsearchDestinationConfiguration' :: Maybe Text
clusterEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:roleARN:ElasticsearchDestinationConfiguration' :: Text
roleARN = Text
pRoleARN_,
        $sel:indexName:ElasticsearchDestinationConfiguration' :: Text
indexName = Text
pIndexName_,
        $sel:s3Configuration:ElasticsearchDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
pS3Configuration_
      }

-- | The Elasticsearch index rotation period. Index rotation appends a
-- timestamp to the @IndexName@ to facilitate the expiration of old data.
-- For more information, see
-- <https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation Index Rotation for the Amazon ES Destination>.
-- The default value is @OneDay@.
elasticsearchDestinationConfiguration_indexRotationPeriod :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe ElasticsearchIndexRotationPeriod)
elasticsearchDestinationConfiguration_indexRotationPeriod :: (Maybe ElasticsearchIndexRotationPeriod
 -> f (Maybe ElasticsearchIndexRotationPeriod))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_indexRotationPeriod = (ElasticsearchDestinationConfiguration
 -> Maybe ElasticsearchIndexRotationPeriod)
-> (ElasticsearchDestinationConfiguration
    -> Maybe ElasticsearchIndexRotationPeriod
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe ElasticsearchIndexRotationPeriod)
     (Maybe ElasticsearchIndexRotationPeriod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod :: Maybe ElasticsearchIndexRotationPeriod
$sel:indexRotationPeriod:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod} -> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe ElasticsearchIndexRotationPeriod
a -> ElasticsearchDestinationConfiguration
s {$sel:indexRotationPeriod:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod = Maybe ElasticsearchIndexRotationPeriod
a} :: ElasticsearchDestinationConfiguration)

-- | The Elasticsearch type name. For Elasticsearch 6.x, there can be only
-- one type per index. If you try to specify a new type for an existing
-- index that already has another type, Kinesis Data Firehose returns an
-- error during run time.
--
-- For Elasticsearch 7.x, don\'t specify a @TypeName@.
elasticsearchDestinationConfiguration_typeName :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe Prelude.Text)
elasticsearchDestinationConfiguration_typeName :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_typeName = (ElasticsearchDestinationConfiguration -> Maybe Text)
-> (ElasticsearchDestinationConfiguration
    -> Maybe Text -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe Text
typeName :: Maybe Text
$sel:typeName:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe Text
a -> ElasticsearchDestinationConfiguration
s {$sel:typeName:ElasticsearchDestinationConfiguration' :: Maybe Text
typeName = Maybe Text
a} :: ElasticsearchDestinationConfiguration)

-- | Defines how documents should be delivered to Amazon S3. When it is set
-- to @FailedDocumentsOnly@, Kinesis Data Firehose writes any documents
-- that could not be indexed to the configured Amazon S3 destination, with
-- @elasticsearch-failed\/@ appended to the key prefix. When set to
-- @AllDocuments@, Kinesis Data Firehose delivers all incoming records to
-- Amazon S3, and also writes failed documents with
-- @elasticsearch-failed\/@ appended to the prefix. For more information,
-- see
-- <https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup Amazon S3 Backup for the Amazon ES Destination>.
-- Default value is @FailedDocumentsOnly@.
--
-- You can\'t change this backup mode after you create the delivery stream.
elasticsearchDestinationConfiguration_s3BackupMode :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe ElasticsearchS3BackupMode)
elasticsearchDestinationConfiguration_s3BackupMode :: (Maybe ElasticsearchS3BackupMode
 -> f (Maybe ElasticsearchS3BackupMode))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_s3BackupMode = (ElasticsearchDestinationConfiguration
 -> Maybe ElasticsearchS3BackupMode)
-> (ElasticsearchDestinationConfiguration
    -> Maybe ElasticsearchS3BackupMode
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe ElasticsearchS3BackupMode)
     (Maybe ElasticsearchS3BackupMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe ElasticsearchS3BackupMode
s3BackupMode :: Maybe ElasticsearchS3BackupMode
$sel:s3BackupMode:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchS3BackupMode
s3BackupMode} -> Maybe ElasticsearchS3BackupMode
s3BackupMode) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe ElasticsearchS3BackupMode
a -> ElasticsearchDestinationConfiguration
s {$sel:s3BackupMode:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchS3BackupMode
s3BackupMode = Maybe ElasticsearchS3BackupMode
a} :: ElasticsearchDestinationConfiguration)

-- | The ARN of the Amazon ES domain. The IAM role must have permissions
-- for @DescribeElasticsearchDomain@, @DescribeElasticsearchDomains@, and
-- @DescribeElasticsearchDomainConfig@ after assuming the role specified in
-- __RoleARN__. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- Specify either @ClusterEndpoint@ or @DomainARN@.
elasticsearchDestinationConfiguration_domainARN :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe Prelude.Text)
elasticsearchDestinationConfiguration_domainARN :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_domainARN = (ElasticsearchDestinationConfiguration -> Maybe Text)
-> (ElasticsearchDestinationConfiguration
    -> Maybe Text -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe Text
domainARN :: Maybe Text
$sel:domainARN:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe Text
domainARN} -> Maybe Text
domainARN) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe Text
a -> ElasticsearchDestinationConfiguration
s {$sel:domainARN:ElasticsearchDestinationConfiguration' :: Maybe Text
domainARN = Maybe Text
a} :: ElasticsearchDestinationConfiguration)

-- | The Amazon CloudWatch logging options for your delivery stream.
elasticsearchDestinationConfiguration_cloudWatchLoggingOptions :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe CloudWatchLoggingOptions)
elasticsearchDestinationConfiguration_cloudWatchLoggingOptions :: (Maybe CloudWatchLoggingOptions
 -> f (Maybe CloudWatchLoggingOptions))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_cloudWatchLoggingOptions = (ElasticsearchDestinationConfiguration
 -> Maybe CloudWatchLoggingOptions)
-> (ElasticsearchDestinationConfiguration
    -> Maybe CloudWatchLoggingOptions
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe CloudWatchLoggingOptions)
     (Maybe CloudWatchLoggingOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
$sel:cloudWatchLoggingOptions:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions} -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe CloudWatchLoggingOptions
a -> ElasticsearchDestinationConfiguration
s {$sel:cloudWatchLoggingOptions:ElasticsearchDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
a} :: ElasticsearchDestinationConfiguration)

-- | The details of the VPC of the Amazon ES destination.
elasticsearchDestinationConfiguration_vpcConfiguration :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe VpcConfiguration)
elasticsearchDestinationConfiguration_vpcConfiguration :: (Maybe VpcConfiguration -> f (Maybe VpcConfiguration))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_vpcConfiguration = (ElasticsearchDestinationConfiguration -> Maybe VpcConfiguration)
-> (ElasticsearchDestinationConfiguration
    -> Maybe VpcConfiguration -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe VpcConfiguration)
     (Maybe VpcConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe VpcConfiguration
vpcConfiguration :: Maybe VpcConfiguration
$sel:vpcConfiguration:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe VpcConfiguration
vpcConfiguration} -> Maybe VpcConfiguration
vpcConfiguration) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe VpcConfiguration
a -> ElasticsearchDestinationConfiguration
s {$sel:vpcConfiguration:ElasticsearchDestinationConfiguration' :: Maybe VpcConfiguration
vpcConfiguration = Maybe VpcConfiguration
a} :: ElasticsearchDestinationConfiguration)

-- | The buffering options. If no value is specified, the default values for
-- @ElasticsearchBufferingHints@ are used.
elasticsearchDestinationConfiguration_bufferingHints :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe ElasticsearchBufferingHints)
elasticsearchDestinationConfiguration_bufferingHints :: (Maybe ElasticsearchBufferingHints
 -> f (Maybe ElasticsearchBufferingHints))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_bufferingHints = (ElasticsearchDestinationConfiguration
 -> Maybe ElasticsearchBufferingHints)
-> (ElasticsearchDestinationConfiguration
    -> Maybe ElasticsearchBufferingHints
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe ElasticsearchBufferingHints)
     (Maybe ElasticsearchBufferingHints)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe ElasticsearchBufferingHints
bufferingHints :: Maybe ElasticsearchBufferingHints
$sel:bufferingHints:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchBufferingHints
bufferingHints} -> Maybe ElasticsearchBufferingHints
bufferingHints) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe ElasticsearchBufferingHints
a -> ElasticsearchDestinationConfiguration
s {$sel:bufferingHints:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchBufferingHints
bufferingHints = Maybe ElasticsearchBufferingHints
a} :: ElasticsearchDestinationConfiguration)

-- | The retry behavior in case Kinesis Data Firehose is unable to deliver
-- documents to Amazon ES. The default value is 300 (5 minutes).
elasticsearchDestinationConfiguration_retryOptions :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe ElasticsearchRetryOptions)
elasticsearchDestinationConfiguration_retryOptions :: (Maybe ElasticsearchRetryOptions
 -> f (Maybe ElasticsearchRetryOptions))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_retryOptions = (ElasticsearchDestinationConfiguration
 -> Maybe ElasticsearchRetryOptions)
-> (ElasticsearchDestinationConfiguration
    -> Maybe ElasticsearchRetryOptions
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe ElasticsearchRetryOptions)
     (Maybe ElasticsearchRetryOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe ElasticsearchRetryOptions
retryOptions :: Maybe ElasticsearchRetryOptions
$sel:retryOptions:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchRetryOptions
retryOptions} -> Maybe ElasticsearchRetryOptions
retryOptions) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe ElasticsearchRetryOptions
a -> ElasticsearchDestinationConfiguration
s {$sel:retryOptions:ElasticsearchDestinationConfiguration' :: Maybe ElasticsearchRetryOptions
retryOptions = Maybe ElasticsearchRetryOptions
a} :: ElasticsearchDestinationConfiguration)

-- | The data processing configuration.
elasticsearchDestinationConfiguration_processingConfiguration :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe ProcessingConfiguration)
elasticsearchDestinationConfiguration_processingConfiguration :: (Maybe ProcessingConfiguration
 -> f (Maybe ProcessingConfiguration))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_processingConfiguration = (ElasticsearchDestinationConfiguration
 -> Maybe ProcessingConfiguration)
-> (ElasticsearchDestinationConfiguration
    -> Maybe ProcessingConfiguration
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe ProcessingConfiguration)
     (Maybe ProcessingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe ProcessingConfiguration
processingConfiguration :: Maybe ProcessingConfiguration
$sel:processingConfiguration:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ProcessingConfiguration
processingConfiguration} -> Maybe ProcessingConfiguration
processingConfiguration) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe ProcessingConfiguration
a -> ElasticsearchDestinationConfiguration
s {$sel:processingConfiguration:ElasticsearchDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
a} :: ElasticsearchDestinationConfiguration)

-- | The endpoint to use when communicating with the cluster. Specify either
-- this @ClusterEndpoint@ or the @DomainARN@ field.
elasticsearchDestinationConfiguration_clusterEndpoint :: Lens.Lens' ElasticsearchDestinationConfiguration (Prelude.Maybe Prelude.Text)
elasticsearchDestinationConfiguration_clusterEndpoint :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_clusterEndpoint = (ElasticsearchDestinationConfiguration -> Maybe Text)
-> (ElasticsearchDestinationConfiguration
    -> Maybe Text -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Maybe Text
clusterEndpoint :: Maybe Text
$sel:clusterEndpoint:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe Text
clusterEndpoint} -> Maybe Text
clusterEndpoint) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Maybe Text
a -> ElasticsearchDestinationConfiguration
s {$sel:clusterEndpoint:ElasticsearchDestinationConfiguration' :: Maybe Text
clusterEndpoint = Maybe Text
a} :: ElasticsearchDestinationConfiguration)

-- | The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis
-- Data Firehose for calling the Amazon ES Configuration API and for
-- indexing documents. For more information, see
-- <https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3 Grant Kinesis Data Firehose Access to an Amazon S3 Destination>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
elasticsearchDestinationConfiguration_roleARN :: Lens.Lens' ElasticsearchDestinationConfiguration Prelude.Text
elasticsearchDestinationConfiguration_roleARN :: (Text -> f Text)
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_roleARN = (ElasticsearchDestinationConfiguration -> Text)
-> (ElasticsearchDestinationConfiguration
    -> Text -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Text
roleARN :: Text
$sel:roleARN:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Text
roleARN} -> Text
roleARN) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Text
a -> ElasticsearchDestinationConfiguration
s {$sel:roleARN:ElasticsearchDestinationConfiguration' :: Text
roleARN = Text
a} :: ElasticsearchDestinationConfiguration)

-- | The Elasticsearch index name.
elasticsearchDestinationConfiguration_indexName :: Lens.Lens' ElasticsearchDestinationConfiguration Prelude.Text
elasticsearchDestinationConfiguration_indexName :: (Text -> f Text)
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_indexName = (ElasticsearchDestinationConfiguration -> Text)
-> (ElasticsearchDestinationConfiguration
    -> Text -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {Text
indexName :: Text
$sel:indexName:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Text
indexName} -> Text
indexName) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} Text
a -> ElasticsearchDestinationConfiguration
s {$sel:indexName:ElasticsearchDestinationConfiguration' :: Text
indexName = Text
a} :: ElasticsearchDestinationConfiguration)

-- | The configuration for the backup Amazon S3 location.
elasticsearchDestinationConfiguration_s3Configuration :: Lens.Lens' ElasticsearchDestinationConfiguration S3DestinationConfiguration
elasticsearchDestinationConfiguration_s3Configuration :: (S3DestinationConfiguration -> f S3DestinationConfiguration)
-> ElasticsearchDestinationConfiguration
-> f ElasticsearchDestinationConfiguration
elasticsearchDestinationConfiguration_s3Configuration = (ElasticsearchDestinationConfiguration
 -> S3DestinationConfiguration)
-> (ElasticsearchDestinationConfiguration
    -> S3DestinationConfiguration
    -> ElasticsearchDestinationConfiguration)
-> Lens
     ElasticsearchDestinationConfiguration
     ElasticsearchDestinationConfiguration
     S3DestinationConfiguration
     S3DestinationConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationConfiguration' {S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
$sel:s3Configuration:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> S3DestinationConfiguration
s3Configuration} -> S3DestinationConfiguration
s3Configuration) (\s :: ElasticsearchDestinationConfiguration
s@ElasticsearchDestinationConfiguration' {} S3DestinationConfiguration
a -> ElasticsearchDestinationConfiguration
s {$sel:s3Configuration:ElasticsearchDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
a} :: ElasticsearchDestinationConfiguration)

instance
  Prelude.Hashable
    ElasticsearchDestinationConfiguration

instance
  Prelude.NFData
    ElasticsearchDestinationConfiguration

instance
  Core.ToJSON
    ElasticsearchDestinationConfiguration
  where
  toJSON :: ElasticsearchDestinationConfiguration -> Value
toJSON ElasticsearchDestinationConfiguration' {Maybe Text
Maybe CloudWatchLoggingOptions
Maybe ElasticsearchBufferingHints
Maybe ElasticsearchIndexRotationPeriod
Maybe ElasticsearchRetryOptions
Maybe ElasticsearchS3BackupMode
Maybe ProcessingConfiguration
Maybe VpcConfiguration
Text
S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
indexName :: Text
roleARN :: Text
clusterEndpoint :: Maybe Text
processingConfiguration :: Maybe ProcessingConfiguration
retryOptions :: Maybe ElasticsearchRetryOptions
bufferingHints :: Maybe ElasticsearchBufferingHints
vpcConfiguration :: Maybe VpcConfiguration
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
domainARN :: Maybe Text
s3BackupMode :: Maybe ElasticsearchS3BackupMode
typeName :: Maybe Text
indexRotationPeriod :: Maybe ElasticsearchIndexRotationPeriod
$sel:s3Configuration:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> S3DestinationConfiguration
$sel:indexName:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Text
$sel:roleARN:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Text
$sel:clusterEndpoint:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe Text
$sel:processingConfiguration:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ProcessingConfiguration
$sel:retryOptions:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchRetryOptions
$sel:bufferingHints:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchBufferingHints
$sel:vpcConfiguration:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe VpcConfiguration
$sel:cloudWatchLoggingOptions:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
$sel:domainARN:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe Text
$sel:s3BackupMode:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchS3BackupMode
$sel:typeName:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration -> Maybe Text
$sel:indexRotationPeriod:ElasticsearchDestinationConfiguration' :: ElasticsearchDestinationConfiguration
-> Maybe ElasticsearchIndexRotationPeriod
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IndexRotationPeriod" Text -> ElasticsearchIndexRotationPeriod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ElasticsearchIndexRotationPeriod -> Pair)
-> Maybe ElasticsearchIndexRotationPeriod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod,
            (Text
"TypeName" 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
typeName,
            (Text
"S3BackupMode" Text -> ElasticsearchS3BackupMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ElasticsearchS3BackupMode -> Pair)
-> Maybe ElasticsearchS3BackupMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchS3BackupMode
s3BackupMode,
            (Text
"DomainARN" 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
domainARN,
            (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
"VpcConfiguration" Text -> VpcConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (VpcConfiguration -> Pair) -> Maybe VpcConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfiguration
vpcConfiguration,
            (Text
"BufferingHints" Text -> ElasticsearchBufferingHints -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ElasticsearchBufferingHints -> Pair)
-> Maybe ElasticsearchBufferingHints -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchBufferingHints
bufferingHints,
            (Text
"RetryOptions" Text -> ElasticsearchRetryOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ElasticsearchRetryOptions -> Pair)
-> Maybe ElasticsearchRetryOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchRetryOptions
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
"ClusterEndpoint" 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
clusterEndpoint,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleARN),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IndexName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
indexName),
            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)
          ]
      )