AWS SDK for C++  0.14.3
AWS SDK for C++
StorageGatewayError.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace StorageGateway
31 {
32 namespace Model
33 {
34 
41  {
42  public:
45  StorageGatewayError& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
46  Aws::Utils::Json::JsonValue Jsonize() const;
47 
51  inline const ErrorCode& GetErrorCode() const{ return m_errorCode; }
52 
56  inline void SetErrorCode(const ErrorCode& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
57 
61  inline void SetErrorCode(ErrorCode&& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
62 
66  inline StorageGatewayError& WithErrorCode(const ErrorCode& value) { SetErrorCode(value); return *this;}
67 
71  inline StorageGatewayError& WithErrorCode(ErrorCode&& value) { SetErrorCode(value); return *this;}
72 
76  inline const Aws::Map<Aws::String, Aws::String>& GetErrorDetails() const{ return m_errorDetails; }
77 
81  inline void SetErrorDetails(const Aws::Map<Aws::String, Aws::String>& value) { m_errorDetailsHasBeenSet = true; m_errorDetails = value; }
82 
86  inline void SetErrorDetails(Aws::Map<Aws::String, Aws::String>&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails = value; }
87 
91  inline StorageGatewayError& WithErrorDetails(const Aws::Map<Aws::String, Aws::String>& value) { SetErrorDetails(value); return *this;}
92 
96  inline StorageGatewayError& WithErrorDetails(Aws::Map<Aws::String, Aws::String>&& value) { SetErrorDetails(value); return *this;}
97 
101  inline StorageGatewayError& AddErrorDetails(const Aws::String& key, const Aws::String& value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
102 
106  inline StorageGatewayError& AddErrorDetails(Aws::String&& key, const Aws::String& value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
107 
111  inline StorageGatewayError& AddErrorDetails(const Aws::String& key, Aws::String&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
112 
116  inline StorageGatewayError& AddErrorDetails(Aws::String&& key, Aws::String&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
117 
121  inline StorageGatewayError& AddErrorDetails(const char* key, Aws::String&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
122 
126  inline StorageGatewayError& AddErrorDetails(Aws::String&& key, const char* value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
127 
131  inline StorageGatewayError& AddErrorDetails(const char* key, const char* value) { m_errorDetailsHasBeenSet = true; m_errorDetails[key] = value; return *this; }
132 
133  private:
134  ErrorCode m_errorCode;
135  bool m_errorCodeHasBeenSet;
136  Aws::Map<Aws::String, Aws::String> m_errorDetails;
137  bool m_errorDetailsHasBeenSet;
138  };
139 
140 } // namespace Model
141 } // namespace StorageGateway
142 } // namespace Aws
StorageGatewayError & AddErrorDetails(const char *key, Aws::String &&value)
StorageGatewayError & AddErrorDetails(Aws::String &&key, Aws::String &&value)
const Aws::Map< Aws::String, Aws::String > & GetErrorDetails() const
void SetErrorDetails(const Aws::Map< Aws::String, Aws::String > &value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
StorageGatewayError & AddErrorDetails(const Aws::String &key, const Aws::String &value)
void SetErrorDetails(Aws::Map< Aws::String, Aws::String > &&value)
StorageGatewayError & AddErrorDetails(Aws::String &&key, const Aws::String &value)
StorageGatewayError & AddErrorDetails(const char *key, const char *value)
StorageGatewayError & WithErrorCode(ErrorCode &&value)
StorageGatewayError & WithErrorDetails(Aws::Map< Aws::String, Aws::String > &&value)
StorageGatewayError & WithErrorDetails(const Aws::Map< Aws::String, Aws::String > &value)
StorageGatewayError & WithErrorCode(const ErrorCode &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
StorageGatewayError & AddErrorDetails(const Aws::String &key, Aws::String &&value)
#define AWS_STORAGEGATEWAY_API
JSON (JavaScript Object Notation).
StorageGatewayError & AddErrorDetails(Aws::String &&key, const char *value)