/** * 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 #include namespace Aws { namespace APIGateway { namespace Model { /** *

The POST request to create a usage plan with the name, description, throttle * limits and quota limits, as well as the associated API stages, specified in the * payload.

See Also:

AWS * API Reference

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

The name of the usage plan.

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

The name of the usage plan.

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

The name of the usage plan.

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

The name of the usage plan.

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

The name of the usage plan.

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

The name of the usage plan.

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

The name of the usage plan.

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

The name of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The description of the usage plan.

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

The associated API stages of the usage plan.

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

The associated API stages of the usage plan.

*/ inline bool ApiStagesHasBeenSet() const { return m_apiStagesHasBeenSet; } /** *

The associated API stages of the usage plan.

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

The associated API stages of the usage plan.

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

The associated API stages of the usage plan.

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

The associated API stages of the usage plan.

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

The associated API stages of the usage plan.

*/ inline CreateUsagePlanRequest& AddApiStages(const ApiStage& value) { m_apiStagesHasBeenSet = true; m_apiStages.push_back(value); return *this; } /** *

The associated API stages of the usage plan.

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

The throttling limits of the usage plan.

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

The throttling limits of the usage plan.

*/ inline bool ThrottleHasBeenSet() const { return m_throttleHasBeenSet; } /** *

The throttling limits of the usage plan.

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

The throttling limits of the usage plan.

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

The throttling limits of the usage plan.

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

The throttling limits of the usage plan.

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

The quota of the usage plan.

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

The quota of the usage plan.

*/ inline bool QuotaHasBeenSet() const { return m_quotaHasBeenSet; } /** *

The quota of the usage plan.

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

The quota of the usage plan.

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

The quota of the usage plan.

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

The quota of the usage plan.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

*/ inline CreateUsagePlanRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector m_apiStages; bool m_apiStagesHasBeenSet = false; ThrottleSettings m_throttle; bool m_throttleHasBeenSet = false; QuotaSettings m_quota; bool m_quotaHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws