AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/billing/Billing_EXPORTS.h>
8#include <aws/billing/model/ValidationExceptionField.h>
9#include <aws/billing/model/ValidationExceptionReason.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Billing {
23namespace Model {
24
32 public:
33 AWS_BILLING_API ValidationException() = default;
36 AWS_BILLING_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
40 inline const Aws::String& GetMessage() const { return m_message; }
41 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
42 template <typename MessageT = Aws::String>
43 void SetMessage(MessageT&& value) {
44 m_messageHasBeenSet = true;
45 m_message = std::forward<MessageT>(value);
46 }
47 template <typename MessageT = Aws::String>
48 ValidationException& WithMessage(MessageT&& value) {
49 SetMessage(std::forward<MessageT>(value));
50 return *this;
51 }
53
55
59 inline ValidationExceptionReason GetReason() const { return m_reason; }
60 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
62 m_reasonHasBeenSet = true;
63 m_reason = value;
64 }
66 SetReason(value);
67 return *this;
68 }
70
72
76 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
77 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
78 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
79 void SetFieldList(FieldListT&& value) {
80 m_fieldListHasBeenSet = true;
81 m_fieldList = std::forward<FieldListT>(value);
82 }
83 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
84 ValidationException& WithFieldList(FieldListT&& value) {
85 SetFieldList(std::forward<FieldListT>(value));
86 return *this;
87 }
88 template <typename FieldListT = ValidationExceptionField>
89 ValidationException& AddFieldList(FieldListT&& value) {
90 m_fieldListHasBeenSet = true;
91 m_fieldList.emplace_back(std::forward<FieldListT>(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_fieldListHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace Billing
108} // namespace Aws
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
ValidationExceptionReason GetReason() const
ValidationException & WithMessage(MessageT &&value)
AWS_BILLING_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BILLING_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
void SetReason(ValidationExceptionReason value)
ValidationException & AddFieldList(FieldListT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & WithFieldList(FieldListT &&value)
AWS_BILLING_API ValidationException()=default
AWS_BILLING_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue