AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/cloudextensions/CloudExtensions_EXPORTS.h>
8#include <aws/cloudextensions/model/ValidationError.h>
9#include <aws/cloudextensions/model/ValidationExceptionReason.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CloudExtensions {
23namespace Model {
24
32 public:
33 AWS_CLOUDEXTENSIONS_API ValidationException() = default;
34 AWS_CLOUDEXTENSIONS_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CLOUDEXTENSIONS_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_CLOUDEXTENSIONS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline const Aws::String& GetMessage() const { return m_message; }
44 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
45 template <typename MessageT = Aws::String>
46 void SetMessage(MessageT&& value) {
47 m_messageHasBeenSet = true;
48 m_message = std::forward<MessageT>(value);
49 }
50 template <typename MessageT = Aws::String>
51 ValidationException& WithMessage(MessageT&& value) {
52 SetMessage(std::forward<MessageT>(value));
53 return *this;
54 }
56
58
61 inline ValidationExceptionReason GetReason() const { return m_reason; }
62 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
64 m_reasonHasBeenSet = true;
65 m_reason = value;
66 }
68 SetReason(value);
69 return *this;
70 }
72
74
77 inline const Aws::Vector<ValidationError>& GetErrors() const { return m_errors; }
78 inline bool ErrorsHasBeenSet() const { return m_errorsHasBeenSet; }
79 template <typename ErrorsT = Aws::Vector<ValidationError>>
80 void SetErrors(ErrorsT&& value) {
81 m_errorsHasBeenSet = true;
82 m_errors = std::forward<ErrorsT>(value);
83 }
84 template <typename ErrorsT = Aws::Vector<ValidationError>>
85 ValidationException& WithErrors(ErrorsT&& value) {
86 SetErrors(std::forward<ErrorsT>(value));
87 return *this;
88 }
89 template <typename ErrorsT = ValidationError>
90 ValidationException& AddErrors(ErrorsT&& value) {
91 m_errorsHasBeenSet = true;
92 m_errors.emplace_back(std::forward<ErrorsT>(value));
93 return *this;
94 }
96 private:
97 Aws::String m_message;
98
100
102 bool m_messageHasBeenSet = false;
103 bool m_reasonHasBeenSet = false;
104 bool m_errorsHasBeenSet = false;
105};
106
107} // namespace Model
108} // namespace CloudExtensions
109} // namespace Aws
ValidationException & WithReason(ValidationExceptionReason value)
AWS_CLOUDEXTENSIONS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetReason(ValidationExceptionReason value)
const Aws::Vector< ValidationError > & GetErrors() const
AWS_CLOUDEXTENSIONS_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithErrors(ErrorsT &&value)
ValidationException & AddErrors(ErrorsT &&value)
AWS_CLOUDEXTENSIONS_API ValidationException()=default
AWS_CLOUDEXTENSIONS_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithMessage(MessageT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue