AWS SDK for C++

AWS SDK for C++ Version 1.11.752

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/observabilityadmin/ObservabilityAdmin_EXPORTS.h>
10#include <aws/observabilityadmin/model/ValidationError.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ObservabilityAdmin {
22namespace Model {
23
31 public:
32 AWS_OBSERVABILITYADMIN_API ValidationException() = default;
33 AWS_OBSERVABILITYADMIN_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
34 AWS_OBSERVABILITYADMIN_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_OBSERVABILITYADMIN_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
39 inline const Aws::String& GetMessage() const { return m_message; }
40 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
41 template <typename MessageT = Aws::String>
42 void SetMessage(MessageT&& value) {
43 m_messageHasBeenSet = true;
44 m_message = std::forward<MessageT>(value);
45 }
46 template <typename MessageT = Aws::String>
47 ValidationException& WithMessage(MessageT&& value) {
48 SetMessage(std::forward<MessageT>(value));
49 return *this;
50 }
52
54
57 inline const Aws::Vector<ValidationError>& GetErrors() const { return m_errors; }
58 inline bool ErrorsHasBeenSet() const { return m_errorsHasBeenSet; }
59 template <typename ErrorsT = Aws::Vector<ValidationError>>
60 void SetErrors(ErrorsT&& value) {
61 m_errorsHasBeenSet = true;
62 m_errors = std::forward<ErrorsT>(value);
63 }
64 template <typename ErrorsT = Aws::Vector<ValidationError>>
65 ValidationException& WithErrors(ErrorsT&& value) {
66 SetErrors(std::forward<ErrorsT>(value));
67 return *this;
68 }
69 template <typename ErrorsT = ValidationError>
70 ValidationException& AddErrors(ErrorsT&& value) {
71 m_errorsHasBeenSet = true;
72 m_errors.emplace_back(std::forward<ErrorsT>(value));
73 return *this;
74 }
76 private:
77 Aws::String m_message;
78
80 bool m_messageHasBeenSet = false;
81 bool m_errorsHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace ObservabilityAdmin
86} // namespace Aws
ValidationException & WithErrors(ErrorsT &&value)
ValidationException & AddErrors(ErrorsT &&value)
const Aws::Vector< ValidationError > & GetErrors() const
AWS_OBSERVABILITYADMIN_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_OBSERVABILITYADMIN_API ValidationException()=default
ValidationException & WithMessage(MessageT &&value)
AWS_OBSERVABILITYADMIN_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_OBSERVABILITYADMIN_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