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

Provides information about an Athena query error. The * AthenaError feature provides standardized error information to help * you understand failed queries and take steps after a query failure occurs. * AthenaError includes an ErrorCategory field that * specifies whether the cause of the failed query is due to system error, user * error, or other error.

See Also:

AWS * API Reference

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

An integer value that specifies the category of a query failure error. The * following list shows the category for each integer value.

1 - * System

2 - User

3 - Other

*/ inline int GetErrorCategory() const{ return m_errorCategory; } /** *

An integer value that specifies the category of a query failure error. The * following list shows the category for each integer value.

1 - * System

2 - User

3 - Other

*/ inline bool ErrorCategoryHasBeenSet() const { return m_errorCategoryHasBeenSet; } /** *

An integer value that specifies the category of a query failure error. The * following list shows the category for each integer value.

1 - * System

2 - User

3 - Other

*/ inline void SetErrorCategory(int value) { m_errorCategoryHasBeenSet = true; m_errorCategory = value; } /** *

An integer value that specifies the category of a query failure error. The * following list shows the category for each integer value.

1 - * System

2 - User

3 - Other

*/ inline AthenaError& WithErrorCategory(int value) { SetErrorCategory(value); return *this;} /** *

An integer value that provides specific information about an Athena query * error. For the meaning of specific values, see the Error * Type Reference in the Amazon Athena User Guide.

*/ inline int GetErrorType() const{ return m_errorType; } /** *

An integer value that provides specific information about an Athena query * error. For the meaning of specific values, see the Error * Type Reference in the Amazon Athena User Guide.

*/ inline bool ErrorTypeHasBeenSet() const { return m_errorTypeHasBeenSet; } /** *

An integer value that provides specific information about an Athena query * error. For the meaning of specific values, see the Error * Type Reference in the Amazon Athena User Guide.

*/ inline void SetErrorType(int value) { m_errorTypeHasBeenSet = true; m_errorType = value; } /** *

An integer value that provides specific information about an Athena query * error. For the meaning of specific values, see the Error * Type Reference in the Amazon Athena User Guide.

*/ inline AthenaError& WithErrorType(int value) { SetErrorType(value); return *this;} /** *

True if the query might succeed if resubmitted.

*/ inline bool GetRetryable() const{ return m_retryable; } /** *

True if the query might succeed if resubmitted.

*/ inline bool RetryableHasBeenSet() const { return m_retryableHasBeenSet; } /** *

True if the query might succeed if resubmitted.

*/ inline void SetRetryable(bool value) { m_retryableHasBeenSet = true; m_retryable = value; } /** *

True if the query might succeed if resubmitted.

*/ inline AthenaError& WithRetryable(bool value) { SetRetryable(value); return *this;} /** *

Contains a short description of the error that occurred.

*/ inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; } /** *

Contains a short description of the error that occurred.

*/ inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; } /** *

Contains a short description of the error that occurred.

*/ inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; } /** *

Contains a short description of the error that occurred.

*/ inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); } /** *

Contains a short description of the error that occurred.

*/ inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); } /** *

Contains a short description of the error that occurred.

*/ inline AthenaError& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;} /** *

Contains a short description of the error that occurred.

*/ inline AthenaError& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;} /** *

Contains a short description of the error that occurred.

*/ inline AthenaError& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} private: int m_errorCategory; bool m_errorCategoryHasBeenSet = false; int m_errorType; bool m_errorTypeHasBeenSet = false; bool m_retryable; bool m_retryableHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; }; } // namespace Model } // namespace Athena } // namespace Aws