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

com.amazonaws.services.athena.model.QueryExecutionStatus Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Athena module holds the client classes that are used for communicating with Amazon Athena Service

The 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.athena.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The completion date, current state, submission time, and state change reason (if applicable) for the query execution. *

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

* The state of query execution. QUEUED indicates that the query has been submitted to the service, and * Athena will execute the query as soon as resources are available. RUNNING indicates that the query * is in execution phase. SUCCEEDED indicates that the query completed without errors. * FAILED indicates that the query experienced an error and did not complete processing. * CANCELLED indicates that a user input interrupted query execution. *

* *

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the * query state transition from RUNNING or FAILED to QUEUED. *

*
*/ private String state; /** *

* Further detail about the status of the query. *

*/ private String stateChangeReason; /** *

* The date and time that the query was submitted. *

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

* The date and time that the query completed. *

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

* Provides information about an Athena query error. *

*/ private AthenaError athenaError; /** *

* The state of query execution. QUEUED indicates that the query has been submitted to the service, and * Athena will execute the query as soon as resources are available. RUNNING indicates that the query * is in execution phase. SUCCEEDED indicates that the query completed without errors. * FAILED indicates that the query experienced an error and did not complete processing. * CANCELLED indicates that a user input interrupted query execution. *

* *

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the * query state transition from RUNNING or FAILED to QUEUED. *

*
* * @param state * The state of query execution. QUEUED indicates that the query has been submitted to the * service, and Athena will execute the query as soon as resources are available. RUNNING * indicates that the query is in execution phase. SUCCEEDED indicates that the query completed * without errors. FAILED indicates that the query experienced an error and did not complete * processing. CANCELLED indicates that a user input interrupted query execution.

*

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see * the query state transition from RUNNING or FAILED to QUEUED. *

* @see QueryExecutionState */ public void setState(String state) { this.state = state; } /** *

* The state of query execution. QUEUED indicates that the query has been submitted to the service, and * Athena will execute the query as soon as resources are available. RUNNING indicates that the query * is in execution phase. SUCCEEDED indicates that the query completed without errors. * FAILED indicates that the query experienced an error and did not complete processing. * CANCELLED indicates that a user input interrupted query execution. *

* *

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the * query state transition from RUNNING or FAILED to QUEUED. *

*
* * @return The state of query execution. QUEUED indicates that the query has been submitted to the * service, and Athena will execute the query as soon as resources are available. RUNNING * indicates that the query is in execution phase. SUCCEEDED indicates that the query completed * without errors. FAILED indicates that the query experienced an error and did not complete * processing. CANCELLED indicates that a user input interrupted query execution.

*

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see * the query state transition from RUNNING or FAILED to QUEUED. *

* @see QueryExecutionState */ public String getState() { return this.state; } /** *

* The state of query execution. QUEUED indicates that the query has been submitted to the service, and * Athena will execute the query as soon as resources are available. RUNNING indicates that the query * is in execution phase. SUCCEEDED indicates that the query completed without errors. * FAILED indicates that the query experienced an error and did not complete processing. * CANCELLED indicates that a user input interrupted query execution. *

* *

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the * query state transition from RUNNING or FAILED to QUEUED. *

*
* * @param state * The state of query execution. QUEUED indicates that the query has been submitted to the * service, and Athena will execute the query as soon as resources are available. RUNNING * indicates that the query is in execution phase. SUCCEEDED indicates that the query completed * without errors. FAILED indicates that the query experienced an error and did not complete * processing. CANCELLED indicates that a user input interrupted query execution.

*

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see * the query state transition from RUNNING or FAILED to QUEUED. *

* @return Returns a reference to this object so that method calls can be chained together. * @see QueryExecutionState */ public QueryExecutionStatus withState(String state) { setState(state); return this; } /** *

* The state of query execution. QUEUED indicates that the query has been submitted to the service, and * Athena will execute the query as soon as resources are available. RUNNING indicates that the query * is in execution phase. SUCCEEDED indicates that the query completed without errors. * FAILED indicates that the query experienced an error and did not complete processing. * CANCELLED indicates that a user input interrupted query execution. *

* *

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the * query state transition from RUNNING or FAILED to QUEUED. *

*
* * @param state * The state of query execution. QUEUED indicates that the query has been submitted to the * service, and Athena will execute the query as soon as resources are available. RUNNING * indicates that the query is in execution phase. SUCCEEDED indicates that the query completed * without errors. FAILED indicates that the query experienced an error and did not complete * processing. CANCELLED indicates that a user input interrupted query execution.

*

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see * the query state transition from RUNNING or FAILED to QUEUED. *

* @see QueryExecutionState */ public void setState(QueryExecutionState state) { withState(state); } /** *

* The state of query execution. QUEUED indicates that the query has been submitted to the service, and * Athena will execute the query as soon as resources are available. RUNNING indicates that the query * is in execution phase. SUCCEEDED indicates that the query completed without errors. * FAILED indicates that the query experienced an error and did not complete processing. * CANCELLED indicates that a user input interrupted query execution. *

* *

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the * query state transition from RUNNING or FAILED to QUEUED. *

*
* * @param state * The state of query execution. QUEUED indicates that the query has been submitted to the * service, and Athena will execute the query as soon as resources are available. RUNNING * indicates that the query is in execution phase. SUCCEEDED indicates that the query completed * without errors. FAILED indicates that the query experienced an error and did not complete * processing. CANCELLED indicates that a user input interrupted query execution.

*

* Athena automatically retries your queries in cases of certain transient errors. As a result, you may see * the query state transition from RUNNING or FAILED to QUEUED. *

* @return Returns a reference to this object so that method calls can be chained together. * @see QueryExecutionState */ public QueryExecutionStatus withState(QueryExecutionState state) { this.state = state.toString(); return this; } /** *

* Further detail about the status of the query. *

* * @param stateChangeReason * Further detail about the status of the query. */ public void setStateChangeReason(String stateChangeReason) { this.stateChangeReason = stateChangeReason; } /** *

* Further detail about the status of the query. *

* * @return Further detail about the status of the query. */ public String getStateChangeReason() { return this.stateChangeReason; } /** *

* Further detail about the status of the query. *

* * @param stateChangeReason * Further detail about the status of the query. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryExecutionStatus withStateChangeReason(String stateChangeReason) { setStateChangeReason(stateChangeReason); return this; } /** *

* The date and time that the query was submitted. *

* * @param submissionDateTime * The date and time that the query was submitted. */ public void setSubmissionDateTime(java.util.Date submissionDateTime) { this.submissionDateTime = submissionDateTime; } /** *

* The date and time that the query was submitted. *

* * @return The date and time that the query was submitted. */ public java.util.Date getSubmissionDateTime() { return this.submissionDateTime; } /** *

* The date and time that the query was submitted. *

* * @param submissionDateTime * The date and time that the query was submitted. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryExecutionStatus withSubmissionDateTime(java.util.Date submissionDateTime) { setSubmissionDateTime(submissionDateTime); return this; } /** *

* The date and time that the query completed. *

* * @param completionDateTime * The date and time that the query completed. */ public void setCompletionDateTime(java.util.Date completionDateTime) { this.completionDateTime = completionDateTime; } /** *

* The date and time that the query completed. *

* * @return The date and time that the query completed. */ public java.util.Date getCompletionDateTime() { return this.completionDateTime; } /** *

* The date and time that the query completed. *

* * @param completionDateTime * The date and time that the query completed. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryExecutionStatus withCompletionDateTime(java.util.Date completionDateTime) { setCompletionDateTime(completionDateTime); return this; } /** *

* Provides information about an Athena query error. *

* * @param athenaError * Provides information about an Athena query error. */ public void setAthenaError(AthenaError athenaError) { this.athenaError = athenaError; } /** *

* Provides information about an Athena query error. *

* * @return Provides information about an Athena query error. */ public AthenaError getAthenaError() { return this.athenaError; } /** *

* Provides information about an Athena query error. *

* * @param athenaError * Provides information about an Athena query error. * @return Returns a reference to this object so that method calls can be chained together. */ public QueryExecutionStatus withAthenaError(AthenaError athenaError) { setAthenaError(athenaError); 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 (getState() != null) sb.append("State: ").append(getState()).append(","); if (getStateChangeReason() != null) sb.append("StateChangeReason: ").append(getStateChangeReason()).append(","); if (getSubmissionDateTime() != null) sb.append("SubmissionDateTime: ").append(getSubmissionDateTime()).append(","); if (getCompletionDateTime() != null) sb.append("CompletionDateTime: ").append(getCompletionDateTime()).append(","); if (getAthenaError() != null) sb.append("AthenaError: ").append(getAthenaError()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof QueryExecutionStatus == false) return false; QueryExecutionStatus other = (QueryExecutionStatus) obj; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getStateChangeReason() == null ^ this.getStateChangeReason() == null) return false; if (other.getStateChangeReason() != null && other.getStateChangeReason().equals(this.getStateChangeReason()) == false) return false; if (other.getSubmissionDateTime() == null ^ this.getSubmissionDateTime() == null) return false; if (other.getSubmissionDateTime() != null && other.getSubmissionDateTime().equals(this.getSubmissionDateTime()) == false) return false; if (other.getCompletionDateTime() == null ^ this.getCompletionDateTime() == null) return false; if (other.getCompletionDateTime() != null && other.getCompletionDateTime().equals(this.getCompletionDateTime()) == false) return false; if (other.getAthenaError() == null ^ this.getAthenaError() == null) return false; if (other.getAthenaError() != null && other.getAthenaError().equals(this.getAthenaError()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getStateChangeReason() == null) ? 0 : getStateChangeReason().hashCode()); hashCode = prime * hashCode + ((getSubmissionDateTime() == null) ? 0 : getSubmissionDateTime().hashCode()); hashCode = prime * hashCode + ((getCompletionDateTime() == null) ? 0 : getCompletionDateTime().hashCode()); hashCode = prime * hashCode + ((getAthenaError() == null) ? 0 : getAthenaError().hashCode()); return hashCode; } @Override public QueryExecutionStatus clone() { try { return (QueryExecutionStatus) 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.athena.model.transform.QueryExecutionStatusMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy