1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/elasticache/ElastiCache_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/elasticache/model/SourceType.h> 11 #include <aws/core/utils/DateTime.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Xml 19 { 20 class XmlNode; 21 } // namespace Xml 22 } // namespace Utils 23 namespace ElastiCache 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Represents a single occurrence of something interesting within the system. 30 * Some examples of events are creating a cluster, adding or removing a cache node, 31 * or rebooting a node.</p><p><h3>See Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/Event">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_ELASTICACHE_API Event 36 { 37 public: 38 Event(); 39 Event(const Aws::Utils::Xml::XmlNode& xmlNode); 40 Event& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 41 42 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 43 void OutputToStream(Aws::OStream& oStream, const char* location) const; 44 45 46 /** 47 * <p>The identifier for the source of the event. For example, if the event 48 * occurred at the cluster level, the identifier would be the name of the 49 * cluster.</p> 50 */ GetSourceIdentifier()51 inline const Aws::String& GetSourceIdentifier() const{ return m_sourceIdentifier; } 52 53 /** 54 * <p>The identifier for the source of the event. For example, if the event 55 * occurred at the cluster level, the identifier would be the name of the 56 * cluster.</p> 57 */ SourceIdentifierHasBeenSet()58 inline bool SourceIdentifierHasBeenSet() const { return m_sourceIdentifierHasBeenSet; } 59 60 /** 61 * <p>The identifier for the source of the event. For example, if the event 62 * occurred at the cluster level, the identifier would be the name of the 63 * cluster.</p> 64 */ SetSourceIdentifier(const Aws::String & value)65 inline void SetSourceIdentifier(const Aws::String& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; } 66 67 /** 68 * <p>The identifier for the source of the event. For example, if the event 69 * occurred at the cluster level, the identifier would be the name of the 70 * cluster.</p> 71 */ SetSourceIdentifier(Aws::String && value)72 inline void SetSourceIdentifier(Aws::String&& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = std::move(value); } 73 74 /** 75 * <p>The identifier for the source of the event. For example, if the event 76 * occurred at the cluster level, the identifier would be the name of the 77 * cluster.</p> 78 */ SetSourceIdentifier(const char * value)79 inline void SetSourceIdentifier(const char* value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier.assign(value); } 80 81 /** 82 * <p>The identifier for the source of the event. For example, if the event 83 * occurred at the cluster level, the identifier would be the name of the 84 * cluster.</p> 85 */ WithSourceIdentifier(const Aws::String & value)86 inline Event& WithSourceIdentifier(const Aws::String& value) { SetSourceIdentifier(value); return *this;} 87 88 /** 89 * <p>The identifier for the source of the event. For example, if the event 90 * occurred at the cluster level, the identifier would be the name of the 91 * cluster.</p> 92 */ WithSourceIdentifier(Aws::String && value)93 inline Event& WithSourceIdentifier(Aws::String&& value) { SetSourceIdentifier(std::move(value)); return *this;} 94 95 /** 96 * <p>The identifier for the source of the event. For example, if the event 97 * occurred at the cluster level, the identifier would be the name of the 98 * cluster.</p> 99 */ WithSourceIdentifier(const char * value)100 inline Event& WithSourceIdentifier(const char* value) { SetSourceIdentifier(value); return *this;} 101 102 103 /** 104 * <p>Specifies the origin of this event - a cluster, a parameter group, a security 105 * group, etc.</p> 106 */ GetSourceType()107 inline const SourceType& GetSourceType() const{ return m_sourceType; } 108 109 /** 110 * <p>Specifies the origin of this event - a cluster, a parameter group, a security 111 * group, etc.</p> 112 */ SourceTypeHasBeenSet()113 inline bool SourceTypeHasBeenSet() const { return m_sourceTypeHasBeenSet; } 114 115 /** 116 * <p>Specifies the origin of this event - a cluster, a parameter group, a security 117 * group, etc.</p> 118 */ SetSourceType(const SourceType & value)119 inline void SetSourceType(const SourceType& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; } 120 121 /** 122 * <p>Specifies the origin of this event - a cluster, a parameter group, a security 123 * group, etc.</p> 124 */ SetSourceType(SourceType && value)125 inline void SetSourceType(SourceType&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = std::move(value); } 126 127 /** 128 * <p>Specifies the origin of this event - a cluster, a parameter group, a security 129 * group, etc.</p> 130 */ WithSourceType(const SourceType & value)131 inline Event& WithSourceType(const SourceType& value) { SetSourceType(value); return *this;} 132 133 /** 134 * <p>Specifies the origin of this event - a cluster, a parameter group, a security 135 * group, etc.</p> 136 */ WithSourceType(SourceType && value)137 inline Event& WithSourceType(SourceType&& value) { SetSourceType(std::move(value)); return *this;} 138 139 140 /** 141 * <p>The text of the event.</p> 142 */ GetMessage()143 inline const Aws::String& GetMessage() const{ return m_message; } 144 145 /** 146 * <p>The text of the event.</p> 147 */ MessageHasBeenSet()148 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } 149 150 /** 151 * <p>The text of the event.</p> 152 */ SetMessage(const Aws::String & value)153 inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } 154 155 /** 156 * <p>The text of the event.</p> 157 */ SetMessage(Aws::String && value)158 inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } 159 160 /** 161 * <p>The text of the event.</p> 162 */ SetMessage(const char * value)163 inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } 164 165 /** 166 * <p>The text of the event.</p> 167 */ WithMessage(const Aws::String & value)168 inline Event& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} 169 170 /** 171 * <p>The text of the event.</p> 172 */ WithMessage(Aws::String && value)173 inline Event& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} 174 175 /** 176 * <p>The text of the event.</p> 177 */ WithMessage(const char * value)178 inline Event& WithMessage(const char* value) { SetMessage(value); return *this;} 179 180 181 /** 182 * <p>The date and time when the event occurred.</p> 183 */ GetDate()184 inline const Aws::Utils::DateTime& GetDate() const{ return m_date; } 185 186 /** 187 * <p>The date and time when the event occurred.</p> 188 */ DateHasBeenSet()189 inline bool DateHasBeenSet() const { return m_dateHasBeenSet; } 190 191 /** 192 * <p>The date and time when the event occurred.</p> 193 */ SetDate(const Aws::Utils::DateTime & value)194 inline void SetDate(const Aws::Utils::DateTime& value) { m_dateHasBeenSet = true; m_date = value; } 195 196 /** 197 * <p>The date and time when the event occurred.</p> 198 */ SetDate(Aws::Utils::DateTime && value)199 inline void SetDate(Aws::Utils::DateTime&& value) { m_dateHasBeenSet = true; m_date = std::move(value); } 200 201 /** 202 * <p>The date and time when the event occurred.</p> 203 */ WithDate(const Aws::Utils::DateTime & value)204 inline Event& WithDate(const Aws::Utils::DateTime& value) { SetDate(value); return *this;} 205 206 /** 207 * <p>The date and time when the event occurred.</p> 208 */ WithDate(Aws::Utils::DateTime && value)209 inline Event& WithDate(Aws::Utils::DateTime&& value) { SetDate(std::move(value)); return *this;} 210 211 private: 212 213 Aws::String m_sourceIdentifier; 214 bool m_sourceIdentifierHasBeenSet; 215 216 SourceType m_sourceType; 217 bool m_sourceTypeHasBeenSet; 218 219 Aws::String m_message; 220 bool m_messageHasBeenSet; 221 222 Aws::Utils::DateTime m_date; 223 bool m_dateHasBeenSet; 224 }; 225 226 } // namespace Model 227 } // namespace ElastiCache 228 } // namespace Aws 229