Source:
<code>public FormRecognizerAsyncClient buildAsyncClient() { final Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; final FormRecognizerServiceVersion serviceVersion = version != null ? version : FormRecognizerServiceVersion.getLatest(); <START> Objects.requireNonNull(endpoint, "'Endpoint' is required and can not be null."); <END> HttpPipeline pipeline = httpPipeline; if (pipeline == null) { final List<HttpPipelinePolicy> policies = new ArrayList<>(); if (credential != null) { policies.add(new AzureKeyCredentialPolicy(OCP_APIM_SUBSCRIPTION_KEY, credential)); } else { throw logger.logExceptionAsError( new IllegalArgumentException("Missing credential information while building a client.")); } policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersPolicy(headers)); policies.add(new AddDatePolicy()); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy == null ? DEFAULT_RETRY_POLICY : retryPolicy); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); } final FormRecognizerClientImpl formRecognizerAPI = new FormRecognizerClientImplBuilder() .endpoint(endpoint) .pipeline(pipeline) .build(); return new FormRecognizerAsyncClient(formRecognizerAPI, serviceVersion); }</code><technical_language>move this other work</technical_language>

Target:
public FormRecognizerAsyncClient buildAsyncClient() { Objects.requireNonNull(endpoint, "'Endpoint' is required and can not be null."); final Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; final FormRecognizerServiceVersion serviceVersion = version != null ? version : FormRecognizerServiceVersion.getLatest(); HttpPipeline pipeline = httpPipeline; if (pipeline == null) { final List<HttpPipelinePolicy> policies = new ArrayList<>(); policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersPolicy(headers)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy == null ? DEFAULT_RETRY_POLICY : retryPolicy); policies.add(new AddDatePolicy()); if (credential != null) { policies.add(new AzureKeyCredentialPolicy(OCP_APIM_SUBSCRIPTION_KEY, credential)); } else { throw logger.logExceptionAsError( new IllegalArgumentException("Missing credential information while building a client.")); } policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); } final FormRecognizerClientImpl formRecognizerAPI = new FormRecognizerClientImplBuilder() .endpoint(endpoint) .pipeline(pipeline) .build(); return new FormRecognizerAsyncClient(formRecognizerAPI, serviceVersion); }