/** * 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 { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace APIGateway { namespace Model { /** *

Represents a usage plan used to specify who can assess associated API stages. * Optionally, target request rate and quota limits can be set. In some cases * clients can exceed the targets that you set. Don’t rely on usage plans to * control costs. Consider using Amazon * Web Services Budgets to monitor costs and WAF * to manage API requests.

See Also:

AWS * API Reference

*/ class CreateUsagePlanResult { public: AWS_APIGATEWAY_API CreateUsagePlanResult(); AWS_APIGATEWAY_API CreateUsagePlanResult(const Aws::AmazonWebServiceResult& result); AWS_APIGATEWAY_API CreateUsagePlanResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The identifier of a UsagePlan resource.

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

The identifier of a UsagePlan resource.

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

The identifier of a UsagePlan resource.

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

The identifier of a UsagePlan resource.

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

The identifier of a UsagePlan resource.

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

The identifier of a UsagePlan resource.

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

The identifier of a UsagePlan resource.

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

The name of a usage plan.

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

The name of a usage plan.

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

The name of a usage plan.

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

The name of a usage plan.

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

The name of a usage plan.

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

The name of a usage plan.

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

The name of a usage plan.

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

The description of a usage plan.

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

The description of a usage plan.

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

The description of a usage plan.

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

The description of a usage plan.

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

The description of a usage plan.

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

The description of a usage plan.

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

The description of a usage plan.

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

The associated API stages of a usage plan.

*/ inline const Aws::Vector& GetApiStages() const{ return m_apiStages; } /** *

The associated API stages of a usage plan.

*/ inline void SetApiStages(const Aws::Vector& value) { m_apiStages = value; } /** *

The associated API stages of a usage plan.

*/ inline void SetApiStages(Aws::Vector&& value) { m_apiStages = std::move(value); } /** *

The associated API stages of a usage plan.

*/ inline CreateUsagePlanResult& WithApiStages(const Aws::Vector& value) { SetApiStages(value); return *this;} /** *

The associated API stages of a usage plan.

*/ inline CreateUsagePlanResult& WithApiStages(Aws::Vector&& value) { SetApiStages(std::move(value)); return *this;} /** *

The associated API stages of a usage plan.

*/ inline CreateUsagePlanResult& AddApiStages(const ApiStage& value) { m_apiStages.push_back(value); return *this; } /** *

The associated API stages of a usage plan.

*/ inline CreateUsagePlanResult& AddApiStages(ApiStage&& value) { m_apiStages.push_back(std::move(value)); return *this; } /** *

A map containing method level throttling information for API stage in a usage * plan.

*/ inline const ThrottleSettings& GetThrottle() const{ return m_throttle; } /** *

A map containing method level throttling information for API stage in a usage * plan.

*/ inline void SetThrottle(const ThrottleSettings& value) { m_throttle = value; } /** *

A map containing method level throttling information for API stage in a usage * plan.

*/ inline void SetThrottle(ThrottleSettings&& value) { m_throttle = std::move(value); } /** *

A map containing method level throttling information for API stage in a usage * plan.

*/ inline CreateUsagePlanResult& WithThrottle(const ThrottleSettings& value) { SetThrottle(value); return *this;} /** *

A map containing method level throttling information for API stage in a usage * plan.

*/ inline CreateUsagePlanResult& WithThrottle(ThrottleSettings&& value) { SetThrottle(std::move(value)); return *this;} /** *

The target maximum number of permitted requests per a given unit time * interval.

*/ inline const QuotaSettings& GetQuota() const{ return m_quota; } /** *

The target maximum number of permitted requests per a given unit time * interval.

*/ inline void SetQuota(const QuotaSettings& value) { m_quota = value; } /** *

The target maximum number of permitted requests per a given unit time * interval.

*/ inline void SetQuota(QuotaSettings&& value) { m_quota = std::move(value); } /** *

The target maximum number of permitted requests per a given unit time * interval.

*/ inline CreateUsagePlanResult& WithQuota(const QuotaSettings& value) { SetQuota(value); return *this;} /** *

The target maximum number of permitted requests per a given unit time * interval.

*/ inline CreateUsagePlanResult& WithQuota(QuotaSettings&& value) { SetQuota(std::move(value)); return *this;} /** *

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

*/ inline const Aws::String& GetProductCode() const{ return m_productCode; } /** *

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

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

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

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

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

*/ inline void SetProductCode(const char* value) { m_productCode.assign(value); } /** *

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

*/ inline CreateUsagePlanResult& WithProductCode(const Aws::String& value) { SetProductCode(value); return *this;} /** *

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

*/ inline CreateUsagePlanResult& WithProductCode(Aws::String&& value) { SetProductCode(std::move(value)); return *this;} /** *

The AWS Markeplace product identifier to associate with the usage plan as a * SaaS product on AWS Marketplace.

*/ inline CreateUsagePlanResult& WithProductCode(const char* value) { SetProductCode(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 void SetTags(const Aws::Map& value) { m_tags = value; } /** *

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

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

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

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

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

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

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

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

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

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

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

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

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

*/ inline CreateUsagePlanResult& AddTags(Aws::String&& key, Aws::String&& value) { 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 CreateUsagePlanResult& AddTags(const char* key, Aws::String&& value) { m_tags.emplace(key, std::move(value)); return *this; } /** *

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

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

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

*/ inline CreateUsagePlanResult& AddTags(const char* key, const char* value) { m_tags.emplace(key, 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 CreateUsagePlanResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline CreateUsagePlanResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline CreateUsagePlanResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_id; Aws::String m_name; Aws::String m_description; Aws::Vector m_apiStages; ThrottleSettings m_throttle; QuotaSettings m_quota; Aws::String m_productCode; Aws::Map m_tags; Aws::String m_requestId; }; } // namespace Model } // namespace APIGateway } // namespace Aws