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

Quotas configured for a usage plan.

See Also:

AWS * API Reference

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

The target maximum number of requests that can be made in a given time * period.

*/ inline int GetLimit() const{ return m_limit; } /** *

The target maximum number of requests that can be made in a given time * period.

*/ inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; } /** *

The target maximum number of requests that can be made in a given time * period.

*/ inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; } /** *

The target maximum number of requests that can be made in a given time * period.

*/ inline QuotaSettings& WithLimit(int value) { SetLimit(value); return *this;} /** *

The number of requests subtracted from the given limit in the initial time * period.

*/ inline int GetOffset() const{ return m_offset; } /** *

The number of requests subtracted from the given limit in the initial time * period.

*/ inline bool OffsetHasBeenSet() const { return m_offsetHasBeenSet; } /** *

The number of requests subtracted from the given limit in the initial time * period.

*/ inline void SetOffset(int value) { m_offsetHasBeenSet = true; m_offset = value; } /** *

The number of requests subtracted from the given limit in the initial time * period.

*/ inline QuotaSettings& WithOffset(int value) { SetOffset(value); return *this;} /** *

The time period in which the limit applies. Valid values are "DAY", "WEEK" or * "MONTH".

*/ inline const QuotaPeriodType& GetPeriod() const{ return m_period; } /** *

The time period in which the limit applies. Valid values are "DAY", "WEEK" or * "MONTH".

*/ inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; } /** *

The time period in which the limit applies. Valid values are "DAY", "WEEK" or * "MONTH".

*/ inline void SetPeriod(const QuotaPeriodType& value) { m_periodHasBeenSet = true; m_period = value; } /** *

The time period in which the limit applies. Valid values are "DAY", "WEEK" or * "MONTH".

*/ inline void SetPeriod(QuotaPeriodType&& value) { m_periodHasBeenSet = true; m_period = std::move(value); } /** *

The time period in which the limit applies. Valid values are "DAY", "WEEK" or * "MONTH".

*/ inline QuotaSettings& WithPeriod(const QuotaPeriodType& value) { SetPeriod(value); return *this;} /** *

The time period in which the limit applies. Valid values are "DAY", "WEEK" or * "MONTH".

*/ inline QuotaSettings& WithPeriod(QuotaPeriodType&& value) { SetPeriod(std::move(value)); return *this;} private: int m_limit; bool m_limitHasBeenSet = false; int m_offset; bool m_offsetHasBeenSet = false; QuotaPeriodType m_period; bool m_periodHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws