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 Java SDK for AWS Elastic Beanstalk module holds the client classes that are used for communicating with AWS Elastic Beanstalk Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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;
import javax.annotation.Generated;

/**
 * 

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

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") 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 Amazon EC2 launch templates in use by this environment. *

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

* 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 Amazon EC2 launch templates in use by this environment. *

* * @return The Amazon EC2 launch templates in use by this environment. */ public java.util.List getLaunchTemplates() { if (launchTemplates == null) { launchTemplates = new com.amazonaws.internal.SdkInternalList(); } return launchTemplates; } /** *

* The Amazon EC2 launch templates in use by this environment. *

* * @param launchTemplates * The Amazon EC2 launch templates in use by this environment. */ public void setLaunchTemplates(java.util.Collection launchTemplates) { if (launchTemplates == null) { this.launchTemplates = null; return; } this.launchTemplates = new com.amazonaws.internal.SdkInternalList(launchTemplates); } /** *

* The Amazon EC2 launch templates in use by this environment. *

*

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

* * @param launchTemplates * The Amazon EC2 launch templates in use by this environment. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentResourceDescription withLaunchTemplates(LaunchTemplate... launchTemplates) { if (this.launchTemplates == null) { setLaunchTemplates(new com.amazonaws.internal.SdkInternalList(launchTemplates.length)); } for (LaunchTemplate ele : launchTemplates) { this.launchTemplates.add(ele); } return this; } /** *

* The Amazon EC2 launch templates in use by this environment. *

* * @param launchTemplates * The Amazon EC2 launch templates in use by this environment. * @return Returns a reference to this object so that method calls can be chained together. */ public EnvironmentResourceDescription withLaunchTemplates(java.util.Collection launchTemplates) { setLaunchTemplates(launchTemplates); 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. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @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: ").append(getEnvironmentName()).append(","); if (getAutoScalingGroups() != null) sb.append("AutoScalingGroups: ").append(getAutoScalingGroups()).append(","); if (getInstances() != null) sb.append("Instances: ").append(getInstances()).append(","); if (getLaunchConfigurations() != null) sb.append("LaunchConfigurations: ").append(getLaunchConfigurations()).append(","); if (getLaunchTemplates() != null) sb.append("LaunchTemplates: ").append(getLaunchTemplates()).append(","); if (getLoadBalancers() != null) sb.append("LoadBalancers: ").append(getLoadBalancers()).append(","); if (getTriggers() != null) sb.append("Triggers: ").append(getTriggers()).append(","); if (getQueues() != null) sb.append("Queues: ").append(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.getLaunchTemplates() == null ^ this.getLaunchTemplates() == null) return false; if (other.getLaunchTemplates() != null && other.getLaunchTemplates().equals(this.getLaunchTemplates()) == 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 + ((getLaunchTemplates() == null) ? 0 : getLaunchTemplates().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