Class ChatMessage
java.lang.Object
com.azure.communication.chat.models.ChatMessage
The ChatMessage model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the content property: Content of the chat message.Get the createdOn property: The timestamp when the chat message arrived at the server.Get the deletedOn property: The timestamp when the chat message was deleted.Get the editedOn property: The timestamp when the chat message was edited.getId()
Get the id property: The id of the chat message.Get the metadata property: Message metadata.Get the sender property: Identifies a participant in Azure Communication services.Get the senderDisplayName property: The display name of the chat message sender.getType()
Get the type property: Type of the chat message.Get the version property: Version of the chat message.setContent
(ChatMessageContent content) Set the content property: Content of the chat message.setCreatedOn
(OffsetDateTime createdOn) Set the createdOn property: The timestamp when the chat message arrived at the server.setDeletedOn
(OffsetDateTime deletedOn) Set the deletedOn property: The timestamp when the chat message was deleted.setEditedOn
(OffsetDateTime editedOn) Set the editedOn property: The timestamp when the chat message was edited.Set the id property: The id of the chat message.setMetadata
(Map<String, String> metadata) Set the metadata property: Message metadata.setSender
(CommunicationIdentifier sender) Set the sender property: Identifies a participant in Azure Communication services.setSenderDisplayName
(String senderDisplayName) Set the senderDisplayName property: The display name of the chat message sender.setType
(ChatMessageType type) Set the type property: Type of the chat message.setVersion
(String version) Set the version property: Version of the chat message.
-
Constructor Details
-
ChatMessage
public ChatMessage()
-
-
Method Details
-
getId
Get the id property: The id of the chat message. This id is server generated.- Returns:
- the id value.
-
setId
Set the id property: The id of the chat message.- Parameters:
id
- the id to set.- Returns:
- the ChatMessage object itself.
-
getType
Get the type property: Type of the chat message.Possible values: - Text - ThreadActivity/TopicUpdate - ThreadActivity/AddMember - ThreadActivity/DeleteMember.
- Returns:
- the type value.
-
setType
Set the type property: Type of the chat message.Possible values: - Text - ThreadActivity/TopicUpdate - ThreadActivity/AddMember - ThreadActivity/DeleteMember.
- Parameters:
type
- the type value to set.- Returns:
- the ChatMessage object itself.
-
getVersion
Get the version property: Version of the chat message.- Returns:
- the version value.
-
setVersion
Set the version property: Version of the chat message.- Parameters:
version
- the version to set.- Returns:
- the ChatMessage object itself.
-
getContent
Get the content property: Content of the chat message.- Returns:
- the content value.
-
setContent
Set the content property: Content of the chat message.- Parameters:
content
- the content value to set.- Returns:
- the ChatMessage object itself.
-
getSenderDisplayName
Get the senderDisplayName property: The display name of the chat message sender. This property is used to populate sender name for push notifications.- Returns:
- the senderDisplayName value.
-
setSenderDisplayName
Set the senderDisplayName property: The display name of the chat message sender. This property is used to populate sender name for push notifications.- Parameters:
senderDisplayName
- the senderDisplayName value to set.- Returns:
- the ChatMessage object itself.
-
getCreatedOn
Get the createdOn property: The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.- Returns:
- the createdOn value.
-
setCreatedOn
Set the createdOn property: The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.- Parameters:
createdOn
- the createdOn value to set.- Returns:
- the ChatMessage object itself.
-
getSender
Get the sender property: Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set.- Returns:
- the sender value.
-
setSender
Set the sender property: Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set.- Parameters:
sender
- the sender value to set.- Returns:
- the ChatMessage object itself.
-
getDeletedOn
Get the deletedOn property: The timestamp when the chat message was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.- Returns:
- the deletedOn value.
-
setDeletedOn
Set the deletedOn property: The timestamp when the chat message was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.- Parameters:
deletedOn
- the deletedOn value to set.- Returns:
- the ChatMessage object itself.
-
getEditedOn
Get the editedOn property: The timestamp when the chat message was edited. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.- Returns:
- the editedOn value.
-
setEditedOn
Set the editedOn property: The timestamp when the chat message was edited. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.- Parameters:
editedOn
- the editedOn value to set.- Returns:
- the ChatMessage object itself.
-
getMetadata
Get the metadata property: Message metadata.- Returns:
- the metadata value.
-
setMetadata
Set the metadata property: Message metadata.- Parameters:
metadata
- the metadata value to set.- Returns:
- the ChatMessage object itself.
-