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/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/mgn/Mgn_EXPORTS.h>
10#include <aws/mgn/model/ValidationExceptionField.h>
11#include <aws/mgn/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 mgn {
23namespace Model {
24
31 public:
32 AWS_MGN_API ValidationException() = default;
36
38
39 inline const Aws::String& GetMessage() const { return m_message; }
40 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
41 template <typename MessageT = Aws::String>
42 void SetMessage(MessageT&& value) {
43 m_messageHasBeenSet = true;
44 m_message = std::forward<MessageT>(value);
45 }
46 template <typename MessageT = Aws::String>
47 ValidationException& WithMessage(MessageT&& value) {
48 SetMessage(std::forward<MessageT>(value));
49 return *this;
50 }
52
54
55 inline const Aws::String& GetCode() const { return m_code; }
56 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
57 template <typename CodeT = Aws::String>
58 void SetCode(CodeT&& value) {
59 m_codeHasBeenSet = true;
60 m_code = std::forward<CodeT>(value);
61 }
62 template <typename CodeT = Aws::String>
63 ValidationException& WithCode(CodeT&& value) {
64 SetCode(std::forward<CodeT>(value));
65 return *this;
66 }
68
70
73 inline ValidationExceptionReason GetReason() const { return m_reason; }
74 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
76 m_reasonHasBeenSet = true;
77 m_reason = value;
78 }
80 SetReason(value);
81 return *this;
82 }
84
86
89 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
90 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
91 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
92 void SetFieldList(FieldListT&& value) {
93 m_fieldListHasBeenSet = true;
94 m_fieldList = std::forward<FieldListT>(value);
95 }
96 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
97 ValidationException& WithFieldList(FieldListT&& value) {
98 SetFieldList(std::forward<FieldListT>(value));
99 return *this;
100 }
101 template <typename FieldListT = ValidationExceptionField>
102 ValidationException& AddFieldList(FieldListT&& value) {
103 m_fieldListHasBeenSet = true;
104 m_fieldList.emplace_back(std::forward<FieldListT>(value));
105 return *this;
106 }
108 private:
109 Aws::String m_message;
110
111 Aws::String m_code;
112
114
116 bool m_messageHasBeenSet = false;
117 bool m_codeHasBeenSet = false;
118 bool m_reasonHasBeenSet = false;
119 bool m_fieldListHasBeenSet = false;
120};
121
122} // namespace Model
123} // namespace mgn
124} // namespace Aws
ValidationException & WithCode(CodeT &&value)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
AWS_MGN_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_MGN_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithFieldList(FieldListT &&value)
void SetReason(ValidationExceptionReason value)
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
const Aws::String & GetCode() const
AWS_MGN_API ValidationException()=default
const Aws::String & GetMessage() const
AWS_MGN_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationExceptionReason GetReason() const
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