{-# 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.SplunkDestinationConfiguration
-- 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.SplunkDestinationConfiguration 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.S3DestinationConfiguration
import Amazonka.Firehose.Types.SplunkRetryOptions
import Amazonka.Firehose.Types.SplunkS3BackupMode
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the configuration of a destination in Splunk.
--
-- /See:/ 'newSplunkDestinationConfiguration' smart constructor.
data SplunkDestinationConfiguration = SplunkDestinationConfiguration'
  { -- | Defines how documents should be delivered to Amazon S3. When set to
    -- @FailedEventsOnly@, 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@.
    SplunkDestinationConfiguration -> Maybe SplunkS3BackupMode
s3BackupMode :: Prelude.Maybe SplunkS3BackupMode,
    -- | The Amazon CloudWatch logging options for your delivery stream.
    SplunkDestinationConfiguration -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | The amount of time that Kinesis Data Firehose waits to receive an
    -- acknowledgment from Splunk after it sends it 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.
    SplunkDestinationConfiguration -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | 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.
    SplunkDestinationConfiguration -> Maybe SplunkRetryOptions
retryOptions :: Prelude.Maybe SplunkRetryOptions,
    -- | The data processing configuration.
    SplunkDestinationConfiguration -> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
    -- | The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
    -- sends your data.
    SplunkDestinationConfiguration -> Text
hECEndpoint :: Prelude.Text,
    -- | This type can be either \"Raw\" or \"Event.\"
    SplunkDestinationConfiguration -> HECEndpointType
hECEndpointType :: HECEndpointType,
    -- | This is a GUID that you obtain from your Splunk cluster when you create
    -- a new HEC endpoint.
    SplunkDestinationConfiguration -> Text
hECToken :: Prelude.Text,
    -- | The configuration for the backup Amazon S3 location.
    SplunkDestinationConfiguration -> S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
  }
  deriving (SplunkDestinationConfiguration
-> SplunkDestinationConfiguration -> Bool
(SplunkDestinationConfiguration
 -> SplunkDestinationConfiguration -> Bool)
-> (SplunkDestinationConfiguration
    -> SplunkDestinationConfiguration -> Bool)
-> Eq SplunkDestinationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SplunkDestinationConfiguration
-> SplunkDestinationConfiguration -> Bool
$c/= :: SplunkDestinationConfiguration
-> SplunkDestinationConfiguration -> Bool
== :: SplunkDestinationConfiguration
-> SplunkDestinationConfiguration -> Bool
$c== :: SplunkDestinationConfiguration
-> SplunkDestinationConfiguration -> Bool
Prelude.Eq, ReadPrec [SplunkDestinationConfiguration]
ReadPrec SplunkDestinationConfiguration
Int -> ReadS SplunkDestinationConfiguration
ReadS [SplunkDestinationConfiguration]
(Int -> ReadS SplunkDestinationConfiguration)
-> ReadS [SplunkDestinationConfiguration]
-> ReadPrec SplunkDestinationConfiguration
-> ReadPrec [SplunkDestinationConfiguration]
-> Read SplunkDestinationConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SplunkDestinationConfiguration]
$creadListPrec :: ReadPrec [SplunkDestinationConfiguration]
readPrec :: ReadPrec SplunkDestinationConfiguration
$creadPrec :: ReadPrec SplunkDestinationConfiguration
readList :: ReadS [SplunkDestinationConfiguration]
$creadList :: ReadS [SplunkDestinationConfiguration]
readsPrec :: Int -> ReadS SplunkDestinationConfiguration
$creadsPrec :: Int -> ReadS SplunkDestinationConfiguration
Prelude.Read, Int -> SplunkDestinationConfiguration -> ShowS
[SplunkDestinationConfiguration] -> ShowS
SplunkDestinationConfiguration -> String
(Int -> SplunkDestinationConfiguration -> ShowS)
-> (SplunkDestinationConfiguration -> String)
-> ([SplunkDestinationConfiguration] -> ShowS)
-> Show SplunkDestinationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SplunkDestinationConfiguration] -> ShowS
$cshowList :: [SplunkDestinationConfiguration] -> ShowS
show :: SplunkDestinationConfiguration -> String
$cshow :: SplunkDestinationConfiguration -> String
showsPrec :: Int -> SplunkDestinationConfiguration -> ShowS
$cshowsPrec :: Int -> SplunkDestinationConfiguration -> ShowS
Prelude.Show, (forall x.
 SplunkDestinationConfiguration
 -> Rep SplunkDestinationConfiguration x)
-> (forall x.
    Rep SplunkDestinationConfiguration x
    -> SplunkDestinationConfiguration)
-> Generic SplunkDestinationConfiguration
forall x.
Rep SplunkDestinationConfiguration x
-> SplunkDestinationConfiguration
forall x.
SplunkDestinationConfiguration
-> Rep SplunkDestinationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SplunkDestinationConfiguration x
-> SplunkDestinationConfiguration
$cfrom :: forall x.
SplunkDestinationConfiguration
-> Rep SplunkDestinationConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'SplunkDestinationConfiguration' 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', 'splunkDestinationConfiguration_s3BackupMode' - Defines how documents should be delivered to Amazon S3. When set to
-- @FailedEventsOnly@, 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@.
--
-- 'cloudWatchLoggingOptions', 'splunkDestinationConfiguration_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options for your delivery stream.
--
-- 'hECAcknowledgmentTimeoutInSeconds', 'splunkDestinationConfiguration_hECAcknowledgmentTimeoutInSeconds' - The amount of time that Kinesis Data Firehose waits to receive an
-- acknowledgment from Splunk after it sends it 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.
--
-- 'retryOptions', 'splunkDestinationConfiguration_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', 'splunkDestinationConfiguration_processingConfiguration' - The data processing configuration.
--
-- 'hECEndpoint', 'splunkDestinationConfiguration_hECEndpoint' - The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
-- sends your data.
--
-- 'hECEndpointType', 'splunkDestinationConfiguration_hECEndpointType' - This type can be either \"Raw\" or \"Event.\"
--
-- 'hECToken', 'splunkDestinationConfiguration_hECToken' - This is a GUID that you obtain from your Splunk cluster when you create
-- a new HEC endpoint.
--
-- 's3Configuration', 'splunkDestinationConfiguration_s3Configuration' - The configuration for the backup Amazon S3 location.
newSplunkDestinationConfiguration ::
  -- | 'hECEndpoint'
  Prelude.Text ->
  -- | 'hECEndpointType'
  HECEndpointType ->
  -- | 'hECToken'
  Prelude.Text ->
  -- | 's3Configuration'
  S3DestinationConfiguration ->
  SplunkDestinationConfiguration
newSplunkDestinationConfiguration :: Text
-> HECEndpointType
-> Text
-> S3DestinationConfiguration
-> SplunkDestinationConfiguration
newSplunkDestinationConfiguration
  Text
pHECEndpoint_
  HECEndpointType
pHECEndpointType_
  Text
pHECToken_
  S3DestinationConfiguration
pS3Configuration_ =
    SplunkDestinationConfiguration' :: Maybe SplunkS3BackupMode
-> Maybe CloudWatchLoggingOptions
-> Maybe Natural
-> Maybe SplunkRetryOptions
-> Maybe ProcessingConfiguration
-> Text
-> HECEndpointType
-> Text
-> S3DestinationConfiguration
-> SplunkDestinationConfiguration
SplunkDestinationConfiguration'
      { $sel:s3BackupMode:SplunkDestinationConfiguration' :: Maybe SplunkS3BackupMode
s3BackupMode =
          Maybe SplunkS3BackupMode
forall a. Maybe a
Prelude.Nothing,
        $sel:cloudWatchLoggingOptions:SplunkDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationConfiguration' :: Maybe Natural
hECAcknowledgmentTimeoutInSeconds =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:retryOptions:SplunkDestinationConfiguration' :: Maybe SplunkRetryOptions
retryOptions = Maybe SplunkRetryOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:processingConfiguration:SplunkDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:hECEndpoint:SplunkDestinationConfiguration' :: Text
hECEndpoint = Text
pHECEndpoint_,
        $sel:hECEndpointType:SplunkDestinationConfiguration' :: HECEndpointType
hECEndpointType = HECEndpointType
pHECEndpointType_,
        $sel:hECToken:SplunkDestinationConfiguration' :: Text
hECToken = Text
pHECToken_,
        $sel:s3Configuration:SplunkDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
pS3Configuration_
      }

-- | Defines how documents should be delivered to Amazon S3. When set to
-- @FailedEventsOnly@, 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@.
splunkDestinationConfiguration_s3BackupMode :: Lens.Lens' SplunkDestinationConfiguration (Prelude.Maybe SplunkS3BackupMode)
splunkDestinationConfiguration_s3BackupMode :: (Maybe SplunkS3BackupMode -> f (Maybe SplunkS3BackupMode))
-> SplunkDestinationConfiguration
-> f SplunkDestinationConfiguration
splunkDestinationConfiguration_s3BackupMode = (SplunkDestinationConfiguration -> Maybe SplunkS3BackupMode)
-> (SplunkDestinationConfiguration
    -> Maybe SplunkS3BackupMode -> SplunkDestinationConfiguration)
-> Lens
     SplunkDestinationConfiguration
     SplunkDestinationConfiguration
     (Maybe SplunkS3BackupMode)
     (Maybe SplunkS3BackupMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationConfiguration' {Maybe SplunkS3BackupMode
s3BackupMode :: Maybe SplunkS3BackupMode
$sel:s3BackupMode:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe SplunkS3BackupMode
s3BackupMode} -> Maybe SplunkS3BackupMode
s3BackupMode) (\s :: SplunkDestinationConfiguration
s@SplunkDestinationConfiguration' {} Maybe SplunkS3BackupMode
a -> SplunkDestinationConfiguration
s {$sel:s3BackupMode:SplunkDestinationConfiguration' :: Maybe SplunkS3BackupMode
s3BackupMode = Maybe SplunkS3BackupMode
a} :: SplunkDestinationConfiguration)

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

-- | The amount of time that Kinesis Data Firehose waits to receive an
-- acknowledgment from Splunk after it sends it 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.
splunkDestinationConfiguration_hECAcknowledgmentTimeoutInSeconds :: Lens.Lens' SplunkDestinationConfiguration (Prelude.Maybe Prelude.Natural)
splunkDestinationConfiguration_hECAcknowledgmentTimeoutInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> SplunkDestinationConfiguration
-> f SplunkDestinationConfiguration
splunkDestinationConfiguration_hECAcknowledgmentTimeoutInSeconds = (SplunkDestinationConfiguration -> Maybe Natural)
-> (SplunkDestinationConfiguration
    -> Maybe Natural -> SplunkDestinationConfiguration)
-> Lens
     SplunkDestinationConfiguration
     SplunkDestinationConfiguration
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationConfiguration' {Maybe Natural
hECAcknowledgmentTimeoutInSeconds :: Maybe Natural
$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds} -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds) (\s :: SplunkDestinationConfiguration
s@SplunkDestinationConfiguration' {} Maybe Natural
a -> SplunkDestinationConfiguration
s {$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationConfiguration' :: Maybe Natural
hECAcknowledgmentTimeoutInSeconds = Maybe Natural
a} :: SplunkDestinationConfiguration)

-- | 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.
splunkDestinationConfiguration_retryOptions :: Lens.Lens' SplunkDestinationConfiguration (Prelude.Maybe SplunkRetryOptions)
splunkDestinationConfiguration_retryOptions :: (Maybe SplunkRetryOptions -> f (Maybe SplunkRetryOptions))
-> SplunkDestinationConfiguration
-> f SplunkDestinationConfiguration
splunkDestinationConfiguration_retryOptions = (SplunkDestinationConfiguration -> Maybe SplunkRetryOptions)
-> (SplunkDestinationConfiguration
    -> Maybe SplunkRetryOptions -> SplunkDestinationConfiguration)
-> Lens
     SplunkDestinationConfiguration
     SplunkDestinationConfiguration
     (Maybe SplunkRetryOptions)
     (Maybe SplunkRetryOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationConfiguration' {Maybe SplunkRetryOptions
retryOptions :: Maybe SplunkRetryOptions
$sel:retryOptions:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe SplunkRetryOptions
retryOptions} -> Maybe SplunkRetryOptions
retryOptions) (\s :: SplunkDestinationConfiguration
s@SplunkDestinationConfiguration' {} Maybe SplunkRetryOptions
a -> SplunkDestinationConfiguration
s {$sel:retryOptions:SplunkDestinationConfiguration' :: Maybe SplunkRetryOptions
retryOptions = Maybe SplunkRetryOptions
a} :: SplunkDestinationConfiguration)

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

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

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

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

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

instance
  Prelude.Hashable
    SplunkDestinationConfiguration

instance
  Prelude.NFData
    SplunkDestinationConfiguration

instance Core.ToJSON SplunkDestinationConfiguration where
  toJSON :: SplunkDestinationConfiguration -> Value
toJSON SplunkDestinationConfiguration' {Maybe Natural
Maybe CloudWatchLoggingOptions
Maybe ProcessingConfiguration
Maybe SplunkRetryOptions
Maybe SplunkS3BackupMode
Text
HECEndpointType
S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
hECToken :: Text
hECEndpointType :: HECEndpointType
hECEndpoint :: Text
processingConfiguration :: Maybe ProcessingConfiguration
retryOptions :: Maybe SplunkRetryOptions
hECAcknowledgmentTimeoutInSeconds :: Maybe Natural
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
s3BackupMode :: Maybe SplunkS3BackupMode
$sel:s3Configuration:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> S3DestinationConfiguration
$sel:hECToken:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Text
$sel:hECEndpointType:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> HECEndpointType
$sel:hECEndpoint:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Text
$sel:processingConfiguration:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe ProcessingConfiguration
$sel:retryOptions:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe SplunkRetryOptions
$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe Natural
$sel:cloudWatchLoggingOptions:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> Maybe CloudWatchLoggingOptions
$sel:s3BackupMode:SplunkDestinationConfiguration' :: SplunkDestinationConfiguration -> 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
"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
"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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"HECEndpoint" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hECEndpoint),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"HECEndpointType" Text -> HECEndpointType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HECEndpointType
hECEndpointType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"HECToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hECToken),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"S3Configuration" Text -> S3DestinationConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3DestinationConfiguration
s3Configuration)
          ]
      )