{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApiGatewayV2.GetRoute
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a Route.
module Amazonka.ApiGatewayV2.GetRoute
  ( -- * Creating a Request
    GetRoute (..),
    newGetRoute,

    -- * Request Lenses
    getRoute_apiId,
    getRoute_routeId,

    -- * Destructuring the Response
    GetRouteResponse' (..),
    newGetRouteResponse',

    -- * Response Lenses
    getRouteResponse'_authorizationScopes,
    getRouteResponse'_modelSelectionExpression,
    getRouteResponse'_requestModels,
    getRouteResponse'_routeResponseSelectionExpression,
    getRouteResponse'_requestParameters,
    getRouteResponse'_routeId,
    getRouteResponse'_authorizerId,
    getRouteResponse'_operationName,
    getRouteResponse'_apiGatewayManaged,
    getRouteResponse'_authorizationType,
    getRouteResponse'_apiKeyRequired,
    getRouteResponse'_routeKey,
    getRouteResponse'_target,
    getRouteResponse'_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

-- | /See:/ 'newGetRoute' smart constructor.
data GetRoute = GetRoute'
  { -- | The API identifier.
    GetRoute -> Text
apiId :: Prelude.Text,
    -- | The route ID.
    GetRoute -> Text
routeId :: Prelude.Text
  }
  deriving (GetRoute -> GetRoute -> Bool
(GetRoute -> GetRoute -> Bool)
-> (GetRoute -> GetRoute -> Bool) -> Eq GetRoute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRoute -> GetRoute -> Bool
$c/= :: GetRoute -> GetRoute -> Bool
== :: GetRoute -> GetRoute -> Bool
$c== :: GetRoute -> GetRoute -> Bool
Prelude.Eq, ReadPrec [GetRoute]
ReadPrec GetRoute
Int -> ReadS GetRoute
ReadS [GetRoute]
(Int -> ReadS GetRoute)
-> ReadS [GetRoute]
-> ReadPrec GetRoute
-> ReadPrec [GetRoute]
-> Read GetRoute
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRoute]
$creadListPrec :: ReadPrec [GetRoute]
readPrec :: ReadPrec GetRoute
$creadPrec :: ReadPrec GetRoute
readList :: ReadS [GetRoute]
$creadList :: ReadS [GetRoute]
readsPrec :: Int -> ReadS GetRoute
$creadsPrec :: Int -> ReadS GetRoute
Prelude.Read, Int -> GetRoute -> ShowS
[GetRoute] -> ShowS
GetRoute -> String
(Int -> GetRoute -> ShowS)
-> (GetRoute -> String) -> ([GetRoute] -> ShowS) -> Show GetRoute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRoute] -> ShowS
$cshowList :: [GetRoute] -> ShowS
show :: GetRoute -> String
$cshow :: GetRoute -> String
showsPrec :: Int -> GetRoute -> ShowS
$cshowsPrec :: Int -> GetRoute -> ShowS
Prelude.Show, (forall x. GetRoute -> Rep GetRoute x)
-> (forall x. Rep GetRoute x -> GetRoute) -> Generic GetRoute
forall x. Rep GetRoute x -> GetRoute
forall x. GetRoute -> Rep GetRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRoute x -> GetRoute
$cfrom :: forall x. GetRoute -> Rep GetRoute x
Prelude.Generic)

-- |
-- Create a value of 'GetRoute' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiId', 'getRoute_apiId' - The API identifier.
--
-- 'routeId', 'getRoute_routeId' - The route ID.
newGetRoute ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'routeId'
  Prelude.Text ->
  GetRoute
newGetRoute :: Text -> Text -> GetRoute
newGetRoute Text
pApiId_ Text
pRouteId_ =
  GetRoute' :: Text -> Text -> GetRoute
GetRoute' {$sel:apiId:GetRoute' :: Text
apiId = Text
pApiId_, $sel:routeId:GetRoute' :: Text
routeId = Text
pRouteId_}

-- | The API identifier.
getRoute_apiId :: Lens.Lens' GetRoute Prelude.Text
getRoute_apiId :: (Text -> f Text) -> GetRoute -> f GetRoute
getRoute_apiId = (GetRoute -> Text)
-> (GetRoute -> Text -> GetRoute)
-> Lens GetRoute GetRoute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoute' {Text
apiId :: Text
$sel:apiId:GetRoute' :: GetRoute -> Text
apiId} -> Text
apiId) (\s :: GetRoute
s@GetRoute' {} Text
a -> GetRoute
s {$sel:apiId:GetRoute' :: Text
apiId = Text
a} :: GetRoute)

-- | The route ID.
getRoute_routeId :: Lens.Lens' GetRoute Prelude.Text
getRoute_routeId :: (Text -> f Text) -> GetRoute -> f GetRoute
getRoute_routeId = (GetRoute -> Text)
-> (GetRoute -> Text -> GetRoute)
-> Lens GetRoute GetRoute Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoute' {Text
routeId :: Text
$sel:routeId:GetRoute' :: GetRoute -> Text
routeId} -> Text
routeId) (\s :: GetRoute
s@GetRoute' {} Text
a -> GetRoute
s {$sel:routeId:GetRoute' :: Text
routeId = Text
a} :: GetRoute)

instance Core.AWSRequest GetRoute where
  type AWSResponse GetRoute = GetRouteResponse'
  request :: GetRoute -> Request GetRoute
request = Service -> GetRoute -> Request GetRoute
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetRoute
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetRoute)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetRoute))
-> Logger
-> Service
-> Proxy GetRoute
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetRoute)))
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 (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Int
-> GetRouteResponse'
GetRouteResponse''
            (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
 -> Maybe Text
 -> Int
 -> GetRouteResponse')
-> Either String (Maybe [Text])
-> Either
     String
     (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
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
forall (f :: * -> *) a b. Functor 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
"authorizationScopes"
                            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 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
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe (HashMap Text ParameterConstraints)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
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
"modelSelectionExpression")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe (HashMap Text ParameterConstraints)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text ParameterConstraints)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestModels" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text ParameterConstraints)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text ParameterConstraints)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
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
"routeResponseSelectionExpression")
            Either
  String
  (Maybe (HashMap Text ParameterConstraints)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe (HashMap Text ParameterConstraints))
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe (HashMap Text ParameterConstraints)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestParameters"
                            Either String (Maybe (Maybe (HashMap Text ParameterConstraints)))
-> Maybe (HashMap Text ParameterConstraints)
-> Either String (Maybe (HashMap Text ParameterConstraints))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text ParameterConstraints)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
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
"routeId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
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 Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
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
"operationName")
            Either
  String
  (Maybe Bool
   -> Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetRouteResponse')
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
"apiGatewayManaged")
            Either
  String
  (Maybe AuthorizationType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetRouteResponse')
-> Either String (Maybe AuthorizationType)
-> Either
     String
     (Maybe Bool
      -> Maybe Text -> Maybe Text -> Int -> GetRouteResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AuthorizationType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authorizationType")
            Either
  String
  (Maybe Bool
   -> Maybe Text -> Maybe Text -> Int -> GetRouteResponse')
-> Either String (Maybe Bool)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> GetRouteResponse')
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
"apiKeyRequired")
            Either
  String (Maybe Text -> Maybe Text -> Int -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetRouteResponse')
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
"routeKey")
            Either String (Maybe Text -> Int -> GetRouteResponse')
-> Either String (Maybe Text)
-> Either String (Int -> GetRouteResponse')
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
"target")
            Either String (Int -> GetRouteResponse')
-> Either String Int -> Either String GetRouteResponse'
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 GetRoute

instance Prelude.NFData GetRoute

instance Core.ToHeaders GetRoute where
  toHeaders :: GetRoute -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetRoute -> 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.ToPath GetRoute where
  toPath :: GetRoute -> ByteString
toPath GetRoute' {Text
routeId :: Text
apiId :: Text
$sel:routeId:GetRoute' :: GetRoute -> Text
$sel:apiId:GetRoute' :: GetRoute -> 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
"/routes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routeId
      ]

instance Core.ToQuery GetRoute where
  toQuery :: GetRoute -> QueryString
toQuery = QueryString -> GetRoute -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetRouteResponse'' smart constructor.
data GetRouteResponse' = GetRouteResponse''
  { -- | A list of authorization scopes configured on a route. The scopes are
    -- used with a JWT authorizer to authorize the method invocation. The
    -- authorization works by matching the route scopes against the scopes
    -- parsed from the access token in the incoming request. The method
    -- invocation is authorized if any route scope matches a claimed scope in
    -- the access token. Otherwise, the invocation is not authorized. When the
    -- route scope is configured, the client must provide an access token
    -- instead of an identity token for authorization purposes.
    GetRouteResponse' -> Maybe [Text]
authorizationScopes :: Prelude.Maybe [Prelude.Text],
    -- | The model selection expression for the route. Supported only for
    -- WebSocket APIs.
    GetRouteResponse' -> Maybe Text
modelSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The request models for the route. Supported only for WebSocket APIs.
    GetRouteResponse' -> Maybe (HashMap Text Text)
requestModels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The route response selection expression for the route. Supported only
    -- for WebSocket APIs.
    GetRouteResponse' -> Maybe Text
routeResponseSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The request parameters for the route. Supported only for WebSocket APIs.
    GetRouteResponse' -> Maybe (HashMap Text ParameterConstraints)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints),
    -- | The route ID.
    GetRouteResponse' -> Maybe Text
routeId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the Authorizer resource to be associated with this
    -- route. The authorizer identifier is generated by API Gateway when you
    -- created the authorizer.
    GetRouteResponse' -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
    -- | The operation name for the route.
    GetRouteResponse' -> Maybe Text
operationName :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether a route is managed by API Gateway. If you created an
    -- API using quick create, the $default route is managed by API Gateway.
    -- You can\'t modify the $default route key.
    GetRouteResponse' -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | The authorization type for the route. For WebSocket APIs, valid values
    -- are NONE for open access, AWS_IAM for using AWS IAM permissions, and
    -- CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are
    -- NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using
    -- AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    GetRouteResponse' -> Maybe AuthorizationType
authorizationType :: Prelude.Maybe AuthorizationType,
    -- | Specifies whether an API key is required for this route. Supported only
    -- for WebSocket APIs.
    GetRouteResponse' -> Maybe Bool
apiKeyRequired :: Prelude.Maybe Prelude.Bool,
    -- | The route key for the route.
    GetRouteResponse' -> Maybe Text
routeKey :: Prelude.Maybe Prelude.Text,
    -- | The target for the route.
    GetRouteResponse' -> Maybe Text
target :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetRouteResponse' -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetRouteResponse' -> GetRouteResponse' -> Bool
(GetRouteResponse' -> GetRouteResponse' -> Bool)
-> (GetRouteResponse' -> GetRouteResponse' -> Bool)
-> Eq GetRouteResponse'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRouteResponse' -> GetRouteResponse' -> Bool
$c/= :: GetRouteResponse' -> GetRouteResponse' -> Bool
== :: GetRouteResponse' -> GetRouteResponse' -> Bool
$c== :: GetRouteResponse' -> GetRouteResponse' -> Bool
Prelude.Eq, ReadPrec [GetRouteResponse']
ReadPrec GetRouteResponse'
Int -> ReadS GetRouteResponse'
ReadS [GetRouteResponse']
(Int -> ReadS GetRouteResponse')
-> ReadS [GetRouteResponse']
-> ReadPrec GetRouteResponse'
-> ReadPrec [GetRouteResponse']
-> Read GetRouteResponse'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRouteResponse']
$creadListPrec :: ReadPrec [GetRouteResponse']
readPrec :: ReadPrec GetRouteResponse'
$creadPrec :: ReadPrec GetRouteResponse'
readList :: ReadS [GetRouteResponse']
$creadList :: ReadS [GetRouteResponse']
readsPrec :: Int -> ReadS GetRouteResponse'
$creadsPrec :: Int -> ReadS GetRouteResponse'
Prelude.Read, Int -> GetRouteResponse' -> ShowS
[GetRouteResponse'] -> ShowS
GetRouteResponse' -> String
(Int -> GetRouteResponse' -> ShowS)
-> (GetRouteResponse' -> String)
-> ([GetRouteResponse'] -> ShowS)
-> Show GetRouteResponse'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRouteResponse'] -> ShowS
$cshowList :: [GetRouteResponse'] -> ShowS
show :: GetRouteResponse' -> String
$cshow :: GetRouteResponse' -> String
showsPrec :: Int -> GetRouteResponse' -> ShowS
$cshowsPrec :: Int -> GetRouteResponse' -> ShowS
Prelude.Show, (forall x. GetRouteResponse' -> Rep GetRouteResponse' x)
-> (forall x. Rep GetRouteResponse' x -> GetRouteResponse')
-> Generic GetRouteResponse'
forall x. Rep GetRouteResponse' x -> GetRouteResponse'
forall x. GetRouteResponse' -> Rep GetRouteResponse' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRouteResponse' x -> GetRouteResponse'
$cfrom :: forall x. GetRouteResponse' -> Rep GetRouteResponse' x
Prelude.Generic)

-- |
-- Create a value of 'GetRouteResponse'' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'authorizationScopes', 'getRouteResponse'_authorizationScopes' - A list of authorization scopes configured on a route. The scopes are
-- used with a JWT authorizer to authorize the method invocation. The
-- authorization works by matching the route scopes against the scopes
-- parsed from the access token in the incoming request. The method
-- invocation is authorized if any route scope matches a claimed scope in
-- the access token. Otherwise, the invocation is not authorized. When the
-- route scope is configured, the client must provide an access token
-- instead of an identity token for authorization purposes.
--
-- 'modelSelectionExpression', 'getRouteResponse'_modelSelectionExpression' - The model selection expression for the route. Supported only for
-- WebSocket APIs.
--
-- 'requestModels', 'getRouteResponse'_requestModels' - The request models for the route. Supported only for WebSocket APIs.
--
-- 'routeResponseSelectionExpression', 'getRouteResponse'_routeResponseSelectionExpression' - The route response selection expression for the route. Supported only
-- for WebSocket APIs.
--
-- 'requestParameters', 'getRouteResponse'_requestParameters' - The request parameters for the route. Supported only for WebSocket APIs.
--
-- 'routeId', 'getRouteResponse'_routeId' - The route ID.
--
-- 'authorizerId', 'getRouteResponse'_authorizerId' - The identifier of the Authorizer resource to be associated with this
-- route. The authorizer identifier is generated by API Gateway when you
-- created the authorizer.
--
-- 'operationName', 'getRouteResponse'_operationName' - The operation name for the route.
--
-- 'apiGatewayManaged', 'getRouteResponse'_apiGatewayManaged' - Specifies whether a route is managed by API Gateway. If you created an
-- API using quick create, the $default route is managed by API Gateway.
-- You can\'t modify the $default route key.
--
-- 'authorizationType', 'getRouteResponse'_authorizationType' - The authorization type for the route. For WebSocket APIs, valid values
-- are NONE for open access, AWS_IAM for using AWS IAM permissions, and
-- CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are
-- NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using
-- AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
--
-- 'apiKeyRequired', 'getRouteResponse'_apiKeyRequired' - Specifies whether an API key is required for this route. Supported only
-- for WebSocket APIs.
--
-- 'routeKey', 'getRouteResponse'_routeKey' - The route key for the route.
--
-- 'target', 'getRouteResponse'_target' - The target for the route.
--
-- 'httpStatus', 'getRouteResponse'_httpStatus' - The response's http status code.
newGetRouteResponse' ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRouteResponse'
newGetRouteResponse' :: Int -> GetRouteResponse'
newGetRouteResponse' Int
pHttpStatus_ =
  GetRouteResponse'' :: 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
-> Maybe Text
-> Int
-> GetRouteResponse'
GetRouteResponse''
    { $sel:authorizationScopes:GetRouteResponse'' :: Maybe [Text]
authorizationScopes =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:modelSelectionExpression:GetRouteResponse'' :: Maybe Text
modelSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestModels:GetRouteResponse'' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:routeResponseSelectionExpression:GetRouteResponse'' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:GetRouteResponse'' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
forall a. Maybe a
Prelude.Nothing,
      $sel:routeId:GetRouteResponse'' :: Maybe Text
routeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerId:GetRouteResponse'' :: Maybe Text
authorizerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operationName:GetRouteResponse'' :: Maybe Text
operationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:GetRouteResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizationType:GetRouteResponse'' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
forall a. Maybe a
Prelude.Nothing,
      $sel:apiKeyRequired:GetRouteResponse'' :: Maybe Bool
apiKeyRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:routeKey:GetRouteResponse'' :: Maybe Text
routeKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:target:GetRouteResponse'' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetRouteResponse'' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of authorization scopes configured on a route. The scopes are
-- used with a JWT authorizer to authorize the method invocation. The
-- authorization works by matching the route scopes against the scopes
-- parsed from the access token in the incoming request. The method
-- invocation is authorized if any route scope matches a claimed scope in
-- the access token. Otherwise, the invocation is not authorized. When the
-- route scope is configured, the client must provide an access token
-- instead of an identity token for authorization purposes.
getRouteResponse'_authorizationScopes :: Lens.Lens' GetRouteResponse' (Prelude.Maybe [Prelude.Text])
getRouteResponse'_authorizationScopes :: (Maybe [Text] -> f (Maybe [Text]))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_authorizationScopes = (GetRouteResponse' -> Maybe [Text])
-> (GetRouteResponse' -> Maybe [Text] -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe [Text]
authorizationScopes :: Maybe [Text]
$sel:authorizationScopes:GetRouteResponse'' :: GetRouteResponse' -> Maybe [Text]
authorizationScopes} -> Maybe [Text]
authorizationScopes) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe [Text]
a -> GetRouteResponse'
s {$sel:authorizationScopes:GetRouteResponse'' :: Maybe [Text]
authorizationScopes = Maybe [Text]
a} :: GetRouteResponse') ((Maybe [Text] -> f (Maybe [Text]))
 -> GetRouteResponse' -> f GetRouteResponse')
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetRouteResponse'
-> f GetRouteResponse'
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

-- | The model selection expression for the route. Supported only for
-- WebSocket APIs.
getRouteResponse'_modelSelectionExpression :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_modelSelectionExpression :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_modelSelectionExpression = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
modelSelectionExpression :: Maybe Text
$sel:modelSelectionExpression:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
modelSelectionExpression} -> Maybe Text
modelSelectionExpression) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:modelSelectionExpression:GetRouteResponse'' :: Maybe Text
modelSelectionExpression = Maybe Text
a} :: GetRouteResponse')

-- | The request models for the route. Supported only for WebSocket APIs.
getRouteResponse'_requestModels :: Lens.Lens' GetRouteResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getRouteResponse'_requestModels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_requestModels = (GetRouteResponse' -> Maybe (HashMap Text Text))
-> (GetRouteResponse'
    -> Maybe (HashMap Text Text) -> GetRouteResponse')
-> Lens
     GetRouteResponse'
     GetRouteResponse'
     (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 (\GetRouteResponse'' {Maybe (HashMap Text Text)
requestModels :: Maybe (HashMap Text Text)
$sel:requestModels:GetRouteResponse'' :: GetRouteResponse' -> Maybe (HashMap Text Text)
requestModels} -> Maybe (HashMap Text Text)
requestModels) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe (HashMap Text Text)
a -> GetRouteResponse'
s {$sel:requestModels:GetRouteResponse'' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
a} :: GetRouteResponse') ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetRouteResponse' -> f GetRouteResponse')
-> ((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)))
-> GetRouteResponse'
-> f GetRouteResponse'
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

-- | The route response selection expression for the route. Supported only
-- for WebSocket APIs.
getRouteResponse'_routeResponseSelectionExpression :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_routeResponseSelectionExpression :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_routeResponseSelectionExpression = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
routeResponseSelectionExpression :: Maybe Text
$sel:routeResponseSelectionExpression:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
routeResponseSelectionExpression} -> Maybe Text
routeResponseSelectionExpression) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:routeResponseSelectionExpression:GetRouteResponse'' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
a} :: GetRouteResponse')

-- | The request parameters for the route. Supported only for WebSocket APIs.
getRouteResponse'_requestParameters :: Lens.Lens' GetRouteResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints))
getRouteResponse'_requestParameters :: (Maybe (HashMap Text ParameterConstraints)
 -> f (Maybe (HashMap Text ParameterConstraints)))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_requestParameters = (GetRouteResponse' -> Maybe (HashMap Text ParameterConstraints))
-> (GetRouteResponse'
    -> Maybe (HashMap Text ParameterConstraints) -> GetRouteResponse')
-> Lens
     GetRouteResponse'
     GetRouteResponse'
     (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 (\GetRouteResponse'' {Maybe (HashMap Text ParameterConstraints)
requestParameters :: Maybe (HashMap Text ParameterConstraints)
$sel:requestParameters:GetRouteResponse'' :: GetRouteResponse' -> Maybe (HashMap Text ParameterConstraints)
requestParameters} -> Maybe (HashMap Text ParameterConstraints)
requestParameters) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe (HashMap Text ParameterConstraints)
a -> GetRouteResponse'
s {$sel:requestParameters:GetRouteResponse'' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
a} :: GetRouteResponse') ((Maybe (HashMap Text ParameterConstraints)
  -> f (Maybe (HashMap Text ParameterConstraints)))
 -> GetRouteResponse' -> f GetRouteResponse')
-> ((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)))
-> GetRouteResponse'
-> f GetRouteResponse'
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

-- | The route ID.
getRouteResponse'_routeId :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_routeId :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_routeId = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
routeId :: Maybe Text
$sel:routeId:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
routeId} -> Maybe Text
routeId) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:routeId:GetRouteResponse'' :: Maybe Text
routeId = Maybe Text
a} :: GetRouteResponse')

-- | The identifier of the Authorizer resource to be associated with this
-- route. The authorizer identifier is generated by API Gateway when you
-- created the authorizer.
getRouteResponse'_authorizerId :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_authorizerId :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_authorizerId = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:authorizerId:GetRouteResponse'' :: Maybe Text
authorizerId = Maybe Text
a} :: GetRouteResponse')

-- | The operation name for the route.
getRouteResponse'_operationName :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_operationName :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_operationName = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
operationName :: Maybe Text
$sel:operationName:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
operationName} -> Maybe Text
operationName) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:operationName:GetRouteResponse'' :: Maybe Text
operationName = Maybe Text
a} :: GetRouteResponse')

-- | Specifies whether a route is managed by API Gateway. If you created an
-- API using quick create, the $default route is managed by API Gateway.
-- You can\'t modify the $default route key.
getRouteResponse'_apiGatewayManaged :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Bool)
getRouteResponse'_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_apiGatewayManaged = (GetRouteResponse' -> Maybe Bool)
-> (GetRouteResponse' -> Maybe Bool -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:GetRouteResponse'' :: GetRouteResponse' -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Bool
a -> GetRouteResponse'
s {$sel:apiGatewayManaged:GetRouteResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: GetRouteResponse')

-- | The authorization type for the route. For WebSocket APIs, valid values
-- are NONE for open access, AWS_IAM for using AWS IAM permissions, and
-- CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are
-- NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using
-- AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
getRouteResponse'_authorizationType :: Lens.Lens' GetRouteResponse' (Prelude.Maybe AuthorizationType)
getRouteResponse'_authorizationType :: (Maybe AuthorizationType -> f (Maybe AuthorizationType))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_authorizationType = (GetRouteResponse' -> Maybe AuthorizationType)
-> (GetRouteResponse'
    -> Maybe AuthorizationType -> GetRouteResponse')
-> Lens
     GetRouteResponse'
     GetRouteResponse'
     (Maybe AuthorizationType)
     (Maybe AuthorizationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe AuthorizationType
authorizationType :: Maybe AuthorizationType
$sel:authorizationType:GetRouteResponse'' :: GetRouteResponse' -> Maybe AuthorizationType
authorizationType} -> Maybe AuthorizationType
authorizationType) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe AuthorizationType
a -> GetRouteResponse'
s {$sel:authorizationType:GetRouteResponse'' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
a} :: GetRouteResponse')

-- | Specifies whether an API key is required for this route. Supported only
-- for WebSocket APIs.
getRouteResponse'_apiKeyRequired :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Bool)
getRouteResponse'_apiKeyRequired :: (Maybe Bool -> f (Maybe Bool))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_apiKeyRequired = (GetRouteResponse' -> Maybe Bool)
-> (GetRouteResponse' -> Maybe Bool -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Bool
apiKeyRequired :: Maybe Bool
$sel:apiKeyRequired:GetRouteResponse'' :: GetRouteResponse' -> Maybe Bool
apiKeyRequired} -> Maybe Bool
apiKeyRequired) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Bool
a -> GetRouteResponse'
s {$sel:apiKeyRequired:GetRouteResponse'' :: Maybe Bool
apiKeyRequired = Maybe Bool
a} :: GetRouteResponse')

-- | The route key for the route.
getRouteResponse'_routeKey :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_routeKey :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_routeKey = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
routeKey :: Maybe Text
$sel:routeKey:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
routeKey} -> Maybe Text
routeKey) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:routeKey:GetRouteResponse'' :: Maybe Text
routeKey = Maybe Text
a} :: GetRouteResponse')

-- | The target for the route.
getRouteResponse'_target :: Lens.Lens' GetRouteResponse' (Prelude.Maybe Prelude.Text)
getRouteResponse'_target :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_target = (GetRouteResponse' -> Maybe Text)
-> (GetRouteResponse' -> Maybe Text -> GetRouteResponse')
-> Lens
     GetRouteResponse' GetRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Maybe Text
target :: Maybe Text
$sel:target:GetRouteResponse'' :: GetRouteResponse' -> Maybe Text
target} -> Maybe Text
target) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Maybe Text
a -> GetRouteResponse'
s {$sel:target:GetRouteResponse'' :: Maybe Text
target = Maybe Text
a} :: GetRouteResponse')

-- | The response's http status code.
getRouteResponse'_httpStatus :: Lens.Lens' GetRouteResponse' Prelude.Int
getRouteResponse'_httpStatus :: (Int -> f Int) -> GetRouteResponse' -> f GetRouteResponse'
getRouteResponse'_httpStatus = (GetRouteResponse' -> Int)
-> (GetRouteResponse' -> Int -> GetRouteResponse')
-> Lens GetRouteResponse' GetRouteResponse' Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse'' {Int
httpStatus :: Int
$sel:httpStatus:GetRouteResponse'' :: GetRouteResponse' -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRouteResponse'
s@GetRouteResponse'' {} Int
a -> GetRouteResponse'
s {$sel:httpStatus:GetRouteResponse'' :: Int
httpStatus = Int
a} :: GetRouteResponse')

instance Prelude.NFData GetRouteResponse'