AWS SDK for C++  0.12.9
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
16 #include <aws/rds/RDS_EXPORTS.h>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace RDS
33 {
34 namespace Model
35 {
36 
42  {
43  public:
44  Event();
45  Event(const Aws::Utils::Xml::XmlNode& xmlNode);
46  Event& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47 
48  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
49  void OutputToStream(Aws::OStream& oStream, const char* location) const;
50 
54  inline const Aws::String& GetSourceIdentifier() const{ return m_sourceIdentifier; }
55 
59  inline void SetSourceIdentifier(const Aws::String& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; }
60 
64  inline void SetSourceIdentifier(Aws::String&& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; }
65 
69  inline void SetSourceIdentifier(const char* value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier.assign(value); }
70 
74  inline Event& WithSourceIdentifier(const Aws::String& value) { SetSourceIdentifier(value); return *this;}
75 
79  inline Event& WithSourceIdentifier(Aws::String&& value) { SetSourceIdentifier(value); return *this;}
80 
84  inline Event& WithSourceIdentifier(const char* value) { SetSourceIdentifier(value); return *this;}
85 
89  inline const SourceType& GetSourceType() const{ return m_sourceType; }
90 
94  inline void SetSourceType(const SourceType& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; }
95 
99  inline void SetSourceType(SourceType&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; }
100 
104  inline Event& WithSourceType(const SourceType& value) { SetSourceType(value); return *this;}
105 
109  inline Event& WithSourceType(SourceType&& value) { SetSourceType(value); return *this;}
110 
114  inline const Aws::String& GetMessage() const{ return m_message; }
115 
119  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
120 
124  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
125 
129  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
130 
134  inline Event& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
135 
139  inline Event& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
140 
144  inline Event& WithMessage(const char* value) { SetMessage(value); return *this;}
145 
149  inline const Aws::Vector<Aws::String>& GetEventCategories() const{ return m_eventCategories; }
150 
154  inline void SetEventCategories(const Aws::Vector<Aws::String>& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = value; }
155 
159  inline void SetEventCategories(Aws::Vector<Aws::String>&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = value; }
160 
164  inline Event& WithEventCategories(const Aws::Vector<Aws::String>& value) { SetEventCategories(value); return *this;}
165 
169  inline Event& WithEventCategories(Aws::Vector<Aws::String>&& value) { SetEventCategories(value); return *this;}
170 
174  inline Event& AddEventCategories(const Aws::String& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; }
175 
179  inline Event& AddEventCategories(Aws::String&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; }
180 
184  inline Event& AddEventCategories(const char* value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; }
185 
189  inline const Aws::Utils::DateTime& GetDate() const{ return m_date; }
190 
194  inline void SetDate(const Aws::Utils::DateTime& value) { m_dateHasBeenSet = true; m_date = value; }
195 
199  inline void SetDate(Aws::Utils::DateTime&& value) { m_dateHasBeenSet = true; m_date = value; }
200 
204  inline Event& WithDate(const Aws::Utils::DateTime& value) { SetDate(value); return *this;}
205 
209  inline Event& WithDate(Aws::Utils::DateTime&& value) { SetDate(value); return *this;}
210 
211  private:
212  Aws::String m_sourceIdentifier;
213  bool m_sourceIdentifierHasBeenSet;
214  SourceType m_sourceType;
215  bool m_sourceTypeHasBeenSet;
216  Aws::String m_message;
217  bool m_messageHasBeenSet;
218  Aws::Vector<Aws::String> m_eventCategories;
219  bool m_eventCategoriesHasBeenSet;
220  Aws::Utils::DateTime m_date;
221  bool m_dateHasBeenSet;
222  };
223 
224 } // namespace Model
225 } // namespace RDS
226 } // namespace Aws
Event & WithDate(const Aws::Utils::DateTime &value)
Definition: Event.h:204
const Aws::Utils::DateTime & GetDate() const
Definition: Event.h:189
Event & WithSourceIdentifier(const char *value)
Definition: Event.h:84
Event & WithSourceIdentifier(const Aws::String &value)
Definition: Event.h:74
void SetSourceType(SourceType &&value)
Definition: Event.h:99
Event & WithSourceType(SourceType &&value)
Definition: Event.h:109
#define AWS_RDS_API
Definition: RDS_EXPORTS.h:34
Event & AddEventCategories(const char *value)
Definition: Event.h:184
void SetDate(const Aws::Utils::DateTime &value)
Definition: Event.h:194
void SetEventCategories(Aws::Vector< Aws::String > &&value)
Definition: Event.h:159
void SetDate(Aws::Utils::DateTime &&value)
Definition: Event.h:199
void SetSourceIdentifier(const char *value)
Definition: Event.h:69
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
Event & WithEventCategories(const Aws::Vector< Aws::String > &value)
Definition: Event.h:164
void SetMessage(const Aws::String &value)
Definition: Event.h:119
void SetMessage(Aws::String &&value)
Definition: Event.h:124
const Aws::String & GetMessage() const
Definition: Event.h:114
void SetSourceType(const SourceType &value)
Definition: Event.h:94
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
Event & WithEventCategories(Aws::Vector< Aws::String > &&value)
Definition: Event.h:169
Event & WithSourceType(const SourceType &value)
Definition: Event.h:104
void SetSourceIdentifier(const Aws::String &value)
Definition: Event.h:59
Event & WithMessage(const Aws::String &value)
Definition: Event.h:134
const Aws::Vector< Aws::String > & GetEventCategories() const
Definition: Event.h:149
Event & AddEventCategories(Aws::String &&value)
Definition: Event.h:179
Event & WithMessage(const char *value)
Definition: Event.h:144
const SourceType & GetSourceType() const
Definition: Event.h:89
Event & WithDate(Aws::Utils::DateTime &&value)
Definition: Event.h:209
Event & WithMessage(Aws::String &&value)
Definition: Event.h:139
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetEventCategories(const Aws::Vector< Aws::String > &value)
Definition: Event.h:154
Event & WithSourceIdentifier(Aws::String &&value)
Definition: Event.h:79
const Aws::String & GetSourceIdentifier() const
Definition: Event.h:54
void SetMessage(const char *value)
Definition: Event.h:129
void SetSourceIdentifier(Aws::String &&value)
Definition: Event.h:64
JSON (JavaScript Object Notation).
Event & AddEventCategories(const Aws::String &value)
Definition: Event.h:174