public final class ChatThreadClientBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ChatThreadClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ChatThreadClientBuilder |
addPolicy(com.azure.android.core.http.HttpPipelinePolicy pipelinePolicy)
Apply additional
HttpPipelinePolicy |
ChatThreadAsyncClient |
buildAsyncClient()
Create asynchronous chat thread client applying CommunicationTokenCredential, UserAgentPolicy,
RetryPolicy, and CookiePolicy.
|
ChatThreadClient |
buildClient()
Create synchronous chat thread client applying CommunicationTokenCredential, UserAgentPolicy,
RetryPolicy, and CookiePolicy.
|
ChatThreadClientBuilder |
chatThreadId(java.lang.String chatThreadId)
Sets the ChatThreadId used to construct a client for this chat thread.
|
ChatThreadClientBuilder |
credential(com.azure.android.communication.common.CommunicationTokenCredential communicationTokenCredential)
Set a token credential for authorization
|
ChatThreadClientBuilder |
endpoint(java.lang.String endpoint)
Set endpoint of the service
|
ChatThreadClientBuilder |
httpClient(com.azure.android.core.http.HttpClient httpClient)
Set HttpClient to use
|
ChatThreadClientBuilder |
httpLogOptions(com.azure.android.core.http.policy.HttpLogOptions logOptions)
Sets the
HttpLogOptions for service requests. |
ChatThreadClientBuilder |
pipeline(com.azure.android.core.http.HttpPipeline httpPipeline)
Sets the
HttpPipeline to use for the service client. |
ChatThreadClientBuilder |
retryPolicy(com.azure.android.core.http.policy.RetryPolicy retryPolicy)
Sets the
RetryPolicy that will attempt to retry failed requests, if applicable. |
ChatThreadClientBuilder |
serviceVersion(ChatServiceVersion serviceVersion)
Sets the
ChatServiceVersion that is used when making API requests. |
public ChatThreadClientBuilder endpoint(java.lang.String endpoint)
endpoint - url of the serviceChatThreadClientBuilder objectjava.lang.NullPointerException - if endpoint is null.public ChatThreadClientBuilder httpClient(com.azure.android.core.http.HttpClient httpClient)
httpClient - HttpClient to useChatThreadClientBuilder objectjava.lang.NullPointerException - if httpClient is null.public ChatThreadClientBuilder credential(com.azure.android.communication.common.CommunicationTokenCredential communicationTokenCredential)
communicationTokenCredential - valid token credential as a stringChatThreadClientBuilder objectjava.lang.NullPointerException - if communicationTokenCredential is null.public ChatThreadClientBuilder addPolicy(com.azure.android.core.http.HttpPipelinePolicy pipelinePolicy)
HttpPipelinePolicypipelinePolicy - HttpPipelinePolicy objects to be applied after
AzureKeyCredentialPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicyChatThreadClientBuilder objectjava.lang.NullPointerException - if pipelinePolicy is null.public ChatThreadClientBuilder retryPolicy(com.azure.android.core.http.policy.RetryPolicy retryPolicy)
RetryPolicy that will attempt to retry failed requests, if applicable.retryPolicy - the retryPolicy value.ChatThreadClientBuilder object.java.lang.NullPointerException - if retryPolicy is null.public ChatThreadClientBuilder httpLogOptions(com.azure.android.core.http.policy.HttpLogOptions logOptions)
HttpLogOptions for service requests.logOptions - The logging configuration to use when sending and receiving HTTP requests/responses.ChatThreadClientBuilder objectjava.lang.NullPointerException - if logOptions is null.public ChatThreadClientBuilder serviceVersion(ChatServiceVersion serviceVersion)
ChatServiceVersion that is used when making API requests.
If a service version is not provided, the service version that will be used will be the latest known service version based on the version of the client library being used. If no service version is specified, updating to a newer version of the client library will have the result of potentially moving to a newer service version.
Targeting a specific service version may also mean that the service will return an error for newer APIs.
serviceVersion - ChatServiceVersion of the service to be used when making requests.ChatThreadClientBuilder object.public ChatThreadClientBuilder pipeline(com.azure.android.core.http.HttpPipeline httpPipeline)
HttpPipeline to use for the service client.
If pipeline is set, all other settings are ignored, aside from endpoint.httpPipeline - HttpPipeline to use for sending service requests and receiving responses.ChatThreadClientBuilder object.public ChatThreadClientBuilder chatThreadId(java.lang.String chatThreadId)
chatThreadId - The id of the chat thread.ChatThreadClientBuilder object.public ChatThreadClient buildClient()
ChatThreadClient instance.java.lang.NullPointerException - if chatThreadId, endpoint or communicationTokenCredential is not set.public ChatThreadAsyncClient buildAsyncClient()
ChatThreadAsyncClient instance.java.lang.NullPointerException - if chatThreadId, endpoint or communicationTokenCredential is not set.