### YamlMime:JavaType uid: "com.azure.communication.chat.ChatClientBuilder" fullName: "com.azure.communication.chat.ChatClientBuilder" name: "ChatClientBuilder" nameWithType: "ChatClientBuilder" summary: "Builder for creating clients of Azure Communication Service Chat" inheritances: - "" inheritedClassMethods: - classRef: "java.lang.Object" methodsRef: - "clone" - "equals" - "finalize" - "getClass" - "hashCode" - "notify" - "notifyAll" - "toString" - "wait" - "wait" - "wait" syntax: "public final class **ChatClientBuilder**
implements <>, <>, <>" constructors: - uid: "com.azure.communication.chat.ChatClientBuilder.ChatClientBuilder()" fullName: "com.azure.communication.chat.ChatClientBuilder.ChatClientBuilder()" name: "ChatClientBuilder()" nameWithType: "ChatClientBuilder.ChatClientBuilder()" syntax: "public ChatClientBuilder()" methods: - uid: "com.azure.communication.chat.ChatClientBuilder.addPolicy(com.azure.core.http.policy.HttpPipelinePolicy)" fullName: "com.azure.communication.chat.ChatClientBuilder.addPolicy(HttpPipelinePolicy customPolicy)" name: "addPolicy(HttpPipelinePolicy customPolicy)" nameWithType: "ChatClientBuilder.addPolicy(HttpPipelinePolicy customPolicy)" summary: "Adds a to apply on each request sent." parameters: - description: "A ." name: "customPolicy" type: "" syntax: "public ChatClientBuilder addPolicy(HttpPipelinePolicy customPolicy)" desc: "Adds a to apply on each request sent.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.buildAsyncClient()" fullName: "com.azure.communication.chat.ChatClientBuilder.buildAsyncClient()" name: "buildAsyncClient()" nameWithType: "ChatClientBuilder.buildAsyncClient()" summary: "Create asynchronous chat client applying CommunicationTokenCredential, UserAgentPolicy, RetryPolicy, and CookiePolicy." syntax: "public ChatAsyncClient buildAsyncClient()" desc: "Create asynchronous chat client applying CommunicationTokenCredential, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them" returns: description: "ChatAsyncClient instance" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.buildClient()" fullName: "com.azure.communication.chat.ChatClientBuilder.buildClient()" name: "buildClient()" nameWithType: "ChatClientBuilder.buildClient()" summary: "Create synchronous chat client applying CommunicationTokenCredential, UserAgentPolicy, RetryPolicy, and CookiePolicy." syntax: "public ChatClient buildClient()" desc: "Create synchronous chat client applying CommunicationTokenCredential, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them" returns: description: "ChatClient instance" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.clientOptions(com.azure.core.util.ClientOptions)" fullName: "com.azure.communication.chat.ChatClientBuilder.clientOptions(ClientOptions clientOptions)" name: "clientOptions(ClientOptions clientOptions)" nameWithType: "ChatClientBuilder.clientOptions(ClientOptions clientOptions)" summary: "Allows for setting common properties such as application ID, headers, proxy configuration, etc." parameters: - description: "A configured instance of ." name: "clientOptions" type: "" syntax: "public ChatClientBuilder clientOptions(ClientOptions clientOptions)" desc: "Allows for setting common properties such as application ID, headers, proxy configuration, etc. Note that it is recommended that this method be called with an instance of the class (a subclass of the base class). The HttpClientOptions subclass provides more configuration options suitable for HTTP clients, which is applicable for any class that implements this HttpTrait interface.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "The updated ChatClientBuilder object." type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.configuration(com.azure.core.util.Configuration)" fullName: "com.azure.communication.chat.ChatClientBuilder.configuration(Configuration configuration)" name: "configuration(Configuration configuration)" nameWithType: "ChatClientBuilder.configuration(Configuration configuration)" summary: "Sets the configuration object used to retrieve environment configuration values during building of the client." parameters: - description: "Configuration store used to retrieve environment configurations." name: "configuration" type: "" syntax: "public ChatClientBuilder configuration(Configuration configuration)" desc: "Sets the configuration object used to retrieve environment configuration values during building of the client." returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.credential(com.azure.communication.common.CommunicationTokenCredential)" fullName: "com.azure.communication.chat.ChatClientBuilder.credential(CommunicationTokenCredential communicationTokenCredential)" name: "credential(CommunicationTokenCredential communicationTokenCredential)" nameWithType: "ChatClientBuilder.credential(CommunicationTokenCredential communicationTokenCredential)" summary: "Set a token credential for authorization" parameters: - description: "valid token credential as a string" name: "communicationTokenCredential" type: "" syntax: "public ChatClientBuilder credential(CommunicationTokenCredential communicationTokenCredential)" desc: "Set a token credential for authorization" returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.endpoint(java.lang.String)" fullName: "com.azure.communication.chat.ChatClientBuilder.endpoint(String endpoint)" name: "endpoint(String endpoint)" nameWithType: "ChatClientBuilder.endpoint(String endpoint)" summary: "Set endpoint of the service" parameters: - description: "url of the service" name: "endpoint" type: "String" syntax: "public ChatClientBuilder endpoint(String endpoint)" desc: "Set endpoint of the service" returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.httpClient(com.azure.core.http.HttpClient)" fullName: "com.azure.communication.chat.ChatClientBuilder.httpClient(HttpClient httpClient)" name: "httpClient(HttpClient httpClient)" nameWithType: "ChatClientBuilder.httpClient(HttpClient httpClient)" summary: "Sets the to use for sending and receiving requests to and from the service." parameters: - description: "The to use for requests." name: "httpClient" type: "" syntax: "public ChatClientBuilder httpClient(HttpClient httpClient)" desc: "Sets the to use for sending and receiving requests to and from the service.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.httpLogOptions(com.azure.core.http.policy.HttpLogOptions)" fullName: "com.azure.communication.chat.ChatClientBuilder.httpLogOptions(HttpLogOptions logOptions)" name: "httpLogOptions(HttpLogOptions logOptions)" nameWithType: "ChatClientBuilder.httpLogOptions(HttpLogOptions logOptions)" summary: "Sets the to use when sending and receiving requests to and from the service." parameters: - description: "The to use when sending and receiving requests to\n and from the service." name: "logOptions" type: "" syntax: "public ChatClientBuilder httpLogOptions(HttpLogOptions logOptions)" desc: "Sets the to use when sending and receiving requests to and from the service. If a `logLevel` is not provided, default value of is set.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.pipeline(com.azure.core.http.HttpPipeline)" fullName: "com.azure.communication.chat.ChatClientBuilder.pipeline(HttpPipeline httpPipeline)" name: "pipeline(HttpPipeline httpPipeline)" nameWithType: "ChatClientBuilder.pipeline(HttpPipeline httpPipeline)" summary: "Sets the to use for the service client." parameters: - description: " to use for sending service requests and receiving responses." name: "httpPipeline" type: "" syntax: "public ChatClientBuilder pipeline(HttpPipeline httpPipeline)" desc: "Sets the to use for the service client.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.\n\nIf `pipeline` is set, all other settings are ignored, aside from ." returns: description: "the updated ChatClientBuilder object" type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.retryOptions(com.azure.core.http.policy.RetryOptions)" fullName: "com.azure.communication.chat.ChatClientBuilder.retryOptions(RetryOptions retryOptions)" name: "retryOptions(RetryOptions retryOptions)" nameWithType: "ChatClientBuilder.retryOptions(RetryOptions retryOptions)" summary: "Sets the for all the requests made through the client." parameters: - description: "The to use for all the requests made through the client." name: "retryOptions" type: "" syntax: "public ChatClientBuilder retryOptions(RetryOptions retryOptions)" desc: "Sets the for all the requests made through the client.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.\n\nSetting this is mutually exclusive with using ." returns: description: "The updated ChatClientBuilder object." type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.retryPolicy(com.azure.core.http.policy.RetryPolicy)" fullName: "com.azure.communication.chat.ChatClientBuilder.retryPolicy(RetryPolicy retryPolicy)" name: "retryPolicy(RetryPolicy retryPolicy)" nameWithType: "ChatClientBuilder.retryPolicy(RetryPolicy retryPolicy)" summary: "Sets the that will attempt to retry requests when needed." parameters: - description: "The that will attempt to retry requests when needed." name: "retryPolicy" type: "" syntax: "public ChatClientBuilder retryPolicy(RetryPolicy retryPolicy)" desc: "Sets the that will attempt to retry requests when needed.\n\nA default retry policy will be supplied if one isn't provided.\n\nSetting this is mutually exclusive with using ." returns: description: "The updated ChatClientBuilder object." type: "" - uid: "com.azure.communication.chat.ChatClientBuilder.serviceVersion(com.azure.communication.chat.ChatServiceVersion)" fullName: "com.azure.communication.chat.ChatClientBuilder.serviceVersion(ChatServiceVersion version)" name: "serviceVersion(ChatServiceVersion version)" nameWithType: "ChatClientBuilder.serviceVersion(ChatServiceVersion version)" summary: "Sets the that is used when making API requests." parameters: - description: " of the service to be used when making requests." name: "version" type: "" syntax: "public ChatClientBuilder serviceVersion(ChatServiceVersion version)" desc: "Sets the that is used when making API requests.\n\nIf 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.\n\nTargeting a specific service version may also mean that the service will return an error for newer APIs." returns: description: "the updated ChatClientBuilder object" type: "" type: "class" desc: "Builder for creating clients of Azure Communication Service Chat" implements: - "<>" - "<>" - "<>" metadata: {} package: "com.azure.communication.chat" artifact: com.azure:azure-communication-chat:1.5.4