AWS SDK for C++

AWS SDK for C++ Version 1.11.943

Loading...
Searching...
No Matches
ErrorDetails.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/WorkspaceImageErrorDetailCode.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
31 public:
32 AWS_WORKSPACES_API ErrorDetails() = default;
33 AWS_WORKSPACES_API ErrorDetails(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
34 AWS_WORKSPACES_API ErrorDetails& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_WORKSPACES_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
36
38
41 inline WorkspaceImageErrorDetailCode GetErrorCode() const { return m_errorCode; }
42 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
44 m_errorCodeHasBeenSet = true;
45 m_errorCode = value;
46 }
48 SetErrorCode(value);
49 return *this;
50 }
52
54
57 inline const Aws::String& GetErrorMessage() const { return m_errorMessage; }
58 inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
59 template <typename ErrorMessageT = Aws::String>
60 void SetErrorMessage(ErrorMessageT&& value) {
61 m_errorMessageHasBeenSet = true;
62 m_errorMessage = std::forward<ErrorMessageT>(value);
63 }
64 template <typename ErrorMessageT = Aws::String>
65 ErrorDetails& WithErrorMessage(ErrorMessageT&& value) {
66 SetErrorMessage(std::forward<ErrorMessageT>(value));
67 return *this;
68 }
70 private:
72
73 Aws::String m_errorMessage;
74 bool m_errorCodeHasBeenSet = false;
75 bool m_errorMessageHasBeenSet = false;
76};
77
78} // namespace Model
79} // namespace WorkSpaces
80} // namespace Aws
AWS_WORKSPACES_API ErrorDetails()=default
AWS_WORKSPACES_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
AWS_WORKSPACES_API ErrorDetails(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
WorkspaceImageErrorDetailCode GetErrorCode() const
void SetErrorMessage(ErrorMessageT &&value)
ErrorDetails & WithErrorMessage(ErrorMessageT &&value)
ErrorDetails & WithErrorCode(WorkspaceImageErrorDetailCode value)
const Aws::String & GetErrorMessage() const
void SetErrorCode(WorkspaceImageErrorDetailCode value)
AWS_WORKSPACES_API ErrorDetails & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String