AWS SDK for C++  0.14.3
AWS SDK for C++
Error.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
16 #include <aws/s3/S3_EXPORTS.h>
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Xml
24 {
25  class XmlNode;
26 } // namespace Xml
27 } // namespace Utils
28 namespace S3
29 {
30 namespace Model
31 {
32 
34  {
35  public:
36  Error();
37  Error(const Aws::Utils::Xml::XmlNode& xmlNode);
38  Error& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
41 
42 
43  inline const Aws::String& GetKey() const{ return m_key; }
44 
45 
46  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
47 
48 
49  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
50 
51 
52  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
53 
54 
55  inline Error& WithKey(const Aws::String& value) { SetKey(value); return *this;}
56 
57 
58  inline Error& WithKey(Aws::String&& value) { SetKey(value); return *this;}
59 
60 
61  inline Error& WithKey(const char* value) { SetKey(value); return *this;}
62 
63 
64  inline const Aws::String& GetVersionId() const{ return m_versionId; }
65 
66 
67  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
68 
69 
70  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
71 
72 
73  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
74 
75 
76  inline Error& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
77 
78 
79  inline Error& WithVersionId(Aws::String&& value) { SetVersionId(value); return *this;}
80 
81 
82  inline Error& WithVersionId(const char* value) { SetVersionId(value); return *this;}
83 
84 
85  inline const Aws::String& GetCode() const{ return m_code; }
86 
87 
88  inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; }
89 
90 
91  inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = value; }
92 
93 
94  inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); }
95 
96 
97  inline Error& WithCode(const Aws::String& value) { SetCode(value); return *this;}
98 
99 
100  inline Error& WithCode(Aws::String&& value) { SetCode(value); return *this;}
101 
102 
103  inline Error& WithCode(const char* value) { SetCode(value); return *this;}
104 
105 
106  inline const Aws::String& GetMessage() const{ return m_message; }
107 
108 
109  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
110 
111 
112  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
113 
114 
115  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
116 
117 
118  inline Error& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
119 
120 
121  inline Error& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
122 
123 
124  inline Error& WithMessage(const char* value) { SetMessage(value); return *this;}
125 
126  private:
127  Aws::String m_key;
128  bool m_keyHasBeenSet;
129  Aws::String m_versionId;
130  bool m_versionIdHasBeenSet;
131  Aws::String m_code;
132  bool m_codeHasBeenSet;
133  Aws::String m_message;
134  bool m_messageHasBeenSet;
135  };
136 
137 } // namespace Model
138 } // namespace S3
139 } // namespace Aws
void SetKey(const Aws::String &value)
Definition: Error.h:46
Error & WithVersionId(Aws::String &&value)
Definition: Error.h:79
void SetCode(const char *value)
Definition: Error.h:94
void SetMessage(const char *value)
Definition: Error.h:115
Error & WithVersionId(const char *value)
Definition: Error.h:82
Error & WithMessage(const char *value)
Definition: Error.h:124
Error & WithKey(Aws::String &&value)
Definition: Error.h:58
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
void SetKey(Aws::String &&value)
Definition: Error.h:49
Error & WithMessage(Aws::String &&value)
Definition: Error.h:121
void SetVersionId(const Aws::String &value)
Definition: Error.h:67
void SetMessage(const Aws::String &value)
Definition: Error.h:109
Error & WithMessage(const Aws::String &value)
Definition: Error.h:118
const Aws::String & GetCode() const
Definition: Error.h:85
Error & WithCode(const Aws::String &value)
Definition: Error.h:97
void SetMessage(Aws::String &&value)
Definition: Error.h:112
const Aws::String & GetMessage() const
Definition: Error.h:106
const Aws::String & GetKey() const
Definition: Error.h:43
const Aws::String & GetVersionId() const
Definition: Error.h:64
Error & WithKey(const Aws::String &value)
Definition: Error.h:55
Error & WithVersionId(const Aws::String &value)
Definition: Error.h:76
Error & WithKey(const char *value)
Definition: Error.h:61
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetCode(Aws::String &&value)
Definition: Error.h:91
void SetVersionId(const char *value)
Definition: Error.h:73
void SetVersionId(Aws::String &&value)
Definition: Error.h:70
void SetCode(const Aws::String &value)
Definition: Error.h:88
void SetKey(const char *value)
Definition: Error.h:52
JSON (JavaScript Object Notation).
Error & WithCode(Aws::String &&value)
Definition: Error.h:100
Error & WithCode(const char *value)
Definition: Error.h:103