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

Make a request to simulate the invocation of a Method.

See * Also:

AWS * API Reference

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

Specifies a test invoke method request's resource ID.

*/ inline const Aws::String& GetResourceId() const{ return m_resourceId; } /** *

Specifies a test invoke method request's resource ID.

*/ inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; } /** *

Specifies a test invoke method request's resource ID.

*/ inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; } /** *

Specifies a test invoke method request's resource ID.

*/ inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); } /** *

Specifies a test invoke method request's resource ID.

*/ inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); } /** *

Specifies a test invoke method request's resource ID.

*/ inline TestInvokeMethodRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;} /** *

Specifies a test invoke method request's resource ID.

*/ inline TestInvokeMethodRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;} /** *

Specifies a test invoke method request's resource ID.

*/ inline TestInvokeMethodRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;} /** *

Specifies a test invoke method request's HTTP method.

*/ inline const Aws::String& GetHttpMethod() const{ return m_httpMethod; } /** *

Specifies a test invoke method request's HTTP method.

*/ inline bool HttpMethodHasBeenSet() const { return m_httpMethodHasBeenSet; } /** *

Specifies a test invoke method request's HTTP method.

*/ inline void SetHttpMethod(const Aws::String& value) { m_httpMethodHasBeenSet = true; m_httpMethod = value; } /** *

Specifies a test invoke method request's HTTP method.

*/ inline void SetHttpMethod(Aws::String&& value) { m_httpMethodHasBeenSet = true; m_httpMethod = std::move(value); } /** *

Specifies a test invoke method request's HTTP method.

*/ inline void SetHttpMethod(const char* value) { m_httpMethodHasBeenSet = true; m_httpMethod.assign(value); } /** *

Specifies a test invoke method request's HTTP method.

*/ inline TestInvokeMethodRequest& WithHttpMethod(const Aws::String& value) { SetHttpMethod(value); return *this;} /** *

Specifies a test invoke method request's HTTP method.

*/ inline TestInvokeMethodRequest& WithHttpMethod(Aws::String&& value) { SetHttpMethod(std::move(value)); return *this;} /** *

Specifies a test invoke method request's HTTP method.

*/ inline TestInvokeMethodRequest& WithHttpMethod(const char* value) { SetHttpMethod(value); return *this;} /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline const Aws::String& GetPathWithQueryString() const{ return m_pathWithQueryString; } /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline bool PathWithQueryStringHasBeenSet() const { return m_pathWithQueryStringHasBeenSet; } /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline void SetPathWithQueryString(const Aws::String& value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString = value; } /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline void SetPathWithQueryString(Aws::String&& value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString = std::move(value); } /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline void SetPathWithQueryString(const char* value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString.assign(value); } /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline TestInvokeMethodRequest& WithPathWithQueryString(const Aws::String& value) { SetPathWithQueryString(value); return *this;} /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline TestInvokeMethodRequest& WithPathWithQueryString(Aws::String&& value) { SetPathWithQueryString(std::move(value)); return *this;} /** *

The URI path, including query string, of the simulated invocation request. * Use this to specify path parameters and query string parameters.

*/ inline TestInvokeMethodRequest& WithPathWithQueryString(const char* value) { SetPathWithQueryString(value); return *this;} /** *

The headers as a map from string to list of values to simulate an incoming * invocation request.

*/ inline const Aws::Map>& GetMultiValueHeaders() const{ return m_multiValueHeaders; } /** *

The headers as a map from string to list of values to simulate an incoming * invocation request.

*/ inline bool MultiValueHeadersHasBeenSet() const { return m_multiValueHeadersHasBeenSet; } /** *

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

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

The headers as a map from string to list of values to simulate an incoming * invocation request.

*/ inline TestInvokeMethodRequest& AddMultiValueHeaders(const char* key, const Aws::Vector& value) { m_multiValueHeadersHasBeenSet = true; m_multiValueHeaders.emplace(key, value); return *this; } /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline const Aws::String& GetClientCertificateId() const{ return m_clientCertificateId; } /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline bool ClientCertificateIdHasBeenSet() const { return m_clientCertificateIdHasBeenSet; } /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline void SetClientCertificateId(const Aws::String& value) { m_clientCertificateIdHasBeenSet = true; m_clientCertificateId = value; } /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline void SetClientCertificateId(Aws::String&& value) { m_clientCertificateIdHasBeenSet = true; m_clientCertificateId = std::move(value); } /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline void SetClientCertificateId(const char* value) { m_clientCertificateIdHasBeenSet = true; m_clientCertificateId.assign(value); } /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline TestInvokeMethodRequest& WithClientCertificateId(const Aws::String& value) { SetClientCertificateId(value); return *this;} /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline TestInvokeMethodRequest& WithClientCertificateId(Aws::String&& value) { SetClientCertificateId(std::move(value)); return *this;} /** *

A ClientCertificate identifier to use in the test invocation. API Gateway * will use the certificate when making the HTTPS request to the defined back-end * endpoint.

*/ inline TestInvokeMethodRequest& WithClientCertificateId(const char* value) { SetClientCertificateId(value); return *this;} /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline const Aws::Map& GetStageVariables() const{ return m_stageVariables; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline bool StageVariablesHasBeenSet() const { return m_stageVariablesHasBeenSet; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline void SetStageVariables(const Aws::Map& value) { m_stageVariablesHasBeenSet = true; m_stageVariables = value; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline void SetStageVariables(Aws::Map&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables = std::move(value); } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& WithStageVariables(const Aws::Map& value) { SetStageVariables(value); return *this;} /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& WithStageVariables(Aws::Map&& value) { SetStageVariables(std::move(value)); return *this;} /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(const Aws::String& key, const Aws::String& value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(key, value); return *this; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(Aws::String&& key, const Aws::String& value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(std::move(key), value); return *this; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(const Aws::String& key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(key, std::move(value)); return *this; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(Aws::String&& key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(std::move(key), std::move(value)); return *this; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(const char* key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(key, std::move(value)); return *this; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(Aws::String&& key, const char* value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(std::move(key), value); return *this; } /** *

A key-value map of stage variables to simulate an invocation on a deployed * Stage.

*/ inline TestInvokeMethodRequest& AddStageVariables(const char* key, const char* value) { m_stageVariablesHasBeenSet = true; m_stageVariables.emplace(key, value); return *this; } /** *

The simulated request body of an incoming invocation request.

*/ inline const Aws::String& GetRequestBody() const{ return m_requestBody; } /** *

The simulated request body of an incoming invocation request.

*/ inline bool RequestBodyHasBeenSet() const { return m_requestBodyHasBeenSet; } /** *

The simulated request body of an incoming invocation request.

*/ inline void SetRequestBody(const Aws::String& value) { m_requestBodyHasBeenSet = true; m_requestBody = value; } /** *

The simulated request body of an incoming invocation request.

*/ inline void SetRequestBody(Aws::String&& value) { m_requestBodyHasBeenSet = true; m_requestBody = std::move(value); } /** *

The simulated request body of an incoming invocation request.

*/ inline void SetRequestBody(const char* value) { m_requestBodyHasBeenSet = true; m_requestBody.assign(value); } /** *

The simulated request body of an incoming invocation request.

*/ inline TestInvokeMethodRequest& WithRequestBody(const Aws::String& value) { SetRequestBody(value); return *this;} /** *

The simulated request body of an incoming invocation request.

*/ inline TestInvokeMethodRequest& WithRequestBody(Aws::String&& value) { SetRequestBody(std::move(value)); return *this;} /** *

The simulated request body of an incoming invocation request.

*/ inline TestInvokeMethodRequest& WithRequestBody(const char* value) { SetRequestBody(value); return *this;} /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline const Aws::Map& GetRequestHeaders() const{ return m_requestHeaders; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline bool RequestHeadersHasBeenSet() const { return m_requestHeadersHasBeenSet; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline void SetRequestHeaders(const Aws::Map& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders = value; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline void SetRequestHeaders(Aws::Map&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders = std::move(value); } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& WithRequestHeaders(const Aws::Map& value) { SetRequestHeaders(value); return *this;} /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& WithRequestHeaders(Aws::Map&& value) { SetRequestHeaders(std::move(value)); return *this;} /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(const Aws::String& key, const Aws::String& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(key, value); return *this; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(Aws::String&& key, const Aws::String& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(std::move(key), value); return *this; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(const Aws::String& key, Aws::String&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(key, std::move(value)); return *this; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(Aws::String&& key, Aws::String&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(std::move(key), std::move(value)); return *this; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(const char* key, Aws::String&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(key, std::move(value)); return *this; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(Aws::String&& key, const char* value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(std::move(key), value); return *this; } /** *

A key-value map of headers to simulate an incoming invocation request.

*/ inline TestInvokeMethodRequest& AddRequestHeaders(const char* key, const char* value) { m_requestHeadersHasBeenSet = true; m_requestHeaders.emplace(key, value); return *this; } private: Aws::String m_restApiId; bool m_restApiIdHasBeenSet = false; Aws::String m_resourceId; bool m_resourceIdHasBeenSet = false; Aws::String m_httpMethod; bool m_httpMethodHasBeenSet = false; Aws::String m_pathWithQueryString; bool m_pathWithQueryStringHasBeenSet = false; Aws::Map> m_multiValueHeaders; bool m_multiValueHeadersHasBeenSet = false; Aws::String m_clientCertificateId; bool m_clientCertificateIdHasBeenSet = false; Aws::Map m_stageVariables; bool m_stageVariablesHasBeenSet = false; Aws::String m_requestBody; bool m_requestBodyHasBeenSet = false; Aws::Map m_requestHeaders; bool m_requestHeadersHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws