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

com.amazonaws.services.elasticache.model.PendingModifiedValues Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon ElastiCache module holds the client classes that are used for communicating with Amazon ElastiCache Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2010-2016 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;

/**
 * 

* A group of settings that will be applied to the cache cluster in the future, * or that are currently being applied. *

*/ public class PendingModifiedValues implements Serializable, Cloneable { /** *

* The new number of cache nodes for the cache cluster. *

*

* For clusters running Redis, this value must be 1. For clusters running * Memcached, this value must be between 1 and 20. *

*/ private Integer numCacheNodes; /** *

* A list of cache node IDs that are being removed (or will be removed) from * the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.). *

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

* The new cache engine version that the cache cluster will run. *

*/ private String engineVersion; /** *

* The cache node type that this cache cluster or replication group will be * scaled to. *

*/ private String cacheNodeType; /** *

* The new number of cache nodes for the cache cluster. *

*

* For clusters running Redis, this value must be 1. For clusters running * Memcached, this value must be between 1 and 20. *

* * @param numCacheNodes * The new number of cache nodes for the cache cluster.

*

* For clusters running Redis, this value must be 1. For clusters * running Memcached, this value must be between 1 and 20. */ public void setNumCacheNodes(Integer numCacheNodes) { this.numCacheNodes = numCacheNodes; } /** *

* The new number of cache nodes for the cache cluster. *

*

* For clusters running Redis, this value must be 1. For clusters running * Memcached, this value must be between 1 and 20. *

* * @return The new number of cache nodes for the cache cluster.

*

* For clusters running Redis, this value must be 1. For clusters * running Memcached, this value must be between 1 and 20. */ public Integer getNumCacheNodes() { return this.numCacheNodes; } /** *

* The new number of cache nodes for the cache cluster. *

*

* For clusters running Redis, this value must be 1. For clusters running * Memcached, this value must be between 1 and 20. *

* * @param numCacheNodes * The new number of cache nodes for the cache cluster.

*

* For clusters running Redis, this value must be 1. For clusters * running Memcached, this value must be between 1 and 20. * @return Returns a reference to this object so that method calls can be * chained together. */ public PendingModifiedValues withNumCacheNodes(Integer numCacheNodes) { setNumCacheNodes(numCacheNodes); return this; } /** *

* A list of cache node IDs that are being removed (or will be removed) from * the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.). *

* * @return A list of cache node IDs that are being removed (or will be * removed) from the cache cluster. A node ID is a numeric * identifier (0001, 0002, etc.). */ public java.util.List getCacheNodeIdsToRemove() { if (cacheNodeIdsToRemove == null) { cacheNodeIdsToRemove = new com.amazonaws.internal.SdkInternalList(); } return cacheNodeIdsToRemove; } /** *

* A list of cache node IDs that are being removed (or will be removed) from * the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.). *

* * @param cacheNodeIdsToRemove * A list of cache node IDs that are being removed (or will be * removed) from the cache cluster. A node ID is a numeric identifier * (0001, 0002, etc.). */ public void setCacheNodeIdsToRemove( java.util.Collection cacheNodeIdsToRemove) { if (cacheNodeIdsToRemove == null) { this.cacheNodeIdsToRemove = null; return; } this.cacheNodeIdsToRemove = new com.amazonaws.internal.SdkInternalList( cacheNodeIdsToRemove); } /** *

* A list of cache node IDs that are being removed (or will be removed) from * the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.). *

*

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

* * @param cacheNodeIdsToRemove * A list of cache node IDs that are being removed (or will be * removed) from the cache cluster. A node ID is a numeric identifier * (0001, 0002, etc.). * @return Returns a reference to this object so that method calls can be * chained together. */ public PendingModifiedValues withCacheNodeIdsToRemove( String... cacheNodeIdsToRemove) { if (this.cacheNodeIdsToRemove == null) { setCacheNodeIdsToRemove(new com.amazonaws.internal.SdkInternalList( cacheNodeIdsToRemove.length)); } for (String ele : cacheNodeIdsToRemove) { this.cacheNodeIdsToRemove.add(ele); } return this; } /** *

* A list of cache node IDs that are being removed (or will be removed) from * the cache cluster. A node ID is a numeric identifier (0001, 0002, etc.). *

* * @param cacheNodeIdsToRemove * A list of cache node IDs that are being removed (or will be * removed) from the cache cluster. A node ID is a numeric identifier * (0001, 0002, etc.). * @return Returns a reference to this object so that method calls can be * chained together. */ public PendingModifiedValues withCacheNodeIdsToRemove( java.util.Collection cacheNodeIdsToRemove) { setCacheNodeIdsToRemove(cacheNodeIdsToRemove); return this; } /** *

* The new cache engine version that the cache cluster will run. *

* * @param engineVersion * The new cache engine version that the cache cluster will run. */ public void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } /** *

* The new cache engine version that the cache cluster will run. *

* * @return The new cache engine version that the cache cluster will run. */ public String getEngineVersion() { return this.engineVersion; } /** *

* The new cache engine version that the cache cluster will run. *

* * @param engineVersion * The new cache engine version that the cache cluster will run. * @return Returns a reference to this object so that method calls can be * chained together. */ public PendingModifiedValues withEngineVersion(String engineVersion) { setEngineVersion(engineVersion); return this; } /** *

* The cache node type that this cache cluster or replication group will be * scaled to. *

* * @param cacheNodeType * The cache node type that this cache cluster or replication group * will be scaled to. */ public void setCacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; } /** *

* The cache node type that this cache cluster or replication group will be * scaled to. *

* * @return The cache node type that this cache cluster or replication group * will be scaled to. */ public String getCacheNodeType() { return this.cacheNodeType; } /** *

* The cache node type that this cache cluster or replication group will be * scaled to. *

* * @param cacheNodeType * The cache node type that this cache cluster or replication group * will be scaled to. * @return Returns a reference to this object so that method calls can be * chained together. */ public PendingModifiedValues withCacheNodeType(String cacheNodeType) { setCacheNodeType(cacheNodeType); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getNumCacheNodes() != null) sb.append("NumCacheNodes: " + getNumCacheNodes() + ","); if (getCacheNodeIdsToRemove() != null) sb.append("CacheNodeIdsToRemove: " + getCacheNodeIdsToRemove() + ","); if (getEngineVersion() != null) sb.append("EngineVersion: " + getEngineVersion() + ","); if (getCacheNodeType() != null) sb.append("CacheNodeType: " + getCacheNodeType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PendingModifiedValues == false) return false; PendingModifiedValues other = (PendingModifiedValues) obj; if (other.getNumCacheNodes() == null ^ this.getNumCacheNodes() == null) return false; if (other.getNumCacheNodes() != null && other.getNumCacheNodes().equals(this.getNumCacheNodes()) == false) return false; if (other.getCacheNodeIdsToRemove() == null ^ this.getCacheNodeIdsToRemove() == null) return false; if (other.getCacheNodeIdsToRemove() != null && other.getCacheNodeIdsToRemove().equals( this.getCacheNodeIdsToRemove()) == 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.getCacheNodeType() == null ^ this.getCacheNodeType() == null) return false; if (other.getCacheNodeType() != null && other.getCacheNodeType().equals(this.getCacheNodeType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNumCacheNodes() == null) ? 0 : getNumCacheNodes() .hashCode()); hashCode = prime * hashCode + ((getCacheNodeIdsToRemove() == null) ? 0 : getCacheNodeIdsToRemove().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion() .hashCode()); hashCode = prime * hashCode + ((getCacheNodeType() == null) ? 0 : getCacheNodeType() .hashCode()); return hashCode; } @Override public PendingModifiedValues clone() { try { return (PendingModifiedValues) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy