AWS SDK for C++

AWS SDK for C++ Version 1.11.741

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/drs/Drs_EXPORTS.h>
10#include <aws/drs/model/ValidationExceptionField.h>
11#include <aws/drs/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 drs {
23namespace Model {
24
32 public:
33 AWS_DRS_API ValidationException() = default;
37
39
40 inline const Aws::String& GetCode() const { return m_code; }
41 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
42 template <typename CodeT = Aws::String>
43 void SetCode(CodeT&& value) {
44 m_codeHasBeenSet = true;
45 m_code = std::forward<CodeT>(value);
46 }
47 template <typename CodeT = Aws::String>
48 ValidationException& WithCode(CodeT&& value) {
49 SetCode(std::forward<CodeT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
59 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
60 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
61 void SetFieldList(FieldListT&& value) {
62 m_fieldListHasBeenSet = true;
63 m_fieldList = std::forward<FieldListT>(value);
64 }
65 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
66 ValidationException& WithFieldList(FieldListT&& value) {
67 SetFieldList(std::forward<FieldListT>(value));
68 return *this;
69 }
70 template <typename FieldListT = ValidationExceptionField>
71 ValidationException& AddFieldList(FieldListT&& value) {
72 m_fieldListHasBeenSet = true;
73 m_fieldList.emplace_back(std::forward<FieldListT>(value));
74 return *this;
75 }
77
79
80 inline const Aws::String& GetMessage() const { return m_message; }
81 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
82 template <typename MessageT = Aws::String>
83 void SetMessage(MessageT&& value) {
84 m_messageHasBeenSet = true;
85 m_message = std::forward<MessageT>(value);
86 }
87 template <typename MessageT = Aws::String>
88 ValidationException& WithMessage(MessageT&& value) {
89 SetMessage(std::forward<MessageT>(value));
90 return *this;
91 }
93
95
98 inline ValidationExceptionReason GetReason() const { return m_reason; }
99 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
101 m_reasonHasBeenSet = true;
102 m_reason = value;
103 }
105 SetReason(value);
106 return *this;
107 }
109 private:
110 Aws::String m_code;
111
113
114 Aws::String m_message;
115
117 bool m_codeHasBeenSet = false;
118 bool m_fieldListHasBeenSet = false;
119 bool m_messageHasBeenSet = false;
120 bool m_reasonHasBeenSet = false;
121};
122
123} // namespace Model
124} // namespace drs
125} // namespace Aws
const Aws::String & GetCode() const
ValidationException & WithMessage(MessageT &&value)
ValidationExceptionReason GetReason() const
AWS_DRS_API ValidationException()=default
AWS_DRS_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithFieldList(FieldListT &&value)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationException & WithReason(ValidationExceptionReason value)
AWS_DRS_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetMessage() const
AWS_DRS_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
void SetReason(ValidationExceptionReason value)
ValidationException & WithCode(CodeT &&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