{-# 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.AmazonopensearchserviceDestinationUpdate
-- 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.AmazonopensearchserviceDestinationUpdate 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.AmazonopensearchserviceBufferingHints
import Amazonka.Firehose.Types.AmazonopensearchserviceIndexRotationPeriod
import Amazonka.Firehose.Types.AmazonopensearchserviceRetryOptions
import Amazonka.Firehose.Types.CloudWatchLoggingOptions
import Amazonka.Firehose.Types.ProcessingConfiguration
import Amazonka.Firehose.Types.S3DestinationUpdate
import qualified Amazonka.Prelude as Prelude

-- | Describes an update for a destination in Amazon OpenSearch Service.
--
-- /See:/ 'newAmazonopensearchserviceDestinationUpdate' smart constructor.
data AmazonopensearchserviceDestinationUpdate = AmazonopensearchserviceDestinationUpdate'
  { -- | The buffering options. If no value is specified,
    -- AmazonopensearchBufferingHints object default values are used.
    AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceBufferingHints
bufferingHints :: Prelude.Maybe AmazonopensearchserviceBufferingHints,
    AmazonopensearchserviceDestinationUpdate
-> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The endpoint to use when communicating with the cluster. Specify either
    -- this ClusterEndpoint or the DomainARN field.
    AmazonopensearchserviceDestinationUpdate -> Maybe Text
clusterEndpoint :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon OpenSearch Service domain. The IAM role must have
    -- permissions for DescribeDomain, DescribeDomains, and
    -- DescribeDomainConfig after assuming the IAM role specified in RoleARN.
    AmazonopensearchserviceDestinationUpdate -> Maybe Text
domainARN :: Prelude.Maybe Prelude.Text,
    -- | The Amazon OpenSearch Service index name.
    AmazonopensearchserviceDestinationUpdate -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon OpenSearch Service index rotation period. Index rotation
    -- appends a timestamp to IndexName to facilitate the expiration of old
    -- data.
    AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod :: Prelude.Maybe AmazonopensearchserviceIndexRotationPeriod,
    AmazonopensearchserviceDestinationUpdate
-> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
    -- | The retry behavior in case Kinesis Data Firehose is unable to deliver
    -- documents to Amazon OpenSearch Service. The default value is 300 (5
    -- minutes).
    AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceRetryOptions
retryOptions :: Prelude.Maybe AmazonopensearchserviceRetryOptions,
    -- | The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis
    -- Data Firehose for calling the Amazon OpenSearch Service Configuration
    -- API and for indexing documents.
    AmazonopensearchserviceDestinationUpdate -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    AmazonopensearchserviceDestinationUpdate
-> Maybe S3DestinationUpdate
s3Update :: Prelude.Maybe S3DestinationUpdate,
    -- | The Amazon OpenSearch Service 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 runtime.
    --
    -- If you upgrade Elasticsearch from 6.x to 7.x and don’t update your
    -- delivery stream, Kinesis Data Firehose still delivers data to
    -- Elasticsearch with the old index name and type name. If you want to
    -- update your delivery stream with a new index name, provide an empty
    -- string for TypeName.
    AmazonopensearchserviceDestinationUpdate -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text
  }
  deriving (AmazonopensearchserviceDestinationUpdate
-> AmazonopensearchserviceDestinationUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AmazonopensearchserviceDestinationUpdate
-> AmazonopensearchserviceDestinationUpdate -> Bool
$c/= :: AmazonopensearchserviceDestinationUpdate
-> AmazonopensearchserviceDestinationUpdate -> Bool
== :: AmazonopensearchserviceDestinationUpdate
-> AmazonopensearchserviceDestinationUpdate -> Bool
$c== :: AmazonopensearchserviceDestinationUpdate
-> AmazonopensearchserviceDestinationUpdate -> Bool
Prelude.Eq, ReadPrec [AmazonopensearchserviceDestinationUpdate]
ReadPrec AmazonopensearchserviceDestinationUpdate
Int -> ReadS AmazonopensearchserviceDestinationUpdate
ReadS [AmazonopensearchserviceDestinationUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AmazonopensearchserviceDestinationUpdate]
$creadListPrec :: ReadPrec [AmazonopensearchserviceDestinationUpdate]
readPrec :: ReadPrec AmazonopensearchserviceDestinationUpdate
$creadPrec :: ReadPrec AmazonopensearchserviceDestinationUpdate
readList :: ReadS [AmazonopensearchserviceDestinationUpdate]
$creadList :: ReadS [AmazonopensearchserviceDestinationUpdate]
readsPrec :: Int -> ReadS AmazonopensearchserviceDestinationUpdate
$creadsPrec :: Int -> ReadS AmazonopensearchserviceDestinationUpdate
Prelude.Read, Int -> AmazonopensearchserviceDestinationUpdate -> ShowS
[AmazonopensearchserviceDestinationUpdate] -> ShowS
AmazonopensearchserviceDestinationUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AmazonopensearchserviceDestinationUpdate] -> ShowS
$cshowList :: [AmazonopensearchserviceDestinationUpdate] -> ShowS
show :: AmazonopensearchserviceDestinationUpdate -> String
$cshow :: AmazonopensearchserviceDestinationUpdate -> String
showsPrec :: Int -> AmazonopensearchserviceDestinationUpdate -> ShowS
$cshowsPrec :: Int -> AmazonopensearchserviceDestinationUpdate -> ShowS
Prelude.Show, forall x.
Rep AmazonopensearchserviceDestinationUpdate x
-> AmazonopensearchserviceDestinationUpdate
forall x.
AmazonopensearchserviceDestinationUpdate
-> Rep AmazonopensearchserviceDestinationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AmazonopensearchserviceDestinationUpdate x
-> AmazonopensearchserviceDestinationUpdate
$cfrom :: forall x.
AmazonopensearchserviceDestinationUpdate
-> Rep AmazonopensearchserviceDestinationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'AmazonopensearchserviceDestinationUpdate' 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', 'amazonopensearchserviceDestinationUpdate_bufferingHints' - The buffering options. If no value is specified,
-- AmazonopensearchBufferingHints object default values are used.
--
-- 'cloudWatchLoggingOptions', 'amazonopensearchserviceDestinationUpdate_cloudWatchLoggingOptions' - Undocumented member.
--
-- 'clusterEndpoint', 'amazonopensearchserviceDestinationUpdate_clusterEndpoint' - The endpoint to use when communicating with the cluster. Specify either
-- this ClusterEndpoint or the DomainARN field.
--
-- 'domainARN', 'amazonopensearchserviceDestinationUpdate_domainARN' - The ARN of the Amazon OpenSearch Service domain. The IAM role must have
-- permissions for DescribeDomain, DescribeDomains, and
-- DescribeDomainConfig after assuming the IAM role specified in RoleARN.
--
-- 'indexName', 'amazonopensearchserviceDestinationUpdate_indexName' - The Amazon OpenSearch Service index name.
--
-- 'indexRotationPeriod', 'amazonopensearchserviceDestinationUpdate_indexRotationPeriod' - The Amazon OpenSearch Service index rotation period. Index rotation
-- appends a timestamp to IndexName to facilitate the expiration of old
-- data.
--
-- 'processingConfiguration', 'amazonopensearchserviceDestinationUpdate_processingConfiguration' - Undocumented member.
--
-- 'retryOptions', 'amazonopensearchserviceDestinationUpdate_retryOptions' - The retry behavior in case Kinesis Data Firehose is unable to deliver
-- documents to Amazon OpenSearch Service. The default value is 300 (5
-- minutes).
--
-- 'roleARN', 'amazonopensearchserviceDestinationUpdate_roleARN' - The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis
-- Data Firehose for calling the Amazon OpenSearch Service Configuration
-- API and for indexing documents.
--
-- 's3Update', 'amazonopensearchserviceDestinationUpdate_s3Update' - Undocumented member.
--
-- 'typeName', 'amazonopensearchserviceDestinationUpdate_typeName' - The Amazon OpenSearch Service 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 runtime.
--
-- If you upgrade Elasticsearch from 6.x to 7.x and don’t update your
-- delivery stream, Kinesis Data Firehose still delivers data to
-- Elasticsearch with the old index name and type name. If you want to
-- update your delivery stream with a new index name, provide an empty
-- string for TypeName.
newAmazonopensearchserviceDestinationUpdate ::
  AmazonopensearchserviceDestinationUpdate
newAmazonopensearchserviceDestinationUpdate :: AmazonopensearchserviceDestinationUpdate
newAmazonopensearchserviceDestinationUpdate =
  AmazonopensearchserviceDestinationUpdate'
    { $sel:bufferingHints:AmazonopensearchserviceDestinationUpdate' :: Maybe AmazonopensearchserviceBufferingHints
bufferingHints =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLoggingOptions:AmazonopensearchserviceDestinationUpdate' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions =
        forall a. Maybe a
Prelude.Nothing,
      $sel:clusterEndpoint:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
clusterEndpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:domainARN:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
domainARN = forall a. Maybe a
Prelude.Nothing,
      $sel:indexName:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
indexName = forall a. Maybe a
Prelude.Nothing,
      $sel:indexRotationPeriod:AmazonopensearchserviceDestinationUpdate' :: Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod =
        forall a. Maybe a
Prelude.Nothing,
      $sel:processingConfiguration:AmazonopensearchserviceDestinationUpdate' :: Maybe ProcessingConfiguration
processingConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:retryOptions:AmazonopensearchserviceDestinationUpdate' :: Maybe AmazonopensearchserviceRetryOptions
retryOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:s3Update:AmazonopensearchserviceDestinationUpdate' :: Maybe S3DestinationUpdate
s3Update = forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
typeName = forall a. Maybe a
Prelude.Nothing
    }

-- | The buffering options. If no value is specified,
-- AmazonopensearchBufferingHints object default values are used.
amazonopensearchserviceDestinationUpdate_bufferingHints :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe AmazonopensearchserviceBufferingHints)
amazonopensearchserviceDestinationUpdate_bufferingHints :: Lens'
  AmazonopensearchserviceDestinationUpdate
  (Maybe AmazonopensearchserviceBufferingHints)
amazonopensearchserviceDestinationUpdate_bufferingHints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe AmazonopensearchserviceBufferingHints
bufferingHints :: Maybe AmazonopensearchserviceBufferingHints
$sel:bufferingHints:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceBufferingHints
bufferingHints} -> Maybe AmazonopensearchserviceBufferingHints
bufferingHints) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe AmazonopensearchserviceBufferingHints
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:bufferingHints:AmazonopensearchserviceDestinationUpdate' :: Maybe AmazonopensearchserviceBufferingHints
bufferingHints = Maybe AmazonopensearchserviceBufferingHints
a} :: AmazonopensearchserviceDestinationUpdate)

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

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

-- | The ARN of the Amazon OpenSearch Service domain. The IAM role must have
-- permissions for DescribeDomain, DescribeDomains, and
-- DescribeDomainConfig after assuming the IAM role specified in RoleARN.
amazonopensearchserviceDestinationUpdate_domainARN :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe Prelude.Text)
amazonopensearchserviceDestinationUpdate_domainARN :: Lens' AmazonopensearchserviceDestinationUpdate (Maybe Text)
amazonopensearchserviceDestinationUpdate_domainARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe Text
domainARN :: Maybe Text
$sel:domainARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
domainARN} -> Maybe Text
domainARN) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe Text
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:domainARN:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
domainARN = Maybe Text
a} :: AmazonopensearchserviceDestinationUpdate)

-- | The Amazon OpenSearch Service index name.
amazonopensearchserviceDestinationUpdate_indexName :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe Prelude.Text)
amazonopensearchserviceDestinationUpdate_indexName :: Lens' AmazonopensearchserviceDestinationUpdate (Maybe Text)
amazonopensearchserviceDestinationUpdate_indexName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe Text
indexName :: Maybe Text
$sel:indexName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe Text
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:indexName:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
indexName = Maybe Text
a} :: AmazonopensearchserviceDestinationUpdate)

-- | The Amazon OpenSearch Service index rotation period. Index rotation
-- appends a timestamp to IndexName to facilitate the expiration of old
-- data.
amazonopensearchserviceDestinationUpdate_indexRotationPeriod :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe AmazonopensearchserviceIndexRotationPeriod)
amazonopensearchserviceDestinationUpdate_indexRotationPeriod :: Lens'
  AmazonopensearchserviceDestinationUpdate
  (Maybe AmazonopensearchserviceIndexRotationPeriod)
amazonopensearchserviceDestinationUpdate_indexRotationPeriod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod :: Maybe AmazonopensearchserviceIndexRotationPeriod
$sel:indexRotationPeriod:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod} -> Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe AmazonopensearchserviceIndexRotationPeriod
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:indexRotationPeriod:AmazonopensearchserviceDestinationUpdate' :: Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod = Maybe AmazonopensearchserviceIndexRotationPeriod
a} :: AmazonopensearchserviceDestinationUpdate)

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

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

-- | The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis
-- Data Firehose for calling the Amazon OpenSearch Service Configuration
-- API and for indexing documents.
amazonopensearchserviceDestinationUpdate_roleARN :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe Prelude.Text)
amazonopensearchserviceDestinationUpdate_roleARN :: Lens' AmazonopensearchserviceDestinationUpdate (Maybe Text)
amazonopensearchserviceDestinationUpdate_roleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe Text
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:roleARN:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
roleARN = Maybe Text
a} :: AmazonopensearchserviceDestinationUpdate)

-- | Undocumented member.
amazonopensearchserviceDestinationUpdate_s3Update :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe S3DestinationUpdate)
amazonopensearchserviceDestinationUpdate_s3Update :: Lens'
  AmazonopensearchserviceDestinationUpdate
  (Maybe S3DestinationUpdate)
amazonopensearchserviceDestinationUpdate_s3Update = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe S3DestinationUpdate
s3Update :: Maybe S3DestinationUpdate
$sel:s3Update:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe S3DestinationUpdate
s3Update} -> Maybe S3DestinationUpdate
s3Update) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe S3DestinationUpdate
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:s3Update:AmazonopensearchserviceDestinationUpdate' :: Maybe S3DestinationUpdate
s3Update = Maybe S3DestinationUpdate
a} :: AmazonopensearchserviceDestinationUpdate)

-- | The Amazon OpenSearch Service 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 runtime.
--
-- If you upgrade Elasticsearch from 6.x to 7.x and don’t update your
-- delivery stream, Kinesis Data Firehose still delivers data to
-- Elasticsearch with the old index name and type name. If you want to
-- update your delivery stream with a new index name, provide an empty
-- string for TypeName.
amazonopensearchserviceDestinationUpdate_typeName :: Lens.Lens' AmazonopensearchserviceDestinationUpdate (Prelude.Maybe Prelude.Text)
amazonopensearchserviceDestinationUpdate_typeName :: Lens' AmazonopensearchserviceDestinationUpdate (Maybe Text)
amazonopensearchserviceDestinationUpdate_typeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceDestinationUpdate' {Maybe Text
typeName :: Maybe Text
$sel:typeName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: AmazonopensearchserviceDestinationUpdate
s@AmazonopensearchserviceDestinationUpdate' {} Maybe Text
a -> AmazonopensearchserviceDestinationUpdate
s {$sel:typeName:AmazonopensearchserviceDestinationUpdate' :: Maybe Text
typeName = Maybe Text
a} :: AmazonopensearchserviceDestinationUpdate)

instance
  Prelude.Hashable
    AmazonopensearchserviceDestinationUpdate
  where
  hashWithSalt :: Int -> AmazonopensearchserviceDestinationUpdate -> Int
hashWithSalt
    Int
_salt
    AmazonopensearchserviceDestinationUpdate' {Maybe Text
Maybe AmazonopensearchserviceBufferingHints
Maybe AmazonopensearchserviceIndexRotationPeriod
Maybe AmazonopensearchserviceRetryOptions
Maybe CloudWatchLoggingOptions
Maybe ProcessingConfiguration
Maybe S3DestinationUpdate
typeName :: Maybe Text
s3Update :: Maybe S3DestinationUpdate
roleARN :: Maybe Text
retryOptions :: Maybe AmazonopensearchserviceRetryOptions
processingConfiguration :: Maybe ProcessingConfiguration
indexRotationPeriod :: Maybe AmazonopensearchserviceIndexRotationPeriod
indexName :: Maybe Text
domainARN :: Maybe Text
clusterEndpoint :: Maybe Text
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
bufferingHints :: Maybe AmazonopensearchserviceBufferingHints
$sel:typeName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:s3Update:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe S3DestinationUpdate
$sel:roleARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:retryOptions:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceRetryOptions
$sel:processingConfiguration:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe ProcessingConfiguration
$sel:indexRotationPeriod:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceIndexRotationPeriod
$sel:indexName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:domainARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:clusterEndpoint:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:cloudWatchLoggingOptions:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe CloudWatchLoggingOptions
$sel:bufferingHints:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceBufferingHints
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AmazonopensearchserviceBufferingHints
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 AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingConfiguration
processingConfiguration
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AmazonopensearchserviceRetryOptions
retryOptions
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3DestinationUpdate
s3Update
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeName

instance
  Prelude.NFData
    AmazonopensearchserviceDestinationUpdate
  where
  rnf :: AmazonopensearchserviceDestinationUpdate -> ()
rnf AmazonopensearchserviceDestinationUpdate' {Maybe Text
Maybe AmazonopensearchserviceBufferingHints
Maybe AmazonopensearchserviceIndexRotationPeriod
Maybe AmazonopensearchserviceRetryOptions
Maybe CloudWatchLoggingOptions
Maybe ProcessingConfiguration
Maybe S3DestinationUpdate
typeName :: Maybe Text
s3Update :: Maybe S3DestinationUpdate
roleARN :: Maybe Text
retryOptions :: Maybe AmazonopensearchserviceRetryOptions
processingConfiguration :: Maybe ProcessingConfiguration
indexRotationPeriod :: Maybe AmazonopensearchserviceIndexRotationPeriod
indexName :: Maybe Text
domainARN :: Maybe Text
clusterEndpoint :: Maybe Text
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
bufferingHints :: Maybe AmazonopensearchserviceBufferingHints
$sel:typeName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:s3Update:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe S3DestinationUpdate
$sel:roleARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:retryOptions:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceRetryOptions
$sel:processingConfiguration:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe ProcessingConfiguration
$sel:indexRotationPeriod:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceIndexRotationPeriod
$sel:indexName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:domainARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:clusterEndpoint:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:cloudWatchLoggingOptions:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe CloudWatchLoggingOptions
$sel:bufferingHints:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceBufferingHints
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AmazonopensearchserviceBufferingHints
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 AmazonopensearchserviceIndexRotationPeriod
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 AmazonopensearchserviceRetryOptions
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 S3DestinationUpdate
s3Update
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeName

instance
  Data.ToJSON
    AmazonopensearchserviceDestinationUpdate
  where
  toJSON :: AmazonopensearchserviceDestinationUpdate -> Value
toJSON AmazonopensearchserviceDestinationUpdate' {Maybe Text
Maybe AmazonopensearchserviceBufferingHints
Maybe AmazonopensearchserviceIndexRotationPeriod
Maybe AmazonopensearchserviceRetryOptions
Maybe CloudWatchLoggingOptions
Maybe ProcessingConfiguration
Maybe S3DestinationUpdate
typeName :: Maybe Text
s3Update :: Maybe S3DestinationUpdate
roleARN :: Maybe Text
retryOptions :: Maybe AmazonopensearchserviceRetryOptions
processingConfiguration :: Maybe ProcessingConfiguration
indexRotationPeriod :: Maybe AmazonopensearchserviceIndexRotationPeriod
indexName :: Maybe Text
domainARN :: Maybe Text
clusterEndpoint :: Maybe Text
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
bufferingHints :: Maybe AmazonopensearchserviceBufferingHints
$sel:typeName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:s3Update:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe S3DestinationUpdate
$sel:roleARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:retryOptions:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceRetryOptions
$sel:processingConfiguration:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe ProcessingConfiguration
$sel:indexRotationPeriod:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceIndexRotationPeriod
$sel:indexName:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:domainARN:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:clusterEndpoint:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate -> Maybe Text
$sel:cloudWatchLoggingOptions:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe CloudWatchLoggingOptions
$sel:bufferingHints:AmazonopensearchserviceDestinationUpdate' :: AmazonopensearchserviceDestinationUpdate
-> Maybe AmazonopensearchserviceBufferingHints
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"BufferingHints" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmazonopensearchserviceBufferingHints
bufferingHints,
            (Key
"CloudWatchLoggingOptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions,
            (Key
"ClusterEndpoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clusterEndpoint,
            (Key
"DomainARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
domainARN,
            (Key
"IndexName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
indexName,
            (Key
"IndexRotationPeriod" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmazonopensearchserviceIndexRotationPeriod
indexRotationPeriod,
            (Key
"ProcessingConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingConfiguration
processingConfiguration,
            (Key
"RetryOptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmazonopensearchserviceRetryOptions
retryOptions,
            (Key
"RoleARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleARN,
            (Key
"S3Update" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DestinationUpdate
s3Update,
            (Key
"TypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
typeName
          ]
      )