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

import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.CloudWatchLoggingOptions
import Amazonka.Firehose.Types.HECEndpointType
import Amazonka.Firehose.Types.ProcessingConfiguration
import Amazonka.Firehose.Types.S3DestinationUpdate
import Amazonka.Firehose.Types.SplunkRetryOptions
import Amazonka.Firehose.Types.SplunkS3BackupMode
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes an update for a destination in Splunk.
--
-- /See:/ 'newSplunkDestinationUpdate' smart constructor.
data SplunkDestinationUpdate = SplunkDestinationUpdate'
  { -- | Specifies how you want Kinesis Data Firehose to back up documents to
    -- Amazon S3. When set to @FailedDocumentsOnly@, Kinesis Data Firehose
    -- writes any data that could not be indexed to the configured Amazon S3
    -- destination. When set to @AllEvents@, Kinesis Data Firehose delivers all
    -- incoming records to Amazon S3, and also writes failed documents to
    -- Amazon S3. The default value is @FailedEventsOnly@.
    --
    -- You can update this backup mode from @FailedEventsOnly@ to @AllEvents@.
    -- You can\'t update it from @AllEvents@ to @FailedEventsOnly@.
    SplunkDestinationUpdate -> Maybe SplunkS3BackupMode
s3BackupMode :: Prelude.Maybe SplunkS3BackupMode,
    -- | A GUID that you obtain from your Splunk cluster when you create a new
    -- HEC endpoint.
    SplunkDestinationUpdate -> Maybe Text
hECToken :: Prelude.Maybe Prelude.Text,
    -- | This type can be either \"Raw\" or \"Event.\"
    SplunkDestinationUpdate -> Maybe HECEndpointType
hECEndpointType :: Prelude.Maybe HECEndpointType,
    -- | The Amazon CloudWatch logging options for your delivery stream.
    SplunkDestinationUpdate -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The amount of time that Kinesis Data Firehose waits to receive an
    -- acknowledgment from Splunk after it sends data. At the end of the
    -- timeout period, Kinesis Data Firehose either tries to send the data
    -- again or considers it an error, based on your retry settings.
    SplunkDestinationUpdate -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | Your update to the configuration of the backup Amazon S3 location.
    SplunkDestinationUpdate -> Maybe S3DestinationUpdate
s3Update :: Prelude.Maybe S3DestinationUpdate,
    -- | The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
    -- sends your data.
    SplunkDestinationUpdate -> Maybe Text
hECEndpoint :: Prelude.Maybe Prelude.Text,
    -- | The retry behavior in case Kinesis Data Firehose is unable to deliver
    -- data to Splunk or if it doesn\'t receive an acknowledgment of receipt
    -- from Splunk.
    SplunkDestinationUpdate -> Maybe SplunkRetryOptions
retryOptions :: Prelude.Maybe SplunkRetryOptions,
    -- | The data processing configuration.
    SplunkDestinationUpdate -> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration
  }
  deriving (SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool
(SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool)
-> (SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool)
-> Eq SplunkDestinationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool
$c/= :: SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool
== :: SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool
$c== :: SplunkDestinationUpdate -> SplunkDestinationUpdate -> Bool
Prelude.Eq, ReadPrec [SplunkDestinationUpdate]
ReadPrec SplunkDestinationUpdate
Int -> ReadS SplunkDestinationUpdate
ReadS [SplunkDestinationUpdate]
(Int -> ReadS SplunkDestinationUpdate)
-> ReadS [SplunkDestinationUpdate]
-> ReadPrec SplunkDestinationUpdate
-> ReadPrec [SplunkDestinationUpdate]
-> Read SplunkDestinationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SplunkDestinationUpdate]
$creadListPrec :: ReadPrec [SplunkDestinationUpdate]
readPrec :: ReadPrec SplunkDestinationUpdate
$creadPrec :: ReadPrec SplunkDestinationUpdate
readList :: ReadS [SplunkDestinationUpdate]
$creadList :: ReadS [SplunkDestinationUpdate]
readsPrec :: Int -> ReadS SplunkDestinationUpdate
$creadsPrec :: Int -> ReadS SplunkDestinationUpdate
Prelude.Read, Int -> SplunkDestinationUpdate -> ShowS
[SplunkDestinationUpdate] -> ShowS
SplunkDestinationUpdate -> String
(Int -> SplunkDestinationUpdate -> ShowS)
-> (SplunkDestinationUpdate -> String)
-> ([SplunkDestinationUpdate] -> ShowS)
-> Show SplunkDestinationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SplunkDestinationUpdate] -> ShowS
$cshowList :: [SplunkDestinationUpdate] -> ShowS
show :: SplunkDestinationUpdate -> String
$cshow :: SplunkDestinationUpdate -> String
showsPrec :: Int -> SplunkDestinationUpdate -> ShowS
$cshowsPrec :: Int -> SplunkDestinationUpdate -> ShowS
Prelude.Show, (forall x.
 SplunkDestinationUpdate -> Rep SplunkDestinationUpdate x)
-> (forall x.
    Rep SplunkDestinationUpdate x -> SplunkDestinationUpdate)
-> Generic SplunkDestinationUpdate
forall x. Rep SplunkDestinationUpdate x -> SplunkDestinationUpdate
forall x. SplunkDestinationUpdate -> Rep SplunkDestinationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SplunkDestinationUpdate x -> SplunkDestinationUpdate
$cfrom :: forall x. SplunkDestinationUpdate -> Rep SplunkDestinationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'SplunkDestinationUpdate' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 's3BackupMode', 'splunkDestinationUpdate_s3BackupMode' - Specifies how you want Kinesis Data Firehose to back up documents to
-- Amazon S3. When set to @FailedDocumentsOnly@, Kinesis Data Firehose
-- writes any data that could not be indexed to the configured Amazon S3
-- destination. When set to @AllEvents@, Kinesis Data Firehose delivers all
-- incoming records to Amazon S3, and also writes failed documents to
-- Amazon S3. The default value is @FailedEventsOnly@.
--
-- You can update this backup mode from @FailedEventsOnly@ to @AllEvents@.
-- You can\'t update it from @AllEvents@ to @FailedEventsOnly@.
--
-- 'hECToken', 'splunkDestinationUpdate_hECToken' - A GUID that you obtain from your Splunk cluster when you create a new
-- HEC endpoint.
--
-- 'hECEndpointType', 'splunkDestinationUpdate_hECEndpointType' - This type can be either \"Raw\" or \"Event.\"
--
-- 'cloudWatchLoggingOptions', 'splunkDestinationUpdate_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options for your delivery stream.
--
-- 'hECAcknowledgmentTimeoutInSeconds', 'splunkDestinationUpdate_hECAcknowledgmentTimeoutInSeconds' - The amount of time that Kinesis Data Firehose waits to receive an
-- acknowledgment from Splunk after it sends data. At the end of the
-- timeout period, Kinesis Data Firehose either tries to send the data
-- again or considers it an error, based on your retry settings.
--
-- 's3Update', 'splunkDestinationUpdate_s3Update' - Your update to the configuration of the backup Amazon S3 location.
--
-- 'hECEndpoint', 'splunkDestinationUpdate_hECEndpoint' - The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
-- sends your data.
--
-- 'retryOptions', 'splunkDestinationUpdate_retryOptions' - The retry behavior in case Kinesis Data Firehose is unable to deliver
-- data to Splunk or if it doesn\'t receive an acknowledgment of receipt
-- from Splunk.
--
-- 'processingConfiguration', 'splunkDestinationUpdate_processingConfiguration' - The data processing configuration.
newSplunkDestinationUpdate ::
  SplunkDestinationUpdate
newSplunkDestinationUpdate :: SplunkDestinationUpdate
newSplunkDestinationUpdate =
  SplunkDestinationUpdate' :: Maybe SplunkS3BackupMode
-> Maybe Text
-> Maybe HECEndpointType
-> Maybe CloudWatchLoggingOptions
-> Maybe Natural
-> Maybe S3DestinationUpdate
-> Maybe Text
-> Maybe SplunkRetryOptions
-> Maybe ProcessingConfiguration
-> SplunkDestinationUpdate
SplunkDestinationUpdate'
    { $sel:s3BackupMode:SplunkDestinationUpdate' :: Maybe SplunkS3BackupMode
s3BackupMode =
        Maybe SplunkS3BackupMode
forall a. Maybe a
Prelude.Nothing,
      $sel:hECToken:SplunkDestinationUpdate' :: Maybe Text
hECToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hECEndpointType:SplunkDestinationUpdate' :: Maybe HECEndpointType
hECEndpointType = Maybe HECEndpointType
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLoggingOptions:SplunkDestinationUpdate' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationUpdate' :: Maybe Natural
hECAcknowledgmentTimeoutInSeconds =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:s3Update:SplunkDestinationUpdate' :: Maybe S3DestinationUpdate
s3Update = Maybe S3DestinationUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:hECEndpoint:SplunkDestinationUpdate' :: Maybe Text
hECEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:retryOptions:SplunkDestinationUpdate' :: Maybe SplunkRetryOptions
retryOptions = Maybe SplunkRetryOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:processingConfiguration:SplunkDestinationUpdate' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies how you want Kinesis Data Firehose to back up documents to
-- Amazon S3. When set to @FailedDocumentsOnly@, Kinesis Data Firehose
-- writes any data that could not be indexed to the configured Amazon S3
-- destination. When set to @AllEvents@, Kinesis Data Firehose delivers all
-- incoming records to Amazon S3, and also writes failed documents to
-- Amazon S3. The default value is @FailedEventsOnly@.
--
-- You can update this backup mode from @FailedEventsOnly@ to @AllEvents@.
-- You can\'t update it from @AllEvents@ to @FailedEventsOnly@.
splunkDestinationUpdate_s3BackupMode :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe SplunkS3BackupMode)
splunkDestinationUpdate_s3BackupMode :: (Maybe SplunkS3BackupMode -> f (Maybe SplunkS3BackupMode))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_s3BackupMode = (SplunkDestinationUpdate -> Maybe SplunkS3BackupMode)
-> (SplunkDestinationUpdate
    -> Maybe SplunkS3BackupMode -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe SplunkS3BackupMode)
     (Maybe SplunkS3BackupMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe SplunkS3BackupMode
s3BackupMode :: Maybe SplunkS3BackupMode
$sel:s3BackupMode:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe SplunkS3BackupMode
s3BackupMode} -> Maybe SplunkS3BackupMode
s3BackupMode) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe SplunkS3BackupMode
a -> SplunkDestinationUpdate
s {$sel:s3BackupMode:SplunkDestinationUpdate' :: Maybe SplunkS3BackupMode
s3BackupMode = Maybe SplunkS3BackupMode
a} :: SplunkDestinationUpdate)

-- | A GUID that you obtain from your Splunk cluster when you create a new
-- HEC endpoint.
splunkDestinationUpdate_hECToken :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe Prelude.Text)
splunkDestinationUpdate_hECToken :: (Maybe Text -> f (Maybe Text))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_hECToken = (SplunkDestinationUpdate -> Maybe Text)
-> (SplunkDestinationUpdate
    -> Maybe Text -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe Text
hECToken :: Maybe Text
$sel:hECToken:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe Text
hECToken} -> Maybe Text
hECToken) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe Text
a -> SplunkDestinationUpdate
s {$sel:hECToken:SplunkDestinationUpdate' :: Maybe Text
hECToken = Maybe Text
a} :: SplunkDestinationUpdate)

-- | This type can be either \"Raw\" or \"Event.\"
splunkDestinationUpdate_hECEndpointType :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe HECEndpointType)
splunkDestinationUpdate_hECEndpointType :: (Maybe HECEndpointType -> f (Maybe HECEndpointType))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_hECEndpointType = (SplunkDestinationUpdate -> Maybe HECEndpointType)
-> (SplunkDestinationUpdate
    -> Maybe HECEndpointType -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe HECEndpointType)
     (Maybe HECEndpointType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe HECEndpointType
hECEndpointType :: Maybe HECEndpointType
$sel:hECEndpointType:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe HECEndpointType
hECEndpointType} -> Maybe HECEndpointType
hECEndpointType) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe HECEndpointType
a -> SplunkDestinationUpdate
s {$sel:hECEndpointType:SplunkDestinationUpdate' :: Maybe HECEndpointType
hECEndpointType = Maybe HECEndpointType
a} :: SplunkDestinationUpdate)

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

-- | The amount of time that Kinesis Data Firehose waits to receive an
-- acknowledgment from Splunk after it sends data. At the end of the
-- timeout period, Kinesis Data Firehose either tries to send the data
-- again or considers it an error, based on your retry settings.
splunkDestinationUpdate_hECAcknowledgmentTimeoutInSeconds :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe Prelude.Natural)
splunkDestinationUpdate_hECAcknowledgmentTimeoutInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_hECAcknowledgmentTimeoutInSeconds = (SplunkDestinationUpdate -> Maybe Natural)
-> (SplunkDestinationUpdate
    -> Maybe Natural -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe Natural
hECAcknowledgmentTimeoutInSeconds :: Maybe Natural
$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds} -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe Natural
a -> SplunkDestinationUpdate
s {$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationUpdate' :: Maybe Natural
hECAcknowledgmentTimeoutInSeconds = Maybe Natural
a} :: SplunkDestinationUpdate)

-- | Your update to the configuration of the backup Amazon S3 location.
splunkDestinationUpdate_s3Update :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe S3DestinationUpdate)
splunkDestinationUpdate_s3Update :: (Maybe S3DestinationUpdate -> f (Maybe S3DestinationUpdate))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_s3Update = (SplunkDestinationUpdate -> Maybe S3DestinationUpdate)
-> (SplunkDestinationUpdate
    -> Maybe S3DestinationUpdate -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe S3DestinationUpdate)
     (Maybe S3DestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe S3DestinationUpdate
s3Update :: Maybe S3DestinationUpdate
$sel:s3Update:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe S3DestinationUpdate
s3Update} -> Maybe S3DestinationUpdate
s3Update) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe S3DestinationUpdate
a -> SplunkDestinationUpdate
s {$sel:s3Update:SplunkDestinationUpdate' :: Maybe S3DestinationUpdate
s3Update = Maybe S3DestinationUpdate
a} :: SplunkDestinationUpdate)

-- | The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
-- sends your data.
splunkDestinationUpdate_hECEndpoint :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe Prelude.Text)
splunkDestinationUpdate_hECEndpoint :: (Maybe Text -> f (Maybe Text))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_hECEndpoint = (SplunkDestinationUpdate -> Maybe Text)
-> (SplunkDestinationUpdate
    -> Maybe Text -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe Text
hECEndpoint :: Maybe Text
$sel:hECEndpoint:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe Text
hECEndpoint} -> Maybe Text
hECEndpoint) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe Text
a -> SplunkDestinationUpdate
s {$sel:hECEndpoint:SplunkDestinationUpdate' :: Maybe Text
hECEndpoint = Maybe Text
a} :: SplunkDestinationUpdate)

-- | The retry behavior in case Kinesis Data Firehose is unable to deliver
-- data to Splunk or if it doesn\'t receive an acknowledgment of receipt
-- from Splunk.
splunkDestinationUpdate_retryOptions :: Lens.Lens' SplunkDestinationUpdate (Prelude.Maybe SplunkRetryOptions)
splunkDestinationUpdate_retryOptions :: (Maybe SplunkRetryOptions -> f (Maybe SplunkRetryOptions))
-> SplunkDestinationUpdate -> f SplunkDestinationUpdate
splunkDestinationUpdate_retryOptions = (SplunkDestinationUpdate -> Maybe SplunkRetryOptions)
-> (SplunkDestinationUpdate
    -> Maybe SplunkRetryOptions -> SplunkDestinationUpdate)
-> Lens
     SplunkDestinationUpdate
     SplunkDestinationUpdate
     (Maybe SplunkRetryOptions)
     (Maybe SplunkRetryOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationUpdate' {Maybe SplunkRetryOptions
retryOptions :: Maybe SplunkRetryOptions
$sel:retryOptions:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe SplunkRetryOptions
retryOptions} -> Maybe SplunkRetryOptions
retryOptions) (\s :: SplunkDestinationUpdate
s@SplunkDestinationUpdate' {} Maybe SplunkRetryOptions
a -> SplunkDestinationUpdate
s {$sel:retryOptions:SplunkDestinationUpdate' :: Maybe SplunkRetryOptions
retryOptions = Maybe SplunkRetryOptions
a} :: SplunkDestinationUpdate)

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

instance Prelude.Hashable SplunkDestinationUpdate

instance Prelude.NFData SplunkDestinationUpdate

instance Core.ToJSON SplunkDestinationUpdate where
  toJSON :: SplunkDestinationUpdate -> Value
toJSON SplunkDestinationUpdate' {Maybe Natural
Maybe Text
Maybe CloudWatchLoggingOptions
Maybe HECEndpointType
Maybe ProcessingConfiguration
Maybe S3DestinationUpdate
Maybe SplunkRetryOptions
Maybe SplunkS3BackupMode
processingConfiguration :: Maybe ProcessingConfiguration
retryOptions :: Maybe SplunkRetryOptions
hECEndpoint :: Maybe Text
s3Update :: Maybe S3DestinationUpdate
hECAcknowledgmentTimeoutInSeconds :: Maybe Natural
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
hECEndpointType :: Maybe HECEndpointType
hECToken :: Maybe Text
s3BackupMode :: Maybe SplunkS3BackupMode
$sel:processingConfiguration:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe ProcessingConfiguration
$sel:retryOptions:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe SplunkRetryOptions
$sel:hECEndpoint:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe Text
$sel:s3Update:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe S3DestinationUpdate
$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe Natural
$sel:cloudWatchLoggingOptions:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe CloudWatchLoggingOptions
$sel:hECEndpointType:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe HECEndpointType
$sel:hECToken:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe Text
$sel:s3BackupMode:SplunkDestinationUpdate' :: SplunkDestinationUpdate -> Maybe SplunkS3BackupMode
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"S3BackupMode" Text -> SplunkS3BackupMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SplunkS3BackupMode -> Pair)
-> Maybe SplunkS3BackupMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SplunkS3BackupMode
s3BackupMode,
            (Text
"HECToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
hECToken,
            (Text
"HECEndpointType" Text -> HECEndpointType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HECEndpointType -> Pair) -> Maybe HECEndpointType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HECEndpointType
hECEndpointType,
            (Text
"CloudWatchLoggingOptions" Text -> CloudWatchLoggingOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CloudWatchLoggingOptions -> Pair)
-> Maybe CloudWatchLoggingOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions,
            (Text
"HECAcknowledgmentTimeoutInSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
hECAcknowledgmentTimeoutInSeconds,
            (Text
"S3Update" Text -> S3DestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (S3DestinationUpdate -> Pair)
-> Maybe S3DestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DestinationUpdate
s3Update,
            (Text
"HECEndpoint" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
hECEndpoint,
            (Text
"RetryOptions" Text -> SplunkRetryOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SplunkRetryOptions -> Pair)
-> Maybe SplunkRetryOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SplunkRetryOptions
retryOptions,
            (Text
"ProcessingConfiguration" Text -> ProcessingConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProcessingConfiguration -> Pair)
-> Maybe ProcessingConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingConfiguration
processingConfiguration
          ]
      )