AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/qbusiness/QBusiness_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/qbusiness/model/ValidationExceptionReason.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/qbusiness/model/ValidationExceptionField.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace QBusiness
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_QBUSINESS_API ValidationException() = default;
41 AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const Aws::String& GetMessage() const { return m_message; }
49 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
50 template<typename MessageT = Aws::String>
51 void SetMessage(MessageT&& value) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
52 template<typename MessageT = Aws::String>
53 ValidationException& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
55
57
60 inline ValidationExceptionReason GetReason() const { return m_reason; }
61 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
62 inline void SetReason(ValidationExceptionReason value) { m_reasonHasBeenSet = true; m_reason = value; }
63 inline ValidationException& WithReason(ValidationExceptionReason value) { SetReason(value); return *this;}
65
67
70 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
71 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
72 template<typename FieldsT = Aws::Vector<ValidationExceptionField>>
73 void SetFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields = std::forward<FieldsT>(value); }
74 template<typename FieldsT = Aws::Vector<ValidationExceptionField>>
75 ValidationException& WithFields(FieldsT&& value) { SetFields(std::forward<FieldsT>(value)); return *this;}
76 template<typename FieldsT = ValidationExceptionField>
77 ValidationException& AddFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields.emplace_back(std::forward<FieldsT>(value)); return *this; }
79 private:
80
81 Aws::String m_message;
82 bool m_messageHasBeenSet = false;
83
85 bool m_reasonHasBeenSet = false;
86
88 bool m_fieldsHasBeenSet = false;
89 };
90
91} // namespace Model
92} // namespace QBusiness
93} // 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