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 AuthorizeSnapshotAccess operation.

Authorizes the specified AWS customer account to restore the specified snapshot.

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

 
 public class AuthorizeSnapshotAccessRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The identifier of the snapshot the account is authorized to restore.
 
     private String snapshotIdentifier;

    
The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
 
     private String snapshotClusterIdentifier;

    
The identifier of the AWS customer account authorized to restore the specified snapshot.
 
     private String accountWithRestoreAccess;

    
The identifier of the snapshot the account is authorized to restore.

Returns:
The identifier of the snapshot the account is authorized to restore.
 
     public String getSnapshotIdentifier() {
         return ;
     }
    
    
The identifier of the snapshot the account is authorized to restore.

Parameters:
snapshotIdentifier The identifier of the snapshot the account is authorized to restore.
 
     public void setSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
     }
    
    
The identifier of the snapshot the account is authorized to restore.

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

Parameters:
snapshotIdentifier The identifier of the snapshot the account is authorized to restore.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AuthorizeSnapshotAccessRequest withSnapshotIdentifier(String snapshotIdentifier) {
         this. = snapshotIdentifier;
         return this;
     }

    
The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

Returns:
The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
 
        return ;
    }
    
    
The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

Parameters:
snapshotClusterIdentifier The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
    public void setSnapshotClusterIdentifier(String snapshotClusterIdentifier) {
        this. = snapshotClusterIdentifier;
    }
    
    
The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.

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

Parameters:
snapshotClusterIdentifier The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AuthorizeSnapshotAccessRequest withSnapshotClusterIdentifier(String snapshotClusterIdentifier) {
        this. = snapshotClusterIdentifier;
        return this;
    }

    
The identifier of the AWS customer account authorized to restore the specified snapshot.

Returns:
The identifier of the AWS customer account authorized to restore the specified snapshot.
        return ;
    }
    
    
The identifier of the AWS customer account authorized to restore the specified snapshot.

Parameters:
accountWithRestoreAccess The identifier of the AWS customer account authorized to restore the specified snapshot.
    public void setAccountWithRestoreAccess(String accountWithRestoreAccess) {
        this. = accountWithRestoreAccess;
    }
    
    
The identifier of the AWS customer account authorized to restore the specified snapshot.

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

Parameters:
accountWithRestoreAccess The identifier of the AWS customer account authorized to restore the specified snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AuthorizeSnapshotAccessRequest withAccountWithRestoreAccess(String accountWithRestoreAccess) {
        this. = accountWithRestoreAccess;
        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 (getSnapshotClusterIdentifier() != nullsb.append("SnapshotClusterIdentifier: " + getSnapshotClusterIdentifier() + ",");
        if (getAccountWithRestoreAccess() != nullsb.append("AccountWithRestoreAccess: " + getAccountWithRestoreAccess() );
        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 + ((getSnapshotClusterIdentifier() == null) ? 0 : getSnapshotClusterIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getAccountWithRestoreAccess() == null) ? 0 : getAccountWithRestoreAccess().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof AuthorizeSnapshotAccessRequest == falsereturn false;
        
        if (other.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == nullreturn false;
        if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == falsereturn false
        if (other.getSnapshotClusterIdentifier() == null ^ this.getSnapshotClusterIdentifier() == nullreturn false;
        if (other.getSnapshotClusterIdentifier() != null && other.getSnapshotClusterIdentifier().equals(this.getSnapshotClusterIdentifier()) == falsereturn false
        if (other.getAccountWithRestoreAccess() == null ^ this.getAccountWithRestoreAccess() == nullreturn false;
        if (other.getAccountWithRestoreAccess() != null && other.getAccountWithRestoreAccess().equals(this.getAccountWithRestoreAccess()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (AuthorizeSnapshotAccessRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X