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

com.amazonaws.services.elasticbeanstalk.model.EnvironmentResourceDescription 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.elasticbeanstalk.model;

import java.io.Serializable;

/**
 * 

* Describes the AWS resources in use by this environment. This data is live. *

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

* The name of the environment. *

*/ private String environmentName; /** *

* The AutoScalingGroups used by this environment. *

*/ private com.amazonaws.internal.SdkInternalList autoScalingGroups; /** *

* The Amazon EC2 instances used by this environment. *

*/ private com.amazonaws.internal.SdkInternalList instances; /** *

* The Auto Scaling launch configurations in use by this environment. *

*/ private com.amazonaws.internal.SdkInternalList launchConfigurations; /** *

* The LoadBalancers in use by this environment. *

*/ private com.amazonaws.internal.SdkInternalList loadBalancers; /** *

* The AutoScaling triggers in use by this environment. *

*/ private com.amazonaws.internal.SdkInternalList triggers; /** *

* The queues used by this environment. *

*/ private com.amazonaws.internal.SdkInternalList queues; /** *

* The name of the environment. *

* * @param environmentName * The name of the environment. */ public void setEnvironmentName(String environmentName) { this.environmentName = environmentName; } /** *

* The name of the environment. *

* * @return The name of the environment. */ public String getEnvironmentName() { return this.environmentName; } /** *

* The name of the environment. *

* * @param environmentName * The name of the environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withEnvironmentName( String environmentName) { setEnvironmentName(environmentName); return this; } /** *

* The AutoScalingGroups used by this environment. *

* * @return The AutoScalingGroups used by this environment. */ public java.util.List getAutoScalingGroups() { if (autoScalingGroups == null) { autoScalingGroups = new com.amazonaws.internal.SdkInternalList(); } return autoScalingGroups; } /** *

* The AutoScalingGroups used by this environment. *

* * @param autoScalingGroups * The AutoScalingGroups used by this environment. */ public void setAutoScalingGroups( java.util.Collection autoScalingGroups) { if (autoScalingGroups == null) { this.autoScalingGroups = null; return; } this.autoScalingGroups = new com.amazonaws.internal.SdkInternalList( autoScalingGroups); } /** *

* The AutoScalingGroups used by this environment. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setAutoScalingGroups(java.util.Collection)} or * {@link #withAutoScalingGroups(java.util.Collection)} if you want to * override the existing values. *

* * @param autoScalingGroups * The AutoScalingGroups used by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withAutoScalingGroups( AutoScalingGroup... autoScalingGroups) { if (this.autoScalingGroups == null) { setAutoScalingGroups(new com.amazonaws.internal.SdkInternalList( autoScalingGroups.length)); } for (AutoScalingGroup ele : autoScalingGroups) { this.autoScalingGroups.add(ele); } return this; } /** *

* The AutoScalingGroups used by this environment. *

* * @param autoScalingGroups * The AutoScalingGroups used by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withAutoScalingGroups( java.util.Collection autoScalingGroups) { setAutoScalingGroups(autoScalingGroups); return this; } /** *

* The Amazon EC2 instances used by this environment. *

* * @return The Amazon EC2 instances used by this environment. */ public java.util.List getInstances() { if (instances == null) { instances = new com.amazonaws.internal.SdkInternalList(); } return instances; } /** *

* The Amazon EC2 instances used by this environment. *

* * @param instances * The Amazon EC2 instances used by this environment. */ public void setInstances(java.util.Collection instances) { if (instances == null) { this.instances = null; return; } this.instances = new com.amazonaws.internal.SdkInternalList( instances); } /** *

* The Amazon EC2 instances used by this environment. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setInstances(java.util.Collection)} or * {@link #withInstances(java.util.Collection)} if you want to override the * existing values. *

* * @param instances * The Amazon EC2 instances used by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList( instances.length)); } for (Instance ele : instances) { this.instances.add(ele); } return this; } /** *

* The Amazon EC2 instances used by this environment. *

* * @param instances * The Amazon EC2 instances used by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withInstances( java.util.Collection instances) { setInstances(instances); return this; } /** *

* The Auto Scaling launch configurations in use by this environment. *

* * @return The Auto Scaling launch configurations in use by this * environment. */ public java.util.List getLaunchConfigurations() { if (launchConfigurations == null) { launchConfigurations = new com.amazonaws.internal.SdkInternalList(); } return launchConfigurations; } /** *

* The Auto Scaling launch configurations in use by this environment. *

* * @param launchConfigurations * The Auto Scaling launch configurations in use by this environment. */ public void setLaunchConfigurations( java.util.Collection launchConfigurations) { if (launchConfigurations == null) { this.launchConfigurations = null; return; } this.launchConfigurations = new com.amazonaws.internal.SdkInternalList( launchConfigurations); } /** *

* The Auto Scaling launch configurations in use by this environment. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setLaunchConfigurations(java.util.Collection)} or * {@link #withLaunchConfigurations(java.util.Collection)} if you want to * override the existing values. *

* * @param launchConfigurations * The Auto Scaling launch configurations in use by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withLaunchConfigurations( LaunchConfiguration... launchConfigurations) { if (this.launchConfigurations == null) { setLaunchConfigurations(new com.amazonaws.internal.SdkInternalList( launchConfigurations.length)); } for (LaunchConfiguration ele : launchConfigurations) { this.launchConfigurations.add(ele); } return this; } /** *

* The Auto Scaling launch configurations in use by this environment. *

* * @param launchConfigurations * The Auto Scaling launch configurations in use by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withLaunchConfigurations( java.util.Collection launchConfigurations) { setLaunchConfigurations(launchConfigurations); return this; } /** *

* The LoadBalancers in use by this environment. *

* * @return The LoadBalancers in use by this environment. */ public java.util.List getLoadBalancers() { if (loadBalancers == null) { loadBalancers = new com.amazonaws.internal.SdkInternalList(); } return loadBalancers; } /** *

* The LoadBalancers in use by this environment. *

* * @param loadBalancers * The LoadBalancers in use by this environment. */ public void setLoadBalancers( java.util.Collection loadBalancers) { if (loadBalancers == null) { this.loadBalancers = null; return; } this.loadBalancers = new com.amazonaws.internal.SdkInternalList( loadBalancers); } /** *

* The LoadBalancers in use by this environment. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setLoadBalancers(java.util.Collection)} or * {@link #withLoadBalancers(java.util.Collection)} if you want to override * the existing values. *

* * @param loadBalancers * The LoadBalancers in use by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withLoadBalancers( LoadBalancer... loadBalancers) { if (this.loadBalancers == null) { setLoadBalancers(new com.amazonaws.internal.SdkInternalList( loadBalancers.length)); } for (LoadBalancer ele : loadBalancers) { this.loadBalancers.add(ele); } return this; } /** *

* The LoadBalancers in use by this environment. *

* * @param loadBalancers * The LoadBalancers in use by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withLoadBalancers( java.util.Collection loadBalancers) { setLoadBalancers(loadBalancers); return this; } /** *

* The AutoScaling triggers in use by this environment. *

* * @return The AutoScaling triggers in use by this environment. */ public java.util.List getTriggers() { if (triggers == null) { triggers = new com.amazonaws.internal.SdkInternalList(); } return triggers; } /** *

* The AutoScaling triggers in use by this environment. *

* * @param triggers * The AutoScaling triggers in use by this environment. */ public void setTriggers(java.util.Collection triggers) { if (triggers == null) { this.triggers = null; return; } this.triggers = new com.amazonaws.internal.SdkInternalList( triggers); } /** *

* The AutoScaling triggers in use by this environment. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setTriggers(java.util.Collection)} or * {@link #withTriggers(java.util.Collection)} if you want to override the * existing values. *

* * @param triggers * The AutoScaling triggers in use by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withTriggers(Trigger... triggers) { if (this.triggers == null) { setTriggers(new com.amazonaws.internal.SdkInternalList( triggers.length)); } for (Trigger ele : triggers) { this.triggers.add(ele); } return this; } /** *

* The AutoScaling triggers in use by this environment. *

* * @param triggers * The AutoScaling triggers in use by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withTriggers( java.util.Collection triggers) { setTriggers(triggers); return this; } /** *

* The queues used by this environment. *

* * @return The queues used by this environment. */ public java.util.List getQueues() { if (queues == null) { queues = new com.amazonaws.internal.SdkInternalList(); } return queues; } /** *

* The queues used by this environment. *

* * @param queues * The queues used by this environment. */ public void setQueues(java.util.Collection queues) { if (queues == null) { this.queues = null; return; } this.queues = new com.amazonaws.internal.SdkInternalList(queues); } /** *

* The queues used by this environment. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setQueues(java.util.Collection)} or * {@link #withQueues(java.util.Collection)} if you want to override the * existing values. *

* * @param queues * The queues used by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withQueues(Queue... queues) { if (this.queues == null) { setQueues(new com.amazonaws.internal.SdkInternalList( queues.length)); } for (Queue ele : queues) { this.queues.add(ele); } return this; } /** *

* The queues used by this environment. *

* * @param queues * The queues used by this environment. * @return Returns a reference to this object so that method calls can be * chained together. */ public EnvironmentResourceDescription withQueues( java.util.Collection queues) { setQueues(queues); 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 (getEnvironmentName() != null) sb.append("EnvironmentName: " + getEnvironmentName() + ","); if (getAutoScalingGroups() != null) sb.append("AutoScalingGroups: " + getAutoScalingGroups() + ","); if (getInstances() != null) sb.append("Instances: " + getInstances() + ","); if (getLaunchConfigurations() != null) sb.append("LaunchConfigurations: " + getLaunchConfigurations() + ","); if (getLoadBalancers() != null) sb.append("LoadBalancers: " + getLoadBalancers() + ","); if (getTriggers() != null) sb.append("Triggers: " + getTriggers() + ","); if (getQueues() != null) sb.append("Queues: " + getQueues()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EnvironmentResourceDescription == false) return false; EnvironmentResourceDescription other = (EnvironmentResourceDescription) obj; if (other.getEnvironmentName() == null ^ this.getEnvironmentName() == null) return false; if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == false) return false; if (other.getAutoScalingGroups() == null ^ this.getAutoScalingGroups() == null) return false; if (other.getAutoScalingGroups() != null && other.getAutoScalingGroups().equals( this.getAutoScalingGroups()) == false) return false; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; if (other.getLaunchConfigurations() == null ^ this.getLaunchConfigurations() == null) return false; if (other.getLaunchConfigurations() != null && other.getLaunchConfigurations().equals( this.getLaunchConfigurations()) == false) return false; if (other.getLoadBalancers() == null ^ this.getLoadBalancers() == null) return false; if (other.getLoadBalancers() != null && other.getLoadBalancers().equals(this.getLoadBalancers()) == false) return false; if (other.getTriggers() == null ^ this.getTriggers() == null) return false; if (other.getTriggers() != null && other.getTriggers().equals(this.getTriggers()) == false) return false; if (other.getQueues() == null ^ this.getQueues() == null) return false; if (other.getQueues() != null && other.getQueues().equals(this.getQueues()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnvironmentName() == null) ? 0 : getEnvironmentName() .hashCode()); hashCode = prime * hashCode + ((getAutoScalingGroups() == null) ? 0 : getAutoScalingGroups().hashCode()); hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); hashCode = prime * hashCode + ((getLaunchConfigurations() == null) ? 0 : getLaunchConfigurations().hashCode()); hashCode = prime * hashCode + ((getLoadBalancers() == null) ? 0 : getLoadBalancers() .hashCode()); hashCode = prime * hashCode + ((getTriggers() == null) ? 0 : getTriggers().hashCode()); hashCode = prime * hashCode + ((getQueues() == null) ? 0 : getQueues().hashCode()); return hashCode; } @Override public EnvironmentResourceDescription clone() { try { return (EnvironmentResourceDescription) 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