/* * 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.apigateway.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* The POST request to create a usage plan with the name, description, throttle limits and quota limits, as well as the * associated API stages, specified in the payload. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateUsagePlanRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The name of the usage plan. *
*/ private String name; /** ** The description of the usage plan. *
*/ private String description; /** ** The associated API stages of the usage plan. *
*/ private java.util.List* The throttling limits of the usage plan. *
*/ private ThrottleSettings throttle; /** ** The quota of the usage plan. *
*/ private QuotaSettings quota; /** *
* The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters
* and must not start with aws:
. The tag value can be up to 256 characters.
*
* The name of the usage plan. *
* * @param name * The name of the usage plan. */ public void setName(String name) { this.name = name; } /** ** The name of the usage plan. *
* * @return The name of the usage plan. */ public String getName() { return this.name; } /** ** The name of the usage plan. *
* * @param name * The name of the usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsagePlanRequest withName(String name) { setName(name); return this; } /** ** The description of the usage plan. *
* * @param description * The description of the usage plan. */ public void setDescription(String description) { this.description = description; } /** ** The description of the usage plan. *
* * @return The description of the usage plan. */ public String getDescription() { return this.description; } /** ** The description of the usage plan. *
* * @param description * The description of the usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsagePlanRequest withDescription(String description) { setDescription(description); return this; } /** ** The associated API stages of the usage plan. *
* * @return The associated API stages of the usage plan. */ public java.util.List* The associated API stages of the usage plan. *
* * @param apiStages * The associated API stages of the usage plan. */ public void setApiStages(java.util.Collection* The associated API stages of the usage plan. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setApiStages(java.util.Collection)} or {@link #withApiStages(java.util.Collection)} if you want to * override the existing values. *
* * @param apiStages * The associated API stages of the usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsagePlanRequest withApiStages(ApiStage... apiStages) { if (this.apiStages == null) { setApiStages(new java.util.ArrayList* The associated API stages of the usage plan. *
* * @param apiStages * The associated API stages of the usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsagePlanRequest withApiStages(java.util.Collection* The throttling limits of the usage plan. *
* * @param throttle * The throttling limits of the usage plan. */ public void setThrottle(ThrottleSettings throttle) { this.throttle = throttle; } /** ** The throttling limits of the usage plan. *
* * @return The throttling limits of the usage plan. */ public ThrottleSettings getThrottle() { return this.throttle; } /** ** The throttling limits of the usage plan. *
* * @param throttle * The throttling limits of the usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsagePlanRequest withThrottle(ThrottleSettings throttle) { setThrottle(throttle); return this; } /** ** The quota of the usage plan. *
* * @param quota * The quota of the usage plan. */ public void setQuota(QuotaSettings quota) { this.quota = quota; } /** ** The quota of the usage plan. *
* * @return The quota of the usage plan. */ public QuotaSettings getQuota() { return this.quota; } /** ** The quota of the usage plan. *
* * @param quota * The quota of the usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUsagePlanRequest withQuota(QuotaSettings quota) { setQuota(quota); return this; } /** *
* The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters
* and must not start with aws:
. The tag value can be up to 256 characters.
*
aws:
. The tag value can be up to 256 characters.
*/
public java.util.Map
* The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters
* and must not start with aws:
. The tag value can be up to 256 characters.
*
aws:
. The tag value can be up to 256 characters.
*/
public void setTags(java.util.Map
* The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters
* and must not start with aws:
. The tag value can be up to 256 characters.
*
aws:
. The tag value can be up to 256 characters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateUsagePlanRequest withTags(java.util.Map