/* * 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; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateUsageLimitRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The identifier of the cluster that you want to limit usage. *
*/ private String clusterIdentifier; /** ** The Amazon Redshift feature that you want to limit. *
*/ private String featureType; /** *
     * The type of limit. Depending on the feature type, this can be based on a time duration or data size. If
     * FeatureType is spectrum, then LimitType must be data-scanned.
     * If FeatureType is concurrency-scaling, then LimitType must be
     * time. If FeatureType is cross-region-datasharing, then
     * LimitType must be data-scanned.
     * 
* The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The * value must be a positive number. *
*/ 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. The default is log. For more information about * this parameter, see UsageLimit. *
*/ private String breachAction; /** ** A list of tag instances. *
*/ private com.amazonaws.internal.SdkInternalList* The identifier of the cluster that you want to limit usage. *
* * @param clusterIdentifier * The identifier of the cluster that you want to limit usage. */ public void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } /** ** The identifier of the cluster that you want to limit usage. *
* * @return The identifier of the cluster that you want to limit usage. */ public String getClusterIdentifier() { return this.clusterIdentifier; } /** ** The identifier of the cluster that you want to limit usage. *
* * @param clusterIdentifier * The identifier of the cluster that you want to limit usage. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsageLimitRequest withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; } /** ** The Amazon Redshift feature that you want to limit. *
* * @param featureType * The Amazon Redshift feature that you want to limit. * @see UsageLimitFeatureType */ public void setFeatureType(String featureType) { this.featureType = featureType; } /** ** The Amazon Redshift feature that you want to limit. *
* * @return The Amazon Redshift feature that you want to limit. * @see UsageLimitFeatureType */ public String getFeatureType() { return this.featureType; } /** ** The Amazon Redshift feature that you want to limit. *
* * @param featureType * The Amazon Redshift feature that you want to limit. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitFeatureType */ public CreateUsageLimitRequest withFeatureType(String featureType) { setFeatureType(featureType); return this; } /** ** The Amazon Redshift feature that you want to limit. *
* * @param featureType * The Amazon Redshift feature that you want to limit. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitFeatureType */ public CreateUsageLimitRequest 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. If
     * FeatureType is spectrum, then LimitType must be data-scanned.
     * If FeatureType is concurrency-scaling, then LimitType must be
     * time. If FeatureType is cross-region-datasharing, then
     * LimitType must be data-scanned.
     * 
FeatureType is spectrum, then LimitType must be
     *        data-scanned. If FeatureType is concurrency-scaling, then
     *        LimitType must be time. If FeatureType is
     *        cross-region-datasharing, then LimitType must be data-scanned.
     * @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. If
     * FeatureType is spectrum, then LimitType must be data-scanned.
     * If FeatureType is concurrency-scaling, then LimitType must be
     * time. If FeatureType is cross-region-datasharing, then
     * LimitType must be data-scanned.
     * 
FeatureType is spectrum, then LimitType must be
     *         data-scanned. If FeatureType is concurrency-scaling, then
     *         LimitType must be time. If FeatureType is
     *         cross-region-datasharing, then LimitType must be data-scanned.
     * @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. If
     * FeatureType is spectrum, then LimitType must be data-scanned.
     * If FeatureType is concurrency-scaling, then LimitType must be
     * time. If FeatureType is cross-region-datasharing, then
     * LimitType must be data-scanned.
     * 
FeatureType is spectrum, then LimitType must be
     *        data-scanned. If FeatureType is concurrency-scaling, then
     *        LimitType must be time. If FeatureType is
     *        cross-region-datasharing, then LimitType must be data-scanned.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see UsageLimitLimitType
     */
    public CreateUsageLimitRequest 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. If
     * FeatureType is spectrum, then LimitType must be data-scanned.
     * If FeatureType is concurrency-scaling, then LimitType must be
     * time. If FeatureType is cross-region-datasharing, then
     * LimitType must be data-scanned.
     * 
FeatureType is spectrum, then LimitType must be
     *        data-scanned. If FeatureType is concurrency-scaling, then
     *        LimitType must be time. If FeatureType is
     *        cross-region-datasharing, then LimitType must be data-scanned.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see UsageLimitLimitType
     */
    public CreateUsageLimitRequest 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). The * value must be a positive number. *
* * @param amount * The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes * (TB). The value must be a positive number. */ 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). The * value must be a positive number. *
* * @return The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes * (TB). The value must be a positive number. */ 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). The * value must be a positive number. *
* * @param amount * The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes * (TB). The value must be a positive number. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsageLimitRequest 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 CreateUsageLimitRequest 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 CreateUsageLimitRequest withPeriod(UsageLimitPeriod period) {
        this.period = period.toString();
        return this;
    }
    /**
     * * The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about * this parameter, see UsageLimit. *
* * @param breachAction * The action that Amazon Redshift takes when the limit is reached. The default is log. For more information * about this parameter, see UsageLimit. * @see UsageLimitBreachAction */ public void setBreachAction(String breachAction) { this.breachAction = breachAction; } /** ** The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about * this parameter, see UsageLimit. *
* * @return The action that Amazon Redshift takes when the limit is reached. The default is log. For more information * about this parameter, see UsageLimit. * @see UsageLimitBreachAction */ public String getBreachAction() { return this.breachAction; } /** ** The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about * this parameter, see UsageLimit. *
* * @param breachAction * The action that Amazon Redshift takes when the limit is reached. The default is log. For more information * about this parameter, see UsageLimit. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitBreachAction */ public CreateUsageLimitRequest withBreachAction(String breachAction) { setBreachAction(breachAction); return this; } /** ** The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about * this parameter, see UsageLimit. *
* * @param breachAction * The action that Amazon Redshift takes when the limit is reached. The default is log. For more information * about this parameter, see UsageLimit. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageLimitBreachAction */ public CreateUsageLimitRequest withBreachAction(UsageLimitBreachAction breachAction) { this.breachAction = breachAction.toString(); return this; } /** ** 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 CreateUsageLimitRequest 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 CreateUsageLimitRequest withTags(java.util.Collection