@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getDestinationRegion() == null) ? 0 : getDestinationRegion().hashCode()); hashCode = prime * hashCode + ((getRetentionPeriod() == null) ? 0 : getRetentionPeriod().hashCode()); hashCode = prime * hashCode + ((getSnapshotCopyGrantName() == null) ? 0 : getSnapshotCopyGrantName().hashCode()); hashCode = prime * hashCode + ((getManualSnapshotRetentionPeriod() == null) ? 0 : getManualSnapshotRetentionPeriod().hashCode()); return hashCode; }
/** * <p> * The unique identifier of the source cluster to copy snapshots from. * </p> * <p> * Constraints: Must be the valid name of an existing cluster that does not already have cross-region snapshot copy * enabled. * </p> * * @param clusterIdentifier * The unique identifier of the source cluster to copy snapshots from.</p> * <p> * Constraints: Must be the valid name of an existing cluster that does not already have cross-region * snapshot copy enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; }
/** * <p> * The destination AWS Region that you want to copy snapshots to. * </p> * <p> * Constraints: Must be the name of a valid AWS Region. For more information, see <a * href="http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region">Regions and Endpoints</a> in the * Amazon Web Services General Reference. * </p> * * @param destinationRegion * The destination AWS Region that you want to copy snapshots to.</p> * <p> * Constraints: Must be the name of a valid AWS Region. For more information, see <a * href="http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region">Regions and Endpoints</a> * in the Amazon Web Services General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withDestinationRegion(String destinationRegion) { setDestinationRegion(destinationRegion); return this; }
/** * <p> * The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the * destination region. * </p> * * @param snapshotCopyGrantName * The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to * the destination region. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withSnapshotCopyGrantName(String snapshotCopyGrantName) { setSnapshotCopyGrantName(snapshotCopyGrantName); return this; }
/** * <p> * The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the * source AWS Region. If the value is -1, the manual snapshot is retained indefinitely. * </p> * <p> * The value must be either -1 or an integer between 1 and 3,653. * </p> * * @param manualSnapshotRetentionPeriod * The number of days to retain newly copied snapshots in the destination AWS Region after they are copied * from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely. </p> * <p> * The value must be either -1 or an integer between 1 and 3,653. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withManualSnapshotRetentionPeriod(Integer manualSnapshotRetentionPeriod) { setManualSnapshotRetentionPeriod(manualSnapshotRetentionPeriod); return this; }
/** * <p> * The number of days to retain automated snapshots in the destination region after they are copied from the source * region. * </p> * <p> * Default: 7. * </p> * <p> * Constraints: Must be at least 1 and no more than 35. * </p> * * @param retentionPeriod * The number of days to retain automated snapshots in the destination region after they are copied from the * source region.</p> * <p> * Default: 7. * </p> * <p> * Constraints: Must be at least 1 and no more than 35. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withRetentionPeriod(Integer retentionPeriod) { setRetentionPeriod(retentionPeriod); return this; }
/** * <p> * The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the * destination region. * </p> * * @param snapshotCopyGrantName * The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to * the destination region. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withSnapshotCopyGrantName(String snapshotCopyGrantName) { setSnapshotCopyGrantName(snapshotCopyGrantName); return this; }
/** * <p> * The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the * source AWS Region. If the value is -1, the manual snapshot is retained indefinitely. * </p> * <p> * The value must be either -1 or an integer between 1 and 3,653. * </p> * * @param manualSnapshotRetentionPeriod * The number of days to retain newly copied snapshots in the destination AWS Region after they are copied * from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely. </p> * <p> * The value must be either -1 or an integer between 1 and 3,653. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withManualSnapshotRetentionPeriod(Integer manualSnapshotRetentionPeriod) { setManualSnapshotRetentionPeriod(manualSnapshotRetentionPeriod); return this; }
/** * <p> * The number of days to retain automated snapshots in the destination region after they are copied from the source * region. * </p> * <p> * Default: 7. * </p> * <p> * Constraints: Must be at least 1 and no more than 35. * </p> * * @param retentionPeriod * The number of days to retain automated snapshots in the destination region after they are copied from the * source region.</p> * <p> * Default: 7. * </p> * <p> * Constraints: Must be at least 1 and no more than 35. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withRetentionPeriod(Integer retentionPeriod) { setRetentionPeriod(retentionPeriod); return this; }
return false; EnableSnapshotCopyRequest other = (EnableSnapshotCopyRequest) obj; if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null) return false; if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == false) return false; if (other.getDestinationRegion() == null ^ this.getDestinationRegion() == null) return false; if (other.getDestinationRegion() != null && other.getDestinationRegion().equals(this.getDestinationRegion()) == false) return false; if (other.getRetentionPeriod() == null ^ this.getRetentionPeriod() == null) return false; if (other.getRetentionPeriod() != null && other.getRetentionPeriod().equals(this.getRetentionPeriod()) == false) return false; if (other.getSnapshotCopyGrantName() == null ^ this.getSnapshotCopyGrantName() == null) return false; if (other.getSnapshotCopyGrantName() != null && other.getSnapshotCopyGrantName().equals(this.getSnapshotCopyGrantName()) == false) return false; if (other.getManualSnapshotRetentionPeriod() == null ^ this.getManualSnapshotRetentionPeriod() == null) return false; if (other.getManualSnapshotRetentionPeriod() != null && other.getManualSnapshotRetentionPeriod().equals(this.getManualSnapshotRetentionPeriod()) == false) return false; return true;
/** * <p> * The unique identifier of the source cluster to copy snapshots from. * </p> * <p> * Constraints: Must be the valid name of an existing cluster that does not already have cross-region snapshot copy * enabled. * </p> * * @param clusterIdentifier * The unique identifier of the source cluster to copy snapshots from.</p> * <p> * Constraints: Must be the valid name of an existing cluster that does not already have cross-region * snapshot copy enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; }
/** * <p> * The destination AWS Region that you want to copy snapshots to. * </p> * <p> * Constraints: Must be the name of a valid AWS Region. For more information, see <a * href="http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region">Regions and Endpoints</a> in the * Amazon Web Services General Reference. * </p> * * @param destinationRegion * The destination AWS Region that you want to copy snapshots to.</p> * <p> * Constraints: Must be the name of a valid AWS Region. For more information, see <a * href="http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region">Regions and Endpoints</a> * in the Amazon Web Services General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableSnapshotCopyRequest withDestinationRegion(String destinationRegion) { setDestinationRegion(destinationRegion); 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 (getClusterIdentifier() != null) sb.append("ClusterIdentifier: ").append(getClusterIdentifier()).append(","); if (getDestinationRegion() != null) sb.append("DestinationRegion: ").append(getDestinationRegion()).append(","); if (getRetentionPeriod() != null) sb.append("RetentionPeriod: ").append(getRetentionPeriod()).append(","); if (getSnapshotCopyGrantName() != null) sb.append("SnapshotCopyGrantName: ").append(getSnapshotCopyGrantName()).append(","); if (getManualSnapshotRetentionPeriod() != null) sb.append("ManualSnapshotRetentionPeriod: ").append(getManualSnapshotRetentionPeriod()); sb.append("}"); return sb.toString(); }
public Request<EnableSnapshotCopyRequest> marshall(EnableSnapshotCopyRequest enableSnapshotCopyRequest) { if (enableSnapshotCopyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<EnableSnapshotCopyRequest> request = new DefaultRequest<EnableSnapshotCopyRequest>(enableSnapshotCopyRequest, "AmazonRedshift"); request.addParameter("Action", "EnableSnapshotCopy"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (enableSnapshotCopyRequest.getClusterIdentifier() != null) { request.addParameter("ClusterIdentifier", StringUtils.fromString(enableSnapshotCopyRequest.getClusterIdentifier())); } if (enableSnapshotCopyRequest.getDestinationRegion() != null) { request.addParameter("DestinationRegion", StringUtils.fromString(enableSnapshotCopyRequest.getDestinationRegion())); } if (enableSnapshotCopyRequest.getRetentionPeriod() != null) { request.addParameter("RetentionPeriod", StringUtils.fromInteger(enableSnapshotCopyRequest.getRetentionPeriod())); } if (enableSnapshotCopyRequest.getSnapshotCopyGrantName() != null) { request.addParameter("SnapshotCopyGrantName", StringUtils.fromString(enableSnapshotCopyRequest.getSnapshotCopyGrantName())); } if (enableSnapshotCopyRequest.getManualSnapshotRetentionPeriod() != null) { request.addParameter("ManualSnapshotRetentionPeriod", StringUtils.fromInteger(enableSnapshotCopyRequest.getManualSnapshotRetentionPeriod())); } return request; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getDestinationRegion() == null) ? 0 : getDestinationRegion().hashCode()); hashCode = prime * hashCode + ((getRetentionPeriod() == null) ? 0 : getRetentionPeriod().hashCode()); hashCode = prime * hashCode + ((getSnapshotCopyGrantName() == null) ? 0 : getSnapshotCopyGrantName().hashCode()); hashCode = prime * hashCode + ((getManualSnapshotRetentionPeriod() == null) ? 0 : getManualSnapshotRetentionPeriod().hashCode()); return hashCode; }
return false; EnableSnapshotCopyRequest other = (EnableSnapshotCopyRequest) obj; if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null) return false; if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == false) return false; if (other.getDestinationRegion() == null ^ this.getDestinationRegion() == null) return false; if (other.getDestinationRegion() != null && other.getDestinationRegion().equals(this.getDestinationRegion()) == false) return false; if (other.getRetentionPeriod() == null ^ this.getRetentionPeriod() == null) return false; if (other.getRetentionPeriod() != null && other.getRetentionPeriod().equals(this.getRetentionPeriod()) == false) return false; if (other.getSnapshotCopyGrantName() == null ^ this.getSnapshotCopyGrantName() == null) return false; if (other.getSnapshotCopyGrantName() != null && other.getSnapshotCopyGrantName().equals(this.getSnapshotCopyGrantName()) == false) return false; if (other.getManualSnapshotRetentionPeriod() == null ^ this.getManualSnapshotRetentionPeriod() == null) return false; if (other.getManualSnapshotRetentionPeriod() != null && other.getManualSnapshotRetentionPeriod().equals(this.getManualSnapshotRetentionPeriod()) == 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 (getClusterIdentifier() != null) sb.append("ClusterIdentifier: ").append(getClusterIdentifier()).append(","); if (getDestinationRegion() != null) sb.append("DestinationRegion: ").append(getDestinationRegion()).append(","); if (getRetentionPeriod() != null) sb.append("RetentionPeriod: ").append(getRetentionPeriod()).append(","); if (getSnapshotCopyGrantName() != null) sb.append("SnapshotCopyGrantName: ").append(getSnapshotCopyGrantName()).append(","); if (getManualSnapshotRetentionPeriod() != null) sb.append("ManualSnapshotRetentionPeriod: ").append(getManualSnapshotRetentionPeriod()); sb.append("}"); return sb.toString(); }
public Request<EnableSnapshotCopyRequest> marshall(EnableSnapshotCopyRequest enableSnapshotCopyRequest) { if (enableSnapshotCopyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<EnableSnapshotCopyRequest> request = new DefaultRequest<EnableSnapshotCopyRequest>(enableSnapshotCopyRequest, "AmazonRedshift"); request.addParameter("Action", "EnableSnapshotCopy"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (enableSnapshotCopyRequest.getClusterIdentifier() != null) { request.addParameter("ClusterIdentifier", StringUtils.fromString(enableSnapshotCopyRequest.getClusterIdentifier())); } if (enableSnapshotCopyRequest.getDestinationRegion() != null) { request.addParameter("DestinationRegion", StringUtils.fromString(enableSnapshotCopyRequest.getDestinationRegion())); } if (enableSnapshotCopyRequest.getRetentionPeriod() != null) { request.addParameter("RetentionPeriod", StringUtils.fromInteger(enableSnapshotCopyRequest.getRetentionPeriod())); } if (enableSnapshotCopyRequest.getSnapshotCopyGrantName() != null) { request.addParameter("SnapshotCopyGrantName", StringUtils.fromString(enableSnapshotCopyRequest.getSnapshotCopyGrantName())); } if (enableSnapshotCopyRequest.getManualSnapshotRetentionPeriod() != null) { request.addParameter("ManualSnapshotRetentionPeriod", StringUtils.fromInteger(enableSnapshotCopyRequest.getManualSnapshotRetentionPeriod())); } return request; }