AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
ValidationError.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/wickr/Wickr_EXPORTS.h>
10#include <aws/wickr/model/ErrorDetail.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Wickr {
22namespace Model {
23
32 public:
33 AWS_WICKR_API ValidationError() = default;
36 AWS_WICKR_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline const Aws::Vector<ErrorDetail>& GetReasons() const { return m_reasons; }
44 inline bool ReasonsHasBeenSet() const { return m_reasonsHasBeenSet; }
45 template <typename ReasonsT = Aws::Vector<ErrorDetail>>
46 void SetReasons(ReasonsT&& value) {
47 m_reasonsHasBeenSet = true;
48 m_reasons = std::forward<ReasonsT>(value);
49 }
50 template <typename ReasonsT = Aws::Vector<ErrorDetail>>
51 ValidationError& WithReasons(ReasonsT&& value) {
52 SetReasons(std::forward<ReasonsT>(value));
53 return *this;
54 }
55 template <typename ReasonsT = ErrorDetail>
56 ValidationError& AddReasons(ReasonsT&& value) {
57 m_reasonsHasBeenSet = true;
58 m_reasons.emplace_back(std::forward<ReasonsT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::String& GetMessage() const { return m_message; }
68 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
69 template <typename MessageT = Aws::String>
70 void SetMessage(MessageT&& value) {
71 m_messageHasBeenSet = true;
72 m_message = std::forward<MessageT>(value);
73 }
74 template <typename MessageT = Aws::String>
75 ValidationError& WithMessage(MessageT&& value) {
76 SetMessage(std::forward<MessageT>(value));
77 return *this;
78 }
80 private:
82
83 Aws::String m_message;
84 bool m_reasonsHasBeenSet = false;
85 bool m_messageHasBeenSet = false;
86};
87
88} // namespace Model
89} // namespace Wickr
90} // namespace Aws
AWS_WICKR_API ValidationError(Aws::Utils::Json::JsonView jsonValue)
ValidationError & WithReasons(ReasonsT &&value)
AWS_WICKR_API ValidationError()=default
ValidationError & AddReasons(ReasonsT &&value)
AWS_WICKR_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetMessage() const
const Aws::Vector< ErrorDetail > & GetReasons() const
AWS_WICKR_API ValidationError & operator=(Aws::Utils::Json::JsonView jsonValue)
ValidationError & WithMessage(MessageT &&value)
void SetMessage(MessageT &&value)
void SetReasons(ReasonsT &&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