AWS SDK for C++  0.14.3
AWS SDK for C++
Event.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
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace Redshift
33 {
34 namespace Model
35 {
36 
41  {
42  public:
43  Event();
44  Event(const Aws::Utils::Xml::XmlNode& xmlNode);
45  Event& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
53  inline const Aws::String& GetSourceIdentifier() const{ return m_sourceIdentifier; }
54 
58  inline void SetSourceIdentifier(const Aws::String& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; }
59 
63  inline void SetSourceIdentifier(Aws::String&& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; }
64 
68  inline void SetSourceIdentifier(const char* value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier.assign(value); }
69 
73  inline Event& WithSourceIdentifier(const Aws::String& value) { SetSourceIdentifier(value); return *this;}
74 
78  inline Event& WithSourceIdentifier(Aws::String&& value) { SetSourceIdentifier(value); return *this;}
79 
83  inline Event& WithSourceIdentifier(const char* value) { SetSourceIdentifier(value); return *this;}
84 
88  inline const SourceType& GetSourceType() const{ return m_sourceType; }
89 
93  inline void SetSourceType(const SourceType& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; }
94 
98  inline void SetSourceType(SourceType&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; }
99 
103  inline Event& WithSourceType(const SourceType& value) { SetSourceType(value); return *this;}
104 
108  inline Event& WithSourceType(SourceType&& value) { SetSourceType(value); return *this;}
109 
113  inline const Aws::String& GetMessage() const{ return m_message; }
114 
118  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
119 
123  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
124 
128  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
129 
133  inline Event& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
134 
138  inline Event& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
139 
143  inline Event& WithMessage(const char* value) { SetMessage(value); return *this;}
144 
149  inline const Aws::Vector<Aws::String>& GetEventCategories() const{ return m_eventCategories; }
150 
155  inline void SetEventCategories(const Aws::Vector<Aws::String>& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = value; }
156 
161  inline void SetEventCategories(Aws::Vector<Aws::String>&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = value; }
162 
167  inline Event& WithEventCategories(const Aws::Vector<Aws::String>& value) { SetEventCategories(value); return *this;}
168 
173  inline Event& WithEventCategories(Aws::Vector<Aws::String>&& value) { SetEventCategories(value); return *this;}
174 
179  inline Event& AddEventCategories(const Aws::String& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; }
180 
185  inline Event& AddEventCategories(Aws::String&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; }
186 
191  inline Event& AddEventCategories(const char* value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; }
192 
196  inline const Aws::String& GetSeverity() const{ return m_severity; }
197 
201  inline void SetSeverity(const Aws::String& value) { m_severityHasBeenSet = true; m_severity = value; }
202 
206  inline void SetSeverity(Aws::String&& value) { m_severityHasBeenSet = true; m_severity = value; }
207 
211  inline void SetSeverity(const char* value) { m_severityHasBeenSet = true; m_severity.assign(value); }
212 
216  inline Event& WithSeverity(const Aws::String& value) { SetSeverity(value); return *this;}
217 
221  inline Event& WithSeverity(Aws::String&& value) { SetSeverity(value); return *this;}
222 
226  inline Event& WithSeverity(const char* value) { SetSeverity(value); return *this;}
227 
231  inline const Aws::Utils::DateTime& GetDate() const{ return m_date; }
232 
236  inline void SetDate(const Aws::Utils::DateTime& value) { m_dateHasBeenSet = true; m_date = value; }
237 
241  inline void SetDate(Aws::Utils::DateTime&& value) { m_dateHasBeenSet = true; m_date = value; }
242 
246  inline Event& WithDate(const Aws::Utils::DateTime& value) { SetDate(value); return *this;}
247 
251  inline Event& WithDate(Aws::Utils::DateTime&& value) { SetDate(value); return *this;}
252 
256  inline const Aws::String& GetEventId() const{ return m_eventId; }
257 
261  inline void SetEventId(const Aws::String& value) { m_eventIdHasBeenSet = true; m_eventId = value; }
262 
266  inline void SetEventId(Aws::String&& value) { m_eventIdHasBeenSet = true; m_eventId = value; }
267 
271  inline void SetEventId(const char* value) { m_eventIdHasBeenSet = true; m_eventId.assign(value); }
272 
276  inline Event& WithEventId(const Aws::String& value) { SetEventId(value); return *this;}
277 
281  inline Event& WithEventId(Aws::String&& value) { SetEventId(value); return *this;}
282 
286  inline Event& WithEventId(const char* value) { SetEventId(value); return *this;}
287 
288  private:
289  Aws::String m_sourceIdentifier;
290  bool m_sourceIdentifierHasBeenSet;
291  SourceType m_sourceType;
292  bool m_sourceTypeHasBeenSet;
293  Aws::String m_message;
294  bool m_messageHasBeenSet;
295  Aws::Vector<Aws::String> m_eventCategories;
296  bool m_eventCategoriesHasBeenSet;
297  Aws::String m_severity;
298  bool m_severityHasBeenSet;
299  Aws::Utils::DateTime m_date;
300  bool m_dateHasBeenSet;
301  Aws::String m_eventId;
302  bool m_eventIdHasBeenSet;
303  };
304 
305 } // namespace Model
306 } // namespace Redshift
307 } // namespace Aws
Event & WithSourceType(SourceType &&value)
Definition: Event.h:108
void SetSourceIdentifier(const char *value)
Definition: Event.h:68
void SetSourceType(SourceType &&value)
Definition: Event.h:98
Event & WithSeverity(const Aws::String &value)
Definition: Event.h:216
void SetSeverity(const char *value)
Definition: Event.h:211
Event & WithSourceIdentifier(const char *value)
Definition: Event.h:83
Event & AddEventCategories(const char *value)
Definition: Event.h:191
Event & AddEventCategories(const Aws::String &value)
Definition: Event.h:179
void SetEventId(Aws::String &&value)
Definition: Event.h:266
void SetSeverity(const Aws::String &value)
Definition: Event.h:201
void SetMessage(Aws::String &&value)
Definition: Event.h:123
const Aws::Vector< Aws::String > & GetEventCategories() const
Definition: Event.h:149
const Aws::String & GetEventId() const
Definition: Event.h:256
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetEventId(const Aws::String &value)
Definition: Event.h:261
void SetMessage(const Aws::String &value)
Definition: Event.h:118
Event & WithEventId(const Aws::String &value)
Definition: Event.h:276
const Aws::String & GetMessage() const
Definition: Event.h:113
void SetMessage(const char *value)
Definition: Event.h:128
Event & WithMessage(const char *value)
Definition: Event.h:143
#define AWS_REDSHIFT_API
void SetSourceType(const SourceType &value)
Definition: Event.h:93
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
Event & WithSourceIdentifier(Aws::String &&value)
Definition: Event.h:78
Event & WithSeverity(const char *value)
Definition: Event.h:226
Event & WithMessage(Aws::String &&value)
Definition: Event.h:138
const Aws::String & GetSeverity() const
Definition: Event.h:196
Event & WithDate(Aws::Utils::DateTime &&value)
Definition: Event.h:251
void SetEventCategories(const Aws::Vector< Aws::String > &value)
Definition: Event.h:155
Event & WithEventId(const char *value)
Definition: Event.h:286
Event & WithEventId(Aws::String &&value)
Definition: Event.h:281
void SetSourceIdentifier(Aws::String &&value)
Definition: Event.h:63
void SetEventCategories(Aws::Vector< Aws::String > &&value)
Definition: Event.h:161
Event & AddEventCategories(Aws::String &&value)
Definition: Event.h:185
Event & WithDate(const Aws::Utils::DateTime &value)
Definition: Event.h:246
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Event & WithMessage(const Aws::String &value)
Definition: Event.h:133
void SetDate(Aws::Utils::DateTime &&value)
Definition: Event.h:241
const Aws::String & GetSourceIdentifier() const
Definition: Event.h:53
Event & WithSourceIdentifier(const Aws::String &value)
Definition: Event.h:73
Event & WithSourceType(const SourceType &value)
Definition: Event.h:103
Event & WithEventCategories(const Aws::Vector< Aws::String > &value)
Definition: Event.h:167
void SetSourceIdentifier(const Aws::String &value)
Definition: Event.h:58
void SetSeverity(Aws::String &&value)
Definition: Event.h:206
void SetDate(const Aws::Utils::DateTime &value)
Definition: Event.h:236
const SourceType & GetSourceType() const
Definition: Event.h:88
Event & WithEventCategories(Aws::Vector< Aws::String > &&value)
Definition: Event.h:173
void SetEventId(const char *value)
Definition: Event.h:271
const Aws::Utils::DateTime & GetDate() const
Definition: Event.h:231
JSON (JavaScript Object Notation).
Event & WithSeverity(Aws::String &&value)
Definition: Event.h:221