AWS SDK for C++

AWS SDK for C++ Version 1.11.935

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/polly/Polly_EXPORTS.h>
10#include <aws/polly/model/ValidationExceptionField.h>
11#include <aws/polly/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 Polly {
23namespace Model {
24
32 public:
33 AWS_POLLY_API ValidationException() = default;
36 AWS_POLLY_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
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
80 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
81 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
82 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
83 void SetFields(FieldsT&& value) {
84 m_fieldsHasBeenSet = true;
85 m_fields = std::forward<FieldsT>(value);
86 }
87 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
88 ValidationException& WithFields(FieldsT&& value) {
89 SetFields(std::forward<FieldsT>(value));
90 return *this;
91 }
92 template <typename FieldsT = ValidationExceptionField>
93 ValidationException& AddFields(FieldsT&& value) {
94 m_fieldsHasBeenSet = true;
95 m_fields.emplace_back(std::forward<FieldsT>(value));
96 return *this;
97 }
99 private:
100 Aws::String m_message;
101
103
105 bool m_messageHasBeenSet = false;
106 bool m_reasonHasBeenSet = false;
107 bool m_fieldsHasBeenSet = false;
108};
109
110} // namespace Model
111} // namespace Polly
112} // namespace Aws
AWS_POLLY_API ValidationException()=default
ValidationException & AddFields(FieldsT &&value)
ValidationExceptionReason GetReason() const
ValidationException & WithMessage(MessageT &&value)
const Aws::Vector< ValidationExceptionField > & GetFields() const
AWS_POLLY_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_POLLY_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_POLLY_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
ValidationException & WithReason(ValidationExceptionReason value)
ValidationException & WithFields(FieldsT &&value)
void SetReason(ValidationExceptionReason 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