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/mgn/Mgn_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/mgn/model/ValidationExceptionReason.h>
11#include <aws/mgn/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 mgn
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_MGN_API ValidationException() = default;
41
42
44
45 inline const Aws::String& GetCode() const { return m_code; }
46 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
47 template<typename CodeT = Aws::String>
48 void SetCode(CodeT&& value) { m_codeHasBeenSet = true; m_code = std::forward<CodeT>(value); }
49 template<typename CodeT = Aws::String>
50 ValidationException& WithCode(CodeT&& value) { SetCode(std::forward<CodeT>(value)); return *this;}
52
54
57 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
58 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
59 template<typename FieldListT = Aws::Vector<ValidationExceptionField>>
60 void SetFieldList(FieldListT&& value) { m_fieldListHasBeenSet = true; m_fieldList = std::forward<FieldListT>(value); }
61 template<typename FieldListT = Aws::Vector<ValidationExceptionField>>
62 ValidationException& WithFieldList(FieldListT&& value) { SetFieldList(std::forward<FieldListT>(value)); return *this;}
63 template<typename FieldListT = ValidationExceptionField>
64 ValidationException& AddFieldList(FieldListT&& value) { m_fieldListHasBeenSet = true; m_fieldList.emplace_back(std::forward<FieldListT>(value)); return *this; }
66
68
69 inline const Aws::String& GetMessage() const { return m_message; }
70 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
71 template<typename MessageT = Aws::String>
72 void SetMessage(MessageT&& value) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
73 template<typename MessageT = Aws::String>
74 ValidationException& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
76
78
81 inline ValidationExceptionReason GetReason() const { return m_reason; }
82 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
83 inline void SetReason(ValidationExceptionReason value) { m_reasonHasBeenSet = true; m_reason = value; }
84 inline ValidationException& WithReason(ValidationExceptionReason value) { SetReason(value); return *this;}
86 private:
87
88 Aws::String m_code;
89 bool m_codeHasBeenSet = false;
90
92 bool m_fieldListHasBeenSet = false;
93
94 Aws::String m_message;
95 bool m_messageHasBeenSet = false;
96
98 bool m_reasonHasBeenSet = false;
99 };
100
101} // namespace Model
102} // namespace mgn
103} // namespace Aws
ValidationException & WithCode(CodeT &&value)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
AWS_MGN_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_MGN_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithFieldList(FieldListT &&value)
void SetReason(ValidationExceptionReason value)
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
const Aws::String & GetCode() const
AWS_MGN_API ValidationException()=default
const Aws::String & GetMessage() const
AWS_MGN_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationExceptionReason GetReason() const
ValidationException & WithMessage(MessageT &&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