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

The details of a message in a channel.

See Also:

AWS * API Reference

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

The ARN of the channel.

*/ inline const Aws::String& GetChannelArn() const{ return m_channelArn; } /** *

The ARN of the channel.

*/ inline bool ChannelArnHasBeenSet() const { return m_channelArnHasBeenSet; } /** *

The ARN of the channel.

*/ inline void SetChannelArn(const Aws::String& value) { m_channelArnHasBeenSet = true; m_channelArn = value; } /** *

The ARN of the channel.

*/ inline void SetChannelArn(Aws::String&& value) { m_channelArnHasBeenSet = true; m_channelArn = std::move(value); } /** *

The ARN of the channel.

*/ inline void SetChannelArn(const char* value) { m_channelArnHasBeenSet = true; m_channelArn.assign(value); } /** *

The ARN of the channel.

*/ inline ChannelMessage& WithChannelArn(const Aws::String& value) { SetChannelArn(value); return *this;} /** *

The ARN of the channel.

*/ inline ChannelMessage& WithChannelArn(Aws::String&& value) { SetChannelArn(std::move(value)); return *this;} /** *

The ARN of the channel.

*/ inline ChannelMessage& WithChannelArn(const char* value) { SetChannelArn(value); return *this;} /** *

The ID of a message.

*/ inline const Aws::String& GetMessageId() const{ return m_messageId; } /** *

The ID of a message.

*/ inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; } /** *

The ID of a message.

*/ inline void SetMessageId(const Aws::String& value) { m_messageIdHasBeenSet = true; m_messageId = value; } /** *

The ID of a message.

*/ inline void SetMessageId(Aws::String&& value) { m_messageIdHasBeenSet = true; m_messageId = std::move(value); } /** *

The ID of a message.

*/ inline void SetMessageId(const char* value) { m_messageIdHasBeenSet = true; m_messageId.assign(value); } /** *

The ID of a message.

*/ inline ChannelMessage& WithMessageId(const Aws::String& value) { SetMessageId(value); return *this;} /** *

The ID of a message.

*/ inline ChannelMessage& WithMessageId(Aws::String&& value) { SetMessageId(std::move(value)); return *this;} /** *

The ID of a message.

*/ inline ChannelMessage& WithMessageId(const char* value) { SetMessageId(value); return *this;} /** *

The message content.

*/ inline const Aws::String& GetContent() const{ return m_content; } /** *

The message content.

*/ inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } /** *

The message content.

*/ inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } /** *

The message content.

*/ inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } /** *

The message content.

*/ inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } /** *

The message content.

*/ inline ChannelMessage& WithContent(const Aws::String& value) { SetContent(value); return *this;} /** *

The message content.

*/ inline ChannelMessage& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} /** *

The message content.

*/ inline ChannelMessage& WithContent(const char* value) { SetContent(value); return *this;} /** *

The message metadata.

*/ inline const Aws::String& GetMetadata() const{ return m_metadata; } /** *

The message metadata.

*/ inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; } /** *

The message metadata.

*/ inline void SetMetadata(const Aws::String& value) { m_metadataHasBeenSet = true; m_metadata = value; } /** *

The message metadata.

*/ inline void SetMetadata(Aws::String&& value) { m_metadataHasBeenSet = true; m_metadata = std::move(value); } /** *

The message metadata.

*/ inline void SetMetadata(const char* value) { m_metadataHasBeenSet = true; m_metadata.assign(value); } /** *

The message metadata.

*/ inline ChannelMessage& WithMetadata(const Aws::String& value) { SetMetadata(value); return *this;} /** *

The message metadata.

*/ inline ChannelMessage& WithMetadata(Aws::String&& value) { SetMetadata(std::move(value)); return *this;} /** *

The message metadata.

*/ inline ChannelMessage& WithMetadata(const char* value) { SetMetadata(value); return *this;} /** *

The message type.

*/ inline const ChannelMessageType& GetType() const{ return m_type; } /** *

The message type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The message type.

*/ inline void SetType(const ChannelMessageType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The message type.

*/ inline void SetType(ChannelMessageType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The message type.

*/ inline ChannelMessage& WithType(const ChannelMessageType& value) { SetType(value); return *this;} /** *

The message type.

*/ inline ChannelMessage& WithType(ChannelMessageType&& value) { SetType(std::move(value)); return *this;} /** *

The time at which the message was created.

*/ inline const Aws::Utils::DateTime& GetCreatedTimestamp() const{ return m_createdTimestamp; } /** *

The time at which the message was created.

*/ inline bool CreatedTimestampHasBeenSet() const { return m_createdTimestampHasBeenSet; } /** *

The time at which the message was created.

*/ inline void SetCreatedTimestamp(const Aws::Utils::DateTime& value) { m_createdTimestampHasBeenSet = true; m_createdTimestamp = value; } /** *

The time at which the message was created.

*/ inline void SetCreatedTimestamp(Aws::Utils::DateTime&& value) { m_createdTimestampHasBeenSet = true; m_createdTimestamp = std::move(value); } /** *

The time at which the message was created.

*/ inline ChannelMessage& WithCreatedTimestamp(const Aws::Utils::DateTime& value) { SetCreatedTimestamp(value); return *this;} /** *

The time at which the message was created.

*/ inline ChannelMessage& WithCreatedTimestamp(Aws::Utils::DateTime&& value) { SetCreatedTimestamp(std::move(value)); return *this;} /** *

The time at which a message was edited.

*/ inline const Aws::Utils::DateTime& GetLastEditedTimestamp() const{ return m_lastEditedTimestamp; } /** *

The time at which a message was edited.

*/ inline bool LastEditedTimestampHasBeenSet() const { return m_lastEditedTimestampHasBeenSet; } /** *

The time at which a message was edited.

*/ inline void SetLastEditedTimestamp(const Aws::Utils::DateTime& value) { m_lastEditedTimestampHasBeenSet = true; m_lastEditedTimestamp = value; } /** *

The time at which a message was edited.

*/ inline void SetLastEditedTimestamp(Aws::Utils::DateTime&& value) { m_lastEditedTimestampHasBeenSet = true; m_lastEditedTimestamp = std::move(value); } /** *

The time at which a message was edited.

*/ inline ChannelMessage& WithLastEditedTimestamp(const Aws::Utils::DateTime& value) { SetLastEditedTimestamp(value); return *this;} /** *

The time at which a message was edited.

*/ inline ChannelMessage& WithLastEditedTimestamp(Aws::Utils::DateTime&& value) { SetLastEditedTimestamp(std::move(value)); return *this;} /** *

The time at which a message was updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedTimestamp() const{ return m_lastUpdatedTimestamp; } /** *

The time at which a message was updated.

*/ inline bool LastUpdatedTimestampHasBeenSet() const { return m_lastUpdatedTimestampHasBeenSet; } /** *

The time at which a message was updated.

*/ inline void SetLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = value; } /** *

The time at which a message was updated.

*/ inline void SetLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = std::move(value); } /** *

The time at which a message was updated.

*/ inline ChannelMessage& WithLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetLastUpdatedTimestamp(value); return *this;} /** *

The time at which a message was updated.

*/ inline ChannelMessage& WithLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetLastUpdatedTimestamp(std::move(value)); return *this;} /** *

The message sender.

*/ inline const Identity& GetSender() const{ return m_sender; } /** *

The message sender.

*/ inline bool SenderHasBeenSet() const { return m_senderHasBeenSet; } /** *

The message sender.

*/ inline void SetSender(const Identity& value) { m_senderHasBeenSet = true; m_sender = value; } /** *

The message sender.

*/ inline void SetSender(Identity&& value) { m_senderHasBeenSet = true; m_sender = std::move(value); } /** *

The message sender.

*/ inline ChannelMessage& WithSender(const Identity& value) { SetSender(value); return *this;} /** *

The message sender.

*/ inline ChannelMessage& WithSender(Identity&& value) { SetSender(std::move(value)); return *this;} /** *

Hides the content of a message.

*/ inline bool GetRedacted() const{ return m_redacted; } /** *

Hides the content of a message.

*/ inline bool RedactedHasBeenSet() const { return m_redactedHasBeenSet; } /** *

Hides the content of a message.

*/ inline void SetRedacted(bool value) { m_redactedHasBeenSet = true; m_redacted = value; } /** *

Hides the content of a message.

*/ inline ChannelMessage& WithRedacted(bool value) { SetRedacted(value); return *this;} /** *

The persistence setting for a channel message.

*/ inline const ChannelMessagePersistenceType& GetPersistence() const{ return m_persistence; } /** *

The persistence setting for a channel message.

*/ inline bool PersistenceHasBeenSet() const { return m_persistenceHasBeenSet; } /** *

The persistence setting for a channel message.

*/ inline void SetPersistence(const ChannelMessagePersistenceType& value) { m_persistenceHasBeenSet = true; m_persistence = value; } /** *

The persistence setting for a channel message.

*/ inline void SetPersistence(ChannelMessagePersistenceType&& value) { m_persistenceHasBeenSet = true; m_persistence = std::move(value); } /** *

The persistence setting for a channel message.

*/ inline ChannelMessage& WithPersistence(const ChannelMessagePersistenceType& value) { SetPersistence(value); return *this;} /** *

The persistence setting for a channel message.

*/ inline ChannelMessage& WithPersistence(ChannelMessagePersistenceType&& value) { SetPersistence(std::move(value)); return *this;} private: Aws::String m_channelArn; bool m_channelArnHasBeenSet = false; Aws::String m_messageId; bool m_messageIdHasBeenSet = false; Aws::String m_content; bool m_contentHasBeenSet = false; Aws::String m_metadata; bool m_metadataHasBeenSet = false; ChannelMessageType m_type; bool m_typeHasBeenSet = false; Aws::Utils::DateTime m_createdTimestamp; bool m_createdTimestampHasBeenSet = false; Aws::Utils::DateTime m_lastEditedTimestamp; bool m_lastEditedTimestampHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedTimestamp; bool m_lastUpdatedTimestampHasBeenSet = false; Identity m_sender; bool m_senderHasBeenSet = false; bool m_redacted; bool m_redactedHasBeenSet = false; ChannelMessagePersistenceType m_persistence; bool m_persistenceHasBeenSet = false; }; } // namespace Model } // namespace Chime } // namespace Aws