AWS SDK for C++  1.9.123
AWS SDK for C++
ValidationException.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20  class JsonValue;
21  class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace GreengrassV2
25 {
26 namespace Model
27 {
28 
36  {
37  public:
42 
43 
44 
45  inline const Aws::String& GetMessage() const{ return m_message; }
46 
47 
48  inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
49 
50 
51  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
52 
53 
54  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
55 
56 
57  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
58 
59 
60  inline ValidationException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
61 
62 
63  inline ValidationException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
64 
65 
66  inline ValidationException& WithMessage(const char* value) { SetMessage(value); return *this;}
67 
68 
72  inline const ValidationExceptionReason& GetReason() const{ return m_reason; }
73 
77  inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
78 
82  inline void SetReason(const ValidationExceptionReason& value) { m_reasonHasBeenSet = true; m_reason = value; }
83 
87  inline void SetReason(ValidationExceptionReason&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); }
88 
92  inline ValidationException& WithReason(const ValidationExceptionReason& value) { SetReason(value); return *this;}
93 
97  inline ValidationException& WithReason(ValidationExceptionReason&& value) { SetReason(std::move(value)); return *this;}
98 
99 
103  inline const Aws::Vector<ValidationExceptionField>& GetFields() const{ return m_fields; }
104 
108  inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
109 
113  inline void SetFields(const Aws::Vector<ValidationExceptionField>& value) { m_fieldsHasBeenSet = true; m_fields = value; }
114 
118  inline void SetFields(Aws::Vector<ValidationExceptionField>&& value) { m_fieldsHasBeenSet = true; m_fields = std::move(value); }
119 
123  inline ValidationException& WithFields(const Aws::Vector<ValidationExceptionField>& value) { SetFields(value); return *this;}
124 
128  inline ValidationException& WithFields(Aws::Vector<ValidationExceptionField>&& value) { SetFields(std::move(value)); return *this;}
129 
133  inline ValidationException& AddFields(const ValidationExceptionField& value) { m_fieldsHasBeenSet = true; m_fields.push_back(value); return *this; }
134 
138  inline ValidationException& AddFields(ValidationExceptionField&& value) { m_fieldsHasBeenSet = true; m_fields.push_back(std::move(value)); return *this; }
139 
140  private:
141 
142  Aws::String m_message;
143  bool m_messageHasBeenSet;
144 
145  ValidationExceptionReason m_reason;
146  bool m_reasonHasBeenSet;
147 
149  bool m_fieldsHasBeenSet;
150  };
151 
152 } // namespace Model
153 } // namespace GreengrassV2
154 } // namespace Aws
Aws::GreengrassV2::Model::ValidationException::WithMessage
ValidationException & WithMessage(Aws::String &&value)
Definition: ValidationException.h:63
Aws::GreengrassV2::Model::ValidationException::GetFields
const Aws::Vector< ValidationExceptionField > & GetFields() const
Definition: ValidationException.h:103
Aws::GreengrassV2::Model::ValidationException::SetMessage
void SetMessage(const char *value)
Definition: ValidationException.h:57
Aws::GreengrassV2::Model::ValidationException::AddFields
ValidationException & AddFields(ValidationExceptionField &&value)
Definition: ValidationException.h:138
Aws::GreengrassV2::Model::ValidationException
Definition: ValidationException.h:36
Aws::GreengrassV2::Model::ValidationException::SetReason
void SetReason(ValidationExceptionReason &&value)
Definition: ValidationException.h:87
Aws::GreengrassV2::Model::ValidationException::ReasonHasBeenSet
bool ReasonHasBeenSet() const
Definition: ValidationException.h:77
GreengrassV2_EXPORTS.h
Aws::GreengrassV2::Model::ValidationException::WithMessage
ValidationException & WithMessage(const char *value)
Definition: ValidationException.h:66
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::GreengrassV2::Model::ValidationException::SetFields
void SetFields(const Aws::Vector< ValidationExceptionField > &value)
Definition: ValidationException.h:113
AWSVector.h
Aws::GreengrassV2::Model::ValidationException::SetMessage
void SetMessage(Aws::String &&value)
Definition: ValidationException.h:54
AWS_GREENGRASSV2_API
#define AWS_GREENGRASSV2_API
Definition: GreengrassV2_EXPORTS.h:28
Aws::GreengrassV2::Model::ValidationException::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
ValidationExceptionField.h
Aws::GreengrassV2::Model::ValidationException::FieldsHasBeenSet
bool FieldsHasBeenSet() const
Definition: ValidationException.h:108
Aws::GreengrassV2::Model::ValidationExceptionField
Definition: ValidationExceptionField.h:33
Aws::GreengrassV2::Model::ValidationException::GetMessage
const Aws::String & GetMessage() const
Definition: ValidationException.h:45
Aws::GreengrassV2::Model::ValidationException::ValidationException
ValidationException(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
Aws::GreengrassV2::Model::ValidationException::SetReason
void SetReason(const ValidationExceptionReason &value)
Definition: ValidationException.h:82
AWSString.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::GreengrassV2::Model::ValidationException::GetReason
const ValidationExceptionReason & GetReason() const
Definition: ValidationException.h:72
Aws::GreengrassV2::Model::ValidationException::SetMessage
void SetMessage(const Aws::String &value)
Definition: ValidationException.h:51
Aws::GreengrassV2::Model::ValidationException::SetFields
void SetFields(Aws::Vector< ValidationExceptionField > &&value)
Definition: ValidationException.h:118
Aws::GreengrassV2::Model::ValidationException::WithFields
ValidationException & WithFields(Aws::Vector< ValidationExceptionField > &&value)
Definition: ValidationException.h:128
Aws::GreengrassV2::Model::ValidationException::MessageHasBeenSet
bool MessageHasBeenSet() const
Definition: ValidationException.h:48
Aws::GreengrassV2::Model::ValidationException::WithMessage
ValidationException & WithMessage(const Aws::String &value)
Definition: ValidationException.h:60
Aws::GreengrassV2::Model::ValidationException::WithReason
ValidationException & WithReason(ValidationExceptionReason &&value)
Definition: ValidationException.h:97
Aws
Definition: AccessManagementClient.h:15
ValidationExceptionReason.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::GreengrassV2::Model::ValidationException::operator=
ValidationException & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::GreengrassV2::Model::ValidationException::WithFields
ValidationException & WithFields(const Aws::Vector< ValidationExceptionField > &value)
Definition: ValidationException.h:123
Aws::GreengrassV2::Model::ValidationException::WithReason
ValidationException & WithReason(const ValidationExceptionReason &value)
Definition: ValidationException.h:92
Aws::GreengrassV2::Model::ValidationException::ValidationException
ValidationException()
Aws::GreengrassV2::Model::ValidationException::AddFields
ValidationException & AddFields(const ValidationExceptionField &value)
Definition: ValidationException.h:133
Aws::GreengrassV2::Model::ValidationExceptionReason
ValidationExceptionReason
Definition: ValidationExceptionReason.h:17