public final class ChatThreadAsyncClient
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
addParticipant(ChatParticipant participant)
Adds a participant to a thread.
|
java9.util.concurrent.CompletableFuture<AddChatParticipantsResult> |
addParticipants(java.lang.Iterable<ChatParticipant> participants)
Adds participants to a thread.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
deleteMessage(java.lang.String chatMessageId)
Deletes a message.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<ChatMessage> |
getMessage(java.lang.String chatMessageId)
Gets a message by id.
|
java9.util.concurrent.CompletableFuture<com.azure.android.core.rest.Response<ChatMessage>> |
getMessageWithResponse(java.lang.String chatMessageId,
com.azure.android.core.util.RequestContext requestContext)
Gets a message by id.
|
java9.util.concurrent.CompletableFuture<ChatThreadProperties> |
getProperties()
Gets chat thread properties.
|
java9.util.concurrent.CompletableFuture<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.PagedAsyncStream<ChatMessage> |
listMessages()
Gets the list of thread messages.
|
com.azure.android.core.rest.util.paging.PagedAsyncStream<ChatMessage> |
listMessages(ListChatMessagesOptions listMessagesOptions,
com.azure.android.core.util.RequestContext requestContext)
Gets the list of thread messages.
|
com.azure.android.core.rest.util.paging.PagedAsyncStream<ChatParticipant> |
listParticipants()
Gets the list of the thread participants.
|
com.azure.android.core.rest.util.paging.PagedAsyncStream<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.PagedAsyncStream<ChatMessageReadReceipt> |
listReadReceipts()
Gets the list of thread read receipts.
|
com.azure.android.core.rest.util.paging.PagedAsyncStream<ChatMessageReadReceipt> |
listReadReceipts(ListReadReceiptOptions listReadReceiptOptions,
com.azure.android.core.util.RequestContext requestContext)
Gets the list of thread read receipts.
|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
removeParticipant(com.azure.android.communication.common.CommunicationIdentifier identifier)
Remove a participant from a thread.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<SendChatMessageResult> |
sendMessage(SendChatMessageOptions options)
Sends a message to a thread.
|
java9.util.concurrent.CompletableFuture<com.azure.android.core.rest.Response<SendChatMessageResult>> |
sendMessageWithResponse(SendChatMessageOptions options,
com.azure.android.core.util.RequestContext requestContext)
Sends a message to a thread.
|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
sendReadReceipt(java.lang.String chatMessageId)
Posts a read receipt event to a thread, on behalf of a user.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
sendTypingNotification()
Posts a typing event to a thread, on behalf of a user.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
updateMessage(java.lang.String chatMessageId,
UpdateChatMessageOptions options)
Updates a message.
|
java9.util.concurrent.CompletableFuture<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.
|
java9.util.concurrent.CompletableFuture<java.lang.Void> |
updateTopic(java.lang.String topic)
Updates a thread's topic.
|
java9.util.concurrent.CompletableFuture<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 java9.util.concurrent.CompletableFuture<java.lang.Void> updateTopic(java.lang.String topic)
topic
- The new topic.CompletableFuture
that signals the update result.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the update request.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<ChatThreadProperties> getProperties()
CompletableFuture
that emits the thread properties.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<com.azure.android.core.rest.Response<ChatThreadProperties>> getPropertiesWithResponse(com.azure.android.core.util.RequestContext requestContext)
requestContext
- The context to associate with this operation.CompletableFuture
that emits the response containing the thread properties.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<AddChatParticipantsResult> addParticipants(java.lang.Iterable<ChatParticipant> participants)
participants
- Participants to add.CompletableFuture
that signals the operation result.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response containing the operation result.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<java.lang.Void> addParticipant(ChatParticipant participant)
participant
- The new participant.CompletableFuture
that signals the operation result.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 java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response containing the operation result.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 java9.util.concurrent.CompletableFuture<java.lang.Void> removeParticipant(com.azure.android.communication.common.CommunicationIdentifier identifier)
identifier
- identity of the participant to remove from the thread.CompletableFuture
that signals the operation result.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the remove request.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.PagedAsyncStream<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.PagedAsyncStream<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 java9.util.concurrent.CompletableFuture<SendChatMessageResult> sendMessage(SendChatMessageOptions options)
options
- Options for sending the message.CompletableFuture
that emits the id of 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 java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits the response containing the id of 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 java9.util.concurrent.CompletableFuture<ChatMessage> getMessage(java.lang.String chatMessageId)
chatMessageId
- The message id.CompletableFuture
that emits the 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 java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits the response containing 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.util.paging.PagedAsyncStream<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.PagedAsyncStream<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 java9.util.concurrent.CompletableFuture<java.lang.Void> updateMessage(java.lang.String chatMessageId, UpdateChatMessageOptions options)
chatMessageId
- the message id.options
- options for updating the message.CompletableFuture
that signals the update result.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the update request.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<java.lang.Void> deleteMessage(java.lang.String chatMessageId)
chatMessageId
- the message id.CompletableFuture
that signals the result of deletion.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the delete request.ChatErrorResponseException
- if the request is rejected by server.java.lang.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public java9.util.concurrent.CompletableFuture<java.lang.Void> sendTypingNotification()
CompletableFuture
that signals the result of the 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 java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the 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 java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the 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 java9.util.concurrent.CompletableFuture<java.lang.Void> sendReadReceipt(java.lang.String chatMessageId)
chatMessageId
- the id of the chat message that was read.CompletableFuture
that signals the result of the 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 java9.util.concurrent.CompletableFuture<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.CompletableFuture
that emits response of the 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.util.paging.PagedAsyncStream<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.PagedAsyncStream<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.