com.amazonaws.services.codedeploy.model.DeploymentReadyOption Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codedeploy Show documentation
/*
* Copyright 2012-2017 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.codedeploy.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about how traffic is rerouted to instances in a replacement environment in a blue/green deployment.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeploymentReadyOption implements Serializable, Cloneable, StructuredPojo {
/**
*
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision
* is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic
* is not rerouted manually before the end of the specified wait period, the deployment status is changed to
* Stopped.
*
*
*
*/
private String actionOnTimeout;
/**
*
* The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not
* started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
*
*/
private Integer waitTimeInMinutes;
/**
*
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision
* is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic
* is not rerouted manually before the end of the specified wait period, the deployment status is changed to
* Stopped.
*
*
*
*
* @param actionOnTimeout
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application
* revision is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If
* traffic is not rerouted manually before the end of the specified wait period, the deployment status is
* changed to Stopped.
*
*
* @see DeploymentReadyAction
*/
public void setActionOnTimeout(String actionOnTimeout) {
this.actionOnTimeout = actionOnTimeout;
}
/**
*
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision
* is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic
* is not rerouted manually before the end of the specified wait period, the deployment status is changed to
* Stopped.
*
*
*
*
* @return Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application
* revision is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If
* traffic is not rerouted manually before the end of the specified wait period, the deployment status is
* changed to Stopped.
*
*
* @see DeploymentReadyAction
*/
@com.fasterxml.jackson.annotation.JsonProperty("actionOnTimeout")
public String getActionOnTimeout() {
return this.actionOnTimeout;
}
/**
*
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision
* is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic
* is not rerouted manually before the end of the specified wait period, the deployment status is changed to
* Stopped.
*
*
*
*
* @param actionOnTimeout
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application
* revision is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If
* traffic is not rerouted manually before the end of the specified wait period, the deployment status is
* changed to Stopped.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentReadyAction
*/
public DeploymentReadyOption withActionOnTimeout(String actionOnTimeout) {
setActionOnTimeout(actionOnTimeout);
return this;
}
/**
*
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision
* is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic
* is not rerouted manually before the end of the specified wait period, the deployment status is changed to
* Stopped.
*
*
*
*
* @param actionOnTimeout
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application
* revision is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If
* traffic is not rerouted manually before the end of the specified wait period, the deployment status is
* changed to Stopped.
*
*
* @see DeploymentReadyAction
*/
@com.fasterxml.jackson.annotation.JsonIgnore
public void setActionOnTimeout(DeploymentReadyAction actionOnTimeout) {
withActionOnTimeout(actionOnTimeout);
}
/**
*
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision
* is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic
* is not rerouted manually before the end of the specified wait period, the deployment status is changed to
* Stopped.
*
*
*
*
* @param actionOnTimeout
* Information about when to reroute traffic from an original environment to a replacement environment in a
* blue/green deployment.
*
* -
*
* CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application
* revision is installed on the instances in the replacement environment.
*
*
* -
*
* STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If
* traffic is not rerouted manually before the end of the specified wait period, the deployment status is
* changed to Stopped.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentReadyAction
*/
public DeploymentReadyOption withActionOnTimeout(DeploymentReadyAction actionOnTimeout) {
this.actionOnTimeout = actionOnTimeout.toString();
return this;
}
/**
*
* The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not
* started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
*
*
* @param waitTimeInMinutes
* The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting
* is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
*/
public void setWaitTimeInMinutes(Integer waitTimeInMinutes) {
this.waitTimeInMinutes = waitTimeInMinutes;
}
/**
*
* The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not
* started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
*
*
* @return The number of minutes to wait before the status of a blue/green deployment changed to Stopped if
* rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
*/
public Integer getWaitTimeInMinutes() {
return this.waitTimeInMinutes;
}
/**
*
* The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not
* started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
*
*
* @param waitTimeInMinutes
* The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting
* is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeploymentReadyOption withWaitTimeInMinutes(Integer waitTimeInMinutes) {
setWaitTimeInMinutes(waitTimeInMinutes);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getActionOnTimeout() != null)
sb.append("ActionOnTimeout: ").append(getActionOnTimeout()).append(",");
if (getWaitTimeInMinutes() != null)
sb.append("WaitTimeInMinutes: ").append(getWaitTimeInMinutes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DeploymentReadyOption == false)
return false;
DeploymentReadyOption other = (DeploymentReadyOption) obj;
if (other.getActionOnTimeout() == null ^ this.getActionOnTimeout() == null)
return false;
if (other.getActionOnTimeout() != null && other.getActionOnTimeout().equals(this.getActionOnTimeout()) == false)
return false;
if (other.getWaitTimeInMinutes() == null ^ this.getWaitTimeInMinutes() == null)
return false;
if (other.getWaitTimeInMinutes() != null && other.getWaitTimeInMinutes().equals(this.getWaitTimeInMinutes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionOnTimeout() == null) ? 0 : getActionOnTimeout().hashCode());
hashCode = prime * hashCode + ((getWaitTimeInMinutes() == null) ? 0 : getWaitTimeInMinutes().hashCode());
return hashCode;
}
@Override
public DeploymentReadyOption clone() {
try {
return (DeploymentReadyOption) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.codedeploy.model.transform.DeploymentReadyOptionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}