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.opsworks.model;
 

Describes how many instances a stack has for each status.

 
 public class InstancesCount implements SerializableCloneable {

    
The number of instances in the Assigning state.
 
     private Integer assigning;

    
The number of instances with booting status.
 
     private Integer booting;

    
The number of instances with connection_lost status.
 
     private Integer connectionLost;

    
The number of instances in the Deregistering state.
 
     private Integer deregistering;

    
The number of instances with online status.
 
     private Integer online;

    
The number of instances with pending status.
 
     private Integer pending;

    
The number of instances with rebooting status.
 
     private Integer rebooting;

    
The number of instances in the Registered state.
 
     private Integer registered;

    
The number of instances in the Registering state.
 
     private Integer registering;

    
The number of instances with requested status.
 
     private Integer requested;

    
The number of instances with running_setup status.
 
     private Integer runningSetup;

    
The number of instances with setup_failed status.
 
     private Integer setupFailed;

    
The number of instances with shutting_down status.
 
     private Integer shuttingDown;

    
The number of instances with start_failed status.
 
     private Integer startFailed;

    
The number of instances with stopped status.
 
     private Integer stopped;

    
The number of instances with stopping status.
    private Integer stopping;

    
The number of instances with terminated status.
    private Integer terminated;

    
The number of instances with terminating status.
    private Integer terminating;

    
The number of instances in the Unassigning state.
    private Integer unassigning;

    
The number of instances in the Assigning state.

Returns:
The number of instances in the Assigning state.
    public Integer getAssigning() {
        return ;
    }
    
    
The number of instances in the Assigning state.

Parameters:
assigning The number of instances in the Assigning state.
    public void setAssigning(Integer assigning) {
        this. = assigning;
    }
    
    
The number of instances in the Assigning state.

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

Parameters:
assigning The number of instances in the Assigning state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withAssigning(Integer assigning) {
        this. = assigning;
        return this;
    }

    
The number of instances with booting status.

Returns:
The number of instances with booting status.
    public Integer getBooting() {
        return ;
    }
    
    
The number of instances with booting status.

Parameters:
booting The number of instances with booting status.
    public void setBooting(Integer booting) {
        this. = booting;
    }
    
    
The number of instances with booting status.

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

Parameters:
booting The number of instances with booting status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withBooting(Integer booting) {
        this. = booting;
        return this;
    }

    
The number of instances with connection_lost status.

Returns:
The number of instances with connection_lost status.
    public Integer getConnectionLost() {
        return ;
    }
    
    
The number of instances with connection_lost status.

Parameters:
connectionLost The number of instances with connection_lost status.
    public void setConnectionLost(Integer connectionLost) {
        this. = connectionLost;
    }
    
    
The number of instances with connection_lost status.

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

Parameters:
connectionLost The number of instances with connection_lost status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withConnectionLost(Integer connectionLost) {
        this. = connectionLost;
        return this;
    }

    
The number of instances in the Deregistering state.

Returns:
The number of instances in the Deregistering state.
    public Integer getDeregistering() {
        return ;
    }
    
    
The number of instances in the Deregistering state.

Parameters:
deregistering The number of instances in the Deregistering state.
    public void setDeregistering(Integer deregistering) {
        this. = deregistering;
    }
    
    
The number of instances in the Deregistering state.

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

Parameters:
deregistering The number of instances in the Deregistering state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withDeregistering(Integer deregistering) {
        this. = deregistering;
        return this;
    }

    
The number of instances with online status.

Returns:
The number of instances with online status.
    public Integer getOnline() {
        return ;
    }
    
    
The number of instances with online status.

Parameters:
online The number of instances with online status.
    public void setOnline(Integer online) {
        this. = online;
    }
    
    
The number of instances with online status.

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

Parameters:
online The number of instances with online status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withOnline(Integer online) {
        this. = online;
        return this;
    }

    
The number of instances with pending status.

Returns:
The number of instances with pending status.
    public Integer getPending() {
        return ;
    }
    
    
The number of instances with pending status.

Parameters:
pending The number of instances with pending status.
    public void setPending(Integer pending) {
        this. = pending;
    }
    
    
The number of instances with pending status.

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

Parameters:
pending The number of instances with pending status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withPending(Integer pending) {
        this. = pending;
        return this;
    }

    
The number of instances with rebooting status.

Returns:
The number of instances with rebooting status.
    public Integer getRebooting() {
        return ;
    }
    
    
The number of instances with rebooting status.

Parameters:
rebooting The number of instances with rebooting status.
    public void setRebooting(Integer rebooting) {
        this. = rebooting;
    }
    
    
The number of instances with rebooting status.

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

Parameters:
rebooting The number of instances with rebooting status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withRebooting(Integer rebooting) {
        this. = rebooting;
        return this;
    }

    
The number of instances in the Registered state.

Returns:
The number of instances in the Registered state.
    public Integer getRegistered() {
        return ;
    }
    
    
The number of instances in the Registered state.

Parameters:
registered The number of instances in the Registered state.
    public void setRegistered(Integer registered) {
        this. = registered;
    }
    
    
The number of instances in the Registered state.

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

Parameters:
registered The number of instances in the Registered state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withRegistered(Integer registered) {
        this. = registered;
        return this;
    }

    
The number of instances in the Registering state.

Returns:
The number of instances in the Registering state.
    public Integer getRegistering() {
        return ;
    }
    
    
The number of instances in the Registering state.

Parameters:
registering The number of instances in the Registering state.
    public void setRegistering(Integer registering) {
        this. = registering;
    }
    
    
The number of instances in the Registering state.

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

Parameters:
registering The number of instances in the Registering state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withRegistering(Integer registering) {
        this. = registering;
        return this;
    }

    
The number of instances with requested status.

Returns:
The number of instances with requested status.
    public Integer getRequested() {
        return ;
    }
    
    
The number of instances with requested status.

Parameters:
requested The number of instances with requested status.
    public void setRequested(Integer requested) {
        this. = requested;
    }
    
    
The number of instances with requested status.

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

Parameters:
requested The number of instances with requested status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withRequested(Integer requested) {
        this. = requested;
        return this;
    }

    
The number of instances with running_setup status.

Returns:
The number of instances with running_setup status.
    public Integer getRunningSetup() {
        return ;
    }
    
    
The number of instances with running_setup status.

Parameters:
runningSetup The number of instances with running_setup status.
    public void setRunningSetup(Integer runningSetup) {
        this. = runningSetup;
    }
    
    
The number of instances with running_setup status.

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

Parameters:
runningSetup The number of instances with running_setup status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withRunningSetup(Integer runningSetup) {
        this. = runningSetup;
        return this;
    }

    
The number of instances with setup_failed status.

Returns:
The number of instances with setup_failed status.
    public Integer getSetupFailed() {
        return ;
    }
    
    
The number of instances with setup_failed status.

Parameters:
setupFailed The number of instances with setup_failed status.
    public void setSetupFailed(Integer setupFailed) {
        this. = setupFailed;
    }
    
    
The number of instances with setup_failed status.

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

Parameters:
setupFailed The number of instances with setup_failed status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withSetupFailed(Integer setupFailed) {
        this. = setupFailed;
        return this;
    }

    
The number of instances with shutting_down status.

Returns:
The number of instances with shutting_down status.
    public Integer getShuttingDown() {
        return ;
    }
    
    
The number of instances with shutting_down status.

Parameters:
shuttingDown The number of instances with shutting_down status.
    public void setShuttingDown(Integer shuttingDown) {
        this. = shuttingDown;
    }
    
    
The number of instances with shutting_down status.

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

Parameters:
shuttingDown The number of instances with shutting_down status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withShuttingDown(Integer shuttingDown) {
        this. = shuttingDown;
        return this;
    }

    
The number of instances with start_failed status.

Returns:
The number of instances with start_failed status.
    public Integer getStartFailed() {
        return ;
    }
    
    
The number of instances with start_failed status.

Parameters:
startFailed The number of instances with start_failed status.
    public void setStartFailed(Integer startFailed) {
        this. = startFailed;
    }
    
    
The number of instances with start_failed status.

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

Parameters:
startFailed The number of instances with start_failed status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withStartFailed(Integer startFailed) {
        this. = startFailed;
        return this;
    }

    
The number of instances with stopped status.

Returns:
The number of instances with stopped status.
    public Integer getStopped() {
        return ;
    }
    
    
The number of instances with stopped status.

Parameters:
stopped The number of instances with stopped status.
    public void setStopped(Integer stopped) {
        this. = stopped;
    }
    
    
The number of instances with stopped status.

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

Parameters:
stopped The number of instances with stopped status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withStopped(Integer stopped) {
        this. = stopped;
        return this;
    }

    
The number of instances with stopping status.

Returns:
The number of instances with stopping status.
    public Integer getStopping() {
        return ;
    }
    
    
The number of instances with stopping status.

Parameters:
stopping The number of instances with stopping status.
    public void setStopping(Integer stopping) {
        this. = stopping;
    }
    
    
The number of instances with stopping status.

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

Parameters:
stopping The number of instances with stopping status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withStopping(Integer stopping) {
        this. = stopping;
        return this;
    }

    
The number of instances with terminated status.

Returns:
The number of instances with terminated status.
    public Integer getTerminated() {
        return ;
    }
    
    
The number of instances with terminated status.

Parameters:
terminated The number of instances with terminated status.
    public void setTerminated(Integer terminated) {
        this. = terminated;
    }
    
    
The number of instances with terminated status.

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

Parameters:
terminated The number of instances with terminated status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withTerminated(Integer terminated) {
        this. = terminated;
        return this;
    }

    
The number of instances with terminating status.

Returns:
The number of instances with terminating status.
    public Integer getTerminating() {
        return ;
    }
    
    
The number of instances with terminating status.

Parameters:
terminating The number of instances with terminating status.
    public void setTerminating(Integer terminating) {
        this. = terminating;
    }
    
    
The number of instances with terminating status.

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

Parameters:
terminating The number of instances with terminating status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withTerminating(Integer terminating) {
        this. = terminating;
        return this;
    }

    
The number of instances in the Unassigning state.

Returns:
The number of instances in the Unassigning state.
    public Integer getUnassigning() {
        return ;
    }
    
    
The number of instances in the Unassigning state.

Parameters:
unassigning The number of instances in the Unassigning state.
    public void setUnassigning(Integer unassigning) {
        this. = unassigning;
    }
    
    
The number of instances in the Unassigning state.

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

Parameters:
unassigning The number of instances in the Unassigning state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public InstancesCount withUnassigning(Integer unassigning) {
        this. = unassigning;
        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 (getAssigning() != nullsb.append("Assigning: " + getAssigning() + ",");
        if (getBooting() != nullsb.append("Booting: " + getBooting() + ",");
        if (getConnectionLost() != nullsb.append("ConnectionLost: " + getConnectionLost() + ",");
        if (getDeregistering() != nullsb.append("Deregistering: " + getDeregistering() + ",");
        if (getOnline() != nullsb.append("Online: " + getOnline() + ",");
        if (getPending() != nullsb.append("Pending: " + getPending() + ",");
        if (getRebooting() != nullsb.append("Rebooting: " + getRebooting() + ",");
        if (getRegistered() != nullsb.append("Registered: " + getRegistered() + ",");
        if (getRegistering() != nullsb.append("Registering: " + getRegistering() + ",");
        if (getRequested() != nullsb.append("Requested: " + getRequested() + ",");
        if (getRunningSetup() != nullsb.append("RunningSetup: " + getRunningSetup() + ",");
        if (getSetupFailed() != nullsb.append("SetupFailed: " + getSetupFailed() + ",");
        if (getShuttingDown() != nullsb.append("ShuttingDown: " + getShuttingDown() + ",");
        if (getStartFailed() != nullsb.append("StartFailed: " + getStartFailed() + ",");
        if (getStopped() != nullsb.append("Stopped: " + getStopped() + ",");
        if (getStopping() != nullsb.append("Stopping: " + getStopping() + ",");
        if (getTerminated() != nullsb.append("Terminated: " + getTerminated() + ",");
        if (getTerminating() != nullsb.append("Terminating: " + getTerminating() + ",");
        if (getUnassigning() != nullsb.append("Unassigning: " + getUnassigning() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAssigning() == null) ? 0 : getAssigning().hashCode()); 
        hashCode = prime * hashCode + ((getBooting() == null) ? 0 : getBooting().hashCode()); 
        hashCode = prime * hashCode + ((getConnectionLost() == null) ? 0 : getConnectionLost().hashCode()); 
        hashCode = prime * hashCode + ((getDeregistering() == null) ? 0 : getDeregistering().hashCode()); 
        hashCode = prime * hashCode + ((getOnline() == null) ? 0 : getOnline().hashCode()); 
        hashCode = prime * hashCode + ((getPending() == null) ? 0 : getPending().hashCode()); 
        hashCode = prime * hashCode + ((getRebooting() == null) ? 0 : getRebooting().hashCode()); 
        hashCode = prime * hashCode + ((getRegistered() == null) ? 0 : getRegistered().hashCode()); 
        hashCode = prime * hashCode + ((getRegistering() == null) ? 0 : getRegistering().hashCode()); 
        hashCode = prime * hashCode + ((getRequested() == null) ? 0 : getRequested().hashCode()); 
        hashCode = prime * hashCode + ((getRunningSetup() == null) ? 0 : getRunningSetup().hashCode()); 
        hashCode = prime * hashCode + ((getSetupFailed() == null) ? 0 : getSetupFailed().hashCode()); 
        hashCode = prime * hashCode + ((getShuttingDown() == null) ? 0 : getShuttingDown().hashCode()); 
        hashCode = prime * hashCode + ((getStartFailed() == null) ? 0 : getStartFailed().hashCode()); 
        hashCode = prime * hashCode + ((getStopped() == null) ? 0 : getStopped().hashCode()); 
        hashCode = prime * hashCode + ((getStopping() == null) ? 0 : getStopping().hashCode()); 
        hashCode = prime * hashCode + ((getTerminated() == null) ? 0 : getTerminated().hashCode()); 
        hashCode = prime * hashCode + ((getTerminating() == null) ? 0 : getTerminating().hashCode()); 
        hashCode = prime * hashCode + ((getUnassigning() == null) ? 0 : getUnassigning().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof InstancesCount == falsereturn false;
        InstancesCount other = (InstancesCount)obj;
        
        if (other.getAssigning() == null ^ this.getAssigning() == nullreturn false;
        if (other.getAssigning() != null && other.getAssigning().equals(this.getAssigning()) == falsereturn false
        if (other.getBooting() == null ^ this.getBooting() == nullreturn false;
        if (other.getBooting() != null && other.getBooting().equals(this.getBooting()) == falsereturn false
        if (other.getConnectionLost() == null ^ this.getConnectionLost() == nullreturn false;
        if (other.getConnectionLost() != null && other.getConnectionLost().equals(this.getConnectionLost()) == falsereturn false
        if (other.getDeregistering() == null ^ this.getDeregistering() == nullreturn false;
        if (other.getDeregistering() != null && other.getDeregistering().equals(this.getDeregistering()) == falsereturn false
        if (other.getOnline() == null ^ this.getOnline() == nullreturn false;
        if (other.getOnline() != null && other.getOnline().equals(this.getOnline()) == falsereturn false
        if (other.getPending() == null ^ this.getPending() == nullreturn false;
        if (other.getPending() != null && other.getPending().equals(this.getPending()) == falsereturn false
        if (other.getRebooting() == null ^ this.getRebooting() == nullreturn false;
        if (other.getRebooting() != null && other.getRebooting().equals(this.getRebooting()) == falsereturn false
        if (other.getRegistered() == null ^ this.getRegistered() == nullreturn false;
        if (other.getRegistered() != null && other.getRegistered().equals(this.getRegistered()) == falsereturn false
        if (other.getRegistering() == null ^ this.getRegistering() == nullreturn false;
        if (other.getRegistering() != null && other.getRegistering().equals(this.getRegistering()) == falsereturn false
        if (other.getRequested() == null ^ this.getRequested() == nullreturn false;
        if (other.getRequested() != null && other.getRequested().equals(this.getRequested()) == falsereturn false
        if (other.getRunningSetup() == null ^ this.getRunningSetup() == nullreturn false;
        if (other.getRunningSetup() != null && other.getRunningSetup().equals(this.getRunningSetup()) == falsereturn false
        if (other.getSetupFailed() == null ^ this.getSetupFailed() == nullreturn false;
        if (other.getSetupFailed() != null && other.getSetupFailed().equals(this.getSetupFailed()) == falsereturn false
        if (other.getShuttingDown() == null ^ this.getShuttingDown() == nullreturn false;
        if (other.getShuttingDown() != null && other.getShuttingDown().equals(this.getShuttingDown()) == falsereturn false
        if (other.getStartFailed() == null ^ this.getStartFailed() == nullreturn false;
        if (other.getStartFailed() != null && other.getStartFailed().equals(this.getStartFailed()) == falsereturn false
        if (other.getStopped() == null ^ this.getStopped() == nullreturn false;
        if (other.getStopped() != null && other.getStopped().equals(this.getStopped()) == falsereturn false
        if (other.getStopping() == null ^ this.getStopping() == nullreturn false;
        if (other.getStopping() != null && other.getStopping().equals(this.getStopping()) == falsereturn false
        if (other.getTerminated() == null ^ this.getTerminated() == nullreturn false;
        if (other.getTerminated() != null && other.getTerminated().equals(this.getTerminated()) == falsereturn false
        if (other.getTerminating() == null ^ this.getTerminating() == nullreturn false;
        if (other.getTerminating() != null && other.getTerminating().equals(this.getTerminating()) == falsereturn false
        if (other.getUnassigning() == null ^ this.getUnassigning() == nullreturn false;
        if (other.getUnassigning() != null && other.getUnassigning().equals(this.getUnassigning()) == falsereturn false
        return true;
    }
    
    @Override
    public InstancesCount clone() {
        try {
            return (InstancesCountsuper.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