public final class ChatThreadClient
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
addParticipant(ChatParticipant participant)
Adds a participant to a thread.
|
AddChatParticipantsResult |
addParticipants(java.lang.Iterable<ChatParticipant> participants)
Adds participants to a thread.
|
com.azure.android.core.rest.Response<AddChatParticipantsResult> |
addParticipantsWithResponse(java.lang.Iterable<ChatParticipant> participants,
com.azure.android.core.util.RequestContext requestContext)
Adds participants to a thread.
|
com.azure.android.core.rest.Response<java.lang.Void> |
addParticipantWithResponse(ChatParticipant participant,
com.azure.android.core.util.RequestContext requestContext)
Adds a participant to a thread.
|
void |
deleteMessage(java.lang.String chatMessageId)
Deletes a message.
|
com.azure.android.core.rest.Response<java.lang.Void> |
deleteMessageWithResponse(java.lang.String chatMessageId,
com.azure.android.core.util.RequestContext requestContext)
Deletes a message.
|
java.lang.String |
getChatThreadId()
Get the thread id.
|
ChatMessage |
getMessage(java.lang.String chatMessageId)
Gets a message by id.
|
com.azure.android.core.rest.Response<ChatMessage> |
getMessageWithResponse(java.lang.String chatMessageId,
com.azure.android.core.util.RequestContext requestContext)
Gets a message by id.
|
ChatThreadProperties |
getProperties()
Gets chat thread properties.
|
com.azure.android.core.rest.Response<ChatThreadProperties> |
getPropertiesWithResponse(com.azure.android.core.util.RequestContext requestContext)
Gets chat thread properties.
|
com.azure.android.core.rest.util.paging.PagedIterable<ChatMessage> |
listMessages()
Gets the list of thread messages.
|
com.azure.android.core.rest.util.paging.PagedIterable<ChatMessage> |
listMessages(ListChatMessagesOptions listMessagesOptions,
com.azure.android.core.util.RequestContext requestContext)
Gets the list of thread messages.
|
com.azure.android.core.rest.util.paging.PagedIterable<ChatParticipant> |
listParticipants()
Gets the list of the thread participants.
|
com.azure.android.core.rest.util.paging.PagedIterable<ChatParticipant> |
listParticipants(ListParticipantsOptions listParticipantsOptions,
com.azure.android.core.util.RequestContext requestContext)
Gets the list of the thread participants.
|
com.azure.android.core.rest.util.paging.PagedIterable<ChatMessageReadReceipt> |
listReadReceipts()
Gets the list of thread read receipts.
|
com.azure.android.core.rest.util.paging.PagedIterable<ChatMessageReadReceipt> |
listReadReceipts(ListReadReceiptOptions listReadReceiptOptions,
com.azure.android.core.util.RequestContext requestContext)
Gets the list of thread read receipts.
|
void |
removeParticipant(com.azure.android.communication.common.CommunicationIdentifier identifier)
Remove a participant from a thread.
|
com.azure.android.core.rest.Response<java.lang.Void> |
removeParticipantWithResponse(com.azure.android.communication.common.CommunicationIdentifier identifier,
com.azure.android.core.util.RequestContext requestContext)
Remove a participant from a thread.
|
SendChatMessageResult |
sendMessage(SendChatMessageOptions options)
Sends a message to a thread.
|
com.azure.android.core.rest.Response<SendChatMessageResult> |
sendMessageWithResponse(SendChatMessageOptions options,
com.azure.android.core.util.RequestContext requestContext)
Sends a message to a thread.
|
void |
sendReadReceipt(java.lang.String chatMessageId)
Posts a read receipt event to a thread, on behalf of a user.
|
com.azure.android.core.rest.Response<java.lang.Void> |
sendReadReceiptWithResponse(java.lang.String chatMessageId,
com.azure.android.core.util.RequestContext requestContext)
Posts a read receipt event to a thread, on behalf of a user.
|
void |
sendTypingNotification()
Posts a typing event to a thread, on behalf of a user.
|
com.azure.android.core.rest.Response<java.lang.Void> |
sendTypingNotificationWithResponse(com.azure.android.core.util.RequestContext requestContext)
Posts a typing event to a thread, on behalf of a user.
|
com.azure.android.core.rest.Response<java.lang.Void> |
sendTypingNotificationWithResponse(TypingNotificationOptions typingNotificationOptions,
com.azure.android.core.util.RequestContext requestContext)
Posts a typing event to a thread, on behalf of a user.
|
void |
updateMessage(java.lang.String chatMessageId,
UpdateChatMessageOptions options)
Updates a message.
|
com.azure.android.core.rest.Response<java.lang.Void> |
updateMessageWithResponse(java.lang.String chatMessageId,
UpdateChatMessageOptions options,
com.azure.android.core.util.RequestContext requestContext)
Updates a message.
|
void |
updateTopic(java.lang.String topic)
Updates a thread's topic.
|
com.azure.android.core.rest.Response<java.lang.Void> |
updateTopicWithResponse(java.lang.String topic,
com.azure.android.core.util.RequestContext requestContext)
Updates a thread's topic.
|
public java.lang.String getChatThreadId()
public ChatThreadProperties getProperties()
ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<ChatThreadProperties> getPropertiesWithResponse(com.azure.android.core.util.RequestContext requestContext)
requestContext - The context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void updateTopic(java.lang.String topic)
topic - The new topic.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> updateTopicWithResponse(java.lang.String topic,
com.azure.android.core.util.RequestContext requestContext)
topic - The new topic.requestContext - The context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public AddChatParticipantsResult addParticipants(java.lang.Iterable<ChatParticipant> participants)
participants - Participants to add.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<AddChatParticipantsResult> addParticipantsWithResponse(java.lang.Iterable<ChatParticipant> participants, com.azure.android.core.util.RequestContext requestContext)
participants - Participants to add.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void addParticipant(ChatParticipant participant)
participant - The new participant.ChatErrorResponseException - if the request is rejected by server.InvalidParticipantException - if the participant is rejected by the server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> addParticipantWithResponse(ChatParticipant participant, com.azure.android.core.util.RequestContext requestContext)
participant - The new participant.requestContext - The context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.InvalidParticipantException - if the participant is rejected by the server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> removeParticipantWithResponse(com.azure.android.communication.common.CommunicationIdentifier identifier,
com.azure.android.core.util.RequestContext requestContext)
identifier - Identity of the participant to remove from the thread.requestContext - The context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void removeParticipant(com.azure.android.communication.common.CommunicationIdentifier identifier)
identifier - Identity of the thread participant to remove from the thread.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.util.paging.PagedIterable<ChatParticipant> listParticipants()
ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.util.paging.PagedIterable<ChatParticipant> listParticipants(ListParticipantsOptions listParticipantsOptions, com.azure.android.core.util.RequestContext requestContext)
listParticipantsOptions - the list options.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<SendChatMessageResult> sendMessageWithResponse(SendChatMessageOptions options, com.azure.android.core.util.RequestContext requestContext)
options - options for sending the message.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public SendChatMessageResult sendMessage(SendChatMessageOptions options)
options - options for sending the message.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<ChatMessage> getMessageWithResponse(java.lang.String chatMessageId, com.azure.android.core.util.RequestContext requestContext)
chatMessageId - the message id.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public ChatMessage getMessage(java.lang.String chatMessageId)
chatMessageId - The message id.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.util.paging.PagedIterable<ChatMessage> listMessages()
ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.util.paging.PagedIterable<ChatMessage> listMessages(ListChatMessagesOptions listMessagesOptions, com.azure.android.core.util.RequestContext requestContext)
listMessagesOptions - the list options.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> updateMessageWithResponse(java.lang.String chatMessageId,
UpdateChatMessageOptions options,
com.azure.android.core.util.RequestContext requestContext)
chatMessageId - the message id.options - options for updating the message.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void updateMessage(java.lang.String chatMessageId,
UpdateChatMessageOptions options)
chatMessageId - the message id.options - options for updating the message.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> deleteMessageWithResponse(java.lang.String chatMessageId,
com.azure.android.core.util.RequestContext requestContext)
chatMessageId - the message id.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void deleteMessage(java.lang.String chatMessageId)
chatMessageId - the message id.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> sendTypingNotificationWithResponse(com.azure.android.core.util.RequestContext requestContext)
requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void sendTypingNotification()
ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> sendTypingNotificationWithResponse(TypingNotificationOptions typingNotificationOptions, com.azure.android.core.util.RequestContext requestContext)
typingNotificationOptions - the options for sending the typing notification.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.Response<java.lang.Void> sendReadReceiptWithResponse(java.lang.String chatMessageId,
com.azure.android.core.util.RequestContext requestContext)
chatMessageId - The id of the chat message that was read.requestContext - The context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void sendReadReceipt(java.lang.String chatMessageId)
chatMessageId - The id of the chat message that was read.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.util.paging.PagedIterable<ChatMessageReadReceipt> listReadReceipts()
ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.android.core.rest.util.paging.PagedIterable<ChatMessageReadReceipt> listReadReceipts(ListReadReceiptOptions listReadReceiptOptions, com.azure.android.core.util.RequestContext requestContext)
listReadReceiptOptions - the list options.requestContext - the context to associate with this operation.ChatErrorResponseException - if the request is rejected by server.java.lang.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.