/* * 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.appconfig.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 UpdateDeploymentStrategyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The deployment strategy ID. *
*/ private String deploymentStrategyId; /** ** A description of the deployment strategy. *
*/ private String description; /** ** Total amount of time for a deployment to last. *
*/ private Integer deploymentDurationInMinutes; /** ** The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no * longer eligible for automatic rollback. *
*/ private Integer finalBakeTimeInMinutes; /** ** The percentage of targets to receive a deployed configuration during each interval. *
*/ private Float growthFactor; /** ** The algorithm used to define how percentage grows over time. AppConfig supports the following growth types: *
** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 initially * makes the configuration available to 20 percent of the targets. After 1/5th of the deployment time has passed, * the system updates the percentage to 40 percent. This continues until 100% of the targets are set to receive the * deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following formula:
* G*(2^N)
. In this formula, G
is the growth factor specified by the user and
* N
is the number of steps until the configuration is deployed to all targets. For example, if you
* specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the * targets, and continues until the configuration has been deployed to all targets. *
*/ private String growthType; /** ** The deployment strategy ID. *
* * @param deploymentStrategyId * The deployment strategy ID. */ public void setDeploymentStrategyId(String deploymentStrategyId) { this.deploymentStrategyId = deploymentStrategyId; } /** ** The deployment strategy ID. *
* * @return The deployment strategy ID. */ public String getDeploymentStrategyId() { return this.deploymentStrategyId; } /** ** The deployment strategy ID. *
* * @param deploymentStrategyId * The deployment strategy ID. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDeploymentStrategyRequest withDeploymentStrategyId(String deploymentStrategyId) { setDeploymentStrategyId(deploymentStrategyId); return this; } /** ** A description of the deployment strategy. *
* * @param description * A description of the deployment strategy. */ public void setDescription(String description) { this.description = description; } /** ** A description of the deployment strategy. *
* * @return A description of the deployment strategy. */ public String getDescription() { return this.description; } /** ** A description of the deployment strategy. *
* * @param description * A description of the deployment strategy. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDeploymentStrategyRequest withDescription(String description) { setDescription(description); return this; } /** ** Total amount of time for a deployment to last. *
* * @param deploymentDurationInMinutes * Total amount of time for a deployment to last. */ public void setDeploymentDurationInMinutes(Integer deploymentDurationInMinutes) { this.deploymentDurationInMinutes = deploymentDurationInMinutes; } /** ** Total amount of time for a deployment to last. *
* * @return Total amount of time for a deployment to last. */ public Integer getDeploymentDurationInMinutes() { return this.deploymentDurationInMinutes; } /** ** Total amount of time for a deployment to last. *
* * @param deploymentDurationInMinutes * Total amount of time for a deployment to last. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDeploymentStrategyRequest withDeploymentDurationInMinutes(Integer deploymentDurationInMinutes) { setDeploymentDurationInMinutes(deploymentDurationInMinutes); return this; } /** ** The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no * longer eligible for automatic rollback. *
* * @param finalBakeTimeInMinutes * The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and * no longer eligible for automatic rollback. */ public void setFinalBakeTimeInMinutes(Integer finalBakeTimeInMinutes) { this.finalBakeTimeInMinutes = finalBakeTimeInMinutes; } /** ** The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no * longer eligible for automatic rollback. *
* * @return The amount of time that AppConfig monitors for alarms before considering the deployment to be complete * and no longer eligible for automatic rollback. */ public Integer getFinalBakeTimeInMinutes() { return this.finalBakeTimeInMinutes; } /** ** The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no * longer eligible for automatic rollback. *
* * @param finalBakeTimeInMinutes * The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and * no longer eligible for automatic rollback. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDeploymentStrategyRequest withFinalBakeTimeInMinutes(Integer finalBakeTimeInMinutes) { setFinalBakeTimeInMinutes(finalBakeTimeInMinutes); return this; } /** ** The percentage of targets to receive a deployed configuration during each interval. *
* * @param growthFactor * The percentage of targets to receive a deployed configuration during each interval. */ public void setGrowthFactor(Float growthFactor) { this.growthFactor = growthFactor; } /** ** The percentage of targets to receive a deployed configuration during each interval. *
* * @return The percentage of targets to receive a deployed configuration during each interval. */ public Float getGrowthFactor() { return this.growthFactor; } /** ** The percentage of targets to receive a deployed configuration during each interval. *
* * @param growthFactor * The percentage of targets to receive a deployed configuration during each interval. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateDeploymentStrategyRequest withGrowthFactor(Float growthFactor) { setGrowthFactor(growthFactor); return this; } /** ** The algorithm used to define how percentage grows over time. AppConfig supports the following growth types: *
** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 initially * makes the configuration available to 20 percent of the targets. After 1/5th of the deployment time has passed, * the system updates the percentage to 40 percent. This continues until 100% of the targets are set to receive the * deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following formula:
* G*(2^N)
. In this formula, G
is the growth factor specified by the user and
* N
is the number of steps until the configuration is deployed to all targets. For example, if you
* specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the * targets, and continues until the configuration has been deployed to all targets. *
* * @param growthType * The algorithm used to define how percentage grows over time. AppConfig supports the following growth * types: ** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 * initially makes the configuration available to 20 percent of the targets. After 1/5th of the deployment * time has passed, the system updates the percentage to 40 percent. This continues until 100% of the targets * are set to receive the deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following
* formula: G*(2^N)
. In this formula, G
is the growth factor specified by the user
* and N
is the number of steps until the configuration is deployed to all targets. For example,
* if you specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of * the targets, and continues until the configuration has been deployed to all targets. * @see GrowthType */ public void setGrowthType(String growthType) { this.growthType = growthType; } /** *
* The algorithm used to define how percentage grows over time. AppConfig supports the following growth types: *
** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 initially * makes the configuration available to 20 percent of the targets. After 1/5th of the deployment time has passed, * the system updates the percentage to 40 percent. This continues until 100% of the targets are set to receive the * deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following formula:
* G*(2^N)
. In this formula, G
is the growth factor specified by the user and
* N
is the number of steps until the configuration is deployed to all targets. For example, if you
* specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the * targets, and continues until the configuration has been deployed to all targets. *
* * @return The algorithm used to define how percentage grows over time. AppConfig supports the following growth * types: ** Linear: For this type, AppConfig processes the deployment by increments of the growth factor * evenly distributed over the deployment time. For example, a linear deployment that uses a growth factor * of 20 initially makes the configuration available to 20 percent of the targets. After 1/5th of the * deployment time has passed, the system updates the percentage to 40 percent. This continues until 100% of * the targets are set to receive the deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following
* formula: G*(2^N)
. In this formula, G
is the growth factor specified by the user
* and N
is the number of steps until the configuration is deployed to all targets. For
* example, if you specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of * the targets, and continues until the configuration has been deployed to all targets. * @see GrowthType */ public String getGrowthType() { return this.growthType; } /** *
* The algorithm used to define how percentage grows over time. AppConfig supports the following growth types: *
** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 initially * makes the configuration available to 20 percent of the targets. After 1/5th of the deployment time has passed, * the system updates the percentage to 40 percent. This continues until 100% of the targets are set to receive the * deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following formula:
* G*(2^N)
. In this formula, G
is the growth factor specified by the user and
* N
is the number of steps until the configuration is deployed to all targets. For example, if you
* specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the * targets, and continues until the configuration has been deployed to all targets. *
* * @param growthType * The algorithm used to define how percentage grows over time. AppConfig supports the following growth * types: ** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 * initially makes the configuration available to 20 percent of the targets. After 1/5th of the deployment * time has passed, the system updates the percentage to 40 percent. This continues until 100% of the targets * are set to receive the deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following
* formula: G*(2^N)
. In this formula, G
is the growth factor specified by the user
* and N
is the number of steps until the configuration is deployed to all targets. For example,
* if you specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of * the targets, and continues until the configuration has been deployed to all targets. * @return Returns a reference to this object so that method calls can be chained together. * @see GrowthType */ public UpdateDeploymentStrategyRequest withGrowthType(String growthType) { setGrowthType(growthType); return this; } /** *
* The algorithm used to define how percentage grows over time. AppConfig supports the following growth types: *
** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 initially * makes the configuration available to 20 percent of the targets. After 1/5th of the deployment time has passed, * the system updates the percentage to 40 percent. This continues until 100% of the targets are set to receive the * deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following formula:
* G*(2^N)
. In this formula, G
is the growth factor specified by the user and
* N
is the number of steps until the configuration is deployed to all targets. For example, if you
* specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the * targets, and continues until the configuration has been deployed to all targets. *
* * @param growthType * The algorithm used to define how percentage grows over time. AppConfig supports the following growth * types: ** Linear: For this type, AppConfig processes the deployment by increments of the growth factor evenly * distributed over the deployment time. For example, a linear deployment that uses a growth factor of 20 * initially makes the configuration available to 20 percent of the targets. After 1/5th of the deployment * time has passed, the system updates the percentage to 40 percent. This continues until 100% of the targets * are set to receive the deployed configuration. *
*
* Exponential: For this type, AppConfig processes the deployment exponentially using the following
* formula: G*(2^N)
. In this formula, G
is the growth factor specified by the user
* and N
is the number of steps until the configuration is deployed to all targets. For example,
* if you specify a growth factor of 2, then the system rolls out the configuration as follows:
*
* 2*(2^0)
*
* 2*(2^1)
*
* 2*(2^2)
*
* Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of * the targets, and continues until the configuration has been deployed to all targets. * @return Returns a reference to this object so that method calls can be chained together. * @see GrowthType */ public UpdateDeploymentStrategyRequest withGrowthType(GrowthType growthType) { this.growthType = growthType.toString(); 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 (getDeploymentStrategyId() != null) sb.append("DeploymentStrategyId: ").append(getDeploymentStrategyId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getDeploymentDurationInMinutes() != null) sb.append("DeploymentDurationInMinutes: ").append(getDeploymentDurationInMinutes()).append(","); if (getFinalBakeTimeInMinutes() != null) sb.append("FinalBakeTimeInMinutes: ").append(getFinalBakeTimeInMinutes()).append(","); if (getGrowthFactor() != null) sb.append("GrowthFactor: ").append(getGrowthFactor()).append(","); if (getGrowthType() != null) sb.append("GrowthType: ").append(getGrowthType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateDeploymentStrategyRequest == false) return false; UpdateDeploymentStrategyRequest other = (UpdateDeploymentStrategyRequest) obj; if (other.getDeploymentStrategyId() == null ^ this.getDeploymentStrategyId() == null) return false; if (other.getDeploymentStrategyId() != null && other.getDeploymentStrategyId().equals(this.getDeploymentStrategyId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getDeploymentDurationInMinutes() == null ^ this.getDeploymentDurationInMinutes() == null) return false; if (other.getDeploymentDurationInMinutes() != null && other.getDeploymentDurationInMinutes().equals(this.getDeploymentDurationInMinutes()) == false) return false; if (other.getFinalBakeTimeInMinutes() == null ^ this.getFinalBakeTimeInMinutes() == null) return false; if (other.getFinalBakeTimeInMinutes() != null && other.getFinalBakeTimeInMinutes().equals(this.getFinalBakeTimeInMinutes()) == false) return false; if (other.getGrowthFactor() == null ^ this.getGrowthFactor() == null) return false; if (other.getGrowthFactor() != null && other.getGrowthFactor().equals(this.getGrowthFactor()) == false) return false; if (other.getGrowthType() == null ^ this.getGrowthType() == null) return false; if (other.getGrowthType() != null && other.getGrowthType().equals(this.getGrowthType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeploymentStrategyId() == null) ? 0 : getDeploymentStrategyId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDeploymentDurationInMinutes() == null) ? 0 : getDeploymentDurationInMinutes().hashCode()); hashCode = prime * hashCode + ((getFinalBakeTimeInMinutes() == null) ? 0 : getFinalBakeTimeInMinutes().hashCode()); hashCode = prime * hashCode + ((getGrowthFactor() == null) ? 0 : getGrowthFactor().hashCode()); hashCode = prime * hashCode + ((getGrowthType() == null) ? 0 : getGrowthType().hashCode()); return hashCode; } @Override public UpdateDeploymentStrategyRequest clone() { return (UpdateDeploymentStrategyRequest) super.clone(); } }