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

software.amazon.awssdk.services.elasticache.model.RebootCacheClusterRequest 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: 2.29.39
Show newest version
/*
 * Copyright 2012-2017 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 software.amazon.awssdk.services.elasticache.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import javax.annotation.Generated;
import software.amazon.awssdk.AmazonWebServiceRequest;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents the input of a RebootCacheCluster operation. *

*/ @Generated("software.amazon.awssdk:codegen") public class RebootCacheClusterRequest extends AmazonWebServiceRequest implements ToCopyableBuilder { private final String cacheClusterId; private final List cacheNodeIdsToReboot; private RebootCacheClusterRequest(BuilderImpl builder) { this.cacheClusterId = builder.cacheClusterId; this.cacheNodeIdsToReboot = builder.cacheNodeIdsToReboot; } /** *

* The cache cluster identifier. This parameter is stored as a lowercase string. *

* * @return The cache cluster identifier. This parameter is stored as a lowercase string. */ public String cacheClusterId() { return cacheClusterId; } /** *

* A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an entire * cache cluster, specify all of the cache node IDs. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an * entire cache cluster, specify all of the cache node IDs. */ public List cacheNodeIdsToReboot() { return cacheNodeIdsToReboot; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + ((cacheClusterId() == null) ? 0 : cacheClusterId().hashCode()); hashCode = 31 * hashCode + ((cacheNodeIdsToReboot() == null) ? 0 : cacheNodeIdsToReboot().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof RebootCacheClusterRequest)) { return false; } RebootCacheClusterRequest other = (RebootCacheClusterRequest) obj; if (other.cacheClusterId() == null ^ this.cacheClusterId() == null) { return false; } if (other.cacheClusterId() != null && !other.cacheClusterId().equals(this.cacheClusterId())) { return false; } if (other.cacheNodeIdsToReboot() == null ^ this.cacheNodeIdsToReboot() == null) { return false; } if (other.cacheNodeIdsToReboot() != null && !other.cacheNodeIdsToReboot().equals(this.cacheNodeIdsToReboot())) { return false; } return true; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (cacheClusterId() != null) { sb.append("CacheClusterId: ").append(cacheClusterId()).append(","); } if (cacheNodeIdsToReboot() != null) { sb.append("CacheNodeIdsToReboot: ").append(cacheNodeIdsToReboot()).append(","); } sb.append("}"); return sb.toString(); } public interface Builder extends CopyableBuilder { /** *

* The cache cluster identifier. This parameter is stored as a lowercase string. *

* * @param cacheClusterId * The cache cluster identifier. This parameter is stored as a lowercase string. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheClusterId(String cacheClusterId); /** *

* A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an entire * cache cluster, specify all of the cache node IDs. *

* * @param cacheNodeIdsToReboot * A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an * entire cache cluster, specify all of the cache node IDs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheNodeIdsToReboot(Collection cacheNodeIdsToReboot); /** *

* A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an entire * cache cluster, specify all of the cache node IDs. *

* * @param cacheNodeIdsToReboot * A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an * entire cache cluster, specify all of the cache node IDs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheNodeIdsToReboot(String... cacheNodeIdsToReboot); } private static final class BuilderImpl implements Builder { private String cacheClusterId; private List cacheNodeIdsToReboot; private BuilderImpl() { } private BuilderImpl(RebootCacheClusterRequest model) { setCacheClusterId(model.cacheClusterId); setCacheNodeIdsToReboot(model.cacheNodeIdsToReboot); } public final String getCacheClusterId() { return cacheClusterId; } @Override public final Builder cacheClusterId(String cacheClusterId) { this.cacheClusterId = cacheClusterId; return this; } public final void setCacheClusterId(String cacheClusterId) { this.cacheClusterId = cacheClusterId; } public final Collection getCacheNodeIdsToReboot() { return cacheNodeIdsToReboot; } @Override public final Builder cacheNodeIdsToReboot(Collection cacheNodeIdsToReboot) { this.cacheNodeIdsToReboot = CacheNodeIdsListCopier.copy(cacheNodeIdsToReboot); return this; } @Override @SafeVarargs public final Builder cacheNodeIdsToReboot(String... cacheNodeIdsToReboot) { cacheNodeIdsToReboot(Arrays.asList(cacheNodeIdsToReboot)); return this; } public final void setCacheNodeIdsToReboot(Collection cacheNodeIdsToReboot) { this.cacheNodeIdsToReboot = CacheNodeIdsListCopier.copy(cacheNodeIdsToReboot); } @Override public RebootCacheClusterRequest build() { return new RebootCacheClusterRequest(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy