{-# 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.SalesforceConnectorProfileCredentials where
import Amazonka.AppFlow.Types.ConnectorOAuthRequest
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SalesforceConnectorProfileCredentials = SalesforceConnectorProfileCredentials'
{
SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text)
accessToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
SalesforceConnectorProfileCredentials -> Maybe Text
refreshToken :: Prelude.Maybe Prelude.Text,
SalesforceConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
oAuthRequest :: Prelude.Maybe ConnectorOAuthRequest,
SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text)
clientCredentialsArn :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool
(SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool)
-> (SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool)
-> Eq SalesforceConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool
$c/= :: SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool
== :: SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool
$c== :: SalesforceConnectorProfileCredentials
-> SalesforceConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> SalesforceConnectorProfileCredentials -> ShowS
[SalesforceConnectorProfileCredentials] -> ShowS
SalesforceConnectorProfileCredentials -> String
(Int -> SalesforceConnectorProfileCredentials -> ShowS)
-> (SalesforceConnectorProfileCredentials -> String)
-> ([SalesforceConnectorProfileCredentials] -> ShowS)
-> Show SalesforceConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SalesforceConnectorProfileCredentials] -> ShowS
$cshowList :: [SalesforceConnectorProfileCredentials] -> ShowS
show :: SalesforceConnectorProfileCredentials -> String
$cshow :: SalesforceConnectorProfileCredentials -> String
showsPrec :: Int -> SalesforceConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> SalesforceConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
SalesforceConnectorProfileCredentials
-> Rep SalesforceConnectorProfileCredentials x)
-> (forall x.
Rep SalesforceConnectorProfileCredentials x
-> SalesforceConnectorProfileCredentials)
-> Generic SalesforceConnectorProfileCredentials
forall x.
Rep SalesforceConnectorProfileCredentials x
-> SalesforceConnectorProfileCredentials
forall x.
SalesforceConnectorProfileCredentials
-> Rep SalesforceConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SalesforceConnectorProfileCredentials x
-> SalesforceConnectorProfileCredentials
$cfrom :: forall x.
SalesforceConnectorProfileCredentials
-> Rep SalesforceConnectorProfileCredentials x
Prelude.Generic)
newSalesforceConnectorProfileCredentials ::
SalesforceConnectorProfileCredentials
newSalesforceConnectorProfileCredentials :: SalesforceConnectorProfileCredentials
newSalesforceConnectorProfileCredentials =
SalesforceConnectorProfileCredentials' :: Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ConnectorOAuthRequest
-> Maybe (Sensitive Text)
-> SalesforceConnectorProfileCredentials
SalesforceConnectorProfileCredentials'
{ $sel:accessToken:SalesforceConnectorProfileCredentials' :: Maybe (Sensitive Text)
accessToken =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:refreshToken:SalesforceConnectorProfileCredentials' :: Maybe Text
refreshToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:oAuthRequest:SalesforceConnectorProfileCredentials' :: Maybe ConnectorOAuthRequest
oAuthRequest = Maybe ConnectorOAuthRequest
forall a. Maybe a
Prelude.Nothing,
$sel:clientCredentialsArn:SalesforceConnectorProfileCredentials' :: Maybe (Sensitive Text)
clientCredentialsArn =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
salesforceConnectorProfileCredentials_accessToken :: Lens.Lens' SalesforceConnectorProfileCredentials (Prelude.Maybe Prelude.Text)
salesforceConnectorProfileCredentials_accessToken :: (Maybe Text -> f (Maybe Text))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials
salesforceConnectorProfileCredentials_accessToken = (SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text))
-> (SalesforceConnectorProfileCredentials
-> Maybe (Sensitive Text) -> SalesforceConnectorProfileCredentials)
-> Lens
SalesforceConnectorProfileCredentials
SalesforceConnectorProfileCredentials
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SalesforceConnectorProfileCredentials' {Maybe (Sensitive Text)
accessToken :: Maybe (Sensitive Text)
$sel:accessToken:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text)
accessToken} -> Maybe (Sensitive Text)
accessToken) (\s :: SalesforceConnectorProfileCredentials
s@SalesforceConnectorProfileCredentials' {} Maybe (Sensitive Text)
a -> SalesforceConnectorProfileCredentials
s {$sel:accessToken:SalesforceConnectorProfileCredentials' :: Maybe (Sensitive Text)
accessToken = Maybe (Sensitive Text)
a} :: SalesforceConnectorProfileCredentials) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
salesforceConnectorProfileCredentials_refreshToken :: Lens.Lens' SalesforceConnectorProfileCredentials (Prelude.Maybe Prelude.Text)
salesforceConnectorProfileCredentials_refreshToken :: (Maybe Text -> f (Maybe Text))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials
salesforceConnectorProfileCredentials_refreshToken = (SalesforceConnectorProfileCredentials -> Maybe Text)
-> (SalesforceConnectorProfileCredentials
-> Maybe Text -> SalesforceConnectorProfileCredentials)
-> Lens
SalesforceConnectorProfileCredentials
SalesforceConnectorProfileCredentials
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SalesforceConnectorProfileCredentials' {Maybe Text
refreshToken :: Maybe Text
$sel:refreshToken:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials -> Maybe Text
refreshToken} -> Maybe Text
refreshToken) (\s :: SalesforceConnectorProfileCredentials
s@SalesforceConnectorProfileCredentials' {} Maybe Text
a -> SalesforceConnectorProfileCredentials
s {$sel:refreshToken:SalesforceConnectorProfileCredentials' :: Maybe Text
refreshToken = Maybe Text
a} :: SalesforceConnectorProfileCredentials)
salesforceConnectorProfileCredentials_oAuthRequest :: Lens.Lens' SalesforceConnectorProfileCredentials (Prelude.Maybe ConnectorOAuthRequest)
salesforceConnectorProfileCredentials_oAuthRequest :: (Maybe ConnectorOAuthRequest -> f (Maybe ConnectorOAuthRequest))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials
salesforceConnectorProfileCredentials_oAuthRequest = (SalesforceConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest)
-> (SalesforceConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
-> SalesforceConnectorProfileCredentials)
-> Lens
SalesforceConnectorProfileCredentials
SalesforceConnectorProfileCredentials
(Maybe ConnectorOAuthRequest)
(Maybe ConnectorOAuthRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SalesforceConnectorProfileCredentials' {Maybe ConnectorOAuthRequest
oAuthRequest :: Maybe ConnectorOAuthRequest
$sel:oAuthRequest:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
oAuthRequest} -> Maybe ConnectorOAuthRequest
oAuthRequest) (\s :: SalesforceConnectorProfileCredentials
s@SalesforceConnectorProfileCredentials' {} Maybe ConnectorOAuthRequest
a -> SalesforceConnectorProfileCredentials
s {$sel:oAuthRequest:SalesforceConnectorProfileCredentials' :: Maybe ConnectorOAuthRequest
oAuthRequest = Maybe ConnectorOAuthRequest
a} :: SalesforceConnectorProfileCredentials)
salesforceConnectorProfileCredentials_clientCredentialsArn :: Lens.Lens' SalesforceConnectorProfileCredentials (Prelude.Maybe Prelude.Text)
salesforceConnectorProfileCredentials_clientCredentialsArn :: (Maybe Text -> f (Maybe Text))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials
salesforceConnectorProfileCredentials_clientCredentialsArn = (SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text))
-> (SalesforceConnectorProfileCredentials
-> Maybe (Sensitive Text) -> SalesforceConnectorProfileCredentials)
-> Lens
SalesforceConnectorProfileCredentials
SalesforceConnectorProfileCredentials
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SalesforceConnectorProfileCredentials' {Maybe (Sensitive Text)
clientCredentialsArn :: Maybe (Sensitive Text)
$sel:clientCredentialsArn:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text)
clientCredentialsArn} -> Maybe (Sensitive Text)
clientCredentialsArn) (\s :: SalesforceConnectorProfileCredentials
s@SalesforceConnectorProfileCredentials' {} Maybe (Sensitive Text)
a -> SalesforceConnectorProfileCredentials
s {$sel:clientCredentialsArn:SalesforceConnectorProfileCredentials' :: Maybe (Sensitive Text)
clientCredentialsArn = Maybe (Sensitive Text)
a} :: SalesforceConnectorProfileCredentials) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SalesforceConnectorProfileCredentials
-> f SalesforceConnectorProfileCredentials
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance
Prelude.Hashable
SalesforceConnectorProfileCredentials
instance
Prelude.NFData
SalesforceConnectorProfileCredentials
instance
Core.ToJSON
SalesforceConnectorProfileCredentials
where
toJSON :: SalesforceConnectorProfileCredentials -> Value
toJSON SalesforceConnectorProfileCredentials' {Maybe Text
Maybe (Sensitive Text)
Maybe ConnectorOAuthRequest
clientCredentialsArn :: Maybe (Sensitive Text)
oAuthRequest :: Maybe ConnectorOAuthRequest
refreshToken :: Maybe Text
accessToken :: Maybe (Sensitive Text)
$sel:clientCredentialsArn:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text)
$sel:oAuthRequest:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
$sel:refreshToken:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials -> Maybe Text
$sel:accessToken:SalesforceConnectorProfileCredentials' :: SalesforceConnectorProfileCredentials -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"accessToken" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
accessToken,
(Text
"refreshToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
refreshToken,
(Text
"oAuthRequest" Text -> ConnectorOAuthRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ConnectorOAuthRequest -> Pair)
-> Maybe ConnectorOAuthRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorOAuthRequest
oAuthRequest,
(Text
"clientCredentialsArn" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
clientCredentialsArn
]
)