AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ValidationException.h
1
6#pragma once
7#include <aws/inspector2/Inspector2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/inspector2/model/ValidationExceptionReason.h>
11#include <aws/inspector2/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 Inspector2
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_INSPECTOR2_API ValidationException() = default;
39 AWS_INSPECTOR2_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
41 AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
49 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
50 template<typename FieldsT = Aws::Vector<ValidationExceptionField>>
51 void SetFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields = std::forward<FieldsT>(value); }
52 template<typename FieldsT = Aws::Vector<ValidationExceptionField>>
53 ValidationException& WithFields(FieldsT&& value) { SetFields(std::forward<FieldsT>(value)); return *this;}
54 template<typename FieldsT = ValidationExceptionField>
55 ValidationException& AddFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields.emplace_back(std::forward<FieldsT>(value)); return *this; }
57
59
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) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
64 template<typename MessageT = Aws::String>
65 ValidationException& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
67
69
72 inline ValidationExceptionReason GetReason() const { return m_reason; }
73 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
74 inline void SetReason(ValidationExceptionReason value) { m_reasonHasBeenSet = true; m_reason = value; }
75 inline ValidationException& WithReason(ValidationExceptionReason value) { SetReason(value); return *this;}
77 private:
78
80 bool m_fieldsHasBeenSet = false;
81
82 Aws::String m_message;
83 bool m_messageHasBeenSet = false;
84
86 bool m_reasonHasBeenSet = false;
87 };
88
89} // namespace Model
90} // namespace Inspector2
91} // namespace Aws
AWS_INSPECTOR2_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_INSPECTOR2_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
ValidationException & WithMessage(MessageT &&value)
AWS_INSPECTOR2_API ValidationException()=default
const Aws::Vector< ValidationExceptionField > & GetFields() const
ValidationExceptionReason GetReason() const
void SetReason(ValidationExceptionReason value)
ValidationException & WithFields(FieldsT &&value)
ValidationException & AddFields(FieldsT &&value)
ValidationException & WithReason(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