AWS SDK for C++

AWS SDK for C++ Version 1.11.714

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/notifications/Notifications_EXPORTS.h>
10#include <aws/notifications/model/ValidationExceptionField.h>
11#include <aws/notifications/model/ValidationExceptionReason.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Notifications {
23namespace Model {
24
32 public:
33 AWS_NOTIFICATIONS_API ValidationException() = default;
34 AWS_NOTIFICATIONS_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
35 AWS_NOTIFICATIONS_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_NOTIFICATIONS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
40 inline const Aws::String& GetMessage() const { return m_message; }
41 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
42 template <typename MessageT = Aws::String>
43 void SetMessage(MessageT&& value) {
44 m_messageHasBeenSet = true;
45 m_message = std::forward<MessageT>(value);
46 }
47 template <typename MessageT = Aws::String>
48 ValidationException& WithMessage(MessageT&& value) {
49 SetMessage(std::forward<MessageT>(value));
50 return *this;
51 }
53
55
58 inline ValidationExceptionReason GetReason() const { return m_reason; }
59 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
61 m_reasonHasBeenSet = true;
62 m_reason = value;
63 }
65 SetReason(value);
66 return *this;
67 }
69
71
74 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
75 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
76 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
77 void SetFieldList(FieldListT&& value) {
78 m_fieldListHasBeenSet = true;
79 m_fieldList = std::forward<FieldListT>(value);
80 }
81 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
82 ValidationException& WithFieldList(FieldListT&& value) {
83 SetFieldList(std::forward<FieldListT>(value));
84 return *this;
85 }
86 template <typename FieldListT = ValidationExceptionField>
87 ValidationException& AddFieldList(FieldListT&& value) {
88 m_fieldListHasBeenSet = true;
89 m_fieldList.emplace_back(std::forward<FieldListT>(value));
90 return *this;
91 }
93 private:
94 Aws::String m_message;
95
97
99 bool m_messageHasBeenSet = false;
100 bool m_reasonHasBeenSet = false;
101 bool m_fieldListHasBeenSet = false;
102};
103
104} // namespace Model
105} // namespace Notifications
106} // namespace Aws
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & WithMessage(MessageT &&value)
AWS_NOTIFICATIONS_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_NOTIFICATIONS_API ValidationException()=default
AWS_NOTIFICATIONS_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
AWS_NOTIFICATIONS_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithFieldList(FieldListT &&value)
ValidationExceptionReason GetReason() const
void SetReason(ValidationExceptionReason 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