/** * 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 APIGateway { namespace Model { /** *

Creates a customization of a GatewayResponse of a specified response * type and status code on the given RestApi.

See Also:

AWS * API Reference

*/ class AWS_APIGATEWAY_API PutGatewayResponseRequest : public APIGatewayRequest { public: PutGatewayResponseRequest(); // 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 "PutGatewayResponse"; } Aws::String SerializePayload() const override; /** *

[Required] The string identifier of the associated RestApi.

*/ inline const Aws::String& GetRestApiId() const{ return m_restApiId; } /** *

[Required] The string identifier of the associated RestApi.

*/ inline bool RestApiIdHasBeenSet() const { return m_restApiIdHasBeenSet; } /** *

[Required] The string identifier of the associated RestApi.

*/ inline void SetRestApiId(const Aws::String& value) { m_restApiIdHasBeenSet = true; m_restApiId = value; } /** *

[Required] The string identifier of the associated RestApi.

*/ inline void SetRestApiId(Aws::String&& value) { m_restApiIdHasBeenSet = true; m_restApiId = std::move(value); } /** *

[Required] The string identifier of the associated RestApi.

*/ inline void SetRestApiId(const char* value) { m_restApiIdHasBeenSet = true; m_restApiId.assign(value); } /** *

[Required] The string identifier of the associated RestApi.

*/ inline PutGatewayResponseRequest& WithRestApiId(const Aws::String& value) { SetRestApiId(value); return *this;} /** *

[Required] The string identifier of the associated RestApi.

*/ inline PutGatewayResponseRequest& WithRestApiId(Aws::String&& value) { SetRestApiId(std::move(value)); return *this;} /** *

[Required] The string identifier of the associated RestApi.

*/ inline PutGatewayResponseRequest& WithRestApiId(const char* value) { SetRestApiId(value); return *this;} /** *

[Required]

The response type of the associated GatewayResponse. * Valid values are *

  • ACCESS_DENIED
  • API_CONFIGURATION_ERROR
  • AUTHORIZER_FAILURE
  • * AUTHORIZER_CONFIGURATION_ERROR
  • BAD_REQUEST_PARAMETERS
  • BAD_REQUEST_BODY
  • DEFAULT_4XX
  • DEFAULT_5XX
  • EXPIRED_TOKEN
  • INVALID_SIGNATURE
  • INTEGRATION_FAILURE
  • INTEGRATION_TIMEOUT
  • INVALID_API_KEY
  • MISSING_AUTHENTICATION_TOKEN
  • * QUOTA_EXCEEDED
  • REQUEST_TOO_LARGE
  • RESOURCE_NOT_FOUND
  • THROTTLED
  • UNAUTHORIZED
  • UNSUPPORTED_MEDIA_TYPE
*

*/ inline const GatewayResponseType& GetResponseType() const{ return m_responseType; } /** *

[Required]

The response type of the associated GatewayResponse. * Valid values are *

  • ACCESS_DENIED
  • API_CONFIGURATION_ERROR
  • AUTHORIZER_FAILURE
  • * AUTHORIZER_CONFIGURATION_ERROR
  • BAD_REQUEST_PARAMETERS
  • BAD_REQUEST_BODY
  • DEFAULT_4XX
  • DEFAULT_5XX
  • EXPIRED_TOKEN
  • INVALID_SIGNATURE
  • INTEGRATION_FAILURE
  • INTEGRATION_TIMEOUT
  • INVALID_API_KEY
  • MISSING_AUTHENTICATION_TOKEN
  • * QUOTA_EXCEEDED
  • REQUEST_TOO_LARGE
  • RESOURCE_NOT_FOUND
  • THROTTLED
  • UNAUTHORIZED
  • UNSUPPORTED_MEDIA_TYPE
*

*/ inline bool ResponseTypeHasBeenSet() const { return m_responseTypeHasBeenSet; } /** *

[Required]

The response type of the associated GatewayResponse. * Valid values are *

  • ACCESS_DENIED
  • API_CONFIGURATION_ERROR
  • AUTHORIZER_FAILURE
  • * AUTHORIZER_CONFIGURATION_ERROR
  • BAD_REQUEST_PARAMETERS
  • BAD_REQUEST_BODY
  • DEFAULT_4XX
  • DEFAULT_5XX
  • EXPIRED_TOKEN
  • INVALID_SIGNATURE
  • INTEGRATION_FAILURE
  • INTEGRATION_TIMEOUT
  • INVALID_API_KEY
  • MISSING_AUTHENTICATION_TOKEN
  • * QUOTA_EXCEEDED
  • REQUEST_TOO_LARGE
  • RESOURCE_NOT_FOUND
  • THROTTLED
  • UNAUTHORIZED
  • UNSUPPORTED_MEDIA_TYPE
*

*/ inline void SetResponseType(const GatewayResponseType& value) { m_responseTypeHasBeenSet = true; m_responseType = value; } /** *

[Required]

The response type of the associated GatewayResponse. * Valid values are *

  • ACCESS_DENIED
  • API_CONFIGURATION_ERROR
  • AUTHORIZER_FAILURE
  • * AUTHORIZER_CONFIGURATION_ERROR
  • BAD_REQUEST_PARAMETERS
  • BAD_REQUEST_BODY
  • DEFAULT_4XX
  • DEFAULT_5XX
  • EXPIRED_TOKEN
  • INVALID_SIGNATURE
  • INTEGRATION_FAILURE
  • INTEGRATION_TIMEOUT
  • INVALID_API_KEY
  • MISSING_AUTHENTICATION_TOKEN
  • * QUOTA_EXCEEDED
  • REQUEST_TOO_LARGE
  • RESOURCE_NOT_FOUND
  • THROTTLED
  • UNAUTHORIZED
  • UNSUPPORTED_MEDIA_TYPE
*

*/ inline void SetResponseType(GatewayResponseType&& value) { m_responseTypeHasBeenSet = true; m_responseType = std::move(value); } /** *

[Required]

The response type of the associated GatewayResponse. * Valid values are *

  • ACCESS_DENIED
  • API_CONFIGURATION_ERROR
  • AUTHORIZER_FAILURE
  • * AUTHORIZER_CONFIGURATION_ERROR
  • BAD_REQUEST_PARAMETERS
  • BAD_REQUEST_BODY
  • DEFAULT_4XX
  • DEFAULT_5XX
  • EXPIRED_TOKEN
  • INVALID_SIGNATURE
  • INTEGRATION_FAILURE
  • INTEGRATION_TIMEOUT
  • INVALID_API_KEY
  • MISSING_AUTHENTICATION_TOKEN
  • * QUOTA_EXCEEDED
  • REQUEST_TOO_LARGE
  • RESOURCE_NOT_FOUND
  • THROTTLED
  • UNAUTHORIZED
  • UNSUPPORTED_MEDIA_TYPE
*

*/ inline PutGatewayResponseRequest& WithResponseType(const GatewayResponseType& value) { SetResponseType(value); return *this;} /** *

[Required]

The response type of the associated GatewayResponse. * Valid values are *

  • ACCESS_DENIED
  • API_CONFIGURATION_ERROR
  • AUTHORIZER_FAILURE
  • * AUTHORIZER_CONFIGURATION_ERROR
  • BAD_REQUEST_PARAMETERS
  • BAD_REQUEST_BODY
  • DEFAULT_4XX
  • DEFAULT_5XX
  • EXPIRED_TOKEN
  • INVALID_SIGNATURE
  • INTEGRATION_FAILURE
  • INTEGRATION_TIMEOUT
  • INVALID_API_KEY
  • MISSING_AUTHENTICATION_TOKEN
  • * QUOTA_EXCEEDED
  • REQUEST_TOO_LARGE
  • RESOURCE_NOT_FOUND
  • THROTTLED
  • UNAUTHORIZED
  • UNSUPPORTED_MEDIA_TYPE
*

*/ inline PutGatewayResponseRequest& WithResponseType(GatewayResponseType&& value) { SetResponseType(std::move(value)); return *this;} /** * The HTTP status code of the GatewayResponse. */ inline const Aws::String& GetStatusCode() const{ return m_statusCode; } /** * The HTTP status code of the GatewayResponse. */ inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; } /** * The HTTP status code of the GatewayResponse. */ inline void SetStatusCode(const Aws::String& value) { m_statusCodeHasBeenSet = true; m_statusCode = value; } /** * The HTTP status code of the GatewayResponse. */ inline void SetStatusCode(Aws::String&& value) { m_statusCodeHasBeenSet = true; m_statusCode = std::move(value); } /** * The HTTP status code of the GatewayResponse. */ inline void SetStatusCode(const char* value) { m_statusCodeHasBeenSet = true; m_statusCode.assign(value); } /** * The HTTP status code of the GatewayResponse. */ inline PutGatewayResponseRequest& WithStatusCode(const Aws::String& value) { SetStatusCode(value); return *this;} /** * The HTTP status code of the GatewayResponse. */ inline PutGatewayResponseRequest& WithStatusCode(Aws::String&& value) { SetStatusCode(std::move(value)); return *this;} /** * The HTTP status code of the GatewayResponse. */ inline PutGatewayResponseRequest& WithStatusCode(const char* value) { SetStatusCode(value); return *this;} /** *

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response parameters (paths, query strings and headers) of the * GatewayResponse as a string-to-string map of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

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

Response templates of the GatewayResponse as a string-to-string map * of key-value pairs.

*/ inline PutGatewayResponseRequest& AddResponseTemplates(const char* key, const char* value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(key, value); return *this; } private: Aws::String m_restApiId; bool m_restApiIdHasBeenSet; GatewayResponseType m_responseType; bool m_responseTypeHasBeenSet; Aws::String m_statusCode; bool m_statusCodeHasBeenSet; Aws::Map m_responseParameters; bool m_responseParametersHasBeenSet; Aws::Map m_responseTemplates; bool m_responseTemplatesHasBeenSet; }; } // namespace Model } // namespace APIGateway } // namespace Aws