AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/deadline/Deadline_EXPORTS.h>
11#include <aws/deadline/model/ValidationExceptionField.h>
12#include <aws/deadline/model/ValidationExceptionReason.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace deadline {
24namespace Model {
25
33 public:
34 AWS_DEADLINE_API ValidationException() = default;
37 AWS_DEADLINE_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
41 inline const Aws::String& GetMessage() const { return m_message; }
42 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
43 template <typename MessageT = Aws::String>
44 void SetMessage(MessageT&& value) {
45 m_messageHasBeenSet = true;
46 m_message = std::forward<MessageT>(value);
47 }
48 template <typename MessageT = Aws::String>
49 ValidationException& WithMessage(MessageT&& value) {
50 SetMessage(std::forward<MessageT>(value));
51 return *this;
52 }
54
56
59 inline ValidationExceptionReason GetReason() const { return m_reason; }
60 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
62 m_reasonHasBeenSet = true;
63 m_reason = value;
64 }
66 SetReason(value);
67 return *this;
68 }
70
72
75 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
76 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
77 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
78 void SetFieldList(FieldListT&& value) {
79 m_fieldListHasBeenSet = true;
80 m_fieldList = std::forward<FieldListT>(value);
81 }
82 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
83 ValidationException& WithFieldList(FieldListT&& value) {
84 SetFieldList(std::forward<FieldListT>(value));
85 return *this;
86 }
87 template <typename FieldListT = ValidationExceptionField>
88 ValidationException& AddFieldList(FieldListT&& value) {
89 m_fieldListHasBeenSet = true;
90 m_fieldList.emplace_back(std::forward<FieldListT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::Map<Aws::String, Aws::String>& GetContext() const { return m_context; }
100 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
101 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
102 void SetContext(ContextT&& value) {
103 m_contextHasBeenSet = true;
104 m_context = std::forward<ContextT>(value);
105 }
106 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
107 ValidationException& WithContext(ContextT&& value) {
108 SetContext(std::forward<ContextT>(value));
109 return *this;
110 }
111 template <typename ContextKeyT = Aws::String, typename ContextValueT = Aws::String>
112 ValidationException& AddContext(ContextKeyT&& key, ContextValueT&& value) {
113 m_contextHasBeenSet = true;
114 m_context.emplace(std::forward<ContextKeyT>(key), std::forward<ContextValueT>(value));
115 return *this;
116 }
118 private:
119 Aws::String m_message;
120
122
124
126 bool m_messageHasBeenSet = false;
127 bool m_reasonHasBeenSet = false;
128 bool m_fieldListHasBeenSet = false;
129 bool m_contextHasBeenSet = false;
130};
131
132} // namespace Model
133} // namespace deadline
134} // namespace Aws
ValidationExceptionReason GetReason() const
ValidationException & WithReason(ValidationExceptionReason value)
AWS_DEADLINE_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & AddContext(ContextKeyT &&key, ContextValueT &&value)
void SetReason(ValidationExceptionReason value)
ValidationException & WithContext(ContextT &&value)
ValidationException & WithMessage(MessageT &&value)
AWS_DEADLINE_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_DEADLINE_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithFieldList(FieldListT &&value)
AWS_DEADLINE_API ValidationException()=default
const Aws::Map< Aws::String, Aws::String > & GetContext() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue