Skip to content

Commit

Permalink
feat: [documentai] A new field schema_override is added to message …
Browse files Browse the repository at this point in the history
…`ProcessOptions` (#10386)

* feat: A new field `schema_override` is added to message `ProcessOptions`
feat: A new field `labels` is added to messages `ProcessRequest` and `BatchProcessRequest`
feat: A new field `display_name` is added to message `DocumentSchema`
docs: updated comments

PiperOrigin-RevId: 607148983

Source-Link: googleapis/googleapis@9a9bc9b

Source-Link: https://github.com/googleapis/googleapis-gen/commit/b8c71bc205c3adea235dc876c215d2ceccbb66a8
Copy-Tag: eyJwIjoiamF2YS1kb2N1bWVudC1haS8uT3dsQm90LnlhbWwiLCJoIjoiYjhjNzFiYzIwNWMzYWRlYTIzNWRjODc2YzIxNWQyY2VjY2JiNjZhOCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 15, 2024
1 parent b4ec244 commit 728f841
Show file tree
Hide file tree
Showing 375 changed files with 2,514 additions and 858 deletions.
2 changes: 1 addition & 1 deletion java-document-ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-document-ai.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.38.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.39.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -749,6 +749,7 @@ public final ProcessResponse processDocument(String name) {
* .setSkipHumanReview(true)
* .setFieldMask(FieldMask.newBuilder().build())
* .setProcessOptions(ProcessOptions.newBuilder().build())
* .putAllLabels(new HashMap<String, String>())
* .build();
* ProcessResponse response = documentProcessorServiceClient.processDocument(request);
* }
Expand Down Expand Up @@ -781,6 +782,7 @@ public final ProcessResponse processDocument(ProcessRequest request) {
* .setSkipHumanReview(true)
* .setFieldMask(FieldMask.newBuilder().build())
* .setProcessOptions(ProcessOptions.newBuilder().build())
* .putAllLabels(new HashMap<String, String>())
* .build();
* ApiFuture<ProcessResponse> future =
* documentProcessorServiceClient.processDocumentCallable().futureCall(request);
Expand Down Expand Up @@ -885,6 +887,7 @@ public final UnaryCallable<ProcessRequest, ProcessResponse> processDocumentCalla
* .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build())
* .setSkipHumanReview(true)
* .setProcessOptions(ProcessOptions.newBuilder().build())
* .putAllLabels(new HashMap<String, String>())
* .build();
* BatchProcessResponse response =
* documentProcessorServiceClient.batchProcessDocumentsAsync(request).get();
Expand Down Expand Up @@ -921,6 +924,7 @@ public final UnaryCallable<ProcessRequest, ProcessResponse> processDocumentCalla
* .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build())
* .setSkipHumanReview(true)
* .setProcessOptions(ProcessOptions.newBuilder().build())
* .putAllLabels(new HashMap<String, String>())
* .build();
* OperationFuture<BatchProcessResponse, BatchProcessMetadata> future =
* documentProcessorServiceClient
Expand Down Expand Up @@ -958,6 +962,7 @@ public final UnaryCallable<ProcessRequest, ProcessResponse> processDocumentCalla
* .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build())
* .setSkipHumanReview(true)
* .setProcessOptions(ProcessOptions.newBuilder().build())
* .putAllLabels(new HashMap<String, String>())
* .build();
* ApiFuture<Operation> future =
* documentProcessorServiceClient.batchProcessDocumentsCallable().futureCall(request);
Expand Down Expand Up @@ -2692,10 +2697,10 @@ public final OperationFuture<Empty, DeleteProcessorVersionMetadata> deleteProces
* @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][google.cloud.documentai.v1.Processor.type] and [Processor.display_name]][]
* to be set. Also, the
* [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] field must be
* set if the processor is under CMEK.
* [Processor.type][google.cloud.documentai.v1.Processor.type] and
* [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set.
* Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] field
* must be set if the processor is under CMEK.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Processor createProcessor(LocationName parent, Processor processor) {
Expand Down Expand Up @@ -2731,10 +2736,10 @@ public final Processor createProcessor(LocationName parent, Processor 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][google.cloud.documentai.v1.Processor.type] and [Processor.display_name]][]
* to be set. Also, the
* [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] field must be
* set if the processor is under CMEK.
* [Processor.type][google.cloud.documentai.v1.Processor.type] and
* [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set.
* Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] field
* must be set if the processor is under CMEK.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Processor createProcessor(String parent, Processor processor) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -371,7 +371,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return DocumentProcessorServiceStubSettings.defaultTransportChannelProvider();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return DocumentProcessorServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -837,7 +837,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand All @@ -846,7 +845,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -125,7 +125,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return DocumentUnderstandingServiceStubSettings.defaultTransportChannelProvider();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return DocumentUnderstandingServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -176,7 +176,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -148,7 +148,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return DocumentUnderstandingServiceStubSettings.defaultTransportChannelProvider();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return DocumentUnderstandingServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -265,7 +265,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -389,7 +389,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return DocumentProcessorServiceStubSettings.defaultTransportChannelProvider();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return DocumentProcessorServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -193,7 +193,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return DocumentServiceStubSettings.defaultTransportChannelProvider();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return DocumentServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -863,7 +863,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand All @@ -872,7 +871,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 728f841

Please sign in to comment.