Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 

Information about minimum healthy instances.

 
 public class MinimumHealthyHosts implements SerializableCloneable {

    
The minimum healthy instances value.
 
     private Integer value;

    
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Constraints:
Allowed Values: HOST_COUNT, FLEET_PERCENT

 
     private String type;

    
The minimum healthy instances value.

Returns:
The minimum healthy instances value.
 
     public Integer getValue() {
         return ;
     }
    
    
The minimum healthy instances value.

Parameters:
value The minimum healthy instances value.
 
     public void setValue(Integer value) {
         this. = value;
     }
    
    
The minimum healthy instances value.

Returns a reference to this object so that method calls can be chained together.

Parameters:
value The minimum healthy instances value.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public MinimumHealthyHosts withValue(Integer value) {
         this. = value;
         return this;
     }

    
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Constraints:
Allowed Values: HOST_COUNT, FLEET_PERCENT

Returns:
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

See also:
MinimumHealthyHostsType
    public String getType() {
        return ;
    }
    
    
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Constraints:
Allowed Values: HOST_COUNT, FLEET_PERCENT

Parameters:
type The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

See also:
MinimumHealthyHostsType
    public void setType(String type) {
        this. = type;
    }
    
    
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: HOST_COUNT, FLEET_PERCENT

Parameters:
type The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
MinimumHealthyHostsType
    public MinimumHealthyHosts withType(String type) {
        this. = type;
        return this;
    }

    
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Constraints:
Allowed Values: HOST_COUNT, FLEET_PERCENT

Parameters:
type The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

See also:
MinimumHealthyHostsType
    public void setType(MinimumHealthyHostsType type) {
        this. = type.toString();
    }
    
    
The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: HOST_COUNT, FLEET_PERCENT

Parameters:
type The minimum healthy instances type:
  • HOST_COUNT: The minimum number of healthy instances, as an absolute value.
  • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

For example, for 9 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails. <note>In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instances at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)</note>

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
MinimumHealthyHostsType
        this. = type.toString();
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getValue() != nullsb.append("Value: " + getValue() + ",");
        if (getType() != nullsb.append("Type: " + getType() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); 
        hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof MinimumHealthyHosts == falsereturn false;
        MinimumHealthyHosts other = (MinimumHealthyHosts)obj;
        
        if (other.getValue() == null ^ this.getValue() == nullreturn false;
        if (other.getValue() != null && other.getValue().equals(this.getValue()) == falsereturn false
        if (other.getType() == null ^ this.getType() == nullreturn false;
        if (other.getType() != null && other.getType().equals(this.getType()) == falsereturn false
        return true;
    }
    
    @Override
    public MinimumHealthyHosts clone() {
        try {
            return (MinimumHealthyHostssuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X