{-# 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.DatadogConnectorProfileCredentials where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatadogConnectorProfileCredentials = DatadogConnectorProfileCredentials'
{
DatadogConnectorProfileCredentials -> Text
apiKey :: Prelude.Text,
DatadogConnectorProfileCredentials -> Text
applicationKey :: Prelude.Text
}
deriving (DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool
(DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool)
-> (DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool)
-> Eq DatadogConnectorProfileCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool
$c/= :: DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool
== :: DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool
$c== :: DatadogConnectorProfileCredentials
-> DatadogConnectorProfileCredentials -> Bool
Prelude.Eq, ReadPrec [DatadogConnectorProfileCredentials]
ReadPrec DatadogConnectorProfileCredentials
Int -> ReadS DatadogConnectorProfileCredentials
ReadS [DatadogConnectorProfileCredentials]
(Int -> ReadS DatadogConnectorProfileCredentials)
-> ReadS [DatadogConnectorProfileCredentials]
-> ReadPrec DatadogConnectorProfileCredentials
-> ReadPrec [DatadogConnectorProfileCredentials]
-> Read DatadogConnectorProfileCredentials
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatadogConnectorProfileCredentials]
$creadListPrec :: ReadPrec [DatadogConnectorProfileCredentials]
readPrec :: ReadPrec DatadogConnectorProfileCredentials
$creadPrec :: ReadPrec DatadogConnectorProfileCredentials
readList :: ReadS [DatadogConnectorProfileCredentials]
$creadList :: ReadS [DatadogConnectorProfileCredentials]
readsPrec :: Int -> ReadS DatadogConnectorProfileCredentials
$creadsPrec :: Int -> ReadS DatadogConnectorProfileCredentials
Prelude.Read, Int -> DatadogConnectorProfileCredentials -> ShowS
[DatadogConnectorProfileCredentials] -> ShowS
DatadogConnectorProfileCredentials -> String
(Int -> DatadogConnectorProfileCredentials -> ShowS)
-> (DatadogConnectorProfileCredentials -> String)
-> ([DatadogConnectorProfileCredentials] -> ShowS)
-> Show DatadogConnectorProfileCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatadogConnectorProfileCredentials] -> ShowS
$cshowList :: [DatadogConnectorProfileCredentials] -> ShowS
show :: DatadogConnectorProfileCredentials -> String
$cshow :: DatadogConnectorProfileCredentials -> String
showsPrec :: Int -> DatadogConnectorProfileCredentials -> ShowS
$cshowsPrec :: Int -> DatadogConnectorProfileCredentials -> ShowS
Prelude.Show, (forall x.
DatadogConnectorProfileCredentials
-> Rep DatadogConnectorProfileCredentials x)
-> (forall x.
Rep DatadogConnectorProfileCredentials x
-> DatadogConnectorProfileCredentials)
-> Generic DatadogConnectorProfileCredentials
forall x.
Rep DatadogConnectorProfileCredentials x
-> DatadogConnectorProfileCredentials
forall x.
DatadogConnectorProfileCredentials
-> Rep DatadogConnectorProfileCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DatadogConnectorProfileCredentials x
-> DatadogConnectorProfileCredentials
$cfrom :: forall x.
DatadogConnectorProfileCredentials
-> Rep DatadogConnectorProfileCredentials x
Prelude.Generic)
newDatadogConnectorProfileCredentials ::
Prelude.Text ->
Prelude.Text ->
DatadogConnectorProfileCredentials
newDatadogConnectorProfileCredentials :: Text -> Text -> DatadogConnectorProfileCredentials
newDatadogConnectorProfileCredentials
Text
pApiKey_
Text
pApplicationKey_ =
DatadogConnectorProfileCredentials' :: Text -> Text -> DatadogConnectorProfileCredentials
DatadogConnectorProfileCredentials'
{ $sel:apiKey:DatadogConnectorProfileCredentials' :: Text
apiKey =
Text
pApiKey_,
$sel:applicationKey:DatadogConnectorProfileCredentials' :: Text
applicationKey = Text
pApplicationKey_
}
datadogConnectorProfileCredentials_apiKey :: Lens.Lens' DatadogConnectorProfileCredentials Prelude.Text
datadogConnectorProfileCredentials_apiKey :: (Text -> f Text)
-> DatadogConnectorProfileCredentials
-> f DatadogConnectorProfileCredentials
datadogConnectorProfileCredentials_apiKey = (DatadogConnectorProfileCredentials -> Text)
-> (DatadogConnectorProfileCredentials
-> Text -> DatadogConnectorProfileCredentials)
-> Lens
DatadogConnectorProfileCredentials
DatadogConnectorProfileCredentials
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatadogConnectorProfileCredentials' {Text
apiKey :: Text
$sel:apiKey:DatadogConnectorProfileCredentials' :: DatadogConnectorProfileCredentials -> Text
apiKey} -> Text
apiKey) (\s :: DatadogConnectorProfileCredentials
s@DatadogConnectorProfileCredentials' {} Text
a -> DatadogConnectorProfileCredentials
s {$sel:apiKey:DatadogConnectorProfileCredentials' :: Text
apiKey = Text
a} :: DatadogConnectorProfileCredentials)
datadogConnectorProfileCredentials_applicationKey :: Lens.Lens' DatadogConnectorProfileCredentials Prelude.Text
datadogConnectorProfileCredentials_applicationKey :: (Text -> f Text)
-> DatadogConnectorProfileCredentials
-> f DatadogConnectorProfileCredentials
datadogConnectorProfileCredentials_applicationKey = (DatadogConnectorProfileCredentials -> Text)
-> (DatadogConnectorProfileCredentials
-> Text -> DatadogConnectorProfileCredentials)
-> Lens
DatadogConnectorProfileCredentials
DatadogConnectorProfileCredentials
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatadogConnectorProfileCredentials' {Text
applicationKey :: Text
$sel:applicationKey:DatadogConnectorProfileCredentials' :: DatadogConnectorProfileCredentials -> Text
applicationKey} -> Text
applicationKey) (\s :: DatadogConnectorProfileCredentials
s@DatadogConnectorProfileCredentials' {} Text
a -> DatadogConnectorProfileCredentials
s {$sel:applicationKey:DatadogConnectorProfileCredentials' :: Text
applicationKey = Text
a} :: DatadogConnectorProfileCredentials)
instance
Prelude.Hashable
DatadogConnectorProfileCredentials
instance
Prelude.NFData
DatadogConnectorProfileCredentials
instance
Core.ToJSON
DatadogConnectorProfileCredentials
where
toJSON :: DatadogConnectorProfileCredentials -> Value
toJSON DatadogConnectorProfileCredentials' {Text
applicationKey :: Text
apiKey :: Text
$sel:applicationKey:DatadogConnectorProfileCredentials' :: DatadogConnectorProfileCredentials -> Text
$sel:apiKey:DatadogConnectorProfileCredentials' :: DatadogConnectorProfileCredentials -> 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
"applicationKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationKey)
]
)