AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
AthenaError.h
1
6#pragma once
7#include <aws/athena/Athena_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace Athena {
20namespace Model {
21
33 public:
34 AWS_ATHENA_API AthenaError() = default;
35 AWS_ATHENA_API AthenaError(Aws::Utils::Json::JsonView jsonValue);
37 AWS_ATHENA_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
45 inline int GetErrorCategory() const { return m_errorCategory; }
46 inline bool ErrorCategoryHasBeenSet() const { return m_errorCategoryHasBeenSet; }
47 inline void SetErrorCategory(int value) {
48 m_errorCategoryHasBeenSet = true;
49 m_errorCategory = value;
50 }
51 inline AthenaError& WithErrorCategory(int value) {
52 SetErrorCategory(value);
53 return *this;
54 }
56
58
64 inline int GetErrorType() const { return m_errorType; }
65 inline bool ErrorTypeHasBeenSet() const { return m_errorTypeHasBeenSet; }
66 inline void SetErrorType(int value) {
67 m_errorTypeHasBeenSet = true;
68 m_errorType = value;
69 }
70 inline AthenaError& WithErrorType(int value) {
71 SetErrorType(value);
72 return *this;
73 }
75
77
80 inline bool GetRetryable() const { return m_retryable; }
81 inline bool RetryableHasBeenSet() const { return m_retryableHasBeenSet; }
82 inline void SetRetryable(bool value) {
83 m_retryableHasBeenSet = true;
84 m_retryable = value;
85 }
86 inline AthenaError& WithRetryable(bool value) {
87 SetRetryable(value);
88 return *this;
89 }
91
93
96 inline const Aws::String& GetErrorMessage() const { return m_errorMessage; }
97 inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
98 template <typename ErrorMessageT = Aws::String>
99 void SetErrorMessage(ErrorMessageT&& value) {
100 m_errorMessageHasBeenSet = true;
101 m_errorMessage = std::forward<ErrorMessageT>(value);
102 }
103 template <typename ErrorMessageT = Aws::String>
104 AthenaError& WithErrorMessage(ErrorMessageT&& value) {
105 SetErrorMessage(std::forward<ErrorMessageT>(value));
106 return *this;
107 }
109 private:
110 int m_errorCategory{0};
111
112 int m_errorType{0};
113
114 bool m_retryable{false};
115
116 Aws::String m_errorMessage;
117 bool m_errorCategoryHasBeenSet = false;
118 bool m_errorTypeHasBeenSet = false;
119 bool m_retryableHasBeenSet = false;
120 bool m_errorMessageHasBeenSet = false;
121};
122
123} // namespace Model
124} // namespace Athena
125} // namespace Aws
const Aws::String & GetErrorMessage() const
Definition AthenaError.h:96
AWS_ATHENA_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_ATHENA_API AthenaError(Aws::Utils::Json::JsonView jsonValue)
AWS_ATHENA_API AthenaError()=default
void SetErrorMessage(ErrorMessageT &&value)
Definition AthenaError.h:99
AthenaError & WithErrorCategory(int value)
Definition AthenaError.h:51
AthenaError & WithErrorMessage(ErrorMessageT &&value)
AthenaError & WithErrorType(int value)
Definition AthenaError.h:70
AthenaError & WithRetryable(bool value)
Definition AthenaError.h:86
AWS_ATHENA_API AthenaError & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue