{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AmplitudeConnectorProfileCredentials = AmplitudeConnectorProfileCredentials'
{
AmplitudeConnectorProfileCredentials -> Sensitive Text
apiKey :: Data.Sensitive Prelude.Text,
AmplitudeConnectorProfileCredentials -> Sensitive Text
secretKey :: Data.Sensitive Prelude.Text
}
deriving (AmplitudeConnectorProfileCredentials
-> AmplitudeConnectorProfileCredentials -> Bool
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
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.
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'
{ $sel:apiKey:AmplitudeConnectorProfileCredentials' :: Sensitive Text
apiKey =
forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pApiKey_,
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: Sensitive Text
secretKey =
forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pSecretKey_
}
amplitudeConnectorProfileCredentials_apiKey :: Lens.Lens' AmplitudeConnectorProfileCredentials Prelude.Text
amplitudeConnectorProfileCredentials_apiKey :: Lens' AmplitudeConnectorProfileCredentials Text
amplitudeConnectorProfileCredentials_apiKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmplitudeConnectorProfileCredentials' {Sensitive Text
apiKey :: Sensitive Text
$sel:apiKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
apiKey} -> Sensitive Text
apiKey) (\s :: AmplitudeConnectorProfileCredentials
s@AmplitudeConnectorProfileCredentials' {} Sensitive Text
a -> AmplitudeConnectorProfileCredentials
s {$sel:apiKey:AmplitudeConnectorProfileCredentials' :: Sensitive Text
apiKey = Sensitive Text
a} :: AmplitudeConnectorProfileCredentials) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
amplitudeConnectorProfileCredentials_secretKey :: Lens.Lens' AmplitudeConnectorProfileCredentials Prelude.Text
amplitudeConnectorProfileCredentials_secretKey :: Lens' AmplitudeConnectorProfileCredentials Text
amplitudeConnectorProfileCredentials_secretKey = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance
Prelude.Hashable
AmplitudeConnectorProfileCredentials
where
hashWithSalt :: Int -> AmplitudeConnectorProfileCredentials -> Int
hashWithSalt
Int
_salt
AmplitudeConnectorProfileCredentials' {Sensitive Text
secretKey :: Sensitive Text
apiKey :: Sensitive Text
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
$sel:apiKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
apiKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
secretKey
instance
Prelude.NFData
AmplitudeConnectorProfileCredentials
where
rnf :: AmplitudeConnectorProfileCredentials -> ()
rnf AmplitudeConnectorProfileCredentials' {Sensitive Text
secretKey :: Sensitive Text
apiKey :: Sensitive Text
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
$sel:apiKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
apiKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
secretKey
instance
Data.ToJSON
AmplitudeConnectorProfileCredentials
where
toJSON :: AmplitudeConnectorProfileCredentials -> Value
toJSON AmplitudeConnectorProfileCredentials' {Sensitive Text
secretKey :: Sensitive Text
apiKey :: Sensitive Text
$sel:secretKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
$sel:apiKey:AmplitudeConnectorProfileCredentials' :: AmplitudeConnectorProfileCredentials -> Sensitive Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"apiKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
apiKey),
forall a. a -> Maybe a
Prelude.Just (Key
"secretKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
secretKey)
]
)