{-# 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.UpdateConnectionAuthRequestParameters where
import Amazonka.CloudWatchEvents.Types.ConnectionHttpParameters
import Amazonka.CloudWatchEvents.Types.UpdateConnectionApiKeyAuthRequestParameters
import Amazonka.CloudWatchEvents.Types.UpdateConnectionBasicAuthRequestParameters
import Amazonka.CloudWatchEvents.Types.UpdateConnectionOAuthRequestParameters
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateConnectionAuthRequestParameters = UpdateConnectionAuthRequestParameters'
{
UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters :: Prelude.Maybe UpdateConnectionOAuthRequestParameters,
UpdateConnectionAuthRequestParameters
-> Maybe ConnectionHttpParameters
invocationHttpParameters :: Prelude.Maybe ConnectionHttpParameters,
UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters :: Prelude.Maybe UpdateConnectionApiKeyAuthRequestParameters,
UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters :: Prelude.Maybe UpdateConnectionBasicAuthRequestParameters
}
deriving (UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool
(UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool)
-> (UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool)
-> Eq UpdateConnectionAuthRequestParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool
$c/= :: UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool
== :: UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool
$c== :: UpdateConnectionAuthRequestParameters
-> UpdateConnectionAuthRequestParameters -> Bool
Prelude.Eq, ReadPrec [UpdateConnectionAuthRequestParameters]
ReadPrec UpdateConnectionAuthRequestParameters
Int -> ReadS UpdateConnectionAuthRequestParameters
ReadS [UpdateConnectionAuthRequestParameters]
(Int -> ReadS UpdateConnectionAuthRequestParameters)
-> ReadS [UpdateConnectionAuthRequestParameters]
-> ReadPrec UpdateConnectionAuthRequestParameters
-> ReadPrec [UpdateConnectionAuthRequestParameters]
-> Read UpdateConnectionAuthRequestParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateConnectionAuthRequestParameters]
$creadListPrec :: ReadPrec [UpdateConnectionAuthRequestParameters]
readPrec :: ReadPrec UpdateConnectionAuthRequestParameters
$creadPrec :: ReadPrec UpdateConnectionAuthRequestParameters
readList :: ReadS [UpdateConnectionAuthRequestParameters]
$creadList :: ReadS [UpdateConnectionAuthRequestParameters]
readsPrec :: Int -> ReadS UpdateConnectionAuthRequestParameters
$creadsPrec :: Int -> ReadS UpdateConnectionAuthRequestParameters
Prelude.Read, Int -> UpdateConnectionAuthRequestParameters -> ShowS
[UpdateConnectionAuthRequestParameters] -> ShowS
UpdateConnectionAuthRequestParameters -> String
(Int -> UpdateConnectionAuthRequestParameters -> ShowS)
-> (UpdateConnectionAuthRequestParameters -> String)
-> ([UpdateConnectionAuthRequestParameters] -> ShowS)
-> Show UpdateConnectionAuthRequestParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateConnectionAuthRequestParameters] -> ShowS
$cshowList :: [UpdateConnectionAuthRequestParameters] -> ShowS
show :: UpdateConnectionAuthRequestParameters -> String
$cshow :: UpdateConnectionAuthRequestParameters -> String
showsPrec :: Int -> UpdateConnectionAuthRequestParameters -> ShowS
$cshowsPrec :: Int -> UpdateConnectionAuthRequestParameters -> ShowS
Prelude.Show, (forall x.
UpdateConnectionAuthRequestParameters
-> Rep UpdateConnectionAuthRequestParameters x)
-> (forall x.
Rep UpdateConnectionAuthRequestParameters x
-> UpdateConnectionAuthRequestParameters)
-> Generic UpdateConnectionAuthRequestParameters
forall x.
Rep UpdateConnectionAuthRequestParameters x
-> UpdateConnectionAuthRequestParameters
forall x.
UpdateConnectionAuthRequestParameters
-> Rep UpdateConnectionAuthRequestParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateConnectionAuthRequestParameters x
-> UpdateConnectionAuthRequestParameters
$cfrom :: forall x.
UpdateConnectionAuthRequestParameters
-> Rep UpdateConnectionAuthRequestParameters x
Prelude.Generic)
newUpdateConnectionAuthRequestParameters ::
UpdateConnectionAuthRequestParameters
newUpdateConnectionAuthRequestParameters :: UpdateConnectionAuthRequestParameters
newUpdateConnectionAuthRequestParameters =
UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionHttpParameters
-> Maybe UpdateConnectionApiKeyAuthRequestParameters
-> Maybe UpdateConnectionBasicAuthRequestParameters
-> UpdateConnectionAuthRequestParameters
UpdateConnectionAuthRequestParameters'
{ $sel:oAuthParameters:UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters =
Maybe UpdateConnectionOAuthRequestParameters
forall a. Maybe a
Prelude.Nothing,
$sel:invocationHttpParameters:UpdateConnectionAuthRequestParameters' :: Maybe ConnectionHttpParameters
invocationHttpParameters =
Maybe ConnectionHttpParameters
forall a. Maybe a
Prelude.Nothing,
$sel:apiKeyAuthParameters:UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters =
Maybe UpdateConnectionApiKeyAuthRequestParameters
forall a. Maybe a
Prelude.Nothing,
$sel:basicAuthParameters:UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters =
Maybe UpdateConnectionBasicAuthRequestParameters
forall a. Maybe a
Prelude.Nothing
}
updateConnectionAuthRequestParameters_oAuthParameters :: Lens.Lens' UpdateConnectionAuthRequestParameters (Prelude.Maybe UpdateConnectionOAuthRequestParameters)
updateConnectionAuthRequestParameters_oAuthParameters :: (Maybe UpdateConnectionOAuthRequestParameters
-> f (Maybe UpdateConnectionOAuthRequestParameters))
-> UpdateConnectionAuthRequestParameters
-> f UpdateConnectionAuthRequestParameters
updateConnectionAuthRequestParameters_oAuthParameters = (UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionOAuthRequestParameters)
-> (UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionOAuthRequestParameters
-> UpdateConnectionAuthRequestParameters)
-> Lens
UpdateConnectionAuthRequestParameters
UpdateConnectionAuthRequestParameters
(Maybe UpdateConnectionOAuthRequestParameters)
(Maybe UpdateConnectionOAuthRequestParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionAuthRequestParameters' {Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters :: Maybe UpdateConnectionOAuthRequestParameters
$sel:oAuthParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters} -> Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters) (\s :: UpdateConnectionAuthRequestParameters
s@UpdateConnectionAuthRequestParameters' {} Maybe UpdateConnectionOAuthRequestParameters
a -> UpdateConnectionAuthRequestParameters
s {$sel:oAuthParameters:UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters = Maybe UpdateConnectionOAuthRequestParameters
a} :: UpdateConnectionAuthRequestParameters)
updateConnectionAuthRequestParameters_invocationHttpParameters :: Lens.Lens' UpdateConnectionAuthRequestParameters (Prelude.Maybe ConnectionHttpParameters)
updateConnectionAuthRequestParameters_invocationHttpParameters :: (Maybe ConnectionHttpParameters
-> f (Maybe ConnectionHttpParameters))
-> UpdateConnectionAuthRequestParameters
-> f UpdateConnectionAuthRequestParameters
updateConnectionAuthRequestParameters_invocationHttpParameters = (UpdateConnectionAuthRequestParameters
-> Maybe ConnectionHttpParameters)
-> (UpdateConnectionAuthRequestParameters
-> Maybe ConnectionHttpParameters
-> UpdateConnectionAuthRequestParameters)
-> Lens
UpdateConnectionAuthRequestParameters
UpdateConnectionAuthRequestParameters
(Maybe ConnectionHttpParameters)
(Maybe ConnectionHttpParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionAuthRequestParameters' {Maybe ConnectionHttpParameters
invocationHttpParameters :: Maybe ConnectionHttpParameters
$sel:invocationHttpParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe ConnectionHttpParameters
invocationHttpParameters} -> Maybe ConnectionHttpParameters
invocationHttpParameters) (\s :: UpdateConnectionAuthRequestParameters
s@UpdateConnectionAuthRequestParameters' {} Maybe ConnectionHttpParameters
a -> UpdateConnectionAuthRequestParameters
s {$sel:invocationHttpParameters:UpdateConnectionAuthRequestParameters' :: Maybe ConnectionHttpParameters
invocationHttpParameters = Maybe ConnectionHttpParameters
a} :: UpdateConnectionAuthRequestParameters)
updateConnectionAuthRequestParameters_apiKeyAuthParameters :: Lens.Lens' UpdateConnectionAuthRequestParameters (Prelude.Maybe UpdateConnectionApiKeyAuthRequestParameters)
updateConnectionAuthRequestParameters_apiKeyAuthParameters :: (Maybe UpdateConnectionApiKeyAuthRequestParameters
-> f (Maybe UpdateConnectionApiKeyAuthRequestParameters))
-> UpdateConnectionAuthRequestParameters
-> f UpdateConnectionAuthRequestParameters
updateConnectionAuthRequestParameters_apiKeyAuthParameters = (UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionApiKeyAuthRequestParameters)
-> (UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionApiKeyAuthRequestParameters
-> UpdateConnectionAuthRequestParameters)
-> Lens
UpdateConnectionAuthRequestParameters
UpdateConnectionAuthRequestParameters
(Maybe UpdateConnectionApiKeyAuthRequestParameters)
(Maybe UpdateConnectionApiKeyAuthRequestParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionAuthRequestParameters' {Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters :: Maybe UpdateConnectionApiKeyAuthRequestParameters
$sel:apiKeyAuthParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters} -> Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters) (\s :: UpdateConnectionAuthRequestParameters
s@UpdateConnectionAuthRequestParameters' {} Maybe UpdateConnectionApiKeyAuthRequestParameters
a -> UpdateConnectionAuthRequestParameters
s {$sel:apiKeyAuthParameters:UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters = Maybe UpdateConnectionApiKeyAuthRequestParameters
a} :: UpdateConnectionAuthRequestParameters)
updateConnectionAuthRequestParameters_basicAuthParameters :: Lens.Lens' UpdateConnectionAuthRequestParameters (Prelude.Maybe UpdateConnectionBasicAuthRequestParameters)
updateConnectionAuthRequestParameters_basicAuthParameters :: (Maybe UpdateConnectionBasicAuthRequestParameters
-> f (Maybe UpdateConnectionBasicAuthRequestParameters))
-> UpdateConnectionAuthRequestParameters
-> f UpdateConnectionAuthRequestParameters
updateConnectionAuthRequestParameters_basicAuthParameters = (UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionBasicAuthRequestParameters)
-> (UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionBasicAuthRequestParameters
-> UpdateConnectionAuthRequestParameters)
-> Lens
UpdateConnectionAuthRequestParameters
UpdateConnectionAuthRequestParameters
(Maybe UpdateConnectionBasicAuthRequestParameters)
(Maybe UpdateConnectionBasicAuthRequestParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionAuthRequestParameters' {Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters :: Maybe UpdateConnectionBasicAuthRequestParameters
$sel:basicAuthParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters} -> Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters) (\s :: UpdateConnectionAuthRequestParameters
s@UpdateConnectionAuthRequestParameters' {} Maybe UpdateConnectionBasicAuthRequestParameters
a -> UpdateConnectionAuthRequestParameters
s {$sel:basicAuthParameters:UpdateConnectionAuthRequestParameters' :: Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters = Maybe UpdateConnectionBasicAuthRequestParameters
a} :: UpdateConnectionAuthRequestParameters)
instance
Prelude.Hashable
UpdateConnectionAuthRequestParameters
instance
Prelude.NFData
UpdateConnectionAuthRequestParameters
instance
Core.ToJSON
UpdateConnectionAuthRequestParameters
where
toJSON :: UpdateConnectionAuthRequestParameters -> Value
toJSON UpdateConnectionAuthRequestParameters' {Maybe ConnectionHttpParameters
Maybe UpdateConnectionApiKeyAuthRequestParameters
Maybe UpdateConnectionBasicAuthRequestParameters
Maybe UpdateConnectionOAuthRequestParameters
basicAuthParameters :: Maybe UpdateConnectionBasicAuthRequestParameters
apiKeyAuthParameters :: Maybe UpdateConnectionApiKeyAuthRequestParameters
invocationHttpParameters :: Maybe ConnectionHttpParameters
oAuthParameters :: Maybe UpdateConnectionOAuthRequestParameters
$sel:basicAuthParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionBasicAuthRequestParameters
$sel:apiKeyAuthParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionApiKeyAuthRequestParameters
$sel:invocationHttpParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe ConnectionHttpParameters
$sel:oAuthParameters:UpdateConnectionAuthRequestParameters' :: UpdateConnectionAuthRequestParameters
-> Maybe UpdateConnectionOAuthRequestParameters
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OAuthParameters" Text -> UpdateConnectionOAuthRequestParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateConnectionOAuthRequestParameters -> Pair)
-> Maybe UpdateConnectionOAuthRequestParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateConnectionOAuthRequestParameters
oAuthParameters,
(Text
"InvocationHttpParameters" Text -> ConnectionHttpParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConnectionHttpParameters -> Pair)
-> Maybe ConnectionHttpParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionHttpParameters
invocationHttpParameters,
(Text
"ApiKeyAuthParameters" Text -> UpdateConnectionApiKeyAuthRequestParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateConnectionApiKeyAuthRequestParameters -> Pair)
-> Maybe UpdateConnectionApiKeyAuthRequestParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateConnectionApiKeyAuthRequestParameters
apiKeyAuthParameters,
(Text
"BasicAuthParameters" Text -> UpdateConnectionBasicAuthRequestParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateConnectionBasicAuthRequestParameters -> Pair)
-> Maybe UpdateConnectionBasicAuthRequestParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateConnectionBasicAuthRequestParameters
basicAuthParameters
]
)