AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
StorageGatewayError.h
1
6#pragma once
7#include <aws/storagegateway/StorageGateway_EXPORTS.h>
8#include <aws/storagegateway/model/ErrorCode.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace StorageGateway
24{
25namespace Model
26{
27
36 {
37 public:
38 AWS_STORAGEGATEWAY_API StorageGatewayError() = default;
39 AWS_STORAGEGATEWAY_API StorageGatewayError(Aws::Utils::Json::JsonView jsonValue);
40 AWS_STORAGEGATEWAY_API StorageGatewayError& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_STORAGEGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline ErrorCode GetErrorCode() const { return m_errorCode; }
49 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
50 inline void SetErrorCode(ErrorCode value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
51 inline StorageGatewayError& WithErrorCode(ErrorCode value) { SetErrorCode(value); return *this;}
53
55
58 inline const Aws::Map<Aws::String, Aws::String>& GetErrorDetails() const { return m_errorDetails; }
59 inline bool ErrorDetailsHasBeenSet() const { return m_errorDetailsHasBeenSet; }
60 template<typename ErrorDetailsT = Aws::Map<Aws::String, Aws::String>>
61 void SetErrorDetails(ErrorDetailsT&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails = std::forward<ErrorDetailsT>(value); }
62 template<typename ErrorDetailsT = Aws::Map<Aws::String, Aws::String>>
63 StorageGatewayError& WithErrorDetails(ErrorDetailsT&& value) { SetErrorDetails(std::forward<ErrorDetailsT>(value)); return *this;}
64 template<typename ErrorDetailsKeyT = Aws::String, typename ErrorDetailsValueT = Aws::String>
65 StorageGatewayError& AddErrorDetails(ErrorDetailsKeyT&& key, ErrorDetailsValueT&& value) {
66 m_errorDetailsHasBeenSet = true; m_errorDetails.emplace(std::forward<ErrorDetailsKeyT>(key), std::forward<ErrorDetailsValueT>(value)); return *this;
67 }
69 private:
70
71 ErrorCode m_errorCode{ErrorCode::NOT_SET};
72 bool m_errorCodeHasBeenSet = false;
73
75 bool m_errorDetailsHasBeenSet = false;
76 };
77
78} // namespace Model
79} // namespace StorageGateway
80} // namespace Aws
AWS_STORAGEGATEWAY_API StorageGatewayError(Aws::Utils::Json::JsonView jsonValue)
AWS_STORAGEGATEWAY_API StorageGatewayError()=default
const Aws::Map< Aws::String, Aws::String > & GetErrorDetails() const
AWS_STORAGEGATEWAY_API StorageGatewayError & operator=(Aws::Utils::Json::JsonView jsonValue)
StorageGatewayError & AddErrorDetails(ErrorDetailsKeyT &&key, ErrorDetailsValueT &&value)
StorageGatewayError & WithErrorCode(ErrorCode value)
AWS_STORAGEGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const
StorageGatewayError & WithErrorDetails(ErrorDetailsT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue