AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/ValidationExceptionField.h>
9#include <aws/accessanalyzer/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 AccessAnalyzer {
23namespace Model {
24
31 public:
32 AWS_ACCESSANALYZER_API ValidationException() = default;
33 AWS_ACCESSANALYZER_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
34 AWS_ACCESSANALYZER_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
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
57 inline ValidationExceptionReason GetReason() const { return m_reason; }
58 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
60 m_reasonHasBeenSet = true;
61 m_reason = value;
62 }
64 SetReason(value);
65 return *this;
66 }
68
70
73 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
74 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
75 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
76 void SetFieldList(FieldListT&& value) {
77 m_fieldListHasBeenSet = true;
78 m_fieldList = std::forward<FieldListT>(value);
79 }
80 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
81 ValidationException& WithFieldList(FieldListT&& value) {
82 SetFieldList(std::forward<FieldListT>(value));
83 return *this;
84 }
85 template <typename FieldListT = ValidationExceptionField>
86 ValidationException& AddFieldList(FieldListT&& value) {
87 m_fieldListHasBeenSet = true;
88 m_fieldList.emplace_back(std::forward<FieldListT>(value));
89 return *this;
90 }
92 private:
93 Aws::String m_message;
94
96
98 bool m_messageHasBeenSet = false;
99 bool m_reasonHasBeenSet = false;
100 bool m_fieldListHasBeenSet = false;
101};
102
103} // namespace Model
104} // namespace AccessAnalyzer
105} // namespace Aws
AWS_ACCESSANALYZER_API ValidationException()=default
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & AddFieldList(FieldListT &&value)
AWS_ACCESSANALYZER_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithFieldList(FieldListT &&value)
ValidationException & WithMessage(MessageT &&value)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
void SetReason(ValidationExceptionReason value)
ValidationException & WithReason(ValidationExceptionReason value)
AWS_ACCESSANALYZER_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue