{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ServiceNowConnectorProfileCredentials = ServiceNowConnectorProfileCredentials'
{
ServiceNowConnectorProfileCredentials -> Text
username :: Prelude.Text,
ServiceNowConnectorProfileCredentials -> Sensitive Text
password :: Data.Sensitive Prelude.Text
}
deriving (ServiceNowConnectorProfileCredentials
-> ServiceNowConnectorProfileCredentials -> Bool
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
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.
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'
{ $sel:username:ServiceNowConnectorProfileCredentials' :: Text
username =
Text
pUsername_,
$sel:password:ServiceNowConnectorProfileCredentials' :: Sensitive Text
password =
forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pPassword_
}
serviceNowConnectorProfileCredentials_username :: Lens.Lens' ServiceNowConnectorProfileCredentials Prelude.Text
serviceNowConnectorProfileCredentials_username :: Lens' ServiceNowConnectorProfileCredentials Text
serviceNowConnectorProfileCredentials_username = 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 :: Lens' ServiceNowConnectorProfileCredentials Text
serviceNowConnectorProfileCredentials_password = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance
Prelude.Hashable
ServiceNowConnectorProfileCredentials
where
hashWithSalt :: Int -> ServiceNowConnectorProfileCredentials -> Int
hashWithSalt
Int
_salt
ServiceNowConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:ServiceNowConnectorProfileCredentials' :: ServiceNowConnectorProfileCredentials -> Sensitive Text
$sel:username:ServiceNowConnectorProfileCredentials' :: ServiceNowConnectorProfileCredentials -> 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
ServiceNowConnectorProfileCredentials
where
rnf :: ServiceNowConnectorProfileCredentials -> ()
rnf ServiceNowConnectorProfileCredentials' {Text
Sensitive Text
password :: Sensitive Text
username :: Text
$sel:password:ServiceNowConnectorProfileCredentials' :: ServiceNowConnectorProfileCredentials -> Sensitive Text
$sel:username:ServiceNowConnectorProfileCredentials' :: ServiceNowConnectorProfileCredentials -> 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
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
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)
]
)