{-# 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.ApiGatewayV2.Types.Authorizer where
import Amazonka.ApiGatewayV2.Types.AuthorizerType
import Amazonka.ApiGatewayV2.Types.JWTConfiguration
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Authorizer = Authorizer'
{
Authorizer -> Maybe Text
authorizerCredentialsArn :: Prelude.Maybe Prelude.Text,
Authorizer -> Maybe Text
identityValidationExpression :: Prelude.Maybe Prelude.Text,
Authorizer -> Maybe Bool
enableSimpleResponses :: Prelude.Maybe Prelude.Bool,
Authorizer -> Maybe Text
authorizerUri :: Prelude.Maybe Prelude.Text,
Authorizer -> Maybe Text
authorizerPayloadFormatVersion :: Prelude.Maybe Prelude.Text,
Authorizer -> Maybe JWTConfiguration
jwtConfiguration :: Prelude.Maybe JWTConfiguration,
Authorizer -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
Authorizer -> Maybe Natural
authorizerResultTtlInSeconds :: Prelude.Maybe Prelude.Natural,
Authorizer -> Maybe [Text]
identitySource :: Prelude.Maybe [Prelude.Text],
Authorizer -> Maybe AuthorizerType
authorizerType :: Prelude.Maybe AuthorizerType,
Authorizer -> Text
name :: Prelude.Text
}
deriving (Authorizer -> Authorizer -> Bool
(Authorizer -> Authorizer -> Bool)
-> (Authorizer -> Authorizer -> Bool) -> Eq Authorizer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Authorizer -> Authorizer -> Bool
$c/= :: Authorizer -> Authorizer -> Bool
== :: Authorizer -> Authorizer -> Bool
$c== :: Authorizer -> Authorizer -> Bool
Prelude.Eq, ReadPrec [Authorizer]
ReadPrec Authorizer
Int -> ReadS Authorizer
ReadS [Authorizer]
(Int -> ReadS Authorizer)
-> ReadS [Authorizer]
-> ReadPrec Authorizer
-> ReadPrec [Authorizer]
-> Read Authorizer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Authorizer]
$creadListPrec :: ReadPrec [Authorizer]
readPrec :: ReadPrec Authorizer
$creadPrec :: ReadPrec Authorizer
readList :: ReadS [Authorizer]
$creadList :: ReadS [Authorizer]
readsPrec :: Int -> ReadS Authorizer
$creadsPrec :: Int -> ReadS Authorizer
Prelude.Read, Int -> Authorizer -> ShowS
[Authorizer] -> ShowS
Authorizer -> String
(Int -> Authorizer -> ShowS)
-> (Authorizer -> String)
-> ([Authorizer] -> ShowS)
-> Show Authorizer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Authorizer] -> ShowS
$cshowList :: [Authorizer] -> ShowS
show :: Authorizer -> String
$cshow :: Authorizer -> String
showsPrec :: Int -> Authorizer -> ShowS
$cshowsPrec :: Int -> Authorizer -> ShowS
Prelude.Show, (forall x. Authorizer -> Rep Authorizer x)
-> (forall x. Rep Authorizer x -> Authorizer) -> Generic Authorizer
forall x. Rep Authorizer x -> Authorizer
forall x. Authorizer -> Rep Authorizer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Authorizer x -> Authorizer
$cfrom :: forall x. Authorizer -> Rep Authorizer x
Prelude.Generic)
newAuthorizer ::
Prelude.Text ->
Authorizer
newAuthorizer :: Text -> Authorizer
newAuthorizer Text
pName_ =
Authorizer' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer
Authorizer'
{ $sel:authorizerCredentialsArn:Authorizer' :: Maybe Text
authorizerCredentialsArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityValidationExpression:Authorizer' :: Maybe Text
identityValidationExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableSimpleResponses:Authorizer' :: Maybe Bool
enableSimpleResponses = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerUri:Authorizer' :: Maybe Text
authorizerUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerPayloadFormatVersion:Authorizer' :: Maybe Text
authorizerPayloadFormatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jwtConfiguration:Authorizer' :: Maybe JWTConfiguration
jwtConfiguration = Maybe JWTConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerId:Authorizer' :: Maybe Text
authorizerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerResultTtlInSeconds:Authorizer' :: Maybe Natural
authorizerResultTtlInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:identitySource:Authorizer' :: Maybe [Text]
identitySource = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerType:Authorizer' :: Maybe AuthorizerType
authorizerType = Maybe AuthorizerType
forall a. Maybe a
Prelude.Nothing,
$sel:name:Authorizer' :: Text
name = Text
pName_
}
authorizer_authorizerCredentialsArn :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Text)
authorizer_authorizerCredentialsArn :: (Maybe Text -> f (Maybe Text)) -> Authorizer -> f Authorizer
authorizer_authorizerCredentialsArn = (Authorizer -> Maybe Text)
-> (Authorizer -> Maybe Text -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Text
authorizerCredentialsArn :: Maybe Text
$sel:authorizerCredentialsArn:Authorizer' :: Authorizer -> Maybe Text
authorizerCredentialsArn} -> Maybe Text
authorizerCredentialsArn) (\s :: Authorizer
s@Authorizer' {} Maybe Text
a -> Authorizer
s {$sel:authorizerCredentialsArn:Authorizer' :: Maybe Text
authorizerCredentialsArn = Maybe Text
a} :: Authorizer)
authorizer_identityValidationExpression :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Text)
authorizer_identityValidationExpression :: (Maybe Text -> f (Maybe Text)) -> Authorizer -> f Authorizer
authorizer_identityValidationExpression = (Authorizer -> Maybe Text)
-> (Authorizer -> Maybe Text -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Text
identityValidationExpression :: Maybe Text
$sel:identityValidationExpression:Authorizer' :: Authorizer -> Maybe Text
identityValidationExpression} -> Maybe Text
identityValidationExpression) (\s :: Authorizer
s@Authorizer' {} Maybe Text
a -> Authorizer
s {$sel:identityValidationExpression:Authorizer' :: Maybe Text
identityValidationExpression = Maybe Text
a} :: Authorizer)
authorizer_enableSimpleResponses :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Bool)
authorizer_enableSimpleResponses :: (Maybe Bool -> f (Maybe Bool)) -> Authorizer -> f Authorizer
authorizer_enableSimpleResponses = (Authorizer -> Maybe Bool)
-> (Authorizer -> Maybe Bool -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Bool
enableSimpleResponses :: Maybe Bool
$sel:enableSimpleResponses:Authorizer' :: Authorizer -> Maybe Bool
enableSimpleResponses} -> Maybe Bool
enableSimpleResponses) (\s :: Authorizer
s@Authorizer' {} Maybe Bool
a -> Authorizer
s {$sel:enableSimpleResponses:Authorizer' :: Maybe Bool
enableSimpleResponses = Maybe Bool
a} :: Authorizer)
authorizer_authorizerUri :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Text)
authorizer_authorizerUri :: (Maybe Text -> f (Maybe Text)) -> Authorizer -> f Authorizer
authorizer_authorizerUri = (Authorizer -> Maybe Text)
-> (Authorizer -> Maybe Text -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Text
authorizerUri :: Maybe Text
$sel:authorizerUri:Authorizer' :: Authorizer -> Maybe Text
authorizerUri} -> Maybe Text
authorizerUri) (\s :: Authorizer
s@Authorizer' {} Maybe Text
a -> Authorizer
s {$sel:authorizerUri:Authorizer' :: Maybe Text
authorizerUri = Maybe Text
a} :: Authorizer)
authorizer_authorizerPayloadFormatVersion :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Text)
authorizer_authorizerPayloadFormatVersion :: (Maybe Text -> f (Maybe Text)) -> Authorizer -> f Authorizer
authorizer_authorizerPayloadFormatVersion = (Authorizer -> Maybe Text)
-> (Authorizer -> Maybe Text -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Text
authorizerPayloadFormatVersion :: Maybe Text
$sel:authorizerPayloadFormatVersion:Authorizer' :: Authorizer -> Maybe Text
authorizerPayloadFormatVersion} -> Maybe Text
authorizerPayloadFormatVersion) (\s :: Authorizer
s@Authorizer' {} Maybe Text
a -> Authorizer
s {$sel:authorizerPayloadFormatVersion:Authorizer' :: Maybe Text
authorizerPayloadFormatVersion = Maybe Text
a} :: Authorizer)
authorizer_jwtConfiguration :: Lens.Lens' Authorizer (Prelude.Maybe JWTConfiguration)
authorizer_jwtConfiguration :: (Maybe JWTConfiguration -> f (Maybe JWTConfiguration))
-> Authorizer -> f Authorizer
authorizer_jwtConfiguration = (Authorizer -> Maybe JWTConfiguration)
-> (Authorizer -> Maybe JWTConfiguration -> Authorizer)
-> Lens
Authorizer
Authorizer
(Maybe JWTConfiguration)
(Maybe JWTConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe JWTConfiguration
jwtConfiguration :: Maybe JWTConfiguration
$sel:jwtConfiguration:Authorizer' :: Authorizer -> Maybe JWTConfiguration
jwtConfiguration} -> Maybe JWTConfiguration
jwtConfiguration) (\s :: Authorizer
s@Authorizer' {} Maybe JWTConfiguration
a -> Authorizer
s {$sel:jwtConfiguration:Authorizer' :: Maybe JWTConfiguration
jwtConfiguration = Maybe JWTConfiguration
a} :: Authorizer)
authorizer_authorizerId :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Text)
authorizer_authorizerId :: (Maybe Text -> f (Maybe Text)) -> Authorizer -> f Authorizer
authorizer_authorizerId = (Authorizer -> Maybe Text)
-> (Authorizer -> Maybe Text -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:Authorizer' :: Authorizer -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: Authorizer
s@Authorizer' {} Maybe Text
a -> Authorizer
s {$sel:authorizerId:Authorizer' :: Maybe Text
authorizerId = Maybe Text
a} :: Authorizer)
authorizer_authorizerResultTtlInSeconds :: Lens.Lens' Authorizer (Prelude.Maybe Prelude.Natural)
authorizer_authorizerResultTtlInSeconds :: (Maybe Natural -> f (Maybe Natural)) -> Authorizer -> f Authorizer
authorizer_authorizerResultTtlInSeconds = (Authorizer -> Maybe Natural)
-> (Authorizer -> Maybe Natural -> Authorizer)
-> Lens Authorizer Authorizer (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe Natural
authorizerResultTtlInSeconds :: Maybe Natural
$sel:authorizerResultTtlInSeconds:Authorizer' :: Authorizer -> Maybe Natural
authorizerResultTtlInSeconds} -> Maybe Natural
authorizerResultTtlInSeconds) (\s :: Authorizer
s@Authorizer' {} Maybe Natural
a -> Authorizer
s {$sel:authorizerResultTtlInSeconds:Authorizer' :: Maybe Natural
authorizerResultTtlInSeconds = Maybe Natural
a} :: Authorizer)
authorizer_identitySource :: Lens.Lens' Authorizer (Prelude.Maybe [Prelude.Text])
authorizer_identitySource :: (Maybe [Text] -> f (Maybe [Text])) -> Authorizer -> f Authorizer
authorizer_identitySource = (Authorizer -> Maybe [Text])
-> (Authorizer -> Maybe [Text] -> Authorizer)
-> Lens Authorizer Authorizer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe [Text]
identitySource :: Maybe [Text]
$sel:identitySource:Authorizer' :: Authorizer -> Maybe [Text]
identitySource} -> Maybe [Text]
identitySource) (\s :: Authorizer
s@Authorizer' {} Maybe [Text]
a -> Authorizer
s {$sel:identitySource:Authorizer' :: Maybe [Text]
identitySource = Maybe [Text]
a} :: Authorizer) ((Maybe [Text] -> f (Maybe [Text])) -> Authorizer -> f Authorizer)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Authorizer
-> f Authorizer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
authorizer_authorizerType :: Lens.Lens' Authorizer (Prelude.Maybe AuthorizerType)
authorizer_authorizerType :: (Maybe AuthorizerType -> f (Maybe AuthorizerType))
-> Authorizer -> f Authorizer
authorizer_authorizerType = (Authorizer -> Maybe AuthorizerType)
-> (Authorizer -> Maybe AuthorizerType -> Authorizer)
-> Lens
Authorizer Authorizer (Maybe AuthorizerType) (Maybe AuthorizerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Maybe AuthorizerType
authorizerType :: Maybe AuthorizerType
$sel:authorizerType:Authorizer' :: Authorizer -> Maybe AuthorizerType
authorizerType} -> Maybe AuthorizerType
authorizerType) (\s :: Authorizer
s@Authorizer' {} Maybe AuthorizerType
a -> Authorizer
s {$sel:authorizerType:Authorizer' :: Maybe AuthorizerType
authorizerType = Maybe AuthorizerType
a} :: Authorizer)
authorizer_name :: Lens.Lens' Authorizer Prelude.Text
authorizer_name :: (Text -> f Text) -> Authorizer -> f Authorizer
authorizer_name = (Authorizer -> Text)
-> (Authorizer -> Text -> Authorizer)
-> Lens Authorizer Authorizer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Authorizer' {Text
name :: Text
$sel:name:Authorizer' :: Authorizer -> Text
name} -> Text
name) (\s :: Authorizer
s@Authorizer' {} Text
a -> Authorizer
s {$sel:name:Authorizer' :: Text
name = Text
a} :: Authorizer)
instance Core.FromJSON Authorizer where
parseJSON :: Value -> Parser Authorizer
parseJSON =
String
-> (Object -> Parser Authorizer) -> Value -> Parser Authorizer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Authorizer"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer
Authorizer'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
forall (f :: * -> *) a b. Functor 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
"authorizerCredentialsArn")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
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
"identityValidationExpression")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"enableSimpleResponses")
Parser
(Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
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
"authorizerUri")
Parser
(Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe Text)
-> Parser
(Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
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
"authorizerPayloadFormatVersion")
Parser
(Maybe JWTConfiguration
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe JWTConfiguration)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JWTConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jwtConfiguration")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Text
-> Authorizer)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe [Text] -> Maybe AuthorizerType -> Text -> Authorizer)
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
"authorizerId")
Parser
(Maybe Natural
-> Maybe [Text] -> Maybe AuthorizerType -> Text -> Authorizer)
-> Parser (Maybe Natural)
-> Parser
(Maybe [Text] -> Maybe AuthorizerType -> Text -> Authorizer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authorizerResultTtlInSeconds")
Parser (Maybe [Text] -> Maybe AuthorizerType -> Text -> Authorizer)
-> Parser (Maybe [Text])
-> Parser (Maybe AuthorizerType -> Text -> Authorizer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"identitySource" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe AuthorizerType -> Text -> Authorizer)
-> Parser (Maybe AuthorizerType) -> Parser (Text -> Authorizer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuthorizerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authorizerType")
Parser (Text -> Authorizer) -> Parser Text -> Parser Authorizer
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
)
instance Prelude.Hashable Authorizer
instance Prelude.NFData Authorizer