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/partnercentral-account/PartnerCentralAccount_EXPORTS.h>
10#include <aws/partnercentral-account/model/ValidationError.h>
11#include <aws/partnercentral-account/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 PartnerCentralAccount {
23namespace Model {
24
33 public:
34 AWS_PARTNERCENTRALACCOUNT_API ValidationException() = default;
35 AWS_PARTNERCENTRALACCOUNT_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
36 AWS_PARTNERCENTRALACCOUNT_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_PARTNERCENTRALACCOUNT_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
76 inline const Aws::Vector<ValidationError>& GetErrorDetails() const { return m_errorDetails; }
77 inline bool ErrorDetailsHasBeenSet() const { return m_errorDetailsHasBeenSet; }
78 template <typename ErrorDetailsT = Aws::Vector<ValidationError>>
79 void SetErrorDetails(ErrorDetailsT&& value) {
80 m_errorDetailsHasBeenSet = true;
81 m_errorDetails = std::forward<ErrorDetailsT>(value);
82 }
83 template <typename ErrorDetailsT = Aws::Vector<ValidationError>>
84 ValidationException& WithErrorDetails(ErrorDetailsT&& value) {
85 SetErrorDetails(std::forward<ErrorDetailsT>(value));
86 return *this;
87 }
88 template <typename ErrorDetailsT = ValidationError>
89 ValidationException& AddErrorDetails(ErrorDetailsT&& value) {
90 m_errorDetailsHasBeenSet = true;
91 m_errorDetails.emplace_back(std::forward<ErrorDetailsT>(value));
92 return *this;
93 }
95 private:
96 Aws::String m_message;
97
99
100 Aws::Vector<ValidationError> m_errorDetails;
101 bool m_messageHasBeenSet = false;
102 bool m_reasonHasBeenSet = false;
103 bool m_errorDetailsHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace PartnerCentralAccount
108} // namespace Aws
ValidationException & WithReason(ValidationExceptionReason value)
AWS_PARTNERCENTRALACCOUNT_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithMessage(MessageT &&value)
AWS_PARTNERCENTRALACCOUNT_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithErrorDetails(ErrorDetailsT &&value)
const Aws::Vector< ValidationError > & GetErrorDetails() const
ValidationException & AddErrorDetails(ErrorDetailsT &&value)
AWS_PARTNERCENTRALACCOUNT_API ValidationException()=default
AWS_PARTNERCENTRALACCOUNT_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