/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.redshift.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a usage limit object for a cluster. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UsageLimit implements Serializable, Cloneable { /** ** The identifier of the usage limit. *
*/ private String usageLimitId; /** ** The identifier of the cluster with a usage limit. *
*/ private String clusterIdentifier; /** ** The Amazon Redshift feature to which the limit applies. *
*/ private String featureType; /** ** The type of limit. Depending on the feature type, this can be based on a time duration or data size. *
*/ private String limitType; /** ** The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). *
*/ private Long amount; /** *
* The time period that the amount applies to. A weekly
period begins on Sunday. The default is
* monthly
.
*
* 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. *
** A list of tag instances. *
*/ private com.amazonaws.internal.SdkInternalList* The identifier of the usage limit. *
* * @param usageLimitId * The identifier of the usage limit. */ public void setUsageLimitId(String usageLimitId) { this.usageLimitId = usageLimitId; } /** ** The identifier of the usage limit. *
* * @return The identifier of the usage limit. */ public String getUsageLimitId() { return this.usageLimitId; } /** ** The identifier of the usage limit. *
* * @param usageLimitId * The identifier of the usage limit. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageLimit withUsageLimitId(String usageLimitId) { setUsageLimitId(usageLimitId); return this; } /** ** The identifier of the cluster with a usage limit. *
* * @param clusterIdentifier * The identifier of the cluster with a usage limit. */ public void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } /** ** The identifier of the cluster with a usage limit. *
* * @return The identifier of the cluster with a usage limit. */ public String getClusterIdentifier() { return this.clusterIdentifier; } /** ** The identifier of the cluster with a usage limit. *
* * @param clusterIdentifier * The identifier of the cluster with a usage limit. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageLimit withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; } /** ** The Amazon Redshift feature to which the limit applies. *
* * @param featureType * The Amazon Redshift feature to which the limit applies. * @see UsageLimitFeatureType */ public void setFeatureType(String featureType) { this.featureType = featureType; } /** ** The Amazon Redshift feature to which the limit applies. *
* * @return The Amazon Redshift feature to which the limit applies. * @see UsageLimitFeatureType */ public String getFeatureType() { return this.featureType; } /** ** The Amazon Redshift feature to which the limit applies. *
* * @param featureType * The Amazon Redshift feature to which the limit applies. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitFeatureType */ public UsageLimit withFeatureType(String featureType) { setFeatureType(featureType); return this; } /** ** The Amazon Redshift feature to which the limit applies. *
* * @param featureType * The Amazon Redshift feature to which the limit applies. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitFeatureType */ public UsageLimit withFeatureType(UsageLimitFeatureType featureType) { this.featureType = featureType.toString(); return this; } /** ** The type of limit. Depending on the feature type, this can be based on a time duration or data size. *
* * @param limitType * The type of limit. Depending on the feature type, this can be based on a time duration or data size. * @see UsageLimitLimitType */ public void setLimitType(String limitType) { this.limitType = limitType; } /** ** The type of limit. Depending on the feature type, this can be based on a time duration or data size. *
* * @return The type of limit. Depending on the feature type, this can be based on a time duration or data size. * @see UsageLimitLimitType */ public String getLimitType() { return this.limitType; } /** ** The type of limit. Depending on the feature type, this can be based on a time duration or data size. *
* * @param limitType * The type of limit. Depending on the feature type, this can be based on a time duration or data size. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitLimitType */ public UsageLimit withLimitType(String limitType) { setLimitType(limitType); return this; } /** ** The type of limit. Depending on the feature type, this can be based on a time duration or data size. *
* * @param limitType * The type of limit. Depending on the feature type, this can be based on a time duration or data size. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitLimitType */ public UsageLimit withLimitType(UsageLimitLimitType limitType) { this.limitType = limitType.toString(); return this; } /** ** The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). *
* * @param amount * The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes * (TB). */ public void setAmount(Long amount) { this.amount = amount; } /** ** The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). *
* * @return The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes * (TB). */ public Long getAmount() { return this.amount; } /** ** The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). *
* * @param amount * The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes * (TB). * @return Returns a reference to this object so that method calls can be chained together. */ public UsageLimit withAmount(Long amount) { setAmount(amount); return this; } /** *
* The time period that the amount applies to. A weekly
period begins on Sunday. The default is
* monthly
.
*
weekly
period begins on Sunday. The default is
* monthly
.
* @see UsageLimitPeriod
*/
public void setPeriod(String period) {
this.period = period;
}
/**
*
* The time period that the amount applies to. A weekly
period begins on Sunday. The default is
* monthly
.
*
weekly
period begins on Sunday. The default is
* monthly
.
* @see UsageLimitPeriod
*/
public String getPeriod() {
return this.period;
}
/**
*
* The time period that the amount applies to. A weekly
period begins on Sunday. The default is
* monthly
.
*
weekly
period begins on Sunday. The default is
* monthly
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see UsageLimitPeriod
*/
public UsageLimit withPeriod(String period) {
setPeriod(period);
return this;
}
/**
*
* The time period that the amount applies to. A weekly
period begins on Sunday. The default is
* monthly
.
*
weekly
period begins on Sunday. The default is
* monthly
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see UsageLimitPeriod
*/
public UsageLimit withPeriod(UsageLimitPeriod period) {
this.period = period.toString();
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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** A list of tag instances. *
* * @return A list of tag instances. */ public java.util.List* A list of tag instances. *
* * @param tags * A list of tag instances. */ public void setTags(java.util.Collection* A list of tag instances. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * A list of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageLimit withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* A list of tag instances. *
* * @param tags * A list of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageLimit withTags(java.util.Collection