/**
* 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
{
/**
* Represents the response of the test invoke request in the HTTP
* method.
See Also:
AWS
* API Reference
*/
class TestInvokeMethodResult
{
public:
AWS_APIGATEWAY_API TestInvokeMethodResult();
AWS_APIGATEWAY_API TestInvokeMethodResult(const Aws::AmazonWebServiceResult& result);
AWS_APIGATEWAY_API TestInvokeMethodResult& operator=(const Aws::AmazonWebServiceResult& result);
///@{
/**
* The HTTP status code.
*/
inline int GetStatus() const{ return m_status; }
inline void SetStatus(int value) { m_status = value; }
inline TestInvokeMethodResult& WithStatus(int value) { SetStatus(value); return *this;}
///@}
///@{
/**
* The body of the HTTP response.
*/
inline const Aws::String& GetBody() const{ return m_body; }
inline void SetBody(const Aws::String& value) { m_body = value; }
inline void SetBody(Aws::String&& value) { m_body = std::move(value); }
inline void SetBody(const char* value) { m_body.assign(value); }
inline TestInvokeMethodResult& WithBody(const Aws::String& value) { SetBody(value); return *this;}
inline TestInvokeMethodResult& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;}
inline TestInvokeMethodResult& WithBody(const char* value) { SetBody(value); return *this;}
///@}
///@{
/**
* The headers of the HTTP response.
*/
inline const Aws::Map& GetHeaders() const{ return m_headers; }
inline void SetHeaders(const Aws::Map& value) { m_headers = value; }
inline void SetHeaders(Aws::Map&& value) { m_headers = std::move(value); }
inline TestInvokeMethodResult& WithHeaders(const Aws::Map& value) { SetHeaders(value); return *this;}
inline TestInvokeMethodResult& WithHeaders(Aws::Map&& value) { SetHeaders(std::move(value)); return *this;}
inline TestInvokeMethodResult& AddHeaders(const Aws::String& key, const Aws::String& value) { m_headers.emplace(key, value); return *this; }
inline TestInvokeMethodResult& AddHeaders(Aws::String&& key, const Aws::String& value) { m_headers.emplace(std::move(key), value); return *this; }
inline TestInvokeMethodResult& AddHeaders(const Aws::String& key, Aws::String&& value) { m_headers.emplace(key, std::move(value)); return *this; }
inline TestInvokeMethodResult& AddHeaders(Aws::String&& key, Aws::String&& value) { m_headers.emplace(std::move(key), std::move(value)); return *this; }
inline TestInvokeMethodResult& AddHeaders(const char* key, Aws::String&& value) { m_headers.emplace(key, std::move(value)); return *this; }
inline TestInvokeMethodResult& AddHeaders(Aws::String&& key, const char* value) { m_headers.emplace(std::move(key), value); return *this; }
inline TestInvokeMethodResult& AddHeaders(const char* key, const char* value) { m_headers.emplace(key, value); return *this; }
///@}
///@{
/**
* The headers of the HTTP response as a map from string to list of values.
*/
inline const Aws::Map>& GetMultiValueHeaders() const{ return m_multiValueHeaders; }
inline void SetMultiValueHeaders(const Aws::Map>& value) { m_multiValueHeaders = value; }
inline void SetMultiValueHeaders(Aws::Map>&& value) { m_multiValueHeaders = std::move(value); }
inline TestInvokeMethodResult& WithMultiValueHeaders(const Aws::Map>& value) { SetMultiValueHeaders(value); return *this;}
inline TestInvokeMethodResult& WithMultiValueHeaders(Aws::Map>&& value) { SetMultiValueHeaders(std::move(value)); return *this;}
inline TestInvokeMethodResult& AddMultiValueHeaders(const Aws::String& key, const Aws::Vector& value) { m_multiValueHeaders.emplace(key, value); return *this; }
inline TestInvokeMethodResult& AddMultiValueHeaders(Aws::String&& key, const Aws::Vector& value) { m_multiValueHeaders.emplace(std::move(key), value); return *this; }
inline TestInvokeMethodResult& AddMultiValueHeaders(const Aws::String& key, Aws::Vector&& value) { m_multiValueHeaders.emplace(key, std::move(value)); return *this; }
inline TestInvokeMethodResult& AddMultiValueHeaders(Aws::String&& key, Aws::Vector&& value) { m_multiValueHeaders.emplace(std::move(key), std::move(value)); return *this; }
inline TestInvokeMethodResult& AddMultiValueHeaders(const char* key, Aws::Vector&& value) { m_multiValueHeaders.emplace(key, std::move(value)); return *this; }
inline TestInvokeMethodResult& AddMultiValueHeaders(const char* key, const Aws::Vector& value) { m_multiValueHeaders.emplace(key, value); return *this; }
///@}
///@{
/**
* The API Gateway execution log for the test invoke request.
*/
inline const Aws::String& GetLog() const{ return m_log; }
inline void SetLog(const Aws::String& value) { m_log = value; }
inline void SetLog(Aws::String&& value) { m_log = std::move(value); }
inline void SetLog(const char* value) { m_log.assign(value); }
inline TestInvokeMethodResult& WithLog(const Aws::String& value) { SetLog(value); return *this;}
inline TestInvokeMethodResult& WithLog(Aws::String&& value) { SetLog(std::move(value)); return *this;}
inline TestInvokeMethodResult& WithLog(const char* value) { SetLog(value); return *this;}
///@}
///@{
/**
* The execution latency, in ms, of the test invoke request.
*/
inline long long GetLatency() const{ return m_latency; }
inline void SetLatency(long long value) { m_latency = value; }
inline TestInvokeMethodResult& WithLatency(long long value) { SetLatency(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 TestInvokeMethodResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline TestInvokeMethodResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline TestInvokeMethodResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
int m_status;
Aws::String m_body;
Aws::Map m_headers;
Aws::Map> m_multiValueHeaders;
Aws::String m_log;
long long m_latency;
Aws::String m_requestId;
};
} // namespace Model
} // namespace APIGateway
} // namespace Aws