{-# 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.UpdateConnectionOAuthRequestParameters where
import Amazonka.CloudWatchEvents.Types.ConnectionHttpParameters
import Amazonka.CloudWatchEvents.Types.ConnectionOAuthHttpMethod
import Amazonka.CloudWatchEvents.Types.UpdateConnectionOAuthClientRequestParameters
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateConnectionOAuthRequestParameters = UpdateConnectionOAuthRequestParameters'
{
UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionOAuthHttpMethod
httpMethod :: Prelude.Maybe ConnectionOAuthHttpMethod,
UpdateConnectionOAuthRequestParameters
-> Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters :: Prelude.Maybe UpdateConnectionOAuthClientRequestParameters,
UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionHttpParameters
oAuthHttpParameters :: Prelude.Maybe ConnectionHttpParameters,
UpdateConnectionOAuthRequestParameters -> Maybe Text
authorizationEndpoint :: Prelude.Maybe Prelude.Text
}
deriving (UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool
(UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool)
-> (UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool)
-> Eq UpdateConnectionOAuthRequestParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool
$c/= :: UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool
== :: UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool
$c== :: UpdateConnectionOAuthRequestParameters
-> UpdateConnectionOAuthRequestParameters -> Bool
Prelude.Eq, ReadPrec [UpdateConnectionOAuthRequestParameters]
ReadPrec UpdateConnectionOAuthRequestParameters
Int -> ReadS UpdateConnectionOAuthRequestParameters
ReadS [UpdateConnectionOAuthRequestParameters]
(Int -> ReadS UpdateConnectionOAuthRequestParameters)
-> ReadS [UpdateConnectionOAuthRequestParameters]
-> ReadPrec UpdateConnectionOAuthRequestParameters
-> ReadPrec [UpdateConnectionOAuthRequestParameters]
-> Read UpdateConnectionOAuthRequestParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateConnectionOAuthRequestParameters]
$creadListPrec :: ReadPrec [UpdateConnectionOAuthRequestParameters]
readPrec :: ReadPrec UpdateConnectionOAuthRequestParameters
$creadPrec :: ReadPrec UpdateConnectionOAuthRequestParameters
readList :: ReadS [UpdateConnectionOAuthRequestParameters]
$creadList :: ReadS [UpdateConnectionOAuthRequestParameters]
readsPrec :: Int -> ReadS UpdateConnectionOAuthRequestParameters
$creadsPrec :: Int -> ReadS UpdateConnectionOAuthRequestParameters
Prelude.Read, Int -> UpdateConnectionOAuthRequestParameters -> ShowS
[UpdateConnectionOAuthRequestParameters] -> ShowS
UpdateConnectionOAuthRequestParameters -> String
(Int -> UpdateConnectionOAuthRequestParameters -> ShowS)
-> (UpdateConnectionOAuthRequestParameters -> String)
-> ([UpdateConnectionOAuthRequestParameters] -> ShowS)
-> Show UpdateConnectionOAuthRequestParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateConnectionOAuthRequestParameters] -> ShowS
$cshowList :: [UpdateConnectionOAuthRequestParameters] -> ShowS
show :: UpdateConnectionOAuthRequestParameters -> String
$cshow :: UpdateConnectionOAuthRequestParameters -> String
showsPrec :: Int -> UpdateConnectionOAuthRequestParameters -> ShowS
$cshowsPrec :: Int -> UpdateConnectionOAuthRequestParameters -> ShowS
Prelude.Show, (forall x.
UpdateConnectionOAuthRequestParameters
-> Rep UpdateConnectionOAuthRequestParameters x)
-> (forall x.
Rep UpdateConnectionOAuthRequestParameters x
-> UpdateConnectionOAuthRequestParameters)
-> Generic UpdateConnectionOAuthRequestParameters
forall x.
Rep UpdateConnectionOAuthRequestParameters x
-> UpdateConnectionOAuthRequestParameters
forall x.
UpdateConnectionOAuthRequestParameters
-> Rep UpdateConnectionOAuthRequestParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateConnectionOAuthRequestParameters x
-> UpdateConnectionOAuthRequestParameters
$cfrom :: forall x.
UpdateConnectionOAuthRequestParameters
-> Rep UpdateConnectionOAuthRequestParameters x
Prelude.Generic)
newUpdateConnectionOAuthRequestParameters ::
UpdateConnectionOAuthRequestParameters
newUpdateConnectionOAuthRequestParameters :: UpdateConnectionOAuthRequestParameters
newUpdateConnectionOAuthRequestParameters =
UpdateConnectionOAuthRequestParameters' :: Maybe ConnectionOAuthHttpMethod
-> Maybe UpdateConnectionOAuthClientRequestParameters
-> Maybe ConnectionHttpParameters
-> Maybe Text
-> UpdateConnectionOAuthRequestParameters
UpdateConnectionOAuthRequestParameters'
{ $sel:httpMethod:UpdateConnectionOAuthRequestParameters' :: Maybe ConnectionOAuthHttpMethod
httpMethod =
Maybe ConnectionOAuthHttpMethod
forall a. Maybe a
Prelude.Nothing,
$sel:clientParameters:UpdateConnectionOAuthRequestParameters' :: Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters = Maybe UpdateConnectionOAuthClientRequestParameters
forall a. Maybe a
Prelude.Nothing,
$sel:oAuthHttpParameters:UpdateConnectionOAuthRequestParameters' :: Maybe ConnectionHttpParameters
oAuthHttpParameters =
Maybe ConnectionHttpParameters
forall a. Maybe a
Prelude.Nothing,
$sel:authorizationEndpoint:UpdateConnectionOAuthRequestParameters' :: Maybe Text
authorizationEndpoint =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
updateConnectionOAuthRequestParameters_httpMethod :: Lens.Lens' UpdateConnectionOAuthRequestParameters (Prelude.Maybe ConnectionOAuthHttpMethod)
updateConnectionOAuthRequestParameters_httpMethod :: (Maybe ConnectionOAuthHttpMethod
-> f (Maybe ConnectionOAuthHttpMethod))
-> UpdateConnectionOAuthRequestParameters
-> f UpdateConnectionOAuthRequestParameters
updateConnectionOAuthRequestParameters_httpMethod = (UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionOAuthHttpMethod)
-> (UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionOAuthHttpMethod
-> UpdateConnectionOAuthRequestParameters)
-> Lens
UpdateConnectionOAuthRequestParameters
UpdateConnectionOAuthRequestParameters
(Maybe ConnectionOAuthHttpMethod)
(Maybe ConnectionOAuthHttpMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionOAuthRequestParameters' {Maybe ConnectionOAuthHttpMethod
httpMethod :: Maybe ConnectionOAuthHttpMethod
$sel:httpMethod:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionOAuthHttpMethod
httpMethod} -> Maybe ConnectionOAuthHttpMethod
httpMethod) (\s :: UpdateConnectionOAuthRequestParameters
s@UpdateConnectionOAuthRequestParameters' {} Maybe ConnectionOAuthHttpMethod
a -> UpdateConnectionOAuthRequestParameters
s {$sel:httpMethod:UpdateConnectionOAuthRequestParameters' :: Maybe ConnectionOAuthHttpMethod
httpMethod = Maybe ConnectionOAuthHttpMethod
a} :: UpdateConnectionOAuthRequestParameters)
updateConnectionOAuthRequestParameters_clientParameters :: Lens.Lens' UpdateConnectionOAuthRequestParameters (Prelude.Maybe UpdateConnectionOAuthClientRequestParameters)
updateConnectionOAuthRequestParameters_clientParameters :: (Maybe UpdateConnectionOAuthClientRequestParameters
-> f (Maybe UpdateConnectionOAuthClientRequestParameters))
-> UpdateConnectionOAuthRequestParameters
-> f UpdateConnectionOAuthRequestParameters
updateConnectionOAuthRequestParameters_clientParameters = (UpdateConnectionOAuthRequestParameters
-> Maybe UpdateConnectionOAuthClientRequestParameters)
-> (UpdateConnectionOAuthRequestParameters
-> Maybe UpdateConnectionOAuthClientRequestParameters
-> UpdateConnectionOAuthRequestParameters)
-> Lens
UpdateConnectionOAuthRequestParameters
UpdateConnectionOAuthRequestParameters
(Maybe UpdateConnectionOAuthClientRequestParameters)
(Maybe UpdateConnectionOAuthClientRequestParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionOAuthRequestParameters' {Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters :: Maybe UpdateConnectionOAuthClientRequestParameters
$sel:clientParameters:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters
-> Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters} -> Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters) (\s :: UpdateConnectionOAuthRequestParameters
s@UpdateConnectionOAuthRequestParameters' {} Maybe UpdateConnectionOAuthClientRequestParameters
a -> UpdateConnectionOAuthRequestParameters
s {$sel:clientParameters:UpdateConnectionOAuthRequestParameters' :: Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters = Maybe UpdateConnectionOAuthClientRequestParameters
a} :: UpdateConnectionOAuthRequestParameters)
updateConnectionOAuthRequestParameters_oAuthHttpParameters :: Lens.Lens' UpdateConnectionOAuthRequestParameters (Prelude.Maybe ConnectionHttpParameters)
updateConnectionOAuthRequestParameters_oAuthHttpParameters :: (Maybe ConnectionHttpParameters
-> f (Maybe ConnectionHttpParameters))
-> UpdateConnectionOAuthRequestParameters
-> f UpdateConnectionOAuthRequestParameters
updateConnectionOAuthRequestParameters_oAuthHttpParameters = (UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionHttpParameters)
-> (UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionHttpParameters
-> UpdateConnectionOAuthRequestParameters)
-> Lens
UpdateConnectionOAuthRequestParameters
UpdateConnectionOAuthRequestParameters
(Maybe ConnectionHttpParameters)
(Maybe ConnectionHttpParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionOAuthRequestParameters' {Maybe ConnectionHttpParameters
oAuthHttpParameters :: Maybe ConnectionHttpParameters
$sel:oAuthHttpParameters:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionHttpParameters
oAuthHttpParameters} -> Maybe ConnectionHttpParameters
oAuthHttpParameters) (\s :: UpdateConnectionOAuthRequestParameters
s@UpdateConnectionOAuthRequestParameters' {} Maybe ConnectionHttpParameters
a -> UpdateConnectionOAuthRequestParameters
s {$sel:oAuthHttpParameters:UpdateConnectionOAuthRequestParameters' :: Maybe ConnectionHttpParameters
oAuthHttpParameters = Maybe ConnectionHttpParameters
a} :: UpdateConnectionOAuthRequestParameters)
updateConnectionOAuthRequestParameters_authorizationEndpoint :: Lens.Lens' UpdateConnectionOAuthRequestParameters (Prelude.Maybe Prelude.Text)
updateConnectionOAuthRequestParameters_authorizationEndpoint :: (Maybe Text -> f (Maybe Text))
-> UpdateConnectionOAuthRequestParameters
-> f UpdateConnectionOAuthRequestParameters
updateConnectionOAuthRequestParameters_authorizationEndpoint = (UpdateConnectionOAuthRequestParameters -> Maybe Text)
-> (UpdateConnectionOAuthRequestParameters
-> Maybe Text -> UpdateConnectionOAuthRequestParameters)
-> Lens
UpdateConnectionOAuthRequestParameters
UpdateConnectionOAuthRequestParameters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectionOAuthRequestParameters' {Maybe Text
authorizationEndpoint :: Maybe Text
$sel:authorizationEndpoint:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters -> Maybe Text
authorizationEndpoint} -> Maybe Text
authorizationEndpoint) (\s :: UpdateConnectionOAuthRequestParameters
s@UpdateConnectionOAuthRequestParameters' {} Maybe Text
a -> UpdateConnectionOAuthRequestParameters
s {$sel:authorizationEndpoint:UpdateConnectionOAuthRequestParameters' :: Maybe Text
authorizationEndpoint = Maybe Text
a} :: UpdateConnectionOAuthRequestParameters)
instance
Prelude.Hashable
UpdateConnectionOAuthRequestParameters
instance
Prelude.NFData
UpdateConnectionOAuthRequestParameters
instance
Core.ToJSON
UpdateConnectionOAuthRequestParameters
where
toJSON :: UpdateConnectionOAuthRequestParameters -> Value
toJSON UpdateConnectionOAuthRequestParameters' {Maybe Text
Maybe ConnectionOAuthHttpMethod
Maybe ConnectionHttpParameters
Maybe UpdateConnectionOAuthClientRequestParameters
authorizationEndpoint :: Maybe Text
oAuthHttpParameters :: Maybe ConnectionHttpParameters
clientParameters :: Maybe UpdateConnectionOAuthClientRequestParameters
httpMethod :: Maybe ConnectionOAuthHttpMethod
$sel:authorizationEndpoint:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters -> Maybe Text
$sel:oAuthHttpParameters:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionHttpParameters
$sel:clientParameters:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters
-> Maybe UpdateConnectionOAuthClientRequestParameters
$sel:httpMethod:UpdateConnectionOAuthRequestParameters' :: UpdateConnectionOAuthRequestParameters
-> Maybe ConnectionOAuthHttpMethod
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"HttpMethod" Text -> ConnectionOAuthHttpMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ConnectionOAuthHttpMethod -> Pair)
-> Maybe ConnectionOAuthHttpMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionOAuthHttpMethod
httpMethod,
(Text
"ClientParameters" Text -> UpdateConnectionOAuthClientRequestParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateConnectionOAuthClientRequestParameters -> Pair)
-> Maybe UpdateConnectionOAuthClientRequestParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateConnectionOAuthClientRequestParameters
clientParameters,
(Text
"OAuthHttpParameters" 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
oAuthHttpParameters,
(Text
"AuthorizationEndpoint" 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
authorizationEndpoint
]
)