{-# 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.UpdateRoute
-- 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)
--
-- Updates a Route.
module Amazonka.ApiGatewayV2.UpdateRoute
  ( -- * Creating a Request
    UpdateRoute (..),
    newUpdateRoute,

    -- * Request Lenses
    updateRoute_authorizationScopes,
    updateRoute_modelSelectionExpression,
    updateRoute_requestModels,
    updateRoute_routeResponseSelectionExpression,
    updateRoute_requestParameters,
    updateRoute_authorizerId,
    updateRoute_operationName,
    updateRoute_authorizationType,
    updateRoute_apiKeyRequired,
    updateRoute_routeKey,
    updateRoute_target,
    updateRoute_apiId,
    updateRoute_routeId,

    -- * Destructuring the Response
    UpdateRouteResponse' (..),
    newUpdateRouteResponse',

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

-- | Updates a Route.
--
-- /See:/ 'newUpdateRoute' smart constructor.
data UpdateRoute = UpdateRoute'
  { -- | The authorization scopes supported by this route.
    UpdateRoute -> Maybe [Text]
authorizationScopes :: Prelude.Maybe [Prelude.Text],
    -- | The model selection expression for the route. Supported only for
    -- WebSocket APIs.
    UpdateRoute -> Maybe Text
modelSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The request models for the route. Supported only for WebSocket APIs.
    UpdateRoute -> 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.
    UpdateRoute -> Maybe Text
routeResponseSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The request parameters for the route. Supported only for WebSocket APIs.
    UpdateRoute -> Maybe (HashMap Text ParameterConstraints)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints),
    -- | 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.
    UpdateRoute -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
    -- | The operation name for the route.
    UpdateRoute -> Maybe Text
operationName :: Prelude.Maybe Prelude.Text,
    -- | 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.
    UpdateRoute -> Maybe AuthorizationType
authorizationType :: Prelude.Maybe AuthorizationType,
    -- | Specifies whether an API key is required for the route. Supported only
    -- for WebSocket APIs.
    UpdateRoute -> Maybe Bool
apiKeyRequired :: Prelude.Maybe Prelude.Bool,
    -- | The route key for the route.
    UpdateRoute -> Maybe Text
routeKey :: Prelude.Maybe Prelude.Text,
    -- | The target for the route.
    UpdateRoute -> Maybe Text
target :: Prelude.Maybe Prelude.Text,
    -- | The API identifier.
    UpdateRoute -> Text
apiId :: Prelude.Text,
    -- | The route ID.
    UpdateRoute -> Text
routeId :: Prelude.Text
  }
  deriving (UpdateRoute -> UpdateRoute -> Bool
(UpdateRoute -> UpdateRoute -> Bool)
-> (UpdateRoute -> UpdateRoute -> Bool) -> Eq UpdateRoute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRoute -> UpdateRoute -> Bool
$c/= :: UpdateRoute -> UpdateRoute -> Bool
== :: UpdateRoute -> UpdateRoute -> Bool
$c== :: UpdateRoute -> UpdateRoute -> Bool
Prelude.Eq, ReadPrec [UpdateRoute]
ReadPrec UpdateRoute
Int -> ReadS UpdateRoute
ReadS [UpdateRoute]
(Int -> ReadS UpdateRoute)
-> ReadS [UpdateRoute]
-> ReadPrec UpdateRoute
-> ReadPrec [UpdateRoute]
-> Read UpdateRoute
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRoute]
$creadListPrec :: ReadPrec [UpdateRoute]
readPrec :: ReadPrec UpdateRoute
$creadPrec :: ReadPrec UpdateRoute
readList :: ReadS [UpdateRoute]
$creadList :: ReadS [UpdateRoute]
readsPrec :: Int -> ReadS UpdateRoute
$creadsPrec :: Int -> ReadS UpdateRoute
Prelude.Read, Int -> UpdateRoute -> ShowS
[UpdateRoute] -> ShowS
UpdateRoute -> String
(Int -> UpdateRoute -> ShowS)
-> (UpdateRoute -> String)
-> ([UpdateRoute] -> ShowS)
-> Show UpdateRoute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRoute] -> ShowS
$cshowList :: [UpdateRoute] -> ShowS
show :: UpdateRoute -> String
$cshow :: UpdateRoute -> String
showsPrec :: Int -> UpdateRoute -> ShowS
$cshowsPrec :: Int -> UpdateRoute -> ShowS
Prelude.Show, (forall x. UpdateRoute -> Rep UpdateRoute x)
-> (forall x. Rep UpdateRoute x -> UpdateRoute)
-> Generic UpdateRoute
forall x. Rep UpdateRoute x -> UpdateRoute
forall x. UpdateRoute -> Rep UpdateRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRoute x -> UpdateRoute
$cfrom :: forall x. UpdateRoute -> Rep UpdateRoute x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRoute' 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', 'updateRoute_authorizationScopes' - The authorization scopes supported by this route.
--
-- 'modelSelectionExpression', 'updateRoute_modelSelectionExpression' - The model selection expression for the route. Supported only for
-- WebSocket APIs.
--
-- 'requestModels', 'updateRoute_requestModels' - The request models for the route. Supported only for WebSocket APIs.
--
-- 'routeResponseSelectionExpression', 'updateRoute_routeResponseSelectionExpression' - The route response selection expression for the route. Supported only
-- for WebSocket APIs.
--
-- 'requestParameters', 'updateRoute_requestParameters' - The request parameters for the route. Supported only for WebSocket APIs.
--
-- 'authorizerId', 'updateRoute_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', 'updateRoute_operationName' - The operation name for the route.
--
-- 'authorizationType', 'updateRoute_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', 'updateRoute_apiKeyRequired' - Specifies whether an API key is required for the route. Supported only
-- for WebSocket APIs.
--
-- 'routeKey', 'updateRoute_routeKey' - The route key for the route.
--
-- 'target', 'updateRoute_target' - The target for the route.
--
-- 'apiId', 'updateRoute_apiId' - The API identifier.
--
-- 'routeId', 'updateRoute_routeId' - The route ID.
newUpdateRoute ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'routeId'
  Prelude.Text ->
  UpdateRoute
newUpdateRoute :: Text -> Text -> UpdateRoute
newUpdateRoute Text
pApiId_ Text
pRouteId_ =
  UpdateRoute' :: Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Maybe Text
-> Maybe Text
-> Maybe AuthorizationType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> UpdateRoute
UpdateRoute'
    { $sel:authorizationScopes:UpdateRoute' :: Maybe [Text]
authorizationScopes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:modelSelectionExpression:UpdateRoute' :: Maybe Text
modelSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestModels:UpdateRoute' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:routeResponseSelectionExpression:UpdateRoute' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:UpdateRoute' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerId:UpdateRoute' :: Maybe Text
authorizerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operationName:UpdateRoute' :: Maybe Text
operationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizationType:UpdateRoute' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
forall a. Maybe a
Prelude.Nothing,
      $sel:apiKeyRequired:UpdateRoute' :: Maybe Bool
apiKeyRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:routeKey:UpdateRoute' :: Maybe Text
routeKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:target:UpdateRoute' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:apiId:UpdateRoute' :: Text
apiId = Text
pApiId_,
      $sel:routeId:UpdateRoute' :: Text
routeId = Text
pRouteId_
    }

-- | The authorization scopes supported by this route.
updateRoute_authorizationScopes :: Lens.Lens' UpdateRoute (Prelude.Maybe [Prelude.Text])
updateRoute_authorizationScopes :: (Maybe [Text] -> f (Maybe [Text])) -> UpdateRoute -> f UpdateRoute
updateRoute_authorizationScopes = (UpdateRoute -> Maybe [Text])
-> (UpdateRoute -> Maybe [Text] -> UpdateRoute)
-> Lens UpdateRoute UpdateRoute (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoute' {Maybe [Text]
authorizationScopes :: Maybe [Text]
$sel:authorizationScopes:UpdateRoute' :: UpdateRoute -> Maybe [Text]
authorizationScopes} -> Maybe [Text]
authorizationScopes) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe [Text]
a -> UpdateRoute
s {$sel:authorizationScopes:UpdateRoute' :: Maybe [Text]
authorizationScopes = Maybe [Text]
a} :: UpdateRoute) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateRoute -> f UpdateRoute)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateRoute
-> f UpdateRoute
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.
updateRoute_modelSelectionExpression :: Lens.Lens' UpdateRoute (Prelude.Maybe Prelude.Text)
updateRoute_modelSelectionExpression :: (Maybe Text -> f (Maybe Text)) -> UpdateRoute -> f UpdateRoute
updateRoute_modelSelectionExpression = (UpdateRoute -> Maybe Text)
-> (UpdateRoute -> Maybe Text -> UpdateRoute)
-> Lens UpdateRoute UpdateRoute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoute' {Maybe Text
modelSelectionExpression :: Maybe Text
$sel:modelSelectionExpression:UpdateRoute' :: UpdateRoute -> Maybe Text
modelSelectionExpression} -> Maybe Text
modelSelectionExpression) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe Text
a -> UpdateRoute
s {$sel:modelSelectionExpression:UpdateRoute' :: Maybe Text
modelSelectionExpression = Maybe Text
a} :: UpdateRoute)

-- | The request models for the route. Supported only for WebSocket APIs.
updateRoute_requestModels :: Lens.Lens' UpdateRoute (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateRoute_requestModels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateRoute -> f UpdateRoute
updateRoute_requestModels = (UpdateRoute -> Maybe (HashMap Text Text))
-> (UpdateRoute -> Maybe (HashMap Text Text) -> UpdateRoute)
-> Lens
     UpdateRoute
     UpdateRoute
     (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 (\UpdateRoute' {Maybe (HashMap Text Text)
requestModels :: Maybe (HashMap Text Text)
$sel:requestModels:UpdateRoute' :: UpdateRoute -> Maybe (HashMap Text Text)
requestModels} -> Maybe (HashMap Text Text)
requestModels) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe (HashMap Text Text)
a -> UpdateRoute
s {$sel:requestModels:UpdateRoute' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
a} :: UpdateRoute) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateRoute -> f UpdateRoute)
-> ((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)))
-> UpdateRoute
-> f UpdateRoute
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.
updateRoute_routeResponseSelectionExpression :: Lens.Lens' UpdateRoute (Prelude.Maybe Prelude.Text)
updateRoute_routeResponseSelectionExpression :: (Maybe Text -> f (Maybe Text)) -> UpdateRoute -> f UpdateRoute
updateRoute_routeResponseSelectionExpression = (UpdateRoute -> Maybe Text)
-> (UpdateRoute -> Maybe Text -> UpdateRoute)
-> Lens UpdateRoute UpdateRoute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoute' {Maybe Text
routeResponseSelectionExpression :: Maybe Text
$sel:routeResponseSelectionExpression:UpdateRoute' :: UpdateRoute -> Maybe Text
routeResponseSelectionExpression} -> Maybe Text
routeResponseSelectionExpression) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe Text
a -> UpdateRoute
s {$sel:routeResponseSelectionExpression:UpdateRoute' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
a} :: UpdateRoute)

-- | The request parameters for the route. Supported only for WebSocket APIs.
updateRoute_requestParameters :: Lens.Lens' UpdateRoute (Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints))
updateRoute_requestParameters :: (Maybe (HashMap Text ParameterConstraints)
 -> f (Maybe (HashMap Text ParameterConstraints)))
-> UpdateRoute -> f UpdateRoute
updateRoute_requestParameters = (UpdateRoute -> Maybe (HashMap Text ParameterConstraints))
-> (UpdateRoute
    -> Maybe (HashMap Text ParameterConstraints) -> UpdateRoute)
-> Lens
     UpdateRoute
     UpdateRoute
     (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 (\UpdateRoute' {Maybe (HashMap Text ParameterConstraints)
requestParameters :: Maybe (HashMap Text ParameterConstraints)
$sel:requestParameters:UpdateRoute' :: UpdateRoute -> Maybe (HashMap Text ParameterConstraints)
requestParameters} -> Maybe (HashMap Text ParameterConstraints)
requestParameters) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe (HashMap Text ParameterConstraints)
a -> UpdateRoute
s {$sel:requestParameters:UpdateRoute' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
a} :: UpdateRoute) ((Maybe (HashMap Text ParameterConstraints)
  -> f (Maybe (HashMap Text ParameterConstraints)))
 -> UpdateRoute -> f UpdateRoute)
-> ((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)))
-> UpdateRoute
-> f UpdateRoute
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 identifier of the Authorizer resource to be associated with this
-- route. The authorizer identifier is generated by API Gateway when you
-- created the authorizer.
updateRoute_authorizerId :: Lens.Lens' UpdateRoute (Prelude.Maybe Prelude.Text)
updateRoute_authorizerId :: (Maybe Text -> f (Maybe Text)) -> UpdateRoute -> f UpdateRoute
updateRoute_authorizerId = (UpdateRoute -> Maybe Text)
-> (UpdateRoute -> Maybe Text -> UpdateRoute)
-> Lens UpdateRoute UpdateRoute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoute' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:UpdateRoute' :: UpdateRoute -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe Text
a -> UpdateRoute
s {$sel:authorizerId:UpdateRoute' :: Maybe Text
authorizerId = Maybe Text
a} :: UpdateRoute)

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

-- | 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.
updateRoute_authorizationType :: Lens.Lens' UpdateRoute (Prelude.Maybe AuthorizationType)
updateRoute_authorizationType :: (Maybe AuthorizationType -> f (Maybe AuthorizationType))
-> UpdateRoute -> f UpdateRoute
updateRoute_authorizationType = (UpdateRoute -> Maybe AuthorizationType)
-> (UpdateRoute -> Maybe AuthorizationType -> UpdateRoute)
-> Lens
     UpdateRoute
     UpdateRoute
     (Maybe AuthorizationType)
     (Maybe AuthorizationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoute' {Maybe AuthorizationType
authorizationType :: Maybe AuthorizationType
$sel:authorizationType:UpdateRoute' :: UpdateRoute -> Maybe AuthorizationType
authorizationType} -> Maybe AuthorizationType
authorizationType) (\s :: UpdateRoute
s@UpdateRoute' {} Maybe AuthorizationType
a -> UpdateRoute
s {$sel:authorizationType:UpdateRoute' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
a} :: UpdateRoute)

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

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

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

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

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

instance Core.AWSRequest UpdateRoute where
  type AWSResponse UpdateRoute = UpdateRouteResponse'
  request :: UpdateRoute -> Request UpdateRoute
request = Service -> UpdateRoute -> Request UpdateRoute
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateRoute
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateRoute)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateRoute))
-> Logger
-> Service
-> Proxy UpdateRoute
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateRoute)))
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
-> UpdateRouteResponse'
UpdateRouteResponse''
            (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
 -> UpdateRouteResponse')
-> 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
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> 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
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> 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
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> 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
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> 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
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe AuthorizationType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateRouteResponse')
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
   -> UpdateRouteResponse')
-> Either String (Maybe AuthorizationType)
-> Either
     String
     (Maybe Bool
      -> Maybe Text -> Maybe Text -> Int -> UpdateRouteResponse')
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 -> UpdateRouteResponse')
-> Either String (Maybe Bool)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> UpdateRouteResponse')
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 -> UpdateRouteResponse')
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateRouteResponse')
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 -> UpdateRouteResponse')
-> Either String (Maybe Text)
-> Either String (Int -> UpdateRouteResponse')
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 -> UpdateRouteResponse')
-> Either String Int -> Either String UpdateRouteResponse'
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 UpdateRoute

instance Prelude.NFData UpdateRoute

instance Core.ToHeaders UpdateRoute where
  toHeaders :: UpdateRoute -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateRoute -> 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 UpdateRoute where
  toJSON :: UpdateRoute -> Value
toJSON UpdateRoute' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text ParameterConstraints)
Maybe AuthorizationType
Text
routeId :: Text
apiId :: Text
target :: Maybe Text
routeKey :: Maybe Text
apiKeyRequired :: Maybe Bool
authorizationType :: Maybe AuthorizationType
operationName :: Maybe Text
authorizerId :: Maybe Text
requestParameters :: Maybe (HashMap Text ParameterConstraints)
routeResponseSelectionExpression :: Maybe Text
requestModels :: Maybe (HashMap Text Text)
modelSelectionExpression :: Maybe Text
authorizationScopes :: Maybe [Text]
$sel:routeId:UpdateRoute' :: UpdateRoute -> Text
$sel:apiId:UpdateRoute' :: UpdateRoute -> Text
$sel:target:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:routeKey:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:apiKeyRequired:UpdateRoute' :: UpdateRoute -> Maybe Bool
$sel:authorizationType:UpdateRoute' :: UpdateRoute -> Maybe AuthorizationType
$sel:operationName:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:authorizerId:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:requestParameters:UpdateRoute' :: UpdateRoute -> Maybe (HashMap Text ParameterConstraints)
$sel:routeResponseSelectionExpression:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:requestModels:UpdateRoute' :: UpdateRoute -> Maybe (HashMap Text Text)
$sel:modelSelectionExpression:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:authorizationScopes:UpdateRoute' :: UpdateRoute -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"authorizationScopes" 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]
authorizationScopes,
            (Text
"modelSelectionExpression" 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
modelSelectionExpression,
            (Text
"requestModels" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
requestModels,
            (Text
"routeResponseSelectionExpression" 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
routeResponseSelectionExpression,
            (Text
"requestParameters" Text -> HashMap Text ParameterConstraints -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text ParameterConstraints -> Pair)
-> Maybe (HashMap Text ParameterConstraints) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text ParameterConstraints)
requestParameters,
            (Text
"authorizerId" 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
authorizerId,
            (Text
"operationName" 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
operationName,
            (Text
"authorizationType" Text -> AuthorizationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AuthorizationType -> Pair)
-> Maybe AuthorizationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuthorizationType
authorizationType,
            (Text
"apiKeyRequired" 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
apiKeyRequired,
            (Text
"routeKey" 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
routeKey,
            (Text
"target" 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
target
          ]
      )

instance Core.ToPath UpdateRoute where
  toPath :: UpdateRoute -> ByteString
toPath UpdateRoute' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text ParameterConstraints)
Maybe AuthorizationType
Text
routeId :: Text
apiId :: Text
target :: Maybe Text
routeKey :: Maybe Text
apiKeyRequired :: Maybe Bool
authorizationType :: Maybe AuthorizationType
operationName :: Maybe Text
authorizerId :: Maybe Text
requestParameters :: Maybe (HashMap Text ParameterConstraints)
routeResponseSelectionExpression :: Maybe Text
requestModels :: Maybe (HashMap Text Text)
modelSelectionExpression :: Maybe Text
authorizationScopes :: Maybe [Text]
$sel:routeId:UpdateRoute' :: UpdateRoute -> Text
$sel:apiId:UpdateRoute' :: UpdateRoute -> Text
$sel:target:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:routeKey:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:apiKeyRequired:UpdateRoute' :: UpdateRoute -> Maybe Bool
$sel:authorizationType:UpdateRoute' :: UpdateRoute -> Maybe AuthorizationType
$sel:operationName:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:authorizerId:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:requestParameters:UpdateRoute' :: UpdateRoute -> Maybe (HashMap Text ParameterConstraints)
$sel:routeResponseSelectionExpression:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:requestModels:UpdateRoute' :: UpdateRoute -> Maybe (HashMap Text Text)
$sel:modelSelectionExpression:UpdateRoute' :: UpdateRoute -> Maybe Text
$sel:authorizationScopes:UpdateRoute' :: UpdateRoute -> 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
"/routes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routeId
      ]

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

-- | /See:/ 'newUpdateRouteResponse'' smart constructor.
data UpdateRouteResponse' = UpdateRouteResponse''
  { -- | 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.
    UpdateRouteResponse' -> Maybe [Text]
authorizationScopes :: Prelude.Maybe [Prelude.Text],
    -- | The model selection expression for the route. Supported only for
    -- WebSocket APIs.
    UpdateRouteResponse' -> Maybe Text
modelSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The request models for the route. Supported only for WebSocket APIs.
    UpdateRouteResponse' -> 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.
    UpdateRouteResponse' -> Maybe Text
routeResponseSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The request parameters for the route. Supported only for WebSocket APIs.
    UpdateRouteResponse' -> Maybe (HashMap Text ParameterConstraints)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints),
    -- | The route ID.
    UpdateRouteResponse' -> 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.
    UpdateRouteResponse' -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
    -- | The operation name for the route.
    UpdateRouteResponse' -> 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.
    UpdateRouteResponse' -> 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.
    UpdateRouteResponse' -> Maybe AuthorizationType
authorizationType :: Prelude.Maybe AuthorizationType,
    -- | Specifies whether an API key is required for this route. Supported only
    -- for WebSocket APIs.
    UpdateRouteResponse' -> Maybe Bool
apiKeyRequired :: Prelude.Maybe Prelude.Bool,
    -- | The route key for the route.
    UpdateRouteResponse' -> Maybe Text
routeKey :: Prelude.Maybe Prelude.Text,
    -- | The target for the route.
    UpdateRouteResponse' -> Maybe Text
target :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateRouteResponse' -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateRouteResponse' -> UpdateRouteResponse' -> Bool
(UpdateRouteResponse' -> UpdateRouteResponse' -> Bool)
-> (UpdateRouteResponse' -> UpdateRouteResponse' -> Bool)
-> Eq UpdateRouteResponse'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRouteResponse' -> UpdateRouteResponse' -> Bool
$c/= :: UpdateRouteResponse' -> UpdateRouteResponse' -> Bool
== :: UpdateRouteResponse' -> UpdateRouteResponse' -> Bool
$c== :: UpdateRouteResponse' -> UpdateRouteResponse' -> Bool
Prelude.Eq, ReadPrec [UpdateRouteResponse']
ReadPrec UpdateRouteResponse'
Int -> ReadS UpdateRouteResponse'
ReadS [UpdateRouteResponse']
(Int -> ReadS UpdateRouteResponse')
-> ReadS [UpdateRouteResponse']
-> ReadPrec UpdateRouteResponse'
-> ReadPrec [UpdateRouteResponse']
-> Read UpdateRouteResponse'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRouteResponse']
$creadListPrec :: ReadPrec [UpdateRouteResponse']
readPrec :: ReadPrec UpdateRouteResponse'
$creadPrec :: ReadPrec UpdateRouteResponse'
readList :: ReadS [UpdateRouteResponse']
$creadList :: ReadS [UpdateRouteResponse']
readsPrec :: Int -> ReadS UpdateRouteResponse'
$creadsPrec :: Int -> ReadS UpdateRouteResponse'
Prelude.Read, Int -> UpdateRouteResponse' -> ShowS
[UpdateRouteResponse'] -> ShowS
UpdateRouteResponse' -> String
(Int -> UpdateRouteResponse' -> ShowS)
-> (UpdateRouteResponse' -> String)
-> ([UpdateRouteResponse'] -> ShowS)
-> Show UpdateRouteResponse'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRouteResponse'] -> ShowS
$cshowList :: [UpdateRouteResponse'] -> ShowS
show :: UpdateRouteResponse' -> String
$cshow :: UpdateRouteResponse' -> String
showsPrec :: Int -> UpdateRouteResponse' -> ShowS
$cshowsPrec :: Int -> UpdateRouteResponse' -> ShowS
Prelude.Show, (forall x. UpdateRouteResponse' -> Rep UpdateRouteResponse' x)
-> (forall x. Rep UpdateRouteResponse' x -> UpdateRouteResponse')
-> Generic UpdateRouteResponse'
forall x. Rep UpdateRouteResponse' x -> UpdateRouteResponse'
forall x. UpdateRouteResponse' -> Rep UpdateRouteResponse' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRouteResponse' x -> UpdateRouteResponse'
$cfrom :: forall x. UpdateRouteResponse' -> Rep UpdateRouteResponse' x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRouteResponse'' 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', 'updateRouteResponse'_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', 'updateRouteResponse'_modelSelectionExpression' - The model selection expression for the route. Supported only for
-- WebSocket APIs.
--
-- 'requestModels', 'updateRouteResponse'_requestModels' - The request models for the route. Supported only for WebSocket APIs.
--
-- 'routeResponseSelectionExpression', 'updateRouteResponse'_routeResponseSelectionExpression' - The route response selection expression for the route. Supported only
-- for WebSocket APIs.
--
-- 'requestParameters', 'updateRouteResponse'_requestParameters' - The request parameters for the route. Supported only for WebSocket APIs.
--
-- 'routeId', 'updateRouteResponse'_routeId' - The route ID.
--
-- 'authorizerId', 'updateRouteResponse'_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', 'updateRouteResponse'_operationName' - The operation name for the route.
--
-- 'apiGatewayManaged', 'updateRouteResponse'_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', 'updateRouteResponse'_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', 'updateRouteResponse'_apiKeyRequired' - Specifies whether an API key is required for this route. Supported only
-- for WebSocket APIs.
--
-- 'routeKey', 'updateRouteResponse'_routeKey' - The route key for the route.
--
-- 'target', 'updateRouteResponse'_target' - The target for the route.
--
-- 'httpStatus', 'updateRouteResponse'_httpStatus' - The response's http status code.
newUpdateRouteResponse' ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateRouteResponse'
newUpdateRouteResponse' :: Int -> UpdateRouteResponse'
newUpdateRouteResponse' Int
pHttpStatus_ =
  UpdateRouteResponse'' :: 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
-> UpdateRouteResponse'
UpdateRouteResponse''
    { $sel:authorizationScopes:UpdateRouteResponse'' :: Maybe [Text]
authorizationScopes =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:modelSelectionExpression:UpdateRouteResponse'' :: Maybe Text
modelSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestModels:UpdateRouteResponse'' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:routeResponseSelectionExpression:UpdateRouteResponse'' :: Maybe Text
routeResponseSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:UpdateRouteResponse'' :: Maybe (HashMap Text ParameterConstraints)
requestParameters = Maybe (HashMap Text ParameterConstraints)
forall a. Maybe a
Prelude.Nothing,
      $sel:routeId:UpdateRouteResponse'' :: Maybe Text
routeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerId:UpdateRouteResponse'' :: Maybe Text
authorizerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operationName:UpdateRouteResponse'' :: Maybe Text
operationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:UpdateRouteResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizationType:UpdateRouteResponse'' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
forall a. Maybe a
Prelude.Nothing,
      $sel:apiKeyRequired:UpdateRouteResponse'' :: Maybe Bool
apiKeyRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:routeKey:UpdateRouteResponse'' :: Maybe Text
routeKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:target:UpdateRouteResponse'' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateRouteResponse'' :: 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.
updateRouteResponse'_authorizationScopes :: Lens.Lens' UpdateRouteResponse' (Prelude.Maybe [Prelude.Text])
updateRouteResponse'_authorizationScopes :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateRouteResponse' -> f UpdateRouteResponse'
updateRouteResponse'_authorizationScopes = (UpdateRouteResponse' -> Maybe [Text])
-> (UpdateRouteResponse' -> Maybe [Text] -> UpdateRouteResponse')
-> Lens
     UpdateRouteResponse'
     UpdateRouteResponse'
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteResponse'' {Maybe [Text]
authorizationScopes :: Maybe [Text]
$sel:authorizationScopes:UpdateRouteResponse'' :: UpdateRouteResponse' -> Maybe [Text]
authorizationScopes} -> Maybe [Text]
authorizationScopes) (\s :: UpdateRouteResponse'
s@UpdateRouteResponse'' {} Maybe [Text]
a -> UpdateRouteResponse'
s {$sel:authorizationScopes:UpdateRouteResponse'' :: Maybe [Text]
authorizationScopes = Maybe [Text]
a} :: UpdateRouteResponse') ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateRouteResponse' -> f UpdateRouteResponse')
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateRouteResponse'
-> f UpdateRouteResponse'
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.
updateRouteResponse'_modelSelectionExpression :: Lens.Lens' UpdateRouteResponse' (Prelude.Maybe Prelude.Text)
updateRouteResponse'_modelSelectionExpression :: (Maybe Text -> f (Maybe Text))
-> UpdateRouteResponse' -> f UpdateRouteResponse'
updateRouteResponse'_modelSelectionExpression = (UpdateRouteResponse' -> Maybe Text)
-> (UpdateRouteResponse' -> Maybe Text -> UpdateRouteResponse')
-> Lens
     UpdateRouteResponse' UpdateRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteResponse'' {Maybe Text
modelSelectionExpression :: Maybe Text
$sel:modelSelectionExpression:UpdateRouteResponse'' :: UpdateRouteResponse' -> Maybe Text
modelSelectionExpression} -> Maybe Text
modelSelectionExpression) (\s :: UpdateRouteResponse'
s@UpdateRouteResponse'' {} Maybe Text
a -> UpdateRouteResponse'
s {$sel:modelSelectionExpression:UpdateRouteResponse'' :: Maybe Text
modelSelectionExpression = Maybe Text
a} :: UpdateRouteResponse')

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

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

-- | 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.
updateRouteResponse'_authorizerId :: Lens.Lens' UpdateRouteResponse' (Prelude.Maybe Prelude.Text)
updateRouteResponse'_authorizerId :: (Maybe Text -> f (Maybe Text))
-> UpdateRouteResponse' -> f UpdateRouteResponse'
updateRouteResponse'_authorizerId = (UpdateRouteResponse' -> Maybe Text)
-> (UpdateRouteResponse' -> Maybe Text -> UpdateRouteResponse')
-> Lens
     UpdateRouteResponse' UpdateRouteResponse' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteResponse'' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:UpdateRouteResponse'' :: UpdateRouteResponse' -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: UpdateRouteResponse'
s@UpdateRouteResponse'' {} Maybe Text
a -> UpdateRouteResponse'
s {$sel:authorizerId:UpdateRouteResponse'' :: Maybe Text
authorizerId = Maybe Text
a} :: UpdateRouteResponse')

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

-- | 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.
updateRouteResponse'_apiGatewayManaged :: Lens.Lens' UpdateRouteResponse' (Prelude.Maybe Prelude.Bool)
updateRouteResponse'_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRouteResponse' -> f UpdateRouteResponse'
updateRouteResponse'_apiGatewayManaged = (UpdateRouteResponse' -> Maybe Bool)
-> (UpdateRouteResponse' -> Maybe Bool -> UpdateRouteResponse')
-> Lens
     UpdateRouteResponse' UpdateRouteResponse' (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteResponse'' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:UpdateRouteResponse'' :: UpdateRouteResponse' -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: UpdateRouteResponse'
s@UpdateRouteResponse'' {} Maybe Bool
a -> UpdateRouteResponse'
s {$sel:apiGatewayManaged:UpdateRouteResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: UpdateRouteResponse')

-- | 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.
updateRouteResponse'_authorizationType :: Lens.Lens' UpdateRouteResponse' (Prelude.Maybe AuthorizationType)
updateRouteResponse'_authorizationType :: (Maybe AuthorizationType -> f (Maybe AuthorizationType))
-> UpdateRouteResponse' -> f UpdateRouteResponse'
updateRouteResponse'_authorizationType = (UpdateRouteResponse' -> Maybe AuthorizationType)
-> (UpdateRouteResponse'
    -> Maybe AuthorizationType -> UpdateRouteResponse')
-> Lens
     UpdateRouteResponse'
     UpdateRouteResponse'
     (Maybe AuthorizationType)
     (Maybe AuthorizationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteResponse'' {Maybe AuthorizationType
authorizationType :: Maybe AuthorizationType
$sel:authorizationType:UpdateRouteResponse'' :: UpdateRouteResponse' -> Maybe AuthorizationType
authorizationType} -> Maybe AuthorizationType
authorizationType) (\s :: UpdateRouteResponse'
s@UpdateRouteResponse'' {} Maybe AuthorizationType
a -> UpdateRouteResponse'
s {$sel:authorizationType:UpdateRouteResponse'' :: Maybe AuthorizationType
authorizationType = Maybe AuthorizationType
a} :: UpdateRouteResponse')

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

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

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

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

instance Prelude.NFData UpdateRouteResponse'