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/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/invoicing/Invoicing_EXPORTS.h>
10#include <aws/invoicing/model/ValidationExceptionField.h>
11#include <aws/invoicing/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 Invoicing {
23namespace Model {
24
32 public:
33 AWS_INVOICING_API ValidationException() = default;
34 AWS_INVOICING_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
36 AWS_INVOICING_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 const Aws::String& GetResourceName() const { return m_resourceName; }
59 inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; }
60 template <typename ResourceNameT = Aws::String>
61 void SetResourceName(ResourceNameT&& value) {
62 m_resourceNameHasBeenSet = true;
63 m_resourceName = std::forward<ResourceNameT>(value);
64 }
65 template <typename ResourceNameT = Aws::String>
66 ValidationException& WithResourceName(ResourceNameT&& value) {
67 SetResourceName(std::forward<ResourceNameT>(value));
68 return *this;
69 }
71
73
76 inline ValidationExceptionReason GetReason() const { return m_reason; }
77 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
79 m_reasonHasBeenSet = true;
80 m_reason = value;
81 }
83 SetReason(value);
84 return *this;
85 }
87
89
93 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
94 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
95 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
96 void SetFieldList(FieldListT&& value) {
97 m_fieldListHasBeenSet = true;
98 m_fieldList = std::forward<FieldListT>(value);
99 }
100 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
101 ValidationException& WithFieldList(FieldListT&& value) {
102 SetFieldList(std::forward<FieldListT>(value));
103 return *this;
104 }
105 template <typename FieldListT = ValidationExceptionField>
106 ValidationException& AddFieldList(FieldListT&& value) {
107 m_fieldListHasBeenSet = true;
108 m_fieldList.emplace_back(std::forward<FieldListT>(value));
109 return *this;
110 }
112 private:
113 Aws::String m_message;
114
115 Aws::String m_resourceName;
116
118
120 bool m_messageHasBeenSet = false;
121 bool m_resourceNameHasBeenSet = false;
122 bool m_reasonHasBeenSet = false;
123 bool m_fieldListHasBeenSet = false;
124};
125
126} // namespace Model
127} // namespace Invoicing
128} // namespace Aws
AWS_INVOICING_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & WithResourceName(ResourceNameT &&value)
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
AWS_INVOICING_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationException & WithFieldList(FieldListT &&value)
void SetReason(ValidationExceptionReason value)
AWS_INVOICING_API ValidationException()=default
AWS_INVOICING_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationExceptionReason GetReason() const
ValidationException & WithMessage(MessageT &&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