AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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/pcs/PCS_EXPORTS.h>
10#include <aws/pcs/model/ValidationExceptionField.h>
11#include <aws/pcs/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 PCS {
23namespace Model {
24
37 public:
38 AWS_PCS_API ValidationException() = default;
42
44
45 inline const Aws::String& GetMessage() const { return m_message; }
46 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
47 template <typename MessageT = Aws::String>
48 void SetMessage(MessageT&& value) {
49 m_messageHasBeenSet = true;
50 m_message = std::forward<MessageT>(value);
51 }
52 template <typename MessageT = Aws::String>
53 ValidationException& WithMessage(MessageT&& value) {
54 SetMessage(std::forward<MessageT>(value));
55 return *this;
56 }
58
60
63 inline ValidationExceptionReason GetReason() const { return m_reason; }
64 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
66 m_reasonHasBeenSet = true;
67 m_reason = value;
68 }
70 SetReason(value);
71 return *this;
72 }
74
76
79 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
80 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
81 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
82 void SetFieldList(FieldListT&& value) {
83 m_fieldListHasBeenSet = true;
84 m_fieldList = std::forward<FieldListT>(value);
85 }
86 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
87 ValidationException& WithFieldList(FieldListT&& value) {
88 SetFieldList(std::forward<FieldListT>(value));
89 return *this;
90 }
91 template <typename FieldListT = ValidationExceptionField>
92 ValidationException& AddFieldList(FieldListT&& value) {
93 m_fieldListHasBeenSet = true;
94 m_fieldList.emplace_back(std::forward<FieldListT>(value));
95 return *this;
96 }
98 private:
99 Aws::String m_message;
100
102
104 bool m_messageHasBeenSet = false;
105 bool m_reasonHasBeenSet = false;
106 bool m_fieldListHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace PCS
111} // namespace Aws
AWS_PCS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetMessage() const
AWS_PCS_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & WithMessage(MessageT &&value)
void SetReason(ValidationExceptionReason value)
AWS_PCS_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_PCS_API ValidationException()=default
ValidationException & WithFieldList(FieldListT &&value)
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationExceptionReason GetReason() const
ValidationException & AddFieldList(FieldListT &&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