com.amazonaws.services.redshiftdataapi.model.ExecuteStatementResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-redshiftdataapi Show documentation
/*
* Copyright 2019-2024 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.redshiftdataapi.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ExecuteStatementResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The cluster identifier. This element is not returned when connecting to a serverless workgroup.
*
*/
private String clusterIdentifier;
/**
*
* The date and time (UTC) the statement was created.
*
*/
private java.util.Date createdAt;
/**
*
* The name of the database.
*
*/
private String database;
/**
*
* The database user name.
*
*/
private String dbUser;
/**
*
* The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
*
*/
private String id;
/**
*
* The name or ARN of the secret that enables access to the database.
*
*/
private String secretArn;
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a
* provisioned cluster.
*
*/
private String workgroupName;
/**
*
* The cluster identifier. This element is not returned when connecting to a serverless workgroup.
*
*
* @param clusterIdentifier
* The cluster identifier. This element is not returned when connecting to a serverless workgroup.
*/
public void setClusterIdentifier(String clusterIdentifier) {
this.clusterIdentifier = clusterIdentifier;
}
/**
*
* The cluster identifier. This element is not returned when connecting to a serverless workgroup.
*
*
* @return The cluster identifier. This element is not returned when connecting to a serverless workgroup.
*/
public String getClusterIdentifier() {
return this.clusterIdentifier;
}
/**
*
* The cluster identifier. This element is not returned when connecting to a serverless workgroup.
*
*
* @param clusterIdentifier
* The cluster identifier. This element is not returned when connecting to a serverless workgroup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withClusterIdentifier(String clusterIdentifier) {
setClusterIdentifier(clusterIdentifier);
return this;
}
/**
*
* The date and time (UTC) the statement was created.
*
*
* @param createdAt
* The date and time (UTC) the statement was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time (UTC) the statement was created.
*
*
* @return The date and time (UTC) the statement was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time (UTC) the statement was created.
*
*
* @param createdAt
* The date and time (UTC) the statement was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The name of the database.
*
*
* @param database
* The name of the database.
*/
public void setDatabase(String database) {
this.database = database;
}
/**
*
* The name of the database.
*
*
* @return The name of the database.
*/
public String getDatabase() {
return this.database;
}
/**
*
* The name of the database.
*
*
* @param database
* The name of the database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withDatabase(String database) {
setDatabase(database);
return this;
}
/**
*
* The database user name.
*
*
* @param dbUser
* The database user name.
*/
public void setDbUser(String dbUser) {
this.dbUser = dbUser;
}
/**
*
* The database user name.
*
*
* @return The database user name.
*/
public String getDbUser() {
return this.dbUser;
}
/**
*
* The database user name.
*
*
* @param dbUser
* The database user name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withDbUser(String dbUser) {
setDbUser(dbUser);
return this;
}
/**
*
* The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
*
*
* @param id
* The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
*
*
* @return The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
*/
public String getId() {
return this.id;
}
/**
*
* The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
*
*
* @param id
* The identifier of the SQL statement whose results are to be fetched. This value is a universally unique
* identifier (UUID) generated by Amazon Redshift Data API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withId(String id) {
setId(id);
return this;
}
/**
*
* The name or ARN of the secret that enables access to the database.
*
*
* @param secretArn
* The name or ARN of the secret that enables access to the database.
*/
public void setSecretArn(String secretArn) {
this.secretArn = secretArn;
}
/**
*
* The name or ARN of the secret that enables access to the database.
*
*
* @return The name or ARN of the secret that enables access to the database.
*/
public String getSecretArn() {
return this.secretArn;
}
/**
*
* The name or ARN of the secret that enables access to the database.
*
*
* @param secretArn
* The name or ARN of the secret that enables access to the database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withSecretArn(String secretArn) {
setSecretArn(secretArn);
return this;
}
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a
* provisioned cluster.
*
*
* @param workgroupName
* The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting
* to a provisioned cluster.
*/
public void setWorkgroupName(String workgroupName) {
this.workgroupName = workgroupName;
}
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a
* provisioned cluster.
*
*
* @return The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting
* to a provisioned cluster.
*/
public String getWorkgroupName() {
return this.workgroupName;
}
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a
* provisioned cluster.
*
*
* @param workgroupName
* The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting
* to a provisioned cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecuteStatementResult withWorkgroupName(String workgroupName) {
setWorkgroupName(workgroupName);
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 (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDatabase() != null)
sb.append("Database: ").append(getDatabase()).append(",");
if (getDbUser() != null)
sb.append("DbUser: ").append(getDbUser()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getSecretArn() != null)
sb.append("SecretArn: ").append(getSecretArn()).append(",");
if (getWorkgroupName() != null)
sb.append("WorkgroupName: ").append(getWorkgroupName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ExecuteStatementResult == false)
return false;
ExecuteStatementResult other = (ExecuteStatementResult) obj;
if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null)
return false;
if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getDatabase() == null ^ this.getDatabase() == null)
return false;
if (other.getDatabase() != null && other.getDatabase().equals(this.getDatabase()) == false)
return false;
if (other.getDbUser() == null ^ this.getDbUser() == null)
return false;
if (other.getDbUser() != null && other.getDbUser().equals(this.getDbUser()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getSecretArn() == null ^ this.getSecretArn() == null)
return false;
if (other.getSecretArn() != null && other.getSecretArn().equals(this.getSecretArn()) == false)
return false;
if (other.getWorkgroupName() == null ^ this.getWorkgroupName() == null)
return false;
if (other.getWorkgroupName() != null && other.getWorkgroupName().equals(this.getWorkgroupName()) == 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 + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDatabase() == null) ? 0 : getDatabase().hashCode());
hashCode = prime * hashCode + ((getDbUser() == null) ? 0 : getDbUser().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getSecretArn() == null) ? 0 : getSecretArn().hashCode());
hashCode = prime * hashCode + ((getWorkgroupName() == null) ? 0 : getWorkgroupName().hashCode());
return hashCode;
}
@Override
public ExecuteStatementResult clone() {
try {
return (ExecuteStatementResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}