com.amazonaws.services.elasticbeanstalk.model.ApplicationDescription Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticbeanstalk Show documentation
/*
* 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 properties of an application.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ApplicationDescription implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the application.
*
*/
private String applicationArn;
/**
*
* The name of the application.
*
*/
private String applicationName;
/**
*
* User-defined description of the application.
*
*/
private String description;
/**
*
* The date when the application was created.
*
*/
private java.util.Date dateCreated;
/**
*
* The date when the application was last modified.
*
*/
private java.util.Date dateUpdated;
/**
*
* The names of the versions for this application.
*
*/
private com.amazonaws.internal.SdkInternalList versions;
/**
*
* The names of the configuration templates associated with this application.
*
*/
private com.amazonaws.internal.SdkInternalList configurationTemplates;
/**
*
* The lifecycle settings for the application.
*
*/
private ApplicationResourceLifecycleConfig resourceLifecycleConfig;
/**
*
* The Amazon Resource Name (ARN) of the application.
*
*
* @param applicationArn
* The Amazon Resource Name (ARN) of the application.
*/
public void setApplicationArn(String applicationArn) {
this.applicationArn = applicationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the application.
*
*
* @return The Amazon Resource Name (ARN) of the application.
*/
public String getApplicationArn() {
return this.applicationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the application.
*
*
* @param applicationArn
* The Amazon Resource Name (ARN) of the application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withApplicationArn(String applicationArn) {
setApplicationArn(applicationArn);
return this;
}
/**
*
* The name of the application.
*
*
* @param applicationName
* The name of the application.
*/
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}
/**
*
* The name of the application.
*
*
* @return The name of the application.
*/
public String getApplicationName() {
return this.applicationName;
}
/**
*
* The name of the application.
*
*
* @param applicationName
* The name of the application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withApplicationName(String applicationName) {
setApplicationName(applicationName);
return this;
}
/**
*
* User-defined description of the application.
*
*
* @param description
* User-defined description of the application.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* User-defined description of the application.
*
*
* @return User-defined description of the application.
*/
public String getDescription() {
return this.description;
}
/**
*
* User-defined description of the application.
*
*
* @param description
* User-defined description of the application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The date when the application was created.
*
*
* @param dateCreated
* The date when the application was created.
*/
public void setDateCreated(java.util.Date dateCreated) {
this.dateCreated = dateCreated;
}
/**
*
* The date when the application was created.
*
*
* @return The date when the application was created.
*/
public java.util.Date getDateCreated() {
return this.dateCreated;
}
/**
*
* The date when the application was created.
*
*
* @param dateCreated
* The date when the application was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withDateCreated(java.util.Date dateCreated) {
setDateCreated(dateCreated);
return this;
}
/**
*
* The date when the application was last modified.
*
*
* @param dateUpdated
* The date when the application was last modified.
*/
public void setDateUpdated(java.util.Date dateUpdated) {
this.dateUpdated = dateUpdated;
}
/**
*
* The date when the application was last modified.
*
*
* @return The date when the application was last modified.
*/
public java.util.Date getDateUpdated() {
return this.dateUpdated;
}
/**
*
* The date when the application was last modified.
*
*
* @param dateUpdated
* The date when the application was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withDateUpdated(java.util.Date dateUpdated) {
setDateUpdated(dateUpdated);
return this;
}
/**
*
* The names of the versions for this application.
*
*
* @return The names of the versions for this application.
*/
public java.util.List getVersions() {
if (versions == null) {
versions = new com.amazonaws.internal.SdkInternalList();
}
return versions;
}
/**
*
* The names of the versions for this application.
*
*
* @param versions
* The names of the versions for this application.
*/
public void setVersions(java.util.Collection versions) {
if (versions == null) {
this.versions = null;
return;
}
this.versions = new com.amazonaws.internal.SdkInternalList(versions);
}
/**
*
* The names of the versions for this application.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVersions(java.util.Collection)} or {@link #withVersions(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param versions
* The names of the versions for this application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withVersions(String... versions) {
if (this.versions == null) {
setVersions(new com.amazonaws.internal.SdkInternalList(versions.length));
}
for (String ele : versions) {
this.versions.add(ele);
}
return this;
}
/**
*
* The names of the versions for this application.
*
*
* @param versions
* The names of the versions for this application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withVersions(java.util.Collection versions) {
setVersions(versions);
return this;
}
/**
*
* The names of the configuration templates associated with this application.
*
*
* @return The names of the configuration templates associated with this application.
*/
public java.util.List getConfigurationTemplates() {
if (configurationTemplates == null) {
configurationTemplates = new com.amazonaws.internal.SdkInternalList();
}
return configurationTemplates;
}
/**
*
* The names of the configuration templates associated with this application.
*
*
* @param configurationTemplates
* The names of the configuration templates associated with this application.
*/
public void setConfigurationTemplates(java.util.Collection configurationTemplates) {
if (configurationTemplates == null) {
this.configurationTemplates = null;
return;
}
this.configurationTemplates = new com.amazonaws.internal.SdkInternalList(configurationTemplates);
}
/**
*
* The names of the configuration templates associated with this application.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setConfigurationTemplates(java.util.Collection)} or
* {@link #withConfigurationTemplates(java.util.Collection)} if you want to override the existing values.
*
*
* @param configurationTemplates
* The names of the configuration templates associated with this application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withConfigurationTemplates(String... configurationTemplates) {
if (this.configurationTemplates == null) {
setConfigurationTemplates(new com.amazonaws.internal.SdkInternalList(configurationTemplates.length));
}
for (String ele : configurationTemplates) {
this.configurationTemplates.add(ele);
}
return this;
}
/**
*
* The names of the configuration templates associated with this application.
*
*
* @param configurationTemplates
* The names of the configuration templates associated with this application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withConfigurationTemplates(java.util.Collection configurationTemplates) {
setConfigurationTemplates(configurationTemplates);
return this;
}
/**
*
* The lifecycle settings for the application.
*
*
* @param resourceLifecycleConfig
* The lifecycle settings for the application.
*/
public void setResourceLifecycleConfig(ApplicationResourceLifecycleConfig resourceLifecycleConfig) {
this.resourceLifecycleConfig = resourceLifecycleConfig;
}
/**
*
* The lifecycle settings for the application.
*
*
* @return The lifecycle settings for the application.
*/
public ApplicationResourceLifecycleConfig getResourceLifecycleConfig() {
return this.resourceLifecycleConfig;
}
/**
*
* The lifecycle settings for the application.
*
*
* @param resourceLifecycleConfig
* The lifecycle settings for the application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationDescription withResourceLifecycleConfig(ApplicationResourceLifecycleConfig resourceLifecycleConfig) {
setResourceLifecycleConfig(resourceLifecycleConfig);
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 (getApplicationArn() != null)
sb.append("ApplicationArn: ").append(getApplicationArn()).append(",");
if (getApplicationName() != null)
sb.append("ApplicationName: ").append(getApplicationName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getDateCreated() != null)
sb.append("DateCreated: ").append(getDateCreated()).append(",");
if (getDateUpdated() != null)
sb.append("DateUpdated: ").append(getDateUpdated()).append(",");
if (getVersions() != null)
sb.append("Versions: ").append(getVersions()).append(",");
if (getConfigurationTemplates() != null)
sb.append("ConfigurationTemplates: ").append(getConfigurationTemplates()).append(",");
if (getResourceLifecycleConfig() != null)
sb.append("ResourceLifecycleConfig: ").append(getResourceLifecycleConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ApplicationDescription == false)
return false;
ApplicationDescription other = (ApplicationDescription) obj;
if (other.getApplicationArn() == null ^ this.getApplicationArn() == null)
return false;
if (other.getApplicationArn() != null && other.getApplicationArn().equals(this.getApplicationArn()) == false)
return false;
if (other.getApplicationName() == null ^ this.getApplicationName() == null)
return false;
if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getDateCreated() == null ^ this.getDateCreated() == null)
return false;
if (other.getDateCreated() != null && other.getDateCreated().equals(this.getDateCreated()) == false)
return false;
if (other.getDateUpdated() == null ^ this.getDateUpdated() == null)
return false;
if (other.getDateUpdated() != null && other.getDateUpdated().equals(this.getDateUpdated()) == false)
return false;
if (other.getVersions() == null ^ this.getVersions() == null)
return false;
if (other.getVersions() != null && other.getVersions().equals(this.getVersions()) == false)
return false;
if (other.getConfigurationTemplates() == null ^ this.getConfigurationTemplates() == null)
return false;
if (other.getConfigurationTemplates() != null && other.getConfigurationTemplates().equals(this.getConfigurationTemplates()) == false)
return false;
if (other.getResourceLifecycleConfig() == null ^ this.getResourceLifecycleConfig() == null)
return false;
if (other.getResourceLifecycleConfig() != null && other.getResourceLifecycleConfig().equals(this.getResourceLifecycleConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApplicationArn() == null) ? 0 : getApplicationArn().hashCode());
hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDateCreated() == null) ? 0 : getDateCreated().hashCode());
hashCode = prime * hashCode + ((getDateUpdated() == null) ? 0 : getDateUpdated().hashCode());
hashCode = prime * hashCode + ((getVersions() == null) ? 0 : getVersions().hashCode());
hashCode = prime * hashCode + ((getConfigurationTemplates() == null) ? 0 : getConfigurationTemplates().hashCode());
hashCode = prime * hashCode + ((getResourceLifecycleConfig() == null) ? 0 : getResourceLifecycleConfig().hashCode());
return hashCode;
}
@Override
public ApplicationDescription clone() {
try {
return (ApplicationDescription) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}