/** * 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; } /** *

The HTTP status code.

*/ inline void SetStatus(int value) { m_status = value; } /** *

The HTTP status code.

*/ inline TestInvokeMethodResult& WithStatus(int value) { SetStatus(value); return *this;} /** *

The body of the HTTP response.

*/ inline const Aws::String& GetBody() const{ return m_body; } /** *

The body of the HTTP response.

*/ inline void SetBody(const Aws::String& value) { m_body = value; } /** *

The body of the HTTP response.

*/ inline void SetBody(Aws::String&& value) { m_body = std::move(value); } /** *

The body of the HTTP response.

*/ inline void SetBody(const char* value) { m_body.assign(value); } /** *

The body of the HTTP response.

*/ inline TestInvokeMethodResult& WithBody(const Aws::String& value) { SetBody(value); return *this;} /** *

The body of the HTTP response.

*/ inline TestInvokeMethodResult& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;} /** *

The body of the HTTP response.

*/ 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; } /** *

The headers of the HTTP response.

*/ inline void SetHeaders(const Aws::Map& value) { m_headers = value; } /** *

The headers of the HTTP response.

*/ inline void SetHeaders(Aws::Map&& value) { m_headers = std::move(value); } /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& WithHeaders(const Aws::Map& value) { SetHeaders(value); return *this;} /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& WithHeaders(Aws::Map&& value) { SetHeaders(std::move(value)); return *this;} /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& AddHeaders(const Aws::String& key, const Aws::String& value) { m_headers.emplace(key, value); return *this; } /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& AddHeaders(Aws::String&& key, const Aws::String& value) { m_headers.emplace(std::move(key), value); return *this; } /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& AddHeaders(const Aws::String& key, Aws::String&& value) { m_headers.emplace(key, std::move(value)); return *this; } /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& AddHeaders(Aws::String&& key, Aws::String&& value) { m_headers.emplace(std::move(key), std::move(value)); return *this; } /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& AddHeaders(const char* key, Aws::String&& value) { m_headers.emplace(key, std::move(value)); return *this; } /** *

The headers of the HTTP response.

*/ inline TestInvokeMethodResult& AddHeaders(Aws::String&& key, const char* value) { m_headers.emplace(std::move(key), value); return *this; } /** *

The headers of the HTTP response.

*/ 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; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline void SetMultiValueHeaders(const Aws::Map>& value) { m_multiValueHeaders = value; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline void SetMultiValueHeaders(Aws::Map>&& value) { m_multiValueHeaders = std::move(value); } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& WithMultiValueHeaders(const Aws::Map>& value) { SetMultiValueHeaders(value); return *this;} /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& WithMultiValueHeaders(Aws::Map>&& value) { SetMultiValueHeaders(std::move(value)); return *this;} /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& AddMultiValueHeaders(const Aws::String& key, const Aws::Vector& value) { m_multiValueHeaders.emplace(key, value); return *this; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& AddMultiValueHeaders(Aws::String&& key, const Aws::Vector& value) { m_multiValueHeaders.emplace(std::move(key), value); return *this; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& AddMultiValueHeaders(const Aws::String& key, Aws::Vector&& value) { m_multiValueHeaders.emplace(key, std::move(value)); return *this; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& AddMultiValueHeaders(Aws::String&& key, Aws::Vector&& value) { m_multiValueHeaders.emplace(std::move(key), std::move(value)); return *this; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ inline TestInvokeMethodResult& AddMultiValueHeaders(const char* key, Aws::Vector&& value) { m_multiValueHeaders.emplace(key, std::move(value)); return *this; } /** *

The headers of the HTTP response as a map from string to list of values.

*/ 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; } /** *

The API Gateway execution log for the test invoke request.

*/ inline void SetLog(const Aws::String& value) { m_log = value; } /** *

The API Gateway execution log for the test invoke request.

*/ inline void SetLog(Aws::String&& value) { m_log = std::move(value); } /** *

The API Gateway execution log for the test invoke request.

*/ inline void SetLog(const char* value) { m_log.assign(value); } /** *

The API Gateway execution log for the test invoke request.

*/ inline TestInvokeMethodResult& WithLog(const Aws::String& value) { SetLog(value); return *this;} /** *

The API Gateway execution log for the test invoke request.

*/ inline TestInvokeMethodResult& WithLog(Aws::String&& value) { SetLog(std::move(value)); return *this;} /** *

The API Gateway execution log for the test invoke request.

*/ inline TestInvokeMethodResult& WithLog(const char* value) { SetLog(value); return *this;} /** *

The execution latency of the test invoke request.

*/ inline long long GetLatency() const{ return m_latency; } /** *

The execution latency of the test invoke request.

*/ inline void SetLatency(long long value) { m_latency = value; } /** *

The execution latency of the test invoke request.

*/ 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