AWS SDK for C++  0.14.3
AWS SDK for C++
ServiceError.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
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Json
24 {
25  class JsonValue;
26 } // namespace Json
27 } // namespace Utils
28 namespace OpsWorks
29 {
30 namespace Model
31 {
32 
37  {
38  public:
39  ServiceError();
40  ServiceError(const Aws::Utils::Json::JsonValue& jsonValue);
41  ServiceError& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
42  Aws::Utils::Json::JsonValue Jsonize() const;
43 
47  inline const Aws::String& GetServiceErrorId() const{ return m_serviceErrorId; }
48 
52  inline void SetServiceErrorId(const Aws::String& value) { m_serviceErrorIdHasBeenSet = true; m_serviceErrorId = value; }
53 
57  inline void SetServiceErrorId(Aws::String&& value) { m_serviceErrorIdHasBeenSet = true; m_serviceErrorId = value; }
58 
62  inline void SetServiceErrorId(const char* value) { m_serviceErrorIdHasBeenSet = true; m_serviceErrorId.assign(value); }
63 
67  inline ServiceError& WithServiceErrorId(const Aws::String& value) { SetServiceErrorId(value); return *this;}
68 
72  inline ServiceError& WithServiceErrorId(Aws::String&& value) { SetServiceErrorId(value); return *this;}
73 
77  inline ServiceError& WithServiceErrorId(const char* value) { SetServiceErrorId(value); return *this;}
78 
82  inline const Aws::String& GetStackId() const{ return m_stackId; }
83 
87  inline void SetStackId(const Aws::String& value) { m_stackIdHasBeenSet = true; m_stackId = value; }
88 
92  inline void SetStackId(Aws::String&& value) { m_stackIdHasBeenSet = true; m_stackId = value; }
93 
97  inline void SetStackId(const char* value) { m_stackIdHasBeenSet = true; m_stackId.assign(value); }
98 
102  inline ServiceError& WithStackId(const Aws::String& value) { SetStackId(value); return *this;}
103 
107  inline ServiceError& WithStackId(Aws::String&& value) { SetStackId(value); return *this;}
108 
112  inline ServiceError& WithStackId(const char* value) { SetStackId(value); return *this;}
113 
117  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
118 
122  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
123 
127  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
128 
132  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
133 
137  inline ServiceError& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
138 
142  inline ServiceError& WithInstanceId(Aws::String&& value) { SetInstanceId(value); return *this;}
143 
147  inline ServiceError& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
148 
152  inline const Aws::String& GetType() const{ return m_type; }
153 
157  inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; }
158 
162  inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = value; }
163 
167  inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); }
168 
172  inline ServiceError& WithType(const Aws::String& value) { SetType(value); return *this;}
173 
177  inline ServiceError& WithType(Aws::String&& value) { SetType(value); return *this;}
178 
182  inline ServiceError& WithType(const char* value) { SetType(value); return *this;}
183 
187  inline const Aws::String& GetMessage() const{ return m_message; }
188 
192  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
193 
197  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
198 
202  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
203 
207  inline ServiceError& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
208 
212  inline ServiceError& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
213 
217  inline ServiceError& WithMessage(const char* value) { SetMessage(value); return *this;}
218 
222  inline const Aws::String& GetCreatedAt() const{ return m_createdAt; }
223 
227  inline void SetCreatedAt(const Aws::String& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
228 
232  inline void SetCreatedAt(Aws::String&& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
233 
237  inline void SetCreatedAt(const char* value) { m_createdAtHasBeenSet = true; m_createdAt.assign(value); }
238 
242  inline ServiceError& WithCreatedAt(const Aws::String& value) { SetCreatedAt(value); return *this;}
243 
247  inline ServiceError& WithCreatedAt(Aws::String&& value) { SetCreatedAt(value); return *this;}
248 
252  inline ServiceError& WithCreatedAt(const char* value) { SetCreatedAt(value); return *this;}
253 
254  private:
255  Aws::String m_serviceErrorId;
256  bool m_serviceErrorIdHasBeenSet;
257  Aws::String m_stackId;
258  bool m_stackIdHasBeenSet;
259  Aws::String m_instanceId;
260  bool m_instanceIdHasBeenSet;
261  Aws::String m_type;
262  bool m_typeHasBeenSet;
263  Aws::String m_message;
264  bool m_messageHasBeenSet;
265  Aws::String m_createdAt;
266  bool m_createdAtHasBeenSet;
267  };
268 
269 } // namespace Model
270 } // namespace OpsWorks
271 } // namespace Aws
void SetType(const char *value)
Definition: ServiceError.h:167
void SetCreatedAt(Aws::String &&value)
Definition: ServiceError.h:232
const Aws::String & GetCreatedAt() const
Definition: ServiceError.h:222
void SetStackId(const char *value)
Definition: ServiceError.h:97
ServiceError & WithServiceErrorId(const Aws::String &value)
Definition: ServiceError.h:67
void SetInstanceId(Aws::String &&value)
Definition: ServiceError.h:127
ServiceError & WithCreatedAt(const char *value)
Definition: ServiceError.h:252
void SetMessage(const char *value)
Definition: ServiceError.h:202
ServiceError & WithType(const char *value)
Definition: ServiceError.h:182
ServiceError & WithInstanceId(const char *value)
Definition: ServiceError.h:147
void SetType(const Aws::String &value)
Definition: ServiceError.h:157
ServiceError & WithCreatedAt(const Aws::String &value)
Definition: ServiceError.h:242
ServiceError & WithCreatedAt(Aws::String &&value)
Definition: ServiceError.h:247
ServiceError & WithInstanceId(const Aws::String &value)
Definition: ServiceError.h:137
void SetType(Aws::String &&value)
Definition: ServiceError.h:162
ServiceError & WithType(Aws::String &&value)
Definition: ServiceError.h:177
ServiceError & WithStackId(const char *value)
Definition: ServiceError.h:112
void SetInstanceId(const Aws::String &value)
Definition: ServiceError.h:122
ServiceError & WithMessage(const char *value)
Definition: ServiceError.h:217
void SetServiceErrorId(Aws::String &&value)
Definition: ServiceError.h:57
void SetStackId(const Aws::String &value)
Definition: ServiceError.h:87
ServiceError & WithServiceErrorId(Aws::String &&value)
Definition: ServiceError.h:72
void SetMessage(Aws::String &&value)
Definition: ServiceError.h:197
const Aws::String & GetServiceErrorId() const
Definition: ServiceError.h:47
ServiceError & WithServiceErrorId(const char *value)
Definition: ServiceError.h:77
void SetStackId(Aws::String &&value)
Definition: ServiceError.h:92
void SetCreatedAt(const Aws::String &value)
Definition: ServiceError.h:227
ServiceError & WithMessage(Aws::String &&value)
Definition: ServiceError.h:212
const Aws::String & GetInstanceId() const
Definition: ServiceError.h:117
const Aws::String & GetMessage() const
Definition: ServiceError.h:187
ServiceError & WithMessage(const Aws::String &value)
Definition: ServiceError.h:207
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ServiceError & WithStackId(const Aws::String &value)
Definition: ServiceError.h:102
#define AWS_OPSWORKS_API
void SetServiceErrorId(const char *value)
Definition: ServiceError.h:62
ServiceError & WithType(const Aws::String &value)
Definition: ServiceError.h:172
void SetCreatedAt(const char *value)
Definition: ServiceError.h:237
void SetInstanceId(const char *value)
Definition: ServiceError.h:132
ServiceError & WithStackId(Aws::String &&value)
Definition: ServiceError.h:107
void SetServiceErrorId(const Aws::String &value)
Definition: ServiceError.h:52
ServiceError & WithInstanceId(Aws::String &&value)
Definition: ServiceError.h:142
void SetMessage(const Aws::String &value)
Definition: ServiceError.h:192
const Aws::String & GetStackId() const
Definition: ServiceError.h:82
JSON (JavaScript Object Notation).
const Aws::String & GetType() const
Definition: ServiceError.h:152