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
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace ElastiCache
32 {
33 namespace Model
34 {
35 
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 
56  inline const Aws::String& GetSourceIdentifier() const{ return m_sourceIdentifier; }
57 
63  inline void SetSourceIdentifier(const Aws::String& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; }
64 
70  inline void SetSourceIdentifier(Aws::String&& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; }
71 
77  inline void SetSourceIdentifier(const char* value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier.assign(value); }
78 
84  inline Event& WithSourceIdentifier(const Aws::String& value) { SetSourceIdentifier(value); return *this;}
85 
91  inline Event& WithSourceIdentifier(Aws::String&& value) { SetSourceIdentifier(value); return *this;}
92 
98  inline Event& WithSourceIdentifier(const char* value) { SetSourceIdentifier(value); return *this;}
99 
104  inline const SourceType& GetSourceType() const{ return m_sourceType; }
105 
110  inline void SetSourceType(const SourceType& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; }
111 
116  inline void SetSourceType(SourceType&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; }
117 
122  inline Event& WithSourceType(const SourceType& value) { SetSourceType(value); return *this;}
123 
128  inline Event& WithSourceType(SourceType&& value) { SetSourceType(value); return *this;}
129 
133  inline const Aws::String& GetMessage() const{ return m_message; }
134 
138  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
139 
143  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
144 
148  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
149 
153  inline Event& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
154 
158  inline Event& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
159 
163  inline Event& WithMessage(const char* value) { SetMessage(value); return *this;}
164 
168  inline const Aws::Utils::DateTime& GetDate() const{ return m_date; }
169 
173  inline void SetDate(const Aws::Utils::DateTime& value) { m_dateHasBeenSet = true; m_date = value; }
174 
178  inline void SetDate(Aws::Utils::DateTime&& value) { m_dateHasBeenSet = true; m_date = value; }
179 
183  inline Event& WithDate(const Aws::Utils::DateTime& value) { SetDate(value); return *this;}
184 
188  inline Event& WithDate(Aws::Utils::DateTime&& value) { SetDate(value); return *this;}
189 
190  private:
191  Aws::String m_sourceIdentifier;
192  bool m_sourceIdentifierHasBeenSet;
193  SourceType m_sourceType;
194  bool m_sourceTypeHasBeenSet;
195  Aws::String m_message;
196  bool m_messageHasBeenSet;
197  Aws::Utils::DateTime m_date;
198  bool m_dateHasBeenSet;
199  };
200 
201 } // namespace Model
202 } // namespace ElastiCache
203 } // namespace Aws
void SetSourceIdentifier(Aws::String &&value)
Definition: Event.h:70
void SetDate(Aws::Utils::DateTime &&value)
Definition: Event.h:178
void SetMessage(const Aws::String &value)
Definition: Event.h:138
Event & WithDate(Aws::Utils::DateTime &&value)
Definition: Event.h:188
Event & WithMessage(Aws::String &&value)
Definition: Event.h:158
void SetMessage(const char *value)
Definition: Event.h:148
const Aws::String & GetMessage() const
Definition: Event.h:133
const SourceType & GetSourceType() const
Definition: Event.h:104
void SetSourceIdentifier(const char *value)
Definition: Event.h:77
void SetMessage(Aws::String &&value)
Definition: Event.h:143
const Aws::Utils::DateTime & GetDate() const
Definition: Event.h:168
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetDate(const Aws::Utils::DateTime &value)
Definition: Event.h:173
Event & WithSourceIdentifier(const char *value)
Definition: Event.h:98
Event & WithMessage(const char *value)
Definition: Event.h:163
Event & WithSourceType(SourceType &&value)
Definition: Event.h:128
Event & WithSourceIdentifier(Aws::String &&value)
Definition: Event.h:91
void SetSourceIdentifier(const Aws::String &value)
Definition: Event.h:63
Event & WithSourceType(const SourceType &value)
Definition: Event.h:122
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Event & WithDate(const Aws::Utils::DateTime &value)
Definition: Event.h:183
void SetSourceType(const SourceType &value)
Definition: Event.h:110
Event & WithSourceIdentifier(const Aws::String &value)
Definition: Event.h:84
#define AWS_ELASTICACHE_API
const Aws::String & GetSourceIdentifier() const
Definition: Event.h:56
Event & WithMessage(const Aws::String &value)
Definition: Event.h:153
void SetSourceType(SourceType &&value)
Definition: Event.h:116
JSON (JavaScript Object Notation).