This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * List requests = new ArrayList<>();
- * BatchProcessDocumentsResponse response =
- * documentUnderstandingServiceClient.batchProcessDocumentsAsync(requests).get();
- * }
- * }
- *
- * Note: close() needs to be called on the DocumentUnderstandingServiceClient object to clean up - * resources such as threads. In the example above, try-with-resources is used, which automatically - * calls close(). - * - *
| Method | - *Description | - *Method Variants | - *
|---|---|---|
BatchProcessDocuments |
- * LRO endpoint to batch process many documents. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
See the individual methods for example code. - * - *
Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *
This class can be customized by passing in a custom instance of - * DocumentUnderstandingServiceSettings to create(). For example: - * - *
To customize credentials: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
- * DocumentUnderstandingServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create(documentUnderstandingServiceSettings);
- * }
- *
- * To customize the endpoint: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
- * DocumentUnderstandingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create(documentUnderstandingServiceSettings);
- * }
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class DocumentUnderstandingServiceClient implements BackgroundResource { - private final DocumentUnderstandingServiceSettings settings; - private final DocumentUnderstandingServiceStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of DocumentUnderstandingServiceClient with default settings. */ - public static final DocumentUnderstandingServiceClient create() throws IOException { - return create(DocumentUnderstandingServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of DocumentUnderstandingServiceClient, using the given settings. The - * channels are created based on the settings passed in, or defaults for any settings that are not - * set. - */ - public static final DocumentUnderstandingServiceClient create( - DocumentUnderstandingServiceSettings settings) throws IOException { - return new DocumentUnderstandingServiceClient(settings); - } - - /** - * Constructs an instance of DocumentUnderstandingServiceClient, using the given stub for making - * calls. This is for advanced usage - prefer using create(DocumentUnderstandingServiceSettings). - */ - public static final DocumentUnderstandingServiceClient create( - DocumentUnderstandingServiceStub stub) { - return new DocumentUnderstandingServiceClient(stub); - } - - /** - * Constructs an instance of DocumentUnderstandingServiceClient, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected DocumentUnderstandingServiceClient(DocumentUnderstandingServiceSettings settings) - throws IOException { - this.settings = settings; - this.stub = - ((DocumentUnderstandingServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - protected DocumentUnderstandingServiceClient(DocumentUnderstandingServiceStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final DocumentUnderstandingServiceSettings getSettings() { - return settings; - } - - public DocumentUnderstandingServiceStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * LRO endpoint to batch process many documents. - * - *
Sample code: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * List requests = new ArrayList<>();
- * BatchProcessDocumentsResponse response =
- * documentUnderstandingServiceClient.batchProcessDocumentsAsync(requests).get();
- * }
- * }
- *
- * @param requests Required. Individual requests for each document.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFutureSample code: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * BatchProcessDocumentsRequest request =
- * BatchProcessDocumentsRequest.newBuilder()
- * .addAllRequests(new ArrayList())
- * .setParent("parent-995424086")
- * .build();
- * BatchProcessDocumentsResponse response =
- * documentUnderstandingServiceClient.batchProcessDocumentsAsync(request).get();
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFutureSample code: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * BatchProcessDocumentsRequest request =
- * BatchProcessDocumentsRequest.newBuilder()
- * .addAllRequests(new ArrayList())
- * .setParent("parent-995424086")
- * .build();
- * OperationFuture future =
- * documentUnderstandingServiceClient
- * .batchProcessDocumentsOperationCallable()
- * .futureCall(request);
- * // Do something.
- * BatchProcessDocumentsResponse response = future.get();
- * }
- * }
- */
- public final OperationCallable<
- BatchProcessDocumentsRequest, BatchProcessDocumentsResponse, OperationMetadata>
- batchProcessDocumentsOperationCallable() {
- return stub.batchProcessDocumentsOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * LRO endpoint to batch process many documents.
- *
- * Sample code: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * BatchProcessDocumentsRequest request =
- * BatchProcessDocumentsRequest.newBuilder()
- * .addAllRequests(new ArrayList())
- * .setParent("parent-995424086")
- * .build();
- * ApiFuture future =
- * documentUnderstandingServiceClient.batchProcessDocumentsCallable().futureCall(request);
- * // Do something.
- * Operation response = future.get();
- * }
- * }
- */
- public final UnaryCallableThe default instance has everything set to sensible defaults: - * - *
The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *
For example, to set the - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of batchProcessDocuments: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceSettings.newBuilder();
- * documentUnderstandingServiceSettingsBuilder
- * .batchProcessDocumentsSettings()
- * .setRetrySettings(
- * documentUnderstandingServiceSettingsBuilder
- * .batchProcessDocumentsSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
- * documentUnderstandingServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
- * additional support in setting retries.
- *
- * To configure the RetrySettings of a Long Running Operation method, create an - * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to - * configure the RetrySettings for batchProcessDocuments: - * - *
{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- * OperationalTimedPollAlgorithm.create(
- * RetrySettings.newBuilder()
- * .setInitialRetryDelayDuration(Duration.ofMillis(500))
- * .setRetryDelayMultiplier(1.5)
- * .setMaxRetryDelay(Duration.ofMillis(5000))
- * .setTotalTimeoutDuration(Duration.ofHours(24))
- * .build());
- * documentUnderstandingServiceSettingsBuilder
- * .createClusterOperationSettings()
- * .setPollingAlgorithm(timedRetryAlgorithm)
- * .build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DocumentUnderstandingServiceSettings
- extends ClientSettingsNote: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction The interfaces provided are listed below, along with usage samples.
- *
- * ======================= DocumentUnderstandingServiceClient =======================
- *
- * Service Description: Service to parse structured information from unstructured or
- * semi-structured documents using state-of-the-art Google AI such as natural language, computer
- * vision, and translation.
- *
- * Sample for DocumentUnderstandingServiceClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public abstract class DocumentUnderstandingServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
- }
-
- public OperationCallable<
- BatchProcessDocumentsRequest, BatchProcessDocumentsResponse, OperationMetadata>
- batchProcessDocumentsOperationCallable() {
- throw new UnsupportedOperationException(
- "Not implemented: batchProcessDocumentsOperationCallable()");
- }
-
- public UnaryCallable The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of batchProcessDocuments:
- *
- * To configure the RetrySettings of a Long Running Operation method, create an
- * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
- * configure the RetrySettings for batchProcessDocuments:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class is for advanced usage.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class GrpcDocumentUnderstandingServiceCallableFactory implements GrpcStubCallableFactory {
-
- @Override
- public This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class GrpcDocumentUnderstandingServiceStub extends DocumentUnderstandingServiceStub {
- private static final MethodDescriptor This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the DocumentUnderstandingServiceClient object to clean up
- * resources such as threads. In the example above, try-with-resources is used, which automatically
- * calls close().
- *
- * BatchProcessDocuments LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. Request object method variants only take one parameter, a request object, which must be constructed before the call. batchProcessDocumentsAsync(List<ProcessDocumentRequest> requests)
- * batchProcessDocumentsAsync(BatchProcessDocumentsRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. batchProcessDocumentsOperationCallable()
- * batchProcessDocumentsCallable()
- * ProcessDocument Processes a single document. Request object method variants only take one parameter, a request object, which must be constructed before the call. processDocument(ProcessDocumentRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. processDocumentCallable()
- * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
- * listLocationsCallable()
- * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of
- * DocumentUnderstandingServiceSettings to create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DocumentUnderstandingServiceClient implements BackgroundResource {
- private final DocumentUnderstandingServiceSettings settings;
- private final DocumentUnderstandingServiceStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of DocumentUnderstandingServiceClient with default settings. */
- public static final DocumentUnderstandingServiceClient create() throws IOException {
- return create(DocumentUnderstandingServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of DocumentUnderstandingServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final DocumentUnderstandingServiceClient create(
- DocumentUnderstandingServiceSettings settings) throws IOException {
- return new DocumentUnderstandingServiceClient(settings);
- }
-
- /**
- * Constructs an instance of DocumentUnderstandingServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer using create(DocumentUnderstandingServiceSettings).
- */
- public static final DocumentUnderstandingServiceClient create(
- DocumentUnderstandingServiceStub stub) {
- return new DocumentUnderstandingServiceClient(stub);
- }
-
- /**
- * Constructs an instance of DocumentUnderstandingServiceClient, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected DocumentUnderstandingServiceClient(DocumentUnderstandingServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub =
- ((DocumentUnderstandingServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- protected DocumentUnderstandingServiceClient(DocumentUnderstandingServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final DocumentUnderstandingServiceSettings getSettings() {
- return settings;
- }
-
- public DocumentUnderstandingServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in
- * the [Document] format.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of processDocument:
- *
- * To configure the RetrySettings of a Long Running Operation method, create an
- * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
- * configure the RetrySettings for batchProcessDocuments:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction The interfaces provided are listed below, along with usage samples.
- *
- * ======================= DocumentUnderstandingServiceClient =======================
- *
- * Service Description: Service to parse structured information from unstructured or
- * semi-structured documents using state-of-the-art Google AI such as natural language, computer
- * vision, and translation.
- *
- * Sample for DocumentUnderstandingServiceClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public abstract class DocumentUnderstandingServiceStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
- }
-
- public OperationCallable<
- BatchProcessDocumentsRequest, BatchProcessDocumentsResponse, OperationMetadata>
- batchProcessDocumentsOperationCallable() {
- throw new UnsupportedOperationException(
- "Not implemented: batchProcessDocumentsOperationCallable()");
- }
-
- public UnaryCallable The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of processDocument:
- *
- * To configure the RetrySettings of a Long Running Operation method, create an
- * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
- * configure the RetrySettings for batchProcessDocuments:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class is for advanced usage.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class GrpcDocumentUnderstandingServiceCallableFactory implements GrpcStubCallableFactory {
-
- @Override
- public This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class GrpcDocumentUnderstandingServiceStub extends DocumentUnderstandingServiceStub {
- private static final MethodDescriptor{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * List
- */
-@Generated("by gapic-generator-java")
-package com.google.cloud.documentai.v1beta1;
-
-import javax.annotation.Generated;
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java
deleted file mode 100644
index 2abca75aa33a..000000000000
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStub.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.cloud.documentai.v1beta1.stub;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.documentai.v1beta1.BatchProcessDocumentsRequest;
-import com.google.cloud.documentai.v1beta1.BatchProcessDocumentsResponse;
-import com.google.cloud.documentai.v1beta1.OperationMetadata;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.OperationsStub;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS.
-/**
- * Base stub class for the DocumentUnderstandingService service API.
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceStubSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceStubSettings.newBuilder();
- * documentUnderstandingServiceSettingsBuilder
- * .batchProcessDocumentsSettings()
- * .setRetrySettings(
- * documentUnderstandingServiceSettingsBuilder
- * .batchProcessDocumentsSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * DocumentUnderstandingServiceStubSettings documentUnderstandingServiceSettings =
- * documentUnderstandingServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
- * additional support in setting retries.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceStubSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceStubSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- * OperationalTimedPollAlgorithm.create(
- * RetrySettings.newBuilder()
- * .setInitialRetryDelayDuration(Duration.ofMillis(500))
- * .setRetryDelayMultiplier(1.5)
- * .setMaxRetryDelay(Duration.ofMillis(5000))
- * .setTotalTimeoutDuration(Duration.ofHours(24))
- * .build());
- * documentUnderstandingServiceSettingsBuilder
- * .createClusterOperationSettings()
- * .setPollingAlgorithm(timedRetryAlgorithm)
- * .build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DocumentUnderstandingServiceStubSettings
- extends StubSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ProcessDocumentRequest request =
- * ProcessDocumentRequest.newBuilder()
- * .setParent("parent-995424086")
- * .setInputConfig(InputConfig.newBuilder().build())
- * .setOutputConfig(OutputConfig.newBuilder().build())
- * .setDocumentType("documentType-1473196299")
- * .setTableExtractionParams(TableExtractionParams.newBuilder().build())
- * .setFormExtractionParams(FormExtractionParams.newBuilder().build())
- * .setEntityExtractionParams(EntityExtractionParams.newBuilder().build())
- * .setOcrParams(OcrParams.newBuilder().build())
- * .setAutomlParams(AutoMlParams.newBuilder().build())
- * .build();
- * Document response = documentUnderstandingServiceClient.processDocument(request);
- * }
- * }
- *
- *
- *
- *
- *
- *
- * Method
- * Description
- * Method Variants
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
- * DocumentUnderstandingServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create(documentUnderstandingServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
- * DocumentUnderstandingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create(documentUnderstandingServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * List
- *
- * @param requests Required. Individual requests for each document.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * BatchProcessDocumentsRequest request =
- * BatchProcessDocumentsRequest.newBuilder()
- * .addAllRequests(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * BatchProcessDocumentsRequest request =
- * BatchProcessDocumentsRequest.newBuilder()
- * .addAllRequests(new ArrayList
- */
- public final OperationCallable<
- BatchProcessDocumentsRequest, BatchProcessDocumentsResponse, OperationMetadata>
- batchProcessDocumentsOperationCallable() {
- return stub.batchProcessDocumentsOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in
- * the [Document] format.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * BatchProcessDocumentsRequest request =
- * BatchProcessDocumentsRequest.newBuilder()
- * .addAllRequests(new ArrayList
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ProcessDocumentRequest request =
- * ProcessDocumentRequest.newBuilder()
- * .setParent("parent-995424086")
- * .setInputConfig(InputConfig.newBuilder().build())
- * .setOutputConfig(OutputConfig.newBuilder().build())
- * .setDocumentType("documentType-1473196299")
- * .setTableExtractionParams(TableExtractionParams.newBuilder().build())
- * .setFormExtractionParams(FormExtractionParams.newBuilder().build())
- * .setEntityExtractionParams(EntityExtractionParams.newBuilder().build())
- * .setOcrParams(OcrParams.newBuilder().build())
- * .setAutomlParams(AutoMlParams.newBuilder().build())
- * .build();
- * Document response = documentUnderstandingServiceClient.processDocument(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Document processDocument(ProcessDocumentRequest request) {
- return processDocumentCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Processes a single document.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ProcessDocumentRequest request =
- * ProcessDocumentRequest.newBuilder()
- * .setParent("parent-995424086")
- * .setInputConfig(InputConfig.newBuilder().build())
- * .setOutputConfig(OutputConfig.newBuilder().build())
- * .setDocumentType("documentType-1473196299")
- * .setTableExtractionParams(TableExtractionParams.newBuilder().build())
- * .setFormExtractionParams(FormExtractionParams.newBuilder().build())
- * .setEntityExtractionParams(EntityExtractionParams.newBuilder().build())
- * .setOcrParams(OcrParams.newBuilder().build())
- * .setAutomlParams(AutoMlParams.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element :
- * documentUnderstandingServiceClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists information about the supported locations for this service.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListLocationsResponse response =
- * documentUnderstandingServiceClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = documentUnderstandingServiceClient.getLocation(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets information about a location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceSettings.newBuilder();
- * documentUnderstandingServiceSettingsBuilder
- * .processDocumentSettings()
- * .setRetrySettings(
- * documentUnderstandingServiceSettingsBuilder
- * .processDocumentSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * DocumentUnderstandingServiceSettings documentUnderstandingServiceSettings =
- * documentUnderstandingServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
- * additional support in setting retries.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- * OperationalTimedPollAlgorithm.create(
- * RetrySettings.newBuilder()
- * .setInitialRetryDelayDuration(Duration.ofMillis(500))
- * .setRetryDelayMultiplier(1.5)
- * .setMaxRetryDelay(Duration.ofMillis(5000))
- * .setTotalTimeoutDuration(Duration.ofHours(24))
- * .build());
- * documentUnderstandingServiceSettingsBuilder
- * .createClusterOperationSettings()
- * .setPollingAlgorithm(timedRetryAlgorithm)
- * .build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DocumentUnderstandingServiceSettings
- extends ClientSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DocumentUnderstandingServiceClient documentUnderstandingServiceClient =
- * DocumentUnderstandingServiceClient.create()) {
- * ProcessDocumentRequest request =
- * ProcessDocumentRequest.newBuilder()
- * .setParent("parent-995424086")
- * .setInputConfig(InputConfig.newBuilder().build())
- * .setOutputConfig(OutputConfig.newBuilder().build())
- * .setDocumentType("documentType-1473196299")
- * .setTableExtractionParams(TableExtractionParams.newBuilder().build())
- * .setFormExtractionParams(FormExtractionParams.newBuilder().build())
- * .setEntityExtractionParams(EntityExtractionParams.newBuilder().build())
- * .setOcrParams(OcrParams.newBuilder().build())
- * .setAutomlParams(AutoMlParams.newBuilder().build())
- * .build();
- * Document response = documentUnderstandingServiceClient.processDocument(request);
- * }
- * }
- */
-@Generated("by gapic-generator-java")
-package com.google.cloud.documentai.v1beta2;
-
-import javax.annotation.Generated;
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java
deleted file mode 100644
index 1db9b0e68bf9..000000000000
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStub.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.cloud.documentai.v1beta2.stub;
-
-import static com.google.cloud.documentai.v1beta2.DocumentUnderstandingServiceClient.ListLocationsPagedResponse;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.OperationCallable;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsRequest;
-import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse;
-import com.google.cloud.documentai.v1beta2.Document;
-import com.google.cloud.documentai.v1beta2.OperationMetadata;
-import com.google.cloud.documentai.v1beta2.ProcessDocumentRequest;
-import com.google.cloud.location.GetLocationRequest;
-import com.google.cloud.location.ListLocationsRequest;
-import com.google.cloud.location.ListLocationsResponse;
-import com.google.cloud.location.Location;
-import com.google.longrunning.Operation;
-import com.google.longrunning.stub.OperationsStub;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS.
-/**
- * Base stub class for the DocumentUnderstandingService service API.
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceStubSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceStubSettings.newBuilder();
- * documentUnderstandingServiceSettingsBuilder
- * .processDocumentSettings()
- * .setRetrySettings(
- * documentUnderstandingServiceSettingsBuilder
- * .processDocumentSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * DocumentUnderstandingServiceStubSettings documentUnderstandingServiceSettings =
- * documentUnderstandingServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
- * additional support in setting retries.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DocumentUnderstandingServiceStubSettings.Builder documentUnderstandingServiceSettingsBuilder =
- * DocumentUnderstandingServiceStubSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- * OperationalTimedPollAlgorithm.create(
- * RetrySettings.newBuilder()
- * .setInitialRetryDelayDuration(Duration.ofMillis(500))
- * .setRetryDelayMultiplier(1.5)
- * .setMaxRetryDelay(Duration.ofMillis(5000))
- * .setTotalTimeoutDuration(Duration.ofHours(24))
- * .build());
- * documentUnderstandingServiceSettingsBuilder
- * .createClusterOperationSettings()
- * .setPollingAlgorithm(timedRetryAlgorithm)
- * .build();
- * }
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DocumentUnderstandingServiceStubSettings
- extends StubSettings