{-# 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.SnowflakeConnectorProfileCredentials where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SnowflakeConnectorProfileCredentials = SnowflakeConnectorProfileCredentials'
{
SnowflakeConnectorProfileCredentials -> Text
username :: Prelude.Text,
SnowflakeConnectorProfileCredentials -> Sensitive Text
password :: Data.Sensitive Prelude.Text
}
deriving (SnowflakeConnectorProfileCredentials
-> SnowflakeConnectorProfileCredentials -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnowflakeConnectorProfileCredentials
-> SnowflakeConnectorProfileCredentials -> Bool
$c/= :: SnowflakeConnectorProfileCredentials
-> SnowflakeConnectorProfileCredentials -> Bool
== :: SnowflakeConnectorProfileCredentials
-> SnowflakeConnectorProfileCredentials -> Bool
$c== :: SnowflakeConnectorProfileCredentials
-> SnowflakeConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> SnowflakeConnectorProfileCredentials -> ShowS
[SnowflakeConnectorProfileCredentials] -> ShowS
SnowflakeConnectorProfileCredentials -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnowflakeConnectorProfileCredentials] -> ShowS
$cshowList :: [SnowflakeConnectorProfileCredentials] -> ShowS
show :: SnowflakeConnectorProfileCredentials -> String
$cshow :: SnowflakeConnectorProfileCredentials -> String
showsPrec :: Int -> SnowflakeConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> SnowflakeConnectorProfileCredentials -> ShowS
Prelude.Show, forall x.
Rep SnowflakeConnectorProfileCredentials x
-> SnowflakeConnectorProfileCredentials
forall x.
SnowflakeConnectorProfileCredentials
-> Rep SnowflakeConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SnowflakeConnectorProfileCredentials x
-> SnowflakeConnectorProfileCredentials
$cfrom :: forall x.
SnowflakeConnectorProfileCredentials
-> Rep SnowflakeConnectorProfileCredentials x
Prelude.Generic)
newSnowflakeConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
SnowflakeConnectorProfileCredentials
newSnowflakeConnectorProfileCredentials :: Text -> Text -> SnowflakeConnectorProfileCredentials
newSnowflakeConnectorProfileCredentials
Text
pUsername_
Text
pPassword_ =
SnowflakeConnectorProfileCredentials'
{ $sel:username:SnowflakeConnectorProfileCredentials' :: Text
username =
Text
pUsername_,
$sel:password:SnowflakeConnectorProfileCredentials' :: Sensitive Text
password =
forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pPassword_
}
snowflakeConnectorProfileCredentials_username :: Lens.Lens' SnowflakeConnectorProfileCredentials Prelude.Text
snowflakeConnectorProfileCredentials_username :: Lens' SnowflakeConnectorProfileCredentials Text
snowflakeConnectorProfileCredentials_username = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileCredentials' {Text
username :: Text
$sel:username:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Text
username} -> Text
username) (\s :: SnowflakeConnectorProfileCredentials
s@SnowflakeConnectorProfileCredentials' {} Text
a -> SnowflakeConnectorProfileCredentials
s {$sel:username:SnowflakeConnectorProfileCredentials' :: Text
username = Text
a} :: SnowflakeConnectorProfileCredentials)
snowflakeConnectorProfileCredentials_password :: Lens.Lens' SnowflakeConnectorProfileCredentials Prelude.Text
snowflakeConnectorProfileCredentials_password :: Lens' SnowflakeConnectorProfileCredentials Text
snowflakeConnectorProfileCredentials_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileCredentials' {Sensitive Text
password :: Sensitive Text
$sel:password:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Sensitive Text
password} -> Sensitive Text
password) (\s :: SnowflakeConnectorProfileCredentials
s@SnowflakeConnectorProfileCredentials' {} Sensitive Text
a -> SnowflakeConnectorProfileCredentials
s {$sel:password:SnowflakeConnectorProfileCredentials' :: Sensitive Text
password = Sensitive Text
a} :: SnowflakeConnectorProfileCredentials) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance
Prelude.Hashable
SnowflakeConnectorProfileCredentials
where
hashWithSalt :: Int -> SnowflakeConnectorProfileCredentials -> Int
hashWithSalt
Int
_salt
SnowflakeConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Sensitive Text
$sel:username:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
username
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
password
instance
Prelude.NFData
SnowflakeConnectorProfileCredentials
where
rnf :: SnowflakeConnectorProfileCredentials -> ()
rnf SnowflakeConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Sensitive Text
$sel:username:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
username
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
password
instance
Data.ToJSON
SnowflakeConnectorProfileCredentials
where
toJSON :: SnowflakeConnectorProfileCredentials -> Value
toJSON SnowflakeConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Sensitive Text
$sel:username:SnowflakeConnectorProfileCredentials' :: SnowflakeConnectorProfileCredentials -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"username" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
username),
forall a. a -> Maybe a
Prelude.Just (Key
"password" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
password)
]
)