batchProcessDocuments
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Send a document for Human Review. The input document should be processed by the specified
- * processor.
+ * Fetches processor types. Note that we do not use ListProcessorTypes here because it is not
+ * paginated.
*
* Sample code:
*
@@ -459,30 +493,29 @@ public final UnaryCallable batchProcessDocuments
* // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
- * HumanReviewConfigName humanReviewConfig =
- * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
- * ReviewDocumentResponse response =
- * documentProcessorServiceClient.reviewDocumentAsync(humanReviewConfig).get();
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * FetchProcessorTypesResponse response =
+ * documentProcessorServiceClient.fetchProcessorTypes(parent);
* }
* }
*
- * @param humanReviewConfig Required. The resource name of the HumanReviewConfig that the document
- * will be reviewed with.
+ * @param parent Required. The project of processor type to list. The available processor types
+ * may depend on the allow-listing on projects. Format:
+ * `projects/{project}/locations/{location}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture
- reviewDocumentAsync(HumanReviewConfigName humanReviewConfig) {
- ReviewDocumentRequest request =
- ReviewDocumentRequest.newBuilder()
- .setHumanReviewConfig(humanReviewConfig == null ? null : humanReviewConfig.toString())
+ public final FetchProcessorTypesResponse fetchProcessorTypes(LocationName parent) {
+ FetchProcessorTypesRequest request =
+ FetchProcessorTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
.build();
- return reviewDocumentAsync(request);
+ return fetchProcessorTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Send a document for Human Review. The input document should be processed by the specified
- * processor.
+ * Fetches processor types. Note that we do not use ListProcessorTypes here because it is not
+ * paginated.
*
* Sample code:
*
@@ -491,28 +524,27 @@ public final UnaryCallable batchProcessDocuments
* // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
- * String humanReviewConfig =
- * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
- * ReviewDocumentResponse response =
- * documentProcessorServiceClient.reviewDocumentAsync(humanReviewConfig).get();
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * FetchProcessorTypesResponse response =
+ * documentProcessorServiceClient.fetchProcessorTypes(parent);
* }
* }
*
- * @param humanReviewConfig Required. The resource name of the HumanReviewConfig that the document
- * will be reviewed with.
+ * @param parent Required. The project of processor type to list. The available processor types
+ * may depend on the allow-listing on projects. Format:
+ * `projects/{project}/locations/{location}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture
- reviewDocumentAsync(String humanReviewConfig) {
- ReviewDocumentRequest request =
- ReviewDocumentRequest.newBuilder().setHumanReviewConfig(humanReviewConfig).build();
- return reviewDocumentAsync(request);
+ public final FetchProcessorTypesResponse fetchProcessorTypes(String parent) {
+ FetchProcessorTypesRequest request =
+ FetchProcessorTypesRequest.newBuilder().setParent(parent).build();
+ return fetchProcessorTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Send a document for Human Review. The input document should be processed by the specified
- * processor.
+ * Fetches processor types. Note that we do not use ListProcessorTypes here because it is not
+ * paginated.
*
* Sample code:
*
@@ -521,29 +553,26 @@ public final UnaryCallable batchProcessDocuments
* // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
- * ReviewDocumentRequest request =
- * ReviewDocumentRequest.newBuilder()
- * .setHumanReviewConfig(
- * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
- * .setEnableSchemaValidation(true)
+ * FetchProcessorTypesRequest request =
+ * FetchProcessorTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .build();
- * ReviewDocumentResponse response =
- * documentProcessorServiceClient.reviewDocumentAsync(request).get();
+ * FetchProcessorTypesResponse response =
+ * documentProcessorServiceClient.fetchProcessorTypes(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 OperationFuture
- reviewDocumentAsync(ReviewDocumentRequest request) {
- return reviewDocumentOperationCallable().futureCall(request);
+ public final FetchProcessorTypesResponse fetchProcessorTypes(FetchProcessorTypesRequest request) {
+ return fetchProcessorTypesCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Send a document for Human Review. The input document should be processed by the specified
- * processor.
+ * Fetches processor types. Note that we do not use ListProcessorTypes here because it is not
+ * paginated.
*
* Sample code:
*
@@ -552,29 +581,25 @@ public final UnaryCallable batchProcessDocuments
* // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
- * ReviewDocumentRequest request =
- * ReviewDocumentRequest.newBuilder()
- * .setHumanReviewConfig(
- * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
- * .setEnableSchemaValidation(true)
+ * FetchProcessorTypesRequest request =
+ * FetchProcessorTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .build();
- * OperationFuture future =
- * documentProcessorServiceClient.reviewDocumentOperationCallable().futureCall(request);
+ * ApiFuture future =
+ * documentProcessorServiceClient.fetchProcessorTypesCallable().futureCall(request);
* // Do something.
- * ReviewDocumentResponse response = future.get();
+ * FetchProcessorTypesResponse response = future.get();
* }
* }
*/
- public final OperationCallable<
- ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata>
- reviewDocumentOperationCallable() {
- return stub.reviewDocumentOperationCallable();
+ public final UnaryCallable
+ fetchProcessorTypesCallable() {
+ return stub.fetchProcessorTypesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Send a document for Human Review. The input document should be processed by the specified
- * processor.
+ * Lists the processor types that exist.
*
* Sample code:
*
@@ -583,50 +608,2325 @@ public final UnaryCallable batchProcessDocuments
* // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
- * ReviewDocumentRequest request =
- * ReviewDocumentRequest.newBuilder()
- * .setHumanReviewConfig(
- * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
- * .setEnableSchemaValidation(true)
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (ProcessorType element :
+ * documentProcessorServiceClient.listProcessorTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The location of processor type to list. The available processor types
+ * may depend on the allow-listing on projects. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProcessorTypesPagedResponse listProcessorTypes(LocationName parent) {
+ ListProcessorTypesRequest request =
+ ListProcessorTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listProcessorTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processor types that exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (ProcessorType element :
+ * documentProcessorServiceClient.listProcessorTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The location of processor type to list. The available processor types
+ * may depend on the allow-listing on projects. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProcessorTypesPagedResponse listProcessorTypes(String parent) {
+ ListProcessorTypesRequest request =
+ ListProcessorTypesRequest.newBuilder().setParent(parent).build();
+ return listProcessorTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processor types that exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorTypesRequest request =
+ * ListProcessorTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
* .build();
- * ApiFuture future =
- * documentProcessorServiceClient.reviewDocumentCallable().futureCall(request);
+ * for (ProcessorType element :
+ * documentProcessorServiceClient.listProcessorTypes(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 ListProcessorTypesPagedResponse listProcessorTypes(
+ ListProcessorTypesRequest request) {
+ return listProcessorTypesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processor types that exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorTypesRequest request =
+ * ListProcessorTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.listProcessorTypesPagedCallable().futureCall(request);
* // Do something.
- * Operation response = future.get();
+ * for (ProcessorType element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
* }
*/
- public final UnaryCallable reviewDocumentCallable() {
- return stub.reviewDocumentCallable();
+ public final UnaryCallable
+ listProcessorTypesPagedCallable() {
+ return stub.listProcessorTypesPagedCallable();
}
- @Override
- public final void close() {
- stub.close();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processor types that exist.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorTypesRequest request =
+ * ListProcessorTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListProcessorTypesResponse response =
+ * documentProcessorServiceClient.listProcessorTypesCallable().call(request);
+ * for (ProcessorType element : response.getProcessorTypesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listProcessorTypesCallable() {
+ return stub.listProcessorTypesCallable();
}
- @Override
- public void shutdown() {
- stub.shutdown();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all processors which belong to this project.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Processor element : documentProcessorServiceClient.listProcessors(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent (project and location) which owns this collection of
+ * Processors. Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProcessorsPagedResponse listProcessors(LocationName parent) {
+ ListProcessorsRequest request =
+ ListProcessorsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listProcessors(request);
}
- @Override
- public boolean isShutdown() {
- return stub.isShutdown();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all processors which belong to this project.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Processor element : documentProcessorServiceClient.listProcessors(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent (project and location) which owns this collection of
+ * Processors. Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProcessorsPagedResponse listProcessors(String parent) {
+ ListProcessorsRequest request = ListProcessorsRequest.newBuilder().setParent(parent).build();
+ return listProcessors(request);
}
- @Override
- public boolean isTerminated() {
- return stub.isTerminated();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all processors which belong to this project.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorsRequest request =
+ * ListProcessorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Processor element :
+ * documentProcessorServiceClient.listProcessors(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 ListProcessorsPagedResponse listProcessors(ListProcessorsRequest request) {
+ return listProcessorsPagedCallable().call(request);
}
- @Override
- public void shutdownNow() {
- stub.shutdownNow();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all processors which belong to this project.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorsRequest request =
+ * ListProcessorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.listProcessorsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Processor element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listProcessorsPagedCallable() {
+ return stub.listProcessorsPagedCallable();
}
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return stub.awaitTermination(duration, unit);
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all processors which belong to this project.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorsRequest request =
+ * ListProcessorsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListProcessorsResponse response =
+ * documentProcessorServiceClient.listProcessorsCallable().call(request);
+ * for (Processor element : response.getProcessorsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listProcessorsCallable() {
+ return stub.listProcessorsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * Processor response = documentProcessorServiceClient.getProcessor(name);
+ * }
+ * }
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Processor getProcessor(ProcessorName name) {
+ GetProcessorRequest request =
+ GetProcessorRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getProcessor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+ * Processor response = documentProcessorServiceClient.getProcessor(name);
+ * }
+ * }
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Processor getProcessor(String name) {
+ GetProcessorRequest request = GetProcessorRequest.newBuilder().setName(name).build();
+ return getProcessor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * GetProcessorRequest request =
+ * GetProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * Processor response = documentProcessorServiceClient.getProcessor(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 Processor getProcessor(GetProcessorRequest request) {
+ return getProcessorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * GetProcessorRequest request =
+ * GetProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.getProcessorCallable().futureCall(request);
+ * // Do something.
+ * Processor response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getProcessorCallable() {
+ return stub.getProcessorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor version detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorVersionName name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]");
+ * ProcessorVersion response = documentProcessorServiceClient.getProcessorVersion(name);
+ * }
+ * }
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProcessorVersion getProcessorVersion(ProcessorVersionName name) {
+ GetProcessorVersionRequest request =
+ GetProcessorVersionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getProcessorVersion(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor version detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString();
+ * ProcessorVersion response = documentProcessorServiceClient.getProcessorVersion(name);
+ * }
+ * }
+ *
+ * @param name Required. The processor resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProcessorVersion getProcessorVersion(String name) {
+ GetProcessorVersionRequest request =
+ GetProcessorVersionRequest.newBuilder().setName(name).build();
+ return getProcessorVersion(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor version detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * GetProcessorVersionRequest request =
+ * GetProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * ProcessorVersion response = documentProcessorServiceClient.getProcessorVersion(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 ProcessorVersion getProcessorVersion(GetProcessorVersionRequest request) {
+ return getProcessorVersionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a processor version detail.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * GetProcessorVersionRequest request =
+ * GetProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.getProcessorVersionCallable().futureCall(request);
+ * // Do something.
+ * ProcessorVersion response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getProcessorVersionCallable() {
+ return stub.getProcessorVersionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of a processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorName parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * for (ProcessorVersion element :
+ * documentProcessorServiceClient.listProcessorVersions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent (project, location and processor) to list all versions.
+ * Format: `projects/{project}/locations/{location}/processors/{processor}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProcessorVersionsPagedResponse listProcessorVersions(ProcessorName parent) {
+ ListProcessorVersionsRequest request =
+ ListProcessorVersionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listProcessorVersions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of a processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+ * for (ProcessorVersion element :
+ * documentProcessorServiceClient.listProcessorVersions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent (project, location and processor) to list all versions.
+ * Format: `projects/{project}/locations/{location}/processors/{processor}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProcessorVersionsPagedResponse listProcessorVersions(String parent) {
+ ListProcessorVersionsRequest request =
+ ListProcessorVersionsRequest.newBuilder().setParent(parent).build();
+ return listProcessorVersions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of a processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorVersionsRequest request =
+ * ListProcessorVersionsRequest.newBuilder()
+ * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (ProcessorVersion element :
+ * documentProcessorServiceClient.listProcessorVersions(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 ListProcessorVersionsPagedResponse listProcessorVersions(
+ ListProcessorVersionsRequest request) {
+ return listProcessorVersionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of a processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorVersionsRequest request =
+ * ListProcessorVersionsRequest.newBuilder()
+ * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.listProcessorVersionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ProcessorVersion element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listProcessorVersionsPagedCallable() {
+ return stub.listProcessorVersionsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all versions of a processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListProcessorVersionsRequest request =
+ * ListProcessorVersionsRequest.newBuilder()
+ * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListProcessorVersionsResponse response =
+ * documentProcessorServiceClient.listProcessorVersionsCallable().call(request);
+ * for (ProcessorVersion element : response.getProcessorVersionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listProcessorVersionsCallable() {
+ return stub.listProcessorVersionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor version, all artifacts under the processor version will be deleted.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorVersionName name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]");
+ * documentProcessorServiceClient.deleteProcessorVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor version resource name to be deleted.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteProcessorVersionAsync(
+ ProcessorVersionName name) {
+ DeleteProcessorVersionRequest request =
+ DeleteProcessorVersionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteProcessorVersionAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor version, all artifacts under the processor version will be deleted.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString();
+ * documentProcessorServiceClient.deleteProcessorVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor version resource name to be deleted.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteProcessorVersionAsync(
+ String name) {
+ DeleteProcessorVersionRequest request =
+ DeleteProcessorVersionRequest.newBuilder().setName(name).build();
+ return deleteProcessorVersionAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor version, all artifacts under the processor version will be deleted.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeleteProcessorVersionRequest request =
+ * DeleteProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * documentProcessorServiceClient.deleteProcessorVersionAsync(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 OperationFuture deleteProcessorVersionAsync(
+ DeleteProcessorVersionRequest request) {
+ return deleteProcessorVersionOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor version, all artifacts under the processor version will be deleted.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeleteProcessorVersionRequest request =
+ * DeleteProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient
+ * .deleteProcessorVersionOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeleteProcessorVersionRequest, Empty, DeleteProcessorVersionMetadata>
+ deleteProcessorVersionOperationCallable() {
+ return stub.deleteProcessorVersionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor version, all artifacts under the processor version will be deleted.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeleteProcessorVersionRequest request =
+ * DeleteProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.deleteProcessorVersionCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteProcessorVersionCallable() {
+ return stub.deleteProcessorVersionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorVersionName name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]");
+ * DeployProcessorVersionResponse response =
+ * documentProcessorServiceClient.deployProcessorVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor version resource name to be deployed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ deployProcessorVersionAsync(ProcessorVersionName name) {
+ DeployProcessorVersionRequest request =
+ DeployProcessorVersionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deployProcessorVersionAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString();
+ * DeployProcessorVersionResponse response =
+ * documentProcessorServiceClient.deployProcessorVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor version resource name to be deployed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ deployProcessorVersionAsync(String name) {
+ DeployProcessorVersionRequest request =
+ DeployProcessorVersionRequest.newBuilder().setName(name).build();
+ return deployProcessorVersionAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeployProcessorVersionRequest request =
+ * DeployProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * DeployProcessorVersionResponse response =
+ * documentProcessorServiceClient.deployProcessorVersionAsync(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 OperationFuture
+ deployProcessorVersionAsync(DeployProcessorVersionRequest request) {
+ return deployProcessorVersionOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeployProcessorVersionRequest request =
+ * DeployProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient
+ * .deployProcessorVersionOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * DeployProcessorVersionResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationCallable() {
+ return stub.deployProcessorVersionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeployProcessorVersionRequest request =
+ * DeployProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.deployProcessorVersionCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deployProcessorVersionCallable() {
+ return stub.deployProcessorVersionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorVersionName name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]");
+ * UndeployProcessorVersionResponse response =
+ * documentProcessorServiceClient.undeployProcessorVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor version resource name to be undeployed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ undeployProcessorVersionAsync(ProcessorVersionName name) {
+ UndeployProcessorVersionRequest request =
+ UndeployProcessorVersionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return undeployProcessorVersionAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String name =
+ * ProcessorVersionName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString();
+ * UndeployProcessorVersionResponse response =
+ * documentProcessorServiceClient.undeployProcessorVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor version resource name to be undeployed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ undeployProcessorVersionAsync(String name) {
+ UndeployProcessorVersionRequest request =
+ UndeployProcessorVersionRequest.newBuilder().setName(name).build();
+ return undeployProcessorVersionAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * UndeployProcessorVersionRequest request =
+ * UndeployProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * UndeployProcessorVersionResponse response =
+ * documentProcessorServiceClient.undeployProcessorVersionAsync(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 OperationFuture
+ undeployProcessorVersionAsync(UndeployProcessorVersionRequest request) {
+ return undeployProcessorVersionOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * UndeployProcessorVersionRequest request =
+ * UndeployProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient
+ * .undeployProcessorVersionOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * UndeployProcessorVersionResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationCallable() {
+ return stub.undeployProcessorVersionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys the processor version.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * UndeployProcessorVersionRequest request =
+ * UndeployProcessorVersionRequest.newBuilder()
+ * .setName(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.undeployProcessorVersionCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ undeployProcessorVersionCallable() {
+ return stub.undeployProcessorVersionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a processor from the type processor that the user chose. The processor will be at
+ * "ENABLED" state by default after its creation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Processor processor = Processor.newBuilder().build();
+ * Processor response = documentProcessorServiceClient.createProcessor(parent, processor);
+ * }
+ * }
+ *
+ * @param parent Required. The parent (project and location) under which to create the processor.
+ * Format: `projects/{project}/locations/{location}`
+ * @param processor Required. The processor to be created, requires [processor_type] and
+ * [display_name] to be set. Also, the processor is under CMEK if CMEK fields are set.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Processor createProcessor(LocationName parent, Processor processor) {
+ CreateProcessorRequest request =
+ CreateProcessorRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setProcessor(processor)
+ .build();
+ return createProcessor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a processor from the type processor that the user chose. The processor will be at
+ * "ENABLED" state by default after its creation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Processor processor = Processor.newBuilder().build();
+ * Processor response = documentProcessorServiceClient.createProcessor(parent, processor);
+ * }
+ * }
+ *
+ * @param parent Required. The parent (project and location) under which to create the processor.
+ * Format: `projects/{project}/locations/{location}`
+ * @param processor Required. The processor to be created, requires [processor_type] and
+ * [display_name] to be set. Also, the processor is under CMEK if CMEK fields are set.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Processor createProcessor(String parent, Processor processor) {
+ CreateProcessorRequest request =
+ CreateProcessorRequest.newBuilder().setParent(parent).setProcessor(processor).build();
+ return createProcessor(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a processor from the type processor that the user chose. The processor will be at
+ * "ENABLED" state by default after its creation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * CreateProcessorRequest request =
+ * CreateProcessorRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setProcessor(Processor.newBuilder().build())
+ * .build();
+ * Processor response = documentProcessorServiceClient.createProcessor(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 Processor createProcessor(CreateProcessorRequest request) {
+ return createProcessorCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a processor from the type processor that the user chose. The processor will be at
+ * "ENABLED" state by default after its creation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * CreateProcessorRequest request =
+ * CreateProcessorRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setProcessor(Processor.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.createProcessorCallable().futureCall(request);
+ * // Do something.
+ * Processor response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createProcessorCallable() {
+ return stub.createProcessorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes
+ * all artifacts associated with this processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * documentProcessorServiceClient.deleteProcessorAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor resource name to be deleted.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteProcessorAsync(
+ ProcessorName name) {
+ DeleteProcessorRequest request =
+ DeleteProcessorRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteProcessorAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes
+ * all artifacts associated with this processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+ * documentProcessorServiceClient.deleteProcessorAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The processor resource name to be deleted.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteProcessorAsync(String name) {
+ DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder().setName(name).build();
+ return deleteProcessorAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes
+ * all artifacts associated with this processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeleteProcessorRequest request =
+ * DeleteProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * documentProcessorServiceClient.deleteProcessorAsync(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 OperationFuture deleteProcessorAsync(
+ DeleteProcessorRequest request) {
+ return deleteProcessorOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes
+ * all artifacts associated with this processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeleteProcessorRequest request =
+ * DeleteProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient.deleteProcessorOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteProcessorOperationCallable() {
+ return stub.deleteProcessorOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes
+ * all artifacts associated with this processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DeleteProcessorRequest request =
+ * DeleteProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.deleteProcessorCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteProcessorCallable() {
+ return stub.deleteProcessorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a processor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * EnableProcessorRequest request =
+ * EnableProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * EnableProcessorResponse response =
+ * documentProcessorServiceClient.enableProcessorAsync(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 OperationFuture
+ enableProcessorAsync(EnableProcessorRequest request) {
+ return enableProcessorOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a processor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * EnableProcessorRequest request =
+ * EnableProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient.enableProcessorOperationCallable().futureCall(request);
+ * // Do something.
+ * EnableProcessorResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata>
+ enableProcessorOperationCallable() {
+ return stub.enableProcessorOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a processor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * EnableProcessorRequest request =
+ * EnableProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.enableProcessorCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable enableProcessorCallable() {
+ return stub.enableProcessorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a processor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DisableProcessorRequest request =
+ * DisableProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * DisableProcessorResponse response =
+ * documentProcessorServiceClient.disableProcessorAsync(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 OperationFuture
+ disableProcessorAsync(DisableProcessorRequest request) {
+ return disableProcessorOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a processor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DisableProcessorRequest request =
+ * DisableProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient.disableProcessorOperationCallable().futureCall(request);
+ * // Do something.
+ * DisableProcessorResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationCallable() {
+ return stub.disableProcessorOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a processor
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * DisableProcessorRequest request =
+ * DisableProcessorRequest.newBuilder()
+ * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.disableProcessorCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable disableProcessorCallable() {
+ return stub.disableProcessorCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that
+ * will be used in
+ * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
+ * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * SetDefaultProcessorVersionRequest request =
+ * SetDefaultProcessorVersionRequest.newBuilder()
+ * .setProcessor(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setDefaultProcessorVersion(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * SetDefaultProcessorVersionResponse response =
+ * documentProcessorServiceClient.setDefaultProcessorVersionAsync(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 OperationFuture<
+ SetDefaultProcessorVersionResponse, SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionAsync(SetDefaultProcessorVersionRequest request) {
+ return setDefaultProcessorVersionOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that
+ * will be used in
+ * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
+ * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * SetDefaultProcessorVersionRequest request =
+ * SetDefaultProcessorVersionRequest.newBuilder()
+ * .setProcessor(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setDefaultProcessorVersion(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * OperationFuture
+ * future =
+ * documentProcessorServiceClient
+ * .setDefaultProcessorVersionOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * SetDefaultProcessorVersionResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationCallable() {
+ return stub.setDefaultProcessorVersionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that
+ * will be used in
+ * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
+ * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * SetDefaultProcessorVersionRequest request =
+ * SetDefaultProcessorVersionRequest.newBuilder()
+ * .setProcessor(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setDefaultProcessorVersion(
+ * ProcessorVersionName.of(
+ * "[PROJECT]", "[LOCATION]", "[PROCESSOR]", "[PROCESSOR_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.setDefaultProcessorVersionCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ setDefaultProcessorVersionCallable() {
+ return stub.setDefaultProcessorVersionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Send a document for Human Review. The input document should be processed by the specified
+ * processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * HumanReviewConfigName humanReviewConfig =
+ * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ReviewDocumentResponse response =
+ * documentProcessorServiceClient.reviewDocumentAsync(humanReviewConfig).get();
+ * }
+ * }
+ *
+ * @param humanReviewConfig Required. The resource name of the HumanReviewConfig that the document
+ * will be reviewed with.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ reviewDocumentAsync(HumanReviewConfigName humanReviewConfig) {
+ ReviewDocumentRequest request =
+ ReviewDocumentRequest.newBuilder()
+ .setHumanReviewConfig(humanReviewConfig == null ? null : humanReviewConfig.toString())
+ .build();
+ return reviewDocumentAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Send a document for Human Review. The input document should be processed by the specified
+ * processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * String humanReviewConfig =
+ * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+ * ReviewDocumentResponse response =
+ * documentProcessorServiceClient.reviewDocumentAsync(humanReviewConfig).get();
+ * }
+ * }
+ *
+ * @param humanReviewConfig Required. The resource name of the HumanReviewConfig that the document
+ * will be reviewed with.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ reviewDocumentAsync(String humanReviewConfig) {
+ ReviewDocumentRequest request =
+ ReviewDocumentRequest.newBuilder().setHumanReviewConfig(humanReviewConfig).build();
+ return reviewDocumentAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Send a document for Human Review. The input document should be processed by the specified
+ * processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ReviewDocumentRequest request =
+ * ReviewDocumentRequest.newBuilder()
+ * .setHumanReviewConfig(
+ * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setEnableSchemaValidation(true)
+ * .setDocumentSchema(DocumentSchema.newBuilder().build())
+ * .build();
+ * ReviewDocumentResponse response =
+ * documentProcessorServiceClient.reviewDocumentAsync(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 OperationFuture
+ reviewDocumentAsync(ReviewDocumentRequest request) {
+ return reviewDocumentOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Send a document for Human Review. The input document should be processed by the specified
+ * processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ReviewDocumentRequest request =
+ * ReviewDocumentRequest.newBuilder()
+ * .setHumanReviewConfig(
+ * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setEnableSchemaValidation(true)
+ * .setDocumentSchema(DocumentSchema.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * documentProcessorServiceClient.reviewDocumentOperationCallable().futureCall(request);
+ * // Do something.
+ * ReviewDocumentResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata>
+ reviewDocumentOperationCallable() {
+ return stub.reviewDocumentOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Send a document for Human Review. The input document should be processed by the specified
+ * processor.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ReviewDocumentRequest request =
+ * ReviewDocumentRequest.newBuilder()
+ * .setHumanReviewConfig(
+ * HumanReviewConfigName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+ * .setEnableSchemaValidation(true)
+ * .setDocumentSchema(DocumentSchema.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.reviewDocumentCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable reviewDocumentCallable() {
+ return stub.reviewDocumentCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : documentProcessorServiceClient.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.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * documentProcessorServiceClient.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 listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = documentProcessorServiceClient.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.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DocumentProcessorServiceClient documentProcessorServiceClient =
+ * DocumentProcessorServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * documentProcessorServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListProcessorTypesPagedResponse
+ extends AbstractPagedListResponse<
+ ListProcessorTypesRequest,
+ ListProcessorTypesResponse,
+ ProcessorType,
+ ListProcessorTypesPage,
+ ListProcessorTypesFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListProcessorTypesPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListProcessorTypesPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListProcessorTypesPagedResponse(ListProcessorTypesPage page) {
+ super(page, ListProcessorTypesFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListProcessorTypesPage
+ extends AbstractPage<
+ ListProcessorTypesRequest,
+ ListProcessorTypesResponse,
+ ProcessorType,
+ ListProcessorTypesPage> {
+
+ private ListProcessorTypesPage(
+ PageContext context,
+ ListProcessorTypesResponse response) {
+ super(context, response);
+ }
+
+ private static ListProcessorTypesPage createEmptyPage() {
+ return new ListProcessorTypesPage(null, null);
+ }
+
+ @Override
+ protected ListProcessorTypesPage createPage(
+ PageContext context,
+ ListProcessorTypesResponse response) {
+ return new ListProcessorTypesPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListProcessorTypesFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListProcessorTypesRequest,
+ ListProcessorTypesResponse,
+ ProcessorType,
+ ListProcessorTypesPage,
+ ListProcessorTypesFixedSizeCollection> {
+
+ private ListProcessorTypesFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListProcessorTypesFixedSizeCollection createEmptyCollection() {
+ return new ListProcessorTypesFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListProcessorTypesFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListProcessorTypesFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListProcessorsPagedResponse
+ extends AbstractPagedListResponse<
+ ListProcessorsRequest,
+ ListProcessorsResponse,
+ Processor,
+ ListProcessorsPage,
+ ListProcessorsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListProcessorsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListProcessorsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListProcessorsPagedResponse(ListProcessorsPage page) {
+ super(page, ListProcessorsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListProcessorsPage
+ extends AbstractPage<
+ ListProcessorsRequest, ListProcessorsResponse, Processor, ListProcessorsPage> {
+
+ private ListProcessorsPage(
+ PageContext context,
+ ListProcessorsResponse response) {
+ super(context, response);
+ }
+
+ private static ListProcessorsPage createEmptyPage() {
+ return new ListProcessorsPage(null, null);
+ }
+
+ @Override
+ protected ListProcessorsPage createPage(
+ PageContext context,
+ ListProcessorsResponse response) {
+ return new ListProcessorsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListProcessorsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListProcessorsRequest,
+ ListProcessorsResponse,
+ Processor,
+ ListProcessorsPage,
+ ListProcessorsFixedSizeCollection> {
+
+ private ListProcessorsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListProcessorsFixedSizeCollection createEmptyCollection() {
+ return new ListProcessorsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListProcessorsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListProcessorsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListProcessorVersionsPagedResponse
+ extends AbstractPagedListResponse<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ProcessorVersion,
+ ListProcessorVersionsPage,
+ ListProcessorVersionsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListProcessorVersionsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListProcessorVersionsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListProcessorVersionsPagedResponse(ListProcessorVersionsPage page) {
+ super(page, ListProcessorVersionsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListProcessorVersionsPage
+ extends AbstractPage<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ProcessorVersion,
+ ListProcessorVersionsPage> {
+
+ private ListProcessorVersionsPage(
+ PageContext
+ context,
+ ListProcessorVersionsResponse response) {
+ super(context, response);
+ }
+
+ private static ListProcessorVersionsPage createEmptyPage() {
+ return new ListProcessorVersionsPage(null, null);
+ }
+
+ @Override
+ protected ListProcessorVersionsPage createPage(
+ PageContext
+ context,
+ ListProcessorVersionsResponse response) {
+ return new ListProcessorVersionsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListProcessorVersionsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ProcessorVersion,
+ ListProcessorVersionsPage,
+ ListProcessorVersionsFixedSizeCollection> {
+
+ private ListProcessorVersionsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListProcessorVersionsFixedSizeCollection createEmptyCollection() {
+ return new ListProcessorVersionsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListProcessorVersionsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListProcessorVersionsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
}
}
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
index 6207218d6c0..26bdd5e1aff 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
@@ -16,6 +16,11 @@
package com.google.cloud.documentai.v1;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorsPagedResponse;
+
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
@@ -26,10 +31,16 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.documentai.v1.stub.DocumentProcessorServiceStubSettings;
+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.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
@@ -91,6 +102,155 @@ public UnaryCallSettings batchProcessDocumentsSe
.batchProcessDocumentsOperationSettings();
}
+ /** Returns the object with the settings used for calls to fetchProcessorTypes. */
+ public UnaryCallSettings
+ fetchProcessorTypesSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).fetchProcessorTypesSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listProcessorTypes. */
+ public PagedCallSettings<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ listProcessorTypesSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).listProcessorTypesSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listProcessors. */
+ public PagedCallSettings<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ listProcessorsSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).listProcessorsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getProcessor. */
+ public UnaryCallSettings getProcessorSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).getProcessorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getProcessorVersion. */
+ public UnaryCallSettings
+ getProcessorVersionSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).getProcessorVersionSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listProcessorVersions. */
+ public PagedCallSettings<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>
+ listProcessorVersionsSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .listProcessorVersionsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessorVersion. */
+ public UnaryCallSettings
+ deleteProcessorVersionSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .deleteProcessorVersionSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessorVersion. */
+ public OperationCallSettings
+ deleteProcessorVersionOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .deleteProcessorVersionOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deployProcessorVersion. */
+ public UnaryCallSettings
+ deployProcessorVersionSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .deployProcessorVersionSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deployProcessorVersion. */
+ public OperationCallSettings<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .deployProcessorVersionOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to undeployProcessorVersion. */
+ public UnaryCallSettings
+ undeployProcessorVersionSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .undeployProcessorVersionSettings();
+ }
+
+ /** Returns the object with the settings used for calls to undeployProcessorVersion. */
+ public OperationCallSettings<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .undeployProcessorVersionOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createProcessor. */
+ public UnaryCallSettings createProcessorSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).createProcessorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessor. */
+ public UnaryCallSettings deleteProcessorSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).deleteProcessorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessor. */
+ public OperationCallSettings
+ deleteProcessorOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .deleteProcessorOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to enableProcessor. */
+ public UnaryCallSettings enableProcessorSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).enableProcessorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to enableProcessor. */
+ public OperationCallSettings<
+ EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata>
+ enableProcessorOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .enableProcessorOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to disableProcessor. */
+ public UnaryCallSettings disableProcessorSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).disableProcessorSettings();
+ }
+
+ /** Returns the object with the settings used for calls to disableProcessor. */
+ public OperationCallSettings<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .disableProcessorOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to setDefaultProcessorVersion. */
+ public UnaryCallSettings
+ setDefaultProcessorVersionSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .setDefaultProcessorVersionSettings();
+ }
+
+ /** Returns the object with the settings used for calls to setDefaultProcessorVersion. */
+ public OperationCallSettings<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings())
+ .setDefaultProcessorVersionOperationSettings();
+ }
+
/** Returns the object with the settings used for calls to reviewDocument. */
public UnaryCallSettings reviewDocumentSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings()).reviewDocumentSettings();
@@ -104,6 +264,17 @@ public UnaryCallSettings reviewDocumentSetting
.reviewDocumentOperationSettings();
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((DocumentProcessorServiceStubSettings) getStubSettings()).getLocationSettings();
+ }
+
public static final DocumentProcessorServiceSettings create(
DocumentProcessorServiceStubSettings stub) throws IOException {
return new DocumentProcessorServiceSettings.Builder(stub.toBuilder()).build();
@@ -238,6 +409,145 @@ public UnaryCallSettings.Builder processDocumen
return getStubSettingsBuilder().batchProcessDocumentsOperationSettings();
}
+ /** Returns the builder for the settings used for calls to fetchProcessorTypes. */
+ public UnaryCallSettings.Builder
+ fetchProcessorTypesSettings() {
+ return getStubSettingsBuilder().fetchProcessorTypesSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listProcessorTypes. */
+ public PagedCallSettings.Builder<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ listProcessorTypesSettings() {
+ return getStubSettingsBuilder().listProcessorTypesSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listProcessors. */
+ public PagedCallSettings.Builder<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ listProcessorsSettings() {
+ return getStubSettingsBuilder().listProcessorsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getProcessor. */
+ public UnaryCallSettings.Builder getProcessorSettings() {
+ return getStubSettingsBuilder().getProcessorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getProcessorVersion. */
+ public UnaryCallSettings.Builder
+ getProcessorVersionSettings() {
+ return getStubSettingsBuilder().getProcessorVersionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listProcessorVersions. */
+ public PagedCallSettings.Builder<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>
+ listProcessorVersionsSettings() {
+ return getStubSettingsBuilder().listProcessorVersionsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteProcessorVersion. */
+ public UnaryCallSettings.Builder
+ deleteProcessorVersionSettings() {
+ return getStubSettingsBuilder().deleteProcessorVersionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteProcessorVersion. */
+ public OperationCallSettings.Builder<
+ DeleteProcessorVersionRequest, Empty, DeleteProcessorVersionMetadata>
+ deleteProcessorVersionOperationSettings() {
+ return getStubSettingsBuilder().deleteProcessorVersionOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deployProcessorVersion. */
+ public UnaryCallSettings.Builder
+ deployProcessorVersionSettings() {
+ return getStubSettingsBuilder().deployProcessorVersionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deployProcessorVersion. */
+ public OperationCallSettings.Builder<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationSettings() {
+ return getStubSettingsBuilder().deployProcessorVersionOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to undeployProcessorVersion. */
+ public UnaryCallSettings.Builder
+ undeployProcessorVersionSettings() {
+ return getStubSettingsBuilder().undeployProcessorVersionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to undeployProcessorVersion. */
+ public OperationCallSettings.Builder<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationSettings() {
+ return getStubSettingsBuilder().undeployProcessorVersionOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createProcessor. */
+ public UnaryCallSettings.Builder createProcessorSettings() {
+ return getStubSettingsBuilder().createProcessorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteProcessor. */
+ public UnaryCallSettings.Builder deleteProcessorSettings() {
+ return getStubSettingsBuilder().deleteProcessorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteProcessor. */
+ public OperationCallSettings.Builder
+ deleteProcessorOperationSettings() {
+ return getStubSettingsBuilder().deleteProcessorOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to enableProcessor. */
+ public UnaryCallSettings.Builder enableProcessorSettings() {
+ return getStubSettingsBuilder().enableProcessorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to enableProcessor. */
+ public OperationCallSettings.Builder<
+ EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata>
+ enableProcessorOperationSettings() {
+ return getStubSettingsBuilder().enableProcessorOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to disableProcessor. */
+ public UnaryCallSettings.Builder
+ disableProcessorSettings() {
+ return getStubSettingsBuilder().disableProcessorSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to disableProcessor. */
+ public OperationCallSettings.Builder<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationSettings() {
+ return getStubSettingsBuilder().disableProcessorOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setDefaultProcessorVersion. */
+ public UnaryCallSettings.Builder
+ setDefaultProcessorVersionSettings() {
+ return getStubSettingsBuilder().setDefaultProcessorVersionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setDefaultProcessorVersion. */
+ public OperationCallSettings.Builder<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationSettings() {
+ return getStubSettingsBuilder().setDefaultProcessorVersionOperationSettings();
+ }
+
/** Returns the builder for the settings used for calls to reviewDocument. */
public UnaryCallSettings.Builder reviewDocumentSettings() {
return getStubSettingsBuilder().reviewDocumentSettings();
@@ -250,6 +560,18 @@ public UnaryCallSettings.Builder reviewDocumen
return getStubSettingsBuilder().reviewDocumentOperationSettings();
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
@Override
public DocumentProcessorServiceSettings build() throws IOException {
return new DocumentProcessorServiceSettings(this);
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/gapic_metadata.json b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/gapic_metadata.json
index 7076d6edb48..2376feb9d39 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/gapic_metadata.json
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/gapic_metadata.json
@@ -13,11 +13,59 @@
"BatchProcessDocuments": {
"methods": ["batchProcessDocumentsAsync", "batchProcessDocumentsAsync", "batchProcessDocumentsAsync", "batchProcessDocumentsOperationCallable", "batchProcessDocumentsCallable"]
},
+ "CreateProcessor": {
+ "methods": ["createProcessor", "createProcessor", "createProcessor", "createProcessorCallable"]
+ },
+ "DeleteProcessor": {
+ "methods": ["deleteProcessorAsync", "deleteProcessorAsync", "deleteProcessorAsync", "deleteProcessorOperationCallable", "deleteProcessorCallable"]
+ },
+ "DeleteProcessorVersion": {
+ "methods": ["deleteProcessorVersionAsync", "deleteProcessorVersionAsync", "deleteProcessorVersionAsync", "deleteProcessorVersionOperationCallable", "deleteProcessorVersionCallable"]
+ },
+ "DeployProcessorVersion": {
+ "methods": ["deployProcessorVersionAsync", "deployProcessorVersionAsync", "deployProcessorVersionAsync", "deployProcessorVersionOperationCallable", "deployProcessorVersionCallable"]
+ },
+ "DisableProcessor": {
+ "methods": ["disableProcessorAsync", "disableProcessorOperationCallable", "disableProcessorCallable"]
+ },
+ "EnableProcessor": {
+ "methods": ["enableProcessorAsync", "enableProcessorOperationCallable", "enableProcessorCallable"]
+ },
+ "FetchProcessorTypes": {
+ "methods": ["fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypesCallable"]
+ },
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
+ "GetProcessor": {
+ "methods": ["getProcessor", "getProcessor", "getProcessor", "getProcessorCallable"]
+ },
+ "GetProcessorVersion": {
+ "methods": ["getProcessorVersion", "getProcessorVersion", "getProcessorVersion", "getProcessorVersionCallable"]
+ },
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
+ "ListProcessorTypes": {
+ "methods": ["listProcessorTypes", "listProcessorTypes", "listProcessorTypes", "listProcessorTypesPagedCallable", "listProcessorTypesCallable"]
+ },
+ "ListProcessorVersions": {
+ "methods": ["listProcessorVersions", "listProcessorVersions", "listProcessorVersions", "listProcessorVersionsPagedCallable", "listProcessorVersionsCallable"]
+ },
+ "ListProcessors": {
+ "methods": ["listProcessors", "listProcessors", "listProcessors", "listProcessorsPagedCallable", "listProcessorsCallable"]
+ },
"ProcessDocument": {
"methods": ["processDocument", "processDocument", "processDocument", "processDocumentCallable"]
},
"ReviewDocument": {
"methods": ["reviewDocumentAsync", "reviewDocumentAsync", "reviewDocumentAsync", "reviewDocumentOperationCallable", "reviewDocumentCallable"]
+ },
+ "SetDefaultProcessorVersion": {
+ "methods": ["setDefaultProcessorVersionAsync", "setDefaultProcessorVersionOperationCallable", "setDefaultProcessorVersionCallable"]
+ },
+ "UndeployProcessorVersion": {
+ "methods": ["undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionOperationCallable", "undeployProcessorVersionCallable"]
}
}
}
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java
index 9b3d0ae3c0c..42bc2d8a0ab 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/package-info.java
@@ -15,7 +15,9 @@
*/
/**
- * The interfaces provided are listed below, along with usage samples.
+ * A client to Cloud Document AI API
+ *
+ * The interfaces provided are listed below, along with usage samples.
*
*
======================= DocumentProcessorServiceClient =======================
*
@@ -31,7 +33,7 @@
* // It may require modifications to work in your environment.
* try (DocumentProcessorServiceClient documentProcessorServiceClient =
* DocumentProcessorServiceClient.create()) {
- * ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+ * ResourceName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
* ProcessResponse response = documentProcessorServiceClient.processDocument(name);
* }
* }
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java
index 370b89a2e85..9d5163b63fc 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java
@@ -16,19 +16,61 @@
package com.google.cloud.documentai.v1.stub;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorsPagedResponse;
+
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.v1.BatchProcessMetadata;
import com.google.cloud.documentai.v1.BatchProcessRequest;
import com.google.cloud.documentai.v1.BatchProcessResponse;
+import com.google.cloud.documentai.v1.CreateProcessorRequest;
+import com.google.cloud.documentai.v1.DeleteProcessorMetadata;
+import com.google.cloud.documentai.v1.DeleteProcessorRequest;
+import com.google.cloud.documentai.v1.DeleteProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.DeleteProcessorVersionRequest;
+import com.google.cloud.documentai.v1.DeployProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.DeployProcessorVersionRequest;
+import com.google.cloud.documentai.v1.DeployProcessorVersionResponse;
+import com.google.cloud.documentai.v1.DisableProcessorMetadata;
+import com.google.cloud.documentai.v1.DisableProcessorRequest;
+import com.google.cloud.documentai.v1.DisableProcessorResponse;
+import com.google.cloud.documentai.v1.EnableProcessorMetadata;
+import com.google.cloud.documentai.v1.EnableProcessorRequest;
+import com.google.cloud.documentai.v1.EnableProcessorResponse;
+import com.google.cloud.documentai.v1.FetchProcessorTypesRequest;
+import com.google.cloud.documentai.v1.FetchProcessorTypesResponse;
+import com.google.cloud.documentai.v1.GetProcessorRequest;
+import com.google.cloud.documentai.v1.GetProcessorVersionRequest;
+import com.google.cloud.documentai.v1.ListProcessorTypesRequest;
+import com.google.cloud.documentai.v1.ListProcessorTypesResponse;
+import com.google.cloud.documentai.v1.ListProcessorVersionsRequest;
+import com.google.cloud.documentai.v1.ListProcessorVersionsResponse;
+import com.google.cloud.documentai.v1.ListProcessorsRequest;
+import com.google.cloud.documentai.v1.ListProcessorsResponse;
import com.google.cloud.documentai.v1.ProcessRequest;
import com.google.cloud.documentai.v1.ProcessResponse;
+import com.google.cloud.documentai.v1.Processor;
+import com.google.cloud.documentai.v1.ProcessorVersion;
import com.google.cloud.documentai.v1.ReviewDocumentOperationMetadata;
import com.google.cloud.documentai.v1.ReviewDocumentRequest;
import com.google.cloud.documentai.v1.ReviewDocumentResponse;
+import com.google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest;
+import com.google.cloud.documentai.v1.SetDefaultProcessorVersionResponse;
+import com.google.cloud.documentai.v1.UndeployProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.UndeployProcessorVersionRequest;
+import com.google.cloud.documentai.v1.UndeployProcessorVersionResponse;
+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 com.google.protobuf.Empty;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
@@ -62,6 +104,133 @@ public UnaryCallable batchProcessDocumentsCallab
throw new UnsupportedOperationException("Not implemented: batchProcessDocumentsCallable()");
}
+ public UnaryCallable
+ fetchProcessorTypesCallable() {
+ throw new UnsupportedOperationException("Not implemented: fetchProcessorTypesCallable()");
+ }
+
+ public UnaryCallable
+ listProcessorTypesPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listProcessorTypesPagedCallable()");
+ }
+
+ public UnaryCallable
+ listProcessorTypesCallable() {
+ throw new UnsupportedOperationException("Not implemented: listProcessorTypesCallable()");
+ }
+
+ public UnaryCallable
+ listProcessorsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listProcessorsPagedCallable()");
+ }
+
+ public UnaryCallable listProcessorsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listProcessorsCallable()");
+ }
+
+ public UnaryCallable getProcessorCallable() {
+ throw new UnsupportedOperationException("Not implemented: getProcessorCallable()");
+ }
+
+ public UnaryCallable getProcessorVersionCallable() {
+ throw new UnsupportedOperationException("Not implemented: getProcessorVersionCallable()");
+ }
+
+ public UnaryCallable
+ listProcessorVersionsPagedCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listProcessorVersionsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listProcessorVersionsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listProcessorVersionsCallable()");
+ }
+
+ public OperationCallable
+ deleteProcessorVersionOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: deleteProcessorVersionOperationCallable()");
+ }
+
+ public UnaryCallable deleteProcessorVersionCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteProcessorVersionCallable()");
+ }
+
+ public OperationCallable<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: deployProcessorVersionOperationCallable()");
+ }
+
+ public UnaryCallable deployProcessorVersionCallable() {
+ throw new UnsupportedOperationException("Not implemented: deployProcessorVersionCallable()");
+ }
+
+ public OperationCallable<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: undeployProcessorVersionOperationCallable()");
+ }
+
+ public UnaryCallable
+ undeployProcessorVersionCallable() {
+ throw new UnsupportedOperationException("Not implemented: undeployProcessorVersionCallable()");
+ }
+
+ public UnaryCallable createProcessorCallable() {
+ throw new UnsupportedOperationException("Not implemented: createProcessorCallable()");
+ }
+
+ public OperationCallable
+ deleteProcessorOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteProcessorOperationCallable()");
+ }
+
+ public UnaryCallable deleteProcessorCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteProcessorCallable()");
+ }
+
+ public OperationCallable
+ enableProcessorOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: enableProcessorOperationCallable()");
+ }
+
+ public UnaryCallable enableProcessorCallable() {
+ throw new UnsupportedOperationException("Not implemented: enableProcessorCallable()");
+ }
+
+ public OperationCallable<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: disableProcessorOperationCallable()");
+ }
+
+ public UnaryCallable disableProcessorCallable() {
+ throw new UnsupportedOperationException("Not implemented: disableProcessorCallable()");
+ }
+
+ public OperationCallable<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: setDefaultProcessorVersionOperationCallable()");
+ }
+
+ public UnaryCallable
+ setDefaultProcessorVersionCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: setDefaultProcessorVersionCallable()");
+ }
+
public OperationCallable<
ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata>
reviewDocumentOperationCallable() {
@@ -72,6 +241,19 @@ public UnaryCallable reviewDocumentCallable()
throw new UnsupportedOperationException("Not implemented: reviewDocumentCallable()");
}
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
index 7da61e8f603..837e38a2c73 100644
--- a/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
+++ b/java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
@@ -16,7 +16,13 @@
package com.google.cloud.documentai.v1.stub;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
+import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorsPagedResponse;
+
import com.google.api.core.ApiFunction;
+import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
@@ -31,26 +37,70 @@
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
+import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.PagedListDescriptor;
+import com.google.api.gax.rpc.PagedListResponseFactory;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.documentai.v1.BatchProcessMetadata;
import com.google.cloud.documentai.v1.BatchProcessRequest;
import com.google.cloud.documentai.v1.BatchProcessResponse;
+import com.google.cloud.documentai.v1.CreateProcessorRequest;
+import com.google.cloud.documentai.v1.DeleteProcessorMetadata;
+import com.google.cloud.documentai.v1.DeleteProcessorRequest;
+import com.google.cloud.documentai.v1.DeleteProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.DeleteProcessorVersionRequest;
+import com.google.cloud.documentai.v1.DeployProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.DeployProcessorVersionRequest;
+import com.google.cloud.documentai.v1.DeployProcessorVersionResponse;
+import com.google.cloud.documentai.v1.DisableProcessorMetadata;
+import com.google.cloud.documentai.v1.DisableProcessorRequest;
+import com.google.cloud.documentai.v1.DisableProcessorResponse;
+import com.google.cloud.documentai.v1.EnableProcessorMetadata;
+import com.google.cloud.documentai.v1.EnableProcessorRequest;
+import com.google.cloud.documentai.v1.EnableProcessorResponse;
+import com.google.cloud.documentai.v1.FetchProcessorTypesRequest;
+import com.google.cloud.documentai.v1.FetchProcessorTypesResponse;
+import com.google.cloud.documentai.v1.GetProcessorRequest;
+import com.google.cloud.documentai.v1.GetProcessorVersionRequest;
+import com.google.cloud.documentai.v1.ListProcessorTypesRequest;
+import com.google.cloud.documentai.v1.ListProcessorTypesResponse;
+import com.google.cloud.documentai.v1.ListProcessorVersionsRequest;
+import com.google.cloud.documentai.v1.ListProcessorVersionsResponse;
+import com.google.cloud.documentai.v1.ListProcessorsRequest;
+import com.google.cloud.documentai.v1.ListProcessorsResponse;
import com.google.cloud.documentai.v1.ProcessRequest;
import com.google.cloud.documentai.v1.ProcessResponse;
+import com.google.cloud.documentai.v1.Processor;
+import com.google.cloud.documentai.v1.ProcessorType;
+import com.google.cloud.documentai.v1.ProcessorVersion;
import com.google.cloud.documentai.v1.ReviewDocumentOperationMetadata;
import com.google.cloud.documentai.v1.ReviewDocumentRequest;
import com.google.cloud.documentai.v1.ReviewDocumentResponse;
+import com.google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest;
+import com.google.cloud.documentai.v1.SetDefaultProcessorVersionResponse;
+import com.google.cloud.documentai.v1.UndeployProcessorVersionMetadata;
+import com.google.cloud.documentai.v1.UndeployProcessorVersionRequest;
+import com.google.cloud.documentai.v1.UndeployProcessorVersionResponse;
+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.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
@@ -103,10 +153,301 @@ public class DocumentProcessorServiceStubSettings
private final OperationCallSettings<
BatchProcessRequest, BatchProcessResponse, BatchProcessMetadata>
batchProcessDocumentsOperationSettings;
+ private final UnaryCallSettings
+ fetchProcessorTypesSettings;
+ private final PagedCallSettings<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ listProcessorTypesSettings;
+ private final PagedCallSettings<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ listProcessorsSettings;
+ private final UnaryCallSettings getProcessorSettings;
+ private final UnaryCallSettings
+ getProcessorVersionSettings;
+ private final PagedCallSettings<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>
+ listProcessorVersionsSettings;
+ private final UnaryCallSettings
+ deleteProcessorVersionSettings;
+ private final OperationCallSettings<
+ DeleteProcessorVersionRequest, Empty, DeleteProcessorVersionMetadata>
+ deleteProcessorVersionOperationSettings;
+ private final UnaryCallSettings
+ deployProcessorVersionSettings;
+ private final OperationCallSettings<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationSettings;
+ private final UnaryCallSettings
+ undeployProcessorVersionSettings;
+ private final OperationCallSettings<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationSettings;
+ private final UnaryCallSettings createProcessorSettings;
+ private final UnaryCallSettings deleteProcessorSettings;
+ private final OperationCallSettings
+ deleteProcessorOperationSettings;
+ private final UnaryCallSettings enableProcessorSettings;
+ private final OperationCallSettings<
+ EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata>
+ enableProcessorOperationSettings;
+ private final UnaryCallSettings disableProcessorSettings;
+ private final OperationCallSettings<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationSettings;
+ private final UnaryCallSettings
+ setDefaultProcessorVersionSettings;
+ private final OperationCallSettings<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationSettings;
private final UnaryCallSettings reviewDocumentSettings;
private final OperationCallSettings<
ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata>
reviewDocumentOperationSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
+
+ private static final PagedListDescriptor<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ProcessorType>
+ LIST_PROCESSOR_TYPES_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ProcessorType>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListProcessorTypesRequest injectToken(
+ ListProcessorTypesRequest payload, String token) {
+ return ListProcessorTypesRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListProcessorTypesRequest injectPageSize(
+ ListProcessorTypesRequest payload, int pageSize) {
+ return ListProcessorTypesRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListProcessorTypesRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListProcessorTypesResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListProcessorTypesResponse payload) {
+ return payload.getProcessorTypesList() == null
+ ? ImmutableList.of()
+ : payload.getProcessorTypesList();
+ }
+ };
+
+ private static final PagedListDescriptor
+ LIST_PROCESSORS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListProcessorsRequest injectToken(ListProcessorsRequest payload, String token) {
+ return ListProcessorsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListProcessorsRequest injectPageSize(
+ ListProcessorsRequest payload, int pageSize) {
+ return ListProcessorsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListProcessorsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListProcessorsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListProcessorsResponse payload) {
+ return payload.getProcessorsList() == null
+ ? ImmutableList.of()
+ : payload.getProcessorsList();
+ }
+ };
+
+ private static final PagedListDescriptor<
+ ListProcessorVersionsRequest, ListProcessorVersionsResponse, ProcessorVersion>
+ LIST_PROCESSOR_VERSIONS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListProcessorVersionsRequest, ListProcessorVersionsResponse, ProcessorVersion>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListProcessorVersionsRequest injectToken(
+ ListProcessorVersionsRequest payload, String token) {
+ return ListProcessorVersionsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListProcessorVersionsRequest injectPageSize(
+ ListProcessorVersionsRequest payload, int pageSize) {
+ return ListProcessorVersionsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListProcessorVersionsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListProcessorVersionsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ ListProcessorVersionsResponse payload) {
+ return payload.getProcessorVersionsList() == null
+ ? ImmutableList.of()
+ : payload.getProcessorVersionsList();
+ }
+ };
+
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList() == null
+ ? ImmutableList.of()
+ : payload.getLocationsList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ LIST_PROCESSOR_TYPES_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListProcessorTypesRequest,
+ ListProcessorTypesResponse,
+ ListProcessorTypesPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListProcessorTypesRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext
+ pageContext =
+ PageContext.create(
+ callable, LIST_PROCESSOR_TYPES_PAGE_STR_DESC, request, context);
+ return ListProcessorTypesPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ LIST_PROCESSORS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListProcessorsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_PROCESSORS_PAGE_STR_DESC, request, context);
+ return ListProcessorsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>
+ LIST_PROCESSOR_VERSIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListProcessorVersionsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ ListProcessorVersionsRequest, ListProcessorVersionsResponse, ProcessorVersion>
+ pageContext =
+ PageContext.create(
+ callable, LIST_PROCESSOR_VERSIONS_PAGE_STR_DESC, request, context);
+ return ListProcessorVersionsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
/** Returns the object with the settings used for calls to processDocument. */
public UnaryCallSettings processDocumentSettings() {
@@ -124,6 +465,143 @@ public UnaryCallSettings batchProcessDocumentsSe
return batchProcessDocumentsOperationSettings;
}
+ /** Returns the object with the settings used for calls to fetchProcessorTypes. */
+ public UnaryCallSettings
+ fetchProcessorTypesSettings() {
+ return fetchProcessorTypesSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listProcessorTypes. */
+ public PagedCallSettings<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ listProcessorTypesSettings() {
+ return listProcessorTypesSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listProcessors. */
+ public PagedCallSettings<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ listProcessorsSettings() {
+ return listProcessorsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getProcessor. */
+ public UnaryCallSettings getProcessorSettings() {
+ return getProcessorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getProcessorVersion. */
+ public UnaryCallSettings
+ getProcessorVersionSettings() {
+ return getProcessorVersionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listProcessorVersions. */
+ public PagedCallSettings<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>
+ listProcessorVersionsSettings() {
+ return listProcessorVersionsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessorVersion. */
+ public UnaryCallSettings
+ deleteProcessorVersionSettings() {
+ return deleteProcessorVersionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessorVersion. */
+ public OperationCallSettings
+ deleteProcessorVersionOperationSettings() {
+ return deleteProcessorVersionOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deployProcessorVersion. */
+ public UnaryCallSettings
+ deployProcessorVersionSettings() {
+ return deployProcessorVersionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deployProcessorVersion. */
+ public OperationCallSettings<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationSettings() {
+ return deployProcessorVersionOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to undeployProcessorVersion. */
+ public UnaryCallSettings
+ undeployProcessorVersionSettings() {
+ return undeployProcessorVersionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to undeployProcessorVersion. */
+ public OperationCallSettings<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationSettings() {
+ return undeployProcessorVersionOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createProcessor. */
+ public UnaryCallSettings createProcessorSettings() {
+ return createProcessorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessor. */
+ public UnaryCallSettings deleteProcessorSettings() {
+ return deleteProcessorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteProcessor. */
+ public OperationCallSettings
+ deleteProcessorOperationSettings() {
+ return deleteProcessorOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to enableProcessor. */
+ public UnaryCallSettings enableProcessorSettings() {
+ return enableProcessorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to enableProcessor. */
+ public OperationCallSettings<
+ EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata>
+ enableProcessorOperationSettings() {
+ return enableProcessorOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to disableProcessor. */
+ public UnaryCallSettings disableProcessorSettings() {
+ return disableProcessorSettings;
+ }
+
+ /** Returns the object with the settings used for calls to disableProcessor. */
+ public OperationCallSettings<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationSettings() {
+ return disableProcessorOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to setDefaultProcessorVersion. */
+ public UnaryCallSettings
+ setDefaultProcessorVersionSettings() {
+ return setDefaultProcessorVersionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to setDefaultProcessorVersion. */
+ public OperationCallSettings<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationSettings() {
+ return setDefaultProcessorVersionOperationSettings;
+ }
+
/** Returns the object with the settings used for calls to reviewDocument. */
public UnaryCallSettings reviewDocumentSettings() {
return reviewDocumentSettings;
@@ -136,6 +614,17 @@ public UnaryCallSettings reviewDocumentSetting
return reviewDocumentOperationSettings;
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
public DocumentProcessorServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
@@ -246,8 +735,36 @@ protected DocumentProcessorServiceStubSettings(Builder settingsBuilder) throws I
batchProcessDocumentsSettings = settingsBuilder.batchProcessDocumentsSettings().build();
batchProcessDocumentsOperationSettings =
settingsBuilder.batchProcessDocumentsOperationSettings().build();
+ fetchProcessorTypesSettings = settingsBuilder.fetchProcessorTypesSettings().build();
+ listProcessorTypesSettings = settingsBuilder.listProcessorTypesSettings().build();
+ listProcessorsSettings = settingsBuilder.listProcessorsSettings().build();
+ getProcessorSettings = settingsBuilder.getProcessorSettings().build();
+ getProcessorVersionSettings = settingsBuilder.getProcessorVersionSettings().build();
+ listProcessorVersionsSettings = settingsBuilder.listProcessorVersionsSettings().build();
+ deleteProcessorVersionSettings = settingsBuilder.deleteProcessorVersionSettings().build();
+ deleteProcessorVersionOperationSettings =
+ settingsBuilder.deleteProcessorVersionOperationSettings().build();
+ deployProcessorVersionSettings = settingsBuilder.deployProcessorVersionSettings().build();
+ deployProcessorVersionOperationSettings =
+ settingsBuilder.deployProcessorVersionOperationSettings().build();
+ undeployProcessorVersionSettings = settingsBuilder.undeployProcessorVersionSettings().build();
+ undeployProcessorVersionOperationSettings =
+ settingsBuilder.undeployProcessorVersionOperationSettings().build();
+ createProcessorSettings = settingsBuilder.createProcessorSettings().build();
+ deleteProcessorSettings = settingsBuilder.deleteProcessorSettings().build();
+ deleteProcessorOperationSettings = settingsBuilder.deleteProcessorOperationSettings().build();
+ enableProcessorSettings = settingsBuilder.enableProcessorSettings().build();
+ enableProcessorOperationSettings = settingsBuilder.enableProcessorOperationSettings().build();
+ disableProcessorSettings = settingsBuilder.disableProcessorSettings().build();
+ disableProcessorOperationSettings = settingsBuilder.disableProcessorOperationSettings().build();
+ setDefaultProcessorVersionSettings =
+ settingsBuilder.setDefaultProcessorVersionSettings().build();
+ setDefaultProcessorVersionOperationSettings =
+ settingsBuilder.setDefaultProcessorVersionOperationSettings().build();
reviewDocumentSettings = settingsBuilder.reviewDocumentSettings().build();
reviewDocumentOperationSettings = settingsBuilder.reviewDocumentOperationSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
}
/** Builder for DocumentProcessorServiceStubSettings. */
@@ -261,11 +778,74 @@ public static class Builder
private final OperationCallSettings.Builder<
BatchProcessRequest, BatchProcessResponse, BatchProcessMetadata>
batchProcessDocumentsOperationSettings;
+ private final UnaryCallSettings.Builder
+ fetchProcessorTypesSettings;
+ private final PagedCallSettings.Builder<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ listProcessorTypesSettings;
+ private final PagedCallSettings.Builder<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ listProcessorsSettings;
+ private final UnaryCallSettings.Builder getProcessorSettings;
+ private final UnaryCallSettings.Builder
+ getProcessorVersionSettings;
+ private final PagedCallSettings.Builder<
+ ListProcessorVersionsRequest,
+ ListProcessorVersionsResponse,
+ ListProcessorVersionsPagedResponse>
+ listProcessorVersionsSettings;
+ private final UnaryCallSettings.Builder
+ deleteProcessorVersionSettings;
+ private final OperationCallSettings.Builder<
+ DeleteProcessorVersionRequest, Empty, DeleteProcessorVersionMetadata>
+ deleteProcessorVersionOperationSettings;
+ private final UnaryCallSettings.Builder
+ deployProcessorVersionSettings;
+ private final OperationCallSettings.Builder<
+ DeployProcessorVersionRequest,
+ DeployProcessorVersionResponse,
+ DeployProcessorVersionMetadata>
+ deployProcessorVersionOperationSettings;
+ private final UnaryCallSettings.Builder
+ undeployProcessorVersionSettings;
+ private final OperationCallSettings.Builder<
+ UndeployProcessorVersionRequest,
+ UndeployProcessorVersionResponse,
+ UndeployProcessorVersionMetadata>
+ undeployProcessorVersionOperationSettings;
+ private final UnaryCallSettings.Builder
+ createProcessorSettings;
+ private final UnaryCallSettings.Builder
+ deleteProcessorSettings;
+ private final OperationCallSettings.Builder<
+ DeleteProcessorRequest, Empty, DeleteProcessorMetadata>
+ deleteProcessorOperationSettings;
+ private final UnaryCallSettings.Builder
+ enableProcessorSettings;
+ private final OperationCallSettings.Builder<
+ EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata>
+ enableProcessorOperationSettings;
+ private final UnaryCallSettings.Builder
+ disableProcessorSettings;
+ private final OperationCallSettings.Builder<
+ DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata>
+ disableProcessorOperationSettings;
+ private final UnaryCallSettings.Builder
+ setDefaultProcessorVersionSettings;
+ private final OperationCallSettings.Builder<
+ SetDefaultProcessorVersionRequest,
+ SetDefaultProcessorVersionResponse,
+ SetDefaultProcessorVersionMetadata>
+ setDefaultProcessorVersionOperationSettings;
private final UnaryCallSettings.Builder
reviewDocumentSettings;
private final OperationCallSettings.Builder<
ReviewDocumentRequest, ReviewDocumentResponse, ReviewDocumentOperationMetadata>
reviewDocumentOperationSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -277,6 +857,7 @@ public static class Builder
ImmutableSet.copyOf(
Lists.newArrayList(
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -296,6 +877,8 @@ public static class Builder
.setTotalTimeout(Duration.ofMillis(120000L))
.build();
definitions.put("retry_policy_0_params", settings);
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
@@ -309,12 +892,54 @@ protected Builder(ClientContext clientContext) {
processDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
batchProcessDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
batchProcessDocumentsOperationSettings = OperationCallSettings.newBuilder();
+ fetchProcessorTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listProcessorTypesSettings = PagedCallSettings.newBuilder(LIST_PROCESSOR_TYPES_PAGE_STR_FACT);
+ listProcessorsSettings = PagedCallSettings.newBuilder(LIST_PROCESSORS_PAGE_STR_FACT);
+ getProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listProcessorVersionsSettings =
+ PagedCallSettings.newBuilder(LIST_PROCESSOR_VERSIONS_PAGE_STR_FACT);
+ deleteProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteProcessorVersionOperationSettings = OperationCallSettings.newBuilder();
+ deployProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deployProcessorVersionOperationSettings = OperationCallSettings.newBuilder();
+ undeployProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ undeployProcessorVersionOperationSettings = OperationCallSettings.newBuilder();
+ createProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteProcessorOperationSettings = OperationCallSettings.newBuilder();
+ enableProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ enableProcessorOperationSettings = OperationCallSettings.newBuilder();
+ disableProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ disableProcessorOperationSettings = OperationCallSettings.newBuilder();
+ setDefaultProcessorVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ setDefaultProcessorVersionOperationSettings = OperationCallSettings.newBuilder();
reviewDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
reviewDocumentOperationSettings = OperationCallSettings.newBuilder();
+ listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
+ getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- processDocumentSettings, batchProcessDocumentsSettings, reviewDocumentSettings);
+ processDocumentSettings,
+ batchProcessDocumentsSettings,
+ fetchProcessorTypesSettings,
+ listProcessorTypesSettings,
+ listProcessorsSettings,
+ getProcessorSettings,
+ getProcessorVersionSettings,
+ listProcessorVersionsSettings,
+ deleteProcessorVersionSettings,
+ deployProcessorVersionSettings,
+ undeployProcessorVersionSettings,
+ createProcessorSettings,
+ deleteProcessorSettings,
+ enableProcessorSettings,
+ disableProcessorSettings,
+ setDefaultProcessorVersionSettings,
+ reviewDocumentSettings,
+ listLocationsSettings,
+ getLocationSettings);
initDefaults(this);
}
@@ -325,12 +950,57 @@ protected Builder(DocumentProcessorServiceStubSettings settings) {
batchProcessDocumentsSettings = settings.batchProcessDocumentsSettings.toBuilder();
batchProcessDocumentsOperationSettings =
settings.batchProcessDocumentsOperationSettings.toBuilder();
+ fetchProcessorTypesSettings = settings.fetchProcessorTypesSettings.toBuilder();
+ listProcessorTypesSettings = settings.listProcessorTypesSettings.toBuilder();
+ listProcessorsSettings = settings.listProcessorsSettings.toBuilder();
+ getProcessorSettings = settings.getProcessorSettings.toBuilder();
+ getProcessorVersionSettings = settings.getProcessorVersionSettings.toBuilder();
+ listProcessorVersionsSettings = settings.listProcessorVersionsSettings.toBuilder();
+ deleteProcessorVersionSettings = settings.deleteProcessorVersionSettings.toBuilder();
+ deleteProcessorVersionOperationSettings =
+ settings.deleteProcessorVersionOperationSettings.toBuilder();
+ deployProcessorVersionSettings = settings.deployProcessorVersionSettings.toBuilder();
+ deployProcessorVersionOperationSettings =
+ settings.deployProcessorVersionOperationSettings.toBuilder();
+ undeployProcessorVersionSettings = settings.undeployProcessorVersionSettings.toBuilder();
+ undeployProcessorVersionOperationSettings =
+ settings.undeployProcessorVersionOperationSettings.toBuilder();
+ createProcessorSettings = settings.createProcessorSettings.toBuilder();
+ deleteProcessorSettings = settings.deleteProcessorSettings.toBuilder();
+ deleteProcessorOperationSettings = settings.deleteProcessorOperationSettings.toBuilder();
+ enableProcessorSettings = settings.enableProcessorSettings.toBuilder();
+ enableProcessorOperationSettings = settings.enableProcessorOperationSettings.toBuilder();
+ disableProcessorSettings = settings.disableProcessorSettings.toBuilder();
+ disableProcessorOperationSettings = settings.disableProcessorOperationSettings.toBuilder();
+ setDefaultProcessorVersionSettings = settings.setDefaultProcessorVersionSettings.toBuilder();
+ setDefaultProcessorVersionOperationSettings =
+ settings.setDefaultProcessorVersionOperationSettings.toBuilder();
reviewDocumentSettings = settings.reviewDocumentSettings.toBuilder();
reviewDocumentOperationSettings = settings.reviewDocumentOperationSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- processDocumentSettings, batchProcessDocumentsSettings, reviewDocumentSettings);
+ processDocumentSettings,
+ batchProcessDocumentsSettings,
+ fetchProcessorTypesSettings,
+ listProcessorTypesSettings,
+ listProcessorsSettings,
+ getProcessorSettings,
+ getProcessorVersionSettings,
+ listProcessorVersionsSettings,
+ deleteProcessorVersionSettings,
+ deployProcessorVersionSettings,
+ undeployProcessorVersionSettings,
+ createProcessorSettings,
+ deleteProcessorSettings,
+ enableProcessorSettings,
+ disableProcessorSettings,
+ setDefaultProcessorVersionSettings,
+ reviewDocumentSettings,
+ listLocationsSettings,
+ getLocationSettings);
}
private static Builder createDefault() {
@@ -370,11 +1040,91 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .fetchProcessorTypesSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listProcessorTypesSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listProcessorsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getProcessorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getProcessorVersionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listProcessorVersionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteProcessorVersionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deployProcessorVersionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .undeployProcessorVersionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .createProcessorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteProcessorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .enableProcessorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .disableProcessorSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .setDefaultProcessorVersionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.reviewDocumentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .listLocationsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getLocationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.batchProcessDocumentsOperationSettings()
.setInitialCallSettings(
@@ -399,6 +1149,182 @@ private static Builder initDefaults(Builder builder) {
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
+ builder
+ .deleteProcessorVersionOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(
+ DeleteProcessorVersionMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .deployProcessorVersionOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(
+ DeployProcessorVersionResponse.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(
+ DeployProcessorVersionMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .undeployProcessorVersionOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(
+ UndeployProcessorVersionResponse.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(
+ UndeployProcessorVersionMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .deleteProcessorOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(DeleteProcessorMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .enableProcessorOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(EnableProcessorResponse.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(EnableProcessorMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .disableProcessorOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(DisableProcessorResponse.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(DisableProcessorMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .setDefaultProcessorVersionOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .
+ newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(
+ SetDefaultProcessorVersionResponse.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(
+ SetDefaultProcessorVersionMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
builder
.reviewDocumentOperationSettings()
.setInitialCallSettings(
@@ -462,6 +1388,159 @@ public UnaryCallSettings.Builder processDocumen
return batchProcessDocumentsOperationSettings;
}
+ /** Returns the builder for the settings used for calls to fetchProcessorTypes. */
+ public UnaryCallSettings.Builder
+ fetchProcessorTypesSettings() {
+ return fetchProcessorTypesSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listProcessorTypes. */
+ public PagedCallSettings.Builder<
+ ListProcessorTypesRequest, ListProcessorTypesResponse, ListProcessorTypesPagedResponse>
+ listProcessorTypesSettings() {
+ return listProcessorTypesSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listProcessors. */
+ public PagedCallSettings.Builder<
+ ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>
+ listProcessorsSettings() {
+ return listProcessorsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getProcessor. */
+ public UnaryCallSettings.Builder getProcessorSettings() {
+ return getProcessorSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getProcessorVersion. */
+ public UnaryCallSettings.Builder