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

Creates a manual snapshot of the specified cluster. The cluster must be in the available state.

For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide .

 
 public class CreateClusterSnapshotRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

 
     private String snapshotIdentifier;

    
The cluster identifier for which you want a snapshot.
 
     private String clusterIdentifier;

    
A list of tag instances.
 
A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

Returns:
A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

 
     public String getSnapshotIdentifier() {
         return ;
     }
    
    
A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

Parameters:
snapshotIdentifier A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

 
     public void setSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
     }
    
    
A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

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

Parameters:
snapshotIdentifier A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateClusterSnapshotRequest withSnapshotIdentifier(String snapshotIdentifier) {
        this. = snapshotIdentifier;
        return this;
    }

    
The cluster identifier for which you want a snapshot.

Returns:
The cluster identifier for which you want a snapshot.
    public String getClusterIdentifier() {
        return ;
    }
    
    
The cluster identifier for which you want a snapshot.

Parameters:
clusterIdentifier The cluster identifier for which you want a snapshot.
    public void setClusterIdentifier(String clusterIdentifier) {
        this. = clusterIdentifier;
    }
    
    
The cluster identifier for which you want a snapshot.

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

Parameters:
clusterIdentifier The cluster identifier for which you want a snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateClusterSnapshotRequest withClusterIdentifier(String clusterIdentifier) {
        this. = clusterIdentifier;
        return this;
    }

    
A list of tag instances.

Returns:
A list of tag instances.
    public java.util.List<TaggetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of tag instances.

Parameters:
tags A list of tag instances.
    public void setTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
A list of tag instances.

NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(java.util.Collection) if you want to override the existing values.

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

Parameters:
tags A list of tag instances.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateClusterSnapshotRequest withTags(Tag... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<Tag>(tags.length));
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
A list of tag instances.

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

Parameters:
tags A list of tag instances.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        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 (getSnapshotIdentifier() != nullsb.append("SnapshotIdentifier: " + getSnapshotIdentifier() + ",");
        if (getClusterIdentifier() != nullsb.append("ClusterIdentifier: " + getClusterIdentifier() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSnapshotIdentifier() == null) ? 0 : getSnapshotIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateClusterSnapshotRequest == falsereturn false;
        
        if (other.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == nullreturn false;
        if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == falsereturn false
        if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == nullreturn false;
        if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (CreateClusterSnapshotRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X