130 строки
11 KiB
YAML
130 строки
11 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.communication.chat.ChatClient"
|
|
fullName: "com.azure.communication.chat.ChatClient"
|
|
name: "ChatClient"
|
|
nameWithType: "ChatClient"
|
|
summary: "Sync Client that supports chat operations."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public final class **ChatClient**"
|
|
methods:
|
|
- uid: "com.azure.communication.chat.ChatClient.createChatThread(com.azure.communication.chat.models.CreateChatThreadOptions)"
|
|
fullName: "com.azure.communication.chat.ChatClient.createChatThread(CreateChatThreadOptions options)"
|
|
name: "createChatThread(CreateChatThreadOptions options)"
|
|
nameWithType: "ChatClient.createChatThread(CreateChatThreadOptions options)"
|
|
summary: "Creates a chat thread."
|
|
parameters:
|
|
- description: "Options for creating a chat thread."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.communication.chat.models.CreateChatThreadOptions?alt=com.azure.communication.chat.models.CreateChatThreadOptions&text=CreateChatThreadOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CreateChatThreadResult createChatThread(CreateChatThreadOptions options)"
|
|
desc: "Creates a chat thread.\n\n**Code Samples**\n\nCreate a chat thread based on \"options\".\n\n```java\n// Initialize the list of chat thread participants\n List<ChatParticipant> participants = new ArrayList<ChatParticipant>();\n\n ChatParticipant firstParticipant = new ChatParticipant()\n .setCommunicationIdentifier(user1)\n .setDisplayName(\"Participant Display Name 1\");\n\n ChatParticipant secondParticipant = new ChatParticipant()\n .setCommunicationIdentifier(user2)\n .setDisplayName(\"Participant Display Name 2\");\n\n participants.add(firstParticipant);\n participants.add(secondParticipant);\n\n // Create the chat thread\n CreateChatThreadOptions createChatThreadOptions = new CreateChatThreadOptions(\"Topic\")\n .setParticipants(participants);\n CreateChatThreadResult result = chatClient.createChatThread(createChatThreadOptions);\n\n // Retrieve the chat thread and the id\n ChatThreadProperties chatThread = result.getChatThread();\n String chatThreadId = chatThread.getId();\n```"
|
|
returns:
|
|
description: "the response."
|
|
type: "<xref href=\"com.azure.communication.chat.models.CreateChatThreadResult?alt=com.azure.communication.chat.models.CreateChatThreadResult&text=CreateChatThreadResult\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.communication.chat.ChatClient.createChatThreadWithResponse(com.azure.communication.chat.models.CreateChatThreadOptions,com.azure.core.util.Context)"
|
|
fullName: "com.azure.communication.chat.ChatClient.createChatThreadWithResponse(CreateChatThreadOptions options, Context context)"
|
|
name: "createChatThreadWithResponse(CreateChatThreadOptions options, Context context)"
|
|
nameWithType: "ChatClient.createChatThreadWithResponse(CreateChatThreadOptions options, Context context)"
|
|
summary: "Creates a chat thread."
|
|
parameters:
|
|
- description: "Options for creating a chat thread."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.communication.chat.models.CreateChatThreadOptions?alt=com.azure.communication.chat.models.CreateChatThreadOptions&text=CreateChatThreadOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The context to associate with this operation."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<CreateChatThreadResult> createChatThreadWithResponse(CreateChatThreadOptions options, Context context)"
|
|
desc: "Creates a chat thread."
|
|
returns:
|
|
description: "the response."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.communication.chat.models.CreateChatThreadResult?alt=com.azure.communication.chat.models.CreateChatThreadResult&text=CreateChatThreadResult\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.communication.chat.ChatClient.deleteChatThread(java.lang.String)"
|
|
fullName: "com.azure.communication.chat.ChatClient.deleteChatThread(String chatThreadId)"
|
|
name: "deleteChatThread(String chatThreadId)"
|
|
nameWithType: "ChatClient.deleteChatThread(String chatThreadId)"
|
|
summary: "Deletes a chat thread."
|
|
parameters:
|
|
- description: "Chat thread id to delete."
|
|
name: "chatThreadId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public void deleteChatThread(String chatThreadId)"
|
|
desc: "Deletes a chat thread."
|
|
- uid: "com.azure.communication.chat.ChatClient.deleteChatThreadWithResponse(java.lang.String,com.azure.core.util.Context)"
|
|
fullName: "com.azure.communication.chat.ChatClient.deleteChatThreadWithResponse(String chatThreadId, Context context)"
|
|
name: "deleteChatThreadWithResponse(String chatThreadId, Context context)"
|
|
nameWithType: "ChatClient.deleteChatThreadWithResponse(String chatThreadId, Context context)"
|
|
summary: "Deletes a chat thread."
|
|
parameters:
|
|
- description: "Chat thread id to delete."
|
|
name: "chatThreadId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The context to associate with this operation."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> deleteChatThreadWithResponse(String chatThreadId, Context context)"
|
|
desc: "Deletes a chat thread."
|
|
returns:
|
|
description: "the completion."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.communication.chat.ChatClient.getChatThreadClient(java.lang.String)"
|
|
fullName: "com.azure.communication.chat.ChatClient.getChatThreadClient(String chatThreadId)"
|
|
name: "getChatThreadClient(String chatThreadId)"
|
|
nameWithType: "ChatClient.getChatThreadClient(String chatThreadId)"
|
|
summary: "Creates a chat thread client."
|
|
parameters:
|
|
- description: "The id of the chat thread."
|
|
name: "chatThreadId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public ChatThreadClient getChatThreadClient(String chatThreadId)"
|
|
desc: "Creates a chat thread client."
|
|
returns:
|
|
description: "the client."
|
|
type: "<xref href=\"com.azure.communication.chat.ChatThreadClient?alt=com.azure.communication.chat.ChatThreadClient&text=ChatThreadClient\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.communication.chat.ChatClient.listChatThreads()"
|
|
fullName: "com.azure.communication.chat.ChatClient.listChatThreads()"
|
|
name: "listChatThreads()"
|
|
nameWithType: "ChatClient.listChatThreads()"
|
|
summary: "Gets the list of chat threads of a user."
|
|
syntax: "public PagedIterable<ChatThreadItem> listChatThreads()"
|
|
desc: "Gets the list of chat threads of a user."
|
|
returns:
|
|
description: "the paged list of chat threads of a user."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.communication.chat.models.ChatThreadItem?alt=com.azure.communication.chat.models.ChatThreadItem&text=ChatThreadItem\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.communication.chat.ChatClient.listChatThreads(com.azure.communication.chat.models.ListChatThreadsOptions,com.azure.core.util.Context)"
|
|
fullName: "com.azure.communication.chat.ChatClient.listChatThreads(ListChatThreadsOptions listThreadsOptions, Context context)"
|
|
name: "listChatThreads(ListChatThreadsOptions listThreadsOptions, Context context)"
|
|
nameWithType: "ChatClient.listChatThreads(ListChatThreadsOptions listThreadsOptions, Context context)"
|
|
summary: "Gets the list of chat threads of a user."
|
|
parameters:
|
|
- description: "The request options."
|
|
name: "listThreadsOptions"
|
|
type: "<xref href=\"com.azure.communication.chat.models.ListChatThreadsOptions?alt=com.azure.communication.chat.models.ListChatThreadsOptions&text=ListChatThreadsOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The context to associate with this operation."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public PagedIterable<ChatThreadItem> listChatThreads(ListChatThreadsOptions listThreadsOptions, Context context)"
|
|
desc: "Gets the list of chat threads of a user."
|
|
returns:
|
|
description: "the paged list of chat threads of a user."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.communication.chat.models.ChatThreadItem?alt=com.azure.communication.chat.models.ChatThreadItem&text=ChatThreadItem\" data-throw-if-not-resolved=\"False\" />>"
|
|
type: "class"
|
|
desc: "Sync Client that supports chat operations.\n\n**Instantiating a synchronous Chat Client**\n\n```java\n// Initialize the chat client builder\n final ChatClientBuilder builder = new ChatClientBuilder()\n .endpoint(endpoint)\n .credential(credential);\n\n // Build the chat client\n ChatClient chatClient = builder.buildClient();\n```\n\nView <xref uid=\"com.azure.communication.chat.ChatClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"this\"></xref> for additional ways to construct the client."
|
|
metadata: {}
|
|
package: "com.azure.communication.chat"
|
|
artifact: com.azure:azure-communication-chat:1.5.4
|