AWS SDK for C++

AWS SDK for C++ Version 1.11.740

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/wellarchitected/WellArchitected_EXPORTS.h>
10#include <aws/wellarchitected/model/ValidationExceptionField.h>
11#include <aws/wellarchitected/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 WellArchitected {
23namespace Model {
24
31 public:
32 AWS_WELLARCHITECTED_API ValidationException() = default;
33 AWS_WELLARCHITECTED_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
34 AWS_WELLARCHITECTED_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_WELLARCHITECTED_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
55 inline ValidationExceptionReason GetReason() const { return m_reason; }
56 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
58 m_reasonHasBeenSet = true;
59 m_reason = value;
60 }
62 SetReason(value);
63 return *this;
64 }
66
68
69 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
70 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
71 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
72 void SetFields(FieldsT&& value) {
73 m_fieldsHasBeenSet = true;
74 m_fields = std::forward<FieldsT>(value);
75 }
76 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
77 ValidationException& WithFields(FieldsT&& value) {
78 SetFields(std::forward<FieldsT>(value));
79 return *this;
80 }
81 template <typename FieldsT = ValidationExceptionField>
82 ValidationException& AddFields(FieldsT&& value) {
83 m_fieldsHasBeenSet = true;
84 m_fields.emplace_back(std::forward<FieldsT>(value));
85 return *this;
86 }
88 private:
89 Aws::String m_message;
90
92
94 bool m_messageHasBeenSet = false;
95 bool m_reasonHasBeenSet = false;
96 bool m_fieldsHasBeenSet = false;
97};
98
99} // namespace Model
100} // namespace WellArchitected
101} // namespace Aws
AWS_WELLARCHITECTED_API Aws::Utils::Json::JsonValue Jsonize() const
void SetReason(ValidationExceptionReason value)
AWS_WELLARCHITECTED_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_WELLARCHITECTED_API ValidationException()=default
const Aws::Vector< ValidationExceptionField > & GetFields() const
AWS_WELLARCHITECTED_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & AddFields(FieldsT &&value)
ValidationException & WithMessage(MessageT &&value)
ValidationException & WithFields(FieldsT &&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