Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2014 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;
 

Describes the properties of an application.

 
 public class ApplicationDescription implements Serializable {

    
The name of the application.

Constraints:
Length: 1 - 100

 
     private String applicationName;

    
User-defined description of the application.

Constraints:
Length: 0 - 200

 
     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.
 
The names of the configuration templates associated with this application.
 
Default constructor for a new ApplicationDescription object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public ApplicationDescription() {}
    
    
The name of the application.

Constraints:
Length: 1 - 100

Returns:
The name of the application.
 
     public String getApplicationName() {
         return ;
     }
    
    
The name of the application.

Constraints:
Length: 1 - 100

Parameters:
applicationName The name of the application.
 
     public void setApplicationName(String applicationName) {
         this. = applicationName;
     }
    
    
The name of the application.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 100

Parameters:
applicationName The name of the application.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withApplicationName(String applicationName) {
        this. = applicationName;
        return this;
    }

    
User-defined description of the application.

Constraints:
Length: 0 - 200

Returns:
User-defined description of the application.
    public String getDescription() {
        return ;
    }
    
    
User-defined description of the application.

Constraints:
Length: 0 - 200

Parameters:
description User-defined description of the application.
    public void setDescription(String description) {
        this. = description;
    }
    
    
User-defined description of the application.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 200

Parameters:
description User-defined description of the application.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withDescription(String description) {
        this. = description;
        return this;
    }

    
The date when the application was created.

Returns:
The date when the application was created.
    public java.util.Date getDateCreated() {
        return ;
    }
    
    
The date when the application was created.

Parameters:
dateCreated The date when the application was created.
    public void setDateCreated(java.util.Date dateCreated) {
        this. = dateCreated;
    }
    
    
The date when the application was created.

Returns a reference to this object so that method calls can be chained together.

Parameters:
dateCreated The date when the application was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withDateCreated(java.util.Date dateCreated) {
        this. = dateCreated;
        return this;
    }

    
The date when the application was last modified.

Returns:
The date when the application was last modified.
    public java.util.Date getDateUpdated() {
        return ;
    }
    
    
The date when the application was last modified.

Parameters:
dateUpdated The date when the application was last modified.
    public void setDateUpdated(java.util.Date dateUpdated) {
        this. = dateUpdated;
    }
    
    
The date when the application was last modified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
dateUpdated The date when the application was last modified.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withDateUpdated(java.util.Date dateUpdated) {
        this. = dateUpdated;
        return this;
    }

    
The names of the versions for this application.

Returns:
The names of the versions for this application.
    public java.util.List<StringgetVersions() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The names of the versions for this application.

Parameters:
versions The names of the versions for this application.
    public void setVersions(java.util.Collection<Stringversions) {
        if (versions == null) {
            this. = null;
            return;
        }
        versionsCopy.addAll(versions);
        this. = versionsCopy;
    }
    
    
The names of the versions for this application.

Returns a reference to this object so that method calls can be chained together.

Parameters:
versions The names of the versions for this application.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withVersions(String... versions) {
        if (getVersions() == nullsetVersions(new java.util.ArrayList<String>(versions.length));
        for (String value : versions) {
            getVersions().add(value);
        }
        return this;
    }
    
    
The names of the versions for this application.

Returns a reference to this object so that method calls can be chained together.

Parameters:
versions The names of the versions for this application.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (versions == null) {
            this. = null;
        } else {
            versionsCopy.addAll(versions);
            this. = versionsCopy;
        }
        return this;
    }

    
The names of the configuration templates associated with this application.

Returns:
The names of the configuration templates associated with this application.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The names of the configuration templates associated with this application.

Parameters:
configurationTemplates The names of the configuration templates associated with this application.
    public void setConfigurationTemplates(java.util.Collection<StringconfigurationTemplates) {
        if (configurationTemplates == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringconfigurationTemplatesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(configurationTemplates.size());
        configurationTemplatesCopy.addAll(configurationTemplates);
        this. = configurationTemplatesCopy;
    }
    
    
The names of the configuration templates associated with this application.

Returns a reference to this object so that method calls can be chained together.

Parameters:
configurationTemplates The names of the configuration templates associated with this application.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withConfigurationTemplates(String... configurationTemplates) {
        if (getConfigurationTemplates() == nullsetConfigurationTemplates(new java.util.ArrayList<String>(configurationTemplates.length));
        for (String value : configurationTemplates) {
            getConfigurationTemplates().add(value);
        }
        return this;
    }
    
    
The names of the configuration templates associated with this application.

Returns a reference to this object so that method calls can be chained together.

Parameters:
configurationTemplates The names of the configuration templates associated with this application.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ApplicationDescription withConfigurationTemplates(java.util.Collection<StringconfigurationTemplates) {
        if (configurationTemplates == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringconfigurationTemplatesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(configurationTemplates.size());
            configurationTemplatesCopy.addAll(configurationTemplates);
            this. = configurationTemplatesCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getApplicationName() != nullsb.append("ApplicationName: " + getApplicationName() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getDateCreated() != nullsb.append("DateCreated: " + getDateCreated() + ",");
        if (getDateUpdated() != nullsb.append("DateUpdated: " + getDateUpdated() + ",");
        if (getVersions() != nullsb.append("Versions: " + getVersions() + ",");
        if (getConfigurationTemplates() != nullsb.append("ConfigurationTemplates: " + getConfigurationTemplates() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        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()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ApplicationDescription == falsereturn false;
        ApplicationDescription other = (ApplicationDescription)obj;
        
        if (other.getApplicationName() == null ^ this.getApplicationName() == nullreturn false;
        if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getDateCreated() == null ^ this.getDateCreated() == nullreturn false;
        if (other.getDateCreated() != null && other.getDateCreated().equals(this.getDateCreated()) == falsereturn false
        if (other.getDateUpdated() == null ^ this.getDateUpdated() == nullreturn false;
        if (other.getDateUpdated() != null && other.getDateUpdated().equals(this.getDateUpdated()) == falsereturn false
        if (other.getVersions() == null ^ this.getVersions() == nullreturn false;
        if (other.getVersions() != null && other.getVersions().equals(this.getVersions()) == falsereturn false
        if (other.getConfigurationTemplates() == null ^ this.getConfigurationTemplates() == nullreturn false;
        if (other.getConfigurationTemplates() != null && other.getConfigurationTemplates().equals(this.getConfigurationTemplates()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X