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

A PUT request to update an existing API, with external API definitions * specified as the request body.

See Also:

AWS * API Reference

*/ class PutRestApiRequest : public StreamingAPIGatewayRequest { public: AWS_APIGATEWAY_API PutRestApiRequest(); // 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 "PutRestApi"; } AWS_APIGATEWAY_API void AddQueryStringParameters(Aws::Http::URI& uri) 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 PutRestApiRequest& WithRestApiId(const Aws::String& value) { SetRestApiId(value); return *this;} /** *

The string identifier of the associated RestApi.

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

The string identifier of the associated RestApi.

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

The mode query parameter to specify the update mode. Valid * values are "merge" and "overwrite". By default, the update mode is "merge".

*/ inline const PutMode& GetMode() const{ return m_mode; } /** *

The mode query parameter to specify the update mode. Valid * values are "merge" and "overwrite". By default, the update mode is "merge".

*/ inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; } /** *

The mode query parameter to specify the update mode. Valid * values are "merge" and "overwrite". By default, the update mode is "merge".

*/ inline void SetMode(const PutMode& value) { m_modeHasBeenSet = true; m_mode = value; } /** *

The mode query parameter to specify the update mode. Valid * values are "merge" and "overwrite". By default, the update mode is "merge".

*/ inline void SetMode(PutMode&& value) { m_modeHasBeenSet = true; m_mode = std::move(value); } /** *

The mode query parameter to specify the update mode. Valid * values are "merge" and "overwrite". By default, the update mode is "merge".

*/ inline PutRestApiRequest& WithMode(const PutMode& value) { SetMode(value); return *this;} /** *

The mode query parameter to specify the update mode. Valid * values are "merge" and "overwrite". By default, the update mode is "merge".

*/ inline PutRestApiRequest& WithMode(PutMode&& value) { SetMode(std::move(value)); return *this;} /** *

A query parameter to indicate whether to rollback the API update * (true) or not (false) when a warning is encountered. * The default value is false.

*/ inline bool GetFailOnWarnings() const{ return m_failOnWarnings; } /** *

A query parameter to indicate whether to rollback the API update * (true) or not (false) when a warning is encountered. * The default value is false.

*/ inline bool FailOnWarningsHasBeenSet() const { return m_failOnWarningsHasBeenSet; } /** *

A query parameter to indicate whether to rollback the API update * (true) or not (false) when a warning is encountered. * The default value is false.

*/ inline void SetFailOnWarnings(bool value) { m_failOnWarningsHasBeenSet = true; m_failOnWarnings = value; } /** *

A query parameter to indicate whether to rollback the API update * (true) or not (false) when a warning is encountered. * The default value is false.

*/ inline PutRestApiRequest& WithFailOnWarnings(bool value) { SetFailOnWarnings(value); return *this;} /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline const Aws::Map& GetParameters() const{ return m_parameters; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline void SetParameters(const Aws::Map& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline void SetParameters(Aws::Map&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& WithParameters(const Aws::Map& value) { SetParameters(value); return *this;} /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& WithParameters(Aws::Map&& value) { SetParameters(std::move(value)); return *this;} /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(const Aws::String& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(Aws::String&& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(const Aws::String& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(Aws::String&& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(const char* key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(Aws::String&& key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

Custom header parameters as part of the request. For example, to exclude * DocumentationParts from an imported API, set ignore=documentation * as a parameters value, as in the AWS CLI command of aws * apigateway import-rest-api --parameters ignore=documentation --body * 'file:///path/to/imported-api-body.json'.

*/ inline PutRestApiRequest& AddParameters(const char* key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } private: Aws::String m_restApiId; bool m_restApiIdHasBeenSet = false; PutMode m_mode; bool m_modeHasBeenSet = false; bool m_failOnWarnings; bool m_failOnWarningsHasBeenSet = false; Aws::Map m_parameters; bool m_parametersHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws