### YamlMime:JavaType uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder" name: "FormRecognizerClientBuilder" nameWithType: "FormRecognizerClientBuilder" summary: "This class provides a fluent builder API to help instantiation of and , call buildClient\\} and respectively to construct an instance of the desired client." inheritances: - "" inheritedClassMethods: - classRef: "java.lang.Object" methodsRef: - "clone" - "equals" - "finalize" - "getClass" - "hashCode" - "notify" - "notifyAll" - "toString" - "wait" - "wait" - "wait" syntax: "public final class **FormRecognizerClientBuilder**
implements <>, <>, <>, <>, <>" constructors: - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.FormRecognizerClientBuilder()" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.FormRecognizerClientBuilder()" name: "FormRecognizerClientBuilder()" nameWithType: "FormRecognizerClientBuilder.FormRecognizerClientBuilder()" summary: "Constructs a object." syntax: "public FormRecognizerClientBuilder()" desc: "Constructs a object." methods: - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.addPolicy(com.azure.core.http.policy.HttpPipelinePolicy)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.addPolicy(HttpPipelinePolicy policy)" name: "addPolicy(HttpPipelinePolicy policy)" nameWithType: "FormRecognizerClientBuilder.addPolicy(HttpPipelinePolicy policy)" summary: "Adds a to apply on each request sent." parameters: - description: "A ." name: "policy" type: "" syntax: "public FormRecognizerClientBuilder addPolicy(HttpPipelinePolicy policy)" 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 FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.audience(com.azure.ai.formrecognizer.models.FormRecognizerAudience)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.audience(FormRecognizerAudience audience)" name: "audience(FormRecognizerAudience audience)" nameWithType: "FormRecognizerClientBuilder.audience(FormRecognizerAudience audience)" summary: "Sets the audience for the Azure Form Recognizer service." parameters: - description: "ARM management audience associated with the given form recognizer resource." name: "audience" type: "" syntax: "public FormRecognizerClientBuilder audience(FormRecognizerAudience audience)" desc: "Sets the audience for the Azure Form Recognizer service. The default audience is when unset." returns: description: "The updated object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.buildAsyncClient()" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.buildAsyncClient()" name: "buildAsyncClient()" nameWithType: "FormRecognizerClientBuilder.buildAsyncClient()" summary: "Creates a based on options set in the builder." syntax: "public FormRecognizerAsyncClient buildAsyncClient()" desc: "Creates a based on options set in the builder. Every time `buildAsyncClient()` is called a new instance of is created.\n\nIf is set, then the `pipeline` and are used to create the . All other builder settings are ignored." returns: description: "A FormRecognizerAsyncClient with the options set from the builder." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.buildClient()" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.buildClient()" name: "buildClient()" nameWithType: "FormRecognizerClientBuilder.buildClient()" summary: "Creates a based on options set in the builder." syntax: "public FormRecognizerClient buildClient()" desc: "Creates a based on options set in the builder. Every time `buildClient()` is called a new instance of is created.\n\nIf is set, then the `pipeline` and are used to create the . All other builder settings are ignored." returns: description: "A FormRecognizerClient with the options set from the builder." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.clientOptions(com.azure.core.util.ClientOptions)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.clientOptions(ClientOptions clientOptions)" name: "clientOptions(ClientOptions clientOptions)" nameWithType: "FormRecognizerClientBuilder.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 FormRecognizerClientBuilder 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 FormRecognizerClientBuilder object.\n " type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.configuration(com.azure.core.util.Configuration)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.configuration(Configuration configuration)" name: "configuration(Configuration configuration)" nameWithType: "FormRecognizerClientBuilder.configuration(Configuration configuration)" summary: "Sets the configuration store that is used during construction of the service client." parameters: - description: "The configuration store used to." name: "configuration" type: "" syntax: "public FormRecognizerClientBuilder configuration(Configuration configuration)" desc: "Sets the configuration store that is used during construction of the service client.\n\nThe default configuration store is a clone of the , use to bypass using configuration settings during construction." returns: description: "The updated FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.credential(com.azure.core.credential.AzureKeyCredential)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.credential(AzureKeyCredential azureKeyCredential)" name: "credential(AzureKeyCredential azureKeyCredential)" nameWithType: "FormRecognizerClientBuilder.credential(AzureKeyCredential azureKeyCredential)" summary: "Sets the to use when authenticating HTTP requests for this FormRecognizerClientBuilder." parameters: - description: " API key credential" name: "azureKeyCredential" type: "" syntax: "public FormRecognizerClientBuilder credential(AzureKeyCredential azureKeyCredential)" desc: "Sets the to use when authenticating HTTP requests for this FormRecognizerClientBuilder." returns: description: "The updated FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.credential(com.azure.core.credential.TokenCredential)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.credential(TokenCredential tokenCredential)" name: "credential(TokenCredential tokenCredential)" nameWithType: "FormRecognizerClientBuilder.credential(TokenCredential tokenCredential)" summary: "Sets the used to authorize requests sent to the service." parameters: - description: " used to authorize requests sent to the service." name: "tokenCredential" type: "" syntax: "public FormRecognizerClientBuilder credential(TokenCredential tokenCredential)" desc: "Sets the used to authorize requests sent to the service. Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity" returns: description: "The updated object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.endpoint(java.lang.String)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.endpoint(String endpoint)" name: "endpoint(String endpoint)" nameWithType: "FormRecognizerClientBuilder.endpoint(String endpoint)" summary: "Sets the service endpoint for the Azure Form Recognizer instance." parameters: - description: "The URL of the Azure Form Recognizer instance service requests to and receive responses from." name: "endpoint" type: "String" syntax: "public FormRecognizerClientBuilder endpoint(String endpoint)" desc: "Sets the service endpoint for the Azure Form Recognizer instance." returns: description: "The updated FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.getDefaultLogOptions()" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.getDefaultLogOptions()" name: "getDefaultLogOptions()" nameWithType: "FormRecognizerClientBuilder.getDefaultLogOptions()" summary: "Gets the default Azure Form Recognizer client headers and query parameters that are logged by default if HTTP logging is enabled." modifiers: - "static" syntax: "public static HttpLogOptions getDefaultLogOptions()" desc: "Gets the default Azure Form Recognizer client headers and query parameters that are logged by default if HTTP logging is enabled." returns: description: "The default allow list." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.httpClient(com.azure.core.http.HttpClient)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.httpClient(HttpClient client)" name: "httpClient(HttpClient client)" nameWithType: "FormRecognizerClientBuilder.httpClient(HttpClient client)" summary: "Sets the to use for sending and receiving requests to and from the service." parameters: - description: "The to use for requests." name: "client" type: "" syntax: "public FormRecognizerClientBuilder httpClient(HttpClient client)" 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 FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.httpLogOptions(com.azure.core.http.policy.HttpLogOptions)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.httpLogOptions(HttpLogOptions logOptions)" name: "httpLogOptions(HttpLogOptions logOptions)" nameWithType: "FormRecognizerClientBuilder.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 FormRecognizerClientBuilder 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 FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.pipeline(com.azure.core.http.HttpPipeline)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.pipeline(HttpPipeline httpPipeline)" name: "pipeline(HttpPipeline httpPipeline)" nameWithType: "FormRecognizerClientBuilder.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 FormRecognizerClientBuilder 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 to build or ." returns: description: "The updated FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.retryOptions(com.azure.core.http.policy.RetryOptions)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.retryOptions(RetryOptions retryOptions)" name: "retryOptions(RetryOptions retryOptions)" nameWithType: "FormRecognizerClientBuilder.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 FormRecognizerClientBuilder 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 DocumentModelAdministrationClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.retryPolicy(com.azure.core.http.policy.RetryPolicy)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.retryPolicy(RetryPolicy retryPolicy)" name: "retryPolicy(RetryPolicy retryPolicy)" nameWithType: "FormRecognizerClientBuilder.retryPolicy(RetryPolicy retryPolicy)" summary: "Sets the that is used when each request is sent." parameters: - description: "user's retry policy applied to each request." name: "retryPolicy" type: "" syntax: "public FormRecognizerClientBuilder retryPolicy(RetryPolicy retryPolicy)" desc: "Sets the that is used when each request is sent.\n\nThe default retry policy will be used if not provided to build or .\n\nSetting this is mutually exclusive with using ." returns: description: "The updated FormRecognizerClientBuilder object." type: "" - uid: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.serviceVersion(com.azure.ai.formrecognizer.FormRecognizerServiceVersion)" fullName: "com.azure.ai.formrecognizer.FormRecognizerClientBuilder.serviceVersion(FormRecognizerServiceVersion version)" name: "serviceVersion(FormRecognizerServiceVersion version)" nameWithType: "FormRecognizerClientBuilder.serviceVersion(FormRecognizerServiceVersion 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 FormRecognizerClientBuilder serviceVersion(FormRecognizerServiceVersion 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 the client library will have the result of potentially moving to a newer service version." returns: description: "The updated FormRecognizerClientBuilder object." type: "" type: "class" desc: "This class provides a fluent builder API to help instantiation of and , call buildClient\\} and respectively to construct an instance of the desired client.\n\nThe client needs the service endpoint of the Azure Form Recognizer to access the resource service. or gives the builder access credential.\n\n**Instantiating an asynchronous Form Recognizer Client**\n\n```java\nFormRecognizerAsyncClient formRecognizerAsyncClient = new FormRecognizerClientBuilder()\n .credential(new AzureKeyCredential(\"{key}\"))\n .endpoint(\"{endpoint}\")\n .buildAsyncClient();\n```\n\n**Instantiating a synchronous Form Recognizer Client**\n\n```java\nFormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder()\n .credential(new AzureKeyCredential(\"{key}\"))\n .endpoint(\"{endpoint}\")\n .buildClient();\n```\n\nAnother way to construct the client is using a . The pipeline gives the client an authenticated way to communicate with the service. Set the pipeline with and set the service endpoint with . Using a pipeline requires additional setup but allows for finer control on how the and is built.\n\n```java\nHttpPipeline pipeline = new HttpPipelineBuilder()\n .policies(/* add policies */)\n .build();\n\n FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder()\n .credential(new AzureKeyCredential(\"{key}\"))\n .endpoint(\"{endpoint}\")\n .pipeline(pipeline)\n .buildClient();\n```" implements: - "<>" - "<>" - "<>" - "<>" - "<>" metadata: {} package: "com.azure.ai.formrecognizer" artifact: com.azure:azure-ai-formrecognizer:4.1.11