{-# 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.S3DestinationUpdate 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 S3DestinationUpdate = S3DestinationUpdate'
{
S3DestinationUpdate -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
S3DestinationUpdate -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
S3DestinationUpdate -> Maybe Text
errorOutputPrefix :: Prelude.Maybe Prelude.Text,
S3DestinationUpdate -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
S3DestinationUpdate -> Maybe CompressionFormat
compressionFormat :: Prelude.Maybe CompressionFormat,
S3DestinationUpdate -> Maybe BufferingHints
bufferingHints :: Prelude.Maybe BufferingHints,
S3DestinationUpdate -> Maybe Text
bucketARN :: Prelude.Maybe Prelude.Text,
S3DestinationUpdate -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text
}
deriving (S3DestinationUpdate -> S3DestinationUpdate -> Bool
(S3DestinationUpdate -> S3DestinationUpdate -> Bool)
-> (S3DestinationUpdate -> S3DestinationUpdate -> Bool)
-> Eq S3DestinationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3DestinationUpdate -> S3DestinationUpdate -> Bool
$c/= :: S3DestinationUpdate -> S3DestinationUpdate -> Bool
== :: S3DestinationUpdate -> S3DestinationUpdate -> Bool
$c== :: S3DestinationUpdate -> S3DestinationUpdate -> Bool
Prelude.Eq, ReadPrec [S3DestinationUpdate]
ReadPrec S3DestinationUpdate
Int -> ReadS S3DestinationUpdate
ReadS [S3DestinationUpdate]
(Int -> ReadS S3DestinationUpdate)
-> ReadS [S3DestinationUpdate]
-> ReadPrec S3DestinationUpdate
-> ReadPrec [S3DestinationUpdate]
-> Read S3DestinationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3DestinationUpdate]
$creadListPrec :: ReadPrec [S3DestinationUpdate]
readPrec :: ReadPrec S3DestinationUpdate
$creadPrec :: ReadPrec S3DestinationUpdate
readList :: ReadS [S3DestinationUpdate]
$creadList :: ReadS [S3DestinationUpdate]
readsPrec :: Int -> ReadS S3DestinationUpdate
$creadsPrec :: Int -> ReadS S3DestinationUpdate
Prelude.Read, Int -> S3DestinationUpdate -> ShowS
[S3DestinationUpdate] -> ShowS
S3DestinationUpdate -> String
(Int -> S3DestinationUpdate -> ShowS)
-> (S3DestinationUpdate -> String)
-> ([S3DestinationUpdate] -> ShowS)
-> Show S3DestinationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3DestinationUpdate] -> ShowS
$cshowList :: [S3DestinationUpdate] -> ShowS
show :: S3DestinationUpdate -> String
$cshow :: S3DestinationUpdate -> String
showsPrec :: Int -> S3DestinationUpdate -> ShowS
$cshowsPrec :: Int -> S3DestinationUpdate -> ShowS
Prelude.Show, (forall x. S3DestinationUpdate -> Rep S3DestinationUpdate x)
-> (forall x. Rep S3DestinationUpdate x -> S3DestinationUpdate)
-> Generic S3DestinationUpdate
forall x. Rep S3DestinationUpdate x -> S3DestinationUpdate
forall x. S3DestinationUpdate -> Rep S3DestinationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3DestinationUpdate x -> S3DestinationUpdate
$cfrom :: forall x. S3DestinationUpdate -> Rep S3DestinationUpdate x
Prelude.Generic)
newS3DestinationUpdate ::
S3DestinationUpdate
newS3DestinationUpdate :: S3DestinationUpdate
newS3DestinationUpdate =
S3DestinationUpdate' :: Maybe Text
-> Maybe CloudWatchLoggingOptions
-> Maybe Text
-> Maybe EncryptionConfiguration
-> Maybe CompressionFormat
-> Maybe BufferingHints
-> Maybe Text
-> Maybe Text
-> S3DestinationUpdate
S3DestinationUpdate'
{ $sel:prefix:S3DestinationUpdate' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLoggingOptions:S3DestinationUpdate' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
$sel:errorOutputPrefix:S3DestinationUpdate' :: Maybe Text
errorOutputPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionConfiguration:S3DestinationUpdate' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:compressionFormat:S3DestinationUpdate' :: Maybe CompressionFormat
compressionFormat = Maybe CompressionFormat
forall a. Maybe a
Prelude.Nothing,
$sel:bufferingHints:S3DestinationUpdate' :: Maybe BufferingHints
bufferingHints = Maybe BufferingHints
forall a. Maybe a
Prelude.Nothing,
$sel:bucketARN:S3DestinationUpdate' :: Maybe Text
bucketARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:S3DestinationUpdate' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
s3DestinationUpdate_prefix :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe Prelude.Text)
s3DestinationUpdate_prefix :: (Maybe Text -> f (Maybe Text))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_prefix = (S3DestinationUpdate -> Maybe Text)
-> (S3DestinationUpdate -> Maybe Text -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate S3DestinationUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe Text
prefix :: Maybe Text
$sel:prefix:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe Text
a -> S3DestinationUpdate
s {$sel:prefix:S3DestinationUpdate' :: Maybe Text
prefix = Maybe Text
a} :: S3DestinationUpdate)
s3DestinationUpdate_cloudWatchLoggingOptions :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe CloudWatchLoggingOptions)
s3DestinationUpdate_cloudWatchLoggingOptions :: (Maybe CloudWatchLoggingOptions
-> f (Maybe CloudWatchLoggingOptions))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_cloudWatchLoggingOptions = (S3DestinationUpdate -> Maybe CloudWatchLoggingOptions)
-> (S3DestinationUpdate
-> Maybe CloudWatchLoggingOptions -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate
S3DestinationUpdate
(Maybe CloudWatchLoggingOptions)
(Maybe CloudWatchLoggingOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
$sel:cloudWatchLoggingOptions:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions} -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe CloudWatchLoggingOptions
a -> S3DestinationUpdate
s {$sel:cloudWatchLoggingOptions:S3DestinationUpdate' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
a} :: S3DestinationUpdate)
s3DestinationUpdate_errorOutputPrefix :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe Prelude.Text)
s3DestinationUpdate_errorOutputPrefix :: (Maybe Text -> f (Maybe Text))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_errorOutputPrefix = (S3DestinationUpdate -> Maybe Text)
-> (S3DestinationUpdate -> Maybe Text -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate S3DestinationUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe Text
errorOutputPrefix :: Maybe Text
$sel:errorOutputPrefix:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
errorOutputPrefix} -> Maybe Text
errorOutputPrefix) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe Text
a -> S3DestinationUpdate
s {$sel:errorOutputPrefix:S3DestinationUpdate' :: Maybe Text
errorOutputPrefix = Maybe Text
a} :: S3DestinationUpdate)
s3DestinationUpdate_encryptionConfiguration :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe EncryptionConfiguration)
s3DestinationUpdate_encryptionConfiguration :: (Maybe EncryptionConfiguration
-> f (Maybe EncryptionConfiguration))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_encryptionConfiguration = (S3DestinationUpdate -> Maybe EncryptionConfiguration)
-> (S3DestinationUpdate
-> Maybe EncryptionConfiguration -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate
S3DestinationUpdate
(Maybe EncryptionConfiguration)
(Maybe EncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe EncryptionConfiguration
a -> S3DestinationUpdate
s {$sel:encryptionConfiguration:S3DestinationUpdate' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: S3DestinationUpdate)
s3DestinationUpdate_compressionFormat :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe CompressionFormat)
s3DestinationUpdate_compressionFormat :: (Maybe CompressionFormat -> f (Maybe CompressionFormat))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_compressionFormat = (S3DestinationUpdate -> Maybe CompressionFormat)
-> (S3DestinationUpdate
-> Maybe CompressionFormat -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate
S3DestinationUpdate
(Maybe CompressionFormat)
(Maybe CompressionFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe CompressionFormat
compressionFormat :: Maybe CompressionFormat
$sel:compressionFormat:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe CompressionFormat
compressionFormat} -> Maybe CompressionFormat
compressionFormat) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe CompressionFormat
a -> S3DestinationUpdate
s {$sel:compressionFormat:S3DestinationUpdate' :: Maybe CompressionFormat
compressionFormat = Maybe CompressionFormat
a} :: S3DestinationUpdate)
s3DestinationUpdate_bufferingHints :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe BufferingHints)
s3DestinationUpdate_bufferingHints :: (Maybe BufferingHints -> f (Maybe BufferingHints))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_bufferingHints = (S3DestinationUpdate -> Maybe BufferingHints)
-> (S3DestinationUpdate
-> Maybe BufferingHints -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate
S3DestinationUpdate
(Maybe BufferingHints)
(Maybe BufferingHints)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe BufferingHints
bufferingHints :: Maybe BufferingHints
$sel:bufferingHints:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe BufferingHints
bufferingHints} -> Maybe BufferingHints
bufferingHints) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe BufferingHints
a -> S3DestinationUpdate
s {$sel:bufferingHints:S3DestinationUpdate' :: Maybe BufferingHints
bufferingHints = Maybe BufferingHints
a} :: S3DestinationUpdate)
s3DestinationUpdate_bucketARN :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe Prelude.Text)
s3DestinationUpdate_bucketARN :: (Maybe Text -> f (Maybe Text))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_bucketARN = (S3DestinationUpdate -> Maybe Text)
-> (S3DestinationUpdate -> Maybe Text -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate S3DestinationUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe Text
bucketARN :: Maybe Text
$sel:bucketARN:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
bucketARN} -> Maybe Text
bucketARN) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe Text
a -> S3DestinationUpdate
s {$sel:bucketARN:S3DestinationUpdate' :: Maybe Text
bucketARN = Maybe Text
a} :: S3DestinationUpdate)
s3DestinationUpdate_roleARN :: Lens.Lens' S3DestinationUpdate (Prelude.Maybe Prelude.Text)
s3DestinationUpdate_roleARN :: (Maybe Text -> f (Maybe Text))
-> S3DestinationUpdate -> f S3DestinationUpdate
s3DestinationUpdate_roleARN = (S3DestinationUpdate -> Maybe Text)
-> (S3DestinationUpdate -> Maybe Text -> S3DestinationUpdate)
-> Lens
S3DestinationUpdate S3DestinationUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3DestinationUpdate' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: S3DestinationUpdate
s@S3DestinationUpdate' {} Maybe Text
a -> S3DestinationUpdate
s {$sel:roleARN:S3DestinationUpdate' :: Maybe Text
roleARN = Maybe Text
a} :: S3DestinationUpdate)
instance Prelude.Hashable S3DestinationUpdate
instance Prelude.NFData S3DestinationUpdate
instance Core.ToJSON S3DestinationUpdate where
toJSON :: S3DestinationUpdate -> Value
toJSON S3DestinationUpdate' {Maybe Text
Maybe BufferingHints
Maybe CloudWatchLoggingOptions
Maybe CompressionFormat
Maybe EncryptionConfiguration
roleARN :: Maybe Text
bucketARN :: Maybe Text
bufferingHints :: Maybe BufferingHints
compressionFormat :: Maybe CompressionFormat
encryptionConfiguration :: Maybe EncryptionConfiguration
errorOutputPrefix :: Maybe Text
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
prefix :: Maybe Text
$sel:roleARN:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
$sel:bucketARN:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
$sel:bufferingHints:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe BufferingHints
$sel:compressionFormat:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe CompressionFormat
$sel:encryptionConfiguration:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe EncryptionConfiguration
$sel:errorOutputPrefix:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
$sel:cloudWatchLoggingOptions:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe CloudWatchLoggingOptions
$sel:prefix:S3DestinationUpdate' :: S3DestinationUpdate -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Prefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
prefix,
(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
"ErrorOutputPrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
errorOutputPrefix,
(Text
"EncryptionConfiguration" Text -> EncryptionConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EncryptionConfiguration -> Pair)
-> Maybe EncryptionConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfiguration
encryptionConfiguration,
(Text
"CompressionFormat" Text -> CompressionFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CompressionFormat -> Pair)
-> Maybe CompressionFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CompressionFormat
compressionFormat,
(Text
"BufferingHints" Text -> BufferingHints -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(BufferingHints -> Pair) -> Maybe BufferingHints -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BufferingHints
bufferingHints,
(Text
"BucketARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bucketARN,
(Text
"RoleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleARN
]
)