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

com.amazonaws.services.opsworks.model.StackSummary 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;

/**
 * 

* Summarizes the number of layers, instances, and apps in a stack. *

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

* The stack ID. *

*/ private String stackId; /** *

* The stack name. *

*/ private String name; /** *

* The stack's ARN. *

*/ private String arn; /** *

* The number of layers. *

*/ private Integer layersCount; /** *

* The number of apps. *

*/ private Integer appsCount; /** *

* An InstancesCount object with the number of instances in * each status. *

*/ private InstancesCount instancesCount; /** *

* The stack ID. *

* * @param stackId * The stack ID. */ public void setStackId(String stackId) { this.stackId = stackId; } /** *

* The stack ID. *

* * @return The stack ID. */ public String getStackId() { return this.stackId; } /** *

* The stack ID. *

* * @param stackId * The stack ID. * @return Returns a reference to this object so that method calls can be * chained together. */ public StackSummary withStackId(String stackId) { setStackId(stackId); return this; } /** *

* The stack name. *

* * @param name * The stack name. */ public void setName(String name) { this.name = name; } /** *

* The stack name. *

* * @return The stack name. */ public String getName() { return this.name; } /** *

* The stack name. *

* * @param name * The stack name. * @return Returns a reference to this object so that method calls can be * chained together. */ public StackSummary withName(String name) { setName(name); return this; } /** *

* The stack's ARN. *

* * @param arn * The stack's ARN. */ public void setArn(String arn) { this.arn = arn; } /** *

* The stack's ARN. *

* * @return The stack's ARN. */ public String getArn() { return this.arn; } /** *

* The stack's ARN. *

* * @param arn * The stack's ARN. * @return Returns a reference to this object so that method calls can be * chained together. */ public StackSummary withArn(String arn) { setArn(arn); return this; } /** *

* The number of layers. *

* * @param layersCount * The number of layers. */ public void setLayersCount(Integer layersCount) { this.layersCount = layersCount; } /** *

* The number of layers. *

* * @return The number of layers. */ public Integer getLayersCount() { return this.layersCount; } /** *

* The number of layers. *

* * @param layersCount * The number of layers. * @return Returns a reference to this object so that method calls can be * chained together. */ public StackSummary withLayersCount(Integer layersCount) { setLayersCount(layersCount); return this; } /** *

* The number of apps. *

* * @param appsCount * The number of apps. */ public void setAppsCount(Integer appsCount) { this.appsCount = appsCount; } /** *

* The number of apps. *

* * @return The number of apps. */ public Integer getAppsCount() { return this.appsCount; } /** *

* The number of apps. *

* * @param appsCount * The number of apps. * @return Returns a reference to this object so that method calls can be * chained together. */ public StackSummary withAppsCount(Integer appsCount) { setAppsCount(appsCount); return this; } /** *

* An InstancesCount object with the number of instances in * each status. *

* * @param instancesCount * An InstancesCount object with the number of instances * in each status. */ public void setInstancesCount(InstancesCount instancesCount) { this.instancesCount = instancesCount; } /** *

* An InstancesCount object with the number of instances in * each status. *

* * @return An InstancesCount object with the number of * instances in each status. */ public InstancesCount getInstancesCount() { return this.instancesCount; } /** *

* An InstancesCount object with the number of instances in * each status. *

* * @param instancesCount * An InstancesCount object with the number of instances * in each status. * @return Returns a reference to this object so that method calls can be * chained together. */ public StackSummary withInstancesCount(InstancesCount instancesCount) { setInstancesCount(instancesCount); 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 (getStackId() != null) sb.append("StackId: " + getStackId() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getArn() != null) sb.append("Arn: " + getArn() + ","); if (getLayersCount() != null) sb.append("LayersCount: " + getLayersCount() + ","); if (getAppsCount() != null) sb.append("AppsCount: " + getAppsCount() + ","); if (getInstancesCount() != null) sb.append("InstancesCount: " + getInstancesCount()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StackSummary == false) return false; StackSummary other = (StackSummary) obj; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getLayersCount() == null ^ this.getLayersCount() == null) return false; if (other.getLayersCount() != null && other.getLayersCount().equals(this.getLayersCount()) == false) return false; if (other.getAppsCount() == null ^ this.getAppsCount() == null) return false; if (other.getAppsCount() != null && other.getAppsCount().equals(this.getAppsCount()) == false) return false; if (other.getInstancesCount() == null ^ this.getInstancesCount() == null) return false; if (other.getInstancesCount() != null && other.getInstancesCount().equals(this.getInstancesCount()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getLayersCount() == null) ? 0 : getLayersCount().hashCode()); hashCode = prime * hashCode + ((getAppsCount() == null) ? 0 : getAppsCount().hashCode()); hashCode = prime * hashCode + ((getInstancesCount() == null) ? 0 : getInstancesCount() .hashCode()); return hashCode; } @Override public StackSummary clone() { try { return (StackSummary) 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