AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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/devops-guru/DevOpsGuru_EXPORTS.h>
10#include <aws/devops-guru/model/ValidationExceptionField.h>
11#include <aws/devops-guru/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 DevOpsGuru {
23namespace Model {
24
32 public:
33 AWS_DEVOPSGURU_API ValidationException() = default;
34 AWS_DEVOPSGURU_API ValidationException(Aws::Utils::Json::JsonView jsonValue);
36 AWS_DEVOPSGURU_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetMessage() const { return m_message; }
43 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
44 template <typename MessageT = Aws::String>
45 void SetMessage(MessageT&& value) {
46 m_messageHasBeenSet = true;
47 m_message = std::forward<MessageT>(value);
48 }
49 template <typename MessageT = Aws::String>
50 ValidationException& WithMessage(MessageT&& value) {
51 SetMessage(std::forward<MessageT>(value));
52 return *this;
53 }
55
57
60 inline ValidationExceptionReason GetReason() const { return m_reason; }
61 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
63 m_reasonHasBeenSet = true;
64 m_reason = value;
65 }
67 SetReason(value);
68 return *this;
69 }
71
73
74 inline const Aws::Vector<ValidationExceptionField>& GetFields() const { return m_fields; }
75 inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
76 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
77 void SetFields(FieldsT&& value) {
78 m_fieldsHasBeenSet = true;
79 m_fields = std::forward<FieldsT>(value);
80 }
81 template <typename FieldsT = Aws::Vector<ValidationExceptionField>>
82 ValidationException& WithFields(FieldsT&& value) {
83 SetFields(std::forward<FieldsT>(value));
84 return *this;
85 }
86 template <typename FieldsT = ValidationExceptionField>
87 ValidationException& AddFields(FieldsT&& value) {
88 m_fieldsHasBeenSet = true;
89 m_fields.emplace_back(std::forward<FieldsT>(value));
90 return *this;
91 }
93 private:
94 Aws::String m_message;
95
97
99 bool m_messageHasBeenSet = false;
100 bool m_reasonHasBeenSet = false;
101 bool m_fieldsHasBeenSet = false;
102};
103
104} // namespace Model
105} // namespace DevOpsGuru
106} // namespace Aws
AWS_DEVOPSGURU_API ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_DEVOPSGURU_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_DEVOPSGURU_API ValidationException(Aws::Utils::Json::JsonView jsonValue)
AWS_DEVOPSGURU_API ValidationException()=default
ValidationException & AddFields(FieldsT &&value)
const Aws::Vector< ValidationExceptionField > & GetFields() const
ValidationException & WithMessage(MessageT &&value)
ValidationExceptionReason GetReason() const
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