AWS SDK for C++

AWS SDK for C++ Version 1.11.719

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-selling/PartnerCentralSelling_EXPORTS.h>
10#include <aws/partnercentral-selling/model/ValidationExceptionError.h>
11#include <aws/partnercentral-selling/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 PartnerCentralSelling {
23namespace Model {
24
34 public:
35 AWS_PARTNERCENTRALSELLING_API ValidationException() = default;
36 AWS_PARTNERCENTRALSELLING_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
37 AWS_PARTNERCENTRALSELLING_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_PARTNERCENTRALSELLING_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
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
66 inline ValidationExceptionReason GetReason() const { return m_reason; }
67 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
69 m_reasonHasBeenSet = true;
70 m_reason = value;
71 }
73 SetReason(value);
74 return *this;
75 }
77
79
83 inline const Aws::Vector<ValidationExceptionError>& GetErrorList() const { return m_errorList; }
84 inline bool ErrorListHasBeenSet() const { return m_errorListHasBeenSet; }
85 template <typename ErrorListT = Aws::Vector<ValidationExceptionError>>
86 void SetErrorList(ErrorListT&& value) {
87 m_errorListHasBeenSet = true;
88 m_errorList = std::forward<ErrorListT>(value);
89 }
90 template <typename ErrorListT = Aws::Vector<ValidationExceptionError>>
91 ValidationException& WithErrorList(ErrorListT&& value) {
92 SetErrorList(std::forward<ErrorListT>(value));
93 return *this;
94 }
95 template <typename ErrorListT = ValidationExceptionError>
96 ValidationException& AddErrorList(ErrorListT&& value) {
97 m_errorListHasBeenSet = true;
98 m_errorList.emplace_back(std::forward<ErrorListT>(value));
99 return *this;
100 }
102 private:
103 Aws::String m_message;
104
106
108 bool m_messageHasBeenSet = false;
109 bool m_reasonHasBeenSet = false;
110 bool m_errorListHasBeenSet = false;
111};
112
113} // namespace Model
114} // namespace PartnerCentralSelling
115} // namespace Aws
AWS_PARTNERCENTRALSELLING_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_PARTNERCENTRALSELLING_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_PARTNERCENTRALSELLING_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithErrorList(ErrorListT &&value)
AWS_PARTNERCENTRALSELLING_API ValidationException()=default
ValidationException & WithMessage(MessageT &&value)
ValidationException & AddErrorList(ErrorListT &&value)
const Aws::Vector< ValidationExceptionError > & GetErrorList() const
ValidationException & WithReason(ValidationExceptionReason 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