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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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.S3DestinationDescription
import Amazonka.Firehose.Types.VpcConfigurationDescription
import qualified Amazonka.Prelude as Prelude

-- | The destination description in Amazon ES.
--
-- /See:/ 'newElasticsearchDestinationDescription' smart constructor.
data ElasticsearchDestinationDescription = ElasticsearchDestinationDescription'
  { -- | The buffering options.
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchBufferingHints
bufferingHints :: Prelude.Maybe ElasticsearchBufferingHints,
    -- | The Amazon CloudWatch logging options.
    ElasticsearchDestinationDescription
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The endpoint to use when communicating with the cluster. Kinesis Data
    -- Firehose uses either this @ClusterEndpoint@ or the @DomainARN@ field to
    -- send data to Amazon ES.
    ElasticsearchDestinationDescription -> Maybe Text
clusterEndpoint :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon ES domain. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>.
    --
    -- Kinesis Data Firehose uses either @ClusterEndpoint@ or @DomainARN@ to
    -- send data to Amazon ES.
    ElasticsearchDestinationDescription -> Maybe Text
domainARN :: Prelude.Maybe Prelude.Text,
    -- | The Elasticsearch index name.
    ElasticsearchDestinationDescription -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text,
    -- | The Elasticsearch index rotation period
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod :: Prelude.Maybe ElasticsearchIndexRotationPeriod,
    -- | The data processing configuration.
    ElasticsearchDestinationDescription
-> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
    -- | The Amazon ES retry options.
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchRetryOptions
retryOptions :: Prelude.Maybe ElasticsearchRetryOptions,
    -- | The Amazon Resource Name (ARN) of the Amazon Web Services credentials.
    -- For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>.
    ElasticsearchDestinationDescription -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 backup mode.
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchS3BackupMode
s3BackupMode :: Prelude.Maybe ElasticsearchS3BackupMode,
    -- | The Amazon S3 destination.
    ElasticsearchDestinationDescription
-> Maybe S3DestinationDescription
s3DestinationDescription :: Prelude.Maybe S3DestinationDescription,
    -- | The Elasticsearch type name. This applies to Elasticsearch 6.x and lower
    -- versions. For Elasticsearch 7.x and OpenSearch Service 1.x, there\'s no
    -- value for @TypeName@.
    ElasticsearchDestinationDescription -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | The details of the VPC of the Amazon ES destination.
    ElasticsearchDestinationDescription
-> Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Prelude.Maybe VpcConfigurationDescription
  }
  deriving (ElasticsearchDestinationDescription
-> ElasticsearchDestinationDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElasticsearchDestinationDescription
-> ElasticsearchDestinationDescription -> Bool
$c/= :: ElasticsearchDestinationDescription
-> ElasticsearchDestinationDescription -> Bool
== :: ElasticsearchDestinationDescription
-> ElasticsearchDestinationDescription -> Bool
$c== :: ElasticsearchDestinationDescription
-> ElasticsearchDestinationDescription -> Bool
Prelude.Eq, ReadPrec [ElasticsearchDestinationDescription]
ReadPrec ElasticsearchDestinationDescription
Int -> ReadS ElasticsearchDestinationDescription
ReadS [ElasticsearchDestinationDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElasticsearchDestinationDescription]
$creadListPrec :: ReadPrec [ElasticsearchDestinationDescription]
readPrec :: ReadPrec ElasticsearchDestinationDescription
$creadPrec :: ReadPrec ElasticsearchDestinationDescription
readList :: ReadS [ElasticsearchDestinationDescription]
$creadList :: ReadS [ElasticsearchDestinationDescription]
readsPrec :: Int -> ReadS ElasticsearchDestinationDescription
$creadsPrec :: Int -> ReadS ElasticsearchDestinationDescription
Prelude.Read, Int -> ElasticsearchDestinationDescription -> ShowS
[ElasticsearchDestinationDescription] -> ShowS
ElasticsearchDestinationDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElasticsearchDestinationDescription] -> ShowS
$cshowList :: [ElasticsearchDestinationDescription] -> ShowS
show :: ElasticsearchDestinationDescription -> String
$cshow :: ElasticsearchDestinationDescription -> String
showsPrec :: Int -> ElasticsearchDestinationDescription -> ShowS
$cshowsPrec :: Int -> ElasticsearchDestinationDescription -> ShowS
Prelude.Show, forall x.
Rep ElasticsearchDestinationDescription x
-> ElasticsearchDestinationDescription
forall x.
ElasticsearchDestinationDescription
-> Rep ElasticsearchDestinationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ElasticsearchDestinationDescription x
-> ElasticsearchDestinationDescription
$cfrom :: forall x.
ElasticsearchDestinationDescription
-> Rep ElasticsearchDestinationDescription x
Prelude.Generic)

-- |
-- Create a value of 'ElasticsearchDestinationDescription' 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:
--
-- 'bufferingHints', 'elasticsearchDestinationDescription_bufferingHints' - The buffering options.
--
-- 'cloudWatchLoggingOptions', 'elasticsearchDestinationDescription_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options.
--
-- 'clusterEndpoint', 'elasticsearchDestinationDescription_clusterEndpoint' - The endpoint to use when communicating with the cluster. Kinesis Data
-- Firehose uses either this @ClusterEndpoint@ or the @DomainARN@ field to
-- send data to Amazon ES.
--
-- 'domainARN', 'elasticsearchDestinationDescription_domainARN' - The ARN of the Amazon ES domain. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>.
--
-- Kinesis Data Firehose uses either @ClusterEndpoint@ or @DomainARN@ to
-- send data to Amazon ES.
--
-- 'indexName', 'elasticsearchDestinationDescription_indexName' - The Elasticsearch index name.
--
-- 'indexRotationPeriod', 'elasticsearchDestinationDescription_indexRotationPeriod' - The Elasticsearch index rotation period
--
-- 'processingConfiguration', 'elasticsearchDestinationDescription_processingConfiguration' - The data processing configuration.
--
-- 'retryOptions', 'elasticsearchDestinationDescription_retryOptions' - The Amazon ES retry options.
--
-- 'roleARN', 'elasticsearchDestinationDescription_roleARN' - The Amazon Resource Name (ARN) of the Amazon Web Services credentials.
-- For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>.
--
-- 's3BackupMode', 'elasticsearchDestinationDescription_s3BackupMode' - The Amazon S3 backup mode.
--
-- 's3DestinationDescription', 'elasticsearchDestinationDescription_s3DestinationDescription' - The Amazon S3 destination.
--
-- 'typeName', 'elasticsearchDestinationDescription_typeName' - The Elasticsearch type name. This applies to Elasticsearch 6.x and lower
-- versions. For Elasticsearch 7.x and OpenSearch Service 1.x, there\'s no
-- value for @TypeName@.
--
-- 'vpcConfigurationDescription', 'elasticsearchDestinationDescription_vpcConfigurationDescription' - The details of the VPC of the Amazon ES destination.
newElasticsearchDestinationDescription ::
  ElasticsearchDestinationDescription
newElasticsearchDestinationDescription :: ElasticsearchDestinationDescription
newElasticsearchDestinationDescription =
  ElasticsearchDestinationDescription'
    { $sel:bufferingHints:ElasticsearchDestinationDescription' :: Maybe ElasticsearchBufferingHints
bufferingHints =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLoggingOptions:ElasticsearchDestinationDescription' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions =
        forall a. Maybe a
Prelude.Nothing,
      $sel:clusterEndpoint:ElasticsearchDestinationDescription' :: Maybe Text
clusterEndpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:domainARN:ElasticsearchDestinationDescription' :: Maybe Text
domainARN = forall a. Maybe a
Prelude.Nothing,
      $sel:indexName:ElasticsearchDestinationDescription' :: Maybe Text
indexName = forall a. Maybe a
Prelude.Nothing,
      $sel:indexRotationPeriod:ElasticsearchDestinationDescription' :: Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod = forall a. Maybe a
Prelude.Nothing,
      $sel:processingConfiguration:ElasticsearchDestinationDescription' :: Maybe ProcessingConfiguration
processingConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:retryOptions:ElasticsearchDestinationDescription' :: Maybe ElasticsearchRetryOptions
retryOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:ElasticsearchDestinationDescription' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:s3BackupMode:ElasticsearchDestinationDescription' :: Maybe ElasticsearchS3BackupMode
s3BackupMode = forall a. Maybe a
Prelude.Nothing,
      $sel:s3DestinationDescription:ElasticsearchDestinationDescription' :: Maybe S3DestinationDescription
s3DestinationDescription =
        forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:ElasticsearchDestinationDescription' :: Maybe Text
typeName = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfigurationDescription:ElasticsearchDestinationDescription' :: Maybe VpcConfigurationDescription
vpcConfigurationDescription =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The buffering options.
elasticsearchDestinationDescription_bufferingHints :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchBufferingHints)
elasticsearchDestinationDescription_bufferingHints :: Lens'
  ElasticsearchDestinationDescription
  (Maybe ElasticsearchBufferingHints)
elasticsearchDestinationDescription_bufferingHints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe ElasticsearchBufferingHints
bufferingHints :: Maybe ElasticsearchBufferingHints
$sel:bufferingHints:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchBufferingHints
bufferingHints} -> Maybe ElasticsearchBufferingHints
bufferingHints) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe ElasticsearchBufferingHints
a -> ElasticsearchDestinationDescription
s {$sel:bufferingHints:ElasticsearchDestinationDescription' :: Maybe ElasticsearchBufferingHints
bufferingHints = Maybe ElasticsearchBufferingHints
a} :: ElasticsearchDestinationDescription)

-- | The Amazon CloudWatch logging options.
elasticsearchDestinationDescription_cloudWatchLoggingOptions :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe CloudWatchLoggingOptions)
elasticsearchDestinationDescription_cloudWatchLoggingOptions :: Lens'
  ElasticsearchDestinationDescription
  (Maybe CloudWatchLoggingOptions)
elasticsearchDestinationDescription_cloudWatchLoggingOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
$sel:cloudWatchLoggingOptions:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions} -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe CloudWatchLoggingOptions
a -> ElasticsearchDestinationDescription
s {$sel:cloudWatchLoggingOptions:ElasticsearchDestinationDescription' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
a} :: ElasticsearchDestinationDescription)

-- | The endpoint to use when communicating with the cluster. Kinesis Data
-- Firehose uses either this @ClusterEndpoint@ or the @DomainARN@ field to
-- send data to Amazon ES.
elasticsearchDestinationDescription_clusterEndpoint :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_clusterEndpoint :: Lens' ElasticsearchDestinationDescription (Maybe Text)
elasticsearchDestinationDescription_clusterEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe Text
clusterEndpoint :: Maybe Text
$sel:clusterEndpoint:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
clusterEndpoint} -> Maybe Text
clusterEndpoint) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe Text
a -> ElasticsearchDestinationDescription
s {$sel:clusterEndpoint:ElasticsearchDestinationDescription' :: Maybe Text
clusterEndpoint = Maybe Text
a} :: ElasticsearchDestinationDescription)

-- | The ARN of the Amazon ES domain. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>.
--
-- Kinesis Data Firehose uses either @ClusterEndpoint@ or @DomainARN@ to
-- send data to Amazon ES.
elasticsearchDestinationDescription_domainARN :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_domainARN :: Lens' ElasticsearchDestinationDescription (Maybe Text)
elasticsearchDestinationDescription_domainARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe Text
domainARN :: Maybe Text
$sel:domainARN:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
domainARN} -> Maybe Text
domainARN) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe Text
a -> ElasticsearchDestinationDescription
s {$sel:domainARN:ElasticsearchDestinationDescription' :: Maybe Text
domainARN = Maybe Text
a} :: ElasticsearchDestinationDescription)

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

-- | The Elasticsearch index rotation period
elasticsearchDestinationDescription_indexRotationPeriod :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchIndexRotationPeriod)
elasticsearchDestinationDescription_indexRotationPeriod :: Lens'
  ElasticsearchDestinationDescription
  (Maybe ElasticsearchIndexRotationPeriod)
elasticsearchDestinationDescription_indexRotationPeriod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod :: Maybe ElasticsearchIndexRotationPeriod
$sel:indexRotationPeriod:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod} -> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe ElasticsearchIndexRotationPeriod
a -> ElasticsearchDestinationDescription
s {$sel:indexRotationPeriod:ElasticsearchDestinationDescription' :: Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod = Maybe ElasticsearchIndexRotationPeriod
a} :: ElasticsearchDestinationDescription)

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

-- | The Amazon ES retry options.
elasticsearchDestinationDescription_retryOptions :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchRetryOptions)
elasticsearchDestinationDescription_retryOptions :: Lens'
  ElasticsearchDestinationDescription
  (Maybe ElasticsearchRetryOptions)
elasticsearchDestinationDescription_retryOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe ElasticsearchRetryOptions
retryOptions :: Maybe ElasticsearchRetryOptions
$sel:retryOptions:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchRetryOptions
retryOptions} -> Maybe ElasticsearchRetryOptions
retryOptions) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe ElasticsearchRetryOptions
a -> ElasticsearchDestinationDescription
s {$sel:retryOptions:ElasticsearchDestinationDescription' :: Maybe ElasticsearchRetryOptions
retryOptions = Maybe ElasticsearchRetryOptions
a} :: ElasticsearchDestinationDescription)

-- | The Amazon Resource Name (ARN) of the Amazon Web Services credentials.
-- For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>.
elasticsearchDestinationDescription_roleARN :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_roleARN :: Lens' ElasticsearchDestinationDescription (Maybe Text)
elasticsearchDestinationDescription_roleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe Text
a -> ElasticsearchDestinationDescription
s {$sel:roleARN:ElasticsearchDestinationDescription' :: Maybe Text
roleARN = Maybe Text
a} :: ElasticsearchDestinationDescription)

-- | The Amazon S3 backup mode.
elasticsearchDestinationDescription_s3BackupMode :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchS3BackupMode)
elasticsearchDestinationDescription_s3BackupMode :: Lens'
  ElasticsearchDestinationDescription
  (Maybe ElasticsearchS3BackupMode)
elasticsearchDestinationDescription_s3BackupMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe ElasticsearchS3BackupMode
s3BackupMode :: Maybe ElasticsearchS3BackupMode
$sel:s3BackupMode:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchS3BackupMode
s3BackupMode} -> Maybe ElasticsearchS3BackupMode
s3BackupMode) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe ElasticsearchS3BackupMode
a -> ElasticsearchDestinationDescription
s {$sel:s3BackupMode:ElasticsearchDestinationDescription' :: Maybe ElasticsearchS3BackupMode
s3BackupMode = Maybe ElasticsearchS3BackupMode
a} :: ElasticsearchDestinationDescription)

-- | The Amazon S3 destination.
elasticsearchDestinationDescription_s3DestinationDescription :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe S3DestinationDescription)
elasticsearchDestinationDescription_s3DestinationDescription :: Lens'
  ElasticsearchDestinationDescription
  (Maybe S3DestinationDescription)
elasticsearchDestinationDescription_s3DestinationDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe S3DestinationDescription
s3DestinationDescription :: Maybe S3DestinationDescription
$sel:s3DestinationDescription:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe S3DestinationDescription
s3DestinationDescription} -> Maybe S3DestinationDescription
s3DestinationDescription) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe S3DestinationDescription
a -> ElasticsearchDestinationDescription
s {$sel:s3DestinationDescription:ElasticsearchDestinationDescription' :: Maybe S3DestinationDescription
s3DestinationDescription = Maybe S3DestinationDescription
a} :: ElasticsearchDestinationDescription)

-- | The Elasticsearch type name. This applies to Elasticsearch 6.x and lower
-- versions. For Elasticsearch 7.x and OpenSearch Service 1.x, there\'s no
-- value for @TypeName@.
elasticsearchDestinationDescription_typeName :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_typeName :: Lens' ElasticsearchDestinationDescription (Maybe Text)
elasticsearchDestinationDescription_typeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe Text
typeName :: Maybe Text
$sel:typeName:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe Text
a -> ElasticsearchDestinationDescription
s {$sel:typeName:ElasticsearchDestinationDescription' :: Maybe Text
typeName = Maybe Text
a} :: ElasticsearchDestinationDescription)

-- | The details of the VPC of the Amazon ES destination.
elasticsearchDestinationDescription_vpcConfigurationDescription :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe VpcConfigurationDescription)
elasticsearchDestinationDescription_vpcConfigurationDescription :: Lens'
  ElasticsearchDestinationDescription
  (Maybe VpcConfigurationDescription)
elasticsearchDestinationDescription_vpcConfigurationDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticsearchDestinationDescription' {Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Maybe VpcConfigurationDescription
$sel:vpcConfigurationDescription:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe VpcConfigurationDescription
vpcConfigurationDescription} -> Maybe VpcConfigurationDescription
vpcConfigurationDescription) (\s :: ElasticsearchDestinationDescription
s@ElasticsearchDestinationDescription' {} Maybe VpcConfigurationDescription
a -> ElasticsearchDestinationDescription
s {$sel:vpcConfigurationDescription:ElasticsearchDestinationDescription' :: Maybe VpcConfigurationDescription
vpcConfigurationDescription = Maybe VpcConfigurationDescription
a} :: ElasticsearchDestinationDescription)

instance
  Data.FromJSON
    ElasticsearchDestinationDescription
  where
  parseJSON :: Value -> Parser ElasticsearchDestinationDescription
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ElasticsearchDestinationDescription"
      ( \Object
x ->
          Maybe ElasticsearchBufferingHints
-> Maybe CloudWatchLoggingOptions
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ElasticsearchIndexRotationPeriod
-> Maybe ProcessingConfiguration
-> Maybe ElasticsearchRetryOptions
-> Maybe Text
-> Maybe ElasticsearchS3BackupMode
-> Maybe S3DestinationDescription
-> Maybe Text
-> Maybe VpcConfigurationDescription
-> ElasticsearchDestinationDescription
ElasticsearchDestinationDescription'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BufferingHints")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CloudWatchLoggingOptions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ClusterEndpoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DomainARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IndexName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IndexRotationPeriod")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ProcessingConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RetryOptions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RoleARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"S3BackupMode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"S3DestinationDescription")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TypeName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VpcConfigurationDescription")
      )

instance
  Prelude.Hashable
    ElasticsearchDestinationDescription
  where
  hashWithSalt :: Int -> ElasticsearchDestinationDescription -> Int
hashWithSalt
    Int
_salt
    ElasticsearchDestinationDescription' {Maybe Text
Maybe CloudWatchLoggingOptions
Maybe ElasticsearchBufferingHints
Maybe ElasticsearchIndexRotationPeriod
Maybe ElasticsearchRetryOptions
Maybe ElasticsearchS3BackupMode
Maybe ProcessingConfiguration
Maybe S3DestinationDescription
Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Maybe VpcConfigurationDescription
typeName :: Maybe Text
s3DestinationDescription :: Maybe S3DestinationDescription
s3BackupMode :: Maybe ElasticsearchS3BackupMode
roleARN :: Maybe Text
retryOptions :: Maybe ElasticsearchRetryOptions
processingConfiguration :: Maybe ProcessingConfiguration
indexRotationPeriod :: Maybe ElasticsearchIndexRotationPeriod
indexName :: Maybe Text
domainARN :: Maybe Text
clusterEndpoint :: Maybe Text
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
bufferingHints :: Maybe ElasticsearchBufferingHints
$sel:vpcConfigurationDescription:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe VpcConfigurationDescription
$sel:typeName:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:s3DestinationDescription:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe S3DestinationDescription
$sel:s3BackupMode:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchS3BackupMode
$sel:roleARN:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:retryOptions:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchRetryOptions
$sel:processingConfiguration:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ProcessingConfiguration
$sel:indexRotationPeriod:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchIndexRotationPeriod
$sel:indexName:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:domainARN:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:clusterEndpoint:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:cloudWatchLoggingOptions:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe CloudWatchLoggingOptions
$sel:bufferingHints:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchBufferingHints
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ElasticsearchBufferingHints
bufferingHints
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterEndpoint
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domainARN
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
indexName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingConfiguration
processingConfiguration
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ElasticsearchRetryOptions
retryOptions
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ElasticsearchS3BackupMode
s3BackupMode
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3DestinationDescription
s3DestinationDescription
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfigurationDescription
vpcConfigurationDescription

instance
  Prelude.NFData
    ElasticsearchDestinationDescription
  where
  rnf :: ElasticsearchDestinationDescription -> ()
rnf ElasticsearchDestinationDescription' {Maybe Text
Maybe CloudWatchLoggingOptions
Maybe ElasticsearchBufferingHints
Maybe ElasticsearchIndexRotationPeriod
Maybe ElasticsearchRetryOptions
Maybe ElasticsearchS3BackupMode
Maybe ProcessingConfiguration
Maybe S3DestinationDescription
Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Maybe VpcConfigurationDescription
typeName :: Maybe Text
s3DestinationDescription :: Maybe S3DestinationDescription
s3BackupMode :: Maybe ElasticsearchS3BackupMode
roleARN :: Maybe Text
retryOptions :: Maybe ElasticsearchRetryOptions
processingConfiguration :: Maybe ProcessingConfiguration
indexRotationPeriod :: Maybe ElasticsearchIndexRotationPeriod
indexName :: Maybe Text
domainARN :: Maybe Text
clusterEndpoint :: Maybe Text
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
bufferingHints :: Maybe ElasticsearchBufferingHints
$sel:vpcConfigurationDescription:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe VpcConfigurationDescription
$sel:typeName:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:s3DestinationDescription:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe S3DestinationDescription
$sel:s3BackupMode:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchS3BackupMode
$sel:roleARN:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:retryOptions:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchRetryOptions
$sel:processingConfiguration:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ProcessingConfiguration
$sel:indexRotationPeriod:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchIndexRotationPeriod
$sel:indexName:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:domainARN:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:clusterEndpoint:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription -> Maybe Text
$sel:cloudWatchLoggingOptions:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe CloudWatchLoggingOptions
$sel:bufferingHints:ElasticsearchDestinationDescription' :: ElasticsearchDestinationDescription
-> Maybe ElasticsearchBufferingHints
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ElasticsearchBufferingHints
bufferingHints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterEndpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
indexName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessingConfiguration
processingConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ElasticsearchRetryOptions
retryOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ElasticsearchS3BackupMode
s3BackupMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3DestinationDescription
s3DestinationDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfigurationDescription
vpcConfigurationDescription