AWS SDK for C++

AWS SDK for C++ Version 1.11.933

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/networkmanager/NetworkManager_EXPORTS.h>
10#include <aws/networkmanager/model/ValidationExceptionField.h>
11#include <aws/networkmanager/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 NetworkManager {
23namespace Model {
24
31 public:
32 AWS_NETWORKMANAGER_API ValidationException() = default;
33 AWS_NETWORKMANAGER_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
34 AWS_NETWORKMANAGER_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_NETWORKMANAGER_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>& GetFields() const { return m_fields; }
74 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
75 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
76 void SetFields(FieldsT&& value) {
77 m_fieldsHasBeenSet = true;
78 m_fields = std::forward<FieldsT>(value);
79 }
80 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
81 ValidationException& WithFields(FieldsT&& value) {
82 SetFields(std::forward<FieldsT>(value));
83 return *this;
84 }
85 template <typename FieldsT = ValidationExceptionField>
86 ValidationException& AddFields(FieldsT&& value) {
87 m_fieldsHasBeenSet = true;
88 m_fields.emplace_back(std::forward<FieldsT>(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_fieldsHasBeenSet = false;
101};
102
103} // namespace Model
104} // namespace NetworkManager
105} // namespace Aws
ValidationException & AddFields(FieldsT &&value)
void SetReason(ValidationExceptionReason value)
ValidationException & WithFields(FieldsT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
AWS_NETWORKMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_NETWORKMANAGER_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithMessage(MessageT &&value)
AWS_NETWORKMANAGER_API ValidationException()=default
const Aws::Vector< ValidationExceptionField > & GetFields() const
AWS_NETWORKMANAGER_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