setSourceDBSnapshotIdentifier(sourceDBSnapshotIdentifier); return this;
setTargetDBSnapshotIdentifier(targetDBSnapshotIdentifier); return this;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceDBSnapshotIdentifier() == null) ? 0 : getSourceDBSnapshotIdentifier().hashCode()); hashCode = prime * hashCode + ((getTargetDBSnapshotIdentifier() == null) ? 0 : getTargetDBSnapshotIdentifier().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getCopyTags() == null) ? 0 : getCopyTags().hashCode()); hashCode = prime * hashCode + ((getPreSignedUrl() == null) ? 0 : getPreSignedUrl().hashCode()); hashCode = prime * hashCode + ((getOptionGroupName() == null) ? 0 : getOptionGroupName().hashCode()); hashCode = prime * hashCode + ((getSourceRegion() == null) ? 0 : getSourceRegion().hashCode()); return hashCode; }
AmazonRDSClient rdsClient = new AmazonRDSClient(/*add your credentials and the proper constructor overload*/); rdsClient.setRegion(Region.getRegion(Regions.EU_CENTRAL_1)); CopyDBSnapshotRequest copySnapshot = new CopyDBSnapshotRequest(); copySnapshot.setSourceDBSnapshotIdentifier("arn:aws:rds:us-east-1:123456789012:snapshot:mysql-instance1-snapshot-20130805"); copySnapshot.setTargetDBSnapshotIdentifier("mysql-instance1-snapshot-20130805-copy"); DBSnapshot dbSnapshot = rdsClient.copyDBSnapshot(copySnapshot);
@Override public String getSourceRegion() { return originalRequest.getSourceRegion(); }
@Override public String getPreSignedUrl() { return originalRequest.getPreSignedUrl(); }
@Override public String getSourceRegion() { return originalRequest.getSourceRegion(); }
@Override public String getPreSignedUrl() { return originalRequest.getPreSignedUrl(); }
return false; CopyDBSnapshotRequest other = (CopyDBSnapshotRequest) obj; if (other.getSourceDBSnapshotIdentifier() == null ^ this.getSourceDBSnapshotIdentifier() == null) return false; if (other.getSourceDBSnapshotIdentifier() != null && other.getSourceDBSnapshotIdentifier().equals(this.getSourceDBSnapshotIdentifier()) == false) return false; if (other.getTargetDBSnapshotIdentifier() == null ^ this.getTargetDBSnapshotIdentifier() == null) return false; if (other.getTargetDBSnapshotIdentifier() != null && other.getTargetDBSnapshotIdentifier().equals(this.getTargetDBSnapshotIdentifier()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getCopyTags() == null ^ this.getCopyTags() == null) return false; if (other.getCopyTags() != null && other.getCopyTags().equals(this.getCopyTags()) == false) return false; if (other.getPreSignedUrl() == null ^ this.getPreSignedUrl() == null) return false; if (other.getPreSignedUrl() != null && other.getPreSignedUrl().equals(this.getPreSignedUrl()) == false) return false; if (other.getOptionGroupName() == null ^ this.getOptionGroupName() == null) return false; if (other.getOptionGroupName() != null && other.getOptionGroupName().equals(this.getOptionGroupName()) == false)
setTargetDBSnapshotIdentifier(targetDBSnapshotIdentifier); return this;
setSourceDBSnapshotIdentifier(sourceDBSnapshotIdentifier); return this;
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSourceDBSnapshotIdentifier() != null) sb.append("SourceDBSnapshotIdentifier: ").append(getSourceDBSnapshotIdentifier()).append(","); if (getTargetDBSnapshotIdentifier() != null) sb.append("TargetDBSnapshotIdentifier: ").append(getTargetDBSnapshotIdentifier()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getCopyTags() != null) sb.append("CopyTags: ").append(getCopyTags()).append(","); if (getPreSignedUrl() != null) sb.append("PreSignedUrl: ").append(getPreSignedUrl()).append(","); if (getOptionGroupName() != null) sb.append("OptionGroupName: ").append(getOptionGroupName()).append(","); if (getSourceRegion() != null) sb.append("SourceRegion: ").append(getSourceRegion()); sb.append("}"); return sb.toString();
request.setHttpMethod(HttpMethodName.POST); if (copyDBSnapshotRequest.getSourceDBSnapshotIdentifier() != null) { request.addParameter("SourceDBSnapshotIdentifier", StringUtils.fromString(copyDBSnapshotRequest.getSourceDBSnapshotIdentifier())); if (copyDBSnapshotRequest.getTargetDBSnapshotIdentifier() != null) { request.addParameter("TargetDBSnapshotIdentifier", StringUtils.fromString(copyDBSnapshotRequest.getTargetDBSnapshotIdentifier())); if (copyDBSnapshotRequest.getKmsKeyId() != null) { request.addParameter("KmsKeyId", StringUtils.fromString(copyDBSnapshotRequest.getKmsKeyId())); if (!copyDBSnapshotRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) copyDBSnapshotRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) copyDBSnapshotRequest.getTags(); int tagsListIndex = 1; if (copyDBSnapshotRequest.getCopyTags() != null) { request.addParameter("CopyTags", StringUtils.fromBoolean(copyDBSnapshotRequest.getCopyTags())); if (copyDBSnapshotRequest.getPreSignedUrl() != null) { request.addParameter("PreSignedUrl", StringUtils.fromString(copyDBSnapshotRequest.getPreSignedUrl())); if (copyDBSnapshotRequest.getOptionGroupName() != null) { request.addParameter("OptionGroupName", StringUtils.fromString(copyDBSnapshotRequest.getOptionGroupName())); if (copyDBSnapshotRequest.getSourceRegion() != null) { request.addParameter("SourceRegion", StringUtils.fromString(copyDBSnapshotRequest.getSourceRegion()));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceDBSnapshotIdentifier() == null) ? 0 : getSourceDBSnapshotIdentifier().hashCode()); hashCode = prime * hashCode + ((getTargetDBSnapshotIdentifier() == null) ? 0 : getTargetDBSnapshotIdentifier().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getCopyTags() == null) ? 0 : getCopyTags().hashCode()); hashCode = prime * hashCode + ((getPreSignedUrl() == null) ? 0 : getPreSignedUrl().hashCode()); hashCode = prime * hashCode + ((getOptionGroupName() == null) ? 0 : getOptionGroupName().hashCode()); hashCode = prime * hashCode + ((getSourceRegion() == null) ? 0 : getSourceRegion().hashCode()); return hashCode; }
return false; CopyDBSnapshotRequest other = (CopyDBSnapshotRequest) obj; if (other.getSourceDBSnapshotIdentifier() == null ^ this.getSourceDBSnapshotIdentifier() == null) return false; if (other.getSourceDBSnapshotIdentifier() != null && other.getSourceDBSnapshotIdentifier().equals(this.getSourceDBSnapshotIdentifier()) == false) return false; if (other.getTargetDBSnapshotIdentifier() == null ^ this.getTargetDBSnapshotIdentifier() == null) return false; if (other.getTargetDBSnapshotIdentifier() != null && other.getTargetDBSnapshotIdentifier().equals(this.getTargetDBSnapshotIdentifier()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getCopyTags() == null ^ this.getCopyTags() == null) return false; if (other.getCopyTags() != null && other.getCopyTags().equals(this.getCopyTags()) == false) return false; if (other.getPreSignedUrl() == null ^ this.getPreSignedUrl() == null) return false; if (other.getPreSignedUrl() != null && other.getPreSignedUrl().equals(this.getPreSignedUrl()) == false) return false; if (other.getOptionGroupName() == null ^ this.getOptionGroupName() == null) return false; if (other.getOptionGroupName() != null && other.getOptionGroupName().equals(this.getOptionGroupName()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSourceDBSnapshotIdentifier() != null) sb.append("SourceDBSnapshotIdentifier: ").append(getSourceDBSnapshotIdentifier()).append(","); if (getTargetDBSnapshotIdentifier() != null) sb.append("TargetDBSnapshotIdentifier: ").append(getTargetDBSnapshotIdentifier()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getCopyTags() != null) sb.append("CopyTags: ").append(getCopyTags()).append(","); if (getPreSignedUrl() != null) sb.append("PreSignedUrl: ").append(getPreSignedUrl()).append(","); if (getOptionGroupName() != null) sb.append("OptionGroupName: ").append(getOptionGroupName()).append(","); if (getSourceRegion() != null) sb.append("SourceRegion: ").append(getSourceRegion()); sb.append("}"); return sb.toString();
request.setHttpMethod(HttpMethodName.POST); if (copyDBSnapshotRequest.getSourceDBSnapshotIdentifier() != null) { request.addParameter("SourceDBSnapshotIdentifier", StringUtils.fromString(copyDBSnapshotRequest.getSourceDBSnapshotIdentifier())); if (copyDBSnapshotRequest.getTargetDBSnapshotIdentifier() != null) { request.addParameter("TargetDBSnapshotIdentifier", StringUtils.fromString(copyDBSnapshotRequest.getTargetDBSnapshotIdentifier())); if (copyDBSnapshotRequest.getKmsKeyId() != null) { request.addParameter("KmsKeyId", StringUtils.fromString(copyDBSnapshotRequest.getKmsKeyId())); if (!copyDBSnapshotRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) copyDBSnapshotRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) copyDBSnapshotRequest.getTags(); int tagsListIndex = 1; if (copyDBSnapshotRequest.getCopyTags() != null) { request.addParameter("CopyTags", StringUtils.fromBoolean(copyDBSnapshotRequest.getCopyTags())); if (copyDBSnapshotRequest.getPreSignedUrl() != null) { request.addParameter("PreSignedUrl", StringUtils.fromString(copyDBSnapshotRequest.getPreSignedUrl())); if (copyDBSnapshotRequest.getOptionGroupName() != null) { request.addParameter("OptionGroupName", StringUtils.fromString(copyDBSnapshotRequest.getOptionGroupName())); if (copyDBSnapshotRequest.getSourceRegion() != null) { request.addParameter("SourceRegion", StringUtils.fromString(copyDBSnapshotRequest.getSourceRegion()));