AWS SDK for C++

AWS SDK for C++ Version 1.11.872

Loading...
Searching...
No Matches
StackError.h
1
6#pragma once
7#include <aws/appstream/AppStream_EXPORTS.h>
8#include <aws/appstream/model/StackErrorCode.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/crt/cbor/Cbor.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace AppStream {
21namespace Model {
22
29 public:
30 AWS_APPSTREAM_API StackError() = default;
31 AWS_APPSTREAM_API StackError(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
32 AWS_APPSTREAM_API StackError& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_APPSTREAM_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
34
36
39 inline StackErrorCode GetErrorCode() const { return m_errorCode; }
40 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
41 inline void SetErrorCode(StackErrorCode value) {
42 m_errorCodeHasBeenSet = true;
43 m_errorCode = value;
44 }
46 SetErrorCode(value);
47 return *this;
48 }
50
52
55 inline const Aws::String& GetErrorMessage() const { return m_errorMessage; }
56 inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
57 template <typename ErrorMessageT = Aws::String>
58 void SetErrorMessage(ErrorMessageT&& value) {
59 m_errorMessageHasBeenSet = true;
60 m_errorMessage = std::forward<ErrorMessageT>(value);
61 }
62 template <typename ErrorMessageT = Aws::String>
63 StackError& WithErrorMessage(ErrorMessageT&& value) {
64 SetErrorMessage(std::forward<ErrorMessageT>(value));
65 return *this;
66 }
68 private:
70
71 Aws::String m_errorMessage;
72 bool m_errorCodeHasBeenSet = false;
73 bool m_errorMessageHasBeenSet = false;
74};
75
76} // namespace Model
77} // namespace AppStream
78} // namespace Aws
StackErrorCode GetErrorCode() const
Definition StackError.h:39
AWS_APPSTREAM_API StackError & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetErrorCode(StackErrorCode value)
Definition StackError.h:41
AWS_APPSTREAM_API StackError()=default
StackError & WithErrorMessage(ErrorMessageT &&value)
Definition StackError.h:63
StackError & WithErrorCode(StackErrorCode value)
Definition StackError.h:45
AWS_APPSTREAM_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::String & GetErrorMessage() const
Definition StackError.h:55
void SetErrorMessage(ErrorMessageT &&value)
Definition StackError.h:58
AWS_APPSTREAM_API StackError(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String