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