AWS SDK for C++

AWS SDK for C++ Version 1.11.751

Loading...
Searching...
No Matches
ValidationError.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/observabilityadmin/ObservabilityAdmin_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace ObservabilityAdmin {
21namespace Model {
22
30 public:
31 AWS_OBSERVABILITYADMIN_API ValidationError() = default;
32 AWS_OBSERVABILITYADMIN_API ValidationError(Aws::Utils::Json::JsonView jsonValue);
33 AWS_OBSERVABILITYADMIN_API ValidationError& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_OBSERVABILITYADMIN_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetMessage() const { return m_message; }
41 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
42 template <typename MessageT = Aws::String>
43 void SetMessage(MessageT&& value) {
44 m_messageHasBeenSet = true;
45 m_message = std::forward<MessageT>(value);
46 }
47 template <typename MessageT = Aws::String>
48 ValidationError& WithMessage(MessageT&& value) {
49 SetMessage(std::forward<MessageT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetReason() const { return m_reason; }
59 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
60 template <typename ReasonT = Aws::String>
61 void SetReason(ReasonT&& value) {
62 m_reasonHasBeenSet = true;
63 m_reason = std::forward<ReasonT>(value);
64 }
65 template <typename ReasonT = Aws::String>
66 ValidationError& WithReason(ReasonT&& value) {
67 SetReason(std::forward<ReasonT>(value));
68 return *this;
69 }
71
73
77 inline const Aws::Map<Aws::String, Aws::String>& GetFieldMap() const { return m_fieldMap; }
78 inline bool FieldMapHasBeenSet() const { return m_fieldMapHasBeenSet; }
79 template <typename FieldMapT = Aws::Map<Aws::String, Aws::String>>
80 void SetFieldMap(FieldMapT&& value) {
81 m_fieldMapHasBeenSet = true;
82 m_fieldMap = std::forward<FieldMapT>(value);
83 }
84 template <typename FieldMapT = Aws::Map<Aws::String, Aws::String>>
85 ValidationError& WithFieldMap(FieldMapT&& value) {
86 SetFieldMap(std::forward<FieldMapT>(value));
87 return *this;
88 }
89 template <typename FieldMapKeyT = Aws::String, typename FieldMapValueT = Aws::String>
90 ValidationError& AddFieldMap(FieldMapKeyT&& key, FieldMapValueT&& value) {
91 m_fieldMapHasBeenSet = true;
92 m_fieldMap.emplace(std::forward<FieldMapKeyT>(key), std::forward<FieldMapValueT>(value));
93 return *this;
94 }
96 private:
97 Aws::String m_message;
98
99 Aws::String m_reason;
100
102 bool m_messageHasBeenSet = false;
103 bool m_reasonHasBeenSet = false;
104 bool m_fieldMapHasBeenSet = false;
105};
106
107} // namespace Model
108} // namespace ObservabilityAdmin
109} // namespace Aws
const Aws::Map< Aws::String, Aws::String > & GetFieldMap() const
AWS_OBSERVABILITYADMIN_API ValidationError & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_OBSERVABILITYADMIN_API ValidationError()=default
AWS_OBSERVABILITYADMIN_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationError & AddFieldMap(FieldMapKeyT &&key, FieldMapValueT &&value)
AWS_OBSERVABILITYADMIN_API ValidationError(Aws::Utils::Json::JsonView jsonValue)
ValidationError & WithFieldMap(FieldMapT &&value)
ValidationError & WithReason(ReasonT &&value)
ValidationError & WithMessage(MessageT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue