{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data UpdateConnectionApiKeyAuthRequestParameters = UpdateConnectionApiKeyAuthRequestParameters'
{
UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
apiKeyName :: Prelude.Maybe Prelude.Text,
UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
apiKeyValue :: Prelude.Maybe Prelude.Text
}
deriving (UpdateConnectionApiKeyAuthRequestParameters
-> UpdateConnectionApiKeyAuthRequestParameters -> Bool
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]
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
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.
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'
{ $sel:apiKeyName:UpdateConnectionApiKeyAuthRequestParameters' :: Maybe Text
apiKeyName =
forall a. Maybe a
Prelude.Nothing,
$sel:apiKeyValue:UpdateConnectionApiKeyAuthRequestParameters' :: Maybe Text
apiKeyValue = forall a. Maybe a
Prelude.Nothing
}
updateConnectionApiKeyAuthRequestParameters_apiKeyName :: Lens.Lens' UpdateConnectionApiKeyAuthRequestParameters (Prelude.Maybe Prelude.Text)
updateConnectionApiKeyAuthRequestParameters_apiKeyName :: Lens' UpdateConnectionApiKeyAuthRequestParameters (Maybe Text)
updateConnectionApiKeyAuthRequestParameters_apiKeyName = 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)
updateConnectionApiKeyAuthRequestParameters_apiKeyValue :: Lens.Lens' UpdateConnectionApiKeyAuthRequestParameters (Prelude.Maybe Prelude.Text)
updateConnectionApiKeyAuthRequestParameters_apiKeyValue :: Lens' UpdateConnectionApiKeyAuthRequestParameters (Maybe Text)
updateConnectionApiKeyAuthRequestParameters_apiKeyValue = 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)
instance
Prelude.Hashable
UpdateConnectionApiKeyAuthRequestParameters
where
hashWithSalt :: Int -> UpdateConnectionApiKeyAuthRequestParameters -> Int
hashWithSalt
Int
_salt
UpdateConnectionApiKeyAuthRequestParameters' {Maybe Text
apiKeyValue :: Maybe Text
apiKeyName :: Maybe Text
$sel:apiKeyValue:UpdateConnectionApiKeyAuthRequestParameters' :: UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
$sel:apiKeyName:UpdateConnectionApiKeyAuthRequestParameters' :: UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
apiKeyName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
apiKeyValue
instance
Prelude.NFData
UpdateConnectionApiKeyAuthRequestParameters
where
rnf :: UpdateConnectionApiKeyAuthRequestParameters -> ()
rnf UpdateConnectionApiKeyAuthRequestParameters' {Maybe Text
apiKeyValue :: Maybe Text
apiKeyName :: Maybe Text
$sel:apiKeyValue:UpdateConnectionApiKeyAuthRequestParameters' :: UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
$sel:apiKeyName:UpdateConnectionApiKeyAuthRequestParameters' :: UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiKeyName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiKeyValue
instance
Data.ToJSON
UpdateConnectionApiKeyAuthRequestParameters
where
toJSON :: UpdateConnectionApiKeyAuthRequestParameters -> Value
toJSON
UpdateConnectionApiKeyAuthRequestParameters' {Maybe Text
apiKeyValue :: Maybe Text
apiKeyName :: Maybe Text
$sel:apiKeyValue:UpdateConnectionApiKeyAuthRequestParameters' :: UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
$sel:apiKeyName:UpdateConnectionApiKeyAuthRequestParameters' :: UpdateConnectionApiKeyAuthRequestParameters -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ApiKeyName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
apiKeyName,
(Key
"ApiKeyValue" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
apiKeyValue
]
)