AWS SDK for C++

AWS SDK for C++ Version 1.11.794

Loading...
Searching...
No Matches
JobError.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/location/LocationService_EXPORTS.h>
10#include <aws/location/model/JobErrorCode.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace LocationService {
22namespace Model {
23
29class JobError {
30 public:
31 AWS_LOCATIONSERVICE_API JobError() = default;
32 AWS_LOCATIONSERVICE_API JobError(Aws::Utils::Json::JsonView jsonValue);
33 AWS_LOCATIONSERVICE_API JobError& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline JobErrorCode GetCode() const { return m_code; }
41 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
42 inline void SetCode(JobErrorCode value) {
43 m_codeHasBeenSet = true;
44 m_code = value;
45 }
47 SetCode(value);
48 return *this;
49 }
51
53
56 inline const Aws::Vector<Aws::String>& GetMessages() const { return m_messages; }
57 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
58 template <typename MessagesT = Aws::Vector<Aws::String>>
59 void SetMessages(MessagesT&& value) {
60 m_messagesHasBeenSet = true;
61 m_messages = std::forward<MessagesT>(value);
62 }
63 template <typename MessagesT = Aws::Vector<Aws::String>>
64 JobError& WithMessages(MessagesT&& value) {
65 SetMessages(std::forward<MessagesT>(value));
66 return *this;
67 }
68 template <typename MessagesT = Aws::String>
69 JobError& AddMessages(MessagesT&& value) {
70 m_messagesHasBeenSet = true;
71 m_messages.emplace_back(std::forward<MessagesT>(value));
72 return *this;
73 }
75 private:
77
78 Aws::Vector<Aws::String> m_messages;
79 bool m_codeHasBeenSet = false;
80 bool m_messagesHasBeenSet = false;
81};
82
83} // namespace Model
84} // namespace LocationService
85} // namespace Aws
JobError & AddMessages(MessagesT &&value)
Definition JobError.h:69
const Aws::Vector< Aws::String > & GetMessages() const
Definition JobError.h:56
AWS_LOCATIONSERVICE_API JobError(Aws::Utils::Json::JsonView jsonValue)
void SetMessages(MessagesT &&value)
Definition JobError.h:59
JobError & WithMessages(MessagesT &&value)
Definition JobError.h:64
void SetCode(JobErrorCode value)
Definition JobError.h:42
JobError & WithCode(JobErrorCode value)
Definition JobError.h:46
AWS_LOCATIONSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LOCATIONSERVICE_API JobError()=default
AWS_LOCATIONSERVICE_API JobError & operator=(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue