/** * 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 namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Xml { class XmlDocument; } // namespace Xml } // namespace Utils namespace Redshift { namespace Model { /** *

Describes a usage limit object for a cluster.

See Also:

AWS * API Reference

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

The identifier of the usage limit.

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

The identifier of the usage limit.

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

The identifier of the usage limit.

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

The identifier of the usage limit.

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

The identifier of the usage limit.

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

The identifier of the usage limit.

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

The identifier of the usage limit.

*/ inline CreateUsageLimitResult& 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 void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifier = value; } /** *

The identifier of the cluster with a usage limit.

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

The identifier of the cluster with a usage limit.

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

The identifier of the cluster with a usage limit.

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

The identifier of the cluster with a usage limit.

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

The identifier of the cluster with a usage limit.

*/ inline CreateUsageLimitResult& 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 void SetFeatureType(const UsageLimitFeatureType& value) { m_featureType = value; } /** *

The Amazon Redshift feature to which the limit applies.

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

The Amazon Redshift feature to which the limit applies.

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

The Amazon Redshift feature to which the limit applies.

*/ inline CreateUsageLimitResult& 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 void SetLimitType(const UsageLimitLimitType& value) { 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_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 CreateUsageLimitResult& 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 CreateUsageLimitResult& 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 void SetAmount(long long value) { m_amount = value; } /** *

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

*/ inline CreateUsageLimitResult& 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 void SetPeriod(const UsageLimitPeriod& value) { 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_period = std::move(value); } /** *

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

*/ inline CreateUsageLimitResult& 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 CreateUsageLimitResult& 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 void SetBreachAction(const UsageLimitBreachAction& value) { 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_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 CreateUsageLimitResult& 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 CreateUsageLimitResult& 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 void SetTags(const Aws::Vector& value) { m_tags = value; } /** *

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

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

A list of tag instances.

*/ inline CreateUsageLimitResult& AddTags(const Tag& value) { m_tags.push_back(value); return *this; } /** *

A list of tag instances.

*/ inline CreateUsageLimitResult& AddTags(Tag&& value) { 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 CreateUsageLimitResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline CreateUsageLimitResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::String m_usageLimitId; Aws::String m_clusterIdentifier; UsageLimitFeatureType m_featureType; UsageLimitLimitType m_limitType; long long m_amount; UsageLimitPeriod m_period; UsageLimitBreachAction m_breachAction; Aws::Vector m_tags; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace Redshift } // namespace Aws