{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ApiGatewayV2.CreateAuthorizer
(
CreateAuthorizer (..),
newCreateAuthorizer,
createAuthorizer_authorizerCredentialsArn,
createAuthorizer_identityValidationExpression,
createAuthorizer_enableSimpleResponses,
createAuthorizer_authorizerUri,
createAuthorizer_authorizerPayloadFormatVersion,
createAuthorizer_jwtConfiguration,
createAuthorizer_authorizerResultTtlInSeconds,
createAuthorizer_apiId,
createAuthorizer_authorizerType,
createAuthorizer_identitySource,
createAuthorizer_name,
CreateAuthorizerResponse (..),
newCreateAuthorizerResponse,
createAuthorizerResponse_authorizerCredentialsArn,
createAuthorizerResponse_identityValidationExpression,
createAuthorizerResponse_enableSimpleResponses,
createAuthorizerResponse_authorizerUri,
createAuthorizerResponse_authorizerPayloadFormatVersion,
createAuthorizerResponse_jwtConfiguration,
createAuthorizerResponse_authorizerId,
createAuthorizerResponse_name,
createAuthorizerResponse_authorizerResultTtlInSeconds,
createAuthorizerResponse_identitySource,
createAuthorizerResponse_authorizerType,
createAuthorizerResponse_httpStatus,
)
where
import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateAuthorizer = CreateAuthorizer'
{
CreateAuthorizer -> Maybe Text
authorizerCredentialsArn :: Prelude.Maybe Prelude.Text,
CreateAuthorizer -> Maybe Text
identityValidationExpression :: Prelude.Maybe Prelude.Text,
CreateAuthorizer -> Maybe Bool
enableSimpleResponses :: Prelude.Maybe Prelude.Bool,
CreateAuthorizer -> Maybe Text
authorizerUri :: Prelude.Maybe Prelude.Text,
CreateAuthorizer -> Maybe Text
authorizerPayloadFormatVersion :: Prelude.Maybe Prelude.Text,
CreateAuthorizer -> Maybe JWTConfiguration
jwtConfiguration :: Prelude.Maybe JWTConfiguration,
CreateAuthorizer -> Maybe Natural
authorizerResultTtlInSeconds :: Prelude.Maybe Prelude.Natural,
CreateAuthorizer -> Text
apiId :: Prelude.Text,
CreateAuthorizer -> AuthorizerType
authorizerType :: AuthorizerType,
CreateAuthorizer -> [Text]
identitySource :: [Prelude.Text],
CreateAuthorizer -> Text
name :: Prelude.Text
}
deriving (CreateAuthorizer -> CreateAuthorizer -> Bool
(CreateAuthorizer -> CreateAuthorizer -> Bool)
-> (CreateAuthorizer -> CreateAuthorizer -> Bool)
-> Eq CreateAuthorizer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAuthorizer -> CreateAuthorizer -> Bool
$c/= :: CreateAuthorizer -> CreateAuthorizer -> Bool
== :: CreateAuthorizer -> CreateAuthorizer -> Bool
$c== :: CreateAuthorizer -> CreateAuthorizer -> Bool
Prelude.Eq, ReadPrec [CreateAuthorizer]
ReadPrec CreateAuthorizer
Int -> ReadS CreateAuthorizer
ReadS [CreateAuthorizer]
(Int -> ReadS CreateAuthorizer)
-> ReadS [CreateAuthorizer]
-> ReadPrec CreateAuthorizer
-> ReadPrec [CreateAuthorizer]
-> Read CreateAuthorizer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAuthorizer]
$creadListPrec :: ReadPrec [CreateAuthorizer]
readPrec :: ReadPrec CreateAuthorizer
$creadPrec :: ReadPrec CreateAuthorizer
readList :: ReadS [CreateAuthorizer]
$creadList :: ReadS [CreateAuthorizer]
readsPrec :: Int -> ReadS CreateAuthorizer
$creadsPrec :: Int -> ReadS CreateAuthorizer
Prelude.Read, Int -> CreateAuthorizer -> ShowS
[CreateAuthorizer] -> ShowS
CreateAuthorizer -> String
(Int -> CreateAuthorizer -> ShowS)
-> (CreateAuthorizer -> String)
-> ([CreateAuthorizer] -> ShowS)
-> Show CreateAuthorizer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAuthorizer] -> ShowS
$cshowList :: [CreateAuthorizer] -> ShowS
show :: CreateAuthorizer -> String
$cshow :: CreateAuthorizer -> String
showsPrec :: Int -> CreateAuthorizer -> ShowS
$cshowsPrec :: Int -> CreateAuthorizer -> ShowS
Prelude.Show, (forall x. CreateAuthorizer -> Rep CreateAuthorizer x)
-> (forall x. Rep CreateAuthorizer x -> CreateAuthorizer)
-> Generic CreateAuthorizer
forall x. Rep CreateAuthorizer x -> CreateAuthorizer
forall x. CreateAuthorizer -> Rep CreateAuthorizer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAuthorizer x -> CreateAuthorizer
$cfrom :: forall x. CreateAuthorizer -> Rep CreateAuthorizer x
Prelude.Generic)
newCreateAuthorizer ::
Prelude.Text ->
AuthorizerType ->
Prelude.Text ->
CreateAuthorizer
newCreateAuthorizer :: Text -> AuthorizerType -> Text -> CreateAuthorizer
newCreateAuthorizer Text
pApiId_ AuthorizerType
pAuthorizerType_ Text
pName_ =
CreateAuthorizer' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Natural
-> Text
-> AuthorizerType
-> [Text]
-> Text
-> CreateAuthorizer
CreateAuthorizer'
{ $sel:authorizerCredentialsArn:CreateAuthorizer' :: Maybe Text
authorizerCredentialsArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityValidationExpression:CreateAuthorizer' :: Maybe Text
identityValidationExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableSimpleResponses:CreateAuthorizer' :: Maybe Bool
enableSimpleResponses = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerUri:CreateAuthorizer' :: Maybe Text
authorizerUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerPayloadFormatVersion:CreateAuthorizer' :: Maybe Text
authorizerPayloadFormatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jwtConfiguration:CreateAuthorizer' :: Maybe JWTConfiguration
jwtConfiguration = Maybe JWTConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerResultTtlInSeconds:CreateAuthorizer' :: Maybe Natural
authorizerResultTtlInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:apiId:CreateAuthorizer' :: Text
apiId = Text
pApiId_,
$sel:authorizerType:CreateAuthorizer' :: AuthorizerType
authorizerType = AuthorizerType
pAuthorizerType_,
$sel:identitySource:CreateAuthorizer' :: [Text]
identitySource = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:name:CreateAuthorizer' :: Text
name = Text
pName_
}
createAuthorizer_authorizerCredentialsArn :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Text)
createAuthorizer_authorizerCredentialsArn :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerCredentialsArn = (CreateAuthorizer -> Maybe Text)
-> (CreateAuthorizer -> Maybe Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Text
authorizerCredentialsArn :: Maybe Text
$sel:authorizerCredentialsArn:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
authorizerCredentialsArn} -> Maybe Text
authorizerCredentialsArn) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Text
a -> CreateAuthorizer
s {$sel:authorizerCredentialsArn:CreateAuthorizer' :: Maybe Text
authorizerCredentialsArn = Maybe Text
a} :: CreateAuthorizer)
createAuthorizer_identityValidationExpression :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Text)
createAuthorizer_identityValidationExpression :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_identityValidationExpression = (CreateAuthorizer -> Maybe Text)
-> (CreateAuthorizer -> Maybe Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Text
identityValidationExpression :: Maybe Text
$sel:identityValidationExpression:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
identityValidationExpression} -> Maybe Text
identityValidationExpression) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Text
a -> CreateAuthorizer
s {$sel:identityValidationExpression:CreateAuthorizer' :: Maybe Text
identityValidationExpression = Maybe Text
a} :: CreateAuthorizer)
createAuthorizer_enableSimpleResponses :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Bool)
createAuthorizer_enableSimpleResponses :: (Maybe Bool -> f (Maybe Bool))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_enableSimpleResponses = (CreateAuthorizer -> Maybe Bool)
-> (CreateAuthorizer -> Maybe Bool -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Bool
enableSimpleResponses :: Maybe Bool
$sel:enableSimpleResponses:CreateAuthorizer' :: CreateAuthorizer -> Maybe Bool
enableSimpleResponses} -> Maybe Bool
enableSimpleResponses) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Bool
a -> CreateAuthorizer
s {$sel:enableSimpleResponses:CreateAuthorizer' :: Maybe Bool
enableSimpleResponses = Maybe Bool
a} :: CreateAuthorizer)
createAuthorizer_authorizerUri :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Text)
createAuthorizer_authorizerUri :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerUri = (CreateAuthorizer -> Maybe Text)
-> (CreateAuthorizer -> Maybe Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Text
authorizerUri :: Maybe Text
$sel:authorizerUri:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
authorizerUri} -> Maybe Text
authorizerUri) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Text
a -> CreateAuthorizer
s {$sel:authorizerUri:CreateAuthorizer' :: Maybe Text
authorizerUri = Maybe Text
a} :: CreateAuthorizer)
createAuthorizer_authorizerPayloadFormatVersion :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Text)
createAuthorizer_authorizerPayloadFormatVersion :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerPayloadFormatVersion = (CreateAuthorizer -> Maybe Text)
-> (CreateAuthorizer -> Maybe Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Text
authorizerPayloadFormatVersion :: Maybe Text
$sel:authorizerPayloadFormatVersion:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
authorizerPayloadFormatVersion} -> Maybe Text
authorizerPayloadFormatVersion) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Text
a -> CreateAuthorizer
s {$sel:authorizerPayloadFormatVersion:CreateAuthorizer' :: Maybe Text
authorizerPayloadFormatVersion = Maybe Text
a} :: CreateAuthorizer)
createAuthorizer_jwtConfiguration :: Lens.Lens' CreateAuthorizer (Prelude.Maybe JWTConfiguration)
createAuthorizer_jwtConfiguration :: (Maybe JWTConfiguration -> f (Maybe JWTConfiguration))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_jwtConfiguration = (CreateAuthorizer -> Maybe JWTConfiguration)
-> (CreateAuthorizer -> Maybe JWTConfiguration -> CreateAuthorizer)
-> Lens
CreateAuthorizer
CreateAuthorizer
(Maybe JWTConfiguration)
(Maybe JWTConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe JWTConfiguration
jwtConfiguration :: Maybe JWTConfiguration
$sel:jwtConfiguration:CreateAuthorizer' :: CreateAuthorizer -> Maybe JWTConfiguration
jwtConfiguration} -> Maybe JWTConfiguration
jwtConfiguration) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe JWTConfiguration
a -> CreateAuthorizer
s {$sel:jwtConfiguration:CreateAuthorizer' :: Maybe JWTConfiguration
jwtConfiguration = Maybe JWTConfiguration
a} :: CreateAuthorizer)
createAuthorizer_authorizerResultTtlInSeconds :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Natural)
createAuthorizer_authorizerResultTtlInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerResultTtlInSeconds = (CreateAuthorizer -> Maybe Natural)
-> (CreateAuthorizer -> Maybe Natural -> CreateAuthorizer)
-> Lens
CreateAuthorizer CreateAuthorizer (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Natural
authorizerResultTtlInSeconds :: Maybe Natural
$sel:authorizerResultTtlInSeconds:CreateAuthorizer' :: CreateAuthorizer -> Maybe Natural
authorizerResultTtlInSeconds} -> Maybe Natural
authorizerResultTtlInSeconds) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Natural
a -> CreateAuthorizer
s {$sel:authorizerResultTtlInSeconds:CreateAuthorizer' :: Maybe Natural
authorizerResultTtlInSeconds = Maybe Natural
a} :: CreateAuthorizer)
createAuthorizer_apiId :: Lens.Lens' CreateAuthorizer Prelude.Text
createAuthorizer_apiId :: (Text -> f Text) -> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_apiId = (CreateAuthorizer -> Text)
-> (CreateAuthorizer -> Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Text
apiId :: Text
$sel:apiId:CreateAuthorizer' :: CreateAuthorizer -> Text
apiId} -> Text
apiId) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Text
a -> CreateAuthorizer
s {$sel:apiId:CreateAuthorizer' :: Text
apiId = Text
a} :: CreateAuthorizer)
createAuthorizer_authorizerType :: Lens.Lens' CreateAuthorizer AuthorizerType
createAuthorizer_authorizerType :: (AuthorizerType -> f AuthorizerType)
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerType = (CreateAuthorizer -> AuthorizerType)
-> (CreateAuthorizer -> AuthorizerType -> CreateAuthorizer)
-> Lens
CreateAuthorizer CreateAuthorizer AuthorizerType AuthorizerType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {AuthorizerType
authorizerType :: AuthorizerType
$sel:authorizerType:CreateAuthorizer' :: CreateAuthorizer -> AuthorizerType
authorizerType} -> AuthorizerType
authorizerType) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} AuthorizerType
a -> CreateAuthorizer
s {$sel:authorizerType:CreateAuthorizer' :: AuthorizerType
authorizerType = AuthorizerType
a} :: CreateAuthorizer)
createAuthorizer_identitySource :: Lens.Lens' CreateAuthorizer [Prelude.Text]
createAuthorizer_identitySource :: ([Text] -> f [Text]) -> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_identitySource = (CreateAuthorizer -> [Text])
-> (CreateAuthorizer -> [Text] -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {[Text]
identitySource :: [Text]
$sel:identitySource:CreateAuthorizer' :: CreateAuthorizer -> [Text]
identitySource} -> [Text]
identitySource) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} [Text]
a -> CreateAuthorizer
s {$sel:identitySource:CreateAuthorizer' :: [Text]
identitySource = [Text]
a} :: CreateAuthorizer) (([Text] -> f [Text]) -> CreateAuthorizer -> f CreateAuthorizer)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateAuthorizer
-> f CreateAuthorizer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAuthorizer_name :: Lens.Lens' CreateAuthorizer Prelude.Text
createAuthorizer_name :: (Text -> f Text) -> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_name = (CreateAuthorizer -> Text)
-> (CreateAuthorizer -> Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Text
name :: Text
$sel:name:CreateAuthorizer' :: CreateAuthorizer -> Text
name} -> Text
name) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Text
a -> CreateAuthorizer
s {$sel:name:CreateAuthorizer' :: Text
name = Text
a} :: CreateAuthorizer)
instance Core.AWSRequest CreateAuthorizer where
type
AWSResponse CreateAuthorizer =
CreateAuthorizerResponse
request :: CreateAuthorizer -> Request CreateAuthorizer
request = Service -> CreateAuthorizer -> Request CreateAuthorizer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAuthorizer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAuthorizer)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAuthorizer))
-> Logger
-> Service
-> Proxy CreateAuthorizer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAuthorizer)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse
CreateAuthorizerResponse'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerCredentialsArn")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"identityValidationExpression")
Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"enableSimpleResponses")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerUri")
Either
String
(Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerPayloadFormatVersion")
Either
String
(Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe JWTConfiguration)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe JWTConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jwtConfiguration")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerId")
Either
String
(Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
Either
String
(Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse)
-> Either String (Maybe Natural)
-> Either
String
(Maybe [Text]
-> Maybe AuthorizerType -> Int -> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerResultTtlInSeconds")
Either
String
(Maybe [Text]
-> Maybe AuthorizerType -> Int -> CreateAuthorizerResponse)
-> Either String (Maybe [Text])
-> Either
String (Maybe AuthorizerType -> Int -> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"identitySource" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Either
String (Maybe AuthorizerType -> Int -> CreateAuthorizerResponse)
-> Either String (Maybe AuthorizerType)
-> Either String (Int -> CreateAuthorizerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AuthorizerType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizerType")
Either String (Int -> CreateAuthorizerResponse)
-> Either String Int -> Either String CreateAuthorizerResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateAuthorizer
instance Prelude.NFData CreateAuthorizer
instance Core.ToHeaders CreateAuthorizer where
toHeaders :: CreateAuthorizer -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAuthorizer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateAuthorizer where
toJSON :: CreateAuthorizer -> Value
toJSON CreateAuthorizer' {[Text]
Maybe Bool
Maybe Natural
Maybe Text
Maybe JWTConfiguration
Text
AuthorizerType
name :: Text
identitySource :: [Text]
authorizerType :: AuthorizerType
apiId :: Text
authorizerResultTtlInSeconds :: Maybe Natural
jwtConfiguration :: Maybe JWTConfiguration
authorizerPayloadFormatVersion :: Maybe Text
authorizerUri :: Maybe Text
enableSimpleResponses :: Maybe Bool
identityValidationExpression :: Maybe Text
authorizerCredentialsArn :: Maybe Text
$sel:name:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:identitySource:CreateAuthorizer' :: CreateAuthorizer -> [Text]
$sel:authorizerType:CreateAuthorizer' :: CreateAuthorizer -> AuthorizerType
$sel:apiId:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:authorizerResultTtlInSeconds:CreateAuthorizer' :: CreateAuthorizer -> Maybe Natural
$sel:jwtConfiguration:CreateAuthorizer' :: CreateAuthorizer -> Maybe JWTConfiguration
$sel:authorizerPayloadFormatVersion:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:authorizerUri:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:enableSimpleResponses:CreateAuthorizer' :: CreateAuthorizer -> Maybe Bool
$sel:identityValidationExpression:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:authorizerCredentialsArn:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"authorizerCredentialsArn" 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
authorizerCredentialsArn,
(Text
"identityValidationExpression" 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
identityValidationExpression,
(Text
"enableSimpleResponses" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableSimpleResponses,
(Text
"authorizerUri" 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
authorizerUri,
(Text
"authorizerPayloadFormatVersion" 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
authorizerPayloadFormatVersion,
(Text
"jwtConfiguration" Text -> JWTConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(JWTConfiguration -> Pair) -> Maybe JWTConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JWTConfiguration
jwtConfiguration,
(Text
"authorizerResultTtlInSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
authorizerResultTtlInSeconds,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"authorizerType" Text -> AuthorizerType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AuthorizerType
authorizerType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"identitySource" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
identitySource),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath CreateAuthorizer where
toPath :: CreateAuthorizer -> ByteString
toPath CreateAuthorizer' {[Text]
Maybe Bool
Maybe Natural
Maybe Text
Maybe JWTConfiguration
Text
AuthorizerType
name :: Text
identitySource :: [Text]
authorizerType :: AuthorizerType
apiId :: Text
authorizerResultTtlInSeconds :: Maybe Natural
jwtConfiguration :: Maybe JWTConfiguration
authorizerPayloadFormatVersion :: Maybe Text
authorizerUri :: Maybe Text
enableSimpleResponses :: Maybe Bool
identityValidationExpression :: Maybe Text
authorizerCredentialsArn :: Maybe Text
$sel:name:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:identitySource:CreateAuthorizer' :: CreateAuthorizer -> [Text]
$sel:authorizerType:CreateAuthorizer' :: CreateAuthorizer -> AuthorizerType
$sel:apiId:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:authorizerResultTtlInSeconds:CreateAuthorizer' :: CreateAuthorizer -> Maybe Natural
$sel:jwtConfiguration:CreateAuthorizer' :: CreateAuthorizer -> Maybe JWTConfiguration
$sel:authorizerPayloadFormatVersion:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:authorizerUri:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:enableSimpleResponses:CreateAuthorizer' :: CreateAuthorizer -> Maybe Bool
$sel:identityValidationExpression:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:authorizerCredentialsArn:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v2/apis/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId, ByteString
"/authorizers"]
instance Core.ToQuery CreateAuthorizer where
toQuery :: CreateAuthorizer -> QueryString
toQuery = QueryString -> CreateAuthorizer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAuthorizerResponse = CreateAuthorizerResponse'
{
CreateAuthorizerResponse -> Maybe Text
authorizerCredentialsArn :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe Text
identityValidationExpression :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe Bool
enableSimpleResponses :: Prelude.Maybe Prelude.Bool,
CreateAuthorizerResponse -> Maybe Text
authorizerUri :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe Text
authorizerPayloadFormatVersion :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe JWTConfiguration
jwtConfiguration :: Prelude.Maybe JWTConfiguration,
CreateAuthorizerResponse -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe Natural
authorizerResultTtlInSeconds :: Prelude.Maybe Prelude.Natural,
CreateAuthorizerResponse -> Maybe [Text]
identitySource :: Prelude.Maybe [Prelude.Text],
CreateAuthorizerResponse -> Maybe AuthorizerType
authorizerType :: Prelude.Maybe AuthorizerType,
CreateAuthorizerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
(CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool)
-> (CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool)
-> Eq CreateAuthorizerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
$c/= :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
== :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
$c== :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
Prelude.Eq, ReadPrec [CreateAuthorizerResponse]
ReadPrec CreateAuthorizerResponse
Int -> ReadS CreateAuthorizerResponse
ReadS [CreateAuthorizerResponse]
(Int -> ReadS CreateAuthorizerResponse)
-> ReadS [CreateAuthorizerResponse]
-> ReadPrec CreateAuthorizerResponse
-> ReadPrec [CreateAuthorizerResponse]
-> Read CreateAuthorizerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAuthorizerResponse]
$creadListPrec :: ReadPrec [CreateAuthorizerResponse]
readPrec :: ReadPrec CreateAuthorizerResponse
$creadPrec :: ReadPrec CreateAuthorizerResponse
readList :: ReadS [CreateAuthorizerResponse]
$creadList :: ReadS [CreateAuthorizerResponse]
readsPrec :: Int -> ReadS CreateAuthorizerResponse
$creadsPrec :: Int -> ReadS CreateAuthorizerResponse
Prelude.Read, Int -> CreateAuthorizerResponse -> ShowS
[CreateAuthorizerResponse] -> ShowS
CreateAuthorizerResponse -> String
(Int -> CreateAuthorizerResponse -> ShowS)
-> (CreateAuthorizerResponse -> String)
-> ([CreateAuthorizerResponse] -> ShowS)
-> Show CreateAuthorizerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAuthorizerResponse] -> ShowS
$cshowList :: [CreateAuthorizerResponse] -> ShowS
show :: CreateAuthorizerResponse -> String
$cshow :: CreateAuthorizerResponse -> String
showsPrec :: Int -> CreateAuthorizerResponse -> ShowS
$cshowsPrec :: Int -> CreateAuthorizerResponse -> ShowS
Prelude.Show, (forall x.
CreateAuthorizerResponse -> Rep CreateAuthorizerResponse x)
-> (forall x.
Rep CreateAuthorizerResponse x -> CreateAuthorizerResponse)
-> Generic CreateAuthorizerResponse
forall x.
Rep CreateAuthorizerResponse x -> CreateAuthorizerResponse
forall x.
CreateAuthorizerResponse -> Rep CreateAuthorizerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAuthorizerResponse x -> CreateAuthorizerResponse
$cfrom :: forall x.
CreateAuthorizerResponse -> Rep CreateAuthorizerResponse x
Prelude.Generic)
newCreateAuthorizerResponse ::
Prelude.Int ->
CreateAuthorizerResponse
newCreateAuthorizerResponse :: Int -> CreateAuthorizerResponse
newCreateAuthorizerResponse Int
pHttpStatus_ =
CreateAuthorizerResponse' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe JWTConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe AuthorizerType
-> Int
-> CreateAuthorizerResponse
CreateAuthorizerResponse'
{ $sel:authorizerCredentialsArn:CreateAuthorizerResponse' :: Maybe Text
authorizerCredentialsArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityValidationExpression:CreateAuthorizerResponse' :: Maybe Text
identityValidationExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableSimpleResponses:CreateAuthorizerResponse' :: Maybe Bool
enableSimpleResponses = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerUri:CreateAuthorizerResponse' :: Maybe Text
authorizerUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerPayloadFormatVersion:CreateAuthorizerResponse' :: Maybe Text
authorizerPayloadFormatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jwtConfiguration:CreateAuthorizerResponse' :: Maybe JWTConfiguration
jwtConfiguration = Maybe JWTConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerId:CreateAuthorizerResponse' :: Maybe Text
authorizerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateAuthorizerResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerResultTtlInSeconds:CreateAuthorizerResponse' :: Maybe Natural
authorizerResultTtlInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:identitySource:CreateAuthorizerResponse' :: Maybe [Text]
identitySource = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerType:CreateAuthorizerResponse' :: Maybe AuthorizerType
authorizerType = Maybe AuthorizerType
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateAuthorizerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createAuthorizerResponse_authorizerCredentialsArn :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_authorizerCredentialsArn :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerCredentialsArn = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
authorizerCredentialsArn :: Maybe Text
$sel:authorizerCredentialsArn:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
authorizerCredentialsArn} -> Maybe Text
authorizerCredentialsArn) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:authorizerCredentialsArn:CreateAuthorizerResponse' :: Maybe Text
authorizerCredentialsArn = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_identityValidationExpression :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_identityValidationExpression :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_identityValidationExpression = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
identityValidationExpression :: Maybe Text
$sel:identityValidationExpression:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
identityValidationExpression} -> Maybe Text
identityValidationExpression) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:identityValidationExpression:CreateAuthorizerResponse' :: Maybe Text
identityValidationExpression = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_enableSimpleResponses :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Bool)
createAuthorizerResponse_enableSimpleResponses :: (Maybe Bool -> f (Maybe Bool))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_enableSimpleResponses = (CreateAuthorizerResponse -> Maybe Bool)
-> (CreateAuthorizerResponse
-> Maybe Bool -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Bool
enableSimpleResponses :: Maybe Bool
$sel:enableSimpleResponses:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Bool
enableSimpleResponses} -> Maybe Bool
enableSimpleResponses) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Bool
a -> CreateAuthorizerResponse
s {$sel:enableSimpleResponses:CreateAuthorizerResponse' :: Maybe Bool
enableSimpleResponses = Maybe Bool
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_authorizerUri :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_authorizerUri :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerUri = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
authorizerUri :: Maybe Text
$sel:authorizerUri:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
authorizerUri} -> Maybe Text
authorizerUri) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:authorizerUri:CreateAuthorizerResponse' :: Maybe Text
authorizerUri = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_authorizerPayloadFormatVersion :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_authorizerPayloadFormatVersion :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerPayloadFormatVersion = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
authorizerPayloadFormatVersion :: Maybe Text
$sel:authorizerPayloadFormatVersion:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
authorizerPayloadFormatVersion} -> Maybe Text
authorizerPayloadFormatVersion) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:authorizerPayloadFormatVersion:CreateAuthorizerResponse' :: Maybe Text
authorizerPayloadFormatVersion = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_jwtConfiguration :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe JWTConfiguration)
createAuthorizerResponse_jwtConfiguration :: (Maybe JWTConfiguration -> f (Maybe JWTConfiguration))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_jwtConfiguration = (CreateAuthorizerResponse -> Maybe JWTConfiguration)
-> (CreateAuthorizerResponse
-> Maybe JWTConfiguration -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe JWTConfiguration)
(Maybe JWTConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe JWTConfiguration
jwtConfiguration :: Maybe JWTConfiguration
$sel:jwtConfiguration:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe JWTConfiguration
jwtConfiguration} -> Maybe JWTConfiguration
jwtConfiguration) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe JWTConfiguration
a -> CreateAuthorizerResponse
s {$sel:jwtConfiguration:CreateAuthorizerResponse' :: Maybe JWTConfiguration
jwtConfiguration = Maybe JWTConfiguration
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_authorizerId :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_authorizerId :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerId = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:authorizerId:CreateAuthorizerResponse' :: Maybe Text
authorizerId = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_name :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_name = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:name:CreateAuthorizerResponse' :: Maybe Text
name = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_authorizerResultTtlInSeconds :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Natural)
createAuthorizerResponse_authorizerResultTtlInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerResultTtlInSeconds = (CreateAuthorizerResponse -> Maybe Natural)
-> (CreateAuthorizerResponse
-> Maybe Natural -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Natural
authorizerResultTtlInSeconds :: Maybe Natural
$sel:authorizerResultTtlInSeconds:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Natural
authorizerResultTtlInSeconds} -> Maybe Natural
authorizerResultTtlInSeconds) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Natural
a -> CreateAuthorizerResponse
s {$sel:authorizerResultTtlInSeconds:CreateAuthorizerResponse' :: Maybe Natural
authorizerResultTtlInSeconds = Maybe Natural
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_identitySource :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe [Prelude.Text])
createAuthorizerResponse_identitySource :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_identitySource = (CreateAuthorizerResponse -> Maybe [Text])
-> (CreateAuthorizerResponse
-> Maybe [Text] -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe [Text]
identitySource :: Maybe [Text]
$sel:identitySource:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe [Text]
identitySource} -> Maybe [Text]
identitySource) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe [Text]
a -> CreateAuthorizerResponse
s {$sel:identitySource:CreateAuthorizerResponse' :: Maybe [Text]
identitySource = Maybe [Text]
a} :: CreateAuthorizerResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAuthorizerResponse
-> f CreateAuthorizerResponse
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
createAuthorizerResponse_authorizerType :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe AuthorizerType)
createAuthorizerResponse_authorizerType :: (Maybe AuthorizerType -> f (Maybe AuthorizerType))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerType = (CreateAuthorizerResponse -> Maybe AuthorizerType)
-> (CreateAuthorizerResponse
-> Maybe AuthorizerType -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe AuthorizerType)
(Maybe AuthorizerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe AuthorizerType
authorizerType :: Maybe AuthorizerType
$sel:authorizerType:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe AuthorizerType
authorizerType} -> Maybe AuthorizerType
authorizerType) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe AuthorizerType
a -> CreateAuthorizerResponse
s {$sel:authorizerType:CreateAuthorizerResponse' :: Maybe AuthorizerType
authorizerType = Maybe AuthorizerType
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_httpStatus :: Lens.Lens' CreateAuthorizerResponse Prelude.Int
createAuthorizerResponse_httpStatus :: (Int -> f Int)
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_httpStatus = (CreateAuthorizerResponse -> Int)
-> (CreateAuthorizerResponse -> Int -> CreateAuthorizerResponse)
-> Lens CreateAuthorizerResponse CreateAuthorizerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Int
a -> CreateAuthorizerResponse
s {$sel:httpStatus:CreateAuthorizerResponse' :: Int
httpStatus = Int
a} :: CreateAuthorizerResponse)
instance Prelude.NFData CreateAuthorizerResponse