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;
 
 
Container for the parameters to the DeleteReplicationGroup operation.

The DeleteReplicationGroup action deletes an existing replication group. By default, this action deletes the entire replication group, including the primary cluster and all of the read replicas. You can optionally delete only the read replicas, while retaining the primary cluster.

When you receive a successful response from this action, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this action.

 
 public class DeleteReplicationGroupRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The identifier for the cluster to be deleted. This parameter is not case sensitive.
 
     private String replicationGroupId;

    
If set to true, all of the read replicas will be deleted, but the primary node will be retained.
 
     private Boolean retainPrimaryCluster;

    
The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.
 
     private String finalSnapshotIdentifier;

    
The identifier for the cluster to be deleted. This parameter is not case sensitive.

Returns:
The identifier for the cluster to be deleted. This parameter is not case sensitive.
 
     public String getReplicationGroupId() {
         return ;
     }
    
    
The identifier for the cluster to be deleted. This parameter is not case sensitive.

Parameters:
replicationGroupId The identifier for the cluster to be deleted. This parameter is not case sensitive.
 
     public void setReplicationGroupId(String replicationGroupId) {
         this. = replicationGroupId;
     }
    
    
The identifier for the cluster to be deleted. This parameter is not case sensitive.

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

Parameters:
replicationGroupId The identifier for the cluster to be deleted. This parameter is not case sensitive.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DeleteReplicationGroupRequest withReplicationGroupId(String replicationGroupId) {
         this. = replicationGroupId;
         return this;
     }

    
If set to true, all of the read replicas will be deleted, but the primary node will be retained.

Returns:
If set to true, all of the read replicas will be deleted, but the primary node will be retained.
    public Boolean isRetainPrimaryCluster() {
        return ;
    }
    
    
If set to true, all of the read replicas will be deleted, but the primary node will be retained.

Parameters:
retainPrimaryCluster If set to true, all of the read replicas will be deleted, but the primary node will be retained.
    public void setRetainPrimaryCluster(Boolean retainPrimaryCluster) {
        this. = retainPrimaryCluster;
    }
    
    
If set to true, all of the read replicas will be deleted, but the primary node will be retained.

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

Parameters:
retainPrimaryCluster If set to true, all of the read replicas will be deleted, but the primary node will be retained.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeleteReplicationGroupRequest withRetainPrimaryCluster(Boolean retainPrimaryCluster) {
        this. = retainPrimaryCluster;
        return this;
    }

    
If set to true, all of the read replicas will be deleted, but the primary node will be retained.

Returns:
If set to true, all of the read replicas will be deleted, but the primary node will be retained.
    public Boolean getRetainPrimaryCluster() {
        return ;
    }

    
The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.

Returns:
The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.
        return ;
    }
    
    
The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.

Parameters:
finalSnapshotIdentifier The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.
    public void setFinalSnapshotIdentifier(String finalSnapshotIdentifier) {
        this. = finalSnapshotIdentifier;
    }
    
    
The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.

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

Parameters:
finalSnapshotIdentifier The name of a final node group snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the cluster is immediately deleted.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeleteReplicationGroupRequest withFinalSnapshotIdentifier(String finalSnapshotIdentifier) {
        this. = finalSnapshotIdentifier;
        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 (getReplicationGroupId() != nullsb.append("ReplicationGroupId: " + getReplicationGroupId() + ",");
        if (isRetainPrimaryCluster() != nullsb.append("RetainPrimaryCluster: " + isRetainPrimaryCluster() + ",");
        if (getFinalSnapshotIdentifier() != nullsb.append("FinalSnapshotIdentifier: " + getFinalSnapshotIdentifier() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getReplicationGroupId() == null) ? 0 : getReplicationGroupId().hashCode()); 
        hashCode = prime * hashCode + ((isRetainPrimaryCluster() == null) ? 0 : isRetainPrimaryCluster().hashCode()); 
        hashCode = prime * hashCode + ((getFinalSnapshotIdentifier() == null) ? 0 : getFinalSnapshotIdentifier().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DeleteReplicationGroupRequest == falsereturn false;
        
        if (other.getReplicationGroupId() == null ^ this.getReplicationGroupId() == nullreturn false;
        if (other.getReplicationGroupId() != null && other.getReplicationGroupId().equals(this.getReplicationGroupId()) == falsereturn false
        if (other.isRetainPrimaryCluster() == null ^ this.isRetainPrimaryCluster() == nullreturn false;
        if (other.isRetainPrimaryCluster() != null && other.isRetainPrimaryCluster().equals(this.isRetainPrimaryCluster()) == falsereturn false
        if (other.getFinalSnapshotIdentifier() == null ^ this.getFinalSnapshotIdentifier() == nullreturn false;
        if (other.getFinalSnapshotIdentifier() != null && other.getFinalSnapshotIdentifier().equals(this.getFinalSnapshotIdentifier()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DeleteReplicationGroupRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X