{-# 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.AppFlow.Types.RedshiftConnectorProfileCredentials where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RedshiftConnectorProfileCredentials = RedshiftConnectorProfileCredentials'
{
RedshiftConnectorProfileCredentials -> Text
username :: Prelude.Text,
RedshiftConnectorProfileCredentials -> Sensitive Text
password :: Core.Sensitive Prelude.Text
}
deriving (RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool
(RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool)
-> (RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool)
-> Eq RedshiftConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool
$c/= :: RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool
== :: RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool
$c== :: RedshiftConnectorProfileCredentials
-> RedshiftConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> RedshiftConnectorProfileCredentials -> ShowS
[RedshiftConnectorProfileCredentials] -> ShowS
RedshiftConnectorProfileCredentials -> String
(Int -> RedshiftConnectorProfileCredentials -> ShowS)
-> (RedshiftConnectorProfileCredentials -> String)
-> ([RedshiftConnectorProfileCredentials] -> ShowS)
-> Show RedshiftConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedshiftConnectorProfileCredentials] -> ShowS
$cshowList :: [RedshiftConnectorProfileCredentials] -> ShowS
show :: RedshiftConnectorProfileCredentials -> String
$cshow :: RedshiftConnectorProfileCredentials -> String
showsPrec :: Int -> RedshiftConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> RedshiftConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
RedshiftConnectorProfileCredentials
-> Rep RedshiftConnectorProfileCredentials x)
-> (forall x.
Rep RedshiftConnectorProfileCredentials x
-> RedshiftConnectorProfileCredentials)
-> Generic RedshiftConnectorProfileCredentials
forall x.
Rep RedshiftConnectorProfileCredentials x
-> RedshiftConnectorProfileCredentials
forall x.
RedshiftConnectorProfileCredentials
-> Rep RedshiftConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RedshiftConnectorProfileCredentials x
-> RedshiftConnectorProfileCredentials
$cfrom :: forall x.
RedshiftConnectorProfileCredentials
-> Rep RedshiftConnectorProfileCredentials x
Prelude.Generic)
newRedshiftConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
RedshiftConnectorProfileCredentials
newRedshiftConnectorProfileCredentials :: Text -> Text -> RedshiftConnectorProfileCredentials
newRedshiftConnectorProfileCredentials
Text
pUsername_
Text
pPassword_ =
RedshiftConnectorProfileCredentials' :: Text -> Sensitive Text -> RedshiftConnectorProfileCredentials
RedshiftConnectorProfileCredentials'
{ $sel:username:RedshiftConnectorProfileCredentials' :: Text
username =
Text
pUsername_,
$sel:password:RedshiftConnectorProfileCredentials' :: 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_
}
redshiftConnectorProfileCredentials_username :: Lens.Lens' RedshiftConnectorProfileCredentials Prelude.Text
redshiftConnectorProfileCredentials_username :: (Text -> f Text)
-> RedshiftConnectorProfileCredentials
-> f RedshiftConnectorProfileCredentials
redshiftConnectorProfileCredentials_username = (RedshiftConnectorProfileCredentials -> Text)
-> (RedshiftConnectorProfileCredentials
-> Text -> RedshiftConnectorProfileCredentials)
-> Lens
RedshiftConnectorProfileCredentials
RedshiftConnectorProfileCredentials
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileCredentials' {Text
username :: Text
$sel:username:RedshiftConnectorProfileCredentials' :: RedshiftConnectorProfileCredentials -> Text
username} -> Text
username) (\s :: RedshiftConnectorProfileCredentials
s@RedshiftConnectorProfileCredentials' {} Text
a -> RedshiftConnectorProfileCredentials
s {$sel:username:RedshiftConnectorProfileCredentials' :: Text
username = Text
a} :: RedshiftConnectorProfileCredentials)
redshiftConnectorProfileCredentials_password :: Lens.Lens' RedshiftConnectorProfileCredentials Prelude.Text
redshiftConnectorProfileCredentials_password :: (Text -> f Text)
-> RedshiftConnectorProfileCredentials
-> f RedshiftConnectorProfileCredentials
redshiftConnectorProfileCredentials_password = (RedshiftConnectorProfileCredentials -> Sensitive Text)
-> (RedshiftConnectorProfileCredentials
-> Sensitive Text -> RedshiftConnectorProfileCredentials)
-> Lens
RedshiftConnectorProfileCredentials
RedshiftConnectorProfileCredentials
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileCredentials' {Sensitive Text
password :: Sensitive Text
$sel:password:RedshiftConnectorProfileCredentials' :: RedshiftConnectorProfileCredentials -> Sensitive Text
password} -> Sensitive Text
password) (\s :: RedshiftConnectorProfileCredentials
s@RedshiftConnectorProfileCredentials' {} Sensitive Text
a -> RedshiftConnectorProfileCredentials
s {$sel:password:RedshiftConnectorProfileCredentials' :: Sensitive Text
password = Sensitive Text
a} :: RedshiftConnectorProfileCredentials) ((Sensitive Text -> f (Sensitive Text))
-> RedshiftConnectorProfileCredentials
-> f RedshiftConnectorProfileCredentials)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> RedshiftConnectorProfileCredentials
-> f RedshiftConnectorProfileCredentials
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
instance
Prelude.Hashable
RedshiftConnectorProfileCredentials
instance
Prelude.NFData
RedshiftConnectorProfileCredentials
instance
Core.ToJSON
RedshiftConnectorProfileCredentials
where
toJSON :: RedshiftConnectorProfileCredentials -> Value
toJSON RedshiftConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:RedshiftConnectorProfileCredentials' :: RedshiftConnectorProfileCredentials -> Sensitive Text
$sel:username:RedshiftConnectorProfileCredentials' :: RedshiftConnectorProfileCredentials -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"username" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= 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)
]
)