Class ChatMessage

java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.ChatMessage
All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder, com.microsoft.kiota.serialization.Parsable, com.microsoft.kiota.store.BackedModel

@Generated("com.microsoft.kiota") public class ChatMessage extends Entity implements com.microsoft.kiota.serialization.Parsable
  • Constructor Details

    • ChatMessage

      public ChatMessage()
      Instantiates a new ChatMessage and sets the default values.
  • Method Details

    • createFromDiscriminatorValue

      @Nonnull public static ChatMessage createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode)
      Creates a new instance of the appropriate class based on discriminator value
      Parameters:
      parseNode - The parse node to use to read the discriminator value and create the object
      Returns:
      a ChatMessage
    • getAttachments

      @Nullable public List<ChatMessageAttachment> getAttachments()
      Gets the attachments property value. References to attached objects like files, tabs, meetings etc.
      Returns:
      a List<ChatMessageAttachment>
    • getBody

      @Nullable public ItemBody getBody()
      Gets the body property value. The body property
      Returns:
      a ItemBody
    • getChannelIdentity

      @Nullable public ChannelIdentity getChannelIdentity()
      Gets the channelIdentity property value. If the message was sent in a channel, represents identity of the channel.
      Returns:
      a ChannelIdentity
    • getChatId

      @Nullable public String getChatId()
      Gets the chatId property value. If the message was sent in a chat, represents the identity of the chat.
      Returns:
      a String
    • getCreatedDateTime

      @Nullable public OffsetDateTime getCreatedDateTime()
      Gets the createdDateTime property value. Timestamp of when the chat message was created.
      Returns:
      a OffsetDateTime
    • getDeletedDateTime

      @Nullable public OffsetDateTime getDeletedDateTime()
      Gets the deletedDateTime property value. Read only. Timestamp at which the chat message was deleted, or null if not deleted.
      Returns:
      a OffsetDateTime
    • getEtag

      @Nullable public String getEtag()
      Gets the etag property value. Read-only. Version number of the chat message.
      Returns:
      a String
    • getEventDetail

      @Nullable public EventMessageDetail getEventDetail()
      Gets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage.
      Returns:
      a EventMessageDetail
    • getFieldDeserializers

      @Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()
      The deserialization information for the current model
      Specified by:
      getFieldDeserializers in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class Entity
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getFrom

      @Nullable public ChatMessageFromIdentitySet getFrom()
      Gets the from property value. Details of the sender of the chat message. Can only be set during migration.
      Returns:
      a ChatMessageFromIdentitySet
    • getHostedContents

      @Nullable public List<ChatMessageHostedContent> getHostedContents()
      Gets the hostedContents property value. Content in a message hosted by Microsoft Teams - for example, images or code snippets.
      Returns:
      a List<ChatMessageHostedContent>
    • getImportance

      @Nullable public ChatMessageImportance getImportance()
      Gets the importance property value. The importance property
      Returns:
      a ChatMessageImportance
    • getLastEditedDateTime

      @Nullable public OffsetDateTime getLastEditedDateTime()
      Gets the lastEditedDateTime property value. Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null.
      Returns:
      a OffsetDateTime
    • getLastModifiedDateTime

      @Nullable public OffsetDateTime getLastModifiedDateTime()
      Gets the lastModifiedDateTime property value. Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed.
      Returns:
      a OffsetDateTime
    • getLocale

      @Nullable public String getLocale()
      Gets the locale property value. Locale of the chat message set by the client. Always set to en-us.
      Returns:
      a String
    • getMentions

      @Nullable public List<ChatMessageMention> getMentions()
      Gets the mentions property value. List of entities mentioned in the chat message. Supported entities are: user, bot, team, channel, chat, and tag.
      Returns:
      a List<ChatMessageMention>
    • getMessageHistory

      @Nullable public List<ChatMessageHistoryItem> getMessageHistory()
      Gets the messageHistory property value. List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message.
      Returns:
      a List<ChatMessageHistoryItem>
    • getMessageType

      @Nullable public ChatMessageType getMessageType()
      Gets the messageType property value. The messageType property
      Returns:
      a ChatMessageType
    • getPolicyViolation

      @Nullable public ChatMessagePolicyViolation getPolicyViolation()
      Gets the policyViolation property value. Defines the properties of a policy violation set by a data loss prevention (DLP) application.
      Returns:
      a ChatMessagePolicyViolation
    • getReactions

      @Nullable public List<ChatMessageReaction> getReactions()
      Gets the reactions property value. Reactions for this chat message (for example, Like).
      Returns:
      a List<ChatMessageReaction>
    • getReplies

      @Nullable public List<ChatMessage> getReplies()
      Gets the replies property value. Replies for a specified message. Supports $expand for channel messages.
      Returns:
      a List<ChatMessage>
    • getReplyToId

      @Nullable public String getReplyToId()
      Gets the replyToId property value. Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.)
      Returns:
      a String
    • getSubject

      @Nullable public String getSubject()
      Gets the subject property value. The subject of the chat message, in plaintext.
      Returns:
      a String
    • getSummary

      @Nullable public String getSummary()
      Gets the summary property value. Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.
      Returns:
      a String
    • getWebUrl

      @Nullable public String getWebUrl()
      Gets the webUrl property value. Read-only. Link to the message in Microsoft Teams.
      Returns:
      a String
    • serialize

      public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer)
      Serializes information the current object
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class Entity
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setAttachments

      public void setAttachments(@Nullable List<ChatMessageAttachment> value)
      Sets the attachments property value. References to attached objects like files, tabs, meetings etc.
      Parameters:
      value - Value to set for the attachments property.
    • setBody

      public void setBody(@Nullable ItemBody value)
      Sets the body property value. The body property
      Parameters:
      value - Value to set for the body property.
    • setChannelIdentity

      public void setChannelIdentity(@Nullable ChannelIdentity value)
      Sets the channelIdentity property value. If the message was sent in a channel, represents identity of the channel.
      Parameters:
      value - Value to set for the channelIdentity property.
    • setChatId

      public void setChatId(@Nullable String value)
      Sets the chatId property value. If the message was sent in a chat, represents the identity of the chat.
      Parameters:
      value - Value to set for the chatId property.
    • setCreatedDateTime

      public void setCreatedDateTime(@Nullable OffsetDateTime value)
      Sets the createdDateTime property value. Timestamp of when the chat message was created.
      Parameters:
      value - Value to set for the createdDateTime property.
    • setDeletedDateTime

      public void setDeletedDateTime(@Nullable OffsetDateTime value)
      Sets the deletedDateTime property value. Read only. Timestamp at which the chat message was deleted, or null if not deleted.
      Parameters:
      value - Value to set for the deletedDateTime property.
    • setEtag

      public void setEtag(@Nullable String value)
      Sets the etag property value. Read-only. Version number of the chat message.
      Parameters:
      value - Value to set for the etag property.
    • setEventDetail

      public void setEventDetail(@Nullable EventMessageDetail value)
      Sets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage.
      Parameters:
      value - Value to set for the eventDetail property.
    • setFrom

      public void setFrom(@Nullable ChatMessageFromIdentitySet value)
      Sets the from property value. Details of the sender of the chat message. Can only be set during migration.
      Parameters:
      value - Value to set for the from property.
    • setHostedContents

      public void setHostedContents(@Nullable List<ChatMessageHostedContent> value)
      Sets the hostedContents property value. Content in a message hosted by Microsoft Teams - for example, images or code snippets.
      Parameters:
      value - Value to set for the hostedContents property.
    • setImportance

      public void setImportance(@Nullable ChatMessageImportance value)
      Sets the importance property value. The importance property
      Parameters:
      value - Value to set for the importance property.
    • setLastEditedDateTime

      public void setLastEditedDateTime(@Nullable OffsetDateTime value)
      Sets the lastEditedDateTime property value. Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null.
      Parameters:
      value - Value to set for the lastEditedDateTime property.
    • setLastModifiedDateTime

      public void setLastModifiedDateTime(@Nullable OffsetDateTime value)
      Sets the lastModifiedDateTime property value. Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed.
      Parameters:
      value - Value to set for the lastModifiedDateTime property.
    • setLocale

      public void setLocale(@Nullable String value)
      Sets the locale property value. Locale of the chat message set by the client. Always set to en-us.
      Parameters:
      value - Value to set for the locale property.
    • setMentions

      public void setMentions(@Nullable List<ChatMessageMention> value)
      Sets the mentions property value. List of entities mentioned in the chat message. Supported entities are: user, bot, team, channel, chat, and tag.
      Parameters:
      value - Value to set for the mentions property.
    • setMessageHistory

      public void setMessageHistory(@Nullable List<ChatMessageHistoryItem> value)
      Sets the messageHistory property value. List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message.
      Parameters:
      value - Value to set for the messageHistory property.
    • setMessageType

      public void setMessageType(@Nullable ChatMessageType value)
      Sets the messageType property value. The messageType property
      Parameters:
      value - Value to set for the messageType property.
    • setPolicyViolation

      public void setPolicyViolation(@Nullable ChatMessagePolicyViolation value)
      Sets the policyViolation property value. Defines the properties of a policy violation set by a data loss prevention (DLP) application.
      Parameters:
      value - Value to set for the policyViolation property.
    • setReactions

      public void setReactions(@Nullable List<ChatMessageReaction> value)
      Sets the reactions property value. Reactions for this chat message (for example, Like).
      Parameters:
      value - Value to set for the reactions property.
    • setReplies

      public void setReplies(@Nullable List<ChatMessage> value)
      Sets the replies property value. Replies for a specified message. Supports $expand for channel messages.
      Parameters:
      value - Value to set for the replies property.
    • setReplyToId

      public void setReplyToId(@Nullable String value)
      Sets the replyToId property value. Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.)
      Parameters:
      value - Value to set for the replyToId property.
    • setSubject

      public void setSubject(@Nullable String value)
      Sets the subject property value. The subject of the chat message, in plaintext.
      Parameters:
      value - Value to set for the subject property.
    • setSummary

      public void setSummary(@Nullable String value)
      Sets the summary property value. Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.
      Parameters:
      value - Value to set for the summary property.
    • setWebUrl

      public void setWebUrl(@Nullable String value)
      Sets the webUrl property value. Read-only. Link to the message in Microsoft Teams.
      Parameters:
      value - Value to set for the webUrl property.