AWS SDK for C++

AWS SDK for C++ Version 1.11.933

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/crt/cbor/Cbor.h>
10#include <aws/partnercentral-marketing/PartnerCentralMarketing_EXPORTS.h>
11#include <aws/partnercentral-marketing/model/ValidationExceptionField.h>
12#include <aws/partnercentral-marketing/model/ValidationExceptionReason.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Cbor {
19class CborValue;
20} // namespace Cbor
21} // namespace Utils
22namespace PartnerCentralMarketing {
23namespace Model {
24
35 public:
36 AWS_PARTNERCENTRALMARKETING_API ValidationException() = default;
37 AWS_PARTNERCENTRALMARKETING_API ValidationException(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
38 AWS_PARTNERCENTRALMARKETING_API ValidationException& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
39 AWS_PARTNERCENTRALMARKETING_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
40
42
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
64 inline ValidationExceptionReason GetReason() const { return m_reason; }
65 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
67 m_reasonHasBeenSet = true;
68 m_reason = value;
69 }
71 SetReason(value);
72 return *this;
73 }
75
77
97 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
98 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
99 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
100 void SetFieldList(FieldListT&& value) {
101 m_fieldListHasBeenSet = true;
102 m_fieldList = std::forward<FieldListT>(value);
103 }
104 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
105 ValidationException& WithFieldList(FieldListT&& value) {
106 SetFieldList(std::forward<FieldListT>(value));
107 return *this;
108 }
109 template <typename FieldListT = ValidationExceptionField>
110 ValidationException& AddFieldList(FieldListT&& value) {
111 m_fieldListHasBeenSet = true;
112 m_fieldList.emplace_back(std::forward<FieldListT>(value));
113 return *this;
114 }
116 private:
117 Aws::String m_message;
118
120
122 bool m_messageHasBeenSet = false;
123 bool m_reasonHasBeenSet = false;
124 bool m_fieldListHasBeenSet = false;
125};
126
127} // namespace Model
128} // namespace PartnerCentralMarketing
129} // namespace Aws
const Aws::Vector< ValidationExceptionField > & GetFieldList() const
AWS_PARTNERCENTRALMARKETING_API ValidationException()=default
AWS_PARTNERCENTRALMARKETING_API ValidationException(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & AddFieldList(FieldListT &&value)
AWS_PARTNERCENTRALMARKETING_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
ValidationException & WithMessage(MessageT &&value)
ValidationException & WithFieldList(FieldListT &&value)
AWS_PARTNERCENTRALMARKETING_API ValidationException & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector