{-# 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.ConnectionAuthResponseParameters where
import Amazonka.CloudWatchEvents.Types.ConnectionApiKeyAuthResponseParameters
import Amazonka.CloudWatchEvents.Types.ConnectionBasicAuthResponseParameters
import Amazonka.CloudWatchEvents.Types.ConnectionHttpParameters
import Amazonka.CloudWatchEvents.Types.ConnectionOAuthResponseParameters
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConnectionAuthResponseParameters = ConnectionAuthResponseParameters'
{
ConnectionAuthResponseParameters
-> Maybe ConnectionOAuthResponseParameters
oAuthParameters :: Prelude.Maybe ConnectionOAuthResponseParameters,
ConnectionAuthResponseParameters -> Maybe ConnectionHttpParameters
invocationHttpParameters :: Prelude.Maybe ConnectionHttpParameters,
ConnectionAuthResponseParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
apiKeyAuthParameters :: Prelude.Maybe ConnectionApiKeyAuthResponseParameters,
ConnectionAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
basicAuthParameters :: Prelude.Maybe ConnectionBasicAuthResponseParameters
}
deriving (ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool
(ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool)
-> (ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool)
-> Eq ConnectionAuthResponseParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool
$c/= :: ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool
== :: ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool
$c== :: ConnectionAuthResponseParameters
-> ConnectionAuthResponseParameters -> Bool
Prelude.Eq, ReadPrec [ConnectionAuthResponseParameters]
ReadPrec ConnectionAuthResponseParameters
Int -> ReadS ConnectionAuthResponseParameters
ReadS [ConnectionAuthResponseParameters]
(Int -> ReadS ConnectionAuthResponseParameters)
-> ReadS [ConnectionAuthResponseParameters]
-> ReadPrec ConnectionAuthResponseParameters
-> ReadPrec [ConnectionAuthResponseParameters]
-> Read ConnectionAuthResponseParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionAuthResponseParameters]
$creadListPrec :: ReadPrec [ConnectionAuthResponseParameters]
readPrec :: ReadPrec ConnectionAuthResponseParameters
$creadPrec :: ReadPrec ConnectionAuthResponseParameters
readList :: ReadS [ConnectionAuthResponseParameters]
$creadList :: ReadS [ConnectionAuthResponseParameters]
readsPrec :: Int -> ReadS ConnectionAuthResponseParameters
$creadsPrec :: Int -> ReadS ConnectionAuthResponseParameters
Prelude.Read, Int -> ConnectionAuthResponseParameters -> ShowS
[ConnectionAuthResponseParameters] -> ShowS
ConnectionAuthResponseParameters -> String
(Int -> ConnectionAuthResponseParameters -> ShowS)
-> (ConnectionAuthResponseParameters -> String)
-> ([ConnectionAuthResponseParameters] -> ShowS)
-> Show ConnectionAuthResponseParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionAuthResponseParameters] -> ShowS
$cshowList :: [ConnectionAuthResponseParameters] -> ShowS
show :: ConnectionAuthResponseParameters -> String
$cshow :: ConnectionAuthResponseParameters -> String
showsPrec :: Int -> ConnectionAuthResponseParameters -> ShowS
$cshowsPrec :: Int -> ConnectionAuthResponseParameters -> ShowS
Prelude.Show, (forall x.
ConnectionAuthResponseParameters
-> Rep ConnectionAuthResponseParameters x)
-> (forall x.
Rep ConnectionAuthResponseParameters x
-> ConnectionAuthResponseParameters)
-> Generic ConnectionAuthResponseParameters
forall x.
Rep ConnectionAuthResponseParameters x
-> ConnectionAuthResponseParameters
forall x.
ConnectionAuthResponseParameters
-> Rep ConnectionAuthResponseParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConnectionAuthResponseParameters x
-> ConnectionAuthResponseParameters
$cfrom :: forall x.
ConnectionAuthResponseParameters
-> Rep ConnectionAuthResponseParameters x
Prelude.Generic)
newConnectionAuthResponseParameters ::
ConnectionAuthResponseParameters
newConnectionAuthResponseParameters :: ConnectionAuthResponseParameters
newConnectionAuthResponseParameters =
ConnectionAuthResponseParameters' :: Maybe ConnectionOAuthResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters
ConnectionAuthResponseParameters'
{ $sel:oAuthParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionOAuthResponseParameters
oAuthParameters =
Maybe ConnectionOAuthResponseParameters
forall a. Maybe a
Prelude.Nothing,
$sel:invocationHttpParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionHttpParameters
invocationHttpParameters =
Maybe ConnectionHttpParameters
forall a. Maybe a
Prelude.Nothing,
$sel:apiKeyAuthParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionApiKeyAuthResponseParameters
apiKeyAuthParameters = Maybe ConnectionApiKeyAuthResponseParameters
forall a. Maybe a
Prelude.Nothing,
$sel:basicAuthParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionBasicAuthResponseParameters
basicAuthParameters = Maybe ConnectionBasicAuthResponseParameters
forall a. Maybe a
Prelude.Nothing
}
connectionAuthResponseParameters_oAuthParameters :: Lens.Lens' ConnectionAuthResponseParameters (Prelude.Maybe ConnectionOAuthResponseParameters)
connectionAuthResponseParameters_oAuthParameters :: (Maybe ConnectionOAuthResponseParameters
-> f (Maybe ConnectionOAuthResponseParameters))
-> ConnectionAuthResponseParameters
-> f ConnectionAuthResponseParameters
connectionAuthResponseParameters_oAuthParameters = (ConnectionAuthResponseParameters
-> Maybe ConnectionOAuthResponseParameters)
-> (ConnectionAuthResponseParameters
-> Maybe ConnectionOAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Lens
ConnectionAuthResponseParameters
ConnectionAuthResponseParameters
(Maybe ConnectionOAuthResponseParameters)
(Maybe ConnectionOAuthResponseParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAuthResponseParameters' {Maybe ConnectionOAuthResponseParameters
oAuthParameters :: Maybe ConnectionOAuthResponseParameters
$sel:oAuthParameters:ConnectionAuthResponseParameters' :: ConnectionAuthResponseParameters
-> Maybe ConnectionOAuthResponseParameters
oAuthParameters} -> Maybe ConnectionOAuthResponseParameters
oAuthParameters) (\s :: ConnectionAuthResponseParameters
s@ConnectionAuthResponseParameters' {} Maybe ConnectionOAuthResponseParameters
a -> ConnectionAuthResponseParameters
s {$sel:oAuthParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionOAuthResponseParameters
oAuthParameters = Maybe ConnectionOAuthResponseParameters
a} :: ConnectionAuthResponseParameters)
connectionAuthResponseParameters_invocationHttpParameters :: Lens.Lens' ConnectionAuthResponseParameters (Prelude.Maybe ConnectionHttpParameters)
connectionAuthResponseParameters_invocationHttpParameters :: (Maybe ConnectionHttpParameters
-> f (Maybe ConnectionHttpParameters))
-> ConnectionAuthResponseParameters
-> f ConnectionAuthResponseParameters
connectionAuthResponseParameters_invocationHttpParameters = (ConnectionAuthResponseParameters
-> Maybe ConnectionHttpParameters)
-> (ConnectionAuthResponseParameters
-> Maybe ConnectionHttpParameters
-> ConnectionAuthResponseParameters)
-> Lens
ConnectionAuthResponseParameters
ConnectionAuthResponseParameters
(Maybe ConnectionHttpParameters)
(Maybe ConnectionHttpParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAuthResponseParameters' {Maybe ConnectionHttpParameters
invocationHttpParameters :: Maybe ConnectionHttpParameters
$sel:invocationHttpParameters:ConnectionAuthResponseParameters' :: ConnectionAuthResponseParameters -> Maybe ConnectionHttpParameters
invocationHttpParameters} -> Maybe ConnectionHttpParameters
invocationHttpParameters) (\s :: ConnectionAuthResponseParameters
s@ConnectionAuthResponseParameters' {} Maybe ConnectionHttpParameters
a -> ConnectionAuthResponseParameters
s {$sel:invocationHttpParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionHttpParameters
invocationHttpParameters = Maybe ConnectionHttpParameters
a} :: ConnectionAuthResponseParameters)
connectionAuthResponseParameters_apiKeyAuthParameters :: Lens.Lens' ConnectionAuthResponseParameters (Prelude.Maybe ConnectionApiKeyAuthResponseParameters)
connectionAuthResponseParameters_apiKeyAuthParameters :: (Maybe ConnectionApiKeyAuthResponseParameters
-> f (Maybe ConnectionApiKeyAuthResponseParameters))
-> ConnectionAuthResponseParameters
-> f ConnectionAuthResponseParameters
connectionAuthResponseParameters_apiKeyAuthParameters = (ConnectionAuthResponseParameters
-> Maybe ConnectionApiKeyAuthResponseParameters)
-> (ConnectionAuthResponseParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Lens
ConnectionAuthResponseParameters
ConnectionAuthResponseParameters
(Maybe ConnectionApiKeyAuthResponseParameters)
(Maybe ConnectionApiKeyAuthResponseParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAuthResponseParameters' {Maybe ConnectionApiKeyAuthResponseParameters
apiKeyAuthParameters :: Maybe ConnectionApiKeyAuthResponseParameters
$sel:apiKeyAuthParameters:ConnectionAuthResponseParameters' :: ConnectionAuthResponseParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
apiKeyAuthParameters} -> Maybe ConnectionApiKeyAuthResponseParameters
apiKeyAuthParameters) (\s :: ConnectionAuthResponseParameters
s@ConnectionAuthResponseParameters' {} Maybe ConnectionApiKeyAuthResponseParameters
a -> ConnectionAuthResponseParameters
s {$sel:apiKeyAuthParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionApiKeyAuthResponseParameters
apiKeyAuthParameters = Maybe ConnectionApiKeyAuthResponseParameters
a} :: ConnectionAuthResponseParameters)
connectionAuthResponseParameters_basicAuthParameters :: Lens.Lens' ConnectionAuthResponseParameters (Prelude.Maybe ConnectionBasicAuthResponseParameters)
connectionAuthResponseParameters_basicAuthParameters :: (Maybe ConnectionBasicAuthResponseParameters
-> f (Maybe ConnectionBasicAuthResponseParameters))
-> ConnectionAuthResponseParameters
-> f ConnectionAuthResponseParameters
connectionAuthResponseParameters_basicAuthParameters = (ConnectionAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters)
-> (ConnectionAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Lens
ConnectionAuthResponseParameters
ConnectionAuthResponseParameters
(Maybe ConnectionBasicAuthResponseParameters)
(Maybe ConnectionBasicAuthResponseParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAuthResponseParameters' {Maybe ConnectionBasicAuthResponseParameters
basicAuthParameters :: Maybe ConnectionBasicAuthResponseParameters
$sel:basicAuthParameters:ConnectionAuthResponseParameters' :: ConnectionAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
basicAuthParameters} -> Maybe ConnectionBasicAuthResponseParameters
basicAuthParameters) (\s :: ConnectionAuthResponseParameters
s@ConnectionAuthResponseParameters' {} Maybe ConnectionBasicAuthResponseParameters
a -> ConnectionAuthResponseParameters
s {$sel:basicAuthParameters:ConnectionAuthResponseParameters' :: Maybe ConnectionBasicAuthResponseParameters
basicAuthParameters = Maybe ConnectionBasicAuthResponseParameters
a} :: ConnectionAuthResponseParameters)
instance
Core.FromJSON
ConnectionAuthResponseParameters
where
parseJSON :: Value -> Parser ConnectionAuthResponseParameters
parseJSON =
String
-> (Object -> Parser ConnectionAuthResponseParameters)
-> Value
-> Parser ConnectionAuthResponseParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConnectionAuthResponseParameters"
( \Object
x ->
Maybe ConnectionOAuthResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters
ConnectionAuthResponseParameters'
(Maybe ConnectionOAuthResponseParameters
-> Maybe ConnectionHttpParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Parser (Maybe ConnectionOAuthResponseParameters)
-> Parser
(Maybe ConnectionHttpParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ConnectionOAuthResponseParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OAuthParameters")
Parser
(Maybe ConnectionHttpParameters
-> Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Parser (Maybe ConnectionHttpParameters)
-> Parser
(Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
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
"InvocationHttpParameters")
Parser
(Maybe ConnectionApiKeyAuthResponseParameters
-> Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Parser (Maybe ConnectionApiKeyAuthResponseParameters)
-> Parser
(Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ConnectionApiKeyAuthResponseParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApiKeyAuthParameters")
Parser
(Maybe ConnectionBasicAuthResponseParameters
-> ConnectionAuthResponseParameters)
-> Parser (Maybe ConnectionBasicAuthResponseParameters)
-> Parser ConnectionAuthResponseParameters
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ConnectionBasicAuthResponseParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BasicAuthParameters")
)
instance
Prelude.Hashable
ConnectionAuthResponseParameters
instance
Prelude.NFData
ConnectionAuthResponseParameters