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

Creates a new IntegrationResponse resource to represent an integration * response.

See Also:

AWS * API Reference

*/ class CreateIntegrationResponseRequest : public ApiGatewayV2Request { public: AWS_APIGATEWAYV2_API CreateIntegrationResponseRequest(); // 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 "CreateIntegrationResponse"; } 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 CreateIntegrationResponseRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;} /** *

The API identifier.

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

The API identifier.

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

Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following * behaviors:

CONVERT_TO_BINARY: Converts a response payload from a * Base64-encoded string to the corresponding binary blob.

CONVERT_TO_TEXT: * Converts a response payload from a binary blob to a Base64-encoded string.

*

If this property is not defined, the response payload will be passed through * from the integration response to the route response or method response without * modification.

*/ inline const ContentHandlingStrategy& GetContentHandlingStrategy() const{ return m_contentHandlingStrategy; } /** *

Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following * behaviors:

CONVERT_TO_BINARY: Converts a response payload from a * Base64-encoded string to the corresponding binary blob.

CONVERT_TO_TEXT: * Converts a response payload from a binary blob to a Base64-encoded string.

*

If this property is not defined, the response payload will be passed through * from the integration response to the route response or method response without * modification.

*/ inline bool ContentHandlingStrategyHasBeenSet() const { return m_contentHandlingStrategyHasBeenSet; } /** *

Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following * behaviors:

CONVERT_TO_BINARY: Converts a response payload from a * Base64-encoded string to the corresponding binary blob.

CONVERT_TO_TEXT: * Converts a response payload from a binary blob to a Base64-encoded string.

*

If this property is not defined, the response payload will be passed through * from the integration response to the route response or method response without * modification.

*/ inline void SetContentHandlingStrategy(const ContentHandlingStrategy& value) { m_contentHandlingStrategyHasBeenSet = true; m_contentHandlingStrategy = value; } /** *

Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following * behaviors:

CONVERT_TO_BINARY: Converts a response payload from a * Base64-encoded string to the corresponding binary blob.

CONVERT_TO_TEXT: * Converts a response payload from a binary blob to a Base64-encoded string.

*

If this property is not defined, the response payload will be passed through * from the integration response to the route response or method response without * modification.

*/ inline void SetContentHandlingStrategy(ContentHandlingStrategy&& value) { m_contentHandlingStrategyHasBeenSet = true; m_contentHandlingStrategy = std::move(value); } /** *

Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following * behaviors:

CONVERT_TO_BINARY: Converts a response payload from a * Base64-encoded string to the corresponding binary blob.

CONVERT_TO_TEXT: * Converts a response payload from a binary blob to a Base64-encoded string.

*

If this property is not defined, the response payload will be passed through * from the integration response to the route response or method response without * modification.

*/ inline CreateIntegrationResponseRequest& WithContentHandlingStrategy(const ContentHandlingStrategy& value) { SetContentHandlingStrategy(value); return *this;} /** *

Specifies how to handle response payload content type conversions. Supported * values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following * behaviors:

CONVERT_TO_BINARY: Converts a response payload from a * Base64-encoded string to the corresponding binary blob.

CONVERT_TO_TEXT: * Converts a response payload from a binary blob to a Base64-encoded string.

*

If this property is not defined, the response payload will be passed through * from the integration response to the route response or method response without * modification.

*/ inline CreateIntegrationResponseRequest& WithContentHandlingStrategy(ContentHandlingStrategy&& value) { SetContentHandlingStrategy(std::move(value)); return *this;} /** *

The integration ID.

*/ inline const Aws::String& GetIntegrationId() const{ return m_integrationId; } /** *

The integration ID.

*/ inline bool IntegrationIdHasBeenSet() const { return m_integrationIdHasBeenSet; } /** *

The integration ID.

*/ inline void SetIntegrationId(const Aws::String& value) { m_integrationIdHasBeenSet = true; m_integrationId = value; } /** *

The integration ID.

*/ inline void SetIntegrationId(Aws::String&& value) { m_integrationIdHasBeenSet = true; m_integrationId = std::move(value); } /** *

The integration ID.

*/ inline void SetIntegrationId(const char* value) { m_integrationIdHasBeenSet = true; m_integrationId.assign(value); } /** *

The integration ID.

*/ inline CreateIntegrationResponseRequest& WithIntegrationId(const Aws::String& value) { SetIntegrationId(value); return *this;} /** *

The integration ID.

*/ inline CreateIntegrationResponseRequest& WithIntegrationId(Aws::String&& value) { SetIntegrationId(std::move(value)); return *this;} /** *

The integration ID.

*/ inline CreateIntegrationResponseRequest& WithIntegrationId(const char* value) { SetIntegrationId(value); return *this;} /** *

The integration response key.

*/ inline const Aws::String& GetIntegrationResponseKey() const{ return m_integrationResponseKey; } /** *

The integration response key.

*/ inline bool IntegrationResponseKeyHasBeenSet() const { return m_integrationResponseKeyHasBeenSet; } /** *

The integration response key.

*/ inline void SetIntegrationResponseKey(const Aws::String& value) { m_integrationResponseKeyHasBeenSet = true; m_integrationResponseKey = value; } /** *

The integration response key.

*/ inline void SetIntegrationResponseKey(Aws::String&& value) { m_integrationResponseKeyHasBeenSet = true; m_integrationResponseKey = std::move(value); } /** *

The integration response key.

*/ inline void SetIntegrationResponseKey(const char* value) { m_integrationResponseKeyHasBeenSet = true; m_integrationResponseKey.assign(value); } /** *

The integration response key.

*/ inline CreateIntegrationResponseRequest& WithIntegrationResponseKey(const Aws::String& value) { SetIntegrationResponseKey(value); return *this;} /** *

The integration response key.

*/ inline CreateIntegrationResponseRequest& WithIntegrationResponseKey(Aws::String&& value) { SetIntegrationResponseKey(std::move(value)); return *this;} /** *

The integration response key.

*/ inline CreateIntegrationResponseRequest& WithIntegrationResponseKey(const char* value) { SetIntegrationResponseKey(value); return *this;} /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline const Aws::Map& GetResponseParameters() const{ return m_responseParameters; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline bool ResponseParametersHasBeenSet() const { return m_responseParametersHasBeenSet; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline void SetResponseParameters(const Aws::Map& value) { m_responseParametersHasBeenSet = true; m_responseParameters = value; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline void SetResponseParameters(Aws::Map&& value) { m_responseParametersHasBeenSet = true; m_responseParameters = std::move(value); } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& WithResponseParameters(const Aws::Map& value) { SetResponseParameters(value); return *this;} /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& WithResponseParameters(Aws::Map&& value) { SetResponseParameters(std::move(value)); return *this;} /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(const Aws::String& key, const Aws::String& value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(key, value); return *this; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(Aws::String&& key, const Aws::String& value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(std::move(key), value); return *this; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(const Aws::String& key, Aws::String&& value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(key, std::move(value)); return *this; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(Aws::String&& key, Aws::String&& value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(std::move(key), std::move(value)); return *this; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(const char* key, Aws::String&& value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(key, std::move(value)); return *this; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(Aws::String&& key, const char* value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(std::move(key), value); return *this; } /** *

A key-value map specifying response parameters that are passed to the method * response from the backend. The key is a method response header parameter name * and the mapped value is an integration response header value, a static value * enclosed within a pair of single quotes, or a JSON expression from the * integration response body. The mapping key must match the pattern of * method.response.header.{name}, where {name} is a valid and unique header name. * The mapped non-static value must match the pattern of * integration.response.header.{name} or * integration.response.body.{JSON-expression}, where {name} is a valid and unique * response header name and {JSON-expression} is a valid JSON expression without * the $ prefix.

*/ inline CreateIntegrationResponseRequest& AddResponseParameters(const char* key, const char* value) { m_responseParametersHasBeenSet = true; m_responseParameters.emplace(key, value); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline const Aws::Map& GetResponseTemplates() const{ return m_responseTemplates; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline bool ResponseTemplatesHasBeenSet() const { return m_responseTemplatesHasBeenSet; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline void SetResponseTemplates(const Aws::Map& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates = value; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline void SetResponseTemplates(Aws::Map&& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates = std::move(value); } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& WithResponseTemplates(const Aws::Map& value) { SetResponseTemplates(value); return *this;} /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& WithResponseTemplates(Aws::Map&& value) { SetResponseTemplates(std::move(value)); return *this;} /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(const Aws::String& key, const Aws::String& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(key, value); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(Aws::String&& key, const Aws::String& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(std::move(key), value); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(const Aws::String& key, Aws::String&& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(key, std::move(value)); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(Aws::String&& key, Aws::String&& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(std::move(key), std::move(value)); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(const char* key, Aws::String&& value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(key, std::move(value)); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(Aws::String&& key, const char* value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(std::move(key), value); return *this; } /** *

The collection of response templates for the integration response as a * string-to-string map of key-value pairs. Response templates are represented as a * key/value map, with a content-type as the key and a template as the value.

*/ inline CreateIntegrationResponseRequest& AddResponseTemplates(const char* key, const char* value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(key, value); return *this; } /** *

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

*/ inline const Aws::String& GetTemplateSelectionExpression() const{ return m_templateSelectionExpression; } /** *

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

*/ inline bool TemplateSelectionExpressionHasBeenSet() const { return m_templateSelectionExpressionHasBeenSet; } /** *

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

*/ inline void SetTemplateSelectionExpression(const Aws::String& value) { m_templateSelectionExpressionHasBeenSet = true; m_templateSelectionExpression = value; } /** *

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

*/ inline void SetTemplateSelectionExpression(Aws::String&& value) { m_templateSelectionExpressionHasBeenSet = true; m_templateSelectionExpression = std::move(value); } /** *

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

*/ inline void SetTemplateSelectionExpression(const char* value) { m_templateSelectionExpressionHasBeenSet = true; m_templateSelectionExpression.assign(value); } /** *

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

*/ inline CreateIntegrationResponseRequest& WithTemplateSelectionExpression(const Aws::String& value) { SetTemplateSelectionExpression(value); return *this;} /** *

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

*/ inline CreateIntegrationResponseRequest& WithTemplateSelectionExpression(Aws::String&& value) { SetTemplateSelectionExpression(std::move(value)); return *this;} /** *

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

*/ inline CreateIntegrationResponseRequest& WithTemplateSelectionExpression(const char* value) { SetTemplateSelectionExpression(value); return *this;} private: Aws::String m_apiId; bool m_apiIdHasBeenSet = false; ContentHandlingStrategy m_contentHandlingStrategy; bool m_contentHandlingStrategyHasBeenSet = false; Aws::String m_integrationId; bool m_integrationIdHasBeenSet = false; Aws::String m_integrationResponseKey; bool m_integrationResponseKeyHasBeenSet = false; Aws::Map m_responseParameters; bool m_responseParametersHasBeenSet = false; Aws::Map m_responseTemplates; bool m_responseTemplatesHasBeenSet = false; Aws::String m_templateSelectionExpression; bool m_templateSelectionExpressionHasBeenSet = false; }; } // namespace Model } // namespace ApiGatewayV2 } // namespace Aws