All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.opsworks.model.InstancesCount Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

import java.io.Serializable;

/**
 * 

* Describes how many instances a stack has for each status. *

*/ public class InstancesCount implements Serializable, Cloneable { /** *

* 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. *

* * @param assigning * The number of instances in the Assigning state. */ public void setAssigning(Integer assigning) { this.assigning = assigning; } /** *

* The number of instances in the Assigning state. *

* * @return The number of instances in the Assigning state. */ public Integer getAssigning() { return this.assigning; } /** *

* The number of instances in the Assigning state. *

* * @param assigning * The number of instances in the Assigning state. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withAssigning(Integer assigning) { setAssigning(assigning); return this; } /** *

* The number of instances with booting status. *

* * @param booting * The number of instances with booting status. */ public void setBooting(Integer booting) { this.booting = booting; } /** *

* The number of instances with booting status. *

* * @return The number of instances with booting status. */ public Integer getBooting() { return this.booting; } /** *

* The number of instances with booting status. *

* * @param booting * The number of instances with booting status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withBooting(Integer booting) { setBooting(booting); return this; } /** *

* The number of instances with connection_lost status. *

* * @param connectionLost * The number of instances with connection_lost status. */ public void setConnectionLost(Integer connectionLost) { this.connectionLost = connectionLost; } /** *

* The number of instances with connection_lost status. *

* * @return The number of instances with connection_lost status. */ public Integer getConnectionLost() { return this.connectionLost; } /** *

* The number of instances with connection_lost status. *

* * @param connectionLost * The number of instances with connection_lost status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withConnectionLost(Integer connectionLost) { setConnectionLost(connectionLost); return this; } /** *

* The number of instances in the Deregistering state. *

* * @param deregistering * The number of instances in the Deregistering state. */ public void setDeregistering(Integer deregistering) { this.deregistering = deregistering; } /** *

* The number of instances in the Deregistering state. *

* * @return The number of instances in the Deregistering state. */ public Integer getDeregistering() { return this.deregistering; } /** *

* The number of instances in the Deregistering state. *

* * @param deregistering * The number of instances in the Deregistering state. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withDeregistering(Integer deregistering) { setDeregistering(deregistering); return this; } /** *

* The number of instances with online status. *

* * @param online * The number of instances with online status. */ public void setOnline(Integer online) { this.online = online; } /** *

* The number of instances with online status. *

* * @return The number of instances with online status. */ public Integer getOnline() { return this.online; } /** *

* The number of instances with online status. *

* * @param online * The number of instances with online status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withOnline(Integer online) { setOnline(online); return this; } /** *

* The number of instances with pending status. *

* * @param pending * The number of instances with pending status. */ public void setPending(Integer pending) { this.pending = pending; } /** *

* The number of instances with pending status. *

* * @return The number of instances with pending status. */ public Integer getPending() { return this.pending; } /** *

* The number of instances with pending status. *

* * @param pending * The number of instances with pending status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withPending(Integer pending) { setPending(pending); return this; } /** *

* The number of instances with rebooting status. *

* * @param rebooting * The number of instances with rebooting status. */ public void setRebooting(Integer rebooting) { this.rebooting = rebooting; } /** *

* The number of instances with rebooting status. *

* * @return The number of instances with rebooting status. */ public Integer getRebooting() { return this.rebooting; } /** *

* The number of instances with rebooting status. *

* * @param rebooting * The number of instances with rebooting status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withRebooting(Integer rebooting) { setRebooting(rebooting); return this; } /** *

* The number of instances in the Registered state. *

* * @param registered * The number of instances in the Registered state. */ public void setRegistered(Integer registered) { this.registered = registered; } /** *

* The number of instances in the Registered state. *

* * @return The number of instances in the Registered state. */ public Integer getRegistered() { return this.registered; } /** *

* The number of instances in the Registered state. *

* * @param registered * The number of instances in the Registered state. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withRegistered(Integer registered) { setRegistered(registered); return this; } /** *

* The number of instances in the Registering state. *

* * @param registering * The number of instances in the Registering state. */ public void setRegistering(Integer registering) { this.registering = registering; } /** *

* The number of instances in the Registering state. *

* * @return The number of instances in the Registering state. */ public Integer getRegistering() { return this.registering; } /** *

* The number of instances in the Registering state. *

* * @param registering * The number of instances in the Registering state. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withRegistering(Integer registering) { setRegistering(registering); return this; } /** *

* The number of instances with requested status. *

* * @param requested * The number of instances with requested status. */ public void setRequested(Integer requested) { this.requested = requested; } /** *

* The number of instances with requested status. *

* * @return The number of instances with requested status. */ public Integer getRequested() { return this.requested; } /** *

* The number of instances with requested status. *

* * @param requested * The number of instances with requested status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withRequested(Integer requested) { setRequested(requested); return this; } /** *

* The number of instances with running_setup status. *

* * @param runningSetup * The number of instances with running_setup status. */ public void setRunningSetup(Integer runningSetup) { this.runningSetup = runningSetup; } /** *

* The number of instances with running_setup status. *

* * @return The number of instances with running_setup status. */ public Integer getRunningSetup() { return this.runningSetup; } /** *

* The number of instances with running_setup status. *

* * @param runningSetup * The number of instances with running_setup status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withRunningSetup(Integer runningSetup) { setRunningSetup(runningSetup); return this; } /** *

* The number of instances with setup_failed status. *

* * @param setupFailed * The number of instances with setup_failed status. */ public void setSetupFailed(Integer setupFailed) { this.setupFailed = setupFailed; } /** *

* The number of instances with setup_failed status. *

* * @return The number of instances with setup_failed status. */ public Integer getSetupFailed() { return this.setupFailed; } /** *

* The number of instances with setup_failed status. *

* * @param setupFailed * The number of instances with setup_failed status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withSetupFailed(Integer setupFailed) { setSetupFailed(setupFailed); return this; } /** *

* The number of instances with shutting_down status. *

* * @param shuttingDown * The number of instances with shutting_down status. */ public void setShuttingDown(Integer shuttingDown) { this.shuttingDown = shuttingDown; } /** *

* The number of instances with shutting_down status. *

* * @return The number of instances with shutting_down status. */ public Integer getShuttingDown() { return this.shuttingDown; } /** *

* The number of instances with shutting_down status. *

* * @param shuttingDown * The number of instances with shutting_down status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withShuttingDown(Integer shuttingDown) { setShuttingDown(shuttingDown); return this; } /** *

* The number of instances with start_failed status. *

* * @param startFailed * The number of instances with start_failed status. */ public void setStartFailed(Integer startFailed) { this.startFailed = startFailed; } /** *

* The number of instances with start_failed status. *

* * @return The number of instances with start_failed status. */ public Integer getStartFailed() { return this.startFailed; } /** *

* The number of instances with start_failed status. *

* * @param startFailed * The number of instances with start_failed status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withStartFailed(Integer startFailed) { setStartFailed(startFailed); return this; } /** *

* The number of instances with stopped status. *

* * @param stopped * The number of instances with stopped status. */ public void setStopped(Integer stopped) { this.stopped = stopped; } /** *

* The number of instances with stopped status. *

* * @return The number of instances with stopped status. */ public Integer getStopped() { return this.stopped; } /** *

* The number of instances with stopped status. *

* * @param stopped * The number of instances with stopped status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withStopped(Integer stopped) { setStopped(stopped); return this; } /** *

* The number of instances with stopping status. *

* * @param stopping * The number of instances with stopping status. */ public void setStopping(Integer stopping) { this.stopping = stopping; } /** *

* The number of instances with stopping status. *

* * @return The number of instances with stopping status. */ public Integer getStopping() { return this.stopping; } /** *

* The number of instances with stopping status. *

* * @param stopping * The number of instances with stopping status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withStopping(Integer stopping) { setStopping(stopping); return this; } /** *

* The number of instances with terminated status. *

* * @param terminated * The number of instances with terminated status. */ public void setTerminated(Integer terminated) { this.terminated = terminated; } /** *

* The number of instances with terminated status. *

* * @return The number of instances with terminated status. */ public Integer getTerminated() { return this.terminated; } /** *

* The number of instances with terminated status. *

* * @param terminated * The number of instances with terminated status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withTerminated(Integer terminated) { setTerminated(terminated); return this; } /** *

* The number of instances with terminating status. *

* * @param terminating * The number of instances with terminating status. */ public void setTerminating(Integer terminating) { this.terminating = terminating; } /** *

* The number of instances with terminating status. *

* * @return The number of instances with terminating status. */ public Integer getTerminating() { return this.terminating; } /** *

* The number of instances with terminating status. *

* * @param terminating * The number of instances with terminating status. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withTerminating(Integer terminating) { setTerminating(terminating); return this; } /** *

* The number of instances in the Unassigning state. *

* * @param unassigning * The number of instances in the Unassigning state. */ public void setUnassigning(Integer unassigning) { this.unassigning = unassigning; } /** *

* The number of instances in the Unassigning state. *

* * @return The number of instances in the Unassigning state. */ public Integer getUnassigning() { return this.unassigning; } /** *

* The number of instances in the Unassigning state. *

* * @param unassigning * The number of instances in the Unassigning state. * @return Returns a reference to this object so that method calls can be * chained together. */ public InstancesCount withUnassigning(Integer unassigning) { setUnassigning(unassigning); 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 (getAssigning() != null) sb.append("Assigning: " + getAssigning() + ","); if (getBooting() != null) sb.append("Booting: " + getBooting() + ","); if (getConnectionLost() != null) sb.append("ConnectionLost: " + getConnectionLost() + ","); if (getDeregistering() != null) sb.append("Deregistering: " + getDeregistering() + ","); if (getOnline() != null) sb.append("Online: " + getOnline() + ","); if (getPending() != null) sb.append("Pending: " + getPending() + ","); if (getRebooting() != null) sb.append("Rebooting: " + getRebooting() + ","); if (getRegistered() != null) sb.append("Registered: " + getRegistered() + ","); if (getRegistering() != null) sb.append("Registering: " + getRegistering() + ","); if (getRequested() != null) sb.append("Requested: " + getRequested() + ","); if (getRunningSetup() != null) sb.append("RunningSetup: " + getRunningSetup() + ","); if (getSetupFailed() != null) sb.append("SetupFailed: " + getSetupFailed() + ","); if (getShuttingDown() != null) sb.append("ShuttingDown: " + getShuttingDown() + ","); if (getStartFailed() != null) sb.append("StartFailed: " + getStartFailed() + ","); if (getStopped() != null) sb.append("Stopped: " + getStopped() + ","); if (getStopping() != null) sb.append("Stopping: " + getStopping() + ","); if (getTerminated() != null) sb.append("Terminated: " + getTerminated() + ","); if (getTerminating() != null) sb.append("Terminating: " + getTerminating() + ","); if (getUnassigning() != null) sb.append("Unassigning: " + getUnassigning()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstancesCount == false) return false; InstancesCount other = (InstancesCount) obj; if (other.getAssigning() == null ^ this.getAssigning() == null) return false; if (other.getAssigning() != null && other.getAssigning().equals(this.getAssigning()) == false) return false; if (other.getBooting() == null ^ this.getBooting() == null) return false; if (other.getBooting() != null && other.getBooting().equals(this.getBooting()) == false) return false; if (other.getConnectionLost() == null ^ this.getConnectionLost() == null) return false; if (other.getConnectionLost() != null && other.getConnectionLost().equals(this.getConnectionLost()) == false) return false; if (other.getDeregistering() == null ^ this.getDeregistering() == null) return false; if (other.getDeregistering() != null && other.getDeregistering().equals(this.getDeregistering()) == false) return false; if (other.getOnline() == null ^ this.getOnline() == null) return false; if (other.getOnline() != null && other.getOnline().equals(this.getOnline()) == false) return false; if (other.getPending() == null ^ this.getPending() == null) return false; if (other.getPending() != null && other.getPending().equals(this.getPending()) == false) return false; if (other.getRebooting() == null ^ this.getRebooting() == null) return false; if (other.getRebooting() != null && other.getRebooting().equals(this.getRebooting()) == false) return false; if (other.getRegistered() == null ^ this.getRegistered() == null) return false; if (other.getRegistered() != null && other.getRegistered().equals(this.getRegistered()) == false) return false; if (other.getRegistering() == null ^ this.getRegistering() == null) return false; if (other.getRegistering() != null && other.getRegistering().equals(this.getRegistering()) == false) return false; if (other.getRequested() == null ^ this.getRequested() == null) return false; if (other.getRequested() != null && other.getRequested().equals(this.getRequested()) == false) return false; if (other.getRunningSetup() == null ^ this.getRunningSetup() == null) return false; if (other.getRunningSetup() != null && other.getRunningSetup().equals(this.getRunningSetup()) == false) return false; if (other.getSetupFailed() == null ^ this.getSetupFailed() == null) return false; if (other.getSetupFailed() != null && other.getSetupFailed().equals(this.getSetupFailed()) == false) return false; if (other.getShuttingDown() == null ^ this.getShuttingDown() == null) return false; if (other.getShuttingDown() != null && other.getShuttingDown().equals(this.getShuttingDown()) == false) return false; if (other.getStartFailed() == null ^ this.getStartFailed() == null) return false; if (other.getStartFailed() != null && other.getStartFailed().equals(this.getStartFailed()) == false) return false; if (other.getStopped() == null ^ this.getStopped() == null) return false; if (other.getStopped() != null && other.getStopped().equals(this.getStopped()) == false) return false; if (other.getStopping() == null ^ this.getStopping() == null) return false; if (other.getStopping() != null && other.getStopping().equals(this.getStopping()) == false) return false; if (other.getTerminated() == null ^ this.getTerminated() == null) return false; if (other.getTerminated() != null && other.getTerminated().equals(this.getTerminated()) == false) return false; if (other.getTerminating() == null ^ this.getTerminating() == null) return false; if (other.getTerminating() != null && other.getTerminating().equals(this.getTerminating()) == false) return false; if (other.getUnassigning() == null ^ this.getUnassigning() == null) return false; if (other.getUnassigning() != null && other.getUnassigning().equals(this.getUnassigning()) == false) return false; return true; } @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 InstancesCount clone() { try { return (InstancesCount) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy