/**
* 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
{
template
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // 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 PutGatewayResponseResult
{
public:
AWS_APIGATEWAY_API PutGatewayResponseResult();
AWS_APIGATEWAY_API PutGatewayResponseResult(const Aws::AmazonWebServiceResult& result);
AWS_APIGATEWAY_API PutGatewayResponseResult& operator=(const Aws::AmazonWebServiceResult& result);
///@{
/**
* The response type of the associated GatewayResponse.
*/
inline const GatewayResponseType& GetResponseType() const{ return m_responseType; }
inline void SetResponseType(const GatewayResponseType& value) { m_responseType = value; }
inline void SetResponseType(GatewayResponseType&& value) { m_responseType = std::move(value); }
inline PutGatewayResponseResult& WithResponseType(const GatewayResponseType& value) { SetResponseType(value); return *this;}
inline PutGatewayResponseResult& 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; }
inline void SetStatusCode(const Aws::String& value) { m_statusCode = value; }
inline void SetStatusCode(Aws::String&& value) { m_statusCode = std::move(value); }
inline void SetStatusCode(const char* value) { m_statusCode.assign(value); }
inline PutGatewayResponseResult& WithStatusCode(const Aws::String& value) { SetStatusCode(value); return *this;}
inline PutGatewayResponseResult& WithStatusCode(Aws::String&& value) { SetStatusCode(std::move(value)); return *this;}
inline PutGatewayResponseResult& 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; }
inline void SetResponseParameters(const Aws::Map& value) { m_responseParameters = value; }
inline void SetResponseParameters(Aws::Map&& value) { m_responseParameters = std::move(value); }
inline PutGatewayResponseResult& WithResponseParameters(const Aws::Map& value) { SetResponseParameters(value); return *this;}
inline PutGatewayResponseResult& WithResponseParameters(Aws::Map&& value) { SetResponseParameters(std::move(value)); return *this;}
inline PutGatewayResponseResult& AddResponseParameters(const Aws::String& key, const Aws::String& value) { m_responseParameters.emplace(key, value); return *this; }
inline PutGatewayResponseResult& AddResponseParameters(Aws::String&& key, const Aws::String& value) { m_responseParameters.emplace(std::move(key), value); return *this; }
inline PutGatewayResponseResult& AddResponseParameters(const Aws::String& key, Aws::String&& value) { m_responseParameters.emplace(key, std::move(value)); return *this; }
inline PutGatewayResponseResult& AddResponseParameters(Aws::String&& key, Aws::String&& value) { m_responseParameters.emplace(std::move(key), std::move(value)); return *this; }
inline PutGatewayResponseResult& AddResponseParameters(const char* key, Aws::String&& value) { m_responseParameters.emplace(key, std::move(value)); return *this; }
inline PutGatewayResponseResult& AddResponseParameters(Aws::String&& key, const char* value) { m_responseParameters.emplace(std::move(key), value); return *this; }
inline PutGatewayResponseResult& AddResponseParameters(const char* key, const char* value) { 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; }
inline void SetResponseTemplates(const Aws::Map& value) { m_responseTemplates = value; }
inline void SetResponseTemplates(Aws::Map&& value) { m_responseTemplates = std::move(value); }
inline PutGatewayResponseResult& WithResponseTemplates(const Aws::Map& value) { SetResponseTemplates(value); return *this;}
inline PutGatewayResponseResult& WithResponseTemplates(Aws::Map&& value) { SetResponseTemplates(std::move(value)); return *this;}
inline PutGatewayResponseResult& AddResponseTemplates(const Aws::String& key, const Aws::String& value) { m_responseTemplates.emplace(key, value); return *this; }
inline PutGatewayResponseResult& AddResponseTemplates(Aws::String&& key, const Aws::String& value) { m_responseTemplates.emplace(std::move(key), value); return *this; }
inline PutGatewayResponseResult& AddResponseTemplates(const Aws::String& key, Aws::String&& value) { m_responseTemplates.emplace(key, std::move(value)); return *this; }
inline PutGatewayResponseResult& AddResponseTemplates(Aws::String&& key, Aws::String&& value) { m_responseTemplates.emplace(std::move(key), std::move(value)); return *this; }
inline PutGatewayResponseResult& AddResponseTemplates(const char* key, Aws::String&& value) { m_responseTemplates.emplace(key, std::move(value)); return *this; }
inline PutGatewayResponseResult& AddResponseTemplates(Aws::String&& key, const char* value) { m_responseTemplates.emplace(std::move(key), value); return *this; }
inline PutGatewayResponseResult& AddResponseTemplates(const char* key, const char* value) { 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; }
inline void SetDefaultResponse(bool value) { m_defaultResponse = value; }
inline PutGatewayResponseResult& WithDefaultResponse(bool value) { SetDefaultResponse(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline PutGatewayResponseResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline PutGatewayResponseResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline PutGatewayResponseResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
GatewayResponseType m_responseType;
Aws::String m_statusCode;
Aws::Map m_responseParameters;
Aws::Map m_responseTemplates;
bool m_defaultResponse;
Aws::String m_requestId;
};
} // namespace Model
} // namespace APIGateway
} // namespace Aws