/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace APIGateway { namespace Model { /** *

A gateway response of a given response type and status code, with optional * response parameters and mapping templates.

See Also:

AWS * API Reference

*/ class GatewayResponse { public: AWS_APIGATEWAY_API GatewayResponse(); AWS_APIGATEWAY_API GatewayResponse(Aws::Utils::Json::JsonView jsonValue); AWS_APIGATEWAY_API GatewayResponse& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

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

The response type of the associated GatewayResponse.

*/ inline GatewayResponse& WithResponseType(GatewayResponseType&& value) { SetResponseType(std::move(value)); return *this;} /** *

The HTTP status code for this GatewayResponse.

*/ inline const Aws::String& GetStatusCode() const{ return m_statusCode; } /** *

The HTTP status code for this GatewayResponse.

*/ inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; } /** *

The HTTP status code for this GatewayResponse.

*/ inline void SetStatusCode(const Aws::String& value) { m_statusCodeHasBeenSet = true; m_statusCode = value; } /** *

The HTTP status code for this GatewayResponse.

*/ inline void SetStatusCode(Aws::String&& value) { m_statusCodeHasBeenSet = true; m_statusCode = std::move(value); } /** *

The HTTP status code for this GatewayResponse.

*/ inline void SetStatusCode(const char* value) { m_statusCodeHasBeenSet = true; m_statusCode.assign(value); } /** *

The HTTP status code for this GatewayResponse.

*/ inline GatewayResponse& WithStatusCode(const Aws::String& value) { SetStatusCode(value); return *this;} /** *

The HTTP status code for this GatewayResponse.

*/ inline GatewayResponse& WithStatusCode(Aws::String&& value) { SetStatusCode(std::move(value)); return *this;} /** *

The HTTP status code for this GatewayResponse.

*/ inline GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& 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 GatewayResponse& AddResponseTemplates(const char* key, const char* value) { m_responseTemplatesHasBeenSet = true; m_responseTemplates.emplace(key, value); return *this; } /** *

A Boolean flag to indicate whether this GatewayResponse is the default * gateway response (true) or not (false). A default * gateway response is one generated by API Gateway without any customization by an * API developer.

*/ inline bool GetDefaultResponse() const{ return m_defaultResponse; } /** *

A Boolean flag to indicate whether this GatewayResponse is the default * gateway response (true) or not (false). A default * gateway response is one generated by API Gateway without any customization by an * API developer.

*/ inline bool DefaultResponseHasBeenSet() const { return m_defaultResponseHasBeenSet; } /** *

A Boolean flag to indicate whether this GatewayResponse is the default * gateway response (true) or not (false). A default * gateway response is one generated by API Gateway without any customization by an * API developer.

*/ inline void SetDefaultResponse(bool value) { m_defaultResponseHasBeenSet = true; m_defaultResponse = value; } /** *

A Boolean flag to indicate whether this GatewayResponse is the default * gateway response (true) or not (false). A default * gateway response is one generated by API Gateway without any customization by an * API developer.

*/ inline GatewayResponse& WithDefaultResponse(bool value) { SetDefaultResponse(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; } inline void SetRequestId(const Aws::String& value) { m_requestIdHasBeenSet = true; m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestIdHasBeenSet = true; m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestIdHasBeenSet = true; m_requestId.assign(value); } inline GatewayResponse& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GatewayResponse& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GatewayResponse& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: GatewayResponseType m_responseType; bool m_responseTypeHasBeenSet = false; Aws::String m_statusCode; bool m_statusCodeHasBeenSet = false; Aws::Map m_responseParameters; bool m_responseParametersHasBeenSet = false; Aws::Map m_responseTemplates; bool m_responseTemplatesHasBeenSet = false; bool m_defaultResponse; bool m_defaultResponseHasBeenSet = false; Aws::String m_requestId; bool m_requestIdHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws