{-# 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.ConnectionOAuthResponseParameters where
import Amazonka.CloudWatchEvents.Types.ConnectionHttpParameters
import Amazonka.CloudWatchEvents.Types.ConnectionOAuthClientResponseParameters
import Amazonka.CloudWatchEvents.Types.ConnectionOAuthHttpMethod
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConnectionOAuthResponseParameters = ConnectionOAuthResponseParameters'
{
ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthHttpMethod
httpMethod :: Prelude.Maybe ConnectionOAuthHttpMethod,
ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthClientResponseParameters
clientParameters :: Prelude.Maybe ConnectionOAuthClientResponseParameters,
ConnectionOAuthResponseParameters -> Maybe ConnectionHttpParameters
oAuthHttpParameters :: Prelude.Maybe ConnectionHttpParameters,
ConnectionOAuthResponseParameters -> Maybe Text
authorizationEndpoint :: Prelude.Maybe Prelude.Text
}
deriving (ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool
(ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool)
-> (ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool)
-> Eq ConnectionOAuthResponseParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool
$c/= :: ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool
== :: ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool
$c== :: ConnectionOAuthResponseParameters
-> ConnectionOAuthResponseParameters -> Bool
Prelude.Eq, ReadPrec [ConnectionOAuthResponseParameters]
ReadPrec ConnectionOAuthResponseParameters
Int -> ReadS ConnectionOAuthResponseParameters
ReadS [ConnectionOAuthResponseParameters]
(Int -> ReadS ConnectionOAuthResponseParameters)
-> ReadS [ConnectionOAuthResponseParameters]
-> ReadPrec ConnectionOAuthResponseParameters
-> ReadPrec [ConnectionOAuthResponseParameters]
-> Read ConnectionOAuthResponseParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionOAuthResponseParameters]
$creadListPrec :: ReadPrec [ConnectionOAuthResponseParameters]
readPrec :: ReadPrec ConnectionOAuthResponseParameters
$creadPrec :: ReadPrec ConnectionOAuthResponseParameters
readList :: ReadS [ConnectionOAuthResponseParameters]
$creadList :: ReadS [ConnectionOAuthResponseParameters]
readsPrec :: Int -> ReadS ConnectionOAuthResponseParameters
$creadsPrec :: Int -> ReadS ConnectionOAuthResponseParameters
Prelude.Read, Int -> ConnectionOAuthResponseParameters -> ShowS
[ConnectionOAuthResponseParameters] -> ShowS
ConnectionOAuthResponseParameters -> String
(Int -> ConnectionOAuthResponseParameters -> ShowS)
-> (ConnectionOAuthResponseParameters -> String)
-> ([ConnectionOAuthResponseParameters] -> ShowS)
-> Show ConnectionOAuthResponseParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionOAuthResponseParameters] -> ShowS
$cshowList :: [ConnectionOAuthResponseParameters] -> ShowS
show :: ConnectionOAuthResponseParameters -> String
$cshow :: ConnectionOAuthResponseParameters -> String
showsPrec :: Int -> ConnectionOAuthResponseParameters -> ShowS
$cshowsPrec :: Int -> ConnectionOAuthResponseParameters -> ShowS
Prelude.Show, (forall x.
ConnectionOAuthResponseParameters
-> Rep ConnectionOAuthResponseParameters x)
-> (forall x.
Rep ConnectionOAuthResponseParameters x
-> ConnectionOAuthResponseParameters)
-> Generic ConnectionOAuthResponseParameters
forall x.
Rep ConnectionOAuthResponseParameters x
-> ConnectionOAuthResponseParameters
forall x.
ConnectionOAuthResponseParameters
-> Rep ConnectionOAuthResponseParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConnectionOAuthResponseParameters x
-> ConnectionOAuthResponseParameters
$cfrom :: forall x.
ConnectionOAuthResponseParameters
-> Rep ConnectionOAuthResponseParameters x
Prelude.Generic)
newConnectionOAuthResponseParameters ::
ConnectionOAuthResponseParameters
newConnectionOAuthResponseParameters :: ConnectionOAuthResponseParameters
newConnectionOAuthResponseParameters =
ConnectionOAuthResponseParameters' :: Maybe ConnectionOAuthHttpMethod
-> Maybe ConnectionOAuthClientResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe Text
-> ConnectionOAuthResponseParameters
ConnectionOAuthResponseParameters'
{ $sel:httpMethod:ConnectionOAuthResponseParameters' :: Maybe ConnectionOAuthHttpMethod
httpMethod =
Maybe ConnectionOAuthHttpMethod
forall a. Maybe a
Prelude.Nothing,
$sel:clientParameters:ConnectionOAuthResponseParameters' :: Maybe ConnectionOAuthClientResponseParameters
clientParameters = Maybe ConnectionOAuthClientResponseParameters
forall a. Maybe a
Prelude.Nothing,
$sel:oAuthHttpParameters:ConnectionOAuthResponseParameters' :: Maybe ConnectionHttpParameters
oAuthHttpParameters = Maybe ConnectionHttpParameters
forall a. Maybe a
Prelude.Nothing,
$sel:authorizationEndpoint:ConnectionOAuthResponseParameters' :: Maybe Text
authorizationEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
connectionOAuthResponseParameters_httpMethod :: Lens.Lens' ConnectionOAuthResponseParameters (Prelude.Maybe ConnectionOAuthHttpMethod)
connectionOAuthResponseParameters_httpMethod :: (Maybe ConnectionOAuthHttpMethod
-> f (Maybe ConnectionOAuthHttpMethod))
-> ConnectionOAuthResponseParameters
-> f ConnectionOAuthResponseParameters
connectionOAuthResponseParameters_httpMethod = (ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthHttpMethod)
-> (ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthHttpMethod
-> ConnectionOAuthResponseParameters)
-> Lens
ConnectionOAuthResponseParameters
ConnectionOAuthResponseParameters
(Maybe ConnectionOAuthHttpMethod)
(Maybe ConnectionOAuthHttpMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionOAuthResponseParameters' {Maybe ConnectionOAuthHttpMethod
httpMethod :: Maybe ConnectionOAuthHttpMethod
$sel:httpMethod:ConnectionOAuthResponseParameters' :: ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthHttpMethod
httpMethod} -> Maybe ConnectionOAuthHttpMethod
httpMethod) (\s :: ConnectionOAuthResponseParameters
s@ConnectionOAuthResponseParameters' {} Maybe ConnectionOAuthHttpMethod
a -> ConnectionOAuthResponseParameters
s {$sel:httpMethod:ConnectionOAuthResponseParameters' :: Maybe ConnectionOAuthHttpMethod
httpMethod = Maybe ConnectionOAuthHttpMethod
a} :: ConnectionOAuthResponseParameters)
connectionOAuthResponseParameters_clientParameters :: Lens.Lens' ConnectionOAuthResponseParameters (Prelude.Maybe ConnectionOAuthClientResponseParameters)
connectionOAuthResponseParameters_clientParameters :: (Maybe ConnectionOAuthClientResponseParameters
-> f (Maybe ConnectionOAuthClientResponseParameters))
-> ConnectionOAuthResponseParameters
-> f ConnectionOAuthResponseParameters
connectionOAuthResponseParameters_clientParameters = (ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthClientResponseParameters)
-> (ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthClientResponseParameters
-> ConnectionOAuthResponseParameters)
-> Lens
ConnectionOAuthResponseParameters
ConnectionOAuthResponseParameters
(Maybe ConnectionOAuthClientResponseParameters)
(Maybe ConnectionOAuthClientResponseParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionOAuthResponseParameters' {Maybe ConnectionOAuthClientResponseParameters
clientParameters :: Maybe ConnectionOAuthClientResponseParameters
$sel:clientParameters:ConnectionOAuthResponseParameters' :: ConnectionOAuthResponseParameters
-> Maybe ConnectionOAuthClientResponseParameters
clientParameters} -> Maybe ConnectionOAuthClientResponseParameters
clientParameters) (\s :: ConnectionOAuthResponseParameters
s@ConnectionOAuthResponseParameters' {} Maybe ConnectionOAuthClientResponseParameters
a -> ConnectionOAuthResponseParameters
s {$sel:clientParameters:ConnectionOAuthResponseParameters' :: Maybe ConnectionOAuthClientResponseParameters
clientParameters = Maybe ConnectionOAuthClientResponseParameters
a} :: ConnectionOAuthResponseParameters)
connectionOAuthResponseParameters_oAuthHttpParameters :: Lens.Lens' ConnectionOAuthResponseParameters (Prelude.Maybe ConnectionHttpParameters)
connectionOAuthResponseParameters_oAuthHttpParameters :: (Maybe ConnectionHttpParameters
-> f (Maybe ConnectionHttpParameters))
-> ConnectionOAuthResponseParameters
-> f ConnectionOAuthResponseParameters
connectionOAuthResponseParameters_oAuthHttpParameters = (ConnectionOAuthResponseParameters
-> Maybe ConnectionHttpParameters)
-> (ConnectionOAuthResponseParameters
-> Maybe ConnectionHttpParameters
-> ConnectionOAuthResponseParameters)
-> Lens
ConnectionOAuthResponseParameters
ConnectionOAuthResponseParameters
(Maybe ConnectionHttpParameters)
(Maybe ConnectionHttpParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionOAuthResponseParameters' {Maybe ConnectionHttpParameters
oAuthHttpParameters :: Maybe ConnectionHttpParameters
$sel:oAuthHttpParameters:ConnectionOAuthResponseParameters' :: ConnectionOAuthResponseParameters -> Maybe ConnectionHttpParameters
oAuthHttpParameters} -> Maybe ConnectionHttpParameters
oAuthHttpParameters) (\s :: ConnectionOAuthResponseParameters
s@ConnectionOAuthResponseParameters' {} Maybe ConnectionHttpParameters
a -> ConnectionOAuthResponseParameters
s {$sel:oAuthHttpParameters:ConnectionOAuthResponseParameters' :: Maybe ConnectionHttpParameters
oAuthHttpParameters = Maybe ConnectionHttpParameters
a} :: ConnectionOAuthResponseParameters)
connectionOAuthResponseParameters_authorizationEndpoint :: Lens.Lens' ConnectionOAuthResponseParameters (Prelude.Maybe Prelude.Text)
connectionOAuthResponseParameters_authorizationEndpoint :: (Maybe Text -> f (Maybe Text))
-> ConnectionOAuthResponseParameters
-> f ConnectionOAuthResponseParameters
connectionOAuthResponseParameters_authorizationEndpoint = (ConnectionOAuthResponseParameters -> Maybe Text)
-> (ConnectionOAuthResponseParameters
-> Maybe Text -> ConnectionOAuthResponseParameters)
-> Lens
ConnectionOAuthResponseParameters
ConnectionOAuthResponseParameters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionOAuthResponseParameters' {Maybe Text
authorizationEndpoint :: Maybe Text
$sel:authorizationEndpoint:ConnectionOAuthResponseParameters' :: ConnectionOAuthResponseParameters -> Maybe Text
authorizationEndpoint} -> Maybe Text
authorizationEndpoint) (\s :: ConnectionOAuthResponseParameters
s@ConnectionOAuthResponseParameters' {} Maybe Text
a -> ConnectionOAuthResponseParameters
s {$sel:authorizationEndpoint:ConnectionOAuthResponseParameters' :: Maybe Text
authorizationEndpoint = Maybe Text
a} :: ConnectionOAuthResponseParameters)
instance
Core.FromJSON
ConnectionOAuthResponseParameters
where
parseJSON :: Value -> Parser ConnectionOAuthResponseParameters
parseJSON =
String
-> (Object -> Parser ConnectionOAuthResponseParameters)
-> Value
-> Parser ConnectionOAuthResponseParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConnectionOAuthResponseParameters"
( \Object
x ->
Maybe ConnectionOAuthHttpMethod
-> Maybe ConnectionOAuthClientResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe Text
-> ConnectionOAuthResponseParameters
ConnectionOAuthResponseParameters'
(Maybe ConnectionOAuthHttpMethod
-> Maybe ConnectionOAuthClientResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe Text
-> ConnectionOAuthResponseParameters)
-> Parser (Maybe ConnectionOAuthHttpMethod)
-> Parser
(Maybe ConnectionOAuthClientResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe Text
-> ConnectionOAuthResponseParameters)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ConnectionOAuthHttpMethod)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HttpMethod")
Parser
(Maybe ConnectionOAuthClientResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe Text
-> ConnectionOAuthResponseParameters)
-> Parser (Maybe ConnectionOAuthClientResponseParameters)
-> Parser
(Maybe ConnectionHttpParameters
-> Maybe Text -> ConnectionOAuthResponseParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ConnectionOAuthClientResponseParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientParameters")
Parser
(Maybe ConnectionHttpParameters
-> Maybe Text -> ConnectionOAuthResponseParameters)
-> Parser (Maybe ConnectionHttpParameters)
-> Parser (Maybe Text -> ConnectionOAuthResponseParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConnectionHttpParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OAuthHttpParameters")
Parser (Maybe Text -> ConnectionOAuthResponseParameters)
-> Parser (Maybe Text) -> Parser ConnectionOAuthResponseParameters
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthorizationEndpoint")
)
instance
Prelude.Hashable
ConnectionOAuthResponseParameters
instance
Prelude.NFData
ConnectionOAuthResponseParameters