com.amazonaws.services.elasticache.model.ReplicationGroupPendingModifiedValues Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticache Show documentation
/*
* Copyright 2015-2020 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;
/**
*
* The settings to be applied to the Redis replication group, either immediately or during the next maintenance window.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ReplicationGroupPendingModifiedValues implements Serializable, Cloneable {
/**
*
* The primary cluster ID that is applied immediately (if --apply-immediately
was specified), or during
* the next maintenance window.
*
*/
private String primaryClusterId;
/**
*
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
*
*/
private String automaticFailoverStatus;
/**
*
* The status of an online resharding operation.
*
*/
private ReshardingStatus resharding;
/**
*
* The auth token status
*
*/
private String authTokenStatus;
/**
*
* The primary cluster ID that is applied immediately (if --apply-immediately
was specified), or during
* the next maintenance window.
*
*
* @param primaryClusterId
* The primary cluster ID that is applied immediately (if --apply-immediately
was specified), or
* during the next maintenance window.
*/
public void setPrimaryClusterId(String primaryClusterId) {
this.primaryClusterId = primaryClusterId;
}
/**
*
* The primary cluster ID that is applied immediately (if --apply-immediately
was specified), or during
* the next maintenance window.
*
*
* @return The primary cluster ID that is applied immediately (if --apply-immediately
was specified),
* or during the next maintenance window.
*/
public String getPrimaryClusterId() {
return this.primaryClusterId;
}
/**
*
* The primary cluster ID that is applied immediately (if --apply-immediately
was specified), or during
* the next maintenance window.
*
*
* @param primaryClusterId
* The primary cluster ID that is applied immediately (if --apply-immediately
was specified), or
* during the next maintenance window.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReplicationGroupPendingModifiedValues withPrimaryClusterId(String primaryClusterId) {
setPrimaryClusterId(primaryClusterId);
return this;
}
/**
*
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
*
*
* @param automaticFailoverStatus
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
* @see PendingAutomaticFailoverStatus
*/
public void setAutomaticFailoverStatus(String automaticFailoverStatus) {
this.automaticFailoverStatus = automaticFailoverStatus;
}
/**
*
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
*
*
* @return Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
* @see PendingAutomaticFailoverStatus
*/
public String getAutomaticFailoverStatus() {
return this.automaticFailoverStatus;
}
/**
*
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
*
*
* @param automaticFailoverStatus
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see PendingAutomaticFailoverStatus
*/
public ReplicationGroupPendingModifiedValues withAutomaticFailoverStatus(String automaticFailoverStatus) {
setAutomaticFailoverStatus(automaticFailoverStatus);
return this;
}
/**
*
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
*
*
* @param automaticFailoverStatus
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
* @see PendingAutomaticFailoverStatus
*/
public void setAutomaticFailoverStatus(PendingAutomaticFailoverStatus automaticFailoverStatus) {
withAutomaticFailoverStatus(automaticFailoverStatus);
}
/**
*
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
*
*
* @param automaticFailoverStatus
* Indicates the status of Multi-AZ with automatic failover for this Redis replication group.
*
* Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:
*
*
* -
*
* Redis versions earlier than 2.8.6.
*
*
* -
*
* Redis (cluster mode disabled): T1 node types.
*
*
* -
*
* Redis (cluster mode enabled): T1 node types.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see PendingAutomaticFailoverStatus
*/
public ReplicationGroupPendingModifiedValues withAutomaticFailoverStatus(PendingAutomaticFailoverStatus automaticFailoverStatus) {
this.automaticFailoverStatus = automaticFailoverStatus.toString();
return this;
}
/**
*
* The status of an online resharding operation.
*
*
* @param resharding
* The status of an online resharding operation.
*/
public void setResharding(ReshardingStatus resharding) {
this.resharding = resharding;
}
/**
*
* The status of an online resharding operation.
*
*
* @return The status of an online resharding operation.
*/
public ReshardingStatus getResharding() {
return this.resharding;
}
/**
*
* The status of an online resharding operation.
*
*
* @param resharding
* The status of an online resharding operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReplicationGroupPendingModifiedValues withResharding(ReshardingStatus resharding) {
setResharding(resharding);
return this;
}
/**
*
* The auth token status
*
*
* @param authTokenStatus
* The auth token status
* @see AuthTokenUpdateStatus
*/
public void setAuthTokenStatus(String authTokenStatus) {
this.authTokenStatus = authTokenStatus;
}
/**
*
* The auth token status
*
*
* @return The auth token status
* @see AuthTokenUpdateStatus
*/
public String getAuthTokenStatus() {
return this.authTokenStatus;
}
/**
*
* The auth token status
*
*
* @param authTokenStatus
* The auth token status
* @return Returns a reference to this object so that method calls can be chained together.
* @see AuthTokenUpdateStatus
*/
public ReplicationGroupPendingModifiedValues withAuthTokenStatus(String authTokenStatus) {
setAuthTokenStatus(authTokenStatus);
return this;
}
/**
*
* The auth token status
*
*
* @param authTokenStatus
* The auth token status
* @see AuthTokenUpdateStatus
*/
public void setAuthTokenStatus(AuthTokenUpdateStatus authTokenStatus) {
withAuthTokenStatus(authTokenStatus);
}
/**
*
* The auth token status
*
*
* @param authTokenStatus
* The auth token status
* @return Returns a reference to this object so that method calls can be chained together.
* @see AuthTokenUpdateStatus
*/
public ReplicationGroupPendingModifiedValues withAuthTokenStatus(AuthTokenUpdateStatus authTokenStatus) {
this.authTokenStatus = authTokenStatus.toString();
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 (getPrimaryClusterId() != null)
sb.append("PrimaryClusterId: ").append(getPrimaryClusterId()).append(",");
if (getAutomaticFailoverStatus() != null)
sb.append("AutomaticFailoverStatus: ").append(getAutomaticFailoverStatus()).append(",");
if (getResharding() != null)
sb.append("Resharding: ").append(getResharding()).append(",");
if (getAuthTokenStatus() != null)
sb.append("AuthTokenStatus: ").append(getAuthTokenStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ReplicationGroupPendingModifiedValues == false)
return false;
ReplicationGroupPendingModifiedValues other = (ReplicationGroupPendingModifiedValues) obj;
if (other.getPrimaryClusterId() == null ^ this.getPrimaryClusterId() == null)
return false;
if (other.getPrimaryClusterId() != null && other.getPrimaryClusterId().equals(this.getPrimaryClusterId()) == false)
return false;
if (other.getAutomaticFailoverStatus() == null ^ this.getAutomaticFailoverStatus() == null)
return false;
if (other.getAutomaticFailoverStatus() != null && other.getAutomaticFailoverStatus().equals(this.getAutomaticFailoverStatus()) == false)
return false;
if (other.getResharding() == null ^ this.getResharding() == null)
return false;
if (other.getResharding() != null && other.getResharding().equals(this.getResharding()) == false)
return false;
if (other.getAuthTokenStatus() == null ^ this.getAuthTokenStatus() == null)
return false;
if (other.getAuthTokenStatus() != null && other.getAuthTokenStatus().equals(this.getAuthTokenStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPrimaryClusterId() == null) ? 0 : getPrimaryClusterId().hashCode());
hashCode = prime * hashCode + ((getAutomaticFailoverStatus() == null) ? 0 : getAutomaticFailoverStatus().hashCode());
hashCode = prime * hashCode + ((getResharding() == null) ? 0 : getResharding().hashCode());
hashCode = prime * hashCode + ((getAuthTokenStatus() == null) ? 0 : getAuthTokenStatus().hashCode());
return hashCode;
}
@Override
public ReplicationGroupPendingModifiedValues clone() {
try {
return (ReplicationGroupPendingModifiedValues) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}