AWS SDK for C++

AWS SDK for C++ Version 1.11.712

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/partnercentral-benefits/PartnerCentralBenefits_EXPORTS.h>
10#include <aws/partnercentral-benefits/model/ValidationExceptionField.h>
11#include <aws/partnercentral-benefits/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 PartnerCentralBenefits {
23namespace Model {
24
32 public:
33 AWS_PARTNERCENTRALBENEFITS_API ValidationException() = default;
34 AWS_PARTNERCENTRALBENEFITS_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
35 AWS_PARTNERCENTRALBENEFITS_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_PARTNERCENTRALBENEFITS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetMessage() const { return m_message; }
43 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
44 template <typename MessageT = Aws::String>
45 void SetMessage(MessageT&& value) {
46 m_messageHasBeenSet = true;
47 m_message = std::forward<MessageT>(value);
48 }
49 template <typename MessageT = Aws::String>
50 ValidationException& WithMessage(MessageT&& value) {
51 SetMessage(std::forward<MessageT>(value));
52 return *this;
53 }
55
57
60 inline ValidationExceptionReason GetReason() const { return m_reason; }
61 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
63 m_reasonHasBeenSet = true;
64 m_reason = value;
65 }
67 SetReason(value);
68 return *this;
69 }
71
73
76 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
77 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
78 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
79 void SetFieldList(FieldListT&& value) {
80 m_fieldListHasBeenSet = true;
81 m_fieldList = std::forward<FieldListT>(value);
82 }
83 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
84 ValidationException& WithFieldList(FieldListT&& value) {
85 SetFieldList(std::forward<FieldListT>(value));
86 return *this;
87 }
88 template <typename FieldListT = ValidationExceptionField>
89 ValidationException& AddFieldList(FieldListT&& value) {
90 m_fieldListHasBeenSet = true;
91 m_fieldList.emplace_back(std::forward<FieldListT>(value));
92 return *this;
93 }
95 private:
96 Aws::String m_message;
97
99
101 bool m_messageHasBeenSet = false;
102 bool m_reasonHasBeenSet = false;
103 bool m_fieldListHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace PartnerCentralBenefits
108} // namespace Aws
AWS_PARTNERCENTRALBENEFITS_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_PARTNERCENTRALBENEFITS_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithFieldList(FieldListT &&value)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationException & WithMessage(MessageT &&value)
ValidationException & AddFieldList(FieldListT &&value)
AWS_PARTNERCENTRALBENEFITS_API ValidationException()=default
ValidationException & WithReason(ValidationExceptionReason value)
AWS_PARTNERCENTRALBENEFITS_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue