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