/** * 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 #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace APIGateway { namespace Model { /** *

Represents a REST API.

See Also:

AWS * API Reference

*/ class RestApi { public: AWS_APIGATEWAY_API RestApi(); AWS_APIGATEWAY_API RestApi(Aws::Utils::Json::JsonView jsonValue); AWS_APIGATEWAY_API RestApi& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline RestApi& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline RestApi& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The API's identifier. This identifier is unique across all of your APIs in * API Gateway.

*/ inline RestApi& WithId(const char* value) { SetId(value); return *this;} /** *

The API's name.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The API's name.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The API's name.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The API's name.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The API's name.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The API's name.

*/ inline RestApi& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The API's name.

*/ inline RestApi& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The API's name.

*/ inline RestApi& WithName(const char* value) { SetName(value); return *this;} /** *

The API's description.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The API's description.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The API's description.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The API's description.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The API's description.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The API's description.

*/ inline RestApi& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The API's description.

*/ inline RestApi& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The API's description.

*/ inline RestApi& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The timestamp when the API was created.

*/ inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; } /** *

The timestamp when the API was created.

*/ inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; } /** *

The timestamp when the API was created.

*/ inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; } /** *

The timestamp when the API was created.

*/ inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); } /** *

The timestamp when the API was created.

*/ inline RestApi& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;} /** *

The timestamp when the API was created.

*/ inline RestApi& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;} /** *

A version identifier for the API.

*/ inline const Aws::String& GetVersion() const{ return m_version; } /** *

A version identifier for the API.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

A version identifier for the API.

*/ inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } /** *

A version identifier for the API.

*/ inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } /** *

A version identifier for the API.

*/ inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } /** *

A version identifier for the API.

*/ inline RestApi& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} /** *

A version identifier for the API.

*/ inline RestApi& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} /** *

A version identifier for the API.

*/ inline RestApi& WithVersion(const char* value) { SetVersion(value); return *this;} /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline const Aws::Vector& GetWarnings() const{ return m_warnings; } /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline bool WarningsHasBeenSet() const { return m_warningsHasBeenSet; } /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline void SetWarnings(const Aws::Vector& value) { m_warningsHasBeenSet = true; m_warnings = value; } /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline void SetWarnings(Aws::Vector&& value) { m_warningsHasBeenSet = true; m_warnings = std::move(value); } /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline RestApi& WithWarnings(const Aws::Vector& value) { SetWarnings(value); return *this;} /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline RestApi& WithWarnings(Aws::Vector&& value) { SetWarnings(std::move(value)); return *this;} /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline RestApi& AddWarnings(const Aws::String& value) { m_warningsHasBeenSet = true; m_warnings.push_back(value); return *this; } /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline RestApi& AddWarnings(Aws::String&& value) { m_warningsHasBeenSet = true; m_warnings.push_back(std::move(value)); return *this; } /** *

The warning messages reported when failonwarnings is turned on * during API import.

*/ inline RestApi& AddWarnings(const char* value) { m_warningsHasBeenSet = true; m_warnings.push_back(value); return *this; } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline const Aws::Vector& GetBinaryMediaTypes() const{ return m_binaryMediaTypes; } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline bool BinaryMediaTypesHasBeenSet() const { return m_binaryMediaTypesHasBeenSet; } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline void SetBinaryMediaTypes(const Aws::Vector& value) { m_binaryMediaTypesHasBeenSet = true; m_binaryMediaTypes = value; } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline void SetBinaryMediaTypes(Aws::Vector&& value) { m_binaryMediaTypesHasBeenSet = true; m_binaryMediaTypes = std::move(value); } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline RestApi& WithBinaryMediaTypes(const Aws::Vector& value) { SetBinaryMediaTypes(value); return *this;} /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline RestApi& WithBinaryMediaTypes(Aws::Vector&& value) { SetBinaryMediaTypes(std::move(value)); return *this;} /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline RestApi& AddBinaryMediaTypes(const Aws::String& value) { m_binaryMediaTypesHasBeenSet = true; m_binaryMediaTypes.push_back(value); return *this; } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline RestApi& AddBinaryMediaTypes(Aws::String&& value) { m_binaryMediaTypesHasBeenSet = true; m_binaryMediaTypes.push_back(std::move(value)); return *this; } /** *

The list of binary media types supported by the RestApi. By default, the * RestApi supports only UTF-8-encoded text payloads.

*/ inline RestApi& AddBinaryMediaTypes(const char* value) { m_binaryMediaTypesHasBeenSet = true; m_binaryMediaTypes.push_back(value); return *this; } /** *

A nullable integer that is used to enable compression (with non-negative * between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a * null value) on an API. When compression is enabled, compression or decompression * is not applied on the payload if the payload size is smaller than this value. * Setting it to zero allows compression for any payload size.

*/ inline int GetMinimumCompressionSize() const{ return m_minimumCompressionSize; } /** *

A nullable integer that is used to enable compression (with non-negative * between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a * null value) on an API. When compression is enabled, compression or decompression * is not applied on the payload if the payload size is smaller than this value. * Setting it to zero allows compression for any payload size.

*/ inline bool MinimumCompressionSizeHasBeenSet() const { return m_minimumCompressionSizeHasBeenSet; } /** *

A nullable integer that is used to enable compression (with non-negative * between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a * null value) on an API. When compression is enabled, compression or decompression * is not applied on the payload if the payload size is smaller than this value. * Setting it to zero allows compression for any payload size.

*/ inline void SetMinimumCompressionSize(int value) { m_minimumCompressionSizeHasBeenSet = true; m_minimumCompressionSize = value; } /** *

A nullable integer that is used to enable compression (with non-negative * between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a * null value) on an API. When compression is enabled, compression or decompression * is not applied on the payload if the payload size is smaller than this value. * Setting it to zero allows compression for any payload size.

*/ inline RestApi& WithMinimumCompressionSize(int value) { SetMinimumCompressionSize(value); return *this;} /** *

The source of the API key for metering requests according to a usage plan. * Valid values are: >HEADER to read the API key from the * X-API-Key header of a request. AUTHORIZER to read the * API key from the UsageIdentifierKey from a custom authorizer.

*/ inline const ApiKeySourceType& GetApiKeySource() const{ return m_apiKeySource; } /** *

The source of the API key for metering requests according to a usage plan. * Valid values are: >HEADER to read the API key from the * X-API-Key header of a request. AUTHORIZER to read the * API key from the UsageIdentifierKey from a custom authorizer.

*/ inline bool ApiKeySourceHasBeenSet() const { return m_apiKeySourceHasBeenSet; } /** *

The source of the API key for metering requests according to a usage plan. * Valid values are: >HEADER to read the API key from the * X-API-Key header of a request. AUTHORIZER to read the * API key from the UsageIdentifierKey from a custom authorizer.

*/ inline void SetApiKeySource(const ApiKeySourceType& value) { m_apiKeySourceHasBeenSet = true; m_apiKeySource = value; } /** *

The source of the API key for metering requests according to a usage plan. * Valid values are: >HEADER to read the API key from the * X-API-Key header of a request. AUTHORIZER to read the * API key from the UsageIdentifierKey from a custom authorizer.

*/ inline void SetApiKeySource(ApiKeySourceType&& value) { m_apiKeySourceHasBeenSet = true; m_apiKeySource = std::move(value); } /** *

The source of the API key for metering requests according to a usage plan. * Valid values are: >HEADER to read the API key from the * X-API-Key header of a request. AUTHORIZER to read the * API key from the UsageIdentifierKey from a custom authorizer.

*/ inline RestApi& WithApiKeySource(const ApiKeySourceType& value) { SetApiKeySource(value); return *this;} /** *

The source of the API key for metering requests according to a usage plan. * Valid values are: >HEADER to read the API key from the * X-API-Key header of a request. AUTHORIZER to read the * API key from the UsageIdentifierKey from a custom authorizer.

*/ inline RestApi& WithApiKeySource(ApiKeySourceType&& value) { SetApiKeySource(std::move(value)); return *this;} /** *

The endpoint configuration of this RestApi showing the endpoint types of the * API.

*/ inline const EndpointConfiguration& GetEndpointConfiguration() const{ return m_endpointConfiguration; } /** *

The endpoint configuration of this RestApi showing the endpoint types of the * API.

*/ inline bool EndpointConfigurationHasBeenSet() const { return m_endpointConfigurationHasBeenSet; } /** *

The endpoint configuration of this RestApi showing the endpoint types of the * API.

*/ inline void SetEndpointConfiguration(const EndpointConfiguration& value) { m_endpointConfigurationHasBeenSet = true; m_endpointConfiguration = value; } /** *

The endpoint configuration of this RestApi showing the endpoint types of the * API.

*/ inline void SetEndpointConfiguration(EndpointConfiguration&& value) { m_endpointConfigurationHasBeenSet = true; m_endpointConfiguration = std::move(value); } /** *

The endpoint configuration of this RestApi showing the endpoint types of the * API.

*/ inline RestApi& WithEndpointConfiguration(const EndpointConfiguration& value) { SetEndpointConfiguration(value); return *this;} /** *

The endpoint configuration of this RestApi showing the endpoint types of the * API.

*/ inline RestApi& WithEndpointConfiguration(EndpointConfiguration&& value) { SetEndpointConfiguration(std::move(value)); return *this;} /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); } /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline RestApi& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline RestApi& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

A stringified JSON policy document that applies to this RestApi regardless of * the caller and Method configuration.

*/ inline RestApi& WithPolicy(const char* value) { SetPolicy(value); return *this;} /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The collection of tags. Each tag element is associated with a given * resource.

*/ inline RestApi& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

Specifies whether clients can invoke your API by using the default * execute-api endpoint. By default, clients can invoke your API with * the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, * disable the default endpoint.

*/ inline bool GetDisableExecuteApiEndpoint() const{ return m_disableExecuteApiEndpoint; } /** *

Specifies whether clients can invoke your API by using the default * execute-api endpoint. By default, clients can invoke your API with * the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, * disable the default endpoint.

*/ inline bool DisableExecuteApiEndpointHasBeenSet() const { return m_disableExecuteApiEndpointHasBeenSet; } /** *

Specifies whether clients can invoke your API by using the default * execute-api endpoint. By default, clients can invoke your API with * the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, * disable the default endpoint.

*/ inline void SetDisableExecuteApiEndpoint(bool value) { m_disableExecuteApiEndpointHasBeenSet = true; m_disableExecuteApiEndpoint = value; } /** *

Specifies whether clients can invoke your API by using the default * execute-api endpoint. By default, clients can invoke your API with * the default https://{api_id}.execute-api.{region}.amazonaws.com * endpoint. To require that clients use a custom domain name to invoke your API, * disable the default endpoint.

*/ inline RestApi& WithDisableExecuteApiEndpoint(bool value) { SetDisableExecuteApiEndpoint(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; } inline void SetRequestId(const Aws::String& value) { m_requestIdHasBeenSet = true; m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestIdHasBeenSet = true; m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestIdHasBeenSet = true; m_requestId.assign(value); } inline RestApi& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline RestApi& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline RestApi& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Utils::DateTime m_createdDate; bool m_createdDateHasBeenSet = false; Aws::String m_version; bool m_versionHasBeenSet = false; Aws::Vector m_warnings; bool m_warningsHasBeenSet = false; Aws::Vector m_binaryMediaTypes; bool m_binaryMediaTypesHasBeenSet = false; int m_minimumCompressionSize; bool m_minimumCompressionSizeHasBeenSet = false; ApiKeySourceType m_apiKeySource; bool m_apiKeySourceHasBeenSet = false; EndpointConfiguration m_endpointConfiguration; bool m_endpointConfigurationHasBeenSet = false; Aws::String m_policy; bool m_policyHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; bool m_disableExecuteApiEndpoint; bool m_disableExecuteApiEndpointHasBeenSet = false; Aws::String m_requestId; bool m_requestIdHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws