{-# 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.GoogleAnalyticsConnectorProfileCredentials 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 GoogleAnalyticsConnectorProfileCredentials = GoogleAnalyticsConnectorProfileCredentials'
{
GoogleAnalyticsConnectorProfileCredentials
-> Maybe (Sensitive Text)
accessToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
GoogleAnalyticsConnectorProfileCredentials -> Maybe Text
refreshToken :: Prelude.Maybe Prelude.Text,
GoogleAnalyticsConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
oAuthRequest :: Prelude.Maybe ConnectorOAuthRequest,
GoogleAnalyticsConnectorProfileCredentials -> Text
clientId :: Prelude.Text,
GoogleAnalyticsConnectorProfileCredentials -> Sensitive Text
clientSecret :: Core.Sensitive Prelude.Text
}
deriving (GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool
(GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool)
-> (GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool)
-> Eq GoogleAnalyticsConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool
$c/= :: GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool
== :: GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool
$c== :: GoogleAnalyticsConnectorProfileCredentials
-> GoogleAnalyticsConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> GoogleAnalyticsConnectorProfileCredentials -> ShowS
[GoogleAnalyticsConnectorProfileCredentials] -> ShowS
GoogleAnalyticsConnectorProfileCredentials -> String
(Int -> GoogleAnalyticsConnectorProfileCredentials -> ShowS)
-> (GoogleAnalyticsConnectorProfileCredentials -> String)
-> ([GoogleAnalyticsConnectorProfileCredentials] -> ShowS)
-> Show GoogleAnalyticsConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GoogleAnalyticsConnectorProfileCredentials] -> ShowS
$cshowList :: [GoogleAnalyticsConnectorProfileCredentials] -> ShowS
show :: GoogleAnalyticsConnectorProfileCredentials -> String
$cshow :: GoogleAnalyticsConnectorProfileCredentials -> String
showsPrec :: Int -> GoogleAnalyticsConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> GoogleAnalyticsConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
GoogleAnalyticsConnectorProfileCredentials
-> Rep GoogleAnalyticsConnectorProfileCredentials x)
-> (forall x.
Rep GoogleAnalyticsConnectorProfileCredentials x
-> GoogleAnalyticsConnectorProfileCredentials)
-> Generic GoogleAnalyticsConnectorProfileCredentials
forall x.
Rep GoogleAnalyticsConnectorProfileCredentials x
-> GoogleAnalyticsConnectorProfileCredentials
forall x.
GoogleAnalyticsConnectorProfileCredentials
-> Rep GoogleAnalyticsConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GoogleAnalyticsConnectorProfileCredentials x
-> GoogleAnalyticsConnectorProfileCredentials
$cfrom :: forall x.
GoogleAnalyticsConnectorProfileCredentials
-> Rep GoogleAnalyticsConnectorProfileCredentials x
Prelude.Generic)
newGoogleAnalyticsConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
GoogleAnalyticsConnectorProfileCredentials
newGoogleAnalyticsConnectorProfileCredentials :: Text -> Text -> GoogleAnalyticsConnectorProfileCredentials
newGoogleAnalyticsConnectorProfileCredentials
Text
pClientId_
Text
pClientSecret_ =
GoogleAnalyticsConnectorProfileCredentials' :: Maybe (Sensitive Text)
-> Maybe Text
-> Maybe ConnectorOAuthRequest
-> Text
-> Sensitive Text
-> GoogleAnalyticsConnectorProfileCredentials
GoogleAnalyticsConnectorProfileCredentials'
{ $sel:accessToken:GoogleAnalyticsConnectorProfileCredentials' :: Maybe (Sensitive Text)
accessToken =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:refreshToken:GoogleAnalyticsConnectorProfileCredentials' :: Maybe Text
refreshToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:oAuthRequest:GoogleAnalyticsConnectorProfileCredentials' :: Maybe ConnectorOAuthRequest
oAuthRequest = Maybe ConnectorOAuthRequest
forall a. Maybe a
Prelude.Nothing,
$sel:clientId:GoogleAnalyticsConnectorProfileCredentials' :: Text
clientId = Text
pClientId_,
$sel:clientSecret:GoogleAnalyticsConnectorProfileCredentials' :: Sensitive Text
clientSecret =
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
pClientSecret_
}
googleAnalyticsConnectorProfileCredentials_accessToken :: Lens.Lens' GoogleAnalyticsConnectorProfileCredentials (Prelude.Maybe Prelude.Text)
googleAnalyticsConnectorProfileCredentials_accessToken :: (Maybe Text -> f (Maybe Text))
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
googleAnalyticsConnectorProfileCredentials_accessToken = (GoogleAnalyticsConnectorProfileCredentials
-> Maybe (Sensitive Text))
-> (GoogleAnalyticsConnectorProfileCredentials
-> Maybe (Sensitive Text)
-> GoogleAnalyticsConnectorProfileCredentials)
-> Lens
GoogleAnalyticsConnectorProfileCredentials
GoogleAnalyticsConnectorProfileCredentials
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GoogleAnalyticsConnectorProfileCredentials' {Maybe (Sensitive Text)
accessToken :: Maybe (Sensitive Text)
$sel:accessToken:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials
-> Maybe (Sensitive Text)
accessToken} -> Maybe (Sensitive Text)
accessToken) (\s :: GoogleAnalyticsConnectorProfileCredentials
s@GoogleAnalyticsConnectorProfileCredentials' {} Maybe (Sensitive Text)
a -> GoogleAnalyticsConnectorProfileCredentials
s {$sel:accessToken:GoogleAnalyticsConnectorProfileCredentials' :: Maybe (Sensitive Text)
accessToken = Maybe (Sensitive Text)
a} :: GoogleAnalyticsConnectorProfileCredentials) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
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
googleAnalyticsConnectorProfileCredentials_refreshToken :: Lens.Lens' GoogleAnalyticsConnectorProfileCredentials (Prelude.Maybe Prelude.Text)
googleAnalyticsConnectorProfileCredentials_refreshToken :: (Maybe Text -> f (Maybe Text))
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
googleAnalyticsConnectorProfileCredentials_refreshToken = (GoogleAnalyticsConnectorProfileCredentials -> Maybe Text)
-> (GoogleAnalyticsConnectorProfileCredentials
-> Maybe Text -> GoogleAnalyticsConnectorProfileCredentials)
-> Lens
GoogleAnalyticsConnectorProfileCredentials
GoogleAnalyticsConnectorProfileCredentials
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GoogleAnalyticsConnectorProfileCredentials' {Maybe Text
refreshToken :: Maybe Text
$sel:refreshToken:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials -> Maybe Text
refreshToken} -> Maybe Text
refreshToken) (\s :: GoogleAnalyticsConnectorProfileCredentials
s@GoogleAnalyticsConnectorProfileCredentials' {} Maybe Text
a -> GoogleAnalyticsConnectorProfileCredentials
s {$sel:refreshToken:GoogleAnalyticsConnectorProfileCredentials' :: Maybe Text
refreshToken = Maybe Text
a} :: GoogleAnalyticsConnectorProfileCredentials)
googleAnalyticsConnectorProfileCredentials_oAuthRequest :: Lens.Lens' GoogleAnalyticsConnectorProfileCredentials (Prelude.Maybe ConnectorOAuthRequest)
googleAnalyticsConnectorProfileCredentials_oAuthRequest :: (Maybe ConnectorOAuthRequest -> f (Maybe ConnectorOAuthRequest))
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
googleAnalyticsConnectorProfileCredentials_oAuthRequest = (GoogleAnalyticsConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest)
-> (GoogleAnalyticsConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
-> GoogleAnalyticsConnectorProfileCredentials)
-> Lens
GoogleAnalyticsConnectorProfileCredentials
GoogleAnalyticsConnectorProfileCredentials
(Maybe ConnectorOAuthRequest)
(Maybe ConnectorOAuthRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GoogleAnalyticsConnectorProfileCredentials' {Maybe ConnectorOAuthRequest
oAuthRequest :: Maybe ConnectorOAuthRequest
$sel:oAuthRequest:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
oAuthRequest} -> Maybe ConnectorOAuthRequest
oAuthRequest) (\s :: GoogleAnalyticsConnectorProfileCredentials
s@GoogleAnalyticsConnectorProfileCredentials' {} Maybe ConnectorOAuthRequest
a -> GoogleAnalyticsConnectorProfileCredentials
s {$sel:oAuthRequest:GoogleAnalyticsConnectorProfileCredentials' :: Maybe ConnectorOAuthRequest
oAuthRequest = Maybe ConnectorOAuthRequest
a} :: GoogleAnalyticsConnectorProfileCredentials)
googleAnalyticsConnectorProfileCredentials_clientId :: Lens.Lens' GoogleAnalyticsConnectorProfileCredentials Prelude.Text
googleAnalyticsConnectorProfileCredentials_clientId :: (Text -> f Text)
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
googleAnalyticsConnectorProfileCredentials_clientId = (GoogleAnalyticsConnectorProfileCredentials -> Text)
-> (GoogleAnalyticsConnectorProfileCredentials
-> Text -> GoogleAnalyticsConnectorProfileCredentials)
-> Lens
GoogleAnalyticsConnectorProfileCredentials
GoogleAnalyticsConnectorProfileCredentials
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GoogleAnalyticsConnectorProfileCredentials' {Text
clientId :: Text
$sel:clientId:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials -> Text
clientId} -> Text
clientId) (\s :: GoogleAnalyticsConnectorProfileCredentials
s@GoogleAnalyticsConnectorProfileCredentials' {} Text
a -> GoogleAnalyticsConnectorProfileCredentials
s {$sel:clientId:GoogleAnalyticsConnectorProfileCredentials' :: Text
clientId = Text
a} :: GoogleAnalyticsConnectorProfileCredentials)
googleAnalyticsConnectorProfileCredentials_clientSecret :: Lens.Lens' GoogleAnalyticsConnectorProfileCredentials Prelude.Text
googleAnalyticsConnectorProfileCredentials_clientSecret :: (Text -> f Text)
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
googleAnalyticsConnectorProfileCredentials_clientSecret = (GoogleAnalyticsConnectorProfileCredentials -> Sensitive Text)
-> (GoogleAnalyticsConnectorProfileCredentials
-> Sensitive Text -> GoogleAnalyticsConnectorProfileCredentials)
-> Lens
GoogleAnalyticsConnectorProfileCredentials
GoogleAnalyticsConnectorProfileCredentials
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GoogleAnalyticsConnectorProfileCredentials' {Sensitive Text
clientSecret :: Sensitive Text
$sel:clientSecret:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials -> Sensitive Text
clientSecret} -> Sensitive Text
clientSecret) (\s :: GoogleAnalyticsConnectorProfileCredentials
s@GoogleAnalyticsConnectorProfileCredentials' {} Sensitive Text
a -> GoogleAnalyticsConnectorProfileCredentials
s {$sel:clientSecret:GoogleAnalyticsConnectorProfileCredentials' :: Sensitive Text
clientSecret = Sensitive Text
a} :: GoogleAnalyticsConnectorProfileCredentials) ((Sensitive Text -> f (Sensitive Text))
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> GoogleAnalyticsConnectorProfileCredentials
-> f GoogleAnalyticsConnectorProfileCredentials
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
GoogleAnalyticsConnectorProfileCredentials
instance
Prelude.NFData
GoogleAnalyticsConnectorProfileCredentials
instance
Core.ToJSON
GoogleAnalyticsConnectorProfileCredentials
where
toJSON :: GoogleAnalyticsConnectorProfileCredentials -> Value
toJSON
GoogleAnalyticsConnectorProfileCredentials' {Maybe Text
Maybe (Sensitive Text)
Maybe ConnectorOAuthRequest
Text
Sensitive Text
clientSecret :: Sensitive Text
clientId :: Text
oAuthRequest :: Maybe ConnectorOAuthRequest
refreshToken :: Maybe Text
accessToken :: Maybe (Sensitive Text)
$sel:clientSecret:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials -> Sensitive Text
$sel:clientId:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials -> Text
$sel:oAuthRequest:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials
-> Maybe ConnectorOAuthRequest
$sel:refreshToken:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials -> Maybe Text
$sel:accessToken:GoogleAnalyticsConnectorProfileCredentials' :: GoogleAnalyticsConnectorProfileCredentials
-> 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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientSecret" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
clientSecret)
]
)