{-# 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.RedshiftDestinationConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.CloudWatchLoggingOptions
import Amazonka.Firehose.Types.CopyCommand
import Amazonka.Firehose.Types.ProcessingConfiguration
import Amazonka.Firehose.Types.RedshiftRetryOptions
import Amazonka.Firehose.Types.RedshiftS3BackupMode
import Amazonka.Firehose.Types.S3DestinationConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RedshiftDestinationConfiguration = RedshiftDestinationConfiguration'
{
RedshiftDestinationConfiguration -> Maybe RedshiftS3BackupMode
s3BackupMode :: Prelude.Maybe RedshiftS3BackupMode,
RedshiftDestinationConfiguration -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Prelude.Maybe CloudWatchLoggingOptions,
RedshiftDestinationConfiguration
-> Maybe S3DestinationConfiguration
s3BackupConfiguration :: Prelude.Maybe S3DestinationConfiguration,
RedshiftDestinationConfiguration -> Maybe RedshiftRetryOptions
retryOptions :: Prelude.Maybe RedshiftRetryOptions,
RedshiftDestinationConfiguration -> Maybe ProcessingConfiguration
processingConfiguration :: Prelude.Maybe ProcessingConfiguration,
RedshiftDestinationConfiguration -> Text
roleARN :: Prelude.Text,
RedshiftDestinationConfiguration -> Text
clusterJDBCURL :: Prelude.Text,
RedshiftDestinationConfiguration -> CopyCommand
copyCommand :: CopyCommand,
RedshiftDestinationConfiguration -> Sensitive Text
username :: Core.Sensitive Prelude.Text,
RedshiftDestinationConfiguration -> Sensitive Text
password :: Core.Sensitive Prelude.Text,
RedshiftDestinationConfiguration -> S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
}
deriving (RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool
(RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool)
-> (RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool)
-> Eq RedshiftDestinationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool
$c/= :: RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool
== :: RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool
$c== :: RedshiftDestinationConfiguration
-> RedshiftDestinationConfiguration -> Bool
Prelude.Eq, Int -> RedshiftDestinationConfiguration -> ShowS
[RedshiftDestinationConfiguration] -> ShowS
RedshiftDestinationConfiguration -> String
(Int -> RedshiftDestinationConfiguration -> ShowS)
-> (RedshiftDestinationConfiguration -> String)
-> ([RedshiftDestinationConfiguration] -> ShowS)
-> Show RedshiftDestinationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedshiftDestinationConfiguration] -> ShowS
$cshowList :: [RedshiftDestinationConfiguration] -> ShowS
show :: RedshiftDestinationConfiguration -> String
$cshow :: RedshiftDestinationConfiguration -> String
showsPrec :: Int -> RedshiftDestinationConfiguration -> ShowS
$cshowsPrec :: Int -> RedshiftDestinationConfiguration -> ShowS
Prelude.Show, (forall x.
RedshiftDestinationConfiguration
-> Rep RedshiftDestinationConfiguration x)
-> (forall x.
Rep RedshiftDestinationConfiguration x
-> RedshiftDestinationConfiguration)
-> Generic RedshiftDestinationConfiguration
forall x.
Rep RedshiftDestinationConfiguration x
-> RedshiftDestinationConfiguration
forall x.
RedshiftDestinationConfiguration
-> Rep RedshiftDestinationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RedshiftDestinationConfiguration x
-> RedshiftDestinationConfiguration
$cfrom :: forall x.
RedshiftDestinationConfiguration
-> Rep RedshiftDestinationConfiguration x
Prelude.Generic)
newRedshiftDestinationConfiguration ::
Prelude.Text ->
Prelude.Text ->
CopyCommand ->
Prelude.Text ->
Prelude.Text ->
S3DestinationConfiguration ->
RedshiftDestinationConfiguration
newRedshiftDestinationConfiguration :: Text
-> Text
-> CopyCommand
-> Text
-> Text
-> S3DestinationConfiguration
-> RedshiftDestinationConfiguration
newRedshiftDestinationConfiguration
Text
pRoleARN_
Text
pClusterJDBCURL_
CopyCommand
pCopyCommand_
Text
pUsername_
Text
pPassword_
S3DestinationConfiguration
pS3Configuration_ =
RedshiftDestinationConfiguration' :: Maybe RedshiftS3BackupMode
-> Maybe CloudWatchLoggingOptions
-> Maybe S3DestinationConfiguration
-> Maybe RedshiftRetryOptions
-> Maybe ProcessingConfiguration
-> Text
-> Text
-> CopyCommand
-> Sensitive Text
-> Sensitive Text
-> S3DestinationConfiguration
-> RedshiftDestinationConfiguration
RedshiftDestinationConfiguration'
{ $sel:s3BackupMode:RedshiftDestinationConfiguration' :: Maybe RedshiftS3BackupMode
s3BackupMode =
Maybe RedshiftS3BackupMode
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLoggingOptions:RedshiftDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions =
Maybe CloudWatchLoggingOptions
forall a. Maybe a
Prelude.Nothing,
$sel:s3BackupConfiguration:RedshiftDestinationConfiguration' :: Maybe S3DestinationConfiguration
s3BackupConfiguration = Maybe S3DestinationConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:retryOptions:RedshiftDestinationConfiguration' :: Maybe RedshiftRetryOptions
retryOptions = Maybe RedshiftRetryOptions
forall a. Maybe a
Prelude.Nothing,
$sel:processingConfiguration:RedshiftDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:RedshiftDestinationConfiguration' :: Text
roleARN = Text
pRoleARN_,
$sel:clusterJDBCURL:RedshiftDestinationConfiguration' :: Text
clusterJDBCURL = Text
pClusterJDBCURL_,
$sel:copyCommand:RedshiftDestinationConfiguration' :: CopyCommand
copyCommand = CopyCommand
pCopyCommand_,
$sel:username:RedshiftDestinationConfiguration' :: Sensitive Text
username =
Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pUsername_,
$sel:password:RedshiftDestinationConfiguration' :: Sensitive Text
password =
Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pPassword_,
$sel:s3Configuration:RedshiftDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
pS3Configuration_
}
redshiftDestinationConfiguration_s3BackupMode :: Lens.Lens' RedshiftDestinationConfiguration (Prelude.Maybe RedshiftS3BackupMode)
redshiftDestinationConfiguration_s3BackupMode :: (Maybe RedshiftS3BackupMode -> f (Maybe RedshiftS3BackupMode))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_s3BackupMode = (RedshiftDestinationConfiguration -> Maybe RedshiftS3BackupMode)
-> (RedshiftDestinationConfiguration
-> Maybe RedshiftS3BackupMode -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Maybe RedshiftS3BackupMode)
(Maybe RedshiftS3BackupMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Maybe RedshiftS3BackupMode
s3BackupMode :: Maybe RedshiftS3BackupMode
$sel:s3BackupMode:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe RedshiftS3BackupMode
s3BackupMode} -> Maybe RedshiftS3BackupMode
s3BackupMode) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Maybe RedshiftS3BackupMode
a -> RedshiftDestinationConfiguration
s {$sel:s3BackupMode:RedshiftDestinationConfiguration' :: Maybe RedshiftS3BackupMode
s3BackupMode = Maybe RedshiftS3BackupMode
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_cloudWatchLoggingOptions :: Lens.Lens' RedshiftDestinationConfiguration (Prelude.Maybe CloudWatchLoggingOptions)
redshiftDestinationConfiguration_cloudWatchLoggingOptions :: (Maybe CloudWatchLoggingOptions
-> f (Maybe CloudWatchLoggingOptions))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_cloudWatchLoggingOptions = (RedshiftDestinationConfiguration
-> Maybe CloudWatchLoggingOptions)
-> (RedshiftDestinationConfiguration
-> Maybe CloudWatchLoggingOptions
-> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Maybe CloudWatchLoggingOptions)
(Maybe CloudWatchLoggingOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
$sel:cloudWatchLoggingOptions:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions} -> Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Maybe CloudWatchLoggingOptions
a -> RedshiftDestinationConfiguration
s {$sel:cloudWatchLoggingOptions:RedshiftDestinationConfiguration' :: Maybe CloudWatchLoggingOptions
cloudWatchLoggingOptions = Maybe CloudWatchLoggingOptions
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_s3BackupConfiguration :: Lens.Lens' RedshiftDestinationConfiguration (Prelude.Maybe S3DestinationConfiguration)
redshiftDestinationConfiguration_s3BackupConfiguration :: (Maybe S3DestinationConfiguration
-> f (Maybe S3DestinationConfiguration))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_s3BackupConfiguration = (RedshiftDestinationConfiguration
-> Maybe S3DestinationConfiguration)
-> (RedshiftDestinationConfiguration
-> Maybe S3DestinationConfiguration
-> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Maybe S3DestinationConfiguration)
(Maybe S3DestinationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Maybe S3DestinationConfiguration
s3BackupConfiguration :: Maybe S3DestinationConfiguration
$sel:s3BackupConfiguration:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration
-> Maybe S3DestinationConfiguration
s3BackupConfiguration} -> Maybe S3DestinationConfiguration
s3BackupConfiguration) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Maybe S3DestinationConfiguration
a -> RedshiftDestinationConfiguration
s {$sel:s3BackupConfiguration:RedshiftDestinationConfiguration' :: Maybe S3DestinationConfiguration
s3BackupConfiguration = Maybe S3DestinationConfiguration
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_retryOptions :: Lens.Lens' RedshiftDestinationConfiguration (Prelude.Maybe RedshiftRetryOptions)
redshiftDestinationConfiguration_retryOptions :: (Maybe RedshiftRetryOptions -> f (Maybe RedshiftRetryOptions))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_retryOptions = (RedshiftDestinationConfiguration -> Maybe RedshiftRetryOptions)
-> (RedshiftDestinationConfiguration
-> Maybe RedshiftRetryOptions -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Maybe RedshiftRetryOptions)
(Maybe RedshiftRetryOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Maybe RedshiftRetryOptions
retryOptions :: Maybe RedshiftRetryOptions
$sel:retryOptions:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe RedshiftRetryOptions
retryOptions} -> Maybe RedshiftRetryOptions
retryOptions) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Maybe RedshiftRetryOptions
a -> RedshiftDestinationConfiguration
s {$sel:retryOptions:RedshiftDestinationConfiguration' :: Maybe RedshiftRetryOptions
retryOptions = Maybe RedshiftRetryOptions
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_processingConfiguration :: Lens.Lens' RedshiftDestinationConfiguration (Prelude.Maybe ProcessingConfiguration)
redshiftDestinationConfiguration_processingConfiguration :: (Maybe ProcessingConfiguration
-> f (Maybe ProcessingConfiguration))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_processingConfiguration = (RedshiftDestinationConfiguration -> Maybe ProcessingConfiguration)
-> (RedshiftDestinationConfiguration
-> Maybe ProcessingConfiguration
-> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Maybe ProcessingConfiguration)
(Maybe ProcessingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Maybe ProcessingConfiguration
processingConfiguration :: Maybe ProcessingConfiguration
$sel:processingConfiguration:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe ProcessingConfiguration
processingConfiguration} -> Maybe ProcessingConfiguration
processingConfiguration) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Maybe ProcessingConfiguration
a -> RedshiftDestinationConfiguration
s {$sel:processingConfiguration:RedshiftDestinationConfiguration' :: Maybe ProcessingConfiguration
processingConfiguration = Maybe ProcessingConfiguration
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_roleARN :: Lens.Lens' RedshiftDestinationConfiguration Prelude.Text
redshiftDestinationConfiguration_roleARN :: (Text -> f Text)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_roleARN = (RedshiftDestinationConfiguration -> Text)
-> (RedshiftDestinationConfiguration
-> Text -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Text
roleARN :: Text
$sel:roleARN:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Text
roleARN} -> Text
roleARN) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Text
a -> RedshiftDestinationConfiguration
s {$sel:roleARN:RedshiftDestinationConfiguration' :: Text
roleARN = Text
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_clusterJDBCURL :: Lens.Lens' RedshiftDestinationConfiguration Prelude.Text
redshiftDestinationConfiguration_clusterJDBCURL :: (Text -> f Text)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_clusterJDBCURL = (RedshiftDestinationConfiguration -> Text)
-> (RedshiftDestinationConfiguration
-> Text -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Text
clusterJDBCURL :: Text
$sel:clusterJDBCURL:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Text
clusterJDBCURL} -> Text
clusterJDBCURL) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Text
a -> RedshiftDestinationConfiguration
s {$sel:clusterJDBCURL:RedshiftDestinationConfiguration' :: Text
clusterJDBCURL = Text
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_copyCommand :: Lens.Lens' RedshiftDestinationConfiguration CopyCommand
redshiftDestinationConfiguration_copyCommand :: (CopyCommand -> f CopyCommand)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_copyCommand = (RedshiftDestinationConfiguration -> CopyCommand)
-> (RedshiftDestinationConfiguration
-> CopyCommand -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
CopyCommand
CopyCommand
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {CopyCommand
copyCommand :: CopyCommand
$sel:copyCommand:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> CopyCommand
copyCommand} -> CopyCommand
copyCommand) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} CopyCommand
a -> RedshiftDestinationConfiguration
s {$sel:copyCommand:RedshiftDestinationConfiguration' :: CopyCommand
copyCommand = CopyCommand
a} :: RedshiftDestinationConfiguration)
redshiftDestinationConfiguration_username :: Lens.Lens' RedshiftDestinationConfiguration Prelude.Text
redshiftDestinationConfiguration_username :: (Text -> f Text)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_username = (RedshiftDestinationConfiguration -> Sensitive Text)
-> (RedshiftDestinationConfiguration
-> Sensitive Text -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Sensitive Text
username :: Sensitive Text
$sel:username:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Sensitive Text
username} -> Sensitive Text
username) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Sensitive Text
a -> RedshiftDestinationConfiguration
s {$sel:username:RedshiftDestinationConfiguration' :: Sensitive Text
username = Sensitive Text
a} :: RedshiftDestinationConfiguration) ((Sensitive Text -> f (Sensitive Text))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
redshiftDestinationConfiguration_password :: Lens.Lens' RedshiftDestinationConfiguration Prelude.Text
redshiftDestinationConfiguration_password :: (Text -> f Text)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_password = (RedshiftDestinationConfiguration -> Sensitive Text)
-> (RedshiftDestinationConfiguration
-> Sensitive Text -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {Sensitive Text
password :: Sensitive Text
$sel:password:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Sensitive Text
password} -> Sensitive Text
password) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} Sensitive Text
a -> RedshiftDestinationConfiguration
s {$sel:password:RedshiftDestinationConfiguration' :: Sensitive Text
password = Sensitive Text
a} :: RedshiftDestinationConfiguration) ((Sensitive Text -> f (Sensitive Text))
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
redshiftDestinationConfiguration_s3Configuration :: Lens.Lens' RedshiftDestinationConfiguration S3DestinationConfiguration
redshiftDestinationConfiguration_s3Configuration :: (S3DestinationConfiguration -> f S3DestinationConfiguration)
-> RedshiftDestinationConfiguration
-> f RedshiftDestinationConfiguration
redshiftDestinationConfiguration_s3Configuration = (RedshiftDestinationConfiguration -> S3DestinationConfiguration)
-> (RedshiftDestinationConfiguration
-> S3DestinationConfiguration -> RedshiftDestinationConfiguration)
-> Lens
RedshiftDestinationConfiguration
RedshiftDestinationConfiguration
S3DestinationConfiguration
S3DestinationConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftDestinationConfiguration' {S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
$sel:s3Configuration:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> S3DestinationConfiguration
s3Configuration} -> S3DestinationConfiguration
s3Configuration) (\s :: RedshiftDestinationConfiguration
s@RedshiftDestinationConfiguration' {} S3DestinationConfiguration
a -> RedshiftDestinationConfiguration
s {$sel:s3Configuration:RedshiftDestinationConfiguration' :: S3DestinationConfiguration
s3Configuration = S3DestinationConfiguration
a} :: RedshiftDestinationConfiguration)
instance
Prelude.Hashable
RedshiftDestinationConfiguration
instance
Prelude.NFData
RedshiftDestinationConfiguration
instance Core.ToJSON RedshiftDestinationConfiguration where
toJSON :: RedshiftDestinationConfiguration -> Value
toJSON RedshiftDestinationConfiguration' {Maybe CloudWatchLoggingOptions
Maybe ProcessingConfiguration
Maybe RedshiftRetryOptions
Maybe RedshiftS3BackupMode
Maybe S3DestinationConfiguration
Text
Sensitive Text
CopyCommand
S3DestinationConfiguration
s3Configuration :: S3DestinationConfiguration
password :: Sensitive Text
username :: Sensitive Text
copyCommand :: CopyCommand
clusterJDBCURL :: Text
roleARN :: Text
processingConfiguration :: Maybe ProcessingConfiguration
retryOptions :: Maybe RedshiftRetryOptions
s3BackupConfiguration :: Maybe S3DestinationConfiguration
cloudWatchLoggingOptions :: Maybe CloudWatchLoggingOptions
s3BackupMode :: Maybe RedshiftS3BackupMode
$sel:s3Configuration:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> S3DestinationConfiguration
$sel:password:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Sensitive Text
$sel:username:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Sensitive Text
$sel:copyCommand:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> CopyCommand
$sel:clusterJDBCURL:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Text
$sel:roleARN:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Text
$sel:processingConfiguration:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe ProcessingConfiguration
$sel:retryOptions:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe RedshiftRetryOptions
$sel:s3BackupConfiguration:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration
-> Maybe S3DestinationConfiguration
$sel:cloudWatchLoggingOptions:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe CloudWatchLoggingOptions
$sel:s3BackupMode:RedshiftDestinationConfiguration' :: RedshiftDestinationConfiguration -> Maybe RedshiftS3BackupMode
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"S3BackupMode" Text -> RedshiftS3BackupMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RedshiftS3BackupMode -> Pair)
-> Maybe RedshiftS3BackupMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedshiftS3BackupMode
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
"S3BackupConfiguration" Text -> S3DestinationConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(S3DestinationConfiguration -> Pair)
-> Maybe S3DestinationConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DestinationConfiguration
s3BackupConfiguration,
(Text
"RetryOptions" Text -> RedshiftRetryOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RedshiftRetryOptions -> Pair)
-> Maybe RedshiftRetryOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedshiftRetryOptions
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
"RoleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleARN),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ClusterJDBCURL" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clusterJDBCURL),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"CopyCommand" Text -> CopyCommand -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CopyCommand
copyCommand),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Username" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
username),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
password),
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)
]
)