{-# 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.AmplitudeConnectorProfileCredentials where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AmplitudeConnectorProfileCredentials = AmplitudeConnectorProfileCredentials'
{
AmplitudeConnectorProfileCredentials -> Text
apiKey :: Prelude.Text,
AmplitudeConnectorProfileCredentials -> Sensitive Text
secretKey :: Core.Sensitive Prelude.Text
}
deriving (AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool
(AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool)
-> (AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool)
-> Eq AmplitudeConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool
$c/= :: AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool
== :: AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool
$c== :: AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool
Prelude.Eq, Int -> AmplitudeConnectorProfileCredentials -> ShowS
[AmplitudeConnectorProfileCredentials] -> ShowS
AmplitudeConnectorProfileCredentials -> String
(Int -> AmplitudeConnectorProfileCredentials -> ShowS)
-> (AmplitudeConnectorProfileCredentials -> String)
-> ([AmplitudeConnectorProfileCredentials] -> ShowS)
-> Show AmplitudeConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AmplitudeConnectorProfileCredentials] -> ShowS
$cshowList :: [AmplitudeConnectorProfileCredentials] -> ShowS
show :: AmplitudeConnectorProfileCredentials -> String
$cshow :: AmplitudeConnectorProfileCredentials -> String
showsPrec :: Int -> AmplitudeConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> AmplitudeConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
AmplitudeConnectorProfileCredentials
-> Rep AmplitudeConnectorProfileCredentials x)
-> (forall x.
Rep AmplitudeConnectorProfileCredentials x
-> AmplitudeConnectorProfileCredentials)
-> Generic AmplitudeConnectorProfileCredentials
forall x.
Rep AmplitudeConnectorProfileCredentials x
-> AmplitudeConnectorProfileCredentials
forall x.
AmplitudeConnectorProfileCredentials
-> Rep AmplitudeConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AmplitudeConnectorProfileCredentials x
-> AmplitudeConnectorProfileCredentials
$cfrom :: forall x.
AmplitudeConnectorProfileCredentials
-> Rep AmplitudeConnectorProfileCredentials x
Prelude.Generic)
newAmplitudeConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
AmplitudeConnectorProfileCredentials
newAmplitudeConnectorProfileCredentials :: Text -> Text -> AmplitudeConnectorProfileCredentials
newAmplitudeConnectorProfileCredentials
Text
pApiKey_
Text
pSecretKey_ =
AmplitudeConnectorProfileCredentials' :: Text -> Sensitive Text -> AmplitudeConnectorProfileCredentials
AmplitudeConnectorProfileCredentials'
{ $sel:apiKey:AmplitudeConnectorProfileCredentials' :: Text
apiKey =
Text
pApiKey_,
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: Sensitive Text
secretKey =
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
pSecretKey_
}
amplitudeConnectorProfileCredentials_apiKey :: Lens.Lens' AmplitudeConnectorProfileCredentials Prelude.Text
amplitudeConnectorProfileCredentials_apiKey :: (Text -> f Text)
-> AmplitudeConnectorProfileCredentials
-> f AmplitudeConnectorProfileCredentials
amplitudeConnectorProfileCredentials_apiKey = (AmplitudeConnectorProfileCredentials -> Text)
-> (AmplitudeConnectorProfileCredentials
-> Text -> AmplitudeConnectorProfileCredentials)
-> Lens
AmplitudeConnectorProfileCredentials
AmplitudeConnectorProfileCredentials
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmplitudeConnectorProfileCredentials' {Text
apiKey :: Text
$sel:apiKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Text
apiKey} -> Text
apiKey) (\s :: AmplitudeConnectorProfileCredentials
s@AmplitudeConnectorProfileCredentials' {} Text
a -> AmplitudeConnectorProfileCredentials
s {$sel:apiKey:AmplitudeConnectorProfileCredentials' :: Text
apiKey = Text
a} :: AmplitudeConnectorProfileCredentials)
amplitudeConnectorProfileCredentials_secretKey :: Lens.Lens' AmplitudeConnectorProfileCredentials Prelude.Text
amplitudeConnectorProfileCredentials_secretKey :: (Text -> f Text)
-> AmplitudeConnectorProfileCredentials
-> f AmplitudeConnectorProfileCredentials
amplitudeConnectorProfileCredentials_secretKey = (AmplitudeConnectorProfileCredentials -> Sensitive Text)
-> (AmplitudeConnectorProfileCredentials
-> Sensitive Text -> AmplitudeConnectorProfileCredentials)
-> Lens
AmplitudeConnectorProfileCredentials
AmplitudeConnectorProfileCredentials
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmplitudeConnectorProfileCredentials' {Sensitive Text
secretKey :: Sensitive Text
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
secretKey} -> Sensitive Text
secretKey) (\s :: AmplitudeConnectorProfileCredentials
s@AmplitudeConnectorProfileCredentials' {} Sensitive Text
a -> AmplitudeConnectorProfileCredentials
s {$sel:secretKey:AmplitudeConnectorProfileCredentials' :: Sensitive Text
secretKey = Sensitive Text
a} :: AmplitudeConnectorProfileCredentials) ((Sensitive Text -> f (Sensitive Text))
-> AmplitudeConnectorProfileCredentials
-> f AmplitudeConnectorProfileCredentials)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> AmplitudeConnectorProfileCredentials
-> f AmplitudeConnectorProfileCredentials
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
AmplitudeConnectorProfileCredentials
instance
Prelude.NFData
AmplitudeConnectorProfileCredentials
instance
Core.ToJSON
AmplitudeConnectorProfileCredentials
where
toJSON :: AmplitudeConnectorProfileCredentials -> Value
toJSON AmplitudeConnectorProfileCredentials' {Text
Sensitive Text
secretKey :: Sensitive Text
apiKey :: Text
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
$sel:apiKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> 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
"apiKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
apiKey),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"secretKey" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
secretKey)
]
)