{-# 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-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.ElasticsearchDestinationDescription 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.S3DestinationDescription
import Amazonka.Firehose.Types.VpcConfigurationDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The destination description in Amazon ES.
--
-- /See:/ 'newElasticsearchDestinationDescription' smart constructor.
data ElasticsearchDestinationDescription = ElasticsearchDestinationDescription'
  { -- | The Elasticsearch index rotation period
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod :: Prelude.Maybe ElasticsearchIndexRotationPeriod,
    -- | The Elasticsearch type name. This applies to Elasticsearch 6.x and lower
    -- versions. For Elasticsearch 7.x, there\'s no value for @TypeName@.
    ElasticsearchDestinationDescription -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 backup mode.
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchS3BackupMode
s3BackupMode :: Prelude.Maybe ElasticsearchS3BackupMode,
    -- | 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 AWS 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 details of the VPC of the Amazon ES destination.
    ElasticsearchDestinationDescription
-> Maybe VpcConfigurationDescription
vpcConfigurationDescription :: Prelude.Maybe VpcConfigurationDescription,
    -- | The Amazon CloudWatch logging options.
    ElasticsearchDestinationDescription
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The Amazon S3 destination.
    ElasticsearchDestinationDescription
-> Maybe S3DestinationDescription
s3DestinationDescription :: Prelude.Maybe S3DestinationDescription,
    -- | The buffering options.
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchBufferingHints
bufferingHints :: Prelude.Maybe ElasticsearchBufferingHints,
    -- | The Amazon ES retry options.
    ElasticsearchDestinationDescription
-> Maybe ElasticsearchRetryOptions
retryOptions :: Prelude.Maybe ElasticsearchRetryOptions,
    -- | The data processing configuration.
    ElasticsearchDestinationDescription
-> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
    -- | The Amazon Resource Name (ARN) of the AWS credentials. 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>.
    ElasticsearchDestinationDescription -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | 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 Elasticsearch index name.
    ElasticsearchDestinationDescription -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text
  }
  deriving (ElasticsearchDestinationDescription
-> ElasticsearchDestinationDescription -> Bool
(ElasticsearchDestinationDescription
 -> ElasticsearchDestinationDescription -> Bool)
-> (ElasticsearchDestinationDescription
    -> ElasticsearchDestinationDescription -> Bool)
-> Eq ElasticsearchDestinationDescription
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]
(Int -> ReadS ElasticsearchDestinationDescription)
-> ReadS [ElasticsearchDestinationDescription]
-> ReadPrec ElasticsearchDestinationDescription
-> ReadPrec [ElasticsearchDestinationDescription]
-> Read 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
(Int -> ElasticsearchDestinationDescription -> ShowS)
-> (ElasticsearchDestinationDescription -> String)
-> ([ElasticsearchDestinationDescription] -> ShowS)
-> Show ElasticsearchDestinationDescription
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.
 ElasticsearchDestinationDescription
 -> Rep ElasticsearchDestinationDescription x)
-> (forall x.
    Rep ElasticsearchDestinationDescription x
    -> ElasticsearchDestinationDescription)
-> Generic ElasticsearchDestinationDescription
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:
--
-- 'indexRotationPeriod', 'elasticsearchDestinationDescription_indexRotationPeriod' - The Elasticsearch index rotation period
--
-- 'typeName', 'elasticsearchDestinationDescription_typeName' - The Elasticsearch type name. This applies to Elasticsearch 6.x and lower
-- versions. For Elasticsearch 7.x, there\'s no value for @TypeName@.
--
-- 's3BackupMode', 'elasticsearchDestinationDescription_s3BackupMode' - The Amazon S3 backup mode.
--
-- '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 AWS Service Namespaces>.
--
-- Kinesis Data Firehose uses either @ClusterEndpoint@ or @DomainARN@ to
-- send data to Amazon ES.
--
-- 'vpcConfigurationDescription', 'elasticsearchDestinationDescription_vpcConfigurationDescription' - The details of the VPC of the Amazon ES destination.
--
-- 'cloudWatchLoggingOptions', 'elasticsearchDestinationDescription_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options.
--
-- 's3DestinationDescription', 'elasticsearchDestinationDescription_s3DestinationDescription' - The Amazon S3 destination.
--
-- 'bufferingHints', 'elasticsearchDestinationDescription_bufferingHints' - The buffering options.
--
-- 'retryOptions', 'elasticsearchDestinationDescription_retryOptions' - The Amazon ES retry options.
--
-- 'processingConfiguration', 'elasticsearchDestinationDescription_processingConfiguration' - The data processing configuration.
--
-- 'roleARN', 'elasticsearchDestinationDescription_roleARN' - The Amazon Resource Name (ARN) of the AWS credentials. 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>.
--
-- '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.
--
-- 'indexName', 'elasticsearchDestinationDescription_indexName' - The Elasticsearch index name.
newElasticsearchDestinationDescription ::
  ElasticsearchDestinationDescription
newElasticsearchDestinationDescription :: ElasticsearchDestinationDescription
newElasticsearchDestinationDescription =
  ElasticsearchDestinationDescription' :: Maybe ElasticsearchIndexRotationPeriod
-> Maybe Text
-> Maybe ElasticsearchS3BackupMode
-> Maybe Text
-> Maybe VpcConfigurationDescription
-> Maybe CloudWatchLoggingOptions
-> Maybe S3DestinationDescription
-> Maybe ElasticsearchBufferingHints
-> Maybe ElasticsearchRetryOptions
-> Maybe ProcessingConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ElasticsearchDestinationDescription
ElasticsearchDestinationDescription'
    { $sel:indexRotationPeriod:ElasticsearchDestinationDescription' :: Maybe ElasticsearchIndexRotationPeriod
indexRotationPeriod =
        Maybe ElasticsearchIndexRotationPeriod
forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:ElasticsearchDestinationDescription' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3BackupMode:ElasticsearchDestinationDescription' :: Maybe ElasticsearchS3BackupMode
s3BackupMode = Maybe ElasticsearchS3BackupMode
forall a. Maybe a
Prelude.Nothing,
      $sel:domainARN:ElasticsearchDestinationDescription' :: Maybe Text
domainARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfigurationDescription:ElasticsearchDestinationDescription' :: Maybe VpcConfigurationDescription
vpcConfigurationDescription =
        Maybe VpcConfigurationDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLoggingOptions:ElasticsearchDestinationDescription' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions =
        Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:s3DestinationDescription:ElasticsearchDestinationDescription' :: Maybe S3DestinationDescription
s3DestinationDescription =
        Maybe S3DestinationDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:bufferingHints:ElasticsearchDestinationDescription' :: Maybe ElasticsearchBufferingHints
bufferingHints = Maybe ElasticsearchBufferingHints
forall a. Maybe a
Prelude.Nothing,
      $sel:retryOptions:ElasticsearchDestinationDescription' :: Maybe ElasticsearchRetryOptions
retryOptions = Maybe ElasticsearchRetryOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:processingConfiguration:ElasticsearchDestinationDescription' :: Maybe ProcessingConfiguration
processingConfiguration =
        Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:ElasticsearchDestinationDescription' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterEndpoint:ElasticsearchDestinationDescription' :: Maybe Text
clusterEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:indexName:ElasticsearchDestinationDescription' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Elasticsearch index rotation period
elasticsearchDestinationDescription_indexRotationPeriod :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchIndexRotationPeriod)
elasticsearchDestinationDescription_indexRotationPeriod :: (Maybe ElasticsearchIndexRotationPeriod
 -> f (Maybe ElasticsearchIndexRotationPeriod))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_indexRotationPeriod = (ElasticsearchDestinationDescription
 -> Maybe ElasticsearchIndexRotationPeriod)
-> (ElasticsearchDestinationDescription
    -> Maybe ElasticsearchIndexRotationPeriod
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe ElasticsearchIndexRotationPeriod)
     (Maybe ElasticsearchIndexRotationPeriod)
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 Elasticsearch type name. This applies to Elasticsearch 6.x and lower
-- versions. For Elasticsearch 7.x, there\'s no value for @TypeName@.
elasticsearchDestinationDescription_typeName :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_typeName :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_typeName = (ElasticsearchDestinationDescription -> Maybe Text)
-> (ElasticsearchDestinationDescription
    -> Maybe Text -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe Text)
     (Maybe Text)
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 Amazon S3 backup mode.
elasticsearchDestinationDescription_s3BackupMode :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchS3BackupMode)
elasticsearchDestinationDescription_s3BackupMode :: (Maybe ElasticsearchS3BackupMode
 -> f (Maybe ElasticsearchS3BackupMode))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_s3BackupMode = (ElasticsearchDestinationDescription
 -> Maybe ElasticsearchS3BackupMode)
-> (ElasticsearchDestinationDescription
    -> Maybe ElasticsearchS3BackupMode
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe ElasticsearchS3BackupMode)
     (Maybe ElasticsearchS3BackupMode)
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 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 AWS 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 :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_domainARN = (ElasticsearchDestinationDescription -> Maybe Text)
-> (ElasticsearchDestinationDescription
    -> Maybe Text -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe Text)
     (Maybe Text)
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 details of the VPC of the Amazon ES destination.
elasticsearchDestinationDescription_vpcConfigurationDescription :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe VpcConfigurationDescription)
elasticsearchDestinationDescription_vpcConfigurationDescription :: (Maybe VpcConfigurationDescription
 -> f (Maybe VpcConfigurationDescription))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_vpcConfigurationDescription = (ElasticsearchDestinationDescription
 -> Maybe VpcConfigurationDescription)
-> (ElasticsearchDestinationDescription
    -> Maybe VpcConfigurationDescription
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe VpcConfigurationDescription)
     (Maybe 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)

-- | The Amazon CloudWatch logging options.
elasticsearchDestinationDescription_cloudWatchLoggingOptions :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe CloudWatchLoggingOptions)
elasticsearchDestinationDescription_cloudWatchLoggingOptions :: (Maybe CloudWatchLoggingOptions
 -> f (Maybe CloudWatchLoggingOptions))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_cloudWatchLoggingOptions = (ElasticsearchDestinationDescription
 -> Maybe CloudWatchLoggingOptions)
-> (ElasticsearchDestinationDescription
    -> Maybe CloudWatchLoggingOptions
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe CloudWatchLoggingOptions)
     (Maybe 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 Amazon S3 destination.
elasticsearchDestinationDescription_s3DestinationDescription :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe S3DestinationDescription)
elasticsearchDestinationDescription_s3DestinationDescription :: (Maybe S3DestinationDescription
 -> f (Maybe S3DestinationDescription))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_s3DestinationDescription = (ElasticsearchDestinationDescription
 -> Maybe S3DestinationDescription)
-> (ElasticsearchDestinationDescription
    -> Maybe S3DestinationDescription
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe S3DestinationDescription)
     (Maybe 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 buffering options.
elasticsearchDestinationDescription_bufferingHints :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchBufferingHints)
elasticsearchDestinationDescription_bufferingHints :: (Maybe ElasticsearchBufferingHints
 -> f (Maybe ElasticsearchBufferingHints))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_bufferingHints = (ElasticsearchDestinationDescription
 -> Maybe ElasticsearchBufferingHints)
-> (ElasticsearchDestinationDescription
    -> Maybe ElasticsearchBufferingHints
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe ElasticsearchBufferingHints)
     (Maybe ElasticsearchBufferingHints)
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 ES retry options.
elasticsearchDestinationDescription_retryOptions :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ElasticsearchRetryOptions)
elasticsearchDestinationDescription_retryOptions :: (Maybe ElasticsearchRetryOptions
 -> f (Maybe ElasticsearchRetryOptions))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_retryOptions = (ElasticsearchDestinationDescription
 -> Maybe ElasticsearchRetryOptions)
-> (ElasticsearchDestinationDescription
    -> Maybe ElasticsearchRetryOptions
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe ElasticsearchRetryOptions)
     (Maybe ElasticsearchRetryOptions)
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 data processing configuration.
elasticsearchDestinationDescription_processingConfiguration :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe ProcessingConfiguration)
elasticsearchDestinationDescription_processingConfiguration :: (Maybe ProcessingConfiguration
 -> f (Maybe ProcessingConfiguration))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_processingConfiguration = (ElasticsearchDestinationDescription
 -> Maybe ProcessingConfiguration)
-> (ElasticsearchDestinationDescription
    -> Maybe ProcessingConfiguration
    -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe ProcessingConfiguration)
     (Maybe 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 Resource Name (ARN) of the AWS credentials. 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>.
elasticsearchDestinationDescription_roleARN :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_roleARN :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_roleARN = (ElasticsearchDestinationDescription -> Maybe Text)
-> (ElasticsearchDestinationDescription
    -> Maybe Text -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_clusterEndpoint = (ElasticsearchDestinationDescription -> Maybe Text)
-> (ElasticsearchDestinationDescription
    -> Maybe Text -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe Text)
     (Maybe Text)
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 Elasticsearch index name.
elasticsearchDestinationDescription_indexName :: Lens.Lens' ElasticsearchDestinationDescription (Prelude.Maybe Prelude.Text)
elasticsearchDestinationDescription_indexName :: (Maybe Text -> f (Maybe Text))
-> ElasticsearchDestinationDescription
-> f ElasticsearchDestinationDescription
elasticsearchDestinationDescription_indexName = (ElasticsearchDestinationDescription -> Maybe Text)
-> (ElasticsearchDestinationDescription
    -> Maybe Text -> ElasticsearchDestinationDescription)
-> Lens
     ElasticsearchDestinationDescription
     ElasticsearchDestinationDescription
     (Maybe Text)
     (Maybe Text)
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)

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

instance
  Prelude.Hashable
    ElasticsearchDestinationDescription

instance
  Prelude.NFData
    ElasticsearchDestinationDescription