AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/appconfigcloudextension/AppConfigCloudExtension_EXPORTS.h>
8#include <aws/appconfigcloudextension/model/ValidationError.h>
9#include <aws/appconfigcloudextension/model/ValidationExceptionReason.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace AppConfigCloudExtension {
23namespace Model {
24
33 public:
34 AWS_APPCONFIGCLOUDEXTENSION_API ValidationException() = default;
35 AWS_APPCONFIGCLOUDEXTENSION_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
36 AWS_APPCONFIGCLOUDEXTENSION_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_APPCONFIGCLOUDEXTENSION_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetMessage() const { return m_message; }
44 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
45 template <typename MessageT = Aws::String>
46 void SetMessage(MessageT&& value) {
47 m_messageHasBeenSet = true;
48 m_message = std::forward<MessageT>(value);
49 }
50 template <typename MessageT = Aws::String>
51 ValidationException& WithMessage(MessageT&& value) {
52 SetMessage(std::forward<MessageT>(value));
53 return *this;
54 }
56
58
61 inline ValidationExceptionReason GetReason() const { return m_reason; }
62 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
64 m_reasonHasBeenSet = true;
65 m_reason = value;
66 }
68 SetReason(value);
69 return *this;
70 }
72
74
79 inline const Aws::Vector<ValidationError>& GetErrors() const { return m_errors; }
80 inline bool ErrorsHasBeenSet() const { return m_errorsHasBeenSet; }
81 template <typename ErrorsT = Aws::Vector<ValidationError>>
82 void SetErrors(ErrorsT&& value) {
83 m_errorsHasBeenSet = true;
84 m_errors = std::forward<ErrorsT>(value);
85 }
86 template <typename ErrorsT = Aws::Vector<ValidationError>>
87 ValidationException& WithErrors(ErrorsT&& value) {
88 SetErrors(std::forward<ErrorsT>(value));
89 return *this;
90 }
91 template <typename ErrorsT = ValidationError>
92 ValidationException& AddErrors(ErrorsT&& value) {
93 m_errorsHasBeenSet = true;
94 m_errors.emplace_back(std::forward<ErrorsT>(value));
95 return *this;
96 }
98 private:
99 Aws::String m_message;
100
102
104 bool m_messageHasBeenSet = false;
105 bool m_reasonHasBeenSet = false;
106 bool m_errorsHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace AppConfigCloudExtension
111} // namespace Aws
ValidationException & WithMessage(MessageT &&value)
AWS_APPCONFIGCLOUDEXTENSION_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_APPCONFIGCLOUDEXTENSION_API ValidationException()=default
ValidationException & WithReason(ValidationExceptionReason value)
AWS_APPCONFIGCLOUDEXTENSION_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_APPCONFIGCLOUDEXTENSION_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< ValidationError > & GetErrors() 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