/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Athena { namespace Model { /** *

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

See Also:

AWS * API Reference

*/ class QueryExecutionStatus { public: AWS_ATHENA_API QueryExecutionStatus(); AWS_ATHENA_API QueryExecutionStatus(Aws::Utils::Json::JsonView jsonValue); AWS_ATHENA_API QueryExecutionStatus& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ATHENA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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.

*/ inline const QueryExecutionState& GetState() const{ return m_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.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

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.

*/ inline void SetState(const QueryExecutionState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

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.

*/ inline void SetState(QueryExecutionState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

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.

*/ inline QueryExecutionStatus& WithState(const QueryExecutionState& value) { SetState(value); 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.

*/ inline QueryExecutionStatus& WithState(QueryExecutionState&& value) { SetState(std::move(value)); return *this;} /** *

Further detail about the status of the query.

*/ inline const Aws::String& GetStateChangeReason() const{ return m_stateChangeReason; } /** *

Further detail about the status of the query.

*/ inline bool StateChangeReasonHasBeenSet() const { return m_stateChangeReasonHasBeenSet; } /** *

Further detail about the status of the query.

*/ inline void SetStateChangeReason(const Aws::String& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = value; } /** *

Further detail about the status of the query.

*/ inline void SetStateChangeReason(Aws::String&& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = std::move(value); } /** *

Further detail about the status of the query.

*/ inline void SetStateChangeReason(const char* value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason.assign(value); } /** *

Further detail about the status of the query.

*/ inline QueryExecutionStatus& WithStateChangeReason(const Aws::String& value) { SetStateChangeReason(value); return *this;} /** *

Further detail about the status of the query.

*/ inline QueryExecutionStatus& WithStateChangeReason(Aws::String&& value) { SetStateChangeReason(std::move(value)); return *this;} /** *

Further detail about the status of the query.

*/ inline QueryExecutionStatus& WithStateChangeReason(const char* value) { SetStateChangeReason(value); return *this;} /** *

The date and time that the query was submitted.

*/ inline const Aws::Utils::DateTime& GetSubmissionDateTime() const{ return m_submissionDateTime; } /** *

The date and time that the query was submitted.

*/ inline bool SubmissionDateTimeHasBeenSet() const { return m_submissionDateTimeHasBeenSet; } /** *

The date and time that the query was submitted.

*/ inline void SetSubmissionDateTime(const Aws::Utils::DateTime& value) { m_submissionDateTimeHasBeenSet = true; m_submissionDateTime = value; } /** *

The date and time that the query was submitted.

*/ inline void SetSubmissionDateTime(Aws::Utils::DateTime&& value) { m_submissionDateTimeHasBeenSet = true; m_submissionDateTime = std::move(value); } /** *

The date and time that the query was submitted.

*/ inline QueryExecutionStatus& WithSubmissionDateTime(const Aws::Utils::DateTime& value) { SetSubmissionDateTime(value); return *this;} /** *

The date and time that the query was submitted.

*/ inline QueryExecutionStatus& WithSubmissionDateTime(Aws::Utils::DateTime&& value) { SetSubmissionDateTime(std::move(value)); return *this;} /** *

The date and time that the query completed.

*/ inline const Aws::Utils::DateTime& GetCompletionDateTime() const{ return m_completionDateTime; } /** *

The date and time that the query completed.

*/ inline bool CompletionDateTimeHasBeenSet() const { return m_completionDateTimeHasBeenSet; } /** *

The date and time that the query completed.

*/ inline void SetCompletionDateTime(const Aws::Utils::DateTime& value) { m_completionDateTimeHasBeenSet = true; m_completionDateTime = value; } /** *

The date and time that the query completed.

*/ inline void SetCompletionDateTime(Aws::Utils::DateTime&& value) { m_completionDateTimeHasBeenSet = true; m_completionDateTime = std::move(value); } /** *

The date and time that the query completed.

*/ inline QueryExecutionStatus& WithCompletionDateTime(const Aws::Utils::DateTime& value) { SetCompletionDateTime(value); return *this;} /** *

The date and time that the query completed.

*/ inline QueryExecutionStatus& WithCompletionDateTime(Aws::Utils::DateTime&& value) { SetCompletionDateTime(std::move(value)); return *this;} /** *

Provides information about an Athena query error.

*/ inline const AthenaError& GetAthenaError() const{ return m_athenaError; } /** *

Provides information about an Athena query error.

*/ inline bool AthenaErrorHasBeenSet() const { return m_athenaErrorHasBeenSet; } /** *

Provides information about an Athena query error.

*/ inline void SetAthenaError(const AthenaError& value) { m_athenaErrorHasBeenSet = true; m_athenaError = value; } /** *

Provides information about an Athena query error.

*/ inline void SetAthenaError(AthenaError&& value) { m_athenaErrorHasBeenSet = true; m_athenaError = std::move(value); } /** *

Provides information about an Athena query error.

*/ inline QueryExecutionStatus& WithAthenaError(const AthenaError& value) { SetAthenaError(value); return *this;} /** *

Provides information about an Athena query error.

*/ inline QueryExecutionStatus& WithAthenaError(AthenaError&& value) { SetAthenaError(std::move(value)); return *this;} private: QueryExecutionState m_state; bool m_stateHasBeenSet = false; Aws::String m_stateChangeReason; bool m_stateChangeReasonHasBeenSet = false; Aws::Utils::DateTime m_submissionDateTime; bool m_submissionDateTimeHasBeenSet = false; Aws::Utils::DateTime m_completionDateTime; bool m_completionDateTimeHasBeenSet = false; AthenaError m_athenaError; bool m_athenaErrorHasBeenSet = false; }; } // namespace Model } // namespace Athena } // namespace Aws