AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
InternalException.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/datasync/DataSync_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Cbor {
16class CborValue;
17} // namespace Cbor
18} // namespace Utils
19namespace DataSync {
20namespace Model {
21
29 public:
30 AWS_DATASYNC_API InternalException() = default;
31 AWS_DATASYNC_API InternalException(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
32 AWS_DATASYNC_API InternalException& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_DATASYNC_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
34
36
37 inline const Aws::String& GetMessage() const { return m_message; }
38 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
39 template <typename MessageT = Aws::String>
40 void SetMessage(MessageT&& value) {
41 m_messageHasBeenSet = true;
42 m_message = std::forward<MessageT>(value);
43 }
44 template <typename MessageT = Aws::String>
45 InternalException& WithMessage(MessageT&& value) {
46 SetMessage(std::forward<MessageT>(value));
47 return *this;
48 }
50
52
53 inline const Aws::String& GetErrorCode() const { return m_errorCode; }
54 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
55 template <typename ErrorCodeT = Aws::String>
56 void SetErrorCode(ErrorCodeT&& value) {
57 m_errorCodeHasBeenSet = true;
58 m_errorCode = std::forward<ErrorCodeT>(value);
59 }
60 template <typename ErrorCodeT = Aws::String>
61 InternalException& WithErrorCode(ErrorCodeT&& value) {
62 SetErrorCode(std::forward<ErrorCodeT>(value));
63 return *this;
64 }
66 private:
67 Aws::String m_message;
68
69 Aws::String m_errorCode;
70 bool m_messageHasBeenSet = false;
71 bool m_errorCodeHasBeenSet = false;
72};
73
74} // namespace Model
75} // namespace DataSync
76} // namespace Aws
AWS_DATASYNC_API InternalException()=default
InternalException & WithErrorCode(ErrorCodeT &&value)
AWS_DATASYNC_API InternalException(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_DATASYNC_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
InternalException & WithMessage(MessageT &&value)
const Aws::String & GetErrorCode() const
AWS_DATASYNC_API InternalException & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetMessage() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String