AWS SDK for C++

AWS SDK for C++ Version 1.11.943

Loading...
Searching...
No Matches
ModelError.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/workspaces/WorkSpaces_EXPORTS.h>
10#include <aws/workspaces/model/ModelErrorCode.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace WorkSpaces {
21namespace Model {
22
30 public:
31 AWS_WORKSPACES_API ModelError() = default;
32 AWS_WORKSPACES_API ModelError(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_WORKSPACES_API ModelError& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
34 AWS_WORKSPACES_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
35
37
40 inline const Aws::String& GetModelId() const { return m_modelId; }
41 inline bool ModelIdHasBeenSet() const { return m_modelIdHasBeenSet; }
42 template <typename ModelIdT = Aws::String>
43 void SetModelId(ModelIdT&& value) {
44 m_modelIdHasBeenSet = true;
45 m_modelId = std::forward<ModelIdT>(value);
46 }
47 template <typename ModelIdT = Aws::String>
48 ModelError& WithModelId(ModelIdT&& value) {
49 SetModelId(std::forward<ModelIdT>(value));
50 return *this;
51 }
53
55
59 inline ModelErrorCode GetErrorCode() const { return m_errorCode; }
60 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
61 inline void SetErrorCode(ModelErrorCode value) {
62 m_errorCodeHasBeenSet = true;
63 m_errorCode = value;
64 }
66 SetErrorCode(value);
67 return *this;
68 }
70
72
75 inline const Aws::String& GetMessage() const { return m_message; }
76 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
77 template <typename MessageT = Aws::String>
78 void SetMessage(MessageT&& value) {
79 m_messageHasBeenSet = true;
80 m_message = std::forward<MessageT>(value);
81 }
82 template <typename MessageT = Aws::String>
83 ModelError& WithMessage(MessageT&& value) {
84 SetMessage(std::forward<MessageT>(value));
85 return *this;
86 }
88 private:
89 Aws::String m_modelId;
90
92
93 Aws::String m_message;
94 bool m_modelIdHasBeenSet = false;
95 bool m_errorCodeHasBeenSet = false;
96 bool m_messageHasBeenSet = false;
97};
98
99} // namespace Model
100} // namespace WorkSpaces
101} // namespace Aws
ModelErrorCode GetErrorCode() const
Definition ModelError.h:59
void SetErrorCode(ModelErrorCode value)
Definition ModelError.h:61
const Aws::String & GetMessage() const
Definition ModelError.h:75
ModelError & WithErrorCode(ModelErrorCode value)
Definition ModelError.h:65
AWS_WORKSPACES_API ModelError & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetModelId(ModelIdT &&value)
Definition ModelError.h:43
AWS_WORKSPACES_API ModelError(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_WORKSPACES_API ModelError()=default
AWS_WORKSPACES_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::String & GetModelId() const
Definition ModelError.h:40
ModelError & WithMessage(MessageT &&value)
Definition ModelError.h:83
void SetMessage(MessageT &&value)
Definition ModelError.h:78
ModelError & WithModelId(ModelIdT &&value)
Definition ModelError.h:48
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String