AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/codeguru-security/CodeGuruSecurity_EXPORTS.h>
8#include <aws/codeguru-security/model/ValidationExceptionField.h>
9#include <aws/codeguru-security/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 CodeGuruSecurity {
23namespace Model {
24
32 public:
33 AWS_CODEGURUSECURITY_API ValidationException() = default;
34 AWS_CODEGURUSECURITY_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CODEGURUSECURITY_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_CODEGURUSECURITY_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetErrorCode() const { return m_errorCode; }
43 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
44 template <typename ErrorCodeT = Aws::String>
45 void SetErrorCode(ErrorCodeT&& value) {
46 m_errorCodeHasBeenSet = true;
47 m_errorCode = std::forward<ErrorCodeT>(value);
48 }
49 template <typename ErrorCodeT = Aws::String>
50 ValidationException& WithErrorCode(ErrorCodeT&& value) {
51 SetErrorCode(std::forward<ErrorCodeT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetMessage() const { return m_message; }
61 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
62 template <typename MessageT = Aws::String>
63 void SetMessage(MessageT&& value) {
64 m_messageHasBeenSet = true;
65 m_message = std::forward<MessageT>(value);
66 }
67 template <typename MessageT = Aws::String>
68 ValidationException& WithMessage(MessageT&& value) {
69 SetMessage(std::forward<MessageT>(value));
70 return *this;
71 }
73
75
78 inline ValidationExceptionReason GetReason() const { return m_reason; }
79 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
81 m_reasonHasBeenSet = true;
82 m_reason = value;
83 }
85 SetReason(value);
86 return *this;
87 }
89
91
94 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
95 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
96 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
97 void SetFieldList(FieldListT&& value) {
98 m_fieldListHasBeenSet = true;
99 m_fieldList = std::forward<FieldListT>(value);
100 }
101 template <typename FieldListT = Aws::Vector<ValidationExceptionField>>
102 ValidationException& WithFieldList(FieldListT&& value) {
103 SetFieldList(std::forward<FieldListT>(value));
104 return *this;
105 }
106 template <typename FieldListT = ValidationExceptionField>
107 ValidationException& AddFieldList(FieldListT&& value) {
108 m_fieldListHasBeenSet = true;
109 m_fieldList.emplace_back(std::forward<FieldListT>(value));
110 return *this;
111 }
113 private:
114 Aws::String m_errorCode;
115
116 Aws::String m_message;
117
119
121 bool m_errorCodeHasBeenSet = false;
122 bool m_messageHasBeenSet = false;
123 bool m_reasonHasBeenSet = false;
124 bool m_fieldListHasBeenSet = false;
125};
126
127} // namespace Model
128} // namespace CodeGuruSecurity
129} // namespace Aws
ValidationException & WithErrorCode(ErrorCodeT &&value)
ValidationException & WithReason(ValidationExceptionReason value)
AWS_CODEGURUSECURITY_API ValidationException()=default
ValidationException & WithFieldList(FieldListT &&value)
AWS_CODEGURUSECURITY_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & WithMessage(MessageT &&value)
AWS_CODEGURUSECURITY_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
void SetReason(ValidationExceptionReason value)
AWS_CODEGURUSECURITY_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ValidationExceptionField > & GetFieldList() 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