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

com.amazonaws.services.elasticbeanstalk.model.DescribeEnvironmentHealthRequest 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 2017-2022 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;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* See the example below to learn how to create a request body. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeEnvironmentHealthRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Specify the environment by name. *

*

* You must specify either this or an EnvironmentName, or both. *

*/ private String environmentName; /** *

* Specify the environment by ID. *

*

* You must specify either this or an EnvironmentName, or both. *

*/ private String environmentId; /** *

* Specify the response elements to return. To retrieve all attributes, set to All. If no attribute * names are specified, returns the name of the environment. *

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

* Specify the environment by name. *

*

* You must specify either this or an EnvironmentName, or both. *

* * @param environmentName * Specify the environment by name.

*

* You must specify either this or an EnvironmentName, or both. */ public void setEnvironmentName(String environmentName) { this.environmentName = environmentName; } /** *

* Specify the environment by name. *

*

* You must specify either this or an EnvironmentName, or both. *

* * @return Specify the environment by name.

*

* You must specify either this or an EnvironmentName, or both. */ public String getEnvironmentName() { return this.environmentName; } /** *

* Specify the environment by name. *

*

* You must specify either this or an EnvironmentName, or both. *

* * @param environmentName * Specify the environment by name.

*

* You must specify either this or an EnvironmentName, or both. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeEnvironmentHealthRequest withEnvironmentName(String environmentName) { setEnvironmentName(environmentName); return this; } /** *

* Specify the environment by ID. *

*

* You must specify either this or an EnvironmentName, or both. *

* * @param environmentId * Specify the environment by ID.

*

* You must specify either this or an EnvironmentName, or both. */ public void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } /** *

* Specify the environment by ID. *

*

* You must specify either this or an EnvironmentName, or both. *

* * @return Specify the environment by ID.

*

* You must specify either this or an EnvironmentName, or both. */ public String getEnvironmentId() { return this.environmentId; } /** *

* Specify the environment by ID. *

*

* You must specify either this or an EnvironmentName, or both. *

* * @param environmentId * Specify the environment by ID.

*

* You must specify either this or an EnvironmentName, or both. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeEnvironmentHealthRequest withEnvironmentId(String environmentId) { setEnvironmentId(environmentId); return this; } /** *

* Specify the response elements to return. To retrieve all attributes, set to All. If no attribute * names are specified, returns the name of the environment. *

* * @return Specify the response elements to return. To retrieve all attributes, set to All. If no * attribute names are specified, returns the name of the environment. * @see EnvironmentHealthAttribute */ public java.util.List getAttributeNames() { if (attributeNames == null) { attributeNames = new com.amazonaws.internal.SdkInternalList(); } return attributeNames; } /** *

* Specify the response elements to return. To retrieve all attributes, set to All. If no attribute * names are specified, returns the name of the environment. *

* * @param attributeNames * Specify the response elements to return. To retrieve all attributes, set to All. If no * attribute names are specified, returns the name of the environment. * @see EnvironmentHealthAttribute */ public void setAttributeNames(java.util.Collection attributeNames) { if (attributeNames == null) { this.attributeNames = null; return; } this.attributeNames = new com.amazonaws.internal.SdkInternalList(attributeNames); } /** *

* Specify the response elements to return. To retrieve all attributes, set to All. If no attribute * names are specified, returns the name of the environment. *

*

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

* * @param attributeNames * Specify the response elements to return. To retrieve all attributes, set to All. If no * attribute names are specified, returns the name of the environment. * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentHealthAttribute */ public DescribeEnvironmentHealthRequest withAttributeNames(String... attributeNames) { if (this.attributeNames == null) { setAttributeNames(new com.amazonaws.internal.SdkInternalList(attributeNames.length)); } for (String ele : attributeNames) { this.attributeNames.add(ele); } return this; } /** *

* Specify the response elements to return. To retrieve all attributes, set to All. If no attribute * names are specified, returns the name of the environment. *

* * @param attributeNames * Specify the response elements to return. To retrieve all attributes, set to All. If no * attribute names are specified, returns the name of the environment. * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentHealthAttribute */ public DescribeEnvironmentHealthRequest withAttributeNames(java.util.Collection attributeNames) { setAttributeNames(attributeNames); return this; } /** *

* Specify the response elements to return. To retrieve all attributes, set to All. If no attribute * names are specified, returns the name of the environment. *

* * @param attributeNames * Specify the response elements to return. To retrieve all attributes, set to All. If no * attribute names are specified, returns the name of the environment. * @return Returns a reference to this object so that method calls can be chained together. * @see EnvironmentHealthAttribute */ public DescribeEnvironmentHealthRequest withAttributeNames(EnvironmentHealthAttribute... attributeNames) { com.amazonaws.internal.SdkInternalList attributeNamesCopy = new com.amazonaws.internal.SdkInternalList(attributeNames.length); for (EnvironmentHealthAttribute value : attributeNames) { attributeNamesCopy.add(value.toString()); } if (getAttributeNames() == null) { setAttributeNames(attributeNamesCopy); } else { getAttributeNames().addAll(attributeNamesCopy); } 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 (getEnvironmentId() != null) sb.append("EnvironmentId: ").append(getEnvironmentId()).append(","); if (getAttributeNames() != null) sb.append("AttributeNames: ").append(getAttributeNames()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeEnvironmentHealthRequest == false) return false; DescribeEnvironmentHealthRequest other = (DescribeEnvironmentHealthRequest) obj; if (other.getEnvironmentName() == null ^ this.getEnvironmentName() == null) return false; if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == false) return false; if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == null) return false; if (other.getEnvironmentId() != null && other.getEnvironmentId().equals(this.getEnvironmentId()) == false) return false; if (other.getAttributeNames() == null ^ this.getAttributeNames() == null) return false; if (other.getAttributeNames() != null && other.getAttributeNames().equals(this.getAttributeNames()) == 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 + ((getEnvironmentId() == null) ? 0 : getEnvironmentId().hashCode()); hashCode = prime * hashCode + ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode()); return hashCode; } @Override public DescribeEnvironmentHealthRequest clone() { return (DescribeEnvironmentHealthRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy