AWS SDK for C++

AWS SDK for C++ Version 1.11.740

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/qbusiness/QBusiness_EXPORTS.h>
10#include <aws/qbusiness/model/ValidationExceptionField.h>
11#include <aws/qbusiness/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 QBusiness {
23namespace Model {
24
32 public:
33 AWS_QBUSINESS_API ValidationException() = default;
36 AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() 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>
51 SetMessage(std::forward<MessageT>(value));
52 return *this;
53 }
55
57
60 inline ValidationExceptionReason GetReason() const { return m_reason; }
61 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
63 m_reasonHasBeenSet = true;
64 m_reason = value;
65 }
67 SetReason(value);
68 return *this;
69 }
71
73
76 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
77 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
78 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
79 void SetFields(FieldsT&& value) {
80 m_fieldsHasBeenSet = true;
81 m_fields = std::forward<FieldsT>(value);
82 }
83 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
85 SetFields(std::forward<FieldsT>(value));
86 return *this;
87 }
88 template <typename FieldsT = ValidationExceptionField>
90 m_fieldsHasBeenSet = true;
91 m_fields.emplace_back(std::forward<FieldsT>(value));
92 return *this;
93 }
95 private:
96 Aws::String m_message;
97
99
101 bool m_messageHasBeenSet = false;
102 bool m_reasonHasBeenSet = false;
103 bool m_fieldsHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace QBusiness
108} // namespace Aws
const Aws::Vector< ValidationExceptionField > & GetFields() const
AWS_QBUSINESS_API ValidationException()=default
ValidationException & WithMessage(MessageT &&value)
ValidationExceptionReason GetReason() const
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & WithFields(FieldsT &&value)
AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & AddFields(FieldsT &&value)
void SetReason(ValidationExceptionReason value)
AWS_QBUSINESS_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_QBUSINESS_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue