{-# 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.ZendeskConnectorProfileCredentials where
import Amazonka.AppFlow.Types.ConnectorOAuthRequest
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 ZendeskConnectorProfileCredentials = ZendeskConnectorProfileCredentials'
{
ZendeskConnectorProfileCredentials -> Maybe (Sensitive Text)
accessToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),
ZendeskConnectorProfileCredentials -> Maybe ConnectorOAuthRequest
oAuthRequest :: Prelude.Maybe ConnectorOAuthRequest,
ZendeskConnectorProfileCredentials -> Text
clientId :: Prelude.Text,
ZendeskConnectorProfileCredentials -> Sensitive Text
clientSecret :: Data.Sensitive Prelude.Text
}
deriving (ZendeskConnectorProfileCredentials
-> ZendeskConnectorProfileCredentials -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZendeskConnectorProfileCredentials
-> ZendeskConnectorProfileCredentials -> Bool
$c/= :: ZendeskConnectorProfileCredentials
-> ZendeskConnectorProfileCredentials -> Bool
== :: ZendeskConnectorProfileCredentials
-> ZendeskConnectorProfileCredentials -> Bool
$c== :: ZendeskConnectorProfileCredentials
-> ZendeskConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> ZendeskConnectorProfileCredentials -> ShowS
[ZendeskConnectorProfileCredentials] -> ShowS
ZendeskConnectorProfileCredentials -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZendeskConnectorProfileCredentials] -> ShowS
$cshowList :: [ZendeskConnectorProfileCredentials] -> ShowS
show :: ZendeskConnectorProfileCredentials -> String
$cshow :: ZendeskConnectorProfileCredentials -> String
showsPrec :: Int -> ZendeskConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> ZendeskConnectorProfileCredentials -> ShowS
Prelude.Show, forall x.
Rep ZendeskConnectorProfileCredentials x
-> ZendeskConnectorProfileCredentials
forall x.
ZendeskConnectorProfileCredentials
-> Rep ZendeskConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ZendeskConnectorProfileCredentials x
-> ZendeskConnectorProfileCredentials
$cfrom :: forall x.
ZendeskConnectorProfileCredentials
-> Rep ZendeskConnectorProfileCredentials x
Prelude.Generic)
newZendeskConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
ZendeskConnectorProfileCredentials
newZendeskConnectorProfileCredentials :: Text -> Text -> ZendeskConnectorProfileCredentials
newZendeskConnectorProfileCredentials
Text
pClientId_
Text
pClientSecret_ =
ZendeskConnectorProfileCredentials'
{ $sel:accessToken:ZendeskConnectorProfileCredentials' :: Maybe (Sensitive Text)
accessToken =
forall a. Maybe a
Prelude.Nothing,
$sel:oAuthRequest:ZendeskConnectorProfileCredentials' :: Maybe ConnectorOAuthRequest
oAuthRequest = forall a. Maybe a
Prelude.Nothing,
$sel:clientId:ZendeskConnectorProfileCredentials' :: Text
clientId = Text
pClientId_,
$sel:clientSecret:ZendeskConnectorProfileCredentials' :: Sensitive Text
clientSecret =
forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pClientSecret_
}
zendeskConnectorProfileCredentials_accessToken :: Lens.Lens' ZendeskConnectorProfileCredentials (Prelude.Maybe Prelude.Text)
zendeskConnectorProfileCredentials_accessToken :: Lens' ZendeskConnectorProfileCredentials (Maybe Text)
zendeskConnectorProfileCredentials_accessToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZendeskConnectorProfileCredentials' {Maybe (Sensitive Text)
accessToken :: Maybe (Sensitive Text)
$sel:accessToken:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe (Sensitive Text)
accessToken} -> Maybe (Sensitive Text)
accessToken) (\s :: ZendeskConnectorProfileCredentials
s@ZendeskConnectorProfileCredentials' {} Maybe (Sensitive Text)
a -> ZendeskConnectorProfileCredentials
s {$sel:accessToken:ZendeskConnectorProfileCredentials' :: Maybe (Sensitive Text)
accessToken = Maybe (Sensitive Text)
a} :: ZendeskConnectorProfileCredentials) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
zendeskConnectorProfileCredentials_oAuthRequest :: Lens.Lens' ZendeskConnectorProfileCredentials (Prelude.Maybe ConnectorOAuthRequest)
zendeskConnectorProfileCredentials_oAuthRequest :: Lens'
ZendeskConnectorProfileCredentials (Maybe ConnectorOAuthRequest)
zendeskConnectorProfileCredentials_oAuthRequest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZendeskConnectorProfileCredentials' {Maybe ConnectorOAuthRequest
oAuthRequest :: Maybe ConnectorOAuthRequest
$sel:oAuthRequest:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe ConnectorOAuthRequest
oAuthRequest} -> Maybe ConnectorOAuthRequest
oAuthRequest) (\s :: ZendeskConnectorProfileCredentials
s@ZendeskConnectorProfileCredentials' {} Maybe ConnectorOAuthRequest
a -> ZendeskConnectorProfileCredentials
s {$sel:oAuthRequest:ZendeskConnectorProfileCredentials' :: Maybe ConnectorOAuthRequest
oAuthRequest = Maybe ConnectorOAuthRequest
a} :: ZendeskConnectorProfileCredentials)
zendeskConnectorProfileCredentials_clientId :: Lens.Lens' ZendeskConnectorProfileCredentials Prelude.Text
zendeskConnectorProfileCredentials_clientId :: Lens' ZendeskConnectorProfileCredentials Text
zendeskConnectorProfileCredentials_clientId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZendeskConnectorProfileCredentials' {Text
clientId :: Text
$sel:clientId:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Text
clientId} -> Text
clientId) (\s :: ZendeskConnectorProfileCredentials
s@ZendeskConnectorProfileCredentials' {} Text
a -> ZendeskConnectorProfileCredentials
s {$sel:clientId:ZendeskConnectorProfileCredentials' :: Text
clientId = Text
a} :: ZendeskConnectorProfileCredentials)
zendeskConnectorProfileCredentials_clientSecret :: Lens.Lens' ZendeskConnectorProfileCredentials Prelude.Text
zendeskConnectorProfileCredentials_clientSecret :: Lens' ZendeskConnectorProfileCredentials Text
zendeskConnectorProfileCredentials_clientSecret = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZendeskConnectorProfileCredentials' {Sensitive Text
clientSecret :: Sensitive Text
$sel:clientSecret:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Sensitive Text
clientSecret} -> Sensitive Text
clientSecret) (\s :: ZendeskConnectorProfileCredentials
s@ZendeskConnectorProfileCredentials' {} Sensitive Text
a -> ZendeskConnectorProfileCredentials
s {$sel:clientSecret:ZendeskConnectorProfileCredentials' :: Sensitive Text
clientSecret = Sensitive Text
a} :: ZendeskConnectorProfileCredentials) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance
Prelude.Hashable
ZendeskConnectorProfileCredentials
where
hashWithSalt :: Int -> ZendeskConnectorProfileCredentials -> Int
hashWithSalt
Int
_salt
ZendeskConnectorProfileCredentials' {Maybe (Sensitive Text)
Maybe ConnectorOAuthRequest
Text
Sensitive Text
clientSecret :: Sensitive Text
clientId :: Text
oAuthRequest :: Maybe ConnectorOAuthRequest
accessToken :: Maybe (Sensitive Text)
$sel:clientSecret:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Sensitive Text
$sel:clientId:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Text
$sel:oAuthRequest:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe ConnectorOAuthRequest
$sel:accessToken:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
accessToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectorOAuthRequest
oAuthRequest
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
clientSecret
instance
Prelude.NFData
ZendeskConnectorProfileCredentials
where
rnf :: ZendeskConnectorProfileCredentials -> ()
rnf ZendeskConnectorProfileCredentials' {Maybe (Sensitive Text)
Maybe ConnectorOAuthRequest
Text
Sensitive Text
clientSecret :: Sensitive Text
clientId :: Text
oAuthRequest :: Maybe ConnectorOAuthRequest
accessToken :: Maybe (Sensitive Text)
$sel:clientSecret:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Sensitive Text
$sel:clientId:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Text
$sel:oAuthRequest:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe ConnectorOAuthRequest
$sel:accessToken:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
accessToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectorOAuthRequest
oAuthRequest
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
clientSecret
instance
Data.ToJSON
ZendeskConnectorProfileCredentials
where
toJSON :: ZendeskConnectorProfileCredentials -> Value
toJSON ZendeskConnectorProfileCredentials' {Maybe (Sensitive Text)
Maybe ConnectorOAuthRequest
Text
Sensitive Text
clientSecret :: Sensitive Text
clientId :: Text
oAuthRequest :: Maybe ConnectorOAuthRequest
accessToken :: Maybe (Sensitive Text)
$sel:clientSecret:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Sensitive Text
$sel:clientId:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Text
$sel:oAuthRequest:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe ConnectorOAuthRequest
$sel:accessToken:ZendeskConnectorProfileCredentials' :: ZendeskConnectorProfileCredentials -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"accessToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
accessToken,
(Key
"oAuthRequest" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorOAuthRequest
oAuthRequest,
forall a. a -> Maybe a
Prelude.Just (Key
"clientId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientId),
forall a. a -> Maybe a
Prelude.Just (Key
"clientSecret" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
clientSecret)
]
)