/** * 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 #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace Redshift { namespace Model { /** *

Describes a usage limit object for a cluster.

See Also:

AWS * API Reference

*/ class UsageLimit { public: AWS_REDSHIFT_API UsageLimit(); AWS_REDSHIFT_API UsageLimit(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_REDSHIFT_API UsageLimit& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_REDSHIFT_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_REDSHIFT_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The identifier of the usage limit.

*/ inline const Aws::String& GetUsageLimitId() const{ return m_usageLimitId; } /** *

The identifier of the usage limit.

*/ inline bool UsageLimitIdHasBeenSet() const { return m_usageLimitIdHasBeenSet; } /** *

The identifier of the usage limit.

*/ inline void SetUsageLimitId(const Aws::String& value) { m_usageLimitIdHasBeenSet = true; m_usageLimitId = value; } /** *

The identifier of the usage limit.

*/ inline void SetUsageLimitId(Aws::String&& value) { m_usageLimitIdHasBeenSet = true; m_usageLimitId = std::move(value); } /** *

The identifier of the usage limit.

*/ inline void SetUsageLimitId(const char* value) { m_usageLimitIdHasBeenSet = true; m_usageLimitId.assign(value); } /** *

The identifier of the usage limit.

*/ inline UsageLimit& WithUsageLimitId(const Aws::String& value) { SetUsageLimitId(value); return *this;} /** *

The identifier of the usage limit.

*/ inline UsageLimit& WithUsageLimitId(Aws::String&& value) { SetUsageLimitId(std::move(value)); return *this;} /** *

The identifier of the usage limit.

*/ inline UsageLimit& WithUsageLimitId(const char* value) { SetUsageLimitId(value); return *this;} /** *

The identifier of the cluster with a usage limit.

*/ inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; } /** *

The identifier of the cluster with a usage limit.

*/ inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; } /** *

The identifier of the cluster with a usage limit.

*/ inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = value; } /** *

The identifier of the cluster with a usage limit.

*/ inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = std::move(value); } /** *

The identifier of the cluster with a usage limit.

*/ inline void SetClusterIdentifier(const char* value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier.assign(value); } /** *

The identifier of the cluster with a usage limit.

*/ inline UsageLimit& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;} /** *

The identifier of the cluster with a usage limit.

*/ inline UsageLimit& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;} /** *

The identifier of the cluster with a usage limit.

*/ inline UsageLimit& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;} /** *

The Amazon Redshift feature to which the limit applies.

*/ inline const UsageLimitFeatureType& GetFeatureType() const{ return m_featureType; } /** *

The Amazon Redshift feature to which the limit applies.

*/ inline bool FeatureTypeHasBeenSet() const { return m_featureTypeHasBeenSet; } /** *

The Amazon Redshift feature to which the limit applies.

*/ inline void SetFeatureType(const UsageLimitFeatureType& value) { m_featureTypeHasBeenSet = true; m_featureType = value; } /** *

The Amazon Redshift feature to which the limit applies.

*/ inline void SetFeatureType(UsageLimitFeatureType&& value) { m_featureTypeHasBeenSet = true; m_featureType = std::move(value); } /** *

The Amazon Redshift feature to which the limit applies.

*/ inline UsageLimit& WithFeatureType(const UsageLimitFeatureType& value) { SetFeatureType(value); return *this;} /** *

The Amazon Redshift feature to which the limit applies.

*/ inline UsageLimit& WithFeatureType(UsageLimitFeatureType&& value) { SetFeatureType(std::move(value)); return *this;} /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size.

*/ inline const UsageLimitLimitType& GetLimitType() const{ return m_limitType; } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size.

*/ inline bool LimitTypeHasBeenSet() const { return m_limitTypeHasBeenSet; } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size.

*/ inline void SetLimitType(const UsageLimitLimitType& value) { m_limitTypeHasBeenSet = true; m_limitType = value; } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size.

*/ inline void SetLimitType(UsageLimitLimitType&& value) { m_limitTypeHasBeenSet = true; m_limitType = std::move(value); } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size.

*/ inline UsageLimit& WithLimitType(const UsageLimitLimitType& value) { SetLimitType(value); return *this;} /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size.

*/ inline UsageLimit& WithLimitType(UsageLimitLimitType&& value) { SetLimitType(std::move(value)); return *this;} /** *

The limit amount. If time-based, this amount is in minutes. If data-based, * this amount is in terabytes (TB).

*/ inline long long GetAmount() const{ return m_amount; } /** *

The limit amount. If time-based, this amount is in minutes. If data-based, * this amount is in terabytes (TB).

*/ inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; } /** *

The limit amount. If time-based, this amount is in minutes. If data-based, * this amount is in terabytes (TB).

*/ inline void SetAmount(long long value) { m_amountHasBeenSet = true; m_amount = value; } /** *

The limit amount. If time-based, this amount is in minutes. If data-based, * this amount is in terabytes (TB).

*/ inline UsageLimit& WithAmount(long long value) { SetAmount(value); return *this;} /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

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

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

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

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

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

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

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

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline UsageLimit& WithPeriod(const UsageLimitPeriod& value) { SetPeriod(value); return *this;} /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline UsageLimit& WithPeriod(UsageLimitPeriod&& value) { SetPeriod(std::move(value)); return *this;} /** *

The action that Amazon Redshift takes when the limit is reached. Possible * values are:

  • log - To log an event in a system table. * The default is log.

  • emit-metric - To emit CloudWatch * metrics.

  • disable - To disable the feature until the * next usage period begins.

*/ inline const UsageLimitBreachAction& GetBreachAction() const{ return m_breachAction; } /** *

The action that Amazon Redshift takes when the limit is reached. Possible * values are:

  • log - To log an event in a system table. * The default is log.

  • emit-metric - To emit CloudWatch * metrics.

  • disable - To disable the feature until the * next usage period begins.

*/ inline bool BreachActionHasBeenSet() const { return m_breachActionHasBeenSet; } /** *

The action that Amazon Redshift takes when the limit is reached. Possible * values are:

  • log - To log an event in a system table. * The default is log.

  • emit-metric - To emit CloudWatch * metrics.

  • disable - To disable the feature until the * next usage period begins.

*/ inline void SetBreachAction(const UsageLimitBreachAction& value) { m_breachActionHasBeenSet = true; m_breachAction = value; } /** *

The action that Amazon Redshift takes when the limit is reached. Possible * values are:

  • log - To log an event in a system table. * The default is log.

  • emit-metric - To emit CloudWatch * metrics.

  • disable - To disable the feature until the * next usage period begins.

*/ inline void SetBreachAction(UsageLimitBreachAction&& value) { m_breachActionHasBeenSet = true; m_breachAction = std::move(value); } /** *

The action that Amazon Redshift takes when the limit is reached. Possible * values are:

  • log - To log an event in a system table. * The default is log.

  • emit-metric - To emit CloudWatch * metrics.

  • disable - To disable the feature until the * next usage period begins.

*/ inline UsageLimit& WithBreachAction(const UsageLimitBreachAction& value) { SetBreachAction(value); return *this;} /** *

The action that Amazon Redshift takes when the limit is reached. Possible * values are:

  • log - To log an event in a system table. * The default is log.

  • emit-metric - To emit CloudWatch * metrics.

  • disable - To disable the feature until the * next usage period begins.

*/ inline UsageLimit& WithBreachAction(UsageLimitBreachAction&& value) { SetBreachAction(std::move(value)); return *this;} /** *

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

*/ inline UsageLimit& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of tag instances.

*/ inline UsageLimit& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } inline UsageLimit& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline UsageLimit& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::String m_usageLimitId; bool m_usageLimitIdHasBeenSet = false; Aws::String m_clusterIdentifier; bool m_clusterIdentifierHasBeenSet = false; UsageLimitFeatureType m_featureType; bool m_featureTypeHasBeenSet = false; UsageLimitLimitType m_limitType; bool m_limitTypeHasBeenSet = false; long long m_amount; bool m_amountHasBeenSet = false; UsageLimitPeriod m_period; bool m_periodHasBeenSet = false; UsageLimitBreachAction m_breachAction; bool m_breachActionHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace Redshift } // namespace Aws