@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; }
/** * <p> * The identifier of the AWS customer account that can no longer restore the specified snapshot. * </p> * * @param accountWithRestoreAccess * The identifier of the AWS customer account that can no longer restore the specified snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public RevokeSnapshotAccessRequest withAccountWithRestoreAccess(String accountWithRestoreAccess) { setAccountWithRestoreAccess(accountWithRestoreAccess); return this; }
/** * <p> * 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. * </p> * * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public RevokeSnapshotAccessRequest withSnapshotClusterIdentifier(String snapshotClusterIdentifier) { setSnapshotClusterIdentifier(snapshotClusterIdentifier); return this; }
/** * <p> * The identifier of the snapshot that the account can no longer access. * </p> * * @param snapshotIdentifier * The identifier of the snapshot that the account can no longer access. * @return Returns a reference to this object so that method calls can be chained together. */ public RevokeSnapshotAccessRequest withSnapshotIdentifier(String snapshotIdentifier) { setSnapshotIdentifier(snapshotIdentifier); return this; }
/** * <p> * The identifier of the snapshot that the account can no longer access. * </p> * * @param snapshotIdentifier * The identifier of the snapshot that the account can no longer access. * @return Returns a reference to this object so that method calls can be chained together. */ public RevokeSnapshotAccessRequest withSnapshotIdentifier(String snapshotIdentifier) { setSnapshotIdentifier(snapshotIdentifier); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RevokeSnapshotAccessRequest == false) return false; RevokeSnapshotAccessRequest other = (RevokeSnapshotAccessRequest) obj; if (other.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == null) return false; if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == false) return false; if (other.getSnapshotClusterIdentifier() == null ^ this.getSnapshotClusterIdentifier() == null) return false; if (other.getSnapshotClusterIdentifier() != null && other.getSnapshotClusterIdentifier().equals(this.getSnapshotClusterIdentifier()) == false) return false; if (other.getAccountWithRestoreAccess() == null ^ this.getAccountWithRestoreAccess() == null) return false; if (other.getAccountWithRestoreAccess() != null && other.getAccountWithRestoreAccess().equals(this.getAccountWithRestoreAccess()) == false) return false; return true; }
/** * <p> * The identifier of the AWS customer account that can no longer restore the specified snapshot. * </p> * * @param accountWithRestoreAccess * The identifier of the AWS customer account that can no longer restore the specified snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public RevokeSnapshotAccessRequest withAccountWithRestoreAccess(String accountWithRestoreAccess) { setAccountWithRestoreAccess(accountWithRestoreAccess); return this; }
/** * <p> * 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. * </p> * * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public RevokeSnapshotAccessRequest withSnapshotClusterIdentifier(String snapshotClusterIdentifier) { setSnapshotClusterIdentifier(snapshotClusterIdentifier); 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 (getSnapshotIdentifier() != null) sb.append("SnapshotIdentifier: ").append(getSnapshotIdentifier()).append(","); if (getSnapshotClusterIdentifier() != null) sb.append("SnapshotClusterIdentifier: ").append(getSnapshotClusterIdentifier()).append(","); if (getAccountWithRestoreAccess() != null) sb.append("AccountWithRestoreAccess: ").append(getAccountWithRestoreAccess()); sb.append("}"); return sb.toString(); }
public Request<RevokeSnapshotAccessRequest> marshall(RevokeSnapshotAccessRequest revokeSnapshotAccessRequest) { if (revokeSnapshotAccessRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<RevokeSnapshotAccessRequest> request = new DefaultRequest<RevokeSnapshotAccessRequest>(revokeSnapshotAccessRequest, "AmazonRedshift"); request.addParameter("Action", "RevokeSnapshotAccess"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (revokeSnapshotAccessRequest.getSnapshotIdentifier() != null) { request.addParameter("SnapshotIdentifier", StringUtils.fromString(revokeSnapshotAccessRequest.getSnapshotIdentifier())); } if (revokeSnapshotAccessRequest.getSnapshotClusterIdentifier() != null) { request.addParameter("SnapshotClusterIdentifier", StringUtils.fromString(revokeSnapshotAccessRequest.getSnapshotClusterIdentifier())); } if (revokeSnapshotAccessRequest.getAccountWithRestoreAccess() != null) { request.addParameter("AccountWithRestoreAccess", StringUtils.fromString(revokeSnapshotAccessRequest.getAccountWithRestoreAccess())); } return request; }
@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 == obj) return true; if (obj == null) return false; if (obj instanceof RevokeSnapshotAccessRequest == false) return false; RevokeSnapshotAccessRequest other = (RevokeSnapshotAccessRequest) obj; if (other.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == null) return false; if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == false) return false; if (other.getSnapshotClusterIdentifier() == null ^ this.getSnapshotClusterIdentifier() == null) return false; if (other.getSnapshotClusterIdentifier() != null && other.getSnapshotClusterIdentifier().equals(this.getSnapshotClusterIdentifier()) == false) return false; if (other.getAccountWithRestoreAccess() == null ^ this.getAccountWithRestoreAccess() == null) return false; if (other.getAccountWithRestoreAccess() != null && other.getAccountWithRestoreAccess().equals(this.getAccountWithRestoreAccess()) == false) return false; return true; }
/** * 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 (getSnapshotIdentifier() != null) sb.append("SnapshotIdentifier: ").append(getSnapshotIdentifier()).append(","); if (getSnapshotClusterIdentifier() != null) sb.append("SnapshotClusterIdentifier: ").append(getSnapshotClusterIdentifier()).append(","); if (getAccountWithRestoreAccess() != null) sb.append("AccountWithRestoreAccess: ").append(getAccountWithRestoreAccess()); sb.append("}"); return sb.toString(); }
public Request<RevokeSnapshotAccessRequest> marshall(RevokeSnapshotAccessRequest revokeSnapshotAccessRequest) { if (revokeSnapshotAccessRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<RevokeSnapshotAccessRequest> request = new DefaultRequest<RevokeSnapshotAccessRequest>(revokeSnapshotAccessRequest, "AmazonRedshift"); request.addParameter("Action", "RevokeSnapshotAccess"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (revokeSnapshotAccessRequest.getSnapshotIdentifier() != null) { request.addParameter("SnapshotIdentifier", StringUtils.fromString(revokeSnapshotAccessRequest.getSnapshotIdentifier())); } if (revokeSnapshotAccessRequest.getSnapshotClusterIdentifier() != null) { request.addParameter("SnapshotClusterIdentifier", StringUtils.fromString(revokeSnapshotAccessRequest.getSnapshotClusterIdentifier())); } if (revokeSnapshotAccessRequest.getAccountWithRestoreAccess() != null) { request.addParameter("AccountWithRestoreAccess", StringUtils.fromString(revokeSnapshotAccessRequest.getAccountWithRestoreAccess())); } return request; }