AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/account/Account_EXPORTS.h>
8#include <aws/account/model/ValidationExceptionField.h>
9#include <aws/account/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 Account {
23namespace Model {
24
32 public:
33 AWS_ACCOUNT_API ValidationException() = default;
36 AWS_ACCOUNT_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
43 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
44 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
45 void SetFieldList(FieldListT&& value) {
46 m_fieldListHasBeenSet = true;
47 m_fieldList = std::forward<FieldListT>(value);
48 }
49 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
50 ValidationException& WithFieldList(FieldListT&& value) {
51 SetFieldList(std::forward<FieldListT>(value));
52 return *this;
53 }
54 template <typename FieldListT = ValidationExceptionField>
55 ValidationException& AddFieldList(FieldListT&& value) {
56 m_fieldListHasBeenSet = true;
57 m_fieldList.emplace_back(std::forward<FieldListT>(value));
58 return *this;
59 }
61
63
66 inline const Aws::String& GetMessage() const { return m_message; }
67 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
68 template <typename MessageT = Aws::String>
69 void SetMessage(MessageT&& value) {
70 m_messageHasBeenSet = true;
71 m_message = std::forward<MessageT>(value);
72 }
73 template <typename MessageT = Aws::String>
74 ValidationException& WithMessage(MessageT&& value) {
75 SetMessage(std::forward<MessageT>(value));
76 return *this;
77 }
79
81
84 inline ValidationExceptionReason GetReason() const { return m_reason; }
85 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
87 m_reasonHasBeenSet = true;
88 m_reason = value;
89 }
91 SetReason(value);
92 return *this;
93 }
95 private:
97
98 Aws::String m_message;
99
101 bool m_fieldListHasBeenSet = false;
102 bool m_messageHasBeenSet = false;
103 bool m_reasonHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace Account
108} // namespace Aws
ValidationException & WithMessage(MessageT &&value)
AWS_ACCOUNT_API ValidationException()=default
AWS_ACCOUNT_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_ACCOUNT_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationExceptionReason GetReason() const
AWS_ACCOUNT_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
void SetReason(ValidationExceptionReason value)
ValidationException & WithFieldList(FieldListT &&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