AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/auditmanager/AuditManager_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/auditmanager/model/ValidationExceptionReason.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/auditmanager/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 AuditManager
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_AUDITMANAGER_API ValidationException() = default;
39 AWS_AUDITMANAGER_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
41 AWS_AUDITMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
46 inline const Aws::String& GetMessage() const { return m_message; }
47 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
48 template<typename MessageT = Aws::String>
49 void SetMessage(MessageT&& value) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
50 template<typename MessageT = Aws::String>
51 ValidationException& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
53
55
58 inline ValidationExceptionReason GetReason() const { return m_reason; }
59 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
60 inline void SetReason(ValidationExceptionReason value) { m_reasonHasBeenSet = true; m_reason = value; }
61 inline ValidationException& WithReason(ValidationExceptionReason value) { SetReason(value); return *this;}
63
65
68 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
69 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
70 template<typename FieldsT = Aws::Vector<ValidationExceptionField>>
71 void SetFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields = std::forward<FieldsT>(value); }
72 template<typename FieldsT = Aws::Vector<ValidationExceptionField>>
73 ValidationException& WithFields(FieldsT&& value) { SetFields(std::forward<FieldsT>(value)); return *this;}
74 template<typename FieldsT = ValidationExceptionField>
75 ValidationException& AddFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields.emplace_back(std::forward<FieldsT>(value)); return *this; }
77 private:
78
79 Aws::String m_message;
80 bool m_messageHasBeenSet = false;
81
83 bool m_reasonHasBeenSet = false;
84
86 bool m_fieldsHasBeenSet = false;
87 };
88
89} // namespace Model
90} // namespace AuditManager
91} // namespace Aws
AWS_AUDITMANAGER_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithReason(ValidationExceptionReason value)
AWS_AUDITMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & WithMessage(MessageT &&value)
const Aws::Vector< ValidationExceptionField > & GetFields() const
AWS_AUDITMANAGER_API ValidationException()=default
ValidationException & AddFields(FieldsT &&value)
AWS_AUDITMANAGER_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetReason(ValidationExceptionReason value)
ValidationExceptionReason GetReason() const
ValidationException & WithFields(FieldsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue