{-# 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.CreateRoute -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Creates a Route for an API. module Amazonka.ApiGatewayV2.CreateRoute ( -- * Creating a Request CreateRoute (..), newCreateRoute, -- * Request Lenses createRoute_apiKeyRequired, createRoute_authorizationScopes, createRoute_authorizationType, createRoute_authorizerId, createRoute_modelSelectionExpression, createRoute_operationName, createRoute_requestModels, createRoute_requestParameters, createRoute_routeResponseSelectionExpression, createRoute_target, createRoute_apiId, createRoute_routeKey, -- * Destructuring the Response CreateRouteResponse' (..), newCreateRouteResponse', -- * Response Lenses createRouteResponse'_apiGatewayManaged, createRouteResponse'_apiKeyRequired, createRouteResponse'_authorizationScopes, createRouteResponse'_authorizationType, createRouteResponse'_authorizerId, createRouteResponse'_modelSelectionExpression, createRouteResponse'_operationName, createRouteResponse'_requestModels, createRouteResponse'_requestParameters, createRouteResponse'_routeId, createRouteResponse'_routeKey, createRouteResponse'_routeResponseSelectionExpression, createRouteResponse'_target, createRouteResponse'_httpStatus, ) where import Amazonka.ApiGatewayV2.Types import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response -- | Creates a new Route resource to represent a route. -- -- /See:/ 'newCreateRoute' smart constructor. data CreateRoute = CreateRoute' { -- | Specifies whether an API key is required for the route. Supported only -- for WebSocket APIs. apiKeyRequired :: Prelude.Maybe Prelude.Bool, -- | The authorization scopes supported by this route. authorizationScopes :: 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. authorizationType :: Prelude.Maybe AuthorizationType, -- | 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. authorizerId :: Prelude.Maybe Prelude.Text, -- | The model selection expression for the route. Supported only for -- WebSocket APIs. modelSelectionExpression :: Prelude.Maybe Prelude.Text, -- | The operation name for the route. operationName :: Prelude.Maybe Prelude.Text, -- | The request models for the route. Supported only for WebSocket APIs. requestModels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text), -- | The request parameters for the route. Supported only for WebSocket APIs. requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints), -- | The route response selection expression for the route. Supported only -- for WebSocket APIs. routeResponseSelectionExpression :: Prelude.Maybe Prelude.Text, -- | The target for the route. target :: Prelude.Maybe Prelude.Text, -- | The API identifier. apiId :: Prelude.Text, -- | The route key for the route. routeKey :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'CreateRoute' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'apiKeyRequired', 'createRoute_apiKeyRequired' - Specifies whether an API key is required for the route. Supported only -- for WebSocket APIs. -- -- 'authorizationScopes', 'createRoute_authorizationScopes' - The authorization scopes supported by this route. -- -- 'authorizationType', 'createRoute_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. -- -- 'authorizerId', 'createRoute_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. -- -- 'modelSelectionExpression', 'createRoute_modelSelectionExpression' - The model selection expression for the route. Supported only for -- WebSocket APIs. -- -- 'operationName', 'createRoute_operationName' - The operation name for the route. -- -- 'requestModels', 'createRoute_requestModels' - The request models for the route. Supported only for WebSocket APIs. -- -- 'requestParameters', 'createRoute_requestParameters' - The request parameters for the route. Supported only for WebSocket APIs. -- -- 'routeResponseSelectionExpression', 'createRoute_routeResponseSelectionExpression' - The route response selection expression for the route. Supported only -- for WebSocket APIs. -- -- 'target', 'createRoute_target' - The target for the route. -- -- 'apiId', 'createRoute_apiId' - The API identifier. -- -- 'routeKey', 'createRoute_routeKey' - The route key for the route. newCreateRoute :: -- | 'apiId' Prelude.Text -> -- | 'routeKey' Prelude.Text -> CreateRoute newCreateRoute pApiId_ pRouteKey_ = CreateRoute' { apiKeyRequired = Prelude.Nothing, authorizationScopes = Prelude.Nothing, authorizationType = Prelude.Nothing, authorizerId = Prelude.Nothing, modelSelectionExpression = Prelude.Nothing, operationName = Prelude.Nothing, requestModels = Prelude.Nothing, requestParameters = Prelude.Nothing, routeResponseSelectionExpression = Prelude.Nothing, target = Prelude.Nothing, apiId = pApiId_, routeKey = pRouteKey_ } -- | Specifies whether an API key is required for the route. Supported only -- for WebSocket APIs. createRoute_apiKeyRequired :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Bool) createRoute_apiKeyRequired = Lens.lens (\CreateRoute' {apiKeyRequired} -> apiKeyRequired) (\s@CreateRoute' {} a -> s {apiKeyRequired = a} :: CreateRoute) -- | The authorization scopes supported by this route. createRoute_authorizationScopes :: Lens.Lens' CreateRoute (Prelude.Maybe [Prelude.Text]) createRoute_authorizationScopes = Lens.lens (\CreateRoute' {authorizationScopes} -> authorizationScopes) (\s@CreateRoute' {} a -> s {authorizationScopes = a} :: CreateRoute) Prelude.. Lens.mapping Lens.coerced -- | 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. createRoute_authorizationType :: Lens.Lens' CreateRoute (Prelude.Maybe AuthorizationType) createRoute_authorizationType = Lens.lens (\CreateRoute' {authorizationType} -> authorizationType) (\s@CreateRoute' {} a -> s {authorizationType = a} :: CreateRoute) -- | 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. createRoute_authorizerId :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Text) createRoute_authorizerId = Lens.lens (\CreateRoute' {authorizerId} -> authorizerId) (\s@CreateRoute' {} a -> s {authorizerId = a} :: CreateRoute) -- | The model selection expression for the route. Supported only for -- WebSocket APIs. createRoute_modelSelectionExpression :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Text) createRoute_modelSelectionExpression = Lens.lens (\CreateRoute' {modelSelectionExpression} -> modelSelectionExpression) (\s@CreateRoute' {} a -> s {modelSelectionExpression = a} :: CreateRoute) -- | The operation name for the route. createRoute_operationName :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Text) createRoute_operationName = Lens.lens (\CreateRoute' {operationName} -> operationName) (\s@CreateRoute' {} a -> s {operationName = a} :: CreateRoute) -- | The request models for the route. Supported only for WebSocket APIs. createRoute_requestModels :: Lens.Lens' CreateRoute (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)) createRoute_requestModels = Lens.lens (\CreateRoute' {requestModels} -> requestModels) (\s@CreateRoute' {} a -> s {requestModels = a} :: CreateRoute) Prelude.. Lens.mapping Lens.coerced -- | The request parameters for the route. Supported only for WebSocket APIs. createRoute_requestParameters :: Lens.Lens' CreateRoute (Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints)) createRoute_requestParameters = Lens.lens (\CreateRoute' {requestParameters} -> requestParameters) (\s@CreateRoute' {} a -> s {requestParameters = a} :: CreateRoute) Prelude.. Lens.mapping Lens.coerced -- | The route response selection expression for the route. Supported only -- for WebSocket APIs. createRoute_routeResponseSelectionExpression :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Text) createRoute_routeResponseSelectionExpression = Lens.lens (\CreateRoute' {routeResponseSelectionExpression} -> routeResponseSelectionExpression) (\s@CreateRoute' {} a -> s {routeResponseSelectionExpression = a} :: CreateRoute) -- | The target for the route. createRoute_target :: Lens.Lens' CreateRoute (Prelude.Maybe Prelude.Text) createRoute_target = Lens.lens (\CreateRoute' {target} -> target) (\s@CreateRoute' {} a -> s {target = a} :: CreateRoute) -- | The API identifier. createRoute_apiId :: Lens.Lens' CreateRoute Prelude.Text createRoute_apiId = Lens.lens (\CreateRoute' {apiId} -> apiId) (\s@CreateRoute' {} a -> s {apiId = a} :: CreateRoute) -- | The route key for the route. createRoute_routeKey :: Lens.Lens' CreateRoute Prelude.Text createRoute_routeKey = Lens.lens (\CreateRoute' {routeKey} -> routeKey) (\s@CreateRoute' {} a -> s {routeKey = a} :: CreateRoute) instance Core.AWSRequest CreateRoute where type AWSResponse CreateRoute = CreateRouteResponse' request overrides = Request.postJSON (overrides defaultService) response = Response.receiveJSON ( \s h x -> CreateRouteResponse'' Prelude.<$> (x Data..?> "apiGatewayManaged") Prelude.<*> (x Data..?> "apiKeyRequired") Prelude.<*> ( x Data..?> "authorizationScopes" Core..!@ Prelude.mempty ) Prelude.<*> (x Data..?> "authorizationType") Prelude.<*> (x Data..?> "authorizerId") Prelude.<*> (x Data..?> "modelSelectionExpression") Prelude.<*> (x Data..?> "operationName") Prelude.<*> (x Data..?> "requestModels" Core..!@ Prelude.mempty) Prelude.<*> ( x Data..?> "requestParameters" Core..!@ Prelude.mempty ) Prelude.<*> (x Data..?> "routeId") Prelude.<*> (x Data..?> "routeKey") Prelude.<*> (x Data..?> "routeResponseSelectionExpression") Prelude.<*> (x Data..?> "target") Prelude.<*> (Prelude.pure (Prelude.fromEnum s)) ) instance Prelude.Hashable CreateRoute where hashWithSalt _salt CreateRoute' {..} = _salt `Prelude.hashWithSalt` apiKeyRequired `Prelude.hashWithSalt` authorizationScopes `Prelude.hashWithSalt` authorizationType `Prelude.hashWithSalt` authorizerId `Prelude.hashWithSalt` modelSelectionExpression `Prelude.hashWithSalt` operationName `Prelude.hashWithSalt` requestModels `Prelude.hashWithSalt` requestParameters `Prelude.hashWithSalt` routeResponseSelectionExpression `Prelude.hashWithSalt` target `Prelude.hashWithSalt` apiId `Prelude.hashWithSalt` routeKey instance Prelude.NFData CreateRoute where rnf CreateRoute' {..} = Prelude.rnf apiKeyRequired `Prelude.seq` Prelude.rnf authorizationScopes `Prelude.seq` Prelude.rnf authorizationType `Prelude.seq` Prelude.rnf authorizerId `Prelude.seq` Prelude.rnf modelSelectionExpression `Prelude.seq` Prelude.rnf operationName `Prelude.seq` Prelude.rnf requestModels `Prelude.seq` Prelude.rnf requestParameters `Prelude.seq` Prelude.rnf routeResponseSelectionExpression `Prelude.seq` Prelude.rnf target `Prelude.seq` Prelude.rnf apiId `Prelude.seq` Prelude.rnf routeKey instance Data.ToHeaders CreateRoute where toHeaders = Prelude.const ( Prelude.mconcat [ "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToJSON CreateRoute where toJSON CreateRoute' {..} = Data.object ( Prelude.catMaybes [ ("apiKeyRequired" Data..=) Prelude.<$> apiKeyRequired, ("authorizationScopes" Data..=) Prelude.<$> authorizationScopes, ("authorizationType" Data..=) Prelude.<$> authorizationType, ("authorizerId" Data..=) Prelude.<$> authorizerId, ("modelSelectionExpression" Data..=) Prelude.<$> modelSelectionExpression, ("operationName" Data..=) Prelude.<$> operationName, ("requestModels" Data..=) Prelude.<$> requestModels, ("requestParameters" Data..=) Prelude.<$> requestParameters, ("routeResponseSelectionExpression" Data..=) Prelude.<$> routeResponseSelectionExpression, ("target" Data..=) Prelude.<$> target, Prelude.Just ("routeKey" Data..= routeKey) ] ) instance Data.ToPath CreateRoute where toPath CreateRoute' {..} = Prelude.mconcat ["/v2/apis/", Data.toBS apiId, "/routes"] instance Data.ToQuery CreateRoute where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newCreateRouteResponse'' smart constructor. data CreateRouteResponse' = CreateRouteResponse'' { -- | 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. apiGatewayManaged :: Prelude.Maybe Prelude.Bool, -- | Specifies whether an API key is required for this route. Supported only -- for WebSocket APIs. apiKeyRequired :: Prelude.Maybe Prelude.Bool, -- | 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. authorizationScopes :: 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. authorizationType :: Prelude.Maybe AuthorizationType, -- | 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. authorizerId :: Prelude.Maybe Prelude.Text, -- | The model selection expression for the route. Supported only for -- WebSocket APIs. modelSelectionExpression :: Prelude.Maybe Prelude.Text, -- | The operation name for the route. operationName :: Prelude.Maybe Prelude.Text, -- | The request models for the route. Supported only for WebSocket APIs. requestModels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text), -- | The request parameters for the route. Supported only for WebSocket APIs. requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints), -- | The route ID. routeId :: Prelude.Maybe Prelude.Text, -- | The route key for the route. routeKey :: Prelude.Maybe Prelude.Text, -- | The route response selection expression for the route. Supported only -- for WebSocket APIs. routeResponseSelectionExpression :: Prelude.Maybe Prelude.Text, -- | The target for the route. target :: Prelude.Maybe Prelude.Text, -- | The response's http status code. httpStatus :: Prelude.Int } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'CreateRouteResponse'' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'apiGatewayManaged', 'createRouteResponse'_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. -- -- 'apiKeyRequired', 'createRouteResponse'_apiKeyRequired' - Specifies whether an API key is required for this route. Supported only -- for WebSocket APIs. -- -- 'authorizationScopes', 'createRouteResponse'_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. -- -- 'authorizationType', 'createRouteResponse'_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. -- -- 'authorizerId', 'createRouteResponse'_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. -- -- 'modelSelectionExpression', 'createRouteResponse'_modelSelectionExpression' - The model selection expression for the route. Supported only for -- WebSocket APIs. -- -- 'operationName', 'createRouteResponse'_operationName' - The operation name for the route. -- -- 'requestModels', 'createRouteResponse'_requestModels' - The request models for the route. Supported only for WebSocket APIs. -- -- 'requestParameters', 'createRouteResponse'_requestParameters' - The request parameters for the route. Supported only for WebSocket APIs. -- -- 'routeId', 'createRouteResponse'_routeId' - The route ID. -- -- 'routeKey', 'createRouteResponse'_routeKey' - The route key for the route. -- -- 'routeResponseSelectionExpression', 'createRouteResponse'_routeResponseSelectionExpression' - The route response selection expression for the route. Supported only -- for WebSocket APIs. -- -- 'target', 'createRouteResponse'_target' - The target for the route. -- -- 'httpStatus', 'createRouteResponse'_httpStatus' - The response's http status code. newCreateRouteResponse' :: -- | 'httpStatus' Prelude.Int -> CreateRouteResponse' newCreateRouteResponse' pHttpStatus_ = CreateRouteResponse'' { apiGatewayManaged = Prelude.Nothing, apiKeyRequired = Prelude.Nothing, authorizationScopes = Prelude.Nothing, authorizationType = Prelude.Nothing, authorizerId = Prelude.Nothing, modelSelectionExpression = Prelude.Nothing, operationName = Prelude.Nothing, requestModels = Prelude.Nothing, requestParameters = Prelude.Nothing, routeId = Prelude.Nothing, routeKey = Prelude.Nothing, routeResponseSelectionExpression = Prelude.Nothing, target = Prelude.Nothing, httpStatus = pHttpStatus_ } -- | 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. createRouteResponse'_apiGatewayManaged :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Bool) createRouteResponse'_apiGatewayManaged = Lens.lens (\CreateRouteResponse'' {apiGatewayManaged} -> apiGatewayManaged) (\s@CreateRouteResponse'' {} a -> s {apiGatewayManaged = a} :: CreateRouteResponse') -- | Specifies whether an API key is required for this route. Supported only -- for WebSocket APIs. createRouteResponse'_apiKeyRequired :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Bool) createRouteResponse'_apiKeyRequired = Lens.lens (\CreateRouteResponse'' {apiKeyRequired} -> apiKeyRequired) (\s@CreateRouteResponse'' {} a -> s {apiKeyRequired = a} :: CreateRouteResponse') -- | 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. createRouteResponse'_authorizationScopes :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe [Prelude.Text]) createRouteResponse'_authorizationScopes = Lens.lens (\CreateRouteResponse'' {authorizationScopes} -> authorizationScopes) (\s@CreateRouteResponse'' {} a -> s {authorizationScopes = a} :: CreateRouteResponse') Prelude.. Lens.mapping Lens.coerced -- | 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. createRouteResponse'_authorizationType :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe AuthorizationType) createRouteResponse'_authorizationType = Lens.lens (\CreateRouteResponse'' {authorizationType} -> authorizationType) (\s@CreateRouteResponse'' {} a -> s {authorizationType = a} :: CreateRouteResponse') -- | 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. createRouteResponse'_authorizerId :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_authorizerId = Lens.lens (\CreateRouteResponse'' {authorizerId} -> authorizerId) (\s@CreateRouteResponse'' {} a -> s {authorizerId = a} :: CreateRouteResponse') -- | The model selection expression for the route. Supported only for -- WebSocket APIs. createRouteResponse'_modelSelectionExpression :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_modelSelectionExpression = Lens.lens (\CreateRouteResponse'' {modelSelectionExpression} -> modelSelectionExpression) (\s@CreateRouteResponse'' {} a -> s {modelSelectionExpression = a} :: CreateRouteResponse') -- | The operation name for the route. createRouteResponse'_operationName :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_operationName = Lens.lens (\CreateRouteResponse'' {operationName} -> operationName) (\s@CreateRouteResponse'' {} a -> s {operationName = a} :: CreateRouteResponse') -- | The request models for the route. Supported only for WebSocket APIs. createRouteResponse'_requestModels :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)) createRouteResponse'_requestModels = Lens.lens (\CreateRouteResponse'' {requestModels} -> requestModels) (\s@CreateRouteResponse'' {} a -> s {requestModels = a} :: CreateRouteResponse') Prelude.. Lens.mapping Lens.coerced -- | The request parameters for the route. Supported only for WebSocket APIs. createRouteResponse'_requestParameters :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints)) createRouteResponse'_requestParameters = Lens.lens (\CreateRouteResponse'' {requestParameters} -> requestParameters) (\s@CreateRouteResponse'' {} a -> s {requestParameters = a} :: CreateRouteResponse') Prelude.. Lens.mapping Lens.coerced -- | The route ID. createRouteResponse'_routeId :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_routeId = Lens.lens (\CreateRouteResponse'' {routeId} -> routeId) (\s@CreateRouteResponse'' {} a -> s {routeId = a} :: CreateRouteResponse') -- | The route key for the route. createRouteResponse'_routeKey :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_routeKey = Lens.lens (\CreateRouteResponse'' {routeKey} -> routeKey) (\s@CreateRouteResponse'' {} a -> s {routeKey = a} :: CreateRouteResponse') -- | The route response selection expression for the route. Supported only -- for WebSocket APIs. createRouteResponse'_routeResponseSelectionExpression :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_routeResponseSelectionExpression = Lens.lens (\CreateRouteResponse'' {routeResponseSelectionExpression} -> routeResponseSelectionExpression) (\s@CreateRouteResponse'' {} a -> s {routeResponseSelectionExpression = a} :: CreateRouteResponse') -- | The target for the route. createRouteResponse'_target :: Lens.Lens' CreateRouteResponse' (Prelude.Maybe Prelude.Text) createRouteResponse'_target = Lens.lens (\CreateRouteResponse'' {target} -> target) (\s@CreateRouteResponse'' {} a -> s {target = a} :: CreateRouteResponse') -- | The response's http status code. createRouteResponse'_httpStatus :: Lens.Lens' CreateRouteResponse' Prelude.Int createRouteResponse'_httpStatus = Lens.lens (\CreateRouteResponse'' {httpStatus} -> httpStatus) (\s@CreateRouteResponse'' {} a -> s {httpStatus = a} :: CreateRouteResponse') instance Prelude.NFData CreateRouteResponse' where rnf CreateRouteResponse'' {..} = Prelude.rnf apiGatewayManaged `Prelude.seq` Prelude.rnf apiKeyRequired `Prelude.seq` Prelude.rnf authorizationScopes `Prelude.seq` Prelude.rnf authorizationType `Prelude.seq` Prelude.rnf authorizerId `Prelude.seq` Prelude.rnf modelSelectionExpression `Prelude.seq` Prelude.rnf operationName `Prelude.seq` Prelude.rnf requestModels `Prelude.seq` Prelude.rnf requestParameters `Prelude.seq` Prelude.rnf routeId `Prelude.seq` Prelude.rnf routeKey `Prelude.seq` Prelude.rnf routeResponseSelectionExpression `Prelude.seq` Prelude.rnf target `Prelude.seq` Prelude.rnf httpStatus