/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace ApiGatewayV2 { namespace Model { /** *

Creates a new Route resource to represent a route.

See Also:

* AWS * API Reference

*/ class CreateRouteRequest : public ApiGatewayV2Request { public: AWS_APIGATEWAYV2_API CreateRouteRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateRoute"; } AWS_APIGATEWAYV2_API Aws::String SerializePayload() const override; /** *

The API identifier.

*/ inline const Aws::String& GetApiId() const{ return m_apiId; } /** *

The API identifier.

*/ inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; } /** *

The API identifier.

*/ inline void SetApiId(const Aws::String& value) { m_apiIdHasBeenSet = true; m_apiId = value; } /** *

The API identifier.

*/ inline void SetApiId(Aws::String&& value) { m_apiIdHasBeenSet = true; m_apiId = std::move(value); } /** *

The API identifier.

*/ inline void SetApiId(const char* value) { m_apiIdHasBeenSet = true; m_apiId.assign(value); } /** *

The API identifier.

*/ inline CreateRouteRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;} /** *

The API identifier.

*/ inline CreateRouteRequest& WithApiId(Aws::String&& value) { SetApiId(std::move(value)); return *this;} /** *

The API identifier.

*/ inline CreateRouteRequest& WithApiId(const char* value) { SetApiId(value); return *this;} /** *

Specifies whether an API key is required for the route. Supported only for * WebSocket APIs.

*/ inline bool GetApiKeyRequired() const{ return m_apiKeyRequired; } /** *

Specifies whether an API key is required for the route. Supported only for * WebSocket APIs.

*/ inline bool ApiKeyRequiredHasBeenSet() const { return m_apiKeyRequiredHasBeenSet; } /** *

Specifies whether an API key is required for the route. Supported only for * WebSocket APIs.

*/ inline void SetApiKeyRequired(bool value) { m_apiKeyRequiredHasBeenSet = true; m_apiKeyRequired = value; } /** *

Specifies whether an API key is required for the route. Supported only for * WebSocket APIs.

*/ inline CreateRouteRequest& WithApiKeyRequired(bool value) { SetApiKeyRequired(value); return *this;} /** *

The authorization scopes supported by this route.

*/ inline const Aws::Vector& GetAuthorizationScopes() const{ return m_authorizationScopes; } /** *

The authorization scopes supported by this route.

*/ inline bool AuthorizationScopesHasBeenSet() const { return m_authorizationScopesHasBeenSet; } /** *

The authorization scopes supported by this route.

*/ inline void SetAuthorizationScopes(const Aws::Vector& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes = value; } /** *

The authorization scopes supported by this route.

*/ inline void SetAuthorizationScopes(Aws::Vector&& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes = std::move(value); } /** *

The authorization scopes supported by this route.

*/ inline CreateRouteRequest& WithAuthorizationScopes(const Aws::Vector& value) { SetAuthorizationScopes(value); return *this;} /** *

The authorization scopes supported by this route.

*/ inline CreateRouteRequest& WithAuthorizationScopes(Aws::Vector&& value) { SetAuthorizationScopes(std::move(value)); return *this;} /** *

The authorization scopes supported by this route.

*/ inline CreateRouteRequest& AddAuthorizationScopes(const Aws::String& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes.push_back(value); return *this; } /** *

The authorization scopes supported by this route.

*/ inline CreateRouteRequest& AddAuthorizationScopes(Aws::String&& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes.push_back(std::move(value)); return *this; } /** *

The authorization scopes supported by this route.

*/ inline CreateRouteRequest& AddAuthorizationScopes(const char* value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes.push_back(value); return *this; } /** *

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.

*/ inline const AuthorizationType& GetAuthorizationType() const{ return m_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.

*/ inline bool AuthorizationTypeHasBeenSet() const { return m_authorizationTypeHasBeenSet; } /** *

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.

*/ inline void SetAuthorizationType(const AuthorizationType& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = value; } /** *

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.

*/ inline void SetAuthorizationType(AuthorizationType&& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = std::move(value); } /** *

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.

*/ inline CreateRouteRequest& WithAuthorizationType(const AuthorizationType& value) { SetAuthorizationType(value); return *this;} /** *

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.

*/ inline CreateRouteRequest& WithAuthorizationType(AuthorizationType&& value) { SetAuthorizationType(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::String& GetAuthorizerId() const{ return m_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.

*/ inline bool AuthorizerIdHasBeenSet() const { return m_authorizerIdHasBeenSet; } /** *

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.

*/ inline void SetAuthorizerId(const Aws::String& value) { m_authorizerIdHasBeenSet = true; m_authorizerId = value; } /** *

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.

*/ inline void SetAuthorizerId(Aws::String&& value) { m_authorizerIdHasBeenSet = true; m_authorizerId = std::move(value); } /** *

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.

*/ inline void SetAuthorizerId(const char* value) { m_authorizerIdHasBeenSet = true; m_authorizerId.assign(value); } /** *

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.

*/ inline CreateRouteRequest& WithAuthorizerId(const Aws::String& value) { SetAuthorizerId(value); return *this;} /** *

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.

*/ inline CreateRouteRequest& WithAuthorizerId(Aws::String&& value) { SetAuthorizerId(std::move(value)); return *this;} /** *

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.

*/ inline CreateRouteRequest& WithAuthorizerId(const char* value) { SetAuthorizerId(value); return *this;} /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline const Aws::String& GetModelSelectionExpression() const{ return m_modelSelectionExpression; } /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline bool ModelSelectionExpressionHasBeenSet() const { return m_modelSelectionExpressionHasBeenSet; } /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline void SetModelSelectionExpression(const Aws::String& value) { m_modelSelectionExpressionHasBeenSet = true; m_modelSelectionExpression = value; } /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline void SetModelSelectionExpression(Aws::String&& value) { m_modelSelectionExpressionHasBeenSet = true; m_modelSelectionExpression = std::move(value); } /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline void SetModelSelectionExpression(const char* value) { m_modelSelectionExpressionHasBeenSet = true; m_modelSelectionExpression.assign(value); } /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline CreateRouteRequest& WithModelSelectionExpression(const Aws::String& value) { SetModelSelectionExpression(value); return *this;} /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline CreateRouteRequest& WithModelSelectionExpression(Aws::String&& value) { SetModelSelectionExpression(std::move(value)); return *this;} /** *

The model selection expression for the route. Supported only for WebSocket * APIs.

*/ inline CreateRouteRequest& WithModelSelectionExpression(const char* value) { SetModelSelectionExpression(value); return *this;} /** *

The operation name for the route.

*/ inline const Aws::String& GetOperationName() const{ return m_operationName; } /** *

The operation name for the route.

*/ inline bool OperationNameHasBeenSet() const { return m_operationNameHasBeenSet; } /** *

The operation name for the route.

*/ inline void SetOperationName(const Aws::String& value) { m_operationNameHasBeenSet = true; m_operationName = value; } /** *

The operation name for the route.

*/ inline void SetOperationName(Aws::String&& value) { m_operationNameHasBeenSet = true; m_operationName = std::move(value); } /** *

The operation name for the route.

*/ inline void SetOperationName(const char* value) { m_operationNameHasBeenSet = true; m_operationName.assign(value); } /** *

The operation name for the route.

*/ inline CreateRouteRequest& WithOperationName(const Aws::String& value) { SetOperationName(value); return *this;} /** *

The operation name for the route.

*/ inline CreateRouteRequest& WithOperationName(Aws::String&& value) { SetOperationName(std::move(value)); return *this;} /** *

The operation name for the route.

*/ inline CreateRouteRequest& WithOperationName(const char* value) { SetOperationName(value); return *this;} /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline const Aws::Map& GetRequestModels() const{ return m_requestModels; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline bool RequestModelsHasBeenSet() const { return m_requestModelsHasBeenSet; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline void SetRequestModels(const Aws::Map& value) { m_requestModelsHasBeenSet = true; m_requestModels = value; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline void SetRequestModels(Aws::Map&& value) { m_requestModelsHasBeenSet = true; m_requestModels = std::move(value); } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& WithRequestModels(const Aws::Map& value) { SetRequestModels(value); return *this;} /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& WithRequestModels(Aws::Map&& value) { SetRequestModels(std::move(value)); return *this;} /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(const Aws::String& key, const Aws::String& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, value); return *this; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(Aws::String&& key, const Aws::String& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(std::move(key), value); return *this; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(const Aws::String& key, Aws::String&& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, std::move(value)); return *this; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(Aws::String&& key, Aws::String&& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(std::move(key), std::move(value)); return *this; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(const char* key, Aws::String&& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, std::move(value)); return *this; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(Aws::String&& key, const char* value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(std::move(key), value); return *this; } /** *

The request models for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestModels(const char* key, const char* value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, value); return *this; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline const Aws::Map& GetRequestParameters() const{ return m_requestParameters; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline bool RequestParametersHasBeenSet() const { return m_requestParametersHasBeenSet; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline void SetRequestParameters(const Aws::Map& value) { m_requestParametersHasBeenSet = true; m_requestParameters = value; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline void SetRequestParameters(Aws::Map&& value) { m_requestParametersHasBeenSet = true; m_requestParameters = std::move(value); } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& WithRequestParameters(const Aws::Map& value) { SetRequestParameters(value); return *this;} /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& WithRequestParameters(Aws::Map&& value) { SetRequestParameters(std::move(value)); return *this;} /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestParameters(const Aws::String& key, const ParameterConstraints& value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(key, value); return *this; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestParameters(Aws::String&& key, const ParameterConstraints& value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(std::move(key), value); return *this; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestParameters(const Aws::String& key, ParameterConstraints&& value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(key, std::move(value)); return *this; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestParameters(Aws::String&& key, ParameterConstraints&& value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(std::move(key), std::move(value)); return *this; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestParameters(const char* key, ParameterConstraints&& value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(key, std::move(value)); return *this; } /** *

The request parameters for the route. Supported only for WebSocket APIs.

*/ inline CreateRouteRequest& AddRequestParameters(const char* key, const ParameterConstraints& value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(key, value); return *this; } /** *

The route key for the route.

*/ inline const Aws::String& GetRouteKey() const{ return m_routeKey; } /** *

The route key for the route.

*/ inline bool RouteKeyHasBeenSet() const { return m_routeKeyHasBeenSet; } /** *

The route key for the route.

*/ inline void SetRouteKey(const Aws::String& value) { m_routeKeyHasBeenSet = true; m_routeKey = value; } /** *

The route key for the route.

*/ inline void SetRouteKey(Aws::String&& value) { m_routeKeyHasBeenSet = true; m_routeKey = std::move(value); } /** *

The route key for the route.

*/ inline void SetRouteKey(const char* value) { m_routeKeyHasBeenSet = true; m_routeKey.assign(value); } /** *

The route key for the route.

*/ inline CreateRouteRequest& WithRouteKey(const Aws::String& value) { SetRouteKey(value); return *this;} /** *

The route key for the route.

*/ inline CreateRouteRequest& WithRouteKey(Aws::String&& value) { SetRouteKey(std::move(value)); return *this;} /** *

The route key for the route.

*/ inline CreateRouteRequest& WithRouteKey(const char* value) { SetRouteKey(value); return *this;} /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline const Aws::String& GetRouteResponseSelectionExpression() const{ return m_routeResponseSelectionExpression; } /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline bool RouteResponseSelectionExpressionHasBeenSet() const { return m_routeResponseSelectionExpressionHasBeenSet; } /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline void SetRouteResponseSelectionExpression(const Aws::String& value) { m_routeResponseSelectionExpressionHasBeenSet = true; m_routeResponseSelectionExpression = value; } /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline void SetRouteResponseSelectionExpression(Aws::String&& value) { m_routeResponseSelectionExpressionHasBeenSet = true; m_routeResponseSelectionExpression = std::move(value); } /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline void SetRouteResponseSelectionExpression(const char* value) { m_routeResponseSelectionExpressionHasBeenSet = true; m_routeResponseSelectionExpression.assign(value); } /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline CreateRouteRequest& WithRouteResponseSelectionExpression(const Aws::String& value) { SetRouteResponseSelectionExpression(value); return *this;} /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline CreateRouteRequest& WithRouteResponseSelectionExpression(Aws::String&& value) { SetRouteResponseSelectionExpression(std::move(value)); return *this;} /** *

The route response selection expression for the route. Supported only for * WebSocket APIs.

*/ inline CreateRouteRequest& WithRouteResponseSelectionExpression(const char* value) { SetRouteResponseSelectionExpression(value); return *this;} /** *

The target for the route.

*/ inline const Aws::String& GetTarget() const{ return m_target; } /** *

The target for the route.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The target for the route.

*/ inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The target for the route.

*/ inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The target for the route.

*/ inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); } /** *

The target for the route.

*/ inline CreateRouteRequest& WithTarget(const Aws::String& value) { SetTarget(value); return *this;} /** *

The target for the route.

*/ inline CreateRouteRequest& WithTarget(Aws::String&& value) { SetTarget(std::move(value)); return *this;} /** *

The target for the route.

*/ inline CreateRouteRequest& WithTarget(const char* value) { SetTarget(value); return *this;} private: Aws::String m_apiId; bool m_apiIdHasBeenSet = false; bool m_apiKeyRequired; bool m_apiKeyRequiredHasBeenSet = false; Aws::Vector m_authorizationScopes; bool m_authorizationScopesHasBeenSet = false; AuthorizationType m_authorizationType; bool m_authorizationTypeHasBeenSet = false; Aws::String m_authorizerId; bool m_authorizerIdHasBeenSet = false; Aws::String m_modelSelectionExpression; bool m_modelSelectionExpressionHasBeenSet = false; Aws::String m_operationName; bool m_operationNameHasBeenSet = false; Aws::Map m_requestModels; bool m_requestModelsHasBeenSet = false; Aws::Map m_requestParameters; bool m_requestParametersHasBeenSet = false; Aws::String m_routeKey; bool m_routeKeyHasBeenSet = false; Aws::String m_routeResponseSelectionExpression; bool m_routeResponseSelectionExpressionHasBeenSet = false; Aws::String m_target; bool m_targetHasBeenSet = false; }; } // namespace Model } // namespace ApiGatewayV2 } // namespace Aws