com.amazonaws.services.elasticache.model.CacheEngineVersion Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticache 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.elasticache.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Provides all of the details about a particular cache engine version.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CacheEngineVersion implements Serializable, Cloneable {
/**
*
* 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.
*
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
*
*/
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.
*
*
* @param engine
* The name of the cache engine.
*/
public void setEngine(String engine) {
this.engine = engine;
}
/**
*
* The name of the cache engine.
*
*
* @return The name of the cache engine.
*/
public String getEngine() {
return this.engine;
}
/**
*
* The name of the cache engine.
*
*
* @param engine
* The name of the cache engine.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CacheEngineVersion withEngine(String engine) {
setEngine(engine);
return this;
}
/**
*
* The version number of the cache engine.
*
*
* @param engineVersion
* The version number of the cache engine.
*/
public void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
/**
*
* The version number of the cache engine.
*
*
* @return The version number of the cache engine.
*/
public String getEngineVersion() {
return this.engineVersion;
}
/**
*
* The version number of the cache engine.
*
*
* @param engineVersion
* The version number of the cache engine.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CacheEngineVersion withEngineVersion(String engineVersion) {
setEngineVersion(engineVersion);
return this;
}
/**
*
* The name of the cache parameter group family associated with this cache engine.
*
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
*
*
* @param cacheParameterGroupFamily
* The name of the cache parameter group family associated with this cache engine.
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
*/
public void setCacheParameterGroupFamily(String cacheParameterGroupFamily) {
this.cacheParameterGroupFamily = cacheParameterGroupFamily;
}
/**
*
* The name of the cache parameter group family associated with this cache engine.
*
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
*
*
* @return The name of the cache parameter group family associated with this cache engine.
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
*/
public String getCacheParameterGroupFamily() {
return this.cacheParameterGroupFamily;
}
/**
*
* The name of the cache parameter group family associated with this cache engine.
*
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
*
*
* @param cacheParameterGroupFamily
* The name of the cache parameter group family associated with this cache engine.
*
* Valid values are: memcached1.4
| memcached1.5
| memcached1.6
|
* redis2.6
| redis2.8
| redis3.2
| redis4.0
|
* redis5.0
| redis6.x
| redis7
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CacheEngineVersion withCacheParameterGroupFamily(String cacheParameterGroupFamily) {
setCacheParameterGroupFamily(cacheParameterGroupFamily);
return this;
}
/**
*
* The description of the cache engine.
*
*
* @param cacheEngineDescription
* The description of the cache engine.
*/
public void setCacheEngineDescription(String cacheEngineDescription) {
this.cacheEngineDescription = cacheEngineDescription;
}
/**
*
* The description of the cache engine.
*
*
* @return The description of the cache engine.
*/
public String getCacheEngineDescription() {
return this.cacheEngineDescription;
}
/**
*
* The description of the cache engine.
*
*
* @param cacheEngineDescription
* The description of the cache engine.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CacheEngineVersion withCacheEngineDescription(String cacheEngineDescription) {
setCacheEngineDescription(cacheEngineDescription);
return this;
}
/**
*
* The description of the cache engine version.
*
*
* @param cacheEngineVersionDescription
* The description of the cache engine version.
*/
public void setCacheEngineVersionDescription(String cacheEngineVersionDescription) {
this.cacheEngineVersionDescription = cacheEngineVersionDescription;
}
/**
*
* The description of the cache engine version.
*
*
* @return The description of the cache engine version.
*/
public String getCacheEngineVersionDescription() {
return this.cacheEngineVersionDescription;
}
/**
*
* The description of the cache engine version.
*
*
* @param cacheEngineVersionDescription
* The description of the cache engine version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CacheEngineVersion withCacheEngineVersionDescription(String cacheEngineVersionDescription) {
setCacheEngineVersionDescription(cacheEngineVersionDescription);
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 (getEngine() != null)
sb.append("Engine: ").append(getEngine()).append(",");
if (getEngineVersion() != null)
sb.append("EngineVersion: ").append(getEngineVersion()).append(",");
if (getCacheParameterGroupFamily() != null)
sb.append("CacheParameterGroupFamily: ").append(getCacheParameterGroupFamily()).append(",");
if (getCacheEngineDescription() != null)
sb.append("CacheEngineDescription: ").append(getCacheEngineDescription()).append(",");
if (getCacheEngineVersionDescription() != null)
sb.append("CacheEngineVersionDescription: ").append(getCacheEngineVersionDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CacheEngineVersion == false)
return false;
CacheEngineVersion other = (CacheEngineVersion) obj;
if (other.getEngine() == null ^ this.getEngine() == null)
return false;
if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false)
return false;
if (other.getEngineVersion() == null ^ this.getEngineVersion() == null)
return false;
if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false)
return false;
if (other.getCacheParameterGroupFamily() == null ^ this.getCacheParameterGroupFamily() == null)
return false;
if (other.getCacheParameterGroupFamily() != null && other.getCacheParameterGroupFamily().equals(this.getCacheParameterGroupFamily()) == false)
return false;
if (other.getCacheEngineDescription() == null ^ this.getCacheEngineDescription() == null)
return false;
if (other.getCacheEngineDescription() != null && other.getCacheEngineDescription().equals(this.getCacheEngineDescription()) == false)
return false;
if (other.getCacheEngineVersionDescription() == null ^ this.getCacheEngineVersionDescription() == null)
return false;
if (other.getCacheEngineVersionDescription() != null
&& other.getCacheEngineVersionDescription().equals(this.getCacheEngineVersionDescription()) == false)
return false;
return true;
}
@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 CacheEngineVersion clone() {
try {
return (CacheEngineVersion) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}