@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; }
/** * 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(); }
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)
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; }
/** * 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(); }
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)
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; }