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