AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/codeguru-security/CodeGuruSecurity_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/codeguru-security/model/ValidationExceptionReason.h>
11#include <aws/codeguru-security/model/ValidationExceptionField.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace CodeGuruSecurity
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_CODEGURUSECURITY_API ValidationException() = default;
39 AWS_CODEGURUSECURITY_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
40 AWS_CODEGURUSECURITY_API ValidationException& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_CODEGURUSECURITY_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const Aws::String& GetErrorCode() const { return m_errorCode; }
49 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
50 template<typename ErrorCodeT = Aws::String>
51 void SetErrorCode(ErrorCodeT&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::forward<ErrorCodeT>(value); }
52 template<typename ErrorCodeT = Aws::String>
53 ValidationException& WithErrorCode(ErrorCodeT&& value) { SetErrorCode(std::forward<ErrorCodeT>(value)); return *this;}
55
57
60 inline const Aws::Vector<ValidationExceptionField>& GetFieldList() const { return m_fieldList; }
61 inline bool FieldListHasBeenSet() const { return m_fieldListHasBeenSet; }
62 template<typename FieldListT = Aws::Vector<ValidationExceptionField>>
63 void SetFieldList(FieldListT&& value) { m_fieldListHasBeenSet = true; m_fieldList = std::forward<FieldListT>(value); }
64 template<typename FieldListT = Aws::Vector<ValidationExceptionField>>
65 ValidationException& WithFieldList(FieldListT&& value) { SetFieldList(std::forward<FieldListT>(value)); return *this;}
66 template<typename FieldListT = ValidationExceptionField>
67 ValidationException& AddFieldList(FieldListT&& value) { m_fieldListHasBeenSet = true; m_fieldList.emplace_back(std::forward<FieldListT>(value)); return *this; }
69
71
74 inline const Aws::String& GetMessage() const { return m_message; }
75 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
76 template<typename MessageT = Aws::String>
77 void SetMessage(MessageT&& value) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
78 template<typename MessageT = Aws::String>
79 ValidationException& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
81
83
86 inline ValidationExceptionReason GetReason() const { return m_reason; }
87 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
88 inline void SetReason(ValidationExceptionReason value) { m_reasonHasBeenSet = true; m_reason = value; }
89 inline ValidationException& WithReason(ValidationExceptionReason value) { SetReason(value); return *this;}
91 private:
92
93 Aws::String m_errorCode;
94 bool m_errorCodeHasBeenSet = false;
95
97 bool m_fieldListHasBeenSet = false;
98
99 Aws::String m_message;
100 bool m_messageHasBeenSet = false;
101
103 bool m_reasonHasBeenSet = false;
104 };
105
106} // namespace Model
107} // namespace CodeGuruSecurity
108} // 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