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