Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.elasticache.model;
 

Provides all of the details about a particular cache engine version.

 
 public class CacheEngineVersion implements SerializableCloneable {

    
The name of the cache engine.
 
     private String engine;

    
The version number of the cache engine.
 
     private String engineVersion;

    
The name of the cache parameter group family associated with this cache engine.
 
     private String cacheParameterGroupFamily;

    
The description of the cache engine.
 
     private String cacheEngineDescription;

    
The description of the cache engine version.
 
     private String cacheEngineVersionDescription;

    
The name of the cache engine.

Returns:
The name of the cache engine.
 
     public String getEngine() {
         return ;
     }
    
    
The name of the cache engine.

Parameters:
engine The name of the cache engine.
 
     public void setEngine(String engine) {
         this. = engine;
     }
    
    
The name of the cache engine.

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

Parameters:
engine The name of the cache engine.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CacheEngineVersion withEngine(String engine) {
         this. = engine;
         return this;
     }

    
The version number of the cache engine.

Returns:
The version number of the cache engine.
 
     public String getEngineVersion() {
         return ;
     }
    
    
The version number of the cache engine.

Parameters:
engineVersion The version number of the cache engine.
 
     public void setEngineVersion(String engineVersion) {
        this. = engineVersion;
    }
    
    
The version number of the cache engine.

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

Parameters:
engineVersion The version number of the cache engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CacheEngineVersion withEngineVersion(String engineVersion) {
        this. = engineVersion;
        return this;
    }

    
The name of the cache parameter group family associated with this cache engine.

Returns:
The name of the cache parameter group family associated with this cache engine.
        return ;
    }
    
    
The name of the cache parameter group family associated with this cache engine.

Parameters:
cacheParameterGroupFamily The name of the cache parameter group family associated with this cache engine.
    public void setCacheParameterGroupFamily(String cacheParameterGroupFamily) {
        this. = cacheParameterGroupFamily;
    }
    
    
The name of the cache parameter group family associated with this cache engine.

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

Parameters:
cacheParameterGroupFamily The name of the cache parameter group family associated with this cache engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CacheEngineVersion withCacheParameterGroupFamily(String cacheParameterGroupFamily) {
        this. = cacheParameterGroupFamily;
        return this;
    }

    
The description of the cache engine.

Returns:
The description of the cache engine.
    public String getCacheEngineDescription() {
        return ;
    }
    
    
The description of the cache engine.

Parameters:
cacheEngineDescription The description of the cache engine.
    public void setCacheEngineDescription(String cacheEngineDescription) {
        this. = cacheEngineDescription;
    }
    
    
The description of the cache engine.

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

Parameters:
cacheEngineDescription The description of the cache engine.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CacheEngineVersion withCacheEngineDescription(String cacheEngineDescription) {
        this. = cacheEngineDescription;
        return this;
    }

    
The description of the cache engine version.

Returns:
The description of the cache engine version.
        return ;
    }
    
    
The description of the cache engine version.

Parameters:
cacheEngineVersionDescription The description of the cache engine version.
    public void setCacheEngineVersionDescription(String cacheEngineVersionDescription) {
        this. = cacheEngineVersionDescription;
    }
    
    
The description of the cache engine version.

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

Parameters:
cacheEngineVersionDescription The description of the cache engine version.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CacheEngineVersion withCacheEngineVersionDescription(String cacheEngineVersionDescription) {
        this. = cacheEngineVersionDescription;
        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 (getEngine() != nullsb.append("Engine: " + getEngine() + ",");
        if (getEngineVersion() != nullsb.append("EngineVersion: " + getEngineVersion() + ",");
        if (getCacheParameterGroupFamily() != nullsb.append("CacheParameterGroupFamily: " + getCacheParameterGroupFamily() + ",");
        if (getCacheEngineDescription() != nullsb.append("CacheEngineDescription: " + getCacheEngineDescription() + ",");
        if (getCacheEngineVersionDescription() != nullsb.append("CacheEngineVersionDescription: " + getCacheEngineVersionDescription() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); 
        hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); 
        hashCode = prime * hashCode + ((getCacheParameterGroupFamily() == null) ? 0 : getCacheParameterGroupFamily().hashCode()); 
        hashCode = prime * hashCode + ((getCacheEngineDescription() == null) ? 0 : getCacheEngineDescription().hashCode()); 
        hashCode = prime * hashCode + ((getCacheEngineVersionDescription() == null) ? 0 : getCacheEngineVersionDescription().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CacheEngineVersion == falsereturn false;
        CacheEngineVersion other = (CacheEngineVersion)obj;
        
        if (other.getEngine() == null ^ this.getEngine() == nullreturn false;
        if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == falsereturn false
        if (other.getEngineVersion() == null ^ this.getEngineVersion() == nullreturn false;
        if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == falsereturn false
        if (other.getCacheParameterGroupFamily() == null ^ this.getCacheParameterGroupFamily() == nullreturn false;
        if (other.getCacheParameterGroupFamily() != null && other.getCacheParameterGroupFamily().equals(this.getCacheParameterGroupFamily()) == falsereturn false
        if (other.getCacheEngineDescription() == null ^ this.getCacheEngineDescription() == nullreturn false;
        if (other.getCacheEngineDescription() != null && other.getCacheEngineDescription().equals(this.getCacheEngineDescription()) == falsereturn false
        if (other.getCacheEngineVersionDescription() == null ^ this.getCacheEngineVersionDescription() == nullreturn false;
        if (other.getCacheEngineVersionDescription() != null && other.getCacheEngineVersionDescription().equals(this.getCacheEngineVersionDescription()) == falsereturn false
        return true;
    }
    
    @Override
    public CacheEngineVersion clone() {
        try {
            return (CacheEngineVersionsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X