AWS SDK for C++

AWS SDK for C++ Version 1.11.943

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/context/Context_EXPORTS.h>
8#include <aws/context/model/ValidationExceptionField.h>
9#include <aws/context/model/ValidationExceptionReason.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/crt/cbor/Cbor.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Cbor {
19class CborValue;
20} // namespace Cbor
21} // namespace Utils
22namespace Context {
23namespace Model {
24
32 public:
33 AWS_CONTEXT_API ValidationException() = default;
34 AWS_CONTEXT_API ValidationException(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_CONTEXT_API ValidationException& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_CONTEXT_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
37
39
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
65 inline ValidationExceptionReason GetReason() const { return m_reason; }
66 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
68 m_reasonHasBeenSet = true;
69 m_reason = value;
70 }
72 SetReason(value);
73 return *this;
74 }
76
78
82 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
83 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
84 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
85 void SetFieldList(FieldListT&& value) {
86 m_fieldListHasBeenSet = true;
87 m_fieldList = std::forward<FieldListT>(value);
88 }
89 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
90 ValidationException& WithFieldList(FieldListT&& value) {
91 SetFieldList(std::forward<FieldListT>(value));
92 return *this;
93 }
94 template <typename FieldListT = ValidationExceptionField>
95 ValidationException& AddFieldList(FieldListT&& value) {
96 m_fieldListHasBeenSet = true;
97 m_fieldList.emplace_back(std::forward<FieldListT>(value));
98 return *this;
99 }
101 private:
102 Aws::String m_message;
103
105
107 bool m_messageHasBeenSet = false;
108 bool m_reasonHasBeenSet = false;
109 bool m_fieldListHasBeenSet = false;
110};
111
112} // namespace Model
113} // namespace Context
114} // namespace Aws
ValidationExceptionReason GetReason() const
AWS_CONTEXT_API ValidationException & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_CONTEXT_API ValidationException(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
ValidationException & WithFieldList(FieldListT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
AWS_CONTEXT_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
void SetReason(ValidationExceptionReason value)
AWS_CONTEXT_API ValidationException()=default
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithMessage(MessageT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector