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