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

-- | Describes a destination in Splunk.
--
-- /See:/ 'newSplunkDestinationDescription' smart constructor.
data SplunkDestinationDescription = SplunkDestinationDescription'
  { -- | Defines how documents should be delivered 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
    -- @AllDocuments@, Kinesis Data Firehose delivers all incoming records to
    -- Amazon S3, and also writes failed documents to Amazon S3. Default value
    -- is @FailedDocumentsOnly@.
    SplunkDestinationDescription -> Maybe SplunkS3BackupMode
s3BackupMode :: Prelude.Maybe SplunkS3BackupMode,
    -- | A GUID you obtain from your Splunk cluster when you create a new HEC
    -- endpoint.
    SplunkDestinationDescription -> Maybe Text
hECToken :: Prelude.Maybe Prelude.Text,
    -- | This type can be either \"Raw\" or \"Event.\"
    SplunkDestinationDescription -> Maybe HECEndpointType
hECEndpointType :: Prelude.Maybe HECEndpointType,
    -- | The Amazon CloudWatch logging options for your delivery stream.
    SplunkDestinationDescription -> 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.
    SplunkDestinationDescription -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon S3 destination.>
    SplunkDestinationDescription -> Maybe S3DestinationDescription
s3DestinationDescription :: Prelude.Maybe S3DestinationDescription,
    -- | The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
    -- sends your data.
    SplunkDestinationDescription -> 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.
    SplunkDestinationDescription -> Maybe SplunkRetryOptions
retryOptions :: Prelude.Maybe SplunkRetryOptions,
    -- | The data processing configuration.
    SplunkDestinationDescription -> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration
  }
  deriving (SplunkDestinationDescription
-> SplunkDestinationDescription -> Bool
(SplunkDestinationDescription
 -> SplunkDestinationDescription -> Bool)
-> (SplunkDestinationDescription
    -> SplunkDestinationDescription -> Bool)
-> Eq SplunkDestinationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SplunkDestinationDescription
-> SplunkDestinationDescription -> Bool
$c/= :: SplunkDestinationDescription
-> SplunkDestinationDescription -> Bool
== :: SplunkDestinationDescription
-> SplunkDestinationDescription -> Bool
$c== :: SplunkDestinationDescription
-> SplunkDestinationDescription -> Bool
Prelude.Eq, ReadPrec [SplunkDestinationDescription]
ReadPrec SplunkDestinationDescription
Int -> ReadS SplunkDestinationDescription
ReadS [SplunkDestinationDescription]
(Int -> ReadS SplunkDestinationDescription)
-> ReadS [SplunkDestinationDescription]
-> ReadPrec SplunkDestinationDescription
-> ReadPrec [SplunkDestinationDescription]
-> Read SplunkDestinationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SplunkDestinationDescription]
$creadListPrec :: ReadPrec [SplunkDestinationDescription]
readPrec :: ReadPrec SplunkDestinationDescription
$creadPrec :: ReadPrec SplunkDestinationDescription
readList :: ReadS [SplunkDestinationDescription]
$creadList :: ReadS [SplunkDestinationDescription]
readsPrec :: Int -> ReadS SplunkDestinationDescription
$creadsPrec :: Int -> ReadS SplunkDestinationDescription
Prelude.Read, Int -> SplunkDestinationDescription -> ShowS
[SplunkDestinationDescription] -> ShowS
SplunkDestinationDescription -> String
(Int -> SplunkDestinationDescription -> ShowS)
-> (SplunkDestinationDescription -> String)
-> ([SplunkDestinationDescription] -> ShowS)
-> Show SplunkDestinationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SplunkDestinationDescription] -> ShowS
$cshowList :: [SplunkDestinationDescription] -> ShowS
show :: SplunkDestinationDescription -> String
$cshow :: SplunkDestinationDescription -> String
showsPrec :: Int -> SplunkDestinationDescription -> ShowS
$cshowsPrec :: Int -> SplunkDestinationDescription -> ShowS
Prelude.Show, (forall x.
 SplunkDestinationDescription -> Rep SplunkDestinationDescription x)
-> (forall x.
    Rep SplunkDestinationDescription x -> SplunkDestinationDescription)
-> Generic SplunkDestinationDescription
forall x.
Rep SplunkDestinationDescription x -> SplunkDestinationDescription
forall x.
SplunkDestinationDescription -> Rep SplunkDestinationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SplunkDestinationDescription x -> SplunkDestinationDescription
$cfrom :: forall x.
SplunkDestinationDescription -> Rep SplunkDestinationDescription x
Prelude.Generic)

-- |
-- Create a value of 'SplunkDestinationDescription' 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', 'splunkDestinationDescription_s3BackupMode' - Defines how documents should be delivered 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
-- @AllDocuments@, Kinesis Data Firehose delivers all incoming records to
-- Amazon S3, and also writes failed documents to Amazon S3. Default value
-- is @FailedDocumentsOnly@.
--
-- 'hECToken', 'splunkDestinationDescription_hECToken' - A GUID you obtain from your Splunk cluster when you create a new HEC
-- endpoint.
--
-- 'hECEndpointType', 'splunkDestinationDescription_hECEndpointType' - This type can be either \"Raw\" or \"Event.\"
--
-- 'cloudWatchLoggingOptions', 'splunkDestinationDescription_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options for your delivery stream.
--
-- 'hECAcknowledgmentTimeoutInSeconds', 'splunkDestinationDescription_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.
--
-- 's3DestinationDescription', 'splunkDestinationDescription_s3DestinationDescription' - The Amazon S3 destination.>
--
-- 'hECEndpoint', 'splunkDestinationDescription_hECEndpoint' - The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose
-- sends your data.
--
-- 'retryOptions', 'splunkDestinationDescription_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', 'splunkDestinationDescription_processingConfiguration' - The data processing configuration.
newSplunkDestinationDescription ::
  SplunkDestinationDescription
newSplunkDestinationDescription :: SplunkDestinationDescription
newSplunkDestinationDescription =
  SplunkDestinationDescription' :: Maybe SplunkS3BackupMode
-> Maybe Text
-> Maybe HECEndpointType
-> Maybe CloudWatchLoggingOptions
-> Maybe Natural
-> Maybe S3DestinationDescription
-> Maybe Text
-> Maybe SplunkRetryOptions
-> Maybe ProcessingConfiguration
-> SplunkDestinationDescription
SplunkDestinationDescription'
    { $sel:s3BackupMode:SplunkDestinationDescription' :: Maybe SplunkS3BackupMode
s3BackupMode =
        Maybe SplunkS3BackupMode
forall a. Maybe a
Prelude.Nothing,
      $sel:hECToken:SplunkDestinationDescription' :: Maybe Text
hECToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hECEndpointType:SplunkDestinationDescription' :: Maybe HECEndpointType
hECEndpointType = Maybe HECEndpointType
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLoggingOptions:SplunkDestinationDescription' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationDescription' :: Maybe Natural
hECAcknowledgmentTimeoutInSeconds =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:s3DestinationDescription:SplunkDestinationDescription' :: Maybe S3DestinationDescription
s3DestinationDescription = Maybe S3DestinationDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:hECEndpoint:SplunkDestinationDescription' :: Maybe Text
hECEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:retryOptions:SplunkDestinationDescription' :: Maybe SplunkRetryOptions
retryOptions = Maybe SplunkRetryOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:processingConfiguration:SplunkDestinationDescription' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | Defines how documents should be delivered 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
-- @AllDocuments@, Kinesis Data Firehose delivers all incoming records to
-- Amazon S3, and also writes failed documents to Amazon S3. Default value
-- is @FailedDocumentsOnly@.
splunkDestinationDescription_s3BackupMode :: Lens.Lens' SplunkDestinationDescription (Prelude.Maybe SplunkS3BackupMode)
splunkDestinationDescription_s3BackupMode :: (Maybe SplunkS3BackupMode -> f (Maybe SplunkS3BackupMode))
-> SplunkDestinationDescription -> f SplunkDestinationDescription
splunkDestinationDescription_s3BackupMode = (SplunkDestinationDescription -> Maybe SplunkS3BackupMode)
-> (SplunkDestinationDescription
    -> Maybe SplunkS3BackupMode -> SplunkDestinationDescription)
-> Lens
     SplunkDestinationDescription
     SplunkDestinationDescription
     (Maybe SplunkS3BackupMode)
     (Maybe SplunkS3BackupMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationDescription' {Maybe SplunkS3BackupMode
s3BackupMode :: Maybe SplunkS3BackupMode
$sel:s3BackupMode:SplunkDestinationDescription' :: SplunkDestinationDescription -> Maybe SplunkS3BackupMode
s3BackupMode} -> Maybe SplunkS3BackupMode
s3BackupMode) (\s :: SplunkDestinationDescription
s@SplunkDestinationDescription' {} Maybe SplunkS3BackupMode
a -> SplunkDestinationDescription
s {$sel:s3BackupMode:SplunkDestinationDescription' :: Maybe SplunkS3BackupMode
s3BackupMode = Maybe SplunkS3BackupMode
a} :: SplunkDestinationDescription)

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

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

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

-- | 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.
splunkDestinationDescription_hECAcknowledgmentTimeoutInSeconds :: Lens.Lens' SplunkDestinationDescription (Prelude.Maybe Prelude.Natural)
splunkDestinationDescription_hECAcknowledgmentTimeoutInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> SplunkDestinationDescription -> f SplunkDestinationDescription
splunkDestinationDescription_hECAcknowledgmentTimeoutInSeconds = (SplunkDestinationDescription -> Maybe Natural)
-> (SplunkDestinationDescription
    -> Maybe Natural -> SplunkDestinationDescription)
-> Lens
     SplunkDestinationDescription
     SplunkDestinationDescription
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SplunkDestinationDescription' {Maybe Natural
hECAcknowledgmentTimeoutInSeconds :: Maybe Natural
$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationDescription' :: SplunkDestinationDescription -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds} -> Maybe Natural
hECAcknowledgmentTimeoutInSeconds) (\s :: SplunkDestinationDescription
s@SplunkDestinationDescription' {} Maybe Natural
a -> SplunkDestinationDescription
s {$sel:hECAcknowledgmentTimeoutInSeconds:SplunkDestinationDescription' :: Maybe Natural
hECAcknowledgmentTimeoutInSeconds = Maybe Natural
a} :: SplunkDestinationDescription)

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

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

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

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

instance Core.FromJSON SplunkDestinationDescription where
  parseJSON :: Value -> Parser SplunkDestinationDescription
parseJSON =
    String
-> (Object -> Parser SplunkDestinationDescription)
-> Value
-> Parser SplunkDestinationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SplunkDestinationDescription"
      ( \Object
x ->
          Maybe SplunkS3BackupMode
-> Maybe Text
-> Maybe HECEndpointType
-> Maybe CloudWatchLoggingOptions
-> Maybe Natural
-> Maybe S3DestinationDescription
-> Maybe Text
-> Maybe SplunkRetryOptions
-> Maybe ProcessingConfiguration
-> SplunkDestinationDescription
SplunkDestinationDescription'
            (Maybe SplunkS3BackupMode
 -> Maybe Text
 -> Maybe HECEndpointType
 -> Maybe CloudWatchLoggingOptions
 -> Maybe Natural
 -> Maybe S3DestinationDescription
 -> Maybe Text
 -> Maybe SplunkRetryOptions
 -> Maybe ProcessingConfiguration
 -> SplunkDestinationDescription)
-> Parser (Maybe SplunkS3BackupMode)
-> Parser
     (Maybe Text
      -> Maybe HECEndpointType
      -> Maybe CloudWatchLoggingOptions
      -> Maybe Natural
      -> Maybe S3DestinationDescription
      -> Maybe Text
      -> Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration
      -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SplunkS3BackupMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3BackupMode")
            Parser
  (Maybe Text
   -> Maybe HECEndpointType
   -> Maybe CloudWatchLoggingOptions
   -> Maybe Natural
   -> Maybe S3DestinationDescription
   -> Maybe Text
   -> Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration
   -> SplunkDestinationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe HECEndpointType
      -> Maybe CloudWatchLoggingOptions
      -> Maybe Natural
      -> Maybe S3DestinationDescription
      -> Maybe Text
      -> Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration
      -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HECToken")
            Parser
  (Maybe HECEndpointType
   -> Maybe CloudWatchLoggingOptions
   -> Maybe Natural
   -> Maybe S3DestinationDescription
   -> Maybe Text
   -> Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration
   -> SplunkDestinationDescription)
-> Parser (Maybe HECEndpointType)
-> Parser
     (Maybe CloudWatchLoggingOptions
      -> Maybe Natural
      -> Maybe S3DestinationDescription
      -> Maybe Text
      -> Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration
      -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HECEndpointType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HECEndpointType")
            Parser
  (Maybe CloudWatchLoggingOptions
   -> Maybe Natural
   -> Maybe S3DestinationDescription
   -> Maybe Text
   -> Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration
   -> SplunkDestinationDescription)
-> Parser (Maybe CloudWatchLoggingOptions)
-> Parser
     (Maybe Natural
      -> Maybe S3DestinationDescription
      -> Maybe Text
      -> Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration
      -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchLoggingOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchLoggingOptions")
            Parser
  (Maybe Natural
   -> Maybe S3DestinationDescription
   -> Maybe Text
   -> Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration
   -> SplunkDestinationDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe S3DestinationDescription
      -> Maybe Text
      -> Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration
      -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HECAcknowledgmentTimeoutInSeconds")
            Parser
  (Maybe S3DestinationDescription
   -> Maybe Text
   -> Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration
   -> SplunkDestinationDescription)
-> Parser (Maybe S3DestinationDescription)
-> Parser
     (Maybe Text
      -> Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration
      -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3DestinationDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3DestinationDescription")
            Parser
  (Maybe Text
   -> Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration
   -> SplunkDestinationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe SplunkRetryOptions
      -> Maybe ProcessingConfiguration -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HECEndpoint")
            Parser
  (Maybe SplunkRetryOptions
   -> Maybe ProcessingConfiguration -> SplunkDestinationDescription)
-> Parser (Maybe SplunkRetryOptions)
-> Parser
     (Maybe ProcessingConfiguration -> SplunkDestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SplunkRetryOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RetryOptions")
            Parser
  (Maybe ProcessingConfiguration -> SplunkDestinationDescription)
-> Parser (Maybe ProcessingConfiguration)
-> Parser SplunkDestinationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProcessingConfiguration")
      )

instance
  Prelude.Hashable
    SplunkDestinationDescription

instance Prelude.NFData SplunkDestinationDescription