{-# 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 #-}
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
data S3DestinationDescription = S3DestinationDescription'
{
S3DestinationDescription -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
S3DestinationDescription -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
S3DestinationDescription -> Maybe Text
errorOutputPrefix :: Prelude.Maybe Prelude.Text,
S3DestinationDescription -> Text
roleARN :: Prelude.Text,
S3DestinationDescription -> Text
bucketARN :: Prelude.Text,
S3DestinationDescription -> BufferingHints
bufferingHints :: BufferingHints,
S3DestinationDescription -> CompressionFormat
compressionFormat :: CompressionFormat,
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)
newS3DestinationDescription ::
Prelude.Text ->
Prelude.Text ->
BufferingHints ->
CompressionFormat ->
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_
}
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)
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)
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)
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)
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)
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)
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)
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