/* * 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; /** *
* Represents a usage plan used to specify who can assess associated API stages. Optionally, target request rate and * quota limits can be set. In some cases clients can exceed the targets that you set. Don’t rely on usage plans to * control costs. Consider using Amazon Web Services * Budgets to monitor costs and WAF to manage API requests. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateUsagePlanResult extends com.amazonaws.AmazonWebServiceResult* The identifier of a UsagePlan resource. *
*/ private String id; /** ** The name of a usage plan. *
*/ private String name; /** ** The description of a usage plan. *
*/ private String description; /** ** The associated API stages of a usage plan. *
*/ private java.util.List* A map containing method level throttling information for API stage in a usage plan. *
*/ private ThrottleSettings throttle; /** ** The target maximum number of permitted requests per a given unit time interval. *
*/ private QuotaSettings quota; /** ** The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace. *
*/ private String productCode; /** ** The collection of tags. Each tag element is associated with a given resource. *
*/ private java.util.Map* The identifier of a UsagePlan resource. *
* * @param id * The identifier of a UsagePlan resource. */ public void setId(String id) { this.id = id; } /** ** The identifier of a UsagePlan resource. *
* * @return The identifier of a UsagePlan resource. */ public String getId() { return this.id; } /** ** The identifier of a UsagePlan resource. *
* * @param id * The identifier of a UsagePlan resource. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withId(String id) { setId(id); return this; } /** ** The name of a usage plan. *
* * @param name * The name of a usage plan. */ public void setName(String name) { this.name = name; } /** ** The name of a usage plan. *
* * @return The name of a usage plan. */ public String getName() { return this.name; } /** ** The name of a usage plan. *
* * @param name * The name of a usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withName(String name) { setName(name); return this; } /** ** The description of a usage plan. *
* * @param description * The description of a usage plan. */ public void setDescription(String description) { this.description = description; } /** ** The description of a usage plan. *
* * @return The description of a usage plan. */ public String getDescription() { return this.description; } /** ** The description of a usage plan. *
* * @param description * The description of a usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withDescription(String description) { setDescription(description); return this; } /** ** The associated API stages of a usage plan. *
* * @return The associated API stages of a usage plan. */ public java.util.List* The associated API stages of a usage plan. *
* * @param apiStages * The associated API stages of a usage plan. */ public void setApiStages(java.util.Collection* The associated API stages of a 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 a usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withApiStages(ApiStage... apiStages) { if (this.apiStages == null) { setApiStages(new java.util.ArrayList* The associated API stages of a usage plan. *
* * @param apiStages * The associated API stages of a usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withApiStages(java.util.Collection* A map containing method level throttling information for API stage in a usage plan. *
* * @param throttle * A map containing method level throttling information for API stage in a usage plan. */ public void setThrottle(ThrottleSettings throttle) { this.throttle = throttle; } /** ** A map containing method level throttling information for API stage in a usage plan. *
* * @return A map containing method level throttling information for API stage in a usage plan. */ public ThrottleSettings getThrottle() { return this.throttle; } /** ** A map containing method level throttling information for API stage in a usage plan. *
* * @param throttle * A map containing method level throttling information for API stage in a usage plan. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withThrottle(ThrottleSettings throttle) { setThrottle(throttle); return this; } /** ** The target maximum number of permitted requests per a given unit time interval. *
* * @param quota * The target maximum number of permitted requests per a given unit time interval. */ public void setQuota(QuotaSettings quota) { this.quota = quota; } /** ** The target maximum number of permitted requests per a given unit time interval. *
* * @return The target maximum number of permitted requests per a given unit time interval. */ public QuotaSettings getQuota() { return this.quota; } /** ** The target maximum number of permitted requests per a given unit time interval. *
* * @param quota * The target maximum number of permitted requests per a given unit time interval. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withQuota(QuotaSettings quota) { setQuota(quota); return this; } /** ** The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace. *
* * @param productCode * The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS * Marketplace. */ public void setProductCode(String productCode) { this.productCode = productCode; } /** ** The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace. *
* * @return The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS * Marketplace. */ public String getProductCode() { return this.productCode; } /** ** The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace. *
* * @param productCode * The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS * Marketplace. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withProductCode(String productCode) { setProductCode(productCode); return this; } /** ** The collection of tags. Each tag element is associated with a given resource. *
* * @return The collection of tags. Each tag element is associated with a given resource. */ public java.util.Map* The collection of tags. Each tag element is associated with a given resource. *
* * @param tags * The collection of tags. Each tag element is associated with a given resource. */ public void setTags(java.util.Map* The collection of tags. Each tag element is associated with a given resource. *
* * @param tags * The collection of tags. Each tag element is associated with a given resource. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUsagePlanResult withTags(java.util.Map