com.amazonaws.services.redshiftdataapi.model.DescribeStatementResult 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 DescribeStatementResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The cluster identifier.
*
*/
private String clusterIdentifier;
/**
*
* The date and time (UTC) when the SQL statement was submitted to run.
*
*/
private java.util.Date createdAt;
/**
*
* The name of the database.
*
*/
private String database;
/**
*
* The database user name.
*
*/
private String dbUser;
/**
*
* The amount of time in nanoseconds that the statement ran.
*
*/
private Long duration;
/**
*
* The error message from the cluster if the SQL statement encountered an error while running.
*
*/
private String error;
/**
*
* A value that indicates whether the statement has a result set. The result set can be empty. The value is true for
* an empty result set. The value is true if any substatement returns a result set.
*
*/
private Boolean hasResultSet;
/**
*
* The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by
* Amazon Redshift Data API.
*
*/
private String id;
/**
*
* The parameters for the SQL statement.
*
*/
private java.util.List queryParameters;
/**
*
* The SQL statement text.
*
*/
private String queryString;
/**
*
* The process identifier from Amazon Redshift.
*
*/
private Long redshiftPid;
/**
*
* The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
*
*/
private Long redshiftQueryId;
/**
*
* Either the number of rows returned from the SQL statement or the number of rows affected. If result size is
* greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE,
* DELETE, COPY, and others. A -1
indicates the value is null.
*
*/
private Long resultRows;
/**
*
* The size in bytes of the returned results. A -1
indicates the value is null.
*
*/
private Long resultSize;
/**
*
* The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
*
*/
private String secretArn;
/**
*
* The status of the SQL statement being described. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*/
private String status;
/**
*
* The SQL statements from a multiple statement run.
*
*/
private java.util.List subStatements;
/**
*
* The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the
* status last changed.
*
*/
private java.util.Date updatedAt;
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN).
*
*/
private String workgroupName;
/**
*
* The cluster identifier.
*
*
* @param clusterIdentifier
* The cluster identifier.
*/
public void setClusterIdentifier(String clusterIdentifier) {
this.clusterIdentifier = clusterIdentifier;
}
/**
*
* The cluster identifier.
*
*
* @return The cluster identifier.
*/
public String getClusterIdentifier() {
return this.clusterIdentifier;
}
/**
*
* The cluster identifier.
*
*
* @param clusterIdentifier
* The cluster identifier.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withClusterIdentifier(String clusterIdentifier) {
setClusterIdentifier(clusterIdentifier);
return this;
}
/**
*
* The date and time (UTC) when the SQL statement was submitted to run.
*
*
* @param createdAt
* The date and time (UTC) when the SQL statement was submitted to run.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time (UTC) when the SQL statement was submitted to run.
*
*
* @return The date and time (UTC) when the SQL statement was submitted to run.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time (UTC) when the SQL statement was submitted to run.
*
*
* @param createdAt
* The date and time (UTC) when the SQL statement was submitted to run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult 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 DescribeStatementResult 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 DescribeStatementResult withDbUser(String dbUser) {
setDbUser(dbUser);
return this;
}
/**
*
* The amount of time in nanoseconds that the statement ran.
*
*
* @param duration
* The amount of time in nanoseconds that the statement ran.
*/
public void setDuration(Long duration) {
this.duration = duration;
}
/**
*
* The amount of time in nanoseconds that the statement ran.
*
*
* @return The amount of time in nanoseconds that the statement ran.
*/
public Long getDuration() {
return this.duration;
}
/**
*
* The amount of time in nanoseconds that the statement ran.
*
*
* @param duration
* The amount of time in nanoseconds that the statement ran.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withDuration(Long duration) {
setDuration(duration);
return this;
}
/**
*
* The error message from the cluster if the SQL statement encountered an error while running.
*
*
* @param error
* The error message from the cluster if the SQL statement encountered an error while running.
*/
public void setError(String error) {
this.error = error;
}
/**
*
* The error message from the cluster if the SQL statement encountered an error while running.
*
*
* @return The error message from the cluster if the SQL statement encountered an error while running.
*/
public String getError() {
return this.error;
}
/**
*
* The error message from the cluster if the SQL statement encountered an error while running.
*
*
* @param error
* The error message from the cluster if the SQL statement encountered an error while running.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withError(String error) {
setError(error);
return this;
}
/**
*
* A value that indicates whether the statement has a result set. The result set can be empty. The value is true for
* an empty result set. The value is true if any substatement returns a result set.
*
*
* @param hasResultSet
* A value that indicates whether the statement has a result set. The result set can be empty. The value is
* true for an empty result set. The value is true if any substatement returns a result set.
*/
public void setHasResultSet(Boolean hasResultSet) {
this.hasResultSet = hasResultSet;
}
/**
*
* A value that indicates whether the statement has a result set. The result set can be empty. The value is true for
* an empty result set. The value is true if any substatement returns a result set.
*
*
* @return A value that indicates whether the statement has a result set. The result set can be empty. The value is
* true for an empty result set. The value is true if any substatement returns a result set.
*/
public Boolean getHasResultSet() {
return this.hasResultSet;
}
/**
*
* A value that indicates whether the statement has a result set. The result set can be empty. The value is true for
* an empty result set. The value is true if any substatement returns a result set.
*
*
* @param hasResultSet
* A value that indicates whether the statement has a result set. The result set can be empty. The value is
* true for an empty result set. The value is true if any substatement returns a result set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withHasResultSet(Boolean hasResultSet) {
setHasResultSet(hasResultSet);
return this;
}
/**
*
* A value that indicates whether the statement has a result set. The result set can be empty. The value is true for
* an empty result set. The value is true if any substatement returns a result set.
*
*
* @return A value that indicates whether the statement has a result set. The result set can be empty. The value is
* true for an empty result set. The value is true if any substatement returns a result set.
*/
public Boolean isHasResultSet() {
return this.hasResultSet;
}
/**
*
* The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by
* Amazon Redshift Data API.
*
*
* @param id
* The identifier of the SQL statement described. 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 described. This value is a universally unique identifier (UUID) generated by
* Amazon Redshift Data API.
*
*
* @return The identifier of the SQL statement described. 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 described. This value is a universally unique identifier (UUID) generated by
* Amazon Redshift Data API.
*
*
* @param id
* The identifier of the SQL statement described. 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 DescribeStatementResult withId(String id) {
setId(id);
return this;
}
/**
*
* The parameters for the SQL statement.
*
*
* @return The parameters for the SQL statement.
*/
public java.util.List getQueryParameters() {
return queryParameters;
}
/**
*
* The parameters for the SQL statement.
*
*
* @param queryParameters
* The parameters for the SQL statement.
*/
public void setQueryParameters(java.util.Collection queryParameters) {
if (queryParameters == null) {
this.queryParameters = null;
return;
}
this.queryParameters = new java.util.ArrayList(queryParameters);
}
/**
*
* The parameters for the SQL statement.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setQueryParameters(java.util.Collection)} or {@link #withQueryParameters(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param queryParameters
* The parameters for the SQL statement.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withQueryParameters(SqlParameter... queryParameters) {
if (this.queryParameters == null) {
setQueryParameters(new java.util.ArrayList(queryParameters.length));
}
for (SqlParameter ele : queryParameters) {
this.queryParameters.add(ele);
}
return this;
}
/**
*
* The parameters for the SQL statement.
*
*
* @param queryParameters
* The parameters for the SQL statement.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withQueryParameters(java.util.Collection queryParameters) {
setQueryParameters(queryParameters);
return this;
}
/**
*
* The SQL statement text.
*
*
* @param queryString
* The SQL statement text.
*/
public void setQueryString(String queryString) {
this.queryString = queryString;
}
/**
*
* The SQL statement text.
*
*
* @return The SQL statement text.
*/
public String getQueryString() {
return this.queryString;
}
/**
*
* The SQL statement text.
*
*
* @param queryString
* The SQL statement text.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withQueryString(String queryString) {
setQueryString(queryString);
return this;
}
/**
*
* The process identifier from Amazon Redshift.
*
*
* @param redshiftPid
* The process identifier from Amazon Redshift.
*/
public void setRedshiftPid(Long redshiftPid) {
this.redshiftPid = redshiftPid;
}
/**
*
* The process identifier from Amazon Redshift.
*
*
* @return The process identifier from Amazon Redshift.
*/
public Long getRedshiftPid() {
return this.redshiftPid;
}
/**
*
* The process identifier from Amazon Redshift.
*
*
* @param redshiftPid
* The process identifier from Amazon Redshift.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withRedshiftPid(Long redshiftPid) {
setRedshiftPid(redshiftPid);
return this;
}
/**
*
* The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
*
*
* @param redshiftQueryId
* The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
*/
public void setRedshiftQueryId(Long redshiftQueryId) {
this.redshiftQueryId = redshiftQueryId;
}
/**
*
* The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
*
*
* @return The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
*/
public Long getRedshiftQueryId() {
return this.redshiftQueryId;
}
/**
*
* The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
*
*
* @param redshiftQueryId
* The identifier of the query generated by Amazon Redshift. These identifiers are also available in the
* query
column of the STL_QUERY
system view.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withRedshiftQueryId(Long redshiftQueryId) {
setRedshiftQueryId(redshiftQueryId);
return this;
}
/**
*
* Either the number of rows returned from the SQL statement or the number of rows affected. If result size is
* greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE,
* DELETE, COPY, and others. A -1
indicates the value is null.
*
*
* @param resultRows
* Either the number of rows returned from the SQL statement or the number of rows affected. If result size
* is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT,
* UPDATE, DELETE, COPY, and others. A -1
indicates the value is null.
*/
public void setResultRows(Long resultRows) {
this.resultRows = resultRows;
}
/**
*
* Either the number of rows returned from the SQL statement or the number of rows affected. If result size is
* greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE,
* DELETE, COPY, and others. A -1
indicates the value is null.
*
*
* @return Either the number of rows returned from the SQL statement or the number of rows affected. If result size
* is greater than zero, the result rows can be the number of rows affected by SQL statements such as
* INSERT, UPDATE, DELETE, COPY, and others. A -1
indicates the value is null.
*/
public Long getResultRows() {
return this.resultRows;
}
/**
*
* Either the number of rows returned from the SQL statement or the number of rows affected. If result size is
* greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE,
* DELETE, COPY, and others. A -1
indicates the value is null.
*
*
* @param resultRows
* Either the number of rows returned from the SQL statement or the number of rows affected. If result size
* is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT,
* UPDATE, DELETE, COPY, and others. A -1
indicates the value is null.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withResultRows(Long resultRows) {
setResultRows(resultRows);
return this;
}
/**
*
* The size in bytes of the returned results. A -1
indicates the value is null.
*
*
* @param resultSize
* The size in bytes of the returned results. A -1
indicates the value is null.
*/
public void setResultSize(Long resultSize) {
this.resultSize = resultSize;
}
/**
*
* The size in bytes of the returned results. A -1
indicates the value is null.
*
*
* @return The size in bytes of the returned results. A -1
indicates the value is null.
*/
public Long getResultSize() {
return this.resultSize;
}
/**
*
* The size in bytes of the returned results. A -1
indicates the value is null.
*
*
* @param resultSize
* The size in bytes of the returned results. A -1
indicates the value is null.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withResultSize(Long resultSize) {
setResultSize(resultSize);
return this;
}
/**
*
* The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
*
*
* @param secretArn
* The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
*/
public void setSecretArn(String secretArn) {
this.secretArn = secretArn;
}
/**
*
* The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
*
*
* @return The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
*/
public String getSecretArn() {
return this.secretArn;
}
/**
*
* The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
*
*
* @param secretArn
* The name or Amazon Resource Name (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 DescribeStatementResult withSecretArn(String secretArn) {
setSecretArn(secretArn);
return this;
}
/**
*
* The status of the SQL statement being described. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @param status
* The status of the SQL statement being described. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @see StatusString
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the SQL statement being described. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @return The status of the SQL statement being described. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @see StatusString
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the SQL statement being described. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @param status
* The status of the SQL statement being described. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see StatusString
*/
public DescribeStatementResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the SQL statement being described. Status values are defined as follows:
*
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
*
*
* @param status
* The status of the SQL statement being described. Status values are defined as follows:
*
* -
*
* ABORTED - The query run was stopped by the user.
*
*
* -
*
* ALL - A status value that includes all query statuses. This value can be used to filter results.
*
*
* -
*
* FAILED - The query run failed.
*
*
* -
*
* FINISHED - The query has finished running.
*
*
* -
*
* PICKED - The query has been chosen to be run.
*
*
* -
*
* STARTED - The query run has started.
*
*
* -
*
* SUBMITTED - The query was submitted, but not yet processed.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see StatusString
*/
public DescribeStatementResult withStatus(StatusString status) {
this.status = status.toString();
return this;
}
/**
*
* The SQL statements from a multiple statement run.
*
*
* @return The SQL statements from a multiple statement run.
*/
public java.util.List getSubStatements() {
return subStatements;
}
/**
*
* The SQL statements from a multiple statement run.
*
*
* @param subStatements
* The SQL statements from a multiple statement run.
*/
public void setSubStatements(java.util.Collection subStatements) {
if (subStatements == null) {
this.subStatements = null;
return;
}
this.subStatements = new java.util.ArrayList(subStatements);
}
/**
*
* The SQL statements from a multiple statement run.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubStatements(java.util.Collection)} or {@link #withSubStatements(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param subStatements
* The SQL statements from a multiple statement run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withSubStatements(SubStatementData... subStatements) {
if (this.subStatements == null) {
setSubStatements(new java.util.ArrayList(subStatements.length));
}
for (SubStatementData ele : subStatements) {
this.subStatements.add(ele);
}
return this;
}
/**
*
* The SQL statements from a multiple statement run.
*
*
* @param subStatements
* The SQL statements from a multiple statement run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withSubStatements(java.util.Collection subStatements) {
setSubStatements(subStatements);
return this;
}
/**
*
* The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the
* status last changed.
*
*
* @param updatedAt
* The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time
* the status last changed.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the
* status last changed.
*
*
* @return The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time
* the status last changed.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the
* status last changed.
*
*
* @param updatedAt
* The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time
* the status last changed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN).
*
*
* @param workgroupName
* The serverless workgroup name or Amazon Resource Name (ARN).
*/
public void setWorkgroupName(String workgroupName) {
this.workgroupName = workgroupName;
}
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN).
*
*
* @return The serverless workgroup name or Amazon Resource Name (ARN).
*/
public String getWorkgroupName() {
return this.workgroupName;
}
/**
*
* The serverless workgroup name or Amazon Resource Name (ARN).
*
*
* @param workgroupName
* The serverless workgroup name or Amazon Resource Name (ARN).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStatementResult 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 (getDuration() != null)
sb.append("Duration: ").append(getDuration()).append(",");
if (getError() != null)
sb.append("Error: ").append(getError()).append(",");
if (getHasResultSet() != null)
sb.append("HasResultSet: ").append(getHasResultSet()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getQueryParameters() != null)
sb.append("QueryParameters: ").append(getQueryParameters()).append(",");
if (getQueryString() != null)
sb.append("QueryString: ").append(getQueryString()).append(",");
if (getRedshiftPid() != null)
sb.append("RedshiftPid: ").append(getRedshiftPid()).append(",");
if (getRedshiftQueryId() != null)
sb.append("RedshiftQueryId: ").append(getRedshiftQueryId()).append(",");
if (getResultRows() != null)
sb.append("ResultRows: ").append(getResultRows()).append(",");
if (getResultSize() != null)
sb.append("ResultSize: ").append(getResultSize()).append(",");
if (getSecretArn() != null)
sb.append("SecretArn: ").append(getSecretArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getSubStatements() != null)
sb.append("SubStatements: ").append(getSubStatements()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt()).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 DescribeStatementResult == false)
return false;
DescribeStatementResult other = (DescribeStatementResult) 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.getDuration() == null ^ this.getDuration() == null)
return false;
if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false)
return false;
if (other.getError() == null ^ this.getError() == null)
return false;
if (other.getError() != null && other.getError().equals(this.getError()) == false)
return false;
if (other.getHasResultSet() == null ^ this.getHasResultSet() == null)
return false;
if (other.getHasResultSet() != null && other.getHasResultSet().equals(this.getHasResultSet()) == 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.getQueryParameters() == null ^ this.getQueryParameters() == null)
return false;
if (other.getQueryParameters() != null && other.getQueryParameters().equals(this.getQueryParameters()) == false)
return false;
if (other.getQueryString() == null ^ this.getQueryString() == null)
return false;
if (other.getQueryString() != null && other.getQueryString().equals(this.getQueryString()) == false)
return false;
if (other.getRedshiftPid() == null ^ this.getRedshiftPid() == null)
return false;
if (other.getRedshiftPid() != null && other.getRedshiftPid().equals(this.getRedshiftPid()) == false)
return false;
if (other.getRedshiftQueryId() == null ^ this.getRedshiftQueryId() == null)
return false;
if (other.getRedshiftQueryId() != null && other.getRedshiftQueryId().equals(this.getRedshiftQueryId()) == false)
return false;
if (other.getResultRows() == null ^ this.getResultRows() == null)
return false;
if (other.getResultRows() != null && other.getResultRows().equals(this.getResultRows()) == false)
return false;
if (other.getResultSize() == null ^ this.getResultSize() == null)
return false;
if (other.getResultSize() != null && other.getResultSize().equals(this.getResultSize()) == 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.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getSubStatements() == null ^ this.getSubStatements() == null)
return false;
if (other.getSubStatements() != null && other.getSubStatements().equals(this.getSubStatements()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == 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 + ((getDuration() == null) ? 0 : getDuration().hashCode());
hashCode = prime * hashCode + ((getError() == null) ? 0 : getError().hashCode());
hashCode = prime * hashCode + ((getHasResultSet() == null) ? 0 : getHasResultSet().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getQueryParameters() == null) ? 0 : getQueryParameters().hashCode());
hashCode = prime * hashCode + ((getQueryString() == null) ? 0 : getQueryString().hashCode());
hashCode = prime * hashCode + ((getRedshiftPid() == null) ? 0 : getRedshiftPid().hashCode());
hashCode = prime * hashCode + ((getRedshiftQueryId() == null) ? 0 : getRedshiftQueryId().hashCode());
hashCode = prime * hashCode + ((getResultRows() == null) ? 0 : getResultRows().hashCode());
hashCode = prime * hashCode + ((getResultSize() == null) ? 0 : getResultSize().hashCode());
hashCode = prime * hashCode + ((getSecretArn() == null) ? 0 : getSecretArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getSubStatements() == null) ? 0 : getSubStatements().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getWorkgroupName() == null) ? 0 : getWorkgroupName().hashCode());
return hashCode;
}
@Override
public DescribeStatementResult clone() {
try {
return (DescribeStatementResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}