{-# 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.Route where
import Amazonka.ApiGatewayV2.Types.AuthorizationType
import Amazonka.ApiGatewayV2.Types.ParameterConstraints
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Route = Route'
{
Route -> Maybe [Text]
authorizationScopes :: Prelude.Maybe [Prelude.Text],
Route -> Maybe Text
modelSelectionExpression :: Prelude.Maybe Prelude.Text,
Route -> Maybe (HashMap Text Text)
requestModels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Route -> Maybe Text
routeResponseSelectionExpression :: Prelude.Maybe Prelude.Text,
Route -> Maybe (HashMap Text ParameterConstraints)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints),
Route -> Maybe Text
routeId :: Prelude.Maybe Prelude.Text,
Route -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
Route -> Maybe Text
operationName :: Prelude.Maybe Prelude.Text,
Route -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
Route -> Maybe AuthorizationType
authorizationType :: Prelude.Maybe AuthorizationType,
Route -> Maybe Bool
apiKeyRequired :: Prelude.Maybe Prelude.Bool,
Route -> Maybe Text
target :: Prelude.Maybe Prelude.Text,
Route -> Text
routeKey :: Prelude.Text
}
deriving (Route -> Route -> Bool
(Route -> Route -> Bool) -> (Route -> Route -> Bool) -> Eq Route
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Route -> Route -> Bool
$c/= :: Route -> Route -> Bool
== :: Route -> Route -> Bool
$c== :: Route -> Route -> Bool
Prelude.Eq, ReadPrec [Route]
ReadPrec Route
Int -> ReadS Route
ReadS [Route]
(Int -> ReadS Route)
-> ReadS [Route]
-> ReadPrec Route
-> ReadPrec [Route]
-> Read Route
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Route]
$creadListPrec :: ReadPrec [Route]
readPrec :: ReadPrec Route
$creadPrec :: ReadPrec Route
readList :: ReadS [Route]
$creadList :: ReadS [Route]
readsPrec :: Int -> ReadS Route
$creadsPrec :: Int -> ReadS Route
Prelude.Read, Int -> Route -> ShowS
[Route] -> ShowS
Route -> String
(Int -> Route -> ShowS)
-> (Route -> String) -> ([Route] -> ShowS) -> Show Route
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Route] -> ShowS
$cshowList :: [Route] -> ShowS
show :: Route -> String
$cshow :: Route -> String
showsPrec :: Int -> Route -> ShowS
$cshowsPrec :: Int -> Route -> ShowS
Prelude.Show, (forall x. Route -> Rep Route x)
-> (forall x. Rep Route x -> Route) -> Generic Route
forall x. Rep Route x -> Route
forall x. Route -> Rep Route x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Route x -> Route
$cfrom :: forall x. Route -> Rep Route x
Prelude.Generic)
newRoute ::
Prelude.Text ->
Route
newRoute :: Text -> Route
newRoute Text
pRouteKey_ =
Route' :: Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route
Route'
{ $sel:authorizationScopes:Route' :: Maybe [Text]
authorizationScopes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:modelSelectionExpression:Route' :: Maybe Text
modelSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestModels:Route' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:routeResponseSelectionExpression:Route' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestParameters:Route' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
forall a. Maybe a
Prelude.Nothing,
$sel:routeId:Route' :: Maybe Text
routeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerId:Route' :: Maybe Text
authorizerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:operationName:Route' :: Maybe Text
operationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:apiGatewayManaged:Route' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:authorizationType:Route' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
forall a. Maybe a
Prelude.Nothing,
$sel:apiKeyRequired:Route' :: Maybe Bool
apiKeyRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:target:Route' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:routeKey:Route' :: Text
routeKey = Text
pRouteKey_
}
route_authorizationScopes :: Lens.Lens' Route (Prelude.Maybe [Prelude.Text])
route_authorizationScopes :: (Maybe [Text] -> f (Maybe [Text])) -> Route -> f Route
route_authorizationScopes = (Route -> Maybe [Text])
-> (Route -> Maybe [Text] -> Route)
-> Lens Route Route (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe [Text]
authorizationScopes :: Maybe [Text]
$sel:authorizationScopes:Route' :: Route -> Maybe [Text]
authorizationScopes} -> Maybe [Text]
authorizationScopes) (\s :: Route
s@Route' {} Maybe [Text]
a -> Route
s {$sel:authorizationScopes:Route' :: Maybe [Text]
authorizationScopes = Maybe [Text]
a} :: Route) ((Maybe [Text] -> f (Maybe [Text])) -> Route -> f Route)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Route
-> f Route
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
route_modelSelectionExpression :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_modelSelectionExpression :: (Maybe Text -> f (Maybe Text)) -> Route -> f Route
route_modelSelectionExpression = (Route -> Maybe Text)
-> (Route -> Maybe Text -> Route)
-> Lens Route Route (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
modelSelectionExpression :: Maybe Text
$sel:modelSelectionExpression:Route' :: Route -> Maybe Text
modelSelectionExpression} -> Maybe Text
modelSelectionExpression) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:modelSelectionExpression:Route' :: Maybe Text
modelSelectionExpression = Maybe Text
a} :: Route)
route_requestModels :: Lens.Lens' Route (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
route_requestModels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Route -> f Route
route_requestModels = (Route -> Maybe (HashMap Text Text))
-> (Route -> Maybe (HashMap Text Text) -> Route)
-> Lens
Route Route (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe (HashMap Text Text)
requestModels :: Maybe (HashMap Text Text)
$sel:requestModels:Route' :: Route -> Maybe (HashMap Text Text)
requestModels} -> Maybe (HashMap Text Text)
requestModels) (\s :: Route
s@Route' {} Maybe (HashMap Text Text)
a -> Route
s {$sel:requestModels:Route' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
a} :: Route) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Route -> f Route)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Route
-> f Route
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
route_routeResponseSelectionExpression :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_routeResponseSelectionExpression :: (Maybe Text -> f (Maybe Text)) -> Route -> f Route
route_routeResponseSelectionExpression = (Route -> Maybe Text)
-> (Route -> Maybe Text -> Route)
-> Lens Route Route (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
routeResponseSelectionExpression :: Maybe Text
$sel:routeResponseSelectionExpression:Route' :: Route -> Maybe Text
routeResponseSelectionExpression} -> Maybe Text
routeResponseSelectionExpression) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:routeResponseSelectionExpression:Route' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
a} :: Route)
route_requestParameters :: Lens.Lens' Route (Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints))
route_requestParameters :: (Maybe (HashMap Text ParameterConstraints)
-> f (Maybe (HashMap Text ParameterConstraints)))
-> Route -> f Route
route_requestParameters = (Route -> Maybe (HashMap Text ParameterConstraints))
-> (Route -> Maybe (HashMap Text ParameterConstraints) -> Route)
-> Lens
Route
Route
(Maybe (HashMap Text ParameterConstraints))
(Maybe (HashMap Text ParameterConstraints))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe (HashMap Text ParameterConstraints)
requestParameters :: Maybe (HashMap Text ParameterConstraints)
$sel:requestParameters:Route' :: Route -> Maybe (HashMap Text ParameterConstraints)
requestParameters} -> Maybe (HashMap Text ParameterConstraints)
requestParameters) (\s :: Route
s@Route' {} Maybe (HashMap Text ParameterConstraints)
a -> Route
s {$sel:requestParameters:Route' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
a} :: Route) ((Maybe (HashMap Text ParameterConstraints)
-> f (Maybe (HashMap Text ParameterConstraints)))
-> Route -> f Route)
-> ((Maybe (HashMap Text ParameterConstraints)
-> f (Maybe (HashMap Text ParameterConstraints)))
-> Maybe (HashMap Text ParameterConstraints)
-> f (Maybe (HashMap Text ParameterConstraints)))
-> (Maybe (HashMap Text ParameterConstraints)
-> f (Maybe (HashMap Text ParameterConstraints)))
-> Route
-> f Route
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text ParameterConstraints)
(HashMap Text ParameterConstraints)
(HashMap Text ParameterConstraints)
(HashMap Text ParameterConstraints)
-> Iso
(Maybe (HashMap Text ParameterConstraints))
(Maybe (HashMap Text ParameterConstraints))
(Maybe (HashMap Text ParameterConstraints))
(Maybe (HashMap Text ParameterConstraints))
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
(HashMap Text ParameterConstraints)
(HashMap Text ParameterConstraints)
(HashMap Text ParameterConstraints)
(HashMap Text ParameterConstraints)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
route_routeId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_routeId :: (Maybe Text -> f (Maybe Text)) -> Route -> f Route
route_routeId = (Route -> Maybe Text)
-> (Route -> Maybe Text -> Route)
-> Lens Route Route (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
routeId :: Maybe Text
$sel:routeId:Route' :: Route -> Maybe Text
routeId} -> Maybe Text
routeId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:routeId:Route' :: Maybe Text
routeId = Maybe Text
a} :: Route)
route_authorizerId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_authorizerId :: (Maybe Text -> f (Maybe Text)) -> Route -> f Route
route_authorizerId = (Route -> Maybe Text)
-> (Route -> Maybe Text -> Route)
-> Lens Route Route (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:Route' :: Route -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:authorizerId:Route' :: Maybe Text
authorizerId = Maybe Text
a} :: Route)
route_operationName :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_operationName :: (Maybe Text -> f (Maybe Text)) -> Route -> f Route
route_operationName = (Route -> Maybe Text)
-> (Route -> Maybe Text -> Route)
-> Lens Route Route (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
operationName :: Maybe Text
$sel:operationName:Route' :: Route -> Maybe Text
operationName} -> Maybe Text
operationName) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:operationName:Route' :: Maybe Text
operationName = Maybe Text
a} :: Route)
route_apiGatewayManaged :: Lens.Lens' Route (Prelude.Maybe Prelude.Bool)
route_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool)) -> Route -> f Route
route_apiGatewayManaged = (Route -> Maybe Bool)
-> (Route -> Maybe Bool -> Route)
-> Lens Route Route (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:Route' :: Route -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: Route
s@Route' {} Maybe Bool
a -> Route
s {$sel:apiGatewayManaged:Route' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: Route)
route_authorizationType :: Lens.Lens' Route (Prelude.Maybe AuthorizationType)
route_authorizationType :: (Maybe AuthorizationType -> f (Maybe AuthorizationType))
-> Route -> f Route
route_authorizationType = (Route -> Maybe AuthorizationType)
-> (Route -> Maybe AuthorizationType -> Route)
-> Lens
Route Route (Maybe AuthorizationType) (Maybe AuthorizationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe AuthorizationType
authorizationType :: Maybe AuthorizationType
$sel:authorizationType:Route' :: Route -> Maybe AuthorizationType
authorizationType} -> Maybe AuthorizationType
authorizationType) (\s :: Route
s@Route' {} Maybe AuthorizationType
a -> Route
s {$sel:authorizationType:Route' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
a} :: Route)
route_apiKeyRequired :: Lens.Lens' Route (Prelude.Maybe Prelude.Bool)
route_apiKeyRequired :: (Maybe Bool -> f (Maybe Bool)) -> Route -> f Route
route_apiKeyRequired = (Route -> Maybe Bool)
-> (Route -> Maybe Bool -> Route)
-> Lens Route Route (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Bool
apiKeyRequired :: Maybe Bool
$sel:apiKeyRequired:Route' :: Route -> Maybe Bool
apiKeyRequired} -> Maybe Bool
apiKeyRequired) (\s :: Route
s@Route' {} Maybe Bool
a -> Route
s {$sel:apiKeyRequired:Route' :: Maybe Bool
apiKeyRequired = Maybe Bool
a} :: Route)
route_target :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_target :: (Maybe Text -> f (Maybe Text)) -> Route -> f Route
route_target = (Route -> Maybe Text)
-> (Route -> Maybe Text -> Route)
-> Lens Route Route (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
target :: Maybe Text
$sel:target:Route' :: Route -> Maybe Text
target} -> Maybe Text
target) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:target:Route' :: Maybe Text
target = Maybe Text
a} :: Route)
route_routeKey :: Lens.Lens' Route Prelude.Text
route_routeKey :: (Text -> f Text) -> Route -> f Route
route_routeKey = (Route -> Text)
-> (Route -> Text -> Route) -> Lens Route Route Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Text
routeKey :: Text
$sel:routeKey:Route' :: Route -> Text
routeKey} -> Text
routeKey) (\s :: Route
s@Route' {} Text
a -> Route
s {$sel:routeKey:Route' :: Text
routeKey = Text
a} :: Route)
instance Core.FromJSON Route where
parseJSON :: Value -> Parser Route
parseJSON =
String -> (Object -> Parser Route) -> Value -> Parser Route
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Route"
( \Object
x ->
Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route
Route'
(Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
forall (f :: * -> *) a b. Functor 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
"authorizationScopes"
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 Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
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
"modelSelectionExpression")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requestModels" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
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
"routeResponseSelectionExpression")
Parser
(Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe (HashMap Text ParameterConstraints))
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe (HashMap Text ParameterConstraints)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requestParameters"
Parser (Maybe (Maybe (HashMap Text ParameterConstraints)))
-> Maybe (HashMap Text ParameterConstraints)
-> Parser (Maybe (HashMap Text ParameterConstraints))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text ParameterConstraints)
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
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
"routeId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
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 Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
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
"operationName")
Parser
(Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Text
-> Route)
-> Parser (Maybe Bool)
-> Parser
(Maybe AuthorizationType
-> Maybe Bool -> Maybe Text -> Text -> Route)
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
"apiGatewayManaged")
Parser
(Maybe AuthorizationType
-> Maybe Bool -> Maybe Text -> Text -> Route)
-> Parser (Maybe AuthorizationType)
-> Parser (Maybe Bool -> Maybe Text -> Text -> Route)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuthorizationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authorizationType")
Parser (Maybe Bool -> Maybe Text -> Text -> Route)
-> Parser (Maybe Bool) -> Parser (Maybe Text -> Text -> Route)
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
"apiKeyRequired")
Parser (Maybe Text -> Text -> Route)
-> Parser (Maybe Text) -> Parser (Text -> Route)
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
"target")
Parser (Text -> Route) -> Parser Text -> Parser Route
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
"routeKey")
)
instance Prelude.Hashable Route
instance Prelude.NFData Route