/* * 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.apprunner.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 CreateAutoScalingConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if you don't * provide a custome one). You can't use it to create a new auto scaling configuration, and you can't create a * revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
*/ private String autoScalingConfigurationName; /** *

* The maximum number of concurrent requests that you want an instance to process. If the number of concurrent * requests exceeds this limit, App Runner scales up your service. *

*

* Default: 100 *

*/ private Integer maxConcurrency; /** *

* The minimum number of instances that App Runner provisions for your service. The service always has at least * MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned * and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You * pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset. *

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same * capacity for both old and new code. *

*

* Default: 1 *

*/ private Integer minSize; /** *

* The maximum number of instances that your service scales up to. At most MaxSize instances actively * serve traffic for your service. *

*

* Default: 25 *

*/ private Integer maxSize; /** *

* A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. *

*/ private java.util.List tags; /** *

* A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if you don't * provide a custome one). You can't use it to create a new auto scaling configuration, and you can't create a * revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
* * @param autoScalingConfigurationName * A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services * Region, App Runner creates revision number 1 of this name. When you use the same name in * subsequent calls, App Runner creates incremental revisions of the configuration.

*

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if you * don't provide a custome one). You can't use it to create a new auto scaling configuration, and you can't * create a revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a * configuration with a different name, and then provide it when you create or update your service. *

*/ public void setAutoScalingConfigurationName(String autoScalingConfigurationName) { this.autoScalingConfigurationName = autoScalingConfigurationName; } /** *

* A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if you don't * provide a custome one). You can't use it to create a new auto scaling configuration, and you can't create a * revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
* * @return A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services * Region, App Runner creates revision number 1 of this name. When you use the same name in * subsequent calls, App Runner creates incremental revisions of the configuration.

*

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if * you don't provide a custome one). You can't use it to create a new auto scaling configuration, and you * can't create a revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a * configuration with a different name, and then provide it when you create or update your service. *

*/ public String getAutoScalingConfigurationName() { return this.autoScalingConfigurationName; } /** *

* A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if you don't * provide a custome one). You can't use it to create a new auto scaling configuration, and you can't create a * revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
* * @param autoScalingConfigurationName * A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services * Region, App Runner creates revision number 1 of this name. When you use the same name in * subsequent calls, App Runner creates incremental revisions of the configuration.

*

* The name DefaultConfiguration is reserved (it's the configuration that App Runner uses if you * don't provide a custome one). You can't use it to create a new auto scaling configuration, and you can't * create a revision of it. *

*

* When you want to use your own auto scaling configuration for your App Runner service, create a * configuration with a different name, and then provide it when you create or update your service. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateAutoScalingConfigurationRequest withAutoScalingConfigurationName(String autoScalingConfigurationName) { setAutoScalingConfigurationName(autoScalingConfigurationName); return this; } /** *

* The maximum number of concurrent requests that you want an instance to process. If the number of concurrent * requests exceeds this limit, App Runner scales up your service. *

*

* Default: 100 *

* * @param maxConcurrency * The maximum number of concurrent requests that you want an instance to process. If the number of * concurrent requests exceeds this limit, App Runner scales up your service.

*

* Default: 100 */ public void setMaxConcurrency(Integer maxConcurrency) { this.maxConcurrency = maxConcurrency; } /** *

* The maximum number of concurrent requests that you want an instance to process. If the number of concurrent * requests exceeds this limit, App Runner scales up your service. *

*

* Default: 100 *

* * @return The maximum number of concurrent requests that you want an instance to process. If the number of * concurrent requests exceeds this limit, App Runner scales up your service.

*

* Default: 100 */ public Integer getMaxConcurrency() { return this.maxConcurrency; } /** *

* The maximum number of concurrent requests that you want an instance to process. If the number of concurrent * requests exceeds this limit, App Runner scales up your service. *

*

* Default: 100 *

* * @param maxConcurrency * The maximum number of concurrent requests that you want an instance to process. If the number of * concurrent requests exceeds this limit, App Runner scales up your service.

*

* Default: 100 * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAutoScalingConfigurationRequest withMaxConcurrency(Integer maxConcurrency) { setMaxConcurrency(maxConcurrency); return this; } /** *

* The minimum number of instances that App Runner provisions for your service. The service always has at least * MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned * and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You * pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset. *

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same * capacity for both old and new code. *

*

* Default: 1 *

* * @param minSize * The minimum number of instances that App Runner provisions for your service. The service always has at * least MinSize provisioned instances. Some of them actively serve traffic. The rest of them * (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of * only the active subset.

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code. *

*

* Default: 1 */ public void setMinSize(Integer minSize) { this.minSize = minSize; } /** *

* The minimum number of instances that App Runner provisions for your service. The service always has at least * MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned * and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You * pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset. *

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same * capacity for both old and new code. *

*

* Default: 1 *

* * @return The minimum number of instances that App Runner provisions for your service. The service always has at * least MinSize provisioned instances. Some of them actively serve traffic. The rest of them * (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of * only the active subset.

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code. *

*

* Default: 1 */ public Integer getMinSize() { return this.minSize; } /** *

* The minimum number of instances that App Runner provisions for your service. The service always has at least * MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned * and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You * pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset. *

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same * capacity for both old and new code. *

*

* Default: 1 *

* * @param minSize * The minimum number of instances that App Runner provisions for your service. The service always has at * least MinSize provisioned instances. Some of them actively serve traffic. The rest of them * (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be * quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of * only the active subset.

*

* App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the * same capacity for both old and new code. *

*

* Default: 1 * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAutoScalingConfigurationRequest withMinSize(Integer minSize) { setMinSize(minSize); return this; } /** *

* The maximum number of instances that your service scales up to. At most MaxSize instances actively * serve traffic for your service. *

*

* Default: 25 *

* * @param maxSize * The maximum number of instances that your service scales up to. At most MaxSize instances * actively serve traffic for your service.

*

* Default: 25 */ public void setMaxSize(Integer maxSize) { this.maxSize = maxSize; } /** *

* The maximum number of instances that your service scales up to. At most MaxSize instances actively * serve traffic for your service. *

*

* Default: 25 *

* * @return The maximum number of instances that your service scales up to. At most MaxSize instances * actively serve traffic for your service.

*

* Default: 25 */ public Integer getMaxSize() { return this.maxSize; } /** *

* The maximum number of instances that your service scales up to. At most MaxSize instances actively * serve traffic for your service. *

*

* Default: 25 *

* * @param maxSize * The maximum number of instances that your service scales up to. At most MaxSize instances * actively serve traffic for your service.

*

* Default: 25 * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAutoScalingConfigurationRequest withMaxSize(Integer maxSize) { setMaxSize(maxSize); return this; } /** *

* A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. *

* * @return A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. */ public java.util.List getTags() { return tags; } /** *

* A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. *

* * @param tags * A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. *

*

* 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 metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAutoScalingConfigurationRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. *

* * @param tags * A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a * key-value pair. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAutoScalingConfigurationRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAutoScalingConfigurationName() != null) sb.append("AutoScalingConfigurationName: ").append(getAutoScalingConfigurationName()).append(","); if (getMaxConcurrency() != null) sb.append("MaxConcurrency: ").append(getMaxConcurrency()).append(","); if (getMinSize() != null) sb.append("MinSize: ").append(getMinSize()).append(","); if (getMaxSize() != null) sb.append("MaxSize: ").append(getMaxSize()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateAutoScalingConfigurationRequest == false) return false; CreateAutoScalingConfigurationRequest other = (CreateAutoScalingConfigurationRequest) obj; if (other.getAutoScalingConfigurationName() == null ^ this.getAutoScalingConfigurationName() == null) return false; if (other.getAutoScalingConfigurationName() != null && other.getAutoScalingConfigurationName().equals(this.getAutoScalingConfigurationName()) == false) return false; if (other.getMaxConcurrency() == null ^ this.getMaxConcurrency() == null) return false; if (other.getMaxConcurrency() != null && other.getMaxConcurrency().equals(this.getMaxConcurrency()) == false) return false; if (other.getMinSize() == null ^ this.getMinSize() == null) return false; if (other.getMinSize() != null && other.getMinSize().equals(this.getMinSize()) == false) return false; if (other.getMaxSize() == null ^ this.getMaxSize() == null) return false; if (other.getMaxSize() != null && other.getMaxSize().equals(this.getMaxSize()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingConfigurationName() == null) ? 0 : getAutoScalingConfigurationName().hashCode()); hashCode = prime * hashCode + ((getMaxConcurrency() == null) ? 0 : getMaxConcurrency().hashCode()); hashCode = prime * hashCode + ((getMinSize() == null) ? 0 : getMinSize().hashCode()); hashCode = prime * hashCode + ((getMaxSize() == null) ? 0 : getMaxSize().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateAutoScalingConfigurationRequest clone() { return (CreateAutoScalingConfigurationRequest) super.clone(); } }