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/greengrassv2/GreengrassV2_EXPORTS.h>
10#include <aws/greengrassv2/model/ValidationExceptionField.h>
11#include <aws/greengrassv2/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 GreengrassV2 {
23namespace Model {
24
32 public:
33 AWS_GREENGRASSV2_API ValidationException() = default;
34 AWS_GREENGRASSV2_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
36 AWS_GREENGRASSV2_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
40 inline const Aws::String& GetMessage() const { return m_message; }
41 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
42 template <typename MessageT = Aws::String>
43 void SetMessage(MessageT&& value) {
44 m_messageHasBeenSet = true;
45 m_message = std::forward<MessageT>(value);
46 }
47 template <typename MessageT = Aws::String>
48 ValidationException& WithMessage(MessageT&& value) {
49 SetMessage(std::forward<MessageT>(value));
50 return *this;
51 }
53
55
58 inline ValidationExceptionReason GetReason() const { return m_reason; }
59 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
61 m_reasonHasBeenSet = true;
62 m_reason = value;
63 }
65 SetReason(value);
66 return *this;
67 }
69
71
74 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
75 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
76 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
77 void SetFields(FieldsT&& value) {
78 m_fieldsHasBeenSet = true;
79 m_fields = std::forward<FieldsT>(value);
80 }
81 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
82 ValidationException& WithFields(FieldsT&& value) {
83 SetFields(std::forward<FieldsT>(value));
84 return *this;
85 }
86 template <typename FieldsT = ValidationExceptionField>
87 ValidationException& AddFields(FieldsT&& value) {
88 m_fieldsHasBeenSet = true;
89 m_fields.emplace_back(std::forward<FieldsT>(value));
90 return *this;
91 }
93 private:
94 Aws::String m_message;
95
97
99 bool m_messageHasBeenSet = false;
100 bool m_reasonHasBeenSet = false;
101 bool m_fieldsHasBeenSet = false;
102};
103
104} // namespace Model
105} // namespace GreengrassV2
106} // namespace Aws
ValidationExceptionReason GetReason() const
ValidationException & WithFields(FieldsT &&value)
AWS_GREENGRASSV2_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & WithMessage(MessageT &&value)
AWS_GREENGRASSV2_API ValidationException()=default
const Aws::Vector< ValidationExceptionField > & GetFields() const
AWS_GREENGRASSV2_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & AddFields(FieldsT &&value)
void SetReason(ValidationExceptionReason value)
AWS_GREENGRASSV2_API ValidationException(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