/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace MemoryDB { namespace Model { /** *

Represents a single occurrence of something interesting within the system. * Some examples of events are creating a cluster or adding or removing a * node.

See Also:

AWS API * Reference

*/ class Event { public: AWS_MEMORYDB_API Event(); AWS_MEMORYDB_API Event(Aws::Utils::Json::JsonView jsonValue); AWS_MEMORYDB_API Event& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_MEMORYDB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline const Aws::String& GetSourceName() const{ return m_sourceName; } /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline bool SourceNameHasBeenSet() const { return m_sourceNameHasBeenSet; } /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline void SetSourceName(const Aws::String& value) { m_sourceNameHasBeenSet = true; m_sourceName = value; } /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline void SetSourceName(Aws::String&& value) { m_sourceNameHasBeenSet = true; m_sourceName = std::move(value); } /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline void SetSourceName(const char* value) { m_sourceNameHasBeenSet = true; m_sourceName.assign(value); } /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline Event& WithSourceName(const Aws::String& value) { SetSourceName(value); return *this;} /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline Event& WithSourceName(Aws::String&& value) { SetSourceName(std::move(value)); return *this;} /** *

The name for the source of the event. For example, if the event occurred at * the cluster level, the identifier would be the name of the cluster.

*/ inline Event& WithSourceName(const char* value) { SetSourceName(value); return *this;} /** *

Specifies the origin of this event - a cluster, a parameter group, a security * group, etc.

*/ inline const SourceType& GetSourceType() const{ return m_sourceType; } /** *

Specifies the origin of this event - a cluster, a parameter group, a security * group, etc.

*/ inline bool SourceTypeHasBeenSet() const { return m_sourceTypeHasBeenSet; } /** *

Specifies the origin of this event - a cluster, a parameter group, a security * group, etc.

*/ inline void SetSourceType(const SourceType& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; } /** *

Specifies the origin of this event - a cluster, a parameter group, a security * group, etc.

*/ inline void SetSourceType(SourceType&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = std::move(value); } /** *

Specifies the origin of this event - a cluster, a parameter group, a security * group, etc.

*/ inline Event& WithSourceType(const SourceType& value) { SetSourceType(value); return *this;} /** *

Specifies the origin of this event - a cluster, a parameter group, a security * group, etc.

*/ inline Event& WithSourceType(SourceType&& value) { SetSourceType(std::move(value)); return *this;} /** *

The text of the event.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

The text of the event.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

The text of the event.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

The text of the event.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

The text of the event.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

The text of the event.

*/ inline Event& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

The text of the event.

*/ inline Event& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

The text of the event.

*/ inline Event& WithMessage(const char* value) { SetMessage(value); return *this;} /** *

The date and time when the event occurred.

*/ inline const Aws::Utils::DateTime& GetDate() const{ return m_date; } /** *

The date and time when the event occurred.

*/ inline bool DateHasBeenSet() const { return m_dateHasBeenSet; } /** *

The date and time when the event occurred.

*/ inline void SetDate(const Aws::Utils::DateTime& value) { m_dateHasBeenSet = true; m_date = value; } /** *

The date and time when the event occurred.

*/ inline void SetDate(Aws::Utils::DateTime&& value) { m_dateHasBeenSet = true; m_date = std::move(value); } /** *

The date and time when the event occurred.

*/ inline Event& WithDate(const Aws::Utils::DateTime& value) { SetDate(value); return *this;} /** *

The date and time when the event occurred.

*/ inline Event& WithDate(Aws::Utils::DateTime&& value) { SetDate(std::move(value)); return *this;} private: Aws::String m_sourceName; bool m_sourceNameHasBeenSet = false; SourceType m_sourceType; bool m_sourceTypeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; Aws::Utils::DateTime m_date; bool m_dateHasBeenSet = false; }; } // namespace Model } // namespace MemoryDB } // namespace Aws