你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MicrosoftGraphChatMessage Class

public final class MicrosoftGraphChatMessage
extends MicrosoftGraphEntity

chatMessage.

Constructor Summary

Constructor Description
MicrosoftGraphChatMessage()

Creates an instance of MicrosoftGraphChatMessage class.

Method Summary

Modifier and Type Method and Description
Map<String,Object> additionalProperties()

Get the additionalProperties property: chatMessage.

List<MicrosoftGraphChatMessageAttachment> attachments()

Get the attachments property: Attached files.

MicrosoftGraphItemBody body()

Get the body property: itemBody.

OffsetDateTime createdDateTime()

Get the createdDateTime property: Read only.

OffsetDateTime deletedDateTime()

Get the deletedDateTime property: Read only.

String etag()

Get the etag property: Read-only.

MicrosoftGraphIdentitySet from()

Get the from property: identitySet.

static MicrosoftGraphChatMessage fromJson(JsonReader jsonReader)

Reads an instance of MicrosoftGraphChatMessage from the JsonReader.

List<MicrosoftGraphChatMessageHostedContent> hostedContents()

Get the hostedContents property: The hostedContents property.

MicrosoftGraphChatMessageImportance importance()

Get the importance property: chatMessageImportance.

OffsetDateTime lastEditedDateTime()

Get the lastEditedDateTime property: Read only.

OffsetDateTime lastModifiedDateTime()

Get the lastModifiedDateTime property: Read only.

String locale()

Get the locale property: Locale of the chat message set by the client.

List<MicrosoftGraphChatMessageMention> mentions()

Get the mentions property: List of entities mentioned in the chat message.

MicrosoftGraphChatMessageType messageType()

Get the messageType property: chatMessageType.

MicrosoftGraphChatMessagePolicyViolation policyViolation()

Get the policyViolation property: chatMessagePolicyViolation.

List<MicrosoftGraphChatMessageReaction> reactions()

Get the reactions property: The reactions property.

List<MicrosoftGraphChatMessage> replies()

Get the replies property: The replies property.

String replyToId()

Get the replyToId property: Read-only.

String subject()

Get the subject property: The subject of the chat message, in plaintext.

String summary()

Get the summary property: Summary text of the chat message that could be used for push notifications and summary views or fall back views.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String webUrl()

Get the webUrl property: The webUrl property.

MicrosoftGraphChatMessage withAdditionalProperties(Map<String,Object> additionalProperties)

Set the additionalProperties property: chatMessage.

MicrosoftGraphChatMessage withAttachments(List<MicrosoftGraphChatMessageAttachment> attachments)

Set the attachments property: Attached files.

MicrosoftGraphChatMessage withBody(MicrosoftGraphItemBody body)

Set the body property: itemBody.

MicrosoftGraphChatMessage withCreatedDateTime(OffsetDateTime createdDateTime)

Set the createdDateTime property: Read only.

MicrosoftGraphChatMessage withDeletedDateTime(OffsetDateTime deletedDateTime)

Set the deletedDateTime property: Read only.

MicrosoftGraphChatMessage withEtag(String etag)

Set the etag property: Read-only.

MicrosoftGraphChatMessage withFrom(MicrosoftGraphIdentitySet from)

Set the from property: identitySet.

MicrosoftGraphChatMessage withHostedContents(List<MicrosoftGraphChatMessageHostedContent> hostedContents)

Set the hostedContents property: The hostedContents property.

MicrosoftGraphChatMessage withId(String id)

Set the id property: Read-only.

MicrosoftGraphChatMessage withImportance(MicrosoftGraphChatMessageImportance importance)

Set the importance property: chatMessageImportance.

MicrosoftGraphChatMessage withLastEditedDateTime(OffsetDateTime lastEditedDateTime)

Set the lastEditedDateTime property: Read only.

MicrosoftGraphChatMessage withLastModifiedDateTime(OffsetDateTime lastModifiedDateTime)

Set the lastModifiedDateTime property: Read only.

MicrosoftGraphChatMessage withLocale(String locale)

Set the locale property: Locale of the chat message set by the client.

MicrosoftGraphChatMessage withMentions(List<MicrosoftGraphChatMessageMention> mentions)

Set the mentions property: List of entities mentioned in the chat message.

MicrosoftGraphChatMessage withMessageType(MicrosoftGraphChatMessageType messageType)

Set the messageType property: chatMessageType.

MicrosoftGraphChatMessage withPolicyViolation(MicrosoftGraphChatMessagePolicyViolation policyViolation)

Set the policyViolation property: chatMessagePolicyViolation.

MicrosoftGraphChatMessage withReactions(List<MicrosoftGraphChatMessageReaction> reactions)

Set the reactions property: The reactions property.

MicrosoftGraphChatMessage withReplies(List<MicrosoftGraphChatMessage> replies)

Set the replies property: The replies property.

MicrosoftGraphChatMessage withReplyToId(String replyToId)

Set the replyToId property: Read-only.

MicrosoftGraphChatMessage withSubject(String subject)

Set the subject property: The subject of the chat message, in plaintext.

MicrosoftGraphChatMessage withSummary(String summary)

Set the summary property: Summary text of the chat message that could be used for push notifications and summary views or fall back views.

MicrosoftGraphChatMessage withWebUrl(String webUrl)

Set the webUrl property: The webUrl property.

Methods inherited from MicrosoftGraphEntity

Methods inherited from java.lang.Object

Constructor Details

MicrosoftGraphChatMessage

public MicrosoftGraphChatMessage()

Creates an instance of MicrosoftGraphChatMessage class.

Method Details

additionalProperties

public Map additionalProperties()

Get the additionalProperties property: chatMessage.

Overrides:

MicrosoftGraphChatMessage.additionalProperties()

Returns:

the additionalProperties value.

attachments

public List attachments()

Get the attachments property: Attached files. Attachments are currently read-only \u2013 sending attachments is not supported.

Returns:

the attachments value.

body

public MicrosoftGraphItemBody body()

Get the body property: itemBody.

Returns:

the body value.

createdDateTime

public OffsetDateTime createdDateTime()

Get the createdDateTime property: Read only. Timestamp of when the chat message was created.

Returns:

the createdDateTime value.

deletedDateTime

public OffsetDateTime deletedDateTime()

Get the deletedDateTime property: Read only. Timestamp at which the chat message was deleted, or null if not deleted.

Returns:

the deletedDateTime value.

etag

public String etag()

Get the etag property: Read-only. Version number of the chat message.

Returns:

the etag value.

from

public MicrosoftGraphIdentitySet from()

Get the from property: identitySet.

Returns:

the from value.

fromJson

public static MicrosoftGraphChatMessage fromJson(JsonReader jsonReader)

Reads an instance of MicrosoftGraphChatMessage from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MicrosoftGraphChatMessage if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the MicrosoftGraphChatMessage.

hostedContents

public List hostedContents()

Get the hostedContents property: The hostedContents property.

Returns:

the hostedContents value.

importance

public MicrosoftGraphChatMessageImportance importance()

Get the importance property: chatMessageImportance.

Returns:

the importance value.

lastEditedDateTime

public OffsetDateTime lastEditedDateTime()

Get the lastEditedDateTime property: Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Microsoft Teams UI. If no edits are made the value is null.

Returns:

the lastEditedDateTime value.

lastModifiedDateTime

public OffsetDateTime lastModifiedDateTime()

Get the lastModifiedDateTime property: Read only. Timestamp when the chat message is created (initial setting) or edited, including when a reaction is added or removed.

Returns:

the lastModifiedDateTime value.

locale

public String locale()

Get the locale property: Locale of the chat message set by the client.

Returns:

the locale value.

mentions

public List mentions()

Get the mentions property: List of entities mentioned in the chat message. Currently supports user, bot, team, channel.

Returns:

the mentions value.

messageType

public MicrosoftGraphChatMessageType messageType()

Get the messageType property: chatMessageType.

Returns:

the messageType value.

policyViolation

public MicrosoftGraphChatMessagePolicyViolation policyViolation()

Get the policyViolation property: chatMessagePolicyViolation.

Returns:

the policyViolation value.

reactions

public List reactions()

Get the reactions property: The reactions property.

Returns:

the reactions value.

replies

public List replies()

Get the replies property: The replies property.

Returns:

the replies value.

replyToId

public String replyToId()

Get the replyToId property: 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:

the replyToId value.

subject

public String subject()

Get the subject property: The subject of the chat message, in plaintext.

Returns:

the subject value.

summary

public String summary()

Get the summary property: 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:

the summary value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

MicrosoftGraphChatMessage.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

MicrosoftGraphChatMessage.validate()

webUrl

public String webUrl()

Get the webUrl property: The webUrl property.

Returns:

the webUrl value.

withAdditionalProperties

public MicrosoftGraphChatMessage withAdditionalProperties(Map additionalProperties)

Set the additionalProperties property: chatMessage.

Overrides:

MicrosoftGraphChatMessage.withAdditionalProperties(Map<String,Object> additionalProperties)

Parameters:

additionalProperties - the additionalProperties value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withAttachments

public MicrosoftGraphChatMessage withAttachments(List attachments)

Set the attachments property: Attached files. Attachments are currently read-only \u2013 sending attachments is not supported.

Parameters:

attachments - the attachments value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withBody

public MicrosoftGraphChatMessage withBody(MicrosoftGraphItemBody body)

Set the body property: itemBody.

Parameters:

body - the body value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withCreatedDateTime

public MicrosoftGraphChatMessage withCreatedDateTime(OffsetDateTime createdDateTime)

Set the createdDateTime property: Read only. Timestamp of when the chat message was created.

Parameters:

createdDateTime - the createdDateTime value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withDeletedDateTime

public MicrosoftGraphChatMessage withDeletedDateTime(OffsetDateTime deletedDateTime)

Set the deletedDateTime property: Read only. Timestamp at which the chat message was deleted, or null if not deleted.

Parameters:

deletedDateTime - the deletedDateTime value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withEtag

public MicrosoftGraphChatMessage withEtag(String etag)

Set the etag property: Read-only. Version number of the chat message.

Parameters:

etag - the etag value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withFrom

public MicrosoftGraphChatMessage withFrom(MicrosoftGraphIdentitySet from)

Set the from property: identitySet.

Parameters:

from - the from value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withHostedContents

public MicrosoftGraphChatMessage withHostedContents(List hostedContents)

Set the hostedContents property: The hostedContents property.

Parameters:

hostedContents - the hostedContents value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withId

public MicrosoftGraphChatMessage withId(String id)

Set the id property: Read-only.

Overrides:

MicrosoftGraphChatMessage.withId(String id)

Parameters:

id

withImportance

public MicrosoftGraphChatMessage withImportance(MicrosoftGraphChatMessageImportance importance)

Set the importance property: chatMessageImportance.

Parameters:

importance - the importance value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withLastEditedDateTime

public MicrosoftGraphChatMessage withLastEditedDateTime(OffsetDateTime lastEditedDateTime)

Set the lastEditedDateTime property: Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Microsoft Teams UI. If no edits are made the value is null.

Parameters:

lastEditedDateTime - the lastEditedDateTime value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withLastModifiedDateTime

public MicrosoftGraphChatMessage withLastModifiedDateTime(OffsetDateTime lastModifiedDateTime)

Set the lastModifiedDateTime property: Read only. Timestamp when the chat message is created (initial setting) or edited, including when a reaction is added or removed.

Parameters:

lastModifiedDateTime - the lastModifiedDateTime value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withLocale

public MicrosoftGraphChatMessage withLocale(String locale)

Set the locale property: Locale of the chat message set by the client.

Parameters:

locale - the locale value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withMentions

public MicrosoftGraphChatMessage withMentions(List mentions)

Set the mentions property: List of entities mentioned in the chat message. Currently supports user, bot, team, channel.

Parameters:

mentions - the mentions value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withMessageType

public MicrosoftGraphChatMessage withMessageType(MicrosoftGraphChatMessageType messageType)

Set the messageType property: chatMessageType.

Parameters:

messageType - the messageType value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withPolicyViolation

public MicrosoftGraphChatMessage withPolicyViolation(MicrosoftGraphChatMessagePolicyViolation policyViolation)

Set the policyViolation property: chatMessagePolicyViolation.

Parameters:

policyViolation - the policyViolation value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withReactions

public MicrosoftGraphChatMessage withReactions(List reactions)

Set the reactions property: The reactions property.

Parameters:

reactions - the reactions value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withReplies

public MicrosoftGraphChatMessage withReplies(List replies)

Set the replies property: The replies property.

Parameters:

replies - the replies value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withReplyToId

public MicrosoftGraphChatMessage withReplyToId(String replyToId)

Set the replyToId property: 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:

replyToId - the replyToId value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withSubject

public MicrosoftGraphChatMessage withSubject(String subject)

Set the subject property: The subject of the chat message, in plaintext.

Parameters:

subject - the subject value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withSummary

public MicrosoftGraphChatMessage withSummary(String summary)

Set the summary property: 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:

summary - the summary value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

withWebUrl

public MicrosoftGraphChatMessage withWebUrl(String webUrl)

Set the webUrl property: The webUrl property.

Parameters:

webUrl - the webUrl value to set.

Returns:

the MicrosoftGraphChatMessage object itself.

Applies to