Partilhar via


ChatThreadItem Class

  • java.lang.Object
    • com.azure.communication.chat.models.ChatThreadItem

Implements

public final class ChatThreadItem
implements JsonSerializable<ChatThreadItem>

Summary information of a chat thread.

Constructor Summary

Constructor Description
ChatThreadItem()

Creates an instance of ChatThreadItem class.

Method Summary

Modifier and Type Method and Description
static ChatThreadItem fromJson(JsonReader jsonReader)

Reads an instance of ChatThreadItem from the JsonReader.

OffsetDateTime getDeletedOn()

Get the deletedOn property: The timestamp when the chat thread was deleted.

String getId()

Get the id property: Chat thread id.

OffsetDateTime getLastMessageReceivedOn()

Get the lastMessageReceivedOn property: The timestamp when the last message arrived at the server.

String getTopic()

Get the topic property: Chat thread topic.

ChatThreadItem setDeletedOn(OffsetDateTime deletedOn)

Set the deletedOn property: The timestamp when the chat thread was deleted.

ChatThreadItem setId(String id)

Set the id property: Chat thread id.

ChatThreadItem setTopic(String topic)

Set the topic property: Chat thread topic.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ChatThreadItem

public ChatThreadItem()

Creates an instance of ChatThreadItem class.

Method Details

fromJson

public static ChatThreadItem fromJson(JsonReader jsonReader)

Reads an instance of ChatThreadItem from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getDeletedOn

public OffsetDateTime getDeletedOn()

Get the deletedOn property: The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.

Returns:

the deletedOn value.

getId

public String getId()

Get the id property: Chat thread id.

Returns:

the id value.

getLastMessageReceivedOn

public OffsetDateTime getLastMessageReceivedOn()

Get the lastMessageReceivedOn property: The timestamp when the last message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.

Returns:

the lastMessageReceivedOn value.

getTopic

public String getTopic()

Get the topic property: Chat thread topic.

Returns:

the topic value.

setDeletedOn

public ChatThreadItem setDeletedOn(OffsetDateTime deletedOn)

Set the deletedOn property: The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.

Parameters:

deletedOn - the deletedOn value to set.

Returns:

the ChatThreadItem object itself.

setId

public ChatThreadItem setId(String id)

Set the id property: Chat thread id.

Parameters:

id - the id value to set.

Returns:

the ChatThreadItem object itself.

setTopic

public ChatThreadItem setTopic(String topic)

Set the topic property: Chat thread topic.

Parameters:

topic - the topic value to set.

Returns:

the ChatThreadItem object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to