All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.redshiftdataapi.model.SubStatementData Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Redshift Data API module holds the client classes that are used for communicating with Redshift Data API Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about an SQL statement. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SubStatementData implements Serializable, Cloneable, StructuredPojo { /** *

* The date and time (UTC) the statement was created. *

*/ private java.util.Date createdAt; /** *

* 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. *

*/ private Boolean hasResultSet; /** *

* The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon * Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL * statement of a batch query. *

*/ private String id; /** *

* The SQL statement text. *

*/ private String queryString; /** *

* The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift * Data API. *

*/ 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 status of the SQL statement. An example is the that the SQL statement finished. *

*/ private String status; /** *

* The date and time (UTC) that the statement metadata was last updated. *

*/ private java.util.Date updatedAt; /** *

* 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 SubStatementData withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); 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 SubStatementData 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 SubStatementData 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. *

* * @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. */ 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. *

* * @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. */ 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. *

* * @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. * @return Returns a reference to this object so that method calls can be chained together. */ public SubStatementData 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. *

* * @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. */ public Boolean isHasResultSet() { return this.hasResultSet; } /** *

* The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon * Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL * statement of a batch query. *

* * @param id * The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by * Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the * second SQL statement of a batch query. */ public void setId(String id) { this.id = id; } /** *

* The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon * Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL * statement of a batch query. *

* * @return The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by * Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the * second SQL statement of a batch query. */ public String getId() { return this.id; } /** *

* The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon * Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL * statement of a batch query. *

* * @param id * The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by * Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, * d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the * second SQL statement of a batch query. * @return Returns a reference to this object so that method calls can be chained together. */ public SubStatementData withId(String id) { setId(id); 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 SubStatementData withQueryString(String queryString) { setQueryString(queryString); return this; } /** *

* The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift * Data API. *

* * @param redshiftQueryId * The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon * Redshift Data API. */ public void setRedshiftQueryId(Long redshiftQueryId) { this.redshiftQueryId = redshiftQueryId; } /** *

* The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift * Data API. *

* * @return The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon * Redshift Data API. */ public Long getRedshiftQueryId() { return this.redshiftQueryId; } /** *

* The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift * Data API. *

* * @param redshiftQueryId * The SQL statement identifier. 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 SubStatementData 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 SubStatementData 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 SubStatementData withResultSize(Long resultSize) { setResultSize(resultSize); return this; } /** *

* The status of the SQL statement. An example is the that the SQL statement finished. *

* * @param status * The status of the SQL statement. An example is the that the SQL statement finished. * @see StatementStatusString */ public void setStatus(String status) { this.status = status; } /** *

* The status of the SQL statement. An example is the that the SQL statement finished. *

* * @return The status of the SQL statement. An example is the that the SQL statement finished. * @see StatementStatusString */ public String getStatus() { return this.status; } /** *

* The status of the SQL statement. An example is the that the SQL statement finished. *

* * @param status * The status of the SQL statement. An example is the that the SQL statement finished. * @return Returns a reference to this object so that method calls can be chained together. * @see StatementStatusString */ public SubStatementData withStatus(String status) { setStatus(status); return this; } /** *

* The status of the SQL statement. An example is the that the SQL statement finished. *

* * @param status * The status of the SQL statement. An example is the that the SQL statement finished. * @return Returns a reference to this object so that method calls can be chained together. * @see StatementStatusString */ public SubStatementData withStatus(StatementStatusString status) { this.status = status.toString(); return this; } /** *

* The date and time (UTC) that the statement metadata was last updated. *

* * @param updatedAt * The date and time (UTC) that the statement metadata was last updated. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** *

* The date and time (UTC) that the statement metadata was last updated. *

* * @return The date and time (UTC) that the statement metadata was last updated. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** *

* The date and time (UTC) that the statement metadata was last updated. *

* * @param updatedAt * The date and time (UTC) that the statement metadata was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public SubStatementData withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); 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 (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).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 (getQueryString() != null) sb.append("QueryString: ").append(getQueryString()).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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SubStatementData == false) return false; SubStatementData other = (SubStatementData) obj; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == 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.getQueryString() == null ^ this.getQueryString() == null) return false; if (other.getQueryString() != null && other.getQueryString().equals(this.getQueryString()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().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 + ((getQueryString() == null) ? 0 : getQueryString().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 + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); return hashCode; } @Override public SubStatementData clone() { try { return (SubStatementData) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.redshiftdataapi.model.transform.SubStatementDataMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy