/* * Copyright 2018-2023 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; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RestoreTableFromClusterSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The identifier of the Amazon Redshift cluster to restore the table to. *
*/ private String clusterIdentifier; /** *
* The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon
* Redshift cluster specified by the ClusterIdentifier
parameter.
*
* The name of the source database that contains the table to restore from. *
*/ private String sourceDatabaseName; /** *
* The name of the source schema that contains the table to restore from. If you do not specify a
* SourceSchemaName
value, the default is public
.
*
* The name of the source table to restore from. *
*/ private String sourceTableName; /** ** The name of the database to restore the table to. *
*/ private String targetDatabaseName; /** ** The name of the schema to restore the table to. *
*/ private String targetSchemaName; /** ** The name of the table to create as a result of the current request. *
*/ private String newTableName; /** *
* Indicates whether name identifiers for database, schema, and table are case sensitive. If true
, the
* names are case sensitive. If false
(default), the names are not case sensitive.
*
* The identifier of the Amazon Redshift cluster to restore the table to. *
* * @param clusterIdentifier * The identifier of the Amazon Redshift cluster to restore the table to. */ public void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } /** ** The identifier of the Amazon Redshift cluster to restore the table to. *
* * @return The identifier of the Amazon Redshift cluster to restore the table to. */ public String getClusterIdentifier() { return this.clusterIdentifier; } /** ** The identifier of the Amazon Redshift cluster to restore the table to. *
* * @param clusterIdentifier * The identifier of the Amazon Redshift cluster to restore the table to. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreTableFromClusterSnapshotRequest withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; } /** *
* The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon
* Redshift cluster specified by the ClusterIdentifier
parameter.
*
ClusterIdentifier
parameter.
*/
public void setSnapshotIdentifier(String snapshotIdentifier) {
this.snapshotIdentifier = snapshotIdentifier;
}
/**
*
* The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon
* Redshift cluster specified by the ClusterIdentifier
parameter.
*
ClusterIdentifier
parameter.
*/
public String getSnapshotIdentifier() {
return this.snapshotIdentifier;
}
/**
*
* The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon
* Redshift cluster specified by the ClusterIdentifier
parameter.
*
ClusterIdentifier
parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromClusterSnapshotRequest withSnapshotIdentifier(String snapshotIdentifier) {
setSnapshotIdentifier(snapshotIdentifier);
return this;
}
/**
* * The name of the source database that contains the table to restore from. *
* * @param sourceDatabaseName * The name of the source database that contains the table to restore from. */ public void setSourceDatabaseName(String sourceDatabaseName) { this.sourceDatabaseName = sourceDatabaseName; } /** ** The name of the source database that contains the table to restore from. *
* * @return The name of the source database that contains the table to restore from. */ public String getSourceDatabaseName() { return this.sourceDatabaseName; } /** ** The name of the source database that contains the table to restore from. *
* * @param sourceDatabaseName * The name of the source database that contains the table to restore from. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreTableFromClusterSnapshotRequest withSourceDatabaseName(String sourceDatabaseName) { setSourceDatabaseName(sourceDatabaseName); return this; } /** *
* The name of the source schema that contains the table to restore from. If you do not specify a
* SourceSchemaName
value, the default is public
.
*
SourceSchemaName
value, the default is public
.
*/
public void setSourceSchemaName(String sourceSchemaName) {
this.sourceSchemaName = sourceSchemaName;
}
/**
*
* The name of the source schema that contains the table to restore from. If you do not specify a
* SourceSchemaName
value, the default is public
.
*
SourceSchemaName
value, the default is public
.
*/
public String getSourceSchemaName() {
return this.sourceSchemaName;
}
/**
*
* The name of the source schema that contains the table to restore from. If you do not specify a
* SourceSchemaName
value, the default is public
.
*
SourceSchemaName
value, the default is public
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromClusterSnapshotRequest withSourceSchemaName(String sourceSchemaName) {
setSourceSchemaName(sourceSchemaName);
return this;
}
/**
* * The name of the source table to restore from. *
* * @param sourceTableName * The name of the source table to restore from. */ public void setSourceTableName(String sourceTableName) { this.sourceTableName = sourceTableName; } /** ** The name of the source table to restore from. *
* * @return The name of the source table to restore from. */ public String getSourceTableName() { return this.sourceTableName; } /** ** The name of the source table to restore from. *
* * @param sourceTableName * The name of the source table to restore from. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreTableFromClusterSnapshotRequest withSourceTableName(String sourceTableName) { setSourceTableName(sourceTableName); return this; } /** ** The name of the database to restore the table to. *
* * @param targetDatabaseName * The name of the database to restore the table to. */ public void setTargetDatabaseName(String targetDatabaseName) { this.targetDatabaseName = targetDatabaseName; } /** ** The name of the database to restore the table to. *
* * @return The name of the database to restore the table to. */ public String getTargetDatabaseName() { return this.targetDatabaseName; } /** ** The name of the database to restore the table to. *
* * @param targetDatabaseName * The name of the database to restore the table to. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreTableFromClusterSnapshotRequest withTargetDatabaseName(String targetDatabaseName) { setTargetDatabaseName(targetDatabaseName); return this; } /** ** The name of the schema to restore the table to. *
* * @param targetSchemaName * The name of the schema to restore the table to. */ public void setTargetSchemaName(String targetSchemaName) { this.targetSchemaName = targetSchemaName; } /** ** The name of the schema to restore the table to. *
* * @return The name of the schema to restore the table to. */ public String getTargetSchemaName() { return this.targetSchemaName; } /** ** The name of the schema to restore the table to. *
* * @param targetSchemaName * The name of the schema to restore the table to. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreTableFromClusterSnapshotRequest withTargetSchemaName(String targetSchemaName) { setTargetSchemaName(targetSchemaName); return this; } /** ** The name of the table to create as a result of the current request. *
* * @param newTableName * The name of the table to create as a result of the current request. */ public void setNewTableName(String newTableName) { this.newTableName = newTableName; } /** ** The name of the table to create as a result of the current request. *
* * @return The name of the table to create as a result of the current request. */ public String getNewTableName() { return this.newTableName; } /** ** The name of the table to create as a result of the current request. *
* * @param newTableName * The name of the table to create as a result of the current request. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreTableFromClusterSnapshotRequest withNewTableName(String newTableName) { setNewTableName(newTableName); return this; } /** *
* Indicates whether name identifiers for database, schema, and table are case sensitive. If true
, the
* names are case sensitive. If false
(default), the names are not case sensitive.
*
true
, the names are case sensitive. If false
(default), the names are not case
* sensitive.
*/
public void setEnableCaseSensitiveIdentifier(Boolean enableCaseSensitiveIdentifier) {
this.enableCaseSensitiveIdentifier = enableCaseSensitiveIdentifier;
}
/**
*
* Indicates whether name identifiers for database, schema, and table are case sensitive. If true
, the
* names are case sensitive. If false
(default), the names are not case sensitive.
*
true
, the names are case sensitive. If false
(default), the names are not case
* sensitive.
*/
public Boolean getEnableCaseSensitiveIdentifier() {
return this.enableCaseSensitiveIdentifier;
}
/**
*
* Indicates whether name identifiers for database, schema, and table are case sensitive. If true
, the
* names are case sensitive. If false
(default), the names are not case sensitive.
*
true
, the names are case sensitive. If false
(default), the names are not case
* sensitive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromClusterSnapshotRequest withEnableCaseSensitiveIdentifier(Boolean enableCaseSensitiveIdentifier) {
setEnableCaseSensitiveIdentifier(enableCaseSensitiveIdentifier);
return this;
}
/**
*
* Indicates whether name identifiers for database, schema, and table are case sensitive. If true
, the
* names are case sensitive. If false
(default), the names are not case sensitive.
*
true
, the names are case sensitive. If false
(default), the names are not case
* sensitive.
*/
public Boolean isEnableCaseSensitiveIdentifier() {
return this.enableCaseSensitiveIdentifier;
}
/**
* 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 (getSnapshotIdentifier() != null)
sb.append("SnapshotIdentifier: ").append(getSnapshotIdentifier()).append(",");
if (getSourceDatabaseName() != null)
sb.append("SourceDatabaseName: ").append(getSourceDatabaseName()).append(",");
if (getSourceSchemaName() != null)
sb.append("SourceSchemaName: ").append(getSourceSchemaName()).append(",");
if (getSourceTableName() != null)
sb.append("SourceTableName: ").append(getSourceTableName()).append(",");
if (getTargetDatabaseName() != null)
sb.append("TargetDatabaseName: ").append(getTargetDatabaseName()).append(",");
if (getTargetSchemaName() != null)
sb.append("TargetSchemaName: ").append(getTargetSchemaName()).append(",");
if (getNewTableName() != null)
sb.append("NewTableName: ").append(getNewTableName()).append(",");
if (getEnableCaseSensitiveIdentifier() != null)
sb.append("EnableCaseSensitiveIdentifier: ").append(getEnableCaseSensitiveIdentifier());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RestoreTableFromClusterSnapshotRequest == false)
return false;
RestoreTableFromClusterSnapshotRequest other = (RestoreTableFromClusterSnapshotRequest) obj;
if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null)
return false;
if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == false)
return false;
if (other.getSnapshotIdentifier() == null ^ this.getSnapshotIdentifier() == null)
return false;
if (other.getSnapshotIdentifier() != null && other.getSnapshotIdentifier().equals(this.getSnapshotIdentifier()) == false)
return false;
if (other.getSourceDatabaseName() == null ^ this.getSourceDatabaseName() == null)
return false;
if (other.getSourceDatabaseName() != null && other.getSourceDatabaseName().equals(this.getSourceDatabaseName()) == false)
return false;
if (other.getSourceSchemaName() == null ^ this.getSourceSchemaName() == null)
return false;
if (other.getSourceSchemaName() != null && other.getSourceSchemaName().equals(this.getSourceSchemaName()) == false)
return false;
if (other.getSourceTableName() == null ^ this.getSourceTableName() == null)
return false;
if (other.getSourceTableName() != null && other.getSourceTableName().equals(this.getSourceTableName()) == false)
return false;
if (other.getTargetDatabaseName() == null ^ this.getTargetDatabaseName() == null)
return false;
if (other.getTargetDatabaseName() != null && other.getTargetDatabaseName().equals(this.getTargetDatabaseName()) == false)
return false;
if (other.getTargetSchemaName() == null ^ this.getTargetSchemaName() == null)
return false;
if (other.getTargetSchemaName() != null && other.getTargetSchemaName().equals(this.getTargetSchemaName()) == false)
return false;
if (other.getNewTableName() == null ^ this.getNewTableName() == null)
return false;
if (other.getNewTableName() != null && other.getNewTableName().equals(this.getNewTableName()) == false)
return false;
if (other.getEnableCaseSensitiveIdentifier() == null ^ this.getEnableCaseSensitiveIdentifier() == null)
return false;
if (other.getEnableCaseSensitiveIdentifier() != null
&& other.getEnableCaseSensitiveIdentifier().equals(this.getEnableCaseSensitiveIdentifier()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode());
hashCode = prime * hashCode + ((getSnapshotIdentifier() == null) ? 0 : getSnapshotIdentifier().hashCode());
hashCode = prime * hashCode + ((getSourceDatabaseName() == null) ? 0 : getSourceDatabaseName().hashCode());
hashCode = prime * hashCode + ((getSourceSchemaName() == null) ? 0 : getSourceSchemaName().hashCode());
hashCode = prime * hashCode + ((getSourceTableName() == null) ? 0 : getSourceTableName().hashCode());
hashCode = prime * hashCode + ((getTargetDatabaseName() == null) ? 0 : getTargetDatabaseName().hashCode());
hashCode = prime * hashCode + ((getTargetSchemaName() == null) ? 0 : getTargetSchemaName().hashCode());
hashCode = prime * hashCode + ((getNewTableName() == null) ? 0 : getNewTableName().hashCode());
hashCode = prime * hashCode + ((getEnableCaseSensitiveIdentifier() == null) ? 0 : getEnableCaseSensitiveIdentifier().hashCode());
return hashCode;
}
@Override
public RestoreTableFromClusterSnapshotRequest clone() {
return (RestoreTableFromClusterSnapshotRequest) super.clone();
}
}