{-# 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.VeevaConnectorProfileCredentials where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VeevaConnectorProfileCredentials = VeevaConnectorProfileCredentials'
{
VeevaConnectorProfileCredentials -> Text
username :: Prelude.Text,
VeevaConnectorProfileCredentials -> Sensitive Text
password :: Core.Sensitive Prelude.Text
}
deriving (VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool
(VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool)
-> (VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool)
-> Eq VeevaConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool
$c/= :: VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool
== :: VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool
$c== :: VeevaConnectorProfileCredentials
-> VeevaConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> VeevaConnectorProfileCredentials -> ShowS
[VeevaConnectorProfileCredentials] -> ShowS
VeevaConnectorProfileCredentials -> String
(Int -> VeevaConnectorProfileCredentials -> ShowS)
-> (VeevaConnectorProfileCredentials -> String)
-> ([VeevaConnectorProfileCredentials] -> ShowS)
-> Show VeevaConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VeevaConnectorProfileCredentials] -> ShowS
$cshowList :: [VeevaConnectorProfileCredentials] -> ShowS
show :: VeevaConnectorProfileCredentials -> String
$cshow :: VeevaConnectorProfileCredentials -> String
showsPrec :: Int -> VeevaConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> VeevaConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
VeevaConnectorProfileCredentials
-> Rep VeevaConnectorProfileCredentials x)
-> (forall x.
Rep VeevaConnectorProfileCredentials x
-> VeevaConnectorProfileCredentials)
-> Generic VeevaConnectorProfileCredentials
forall x.
Rep VeevaConnectorProfileCredentials x
-> VeevaConnectorProfileCredentials
forall x.
VeevaConnectorProfileCredentials
-> Rep VeevaConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VeevaConnectorProfileCredentials x
-> VeevaConnectorProfileCredentials
$cfrom :: forall x.
VeevaConnectorProfileCredentials
-> Rep VeevaConnectorProfileCredentials x
Prelude.Generic)
newVeevaConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
VeevaConnectorProfileCredentials
newVeevaConnectorProfileCredentials :: Text -> Text -> VeevaConnectorProfileCredentials
newVeevaConnectorProfileCredentials
Text
pUsername_
Text
pPassword_ =
VeevaConnectorProfileCredentials' :: Text -> Sensitive Text -> VeevaConnectorProfileCredentials
VeevaConnectorProfileCredentials'
{ $sel:username:VeevaConnectorProfileCredentials' :: Text
username =
Text
pUsername_,
$sel:password:VeevaConnectorProfileCredentials' :: 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_
}
veevaConnectorProfileCredentials_username :: Lens.Lens' VeevaConnectorProfileCredentials Prelude.Text
veevaConnectorProfileCredentials_username :: (Text -> f Text)
-> VeevaConnectorProfileCredentials
-> f VeevaConnectorProfileCredentials
veevaConnectorProfileCredentials_username = (VeevaConnectorProfileCredentials -> Text)
-> (VeevaConnectorProfileCredentials
-> Text -> VeevaConnectorProfileCredentials)
-> Lens
VeevaConnectorProfileCredentials
VeevaConnectorProfileCredentials
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VeevaConnectorProfileCredentials' {Text
username :: Text
$sel:username:VeevaConnectorProfileCredentials' :: VeevaConnectorProfileCredentials -> Text
username} -> Text
username) (\s :: VeevaConnectorProfileCredentials
s@VeevaConnectorProfileCredentials' {} Text
a -> VeevaConnectorProfileCredentials
s {$sel:username:VeevaConnectorProfileCredentials' :: Text
username = Text
a} :: VeevaConnectorProfileCredentials)
veevaConnectorProfileCredentials_password :: Lens.Lens' VeevaConnectorProfileCredentials Prelude.Text
veevaConnectorProfileCredentials_password :: (Text -> f Text)
-> VeevaConnectorProfileCredentials
-> f VeevaConnectorProfileCredentials
veevaConnectorProfileCredentials_password = (VeevaConnectorProfileCredentials -> Sensitive Text)
-> (VeevaConnectorProfileCredentials
-> Sensitive Text -> VeevaConnectorProfileCredentials)
-> Lens
VeevaConnectorProfileCredentials
VeevaConnectorProfileCredentials
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VeevaConnectorProfileCredentials' {Sensitive Text
password :: Sensitive Text
$sel:password:VeevaConnectorProfileCredentials' :: VeevaConnectorProfileCredentials -> Sensitive Text
password} -> Sensitive Text
password) (\s :: VeevaConnectorProfileCredentials
s@VeevaConnectorProfileCredentials' {} Sensitive Text
a -> VeevaConnectorProfileCredentials
s {$sel:password:VeevaConnectorProfileCredentials' :: Sensitive Text
password = Sensitive Text
a} :: VeevaConnectorProfileCredentials) ((Sensitive Text -> f (Sensitive Text))
-> VeevaConnectorProfileCredentials
-> f VeevaConnectorProfileCredentials)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> VeevaConnectorProfileCredentials
-> f VeevaConnectorProfileCredentials
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
VeevaConnectorProfileCredentials
instance
Prelude.NFData
VeevaConnectorProfileCredentials
instance Core.ToJSON VeevaConnectorProfileCredentials where
toJSON :: VeevaConnectorProfileCredentials -> Value
toJSON VeevaConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:VeevaConnectorProfileCredentials' :: VeevaConnectorProfileCredentials -> Sensitive Text
$sel:username:VeevaConnectorProfileCredentials' :: VeevaConnectorProfileCredentials -> 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)
]
)