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

import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.BufferingHints
import Amazonka.Firehose.Types.CloudWatchLoggingOptions
import Amazonka.Firehose.Types.CompressionFormat
import Amazonka.Firehose.Types.EncryptionConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a destination in Amazon S3.
--
-- /See:/ 'newS3DestinationDescription' smart constructor.
data S3DestinationDescription = S3DestinationDescription'
  { -- | The \"YYYY\/MM\/DD\/HH\" time format prefix is automatically used for
    -- delivered Amazon S3 files. You can also specify a custom prefix, as
    -- described in
    -- <https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html Custom Prefixes for Amazon S3 Objects>.
    S3DestinationDescription -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | The Amazon CloudWatch logging options for your delivery stream.
    S3DestinationDescription -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
    -- | A prefix that Kinesis Data Firehose evaluates and adds to failed records
    -- before writing them to S3. This prefix appears immediately following the
    -- bucket name. For information about how to specify this prefix, see
    -- <https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html Custom Prefixes for Amazon S3 Objects>.
    S3DestinationDescription -> Maybe Text
errorOutputPrefix :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the AWS credentials. For more
    -- information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
    S3DestinationDescription -> Text
roleARN :: Prelude.Text,
    -- | The ARN of the S3 bucket. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
    S3DestinationDescription -> Text
bucketARN :: Prelude.Text,
    -- | The buffering option. If no value is specified, @BufferingHints@ object
    -- default values are used.
    S3DestinationDescription -> BufferingHints
bufferingHints :: BufferingHints,
    -- | The compression format. If no value is specified, the default is
    -- @UNCOMPRESSED@.
    S3DestinationDescription -> CompressionFormat
compressionFormat :: CompressionFormat,
    -- | The encryption configuration. If no value is specified, the default is
    -- no encryption.
    S3DestinationDescription -> EncryptionConfiguration
encryptionConfiguration :: EncryptionConfiguration
  }
  deriving (S3DestinationDescription -> S3DestinationDescription -> Bool
(S3DestinationDescription -> S3DestinationDescription -> Bool)
-> (S3DestinationDescription -> S3DestinationDescription -> Bool)
-> Eq S3DestinationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3DestinationDescription -> S3DestinationDescription -> Bool
$c/= :: S3DestinationDescription -> S3DestinationDescription -> Bool
== :: S3DestinationDescription -> S3DestinationDescription -> Bool
$c== :: S3DestinationDescription -> S3DestinationDescription -> Bool
Prelude.Eq, ReadPrec [S3DestinationDescription]
ReadPrec S3DestinationDescription
Int -> ReadS S3DestinationDescription
ReadS [S3DestinationDescription]
(Int -> ReadS S3DestinationDescription)
-> ReadS [S3DestinationDescription]
-> ReadPrec S3DestinationDescription
-> ReadPrec [S3DestinationDescription]
-> Read S3DestinationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3DestinationDescription]
$creadListPrec :: ReadPrec [S3DestinationDescription]
readPrec :: ReadPrec S3DestinationDescription
$creadPrec :: ReadPrec S3DestinationDescription
readList :: ReadS [S3DestinationDescription]
$creadList :: ReadS [S3DestinationDescription]
readsPrec :: Int -> ReadS S3DestinationDescription
$creadsPrec :: Int -> ReadS S3DestinationDescription
Prelude.Read, Int -> S3DestinationDescription -> ShowS
[S3DestinationDescription] -> ShowS
S3DestinationDescription -> String
(Int -> S3DestinationDescription -> ShowS)
-> (S3DestinationDescription -> String)
-> ([S3DestinationDescription] -> ShowS)
-> Show S3DestinationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3DestinationDescription] -> ShowS
$cshowList :: [S3DestinationDescription] -> ShowS
show :: S3DestinationDescription -> String
$cshow :: S3DestinationDescription -> String
showsPrec :: Int -> S3DestinationDescription -> ShowS
$cshowsPrec :: Int -> S3DestinationDescription -> ShowS
Prelude.Show, (forall x.
 S3DestinationDescription -> Rep S3DestinationDescription x)
-> (forall x.
    Rep S3DestinationDescription x -> S3DestinationDescription)
-> Generic S3DestinationDescription
forall x.
Rep S3DestinationDescription x -> S3DestinationDescription
forall x.
S3DestinationDescription -> Rep S3DestinationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep S3DestinationDescription x -> S3DestinationDescription
$cfrom :: forall x.
S3DestinationDescription -> Rep S3DestinationDescription x
Prelude.Generic)

-- |
-- Create a value of 'S3DestinationDescription' 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:
--
-- 'prefix', 's3DestinationDescription_prefix' - The \"YYYY\/MM\/DD\/HH\" time format prefix is automatically used for
-- delivered Amazon S3 files. You can also specify a custom prefix, as
-- described in
-- <https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html Custom Prefixes for Amazon S3 Objects>.
--
-- 'cloudWatchLoggingOptions', 's3DestinationDescription_cloudWatchLoggingOptions' - The Amazon CloudWatch logging options for your delivery stream.
--
-- 'errorOutputPrefix', 's3DestinationDescription_errorOutputPrefix' - A prefix that Kinesis Data Firehose evaluates and adds to failed records
-- before writing them to S3. This prefix appears immediately following the
-- bucket name. For information about how to specify this prefix, see
-- <https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html Custom Prefixes for Amazon S3 Objects>.
--
-- 'roleARN', 's3DestinationDescription_roleARN' - The Amazon Resource Name (ARN) of the AWS credentials. For more
-- information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- 'bucketARN', 's3DestinationDescription_bucketARN' - The ARN of the S3 bucket. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
--
-- 'bufferingHints', 's3DestinationDescription_bufferingHints' - The buffering option. If no value is specified, @BufferingHints@ object
-- default values are used.
--
-- 'compressionFormat', 's3DestinationDescription_compressionFormat' - The compression format. If no value is specified, the default is
-- @UNCOMPRESSED@.
--
-- 'encryptionConfiguration', 's3DestinationDescription_encryptionConfiguration' - The encryption configuration. If no value is specified, the default is
-- no encryption.
newS3DestinationDescription ::
  -- | 'roleARN'
  Prelude.Text ->
  -- | 'bucketARN'
  Prelude.Text ->
  -- | 'bufferingHints'
  BufferingHints ->
  -- | 'compressionFormat'
  CompressionFormat ->
  -- | 'encryptionConfiguration'
  EncryptionConfiguration ->
  S3DestinationDescription
newS3DestinationDescription :: Text
-> Text
-> BufferingHints
-> CompressionFormat
-> EncryptionConfiguration
-> S3DestinationDescription
newS3DestinationDescription
  Text
pRoleARN_
  Text
pBucketARN_
  BufferingHints
pBufferingHints_
  CompressionFormat
pCompressionFormat_
  EncryptionConfiguration
pEncryptionConfiguration_ =
    S3DestinationDescription' :: Maybe Text
-> Maybe CloudWatchLoggingOptions
-> Maybe Text
-> Text
-> Text
-> BufferingHints
-> CompressionFormat
-> EncryptionConfiguration
-> S3DestinationDescription
S3DestinationDescription'
      { $sel:prefix:S3DestinationDescription' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:cloudWatchLoggingOptions:S3DestinationDescription' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:errorOutputPrefix:S3DestinationDescription' :: Maybe Text
errorOutputPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:roleARN:S3DestinationDescription' :: Text
roleARN = Text
pRoleARN_,
        $sel:bucketARN:S3DestinationDescription' :: Text
bucketARN = Text
pBucketARN_,
        $sel:bufferingHints:S3DestinationDescription' :: BufferingHints
bufferingHints = BufferingHints
pBufferingHints_,
        $sel:compressionFormat:S3DestinationDescription' :: CompressionFormat
compressionFormat = CompressionFormat
pCompressionFormat_,
        $sel:encryptionConfiguration:S3DestinationDescription' :: EncryptionConfiguration
encryptionConfiguration =
          EncryptionConfiguration
pEncryptionConfiguration_
      }

-- | The \"YYYY\/MM\/DD\/HH\" time format prefix is automatically used for
-- delivered Amazon S3 files. You can also specify a custom prefix, as
-- described in
-- <https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html Custom Prefixes for Amazon S3 Objects>.
s3DestinationDescription_prefix :: Lens.Lens' S3DestinationDescription (Prelude.Maybe Prelude.Text)
s3DestinationDescription_prefix :: (Maybe Text -> f (Maybe Text))
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_prefix = (S3DestinationDescription -> Maybe Text)
-> (S3DestinationDescription
    -> Maybe Text -> S3DestinationDescription)
-> Lens
     S3DestinationDescription
     S3DestinationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {Maybe Text
prefix :: Maybe Text
$sel:prefix:S3DestinationDescription' :: S3DestinationDescription -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} Maybe Text
a -> S3DestinationDescription
s {$sel:prefix:S3DestinationDescription' :: Maybe Text
prefix = Maybe Text
a} :: S3DestinationDescription)

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

-- | A prefix that Kinesis Data Firehose evaluates and adds to failed records
-- before writing them to S3. This prefix appears immediately following the
-- bucket name. For information about how to specify this prefix, see
-- <https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html Custom Prefixes for Amazon S3 Objects>.
s3DestinationDescription_errorOutputPrefix :: Lens.Lens' S3DestinationDescription (Prelude.Maybe Prelude.Text)
s3DestinationDescription_errorOutputPrefix :: (Maybe Text -> f (Maybe Text))
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_errorOutputPrefix = (S3DestinationDescription -> Maybe Text)
-> (S3DestinationDescription
    -> Maybe Text -> S3DestinationDescription)
-> Lens
     S3DestinationDescription
     S3DestinationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {Maybe Text
errorOutputPrefix :: Maybe Text
$sel:errorOutputPrefix:S3DestinationDescription' :: S3DestinationDescription -> Maybe Text
errorOutputPrefix} -> Maybe Text
errorOutputPrefix) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} Maybe Text
a -> S3DestinationDescription
s {$sel:errorOutputPrefix:S3DestinationDescription' :: Maybe Text
errorOutputPrefix = Maybe Text
a} :: S3DestinationDescription)

-- | The Amazon Resource Name (ARN) of the AWS credentials. For more
-- information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
s3DestinationDescription_roleARN :: Lens.Lens' S3DestinationDescription Prelude.Text
s3DestinationDescription_roleARN :: (Text -> f Text)
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_roleARN = (S3DestinationDescription -> Text)
-> (S3DestinationDescription -> Text -> S3DestinationDescription)
-> Lens S3DestinationDescription S3DestinationDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {Text
roleARN :: Text
$sel:roleARN:S3DestinationDescription' :: S3DestinationDescription -> Text
roleARN} -> Text
roleARN) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} Text
a -> S3DestinationDescription
s {$sel:roleARN:S3DestinationDescription' :: Text
roleARN = Text
a} :: S3DestinationDescription)

-- | The ARN of the S3 bucket. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces>.
s3DestinationDescription_bucketARN :: Lens.Lens' S3DestinationDescription Prelude.Text
s3DestinationDescription_bucketARN :: (Text -> f Text)
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_bucketARN = (S3DestinationDescription -> Text)
-> (S3DestinationDescription -> Text -> S3DestinationDescription)
-> Lens S3DestinationDescription S3DestinationDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {Text
bucketARN :: Text
$sel:bucketARN:S3DestinationDescription' :: S3DestinationDescription -> Text
bucketARN} -> Text
bucketARN) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} Text
a -> S3DestinationDescription
s {$sel:bucketARN:S3DestinationDescription' :: Text
bucketARN = Text
a} :: S3DestinationDescription)

-- | The buffering option. If no value is specified, @BufferingHints@ object
-- default values are used.
s3DestinationDescription_bufferingHints :: Lens.Lens' S3DestinationDescription BufferingHints
s3DestinationDescription_bufferingHints :: (BufferingHints -> f BufferingHints)
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_bufferingHints = (S3DestinationDescription -> BufferingHints)
-> (S3DestinationDescription
    -> BufferingHints -> S3DestinationDescription)
-> Lens
     S3DestinationDescription
     S3DestinationDescription
     BufferingHints
     BufferingHints
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {BufferingHints
bufferingHints :: BufferingHints
$sel:bufferingHints:S3DestinationDescription' :: S3DestinationDescription -> BufferingHints
bufferingHints} -> BufferingHints
bufferingHints) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} BufferingHints
a -> S3DestinationDescription
s {$sel:bufferingHints:S3DestinationDescription' :: BufferingHints
bufferingHints = BufferingHints
a} :: S3DestinationDescription)

-- | The compression format. If no value is specified, the default is
-- @UNCOMPRESSED@.
s3DestinationDescription_compressionFormat :: Lens.Lens' S3DestinationDescription CompressionFormat
s3DestinationDescription_compressionFormat :: (CompressionFormat -> f CompressionFormat)
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_compressionFormat = (S3DestinationDescription -> CompressionFormat)
-> (S3DestinationDescription
    -> CompressionFormat -> S3DestinationDescription)
-> Lens
     S3DestinationDescription
     S3DestinationDescription
     CompressionFormat
     CompressionFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {CompressionFormat
compressionFormat :: CompressionFormat
$sel:compressionFormat:S3DestinationDescription' :: S3DestinationDescription -> CompressionFormat
compressionFormat} -> CompressionFormat
compressionFormat) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} CompressionFormat
a -> S3DestinationDescription
s {$sel:compressionFormat:S3DestinationDescription' :: CompressionFormat
compressionFormat = CompressionFormat
a} :: S3DestinationDescription)

-- | The encryption configuration. If no value is specified, the default is
-- no encryption.
s3DestinationDescription_encryptionConfiguration :: Lens.Lens' S3DestinationDescription EncryptionConfiguration
s3DestinationDescription_encryptionConfiguration :: (EncryptionConfiguration -> f EncryptionConfiguration)
-> S3DestinationDescription -> f S3DestinationDescription
s3DestinationDescription_encryptionConfiguration = (S3DestinationDescription -> EncryptionConfiguration)
-> (S3DestinationDescription
    -> EncryptionConfiguration -> S3DestinationDescription)
-> Lens
     S3DestinationDescription
     S3DestinationDescription
     EncryptionConfiguration
     EncryptionConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationDescription' {EncryptionConfiguration
encryptionConfiguration :: EncryptionConfiguration
$sel:encryptionConfiguration:S3DestinationDescription' :: S3DestinationDescription -> EncryptionConfiguration
encryptionConfiguration} -> EncryptionConfiguration
encryptionConfiguration) (\s :: S3DestinationDescription
s@S3DestinationDescription' {} EncryptionConfiguration
a -> S3DestinationDescription
s {$sel:encryptionConfiguration:S3DestinationDescription' :: EncryptionConfiguration
encryptionConfiguration = EncryptionConfiguration
a} :: S3DestinationDescription)

instance Core.FromJSON S3DestinationDescription where
  parseJSON :: Value -> Parser S3DestinationDescription
parseJSON =
    String
-> (Object -> Parser S3DestinationDescription)
-> Value
-> Parser S3DestinationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"S3DestinationDescription"
      ( \Object
x ->
          Maybe Text
-> Maybe CloudWatchLoggingOptions
-> Maybe Text
-> Text
-> Text
-> BufferingHints
-> CompressionFormat
-> EncryptionConfiguration
-> S3DestinationDescription
S3DestinationDescription'
            (Maybe Text
 -> Maybe CloudWatchLoggingOptions
 -> Maybe Text
 -> Text
 -> Text
 -> BufferingHints
 -> CompressionFormat
 -> EncryptionConfiguration
 -> S3DestinationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe CloudWatchLoggingOptions
      -> Maybe Text
      -> Text
      -> Text
      -> BufferingHints
      -> CompressionFormat
      -> EncryptionConfiguration
      -> S3DestinationDescription)
forall (f :: * -> *) a b. Functor 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
"Prefix")
            Parser
  (Maybe CloudWatchLoggingOptions
   -> Maybe Text
   -> Text
   -> Text
   -> BufferingHints
   -> CompressionFormat
   -> EncryptionConfiguration
   -> S3DestinationDescription)
-> Parser (Maybe CloudWatchLoggingOptions)
-> Parser
     (Maybe Text
      -> Text
      -> Text
      -> BufferingHints
      -> CompressionFormat
      -> EncryptionConfiguration
      -> S3DestinationDescription)
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 Text
   -> Text
   -> Text
   -> BufferingHints
   -> CompressionFormat
   -> EncryptionConfiguration
   -> S3DestinationDescription)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> BufferingHints
      -> CompressionFormat
      -> EncryptionConfiguration
      -> S3DestinationDescription)
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
"ErrorOutputPrefix")
            Parser
  (Text
   -> Text
   -> BufferingHints
   -> CompressionFormat
   -> EncryptionConfiguration
   -> S3DestinationDescription)
-> Parser Text
-> Parser
     (Text
      -> BufferingHints
      -> CompressionFormat
      -> EncryptionConfiguration
      -> S3DestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RoleARN")
            Parser
  (Text
   -> BufferingHints
   -> CompressionFormat
   -> EncryptionConfiguration
   -> S3DestinationDescription)
-> Parser Text
-> Parser
     (BufferingHints
      -> CompressionFormat
      -> EncryptionConfiguration
      -> S3DestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BucketARN")
            Parser
  (BufferingHints
   -> CompressionFormat
   -> EncryptionConfiguration
   -> S3DestinationDescription)
-> Parser BufferingHints
-> Parser
     (CompressionFormat
      -> EncryptionConfiguration -> S3DestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser BufferingHints
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BufferingHints")
            Parser
  (CompressionFormat
   -> EncryptionConfiguration -> S3DestinationDescription)
-> Parser CompressionFormat
-> Parser (EncryptionConfiguration -> S3DestinationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser CompressionFormat
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CompressionFormat")
            Parser (EncryptionConfiguration -> S3DestinationDescription)
-> Parser EncryptionConfiguration
-> Parser S3DestinationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EncryptionConfiguration
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EncryptionConfiguration")
      )

instance Prelude.Hashable S3DestinationDescription

instance Prelude.NFData S3DestinationDescription