Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * FetchProcessorTypesResponse response = + * documentProcessorServiceClient.fetchProcessorTypes(parent); + * } + * }+ * + * @param parent Required. The project of processor type to list. Format: + * projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchProcessorTypesResponse fetchProcessorTypes(LocationName parent) { + FetchProcessorTypesRequest request = + FetchProcessorTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return fetchProcessorTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches processor types. + * + *
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * String parent = + * ProcessorTypeName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR_TYPE]").toString(); + * FetchProcessorTypesResponse response = + * documentProcessorServiceClient.fetchProcessorTypes(parent); + * } + * }+ * + * @param parent Required. The project of processor type to list. Format: + * projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchProcessorTypesResponse fetchProcessorTypes(String parent) { + FetchProcessorTypesRequest request = + FetchProcessorTypesRequest.newBuilder().setParent(parent).build(); + return fetchProcessorTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches processor types. + * + *
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * FetchProcessorTypesRequest request = + * FetchProcessorTypesRequest.newBuilder() + * .setParent( + * ProcessorTypeName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR_TYPE]").toString()) + * .build(); + * 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 FetchProcessorTypesResponse fetchProcessorTypes(FetchProcessorTypesRequest request) { + return fetchProcessorTypesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches processor types. + * + *
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * FetchProcessorTypesRequest request = + * FetchProcessorTypesRequest.newBuilder() + * .setParent( + * ProcessorTypeName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR_TYPE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * documentProcessorServiceClient.fetchProcessorTypesCallable().futureCall(request); + * // Do something. + * FetchProcessorTypesResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all processors which belong to this project. + * + *
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * String parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").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); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all processors which belong to this project. + * + *
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * ListProcessorsRequest request = + * ListProcessorsRequest.newBuilder() + * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").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); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all processors which belong to this project. + * + *
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * ListProcessorsRequest request = + * ListProcessorsRequest.newBuilder() + * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * documentProcessorServiceClient.listProcessorsPagedCallable().futureCall(request); + * // Do something. + * for (Processor element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * ListProcessorsRequest request = + * ListProcessorsRequest.newBuilder() + * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListProcessorsResponse response = + * documentProcessorServiceClient.listProcessorsCallable().call(request); + * for (Processor element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * 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 + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * String parent = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").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 + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * CreateProcessorRequest request = + * CreateProcessorRequest.newBuilder() + * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").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 + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * CreateProcessorRequest request = + * CreateProcessorRequest.newBuilder() + * .setParent(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .setProcessor(Processor.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * documentProcessorServiceClient.createProcessorCallable().futureCall(request); + * // Do something. + * Processor response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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
Sample code: + * + *
{@code + * 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
Sample code: + * + *
{@code + * 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
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * DeleteProcessorRequest request = + * DeleteProcessorRequest.newBuilder() + * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * documentProcessorServiceClient.deleteProcessorOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * DeleteProcessorRequest request = + * DeleteProcessorRequest.newBuilder() + * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * documentProcessorServiceClient.deleteProcessorCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * 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
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * EnableProcessorRequest request = + * EnableProcessorRequest.newBuilder() + * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .build(); + * OperationFuture+ */ + public final OperationCallable< + EnableProcessorRequest, EnableProcessorResponse, EnableProcessorMetadata> + enableProcessorOperationCallable() { + return stub.enableProcessorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a processor + * + *future = + * documentProcessorServiceClient.enableProcessorOperationCallable().futureCall(request); + * // Do something. + * EnableProcessorResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * EnableProcessorRequest request = + * EnableProcessorRequest.newBuilder() + * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * documentProcessorServiceClient.enableProcessorCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * DisableProcessorRequest request = + * DisableProcessorRequest.newBuilder() + * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .build(); + * OperationFuture+ */ + public final OperationCallable< + DisableProcessorRequest, DisableProcessorResponse, DisableProcessorMetadata> + disableProcessorOperationCallable() { + return stub.disableProcessorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a processor + * + *future = + * documentProcessorServiceClient.disableProcessorOperationCallable().futureCall(request); + * // Do something. + * DisableProcessorResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DocumentProcessorServiceClient documentProcessorServiceClient = + * DocumentProcessorServiceClient.create()) { + * DisableProcessorRequest request = + * DisableProcessorRequest.newBuilder() + * .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * documentProcessorServiceClient.disableProcessorCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
+ * Fetches processor types. + *+ */ + public void fetchProcessorTypes( + com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest request, + io.grpc.stub.StreamObserver
+ * Lists all processors which belong to this project. + *+ */ + public void listProcessors( + com.google.cloud.documentai.v1beta3.ListProcessorsRequest request, + io.grpc.stub.StreamObserver
+ * Creates a processor from the type processor that the user chose. + * The processor will be at "ENABLED" state by default after its creation. + *+ */ + public void createProcessor( + com.google.cloud.documentai.v1beta3.CreateProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Deletes the processor, unloads all deployed model artifacts if it was + * enabled and then deletes all artifacts associated with this processor. + *+ */ + public void deleteProcessor( + com.google.cloud.documentai.v1beta3.DeleteProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Enables a processor + *+ */ + public void enableProcessor( + com.google.cloud.documentai.v1beta3.EnableProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Disables a processor + *+ */ + public void disableProcessor( + com.google.cloud.documentai.v1beta3.DisableProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Fetches processor types. + *+ */ + public void fetchProcessorTypes( + com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest request, + io.grpc.stub.StreamObserver
+ * Lists all processors which belong to this project. + *+ */ + public void listProcessors( + com.google.cloud.documentai.v1beta3.ListProcessorsRequest request, + io.grpc.stub.StreamObserver
+ * Creates a processor from the type processor that the user chose. + * The processor will be at "ENABLED" state by default after its creation. + *+ */ + public void createProcessor( + com.google.cloud.documentai.v1beta3.CreateProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Deletes the processor, unloads all deployed model artifacts if it was + * enabled and then deletes all artifacts associated with this processor. + *+ */ + public void deleteProcessor( + com.google.cloud.documentai.v1beta3.DeleteProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Enables a processor + *+ */ + public void enableProcessor( + com.google.cloud.documentai.v1beta3.EnableProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Disables a processor + *+ */ + public void disableProcessor( + com.google.cloud.documentai.v1beta3.DisableProcessorRequest request, + io.grpc.stub.StreamObserver
+ * Fetches processor types. + *+ */ + public com.google.cloud.documentai.v1beta3.FetchProcessorTypesResponse fetchProcessorTypes( + com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchProcessorTypesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists all processors which belong to this project. + *+ */ + public com.google.cloud.documentai.v1beta3.ListProcessorsResponse listProcessors( + com.google.cloud.documentai.v1beta3.ListProcessorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProcessorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates a processor from the type processor that the user chose. + * The processor will be at "ENABLED" state by default after its creation. + *+ */ + public com.google.cloud.documentai.v1beta3.Processor createProcessor( + com.google.cloud.documentai.v1beta3.CreateProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProcessorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Deletes the processor, unloads all deployed model artifacts if it was + * enabled and then deletes all artifacts associated with this processor. + *+ */ + public com.google.longrunning.Operation deleteProcessor( + com.google.cloud.documentai.v1beta3.DeleteProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProcessorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Enables a processor + *+ */ + public com.google.longrunning.Operation enableProcessor( + com.google.cloud.documentai.v1beta3.EnableProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEnableProcessorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+ * Disables a processor + *+ */ + public com.google.longrunning.Operation disableProcessor( + com.google.cloud.documentai.v1beta3.DisableProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDisableProcessorMethod(), getCallOptions(), request); + } + /** * * @@ -498,6 +1099,90 @@ protected DocumentProcessorServiceFutureStub build( getChannel().newCall(getBatchProcessDocumentsMethod(), getCallOptions()), request); } + /** + * + * + *
+ * Fetches processor types. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.documentai.v1beta3.FetchProcessorTypesResponse> + fetchProcessorTypes( + com.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchProcessorTypesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Lists all processors which belong to this project. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.documentai.v1beta3.ListProcessorsResponse> + listProcessors(com.google.cloud.documentai.v1beta3.ListProcessorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProcessorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Creates a processor from the type processor that the user chose. + * The processor will be at "ENABLED" state by default after its creation. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.documentai.v1beta3.Processor> + createProcessor(com.google.cloud.documentai.v1beta3.CreateProcessorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProcessorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+ * Deletes the processor, unloads all deployed model artifacts if it was + * enabled and then deletes all artifacts associated with this processor. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Enables a processor + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Disables a processor + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ *
+ * @return Whether the provenance field is set.
+ */
+ boolean hasProvenance();
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ *
+ * @return The provenance.
+ */
+ com.google.cloud.documentai.v1.Document.Provenance getProvenance();
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder();
}
/**
*
@@ -5006,6 +5041,23 @@ private Page(
extensionRegistry));
break;
}
+ case 130:
+ {
+ com.google.cloud.documentai.v1.Document.Provenance.Builder subBuilder = null;
+ if (provenance_ != null) {
+ subBuilder = provenance_.toBuilder();
+ }
+ provenance_ =
+ input.readMessage(
+ com.google.cloud.documentai.v1.Document.Provenance.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(provenance_);
+ provenance_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -24576,6 +24628,41 @@ com.google.cloud.documentai.v1.Document.Page.DetectedLanguage getValueDetectedLa
* @return The bytes for valueType.
*/
com.google.protobuf.ByteString getValueTypeBytes();
+
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ *
+ * @return Whether the provenance field is set.
+ */
+ boolean hasProvenance();
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ *
+ * @return The provenance.
+ */
+ com.google.cloud.documentai.v1.Document.Provenance getProvenance();
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder();
}
/**
*
@@ -24699,6 +24786,23 @@ private FormField(
java.lang.String s = input.readStringRequireUtf8();
valueType_ = s;
+ break;
+ }
+ case 66:
+ {
+ com.google.cloud.documentai.v1.Document.Provenance.Builder subBuilder = null;
+ if (provenance_ != null) {
+ subBuilder = provenance_.toBuilder();
+ }
+ provenance_ =
+ input.readMessage(
+ com.google.cloud.documentai.v1.Document.Provenance.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(provenance_);
+ provenance_ = subBuilder.buildPartial();
+ }
+
break;
}
default:
@@ -25067,6 +25171,54 @@ public com.google.protobuf.ByteString getValueTypeBytes() {
}
}
+ public static final int PROVENANCE_FIELD_NUMBER = 8;
+ private com.google.cloud.documentai.v1.Document.Provenance provenance_;
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ *
+ * @return Whether the provenance field is set.
+ */
+ @java.lang.Override
+ public boolean hasProvenance() {
+ return provenance_ != null;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ *
+ * @return The provenance.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1.Document.Provenance getProvenance() {
+ return provenance_ == null
+ ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance()
+ : provenance_;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder() {
+ return getProvenance();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -25096,6 +25248,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getValueTypeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueType_);
}
+ if (provenance_ != null) {
+ output.writeMessage(8, getProvenance());
+ }
unknownFields.writeTo(output);
}
@@ -25124,6 +25279,9 @@ public int getSerializedSize() {
if (!getValueTypeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueType_);
}
+ if (provenance_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getProvenance());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -25153,6 +25311,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getValueDetectedLanguagesList().equals(other.getValueDetectedLanguagesList()))
return false;
if (!getValueType().equals(other.getValueType())) return false;
+ if (hasProvenance() != other.hasProvenance()) return false;
+ if (hasProvenance()) {
+ if (!getProvenance().equals(other.getProvenance())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -25182,6 +25344,10 @@ public int hashCode() {
}
hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getValueType().hashCode();
+ if (hasProvenance()) {
+ hash = (37 * hash) + PROVENANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getProvenance().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -25359,6 +25525,12 @@ public Builder clear() {
}
valueType_ = "";
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
return this;
}
@@ -25418,6 +25590,11 @@ public com.google.cloud.documentai.v1.Document.Page.FormField buildPartial() {
result.valueDetectedLanguages_ = valueDetectedLanguagesBuilder_.build();
}
result.valueType_ = valueType_;
+ if (provenanceBuilder_ == null) {
+ result.provenance_ = provenance_;
+ } else {
+ result.provenance_ = provenanceBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -25534,6 +25711,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Page.FormField
valueType_ = other.valueType_;
onChanged();
}
+ if (other.hasProvenance()) {
+ mergeProvenance(other.getProvenance());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -26897,6 +27077,193 @@ public Builder setValueTypeBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private com.google.cloud.documentai.v1.Document.Provenance provenance_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1.Document.Provenance,
+ com.google.cloud.documentai.v1.Document.Provenance.Builder,
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>
+ provenanceBuilder_;
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ *
+ * @return Whether the provenance field is set.
+ */
+ public boolean hasProvenance() {
+ return provenanceBuilder_ != null || provenance_ != null;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ *
+ * @return The provenance.
+ */
+ public com.google.cloud.documentai.v1.Document.Provenance getProvenance() {
+ if (provenanceBuilder_ == null) {
+ return provenance_ == null
+ ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance()
+ : provenance_;
+ } else {
+ return provenanceBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ public Builder setProvenance(com.google.cloud.documentai.v1.Document.Provenance value) {
+ if (provenanceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ provenance_ = value;
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ public Builder setProvenance(
+ com.google.cloud.documentai.v1.Document.Provenance.Builder builderForValue) {
+ if (provenanceBuilder_ == null) {
+ provenance_ = builderForValue.build();
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ public Builder mergeProvenance(com.google.cloud.documentai.v1.Document.Provenance value) {
+ if (provenanceBuilder_ == null) {
+ if (provenance_ != null) {
+ provenance_ =
+ com.google.cloud.documentai.v1.Document.Provenance.newBuilder(provenance_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ provenance_ = value;
+ }
+ onChanged();
+ } else {
+ provenanceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ public Builder clearProvenance() {
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ onChanged();
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ public com.google.cloud.documentai.v1.Document.Provenance.Builder getProvenanceBuilder() {
+
+ onChanged();
+ return getProvenanceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder
+ getProvenanceOrBuilder() {
+ if (provenanceBuilder_ != null) {
+ return provenanceBuilder_.getMessageOrBuilder();
+ } else {
+ return provenance_ == null
+ ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance()
+ : provenance_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The history of this annotation. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1.Document.Provenance,
+ com.google.cloud.documentai.v1.Document.Provenance.Builder,
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>
+ getProvenanceFieldBuilder() {
+ if (provenanceBuilder_ == null) {
+ provenanceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1.Document.Provenance,
+ com.google.cloud.documentai.v1.Document.Provenance.Builder,
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>(
+ getProvenance(), getParentForChildren(), isClean());
+ provenance_ = null;
+ }
+ return provenanceBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -28588,6 +28955,54 @@ public com.google.cloud.documentai.v1.Document.Page.FormFieldOrBuilder getFormFi
return formFields_.get(index);
}
+ public static final int PROVENANCE_FIELD_NUMBER = 16;
+ private com.google.cloud.documentai.v1.Document.Provenance provenance_;
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ *
+ * @return Whether the provenance field is set.
+ */
+ @java.lang.Override
+ public boolean hasProvenance() {
+ return provenance_ != null;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ *
+ * @return The provenance.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1.Document.Provenance getProvenance() {
+ return provenance_ == null
+ ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance()
+ : provenance_;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder() {
+ return getProvenance();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -28641,6 +29056,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < transforms_.size(); i++) {
output.writeMessage(14, transforms_.get(i));
}
+ if (provenance_ != null) {
+ output.writeMessage(16, getProvenance());
+ }
unknownFields.writeTo(output);
}
@@ -28690,6 +29108,9 @@ public int getSerializedSize() {
for (int i = 0; i < transforms_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, transforms_.get(i));
}
+ if (provenance_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getProvenance());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -28728,6 +29149,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getVisualElementsList().equals(other.getVisualElementsList())) return false;
if (!getTablesList().equals(other.getTablesList())) return false;
if (!getFormFieldsList().equals(other.getFormFieldsList())) return false;
+ if (hasProvenance() != other.hasProvenance()) return false;
+ if (hasProvenance()) {
+ if (!getProvenance().equals(other.getProvenance())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -28789,6 +29214,10 @@ public int hashCode() {
hash = (37 * hash) + FORM_FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getFormFieldsList().hashCode();
}
+ if (hasProvenance()) {
+ hash = (37 * hash) + PROVENANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getProvenance().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -29020,6 +29449,12 @@ public Builder clear() {
} else {
formFieldsBuilder_.clear();
}
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
return this;
}
@@ -29145,6 +29580,11 @@ public com.google.cloud.documentai.v1.Document.Page buildPartial() {
} else {
result.formFields_ = formFieldsBuilder_.build();
}
+ if (provenanceBuilder_ == null) {
+ result.provenance_ = provenance_;
+ } else {
+ result.provenance_ = provenanceBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -29451,6 +29891,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Page other) {
}
}
}
+ if (other.hasProvenance()) {
+ mergeProvenance(other.getProvenance());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -33535,6 +33978,192 @@ public com.google.cloud.documentai.v1.Document.Page.FormField.Builder addFormFie
return formFieldsBuilder_;
}
+ private com.google.cloud.documentai.v1.Document.Provenance provenance_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1.Document.Provenance,
+ com.google.cloud.documentai.v1.Document.Provenance.Builder,
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>
+ provenanceBuilder_;
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ *
+ * @return Whether the provenance field is set.
+ */
+ public boolean hasProvenance() {
+ return provenanceBuilder_ != null || provenance_ != null;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ *
+ * @return The provenance.
+ */
+ public com.google.cloud.documentai.v1.Document.Provenance getProvenance() {
+ if (provenanceBuilder_ == null) {
+ return provenance_ == null
+ ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance()
+ : provenance_;
+ } else {
+ return provenanceBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ public Builder setProvenance(com.google.cloud.documentai.v1.Document.Provenance value) {
+ if (provenanceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ provenance_ = value;
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ public Builder setProvenance(
+ com.google.cloud.documentai.v1.Document.Provenance.Builder builderForValue) {
+ if (provenanceBuilder_ == null) {
+ provenance_ = builderForValue.build();
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ public Builder mergeProvenance(com.google.cloud.documentai.v1.Document.Provenance value) {
+ if (provenanceBuilder_ == null) {
+ if (provenance_ != null) {
+ provenance_ =
+ com.google.cloud.documentai.v1.Document.Provenance.newBuilder(provenance_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ provenance_ = value;
+ }
+ onChanged();
+ } else {
+ provenanceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ public Builder clearProvenance() {
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ onChanged();
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ public com.google.cloud.documentai.v1.Document.Provenance.Builder getProvenanceBuilder() {
+
+ onChanged();
+ return getProvenanceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ public com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder getProvenanceOrBuilder() {
+ if (provenanceBuilder_ != null) {
+ return provenanceBuilder_.getMessageOrBuilder();
+ } else {
+ return provenance_ == null
+ ? com.google.cloud.documentai.v1.Document.Provenance.getDefaultInstance()
+ : provenance_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The history of this page. + *+ * + *
.google.cloud.documentai.v1.Document.Provenance provenance = 16;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1.Document.Provenance,
+ com.google.cloud.documentai.v1.Document.Provenance.Builder,
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>
+ getProvenanceFieldBuilder() {
+ if (provenanceBuilder_ == null) {
+ provenanceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1.Document.Provenance,
+ com.google.cloud.documentai.v1.Document.Provenance.Builder,
+ com.google.cloud.documentai.v1.Document.ProvenanceOrBuilder>(
+ getProvenance(), getParentForChildren(), isClean());
+ provenance_ = null;
+ }
+ return provenanceBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -42723,6 +43352,8 @@ public interface PageRefOrBuilder
* * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * [Document.pages][page_refs.page] to locate the related page element. + * This field is skipped when its value is the default 0. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. ** *
int64 page = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -43249,6 +43880,8 @@ private LayoutType(int value) {
* * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * [Document.pages][page_refs.page] to locate the related page element. + * This field is skipped when its value is the default 0. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. ** *
int64 page = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -43841,6 +44474,8 @@ public Builder mergeFrom(
* * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * [Document.pages][page_refs.page] to locate the related page element. + * This field is skipped when its value is the default 0. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. ** *
int64 page = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -43857,6 +44492,8 @@ public long getPage() {
* * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * [Document.pages][page_refs.page] to locate the related page element. + * This field is skipped when its value is the default 0. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. ** *
int64 page = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -43876,6 +44513,8 @@ public Builder setPage(long value) {
* * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * [Document.pages][page_refs.page] to locate the related page element. + * This field is skipped when its value is the default 0. See + * https://developers.google.com/protocol-buffers/docs/proto3#json. ** *
int64 page = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -45322,10 +45961,11 @@ public interface ProvenanceOrBuilder
* revision.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return The id.
*/
+ @java.lang.Deprecated
int getId();
/**
@@ -45798,6 +46438,20 @@ public interface ParentOrBuilder
*/
int getRevision();
+ /**
+ *
+ *
+ * + * The index of the parent revisions corresponding collection of items + * (eg. list of entities, properties within entities, etc.) + *+ * + *
int32 index = 3;
+ *
+ * @return The index.
+ */
+ int getIndex();
+
/**
*
*
@@ -45805,10 +46459,11 @@ public interface ParentOrBuilder
* The id of the parent provenance.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return The id.
*/
+ @java.lang.Deprecated
int getId();
}
/**
@@ -45873,6 +46528,11 @@ private Parent(
id_ = input.readInt32();
break;
}
+ case 24:
+ {
+ index_ = input.readInt32();
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -45926,6 +46586,25 @@ public int getRevision() {
return revision_;
}
+ public static final int INDEX_FIELD_NUMBER = 3;
+ private int index_;
+ /**
+ *
+ *
+ * + * The index of the parent revisions corresponding collection of items + * (eg. list of entities, properties within entities, etc.) + *+ * + *
int32 index = 3;
+ *
+ * @return The index.
+ */
+ @java.lang.Override
+ public int getIndex() {
+ return index_;
+ }
+
public static final int ID_FIELD_NUMBER = 2;
private int id_;
/**
@@ -45935,11 +46614,12 @@ public int getRevision() {
* The id of the parent provenance.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return The id.
*/
@java.lang.Override
+ @java.lang.Deprecated
public int getId() {
return id_;
}
@@ -45964,6 +46644,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (id_ != 0) {
output.writeInt32(2, id_);
}
+ if (index_ != 0) {
+ output.writeInt32(3, index_);
+ }
unknownFields.writeTo(output);
}
@@ -45979,6 +46662,9 @@ public int getSerializedSize() {
if (id_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, id_);
}
+ if (index_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, index_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -45996,6 +46682,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.documentai.v1.Document.Provenance.Parent) obj;
if (getRevision() != other.getRevision()) return false;
+ if (getIndex() != other.getIndex()) return false;
if (getId() != other.getId()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
@@ -46010,6 +46697,8 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + getRevision();
+ hash = (37 * hash) + INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + getIndex();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId();
hash = (29 * hash) + unknownFields.hashCode();
@@ -46164,6 +46853,8 @@ public Builder clear() {
super.clear();
revision_ = 0;
+ index_ = 0;
+
id_ = 0;
return this;
@@ -46195,6 +46886,7 @@ public com.google.cloud.documentai.v1.Document.Provenance.Parent buildPartial()
com.google.cloud.documentai.v1.Document.Provenance.Parent result =
new com.google.cloud.documentai.v1.Document.Provenance.Parent(this);
result.revision_ = revision_;
+ result.index_ = index_;
result.id_ = id_;
onBuilt();
return result;
@@ -46252,6 +46944,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Document.Provenance.Pare
if (other.getRevision() != 0) {
setRevision(other.getRevision());
}
+ if (other.getIndex() != 0) {
+ setIndex(other.getIndex());
+ }
if (other.getId() != 0) {
setId(other.getId());
}
@@ -46338,6 +47033,61 @@ public Builder clearRevision() {
return this;
}
+ private int index_;
+ /**
+ *
+ *
+ * + * The index of the parent revisions corresponding collection of items + * (eg. list of entities, properties within entities, etc.) + *+ * + *
int32 index = 3;
+ *
+ * @return The index.
+ */
+ @java.lang.Override
+ public int getIndex() {
+ return index_;
+ }
+ /**
+ *
+ *
+ * + * The index of the parent revisions corresponding collection of items + * (eg. list of entities, properties within entities, etc.) + *+ * + *
int32 index = 3;
+ *
+ * @param value The index to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIndex(int value) {
+
+ index_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The index of the parent revisions corresponding collection of items + * (eg. list of entities, properties within entities, etc.) + *+ * + *
int32 index = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIndex() {
+
+ index_ = 0;
+ onChanged();
+ return this;
+ }
+
private int id_;
/**
*
@@ -46346,11 +47096,12 @@ public Builder clearRevision() {
* The id of the parent provenance.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return The id.
*/
@java.lang.Override
+ @java.lang.Deprecated
public int getId() {
return id_;
}
@@ -46361,11 +47112,12 @@ public int getId() {
* The id of the parent provenance.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @param value The id to set.
* @return This builder for chaining.
*/
+ @java.lang.Deprecated
public Builder setId(int value) {
id_ = value;
@@ -46379,10 +47131,11 @@ public Builder setId(int value) {
* The id of the parent provenance.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return This builder for chaining.
*/
+ @java.lang.Deprecated
public Builder clearId() {
id_ = 0;
@@ -46471,11 +47224,12 @@ public int getRevision() {
* revision.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return The id.
*/
@java.lang.Override
+ @java.lang.Deprecated
public int getId() {
return id_;
}
@@ -47067,11 +47821,12 @@ public Builder clearRevision() {
* revision.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return The id.
*/
@java.lang.Override
+ @java.lang.Deprecated
public int getId() {
return id_;
}
@@ -47083,11 +47838,12 @@ public int getId() {
* revision.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @param value The id to set.
* @return This builder for chaining.
*/
+ @java.lang.Deprecated
public Builder setId(int value) {
id_ = value;
@@ -47102,10 +47858,11 @@ public Builder setId(int value) {
* revision.
*
*
- * int32 id = 2;
+ * int32 id = 2 [deprecated = true];
*
* @return This builder for chaining.
*/
+ @java.lang.Deprecated
public Builder clearId() {
id_ = 0;
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java
index b99c68ab..bb9032f5 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentAiProcessorService.java
@@ -127,49 +127,53 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "manReviewStatus\"r\n\005State\022\025\n\021STATE_UNSPEC"
+ "IFIED\020\000\022\013\n\007WAITING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUC"
+ "CEEDED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005\022"
- + "\n\n\006FAILED\020\006\"\264\001\n\025ReviewDocumentRequest\022?\n"
+ + "\n\n\006FAILED\020\006\"\317\002\n\025ReviewDocumentRequest\022?\n"
+ "\017inline_document\030\004 \001(\0132$.google.cloud.do"
+ "cumentai.v1.DocumentH\000\022P\n\023human_review_c"
+ "onfig\030\001 \001(\tB3\340A\002\372A-\n+documentai.googleap"
- + "is.com/HumanReviewConfigB\010\n\006source\"1\n\026Re"
- + "viewDocumentResponse\022\027\n\017gcs_destination\030"
- + "\001 \001(\t\"o\n\037ReviewDocumentOperationMetadata"
- + "\022L\n\017common_metadata\030\005 \001(\01323.google.cloud"
- + ".documentai.v1.CommonOperationMetadata2\253"
- + "\006\n\030DocumentProcessorService\022\264\001\n\017ProcessD"
- + "ocument\022*.google.cloud.documentai.v1.Pro"
- + "cessRequest\032+.google.cloud.documentai.v1"
- + ".ProcessResponse\"H\202\323\344\223\002;\"6/v1/{name=proj"
- + "ects/*/locations/*/processors/*}:process"
- + ":\001*\332A\004name\022\345\001\n\025BatchProcessDocuments\022/.g"
- + "oogle.cloud.documentai.v1.BatchProcessRe"
- + "quest\032\035.google.longrunning.Operation\"|\202\323"
- + "\344\223\002@\";/v1/{name=projects/*/locations/*/p"
- + "rocessors/*}:batchProcess:\001*\332A\004name\312A,\n\024"
- + "BatchProcessResponse\022\024BatchProcessMetada"
- + "ta\022\240\002\n\016ReviewDocument\0221.google.cloud.doc"
- + "umentai.v1.ReviewDocumentRequest\032\035.googl"
- + "e.longrunning.Operation\"\273\001\202\323\344\223\002c\"^/v1/{h"
- + "uman_review_config=projects/*/locations/"
- + "*/processors/*/humanReviewConfig}:review"
- + "Document:\001*\332A\023human_review_config\312A9\n\026Re"
- + "viewDocumentResponse\022\037ReviewDocumentOper"
- + "ationMetadata\032M\312A\031documentai.googleapis."
- + "com\322A.https://www.googleapis.com/auth/cl"
- + "oud-platformB\230\004\n\036com.google.cloud.docume"
- + "ntai.v1B\032DocumentAiProcessorServiceP\001ZDg"
- + "oogle.golang.org/genproto/googleapis/clo"
- + "ud/documentai/v1;documentai\252\002\032Google.Clo"
- + "ud.DocumentAI.V1\312\002\032Google\\Cloud\\Document"
- + "AI\\V1\352\002\035Google::Cloud::DocumentAI::V1\352AM"
- + "\n\"documentai.googleapis.com/Location\022\'pr"
- + "ojects/{project}/locations/{location}\352Ae"
- + "\n#documentai.googleapis.com/Processor\022>p"
- + "rojects/{project}/locations/{location}/p"
- + "rocessors/{processor}\352A\177\n+documentai.goo"
- + "gleapis.com/HumanReviewConfig\022Pprojects/"
- + "{project}/locations/{location}/processor"
- + "s/{processor}/humanReviewConfigb\006proto3"
+ + "is.com/HumanReviewConfig\022 \n\030enable_schem"
+ + "a_validation\030\003 \001(\010\022L\n\010priority\030\005 \001(\0162:.g"
+ + "oogle.cloud.documentai.v1.ReviewDocument"
+ + "Request.Priority\"#\n\010Priority\022\013\n\007DEFAULT\020"
+ + "\000\022\n\n\006URGENT\020\001B\010\n\006sourceJ\004\010\002\020\003\"1\n\026ReviewD"
+ + "ocumentResponse\022\027\n\017gcs_destination\030\001 \001(\t"
+ + "\"o\n\037ReviewDocumentOperationMetadata\022L\n\017c"
+ + "ommon_metadata\030\005 \001(\01323.google.cloud.docu"
+ + "mentai.v1.CommonOperationMetadata2\253\006\n\030Do"
+ + "cumentProcessorService\022\264\001\n\017ProcessDocume"
+ + "nt\022*.google.cloud.documentai.v1.ProcessR"
+ + "equest\032+.google.cloud.documentai.v1.Proc"
+ + "essResponse\"H\202\323\344\223\002;\"6/v1/{name=projects/"
+ + "*/locations/*/processors/*}:process:\001*\332A"
+ + "\004name\022\345\001\n\025BatchProcessDocuments\022/.google"
+ + ".cloud.documentai.v1.BatchProcessRequest"
+ + "\032\035.google.longrunning.Operation\"|\202\323\344\223\002@\""
+ + ";/v1/{name=projects/*/locations/*/proces"
+ + "sors/*}:batchProcess:\001*\332A\004name\312A,\n\024Batch"
+ + "ProcessResponse\022\024BatchProcessMetadata\022\240\002"
+ + "\n\016ReviewDocument\0221.google.cloud.document"
+ + "ai.v1.ReviewDocumentRequest\032\035.google.lon"
+ + "grunning.Operation\"\273\001\202\323\344\223\002c\"^/v1/{human_"
+ + "review_config=projects/*/locations/*/pro"
+ + "cessors/*/humanReviewConfig}:reviewDocum"
+ + "ent:\001*\332A\023human_review_config\312A9\n\026ReviewD"
+ + "ocumentResponse\022\037ReviewDocumentOperation"
+ + "Metadata\032M\312A\031documentai.googleapis.com\322A"
+ + ".https://www.googleapis.com/auth/cloud-p"
+ + "latformB\230\004\n\036com.google.cloud.documentai."
+ + "v1B\032DocumentAiProcessorServiceP\001ZDgoogle"
+ + ".golang.org/genproto/googleapis/cloud/do"
+ + "cumentai/v1;documentai\252\002\032Google.Cloud.Do"
+ + "cumentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V1"
+ + "\352\002\035Google::Cloud::DocumentAI::V1\352AM\n\"doc"
+ + "umentai.googleapis.com/Location\022\'project"
+ + "s/{project}/locations/{location}\352Ae\n#doc"
+ + "umentai.googleapis.com/Processor\022>projec"
+ + "ts/{project}/locations/{location}/proces"
+ + "sors/{processor}\352A\177\n+documentai.googleap"
+ + "is.com/HumanReviewConfig\022Pprojects/{proj"
+ + "ect}/locations/{location}/processors/{pr"
+ + "ocessor}/humanReviewConfigb\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -249,7 +253,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_documentai_v1_ReviewDocumentRequest_descriptor,
new java.lang.String[] {
- "InlineDocument", "HumanReviewConfig", "Source",
+ "InlineDocument", "HumanReviewConfig", "EnableSchemaValidation", "Priority", "Source",
});
internal_static_google_cloud_documentai_v1_ReviewDocumentResponse_descriptor =
getDescriptor().getMessageTypes().get(7);
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java
index f906f4ff..236b75c9 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/DocumentProto.java
@@ -173,7 +173,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ype/date.proto\032\032google/type/datetime.pro"
+ "to\032\027google/type/money.proto\032 google/type"
+ "/postal_address.proto\032\034google/api/annota"
- + "tions.proto\"\2468\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340"
+ + "tions.proto\"\3079\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340"
+ "A\001H\000\022\026\n\007content\030\002 \001(\014B\003\340A\001H\000\022\021\n\tmime_typ"
+ "e\030\003 \001(\t\022\021\n\004text\030\004 \001(\tB\003\340A\001\022?\n\013text_style"
+ "s\030\005 \003(\0132*.google.cloud.documentai.v1.Doc"
@@ -198,7 +198,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "yle\030\005 \001(\t\022\027\n\017text_decoration\030\006 \001(\t\022F\n\tfo"
+ "nt_size\030\007 \001(\01323.google.cloud.documentai."
+ "v1.Document.Style.FontSize\032&\n\010FontSize\022\014"
- + "\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\376\035\n\004Page\022\023\n\013p"
+ + "\n\004size\030\001 \001(\002\022\014\n\004unit\030\002 \001(\t\032\210\037\n\004Page\022\023\n\013p"
+ "age_number\030\001 \001(\005\022>\n\005image\030\r \001(\0132/.google"
+ ".cloud.documentai.v1.Document.Page.Image"
+ "\022D\n\ntransforms\030\016 \003(\01320.google.cloud.docu"
@@ -220,145 +220,150 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ment\022?\n\006tables\030\n \003(\0132/.google.cloud.docu"
+ "mentai.v1.Document.Page.Table\022H\n\013form_fi"
+ "elds\030\013 \003(\01323.google.cloud.documentai.v1."
- + "Document.Page.FormField\0328\n\tDimension\022\r\n\005"
- + "width\030\001 \001(\002\022\016\n\006height\030\002 \001(\002\022\014\n\004unit\030\003 \001("
- + "\t\032J\n\005Image\022\017\n\007content\030\001 \001(\014\022\021\n\tmime_type"
- + "\030\002 \001(\t\022\r\n\005width\030\003 \001(\005\022\016\n\006height\030\004 \001(\005\032@\n"
- + "\006Matrix\022\014\n\004rows\030\001 \001(\005\022\014\n\004cols\030\002 \001(\005\022\014\n\004t"
- + "ype\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\032\335\002\n\006Layout\022D\n\013te"
- + "xt_anchor\030\001 \001(\0132/.google.cloud.documenta"
- + "i.v1.Document.TextAnchor\022\022\n\nconfidence\030\002"
- + " \001(\002\022?\n\rbounding_poly\030\003 \001(\0132(.google.clo"
- + "ud.documentai.v1.BoundingPoly\022Q\n\013orienta"
- + "tion\030\004 \001(\0162<.google.cloud.documentai.v1."
- + "Document.Page.Layout.Orientation\"e\n\013Orie"
- + "ntation\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007"
- + "PAGE_UP\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003"
- + "\022\r\n\tPAGE_LEFT\020\004\032\346\001\n\005Block\022@\n\006layout\030\001 \001("
- + "\01320.google.cloud.documentai.v1.Document."
- + "Page.Layout\022V\n\022detected_languages\030\002 \003(\0132"
- + ":.google.cloud.documentai.v1.Document.Pa"
- + "ge.DetectedLanguage\022C\n\nprovenance\030\003 \001(\0132"
- + "/.google.cloud.documentai.v1.Document.Pr"
- + "ovenance\032\352\001\n\tParagraph\022@\n\006layout\030\001 \001(\01320"
- + ".google.cloud.documentai.v1.Document.Pag"
- + "e.Layout\022V\n\022detected_languages\030\002 \003(\0132:.g"
- + "oogle.cloud.documentai.v1.Document.Page."
- + "DetectedLanguage\022C\n\nprovenance\030\003 \001(\0132/.g"
- + "oogle.cloud.documentai.v1.Document.Prove"
- + "nance\032\345\001\n\004Line\022@\n\006layout\030\001 \001(\01320.google."
+ + "Document.Page.FormField\022C\n\nprovenance\030\020 "
+ + "\001(\0132/.google.cloud.documentai.v1.Documen"
+ + "t.Provenance\0328\n\tDimension\022\r\n\005width\030\001 \001(\002"
+ + "\022\016\n\006height\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032J\n\005Image\022"
+ + "\017\n\007content\030\001 \001(\014\022\021\n\tmime_type\030\002 \001(\t\022\r\n\005w"
+ + "idth\030\003 \001(\005\022\016\n\006height\030\004 \001(\005\032@\n\006Matrix\022\014\n\004"
+ + "rows\030\001 \001(\005\022\014\n\004cols\030\002 \001(\005\022\014\n\004type\030\003 \001(\005\022\014"
+ + "\n\004data\030\004 \001(\014\032\335\002\n\006Layout\022D\n\013text_anchor\030\001"
+ + " \001(\0132/.google.cloud.documentai.v1.Docume"
+ + "nt.TextAnchor\022\022\n\nconfidence\030\002 \001(\002\022?\n\rbou"
+ + "nding_poly\030\003 \001(\0132(.google.cloud.document"
+ + "ai.v1.BoundingPoly\022Q\n\013orientation\030\004 \001(\0162"
+ + "<.google.cloud.documentai.v1.Document.Pa"
+ + "ge.Layout.Orientation\"e\n\013Orientation\022\033\n\027"
+ + "ORIENTATION_UNSPECIFIED\020\000\022\013\n\007PAGE_UP\020\001\022\016"
+ + "\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n\tPAGE_LE"
+ + "FT\020\004\032\346\001\n\005Block\022@\n\006layout\030\001 \001(\01320.google."
+ "cloud.documentai.v1.Document.Page.Layout"
+ "\022V\n\022detected_languages\030\002 \003(\0132:.google.cl"
+ "oud.documentai.v1.Document.Page.Detected"
+ "Language\022C\n\nprovenance\030\003 \001(\0132/.google.cl"
- + "oud.documentai.v1.Document.Provenance\032\346\003"
- + "\n\005Token\022@\n\006layout\030\001 \001(\01320.google.cloud.d"
- + "ocumentai.v1.Document.Page.Layout\022U\n\016det"
- + "ected_break\030\002 \001(\0132=.google.cloud.documen"
- + "tai.v1.Document.Page.Token.DetectedBreak"
- + "\022V\n\022detected_languages\030\003 \003(\0132:.google.cl"
- + "oud.documentai.v1.Document.Page.Detected"
- + "Language\022C\n\nprovenance\030\004 \001(\0132/.google.cl"
- + "oud.documentai.v1.Document.Provenance\032\246\001"
- + "\n\rDetectedBreak\022P\n\004type\030\001 \001(\0162B.google.c"
- + "loud.documentai.v1.Document.Page.Token.D"
- + "etectedBreak.Type\"C\n\004Type\022\024\n\020TYPE_UNSPEC"
- + "IFIED\020\000\022\t\n\005SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HY"
- + "PHEN\020\003\032\267\001\n\rVisualElement\022@\n\006layout\030\001 \001(\013"
- + "20.google.cloud.documentai.v1.Document.P"
- + "age.Layout\022\014\n\004type\030\002 \001(\t\022V\n\022detected_lan"
- + "guages\030\003 \003(\0132:.google.cloud.documentai.v"
- + "1.Document.Page.DetectedLanguage\032\337\004\n\005Tab"
- + "le\022@\n\006layout\030\001 \001(\01320.google.cloud.docume"
- + "ntai.v1.Document.Page.Layout\022M\n\013header_r"
- + "ows\030\002 \003(\01328.google.cloud.documentai.v1.D"
- + "ocument.Page.Table.TableRow\022K\n\tbody_rows"
- + "\030\003 \003(\01328.google.cloud.documentai.v1.Docu"
- + "ment.Page.Table.TableRow\022V\n\022detected_lan"
- + "guages\030\004 \003(\0132:.google.cloud.documentai.v"
- + "1.Document.Page.DetectedLanguage\032T\n\010Tabl"
- + "eRow\022H\n\005cells\030\001 \003(\01329.google.cloud.docum"
- + "entai.v1.Document.Page.Table.TableCell\032\311"
- + "\001\n\tTableCell\022@\n\006layout\030\001 \001(\01320.google.cl"
- + "oud.documentai.v1.Document.Page.Layout\022\020"
- + "\n\010row_span\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022V\n\022de"
- + "tected_languages\030\004 \003(\0132:.google.cloud.do"
- + "cumentai.v1.Document.Page.DetectedLangua"
- + "ge\032\347\002\n\tFormField\022D\n\nfield_name\030\001 \001(\01320.g"
- + "oogle.cloud.documentai.v1.Document.Page."
- + "Layout\022E\n\013field_value\030\002 \001(\01320.google.clo"
- + "ud.documentai.v1.Document.Page.Layout\022[\n"
- + "\027name_detected_languages\030\003 \003(\0132:.google."
- + "cloud.documentai.v1.Document.Page.Detect"
- + "edLanguage\022\\\n\030value_detected_languages\030\004"
- + " \003(\0132:.google.cloud.documentai.v1.Docume"
- + "nt.Page.DetectedLanguage\022\022\n\nvalue_type\030\005"
- + " \001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_cod"
- + "e\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\233\006\n\006Entity\022I"
- + "\n\013text_anchor\030\001 \001(\0132/.google.cloud.docum"
- + "entai.v1.Document.TextAnchorB\003\340A\001\022\014\n\004typ"
- + "e\030\002 \001(\t\022\031\n\014mention_text\030\003 \001(\tB\003\340A\001\022\027\n\nme"
- + "ntion_id\030\004 \001(\tB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B"
- + "\003\340A\001\022I\n\013page_anchor\030\006 \001(\0132/.google.cloud"
- + ".documentai.v1.Document.PageAnchorB\003\340A\001\022"
- + "\017\n\002id\030\007 \001(\tB\003\340A\001\022Z\n\020normalized_value\030\t \001"
- + "(\0132;.google.cloud.documentai.v1.Document"
- + ".Entity.NormalizedValueB\003\340A\001\022D\n\nproperti"
- + "es\030\n \003(\0132+.google.cloud.documentai.v1.Do"
- + "cument.EntityB\003\340A\001\022H\n\nprovenance\030\013 \001(\0132/"
- + ".google.cloud.documentai.v1.Document.Pro"
- + "venanceB\003\340A\001\022\025\n\010redacted\030\014 \001(\010B\003\340A\001\032\213\002\n\017"
- + "NormalizedValue\022)\n\013money_value\030\002 \001(\0132\022.g"
- + "oogle.type.MoneyH\000\022\'\n\ndate_value\030\003 \001(\0132\021"
- + ".google.type.DateH\000\022/\n\016datetime_value\030\004 "
- + "\001(\0132\025.google.type.DateTimeH\000\0223\n\raddress_"
- + "value\030\005 \001(\0132\032.google.type.PostalAddressH"
- + "\000\022\027\n\rboolean_value\030\006 \001(\010H\000\022\021\n\004text\030\001 \001(\t"
- + "B\003\340A\002B\022\n\020structured_value\032I\n\016EntityRelat"
- + "ion\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobject_id\030\002 \001"
- + "(\t\022\020\n\010relation\030\003 \001(\t\032\250\001\n\nTextAnchor\022R\n\rt"
- + "ext_segments\030\001 \003(\0132;.google.cloud.docume"
- + "ntai.v1.Document.TextAnchor.TextSegment\022"
- + "\017\n\007content\030\002 \001(\t\0325\n\013TextSegment\022\023\n\013start"
- + "_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\032\330\003\n\nPage"
- + "Anchor\022J\n\tpage_refs\030\001 \003(\01327.google.cloud"
- + ".documentai.v1.Document.PageAnchor.PageR"
- + "ef\032\375\002\n\007PageRef\022\021\n\004page\030\001 \001(\003B\003\340A\002\022\\\n\013lay"
- + "out_type\030\002 \001(\0162B.google.cloud.documentai"
- + ".v1.Document.PageAnchor.PageRef.LayoutTy"
- + "peB\003\340A\001\022\030\n\tlayout_id\030\003 \001(\tB\005\030\001\340A\001\022D\n\rbou"
- + "nding_poly\030\004 \001(\0132(.google.cloud.document"
- + "ai.v1.BoundingPolyB\003\340A\001\022\027\n\nconfidence\030\005 "
- + "\001(\002B\003\340A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_U"
- + "NSPECIFIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010"
- + "\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022"
- + "\t\n\005TABLE\020\006\022\016\n\nFORM_FIELD\020\007\032\365\002\n\nProvenanc"
- + "e\022\020\n\010revision\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\022G\n\007paren"
- + "ts\030\003 \003(\01326.google.cloud.documentai.v1.Do"
- + "cument.Provenance.Parent\022K\n\004type\030\004 \001(\0162="
- + ".google.cloud.documentai.v1.Document.Pro"
- + "venance.OperationType\032&\n\006Parent\022\020\n\010revis"
- + "ion\030\001 \001(\005\022\n\n\002id\030\002 \001(\005\"\212\001\n\rOperationType\022"
- + "\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020\001"
- + "\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQUES"
- + "TED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SKIPPED"
- + "\020\006\032\215\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n\tproc"
- + "essor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\016\n\006parent\030\002 \003("
- + "\005\022/\n\013create_time\030\003 \001(\0132\032.google.protobuf"
- + ".Timestamp\022O\n\014human_review\030\006 \001(\01329.googl"
- + "e.cloud.documentai.v1.Document.Revision."
- + "HumanReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001("
- + "\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\255\001\n\nT"
- + "extChange\022D\n\013text_anchor\030\001 \001(\0132/.google."
- + "cloud.documentai.v1.Document.TextAnchor\022"
- + "\024\n\014changed_text\030\002 \001(\t\022C\n\nprovenance\030\003 \003("
- + "\0132/.google.cloud.documentai.v1.Document."
- + "ProvenanceB\010\n\006sourceB\321\001\n\036com.google.clou"
- + "d.documentai.v1B\rDocumentProtoP\001ZDgoogle"
- + ".golang.org/genproto/googleapis/cloud/do"
- + "cumentai/v1;documentai\252\002\032Google.Cloud.Do"
- + "cumentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V1"
- + "\352\002\035Google::Cloud::DocumentAI::V1b\006proto3"
+ + "oud.documentai.v1.Document.Provenance\032\352\001"
+ + "\n\tParagraph\022@\n\006layout\030\001 \001(\01320.google.clo"
+ + "ud.documentai.v1.Document.Page.Layout\022V\n"
+ + "\022detected_languages\030\002 \003(\0132:.google.cloud"
+ + ".documentai.v1.Document.Page.DetectedLan"
+ + "guage\022C\n\nprovenance\030\003 \001(\0132/.google.cloud"
+ + ".documentai.v1.Document.Provenance\032\345\001\n\004L"
+ + "ine\022@\n\006layout\030\001 \001(\01320.google.cloud.docum"
+ + "entai.v1.Document.Page.Layout\022V\n\022detecte"
+ + "d_languages\030\002 \003(\0132:.google.cloud.documen"
+ + "tai.v1.Document.Page.DetectedLanguage\022C\n"
+ + "\nprovenance\030\003 \001(\0132/.google.cloud.documen"
+ + "tai.v1.Document.Provenance\032\346\003\n\005Token\022@\n\006"
+ + "layout\030\001 \001(\01320.google.cloud.documentai.v"
+ + "1.Document.Page.Layout\022U\n\016detected_break"
+ + "\030\002 \001(\0132=.google.cloud.documentai.v1.Docu"
+ + "ment.Page.Token.DetectedBreak\022V\n\022detecte"
+ + "d_languages\030\003 \003(\0132:.google.cloud.documen"
+ + "tai.v1.Document.Page.DetectedLanguage\022C\n"
+ + "\nprovenance\030\004 \001(\0132/.google.cloud.documen"
+ + "tai.v1.Document.Provenance\032\246\001\n\rDetectedB"
+ + "reak\022P\n\004type\030\001 \001(\0162B.google.cloud.docume"
+ + "ntai.v1.Document.Page.Token.DetectedBrea"
+ + "k.Type\"C\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005"
+ + "SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022\n\n\006HYPHEN\020\003\032\267\001\n\r"
+ + "VisualElement\022@\n\006layout\030\001 \001(\01320.google.c"
+ + "loud.documentai.v1.Document.Page.Layout\022"
+ + "\014\n\004type\030\002 \001(\t\022V\n\022detected_languages\030\003 \003("
+ + "\0132:.google.cloud.documentai.v1.Document."
+ + "Page.DetectedLanguage\032\337\004\n\005Table\022@\n\006layou"
+ + "t\030\001 \001(\01320.google.cloud.documentai.v1.Doc"
+ + "ument.Page.Layout\022M\n\013header_rows\030\002 \003(\01328"
+ + ".google.cloud.documentai.v1.Document.Pag"
+ + "e.Table.TableRow\022K\n\tbody_rows\030\003 \003(\01328.go"
+ + "ogle.cloud.documentai.v1.Document.Page.T"
+ + "able.TableRow\022V\n\022detected_languages\030\004 \003("
+ + "\0132:.google.cloud.documentai.v1.Document."
+ + "Page.DetectedLanguage\032T\n\010TableRow\022H\n\005cel"
+ + "ls\030\001 \003(\01329.google.cloud.documentai.v1.Do"
+ + "cument.Page.Table.TableCell\032\311\001\n\tTableCel"
+ + "l\022@\n\006layout\030\001 \001(\01320.google.cloud.documen"
+ + "tai.v1.Document.Page.Layout\022\020\n\010row_span\030"
+ + "\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\022V\n\022detected_lang"
+ + "uages\030\004 \003(\0132:.google.cloud.documentai.v1"
+ + ".Document.Page.DetectedLanguage\032\254\003\n\tForm"
+ + "Field\022D\n\nfield_name\030\001 \001(\01320.google.cloud"
+ + ".documentai.v1.Document.Page.Layout\022E\n\013f"
+ + "ield_value\030\002 \001(\01320.google.cloud.document"
+ + "ai.v1.Document.Page.Layout\022[\n\027name_detec"
+ + "ted_languages\030\003 \003(\0132:.google.cloud.docum"
+ + "entai.v1.Document.Page.DetectedLanguage\022"
+ + "\\\n\030value_detected_languages\030\004 \003(\0132:.goog"
+ + "le.cloud.documentai.v1.Document.Page.Det"
+ + "ectedLanguage\022\022\n\nvalue_type\030\005 \001(\t\022C\n\npro"
+ + "venance\030\010 \001(\0132/.google.cloud.documentai."
+ + "v1.Document.Provenance\032=\n\020DetectedLangua"
+ + "ge\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfidence\030"
+ + "\002 \001(\002\032\233\006\n\006Entity\022I\n\013text_anchor\030\001 \001(\0132/."
+ + "google.cloud.documentai.v1.Document.Text"
+ + "AnchorB\003\340A\001\022\014\n\004type\030\002 \001(\t\022\031\n\014mention_tex"
+ + "t\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004 \001(\tB\003\340A\001\022\027\n"
+ + "\nconfidence\030\005 \001(\002B\003\340A\001\022I\n\013page_anchor\030\006 "
+ + "\001(\0132/.google.cloud.documentai.v1.Documen"
+ + "t.PageAnchorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A\001\022Z\n\020no"
+ + "rmalized_value\030\t \001(\0132;.google.cloud.docu"
+ + "mentai.v1.Document.Entity.NormalizedValu"
+ + "eB\003\340A\001\022D\n\nproperties\030\n \003(\0132+.google.clou"
+ + "d.documentai.v1.Document.EntityB\003\340A\001\022H\n\n"
+ + "provenance\030\013 \001(\0132/.google.cloud.document"
+ + "ai.v1.Document.ProvenanceB\003\340A\001\022\025\n\010redact"
+ + "ed\030\014 \001(\010B\003\340A\001\032\213\002\n\017NormalizedValue\022)\n\013mon"
+ + "ey_value\030\002 \001(\0132\022.google.type.MoneyH\000\022\'\n\n"
+ + "date_value\030\003 \001(\0132\021.google.type.DateH\000\022/\n"
+ + "\016datetime_value\030\004 \001(\0132\025.google.type.Date"
+ + "TimeH\000\0223\n\raddress_value\030\005 \001(\0132\032.google.t"
+ + "ype.PostalAddressH\000\022\027\n\rboolean_value\030\006 \001"
+ + "(\010H\000\022\021\n\004text\030\001 \001(\tB\003\340A\002B\022\n\020structured_va"
+ + "lue\032I\n\016EntityRelation\022\022\n\nsubject_id\030\001 \001("
+ + "\t\022\021\n\tobject_id\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\250"
+ + "\001\n\nTextAnchor\022R\n\rtext_segments\030\001 \003(\0132;.g"
+ + "oogle.cloud.documentai.v1.Document.TextA"
+ + "nchor.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013Te"
+ + "xtSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_in"
+ + "dex\030\002 \001(\003\032\330\003\n\nPageAnchor\022J\n\tpage_refs\030\001 "
+ + "\003(\01327.google.cloud.documentai.v1.Documen"
+ + "t.PageAnchor.PageRef\032\375\002\n\007PageRef\022\021\n\004page"
+ + "\030\001 \001(\003B\003\340A\002\022\\\n\013layout_type\030\002 \001(\0162B.googl"
+ + "e.cloud.documentai.v1.Document.PageAncho"
+ + "r.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayout_id\030\003"
+ + " \001(\tB\005\030\001\340A\001\022D\n\rbounding_poly\030\004 \001(\0132(.goo"
+ + "gle.cloud.documentai.v1.BoundingPolyB\003\340A"
+ + "\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\"\207\001\n\nLayoutTyp"
+ + "e\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000\022\t\n\005BLOCK\020"
+ + "\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005TOKEN\020\004\022\022\n"
+ + "\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\nFORM_FIE"
+ + "LD\020\007\032\214\003\n\nProvenance\022\020\n\010revision\030\001 \001(\005\022\016\n"
+ + "\002id\030\002 \001(\005B\002\030\001\022G\n\007parents\030\003 \003(\01326.google."
+ + "cloud.documentai.v1.Document.Provenance."
+ + "Parent\022K\n\004type\030\004 \001(\0162=.google.cloud.docu"
+ + "mentai.v1.Document.Provenance.OperationT"
+ + "ype\0329\n\006Parent\022\020\n\010revision\030\001 \001(\005\022\r\n\005index"
+ + "\030\003 \001(\005\022\016\n\002id\030\002 \001(\005B\002\030\001\"\212\001\n\rOperationType"
+ + "\022\036\n\032OPERATION_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020"
+ + "\001\022\n\n\006REMOVE\020\002\022\013\n\007REPLACE\020\003\022\022\n\016EVAL_REQUE"
+ + "STED\020\004\022\021\n\rEVAL_APPROVED\020\005\022\020\n\014EVAL_SKIPPE"
+ + "D\020\006\032\215\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022\023\n\tpro"
+ + "cessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\016\n\006parent\030\002 \003"
+ + "(\005\022/\n\013create_time\030\003 \001(\0132\032.google.protobu"
+ + "f.Timestamp\022O\n\014human_review\030\006 \001(\01329.goog"
+ + "le.cloud.documentai.v1.Document.Revision"
+ + ".HumanReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001"
+ + "(\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\255\001\n\n"
+ + "TextChange\022D\n\013text_anchor\030\001 \001(\0132/.google"
+ + ".cloud.documentai.v1.Document.TextAnchor"
+ + "\022\024\n\014changed_text\030\002 \001(\t\022C\n\nprovenance\030\003 \003"
+ + "(\0132/.google.cloud.documentai.v1.Document"
+ + ".ProvenanceB\010\n\006sourceB\321\001\n\036com.google.clo"
+ + "ud.documentai.v1B\rDocumentProtoP\001ZDgoogl"
+ + "e.golang.org/genproto/googleapis/cloud/d"
+ + "ocumentai/v1;documentai\252\002\032Google.Cloud.D"
+ + "ocumentAI.V1\312\002\032Google\\Cloud\\DocumentAI\\V"
+ + "1\352\002\035Google::Cloud::DocumentAI::V1b\006proto"
+ + "3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -446,6 +451,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"VisualElements",
"Tables",
"FormFields",
+ "Provenance",
});
internal_static_google_cloud_documentai_v1_Document_Page_Dimension_descriptor =
internal_static_google_cloud_documentai_v1_Document_Page_descriptor.getNestedTypes().get(0);
@@ -570,6 +576,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"NameDetectedLanguages",
"ValueDetectedLanguages",
"ValueType",
+ "Provenance",
});
internal_static_google_cloud_documentai_v1_Document_Page_DetectedLanguage_descriptor =
internal_static_google_cloud_documentai_v1_Document_Page_descriptor
@@ -675,7 +682,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_documentai_v1_Document_Provenance_Parent_descriptor,
new java.lang.String[] {
- "Revision", "Id",
+ "Revision", "Index", "Id",
});
internal_static_google_cloud_documentai_v1_Document_Revision_descriptor =
internal_static_google_cloud_documentai_v1_Document_descriptor.getNestedTypes().get(8);
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java
index 5638bd5e..d333169d 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/HumanReviewConfigName.java
@@ -213,9 +213,9 @@ public Builder setProcessor(String processor) {
}
private Builder(HumanReviewConfigName humanReviewConfigName) {
- project = humanReviewConfigName.project;
- location = humanReviewConfigName.location;
- processor = humanReviewConfigName.processor;
+ this.project = humanReviewConfigName.project;
+ this.location = humanReviewConfigName.location;
+ this.processor = humanReviewConfigName.processor;
}
public HumanReviewConfigName build() {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java
index 0ba9b1fb..ded0c8bc 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessorName.java
@@ -211,9 +211,9 @@ public Builder setProcessor(String processor) {
}
private Builder(ProcessorName processorName) {
- project = processorName.project;
- location = processorName.location;
- processor = processorName.processor;
+ this.project = processorName.project;
+ this.location = processorName.location;
+ this.processor = processorName.processor;
}
public ProcessorName build() {
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java
index 522df1a1..99a265c7 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequest.java
@@ -39,6 +39,7 @@ private ReviewDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder>
private ReviewDocumentRequest() {
humanReviewConfig_ = "";
+ priority_ = 0;
}
@java.lang.Override
@@ -77,6 +78,11 @@ private ReviewDocumentRequest(
humanReviewConfig_ = s;
break;
}
+ case 24:
+ {
+ enableSchemaValidation_ = input.readBool();
+ break;
+ }
case 34:
{
com.google.cloud.documentai.v1.Document.Builder subBuilder = null;
@@ -93,6 +99,13 @@ private ReviewDocumentRequest(
sourceCase_ = 4;
break;
}
+ case 40:
+ {
+ int rawValue = input.readEnum();
+
+ priority_ = rawValue;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -127,6 +140,145 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
com.google.cloud.documentai.v1.ReviewDocumentRequest.Builder.class);
}
+ /**
+ *
+ *
+ * + * The priority level of the human review task. + *+ * + * Protobuf enum {@code google.cloud.documentai.v1.ReviewDocumentRequest.Priority} + */ + public enum Priority implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * The default priority level. + *+ * + *
DEFAULT = 0;
+ */
+ DEFAULT(0),
+ /**
+ *
+ *
+ * + * The urgent priority level. The labeling manager should allocate labeler + * resource to the urgent task queue to respect this priority level. + *+ * + *
URGENT = 1;
+ */
+ URGENT(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * The default priority level. + *+ * + *
DEFAULT = 0;
+ */
+ public static final int DEFAULT_VALUE = 0;
+ /**
+ *
+ *
+ * + * The urgent priority level. The labeling manager should allocate labeler + * resource to the urgent task queue to respect this priority level. + *+ * + *
URGENT = 1;
+ */
+ public static final int URGENT_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static Priority valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static Priority forNumber(int value) {
+ switch (value) {
+ case 0:
+ return DEFAULT;
+ case 1:
+ return URGENT;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Whether the validation should be performed on the ad-hoc review request. + *+ * + *
bool enable_schema_validation = 3;
+ *
+ * @return The enableSchemaValidation.
+ */
+ @java.lang.Override
+ public boolean getEnableSchemaValidation() {
+ return enableSchemaValidation_;
+ }
+
+ public static final int PRIORITY_FIELD_NUMBER = 5;
+ private int priority_;
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return The enum numeric value on the wire for priority.
+ */
+ @java.lang.Override
+ public int getPriorityValue() {
+ return priority_;
+ }
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return The priority.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority getPriority() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority result =
+ com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.valueOf(priority_);
+ return result == null
+ ? com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.UNRECOGNIZED
+ : result;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -294,9 +502,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getHumanReviewConfigBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, humanReviewConfig_);
}
+ if (enableSchemaValidation_ != false) {
+ output.writeBool(3, enableSchemaValidation_);
+ }
if (sourceCase_ == 4) {
output.writeMessage(4, (com.google.cloud.documentai.v1.Document) source_);
}
+ if (priority_
+ != com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.DEFAULT.getNumber()) {
+ output.writeEnum(5, priority_);
+ }
unknownFields.writeTo(output);
}
@@ -309,11 +524,18 @@ public int getSerializedSize() {
if (!getHumanReviewConfigBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, humanReviewConfig_);
}
+ if (enableSchemaValidation_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableSchemaValidation_);
+ }
if (sourceCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.documentai.v1.Document) source_);
}
+ if (priority_
+ != com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.DEFAULT.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, priority_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -331,6 +553,8 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.documentai.v1.ReviewDocumentRequest) obj;
if (!getHumanReviewConfig().equals(other.getHumanReviewConfig())) return false;
+ if (getEnableSchemaValidation() != other.getEnableSchemaValidation()) return false;
+ if (priority_ != other.priority_) return false;
if (!getSourceCase().equals(other.getSourceCase())) return false;
switch (sourceCase_) {
case 4:
@@ -352,6 +576,10 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HUMAN_REVIEW_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getHumanReviewConfig().hashCode();
+ hash = (37 * hash) + ENABLE_SCHEMA_VALIDATION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSchemaValidation());
+ hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
+ hash = (53 * hash) + priority_;
switch (sourceCase_) {
case 4:
hash = (37 * hash) + INLINE_DOCUMENT_FIELD_NUMBER;
@@ -507,6 +735,10 @@ public Builder clear() {
super.clear();
humanReviewConfig_ = "";
+ enableSchemaValidation_ = false;
+
+ priority_ = 0;
+
sourceCase_ = 0;
source_ = null;
return this;
@@ -544,6 +776,8 @@ public com.google.cloud.documentai.v1.ReviewDocumentRequest buildPartial() {
}
}
result.humanReviewConfig_ = humanReviewConfig_;
+ result.enableSchemaValidation_ = enableSchemaValidation_;
+ result.priority_ = priority_;
result.sourceCase_ = sourceCase_;
onBuilt();
return result;
@@ -599,6 +833,12 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.ReviewDocumentRequest ot
humanReviewConfig_ = other.humanReviewConfig_;
onChanged();
}
+ if (other.getEnableSchemaValidation() != false) {
+ setEnableSchemaValidation(other.getEnableSchemaValidation());
+ }
+ if (other.priority_ != 0) {
+ setPriorityValue(other.getPriorityValue());
+ }
switch (other.getSourceCase()) {
case INLINE_DOCUMENT:
{
@@ -984,6 +1224,152 @@ public Builder setHumanReviewConfigBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private boolean enableSchemaValidation_;
+ /**
+ *
+ *
+ * + * Whether the validation should be performed on the ad-hoc review request. + *+ * + *
bool enable_schema_validation = 3;
+ *
+ * @return The enableSchemaValidation.
+ */
+ @java.lang.Override
+ public boolean getEnableSchemaValidation() {
+ return enableSchemaValidation_;
+ }
+ /**
+ *
+ *
+ * + * Whether the validation should be performed on the ad-hoc review request. + *+ * + *
bool enable_schema_validation = 3;
+ *
+ * @param value The enableSchemaValidation to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEnableSchemaValidation(boolean value) {
+
+ enableSchemaValidation_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Whether the validation should be performed on the ad-hoc review request. + *+ * + *
bool enable_schema_validation = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEnableSchemaValidation() {
+
+ enableSchemaValidation_ = false;
+ onChanged();
+ return this;
+ }
+
+ private int priority_ = 0;
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return The enum numeric value on the wire for priority.
+ */
+ @java.lang.Override
+ public int getPriorityValue() {
+ return priority_;
+ }
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @param value The enum numeric value on the wire for priority to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPriorityValue(int value) {
+
+ priority_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return The priority.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority getPriority() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority result =
+ com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.valueOf(priority_);
+ return result == null
+ ? com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @param value The priority to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPriority(
+ com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ priority_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPriority() {
+
+ priority_ = 0;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java
index 8e2576b2..21080f66 100644
--- a/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java
+++ b/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ReviewDocumentRequestOrBuilder.java
@@ -89,5 +89,43 @@ public interface ReviewDocumentRequestOrBuilder
*/
com.google.protobuf.ByteString getHumanReviewConfigBytes();
+ /**
+ *
+ *
+ * + * Whether the validation should be performed on the ad-hoc review request. + *+ * + *
bool enable_schema_validation = 3;
+ *
+ * @return The enableSchemaValidation.
+ */
+ boolean getEnableSchemaValidation();
+
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return The enum numeric value on the wire for priority.
+ */
+ int getPriorityValue();
+ /**
+ *
+ *
+ * + * The priority of the human review task. + *+ * + *
.google.cloud.documentai.v1.ReviewDocumentRequest.Priority priority = 5;
+ *
+ * @return The priority.
+ */
+ com.google.cloud.documentai.v1.ReviewDocumentRequest.Priority getPriority();
+
public com.google.cloud.documentai.v1.ReviewDocumentRequest.SourceCase getSourceCase();
}
diff --git a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto
index eb4615c1..467a4492 100644
--- a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto
+++ b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document.proto
@@ -324,6 +324,9 @@ message Document {
// - "unfilled_checkbox"
// - "filled_checkbox"
string value_type = 5;
+
+ // The history of this annotation.
+ Provenance provenance = 8;
}
// Detected language for a structural component.
@@ -385,6 +388,9 @@ message Document {
// A list of visually detected form fields on the page.
repeated FormField form_fields = 11;
+
+ // The history of this page.
+ Provenance provenance = 16;
}
// A phrase in the text that is a known entity type, such as a person, an
@@ -536,6 +542,8 @@ message Document {
// Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
// [Document.pages][page_refs.page] to locate the related page element.
+ // This field is skipped when its value is the default 0. See
+ // https://developers.google.com/protocol-buffers/docs/proto3#json.
int64 page = 1 [(google.api.field_behavior) = REQUIRED];
// Optional. The type of the layout element that is being referenced if any.
@@ -568,8 +576,12 @@ message Document {
// The index of the [Document.revisions] identifying the parent revision.
int32 revision = 1;
+ // The index of the parent revisions corresponding collection of items
+ // (eg. list of entities, properties within entities, etc.)
+ int32 index = 3;
+
// The id of the parent provenance.
- int32 id = 2;
+ int32 id = 2 [deprecated = true];
}
// If a processor or agent does an explicit operation on existing elements.
@@ -602,7 +614,7 @@ message Document {
// The Id of this operation. Needs to be unique within the scope of the
// revision.
- int32 id = 2;
+ int32 id = 2 [deprecated = true];
// References to the original elements that are replaced.
repeated Parent parents = 3;
diff --git a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto
index 9f0b11a7..65f0e6d9 100644
--- a/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto
+++ b/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto
@@ -254,6 +254,18 @@ message BatchProcessMetadata {
// Request message for review document method.
message ReviewDocumentRequest {
+ reserved 2;
+
+ // The priority level of the human review task.
+ enum Priority {
+ // The default priority level.
+ DEFAULT = 0;
+
+ // The urgent priority level. The labeling manager should allocate labeler
+ // resource to the urgent task queue to respect this priority level.
+ URGENT = 1;
+ }
+
// The document payload.
oneof source {
// An inline document proto.
@@ -268,6 +280,12 @@ message ReviewDocumentRequest {
type: "documentai.googleapis.com/HumanReviewConfig"
}
];
+
+ // Whether the validation should be performed on the ad-hoc review request.
+ bool enable_schema_validation = 3;
+
+ // The priority of the human review task.
+ Priority priority = 5;
}
// Response message for review document method.
diff --git a/proto-google-cloud-document-ai-v1beta1/pom.xml b/proto-google-cloud-document-ai-v1beta1/pom.xml
index 263fd9fb..cdb67b55 100644
--- a/proto-google-cloud-document-ai-v1beta1/pom.xml
+++ b/proto-google-cloud-document-ai-v1beta1/pom.xml
@@ -3,13 +3,13 @@
+ * Request message for create a processor. Notice this request is sent to + * a regionalized backend service, and if the processor type is not available + * on that region, the creation will fail. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.CreateProcessorRequest} + */ +public final class CreateProcessorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.CreateProcessorRequest) + CreateProcessorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateProcessorRequest.newBuilder() to construct. + private CreateProcessorRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateProcessorRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateProcessorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateProcessorRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.documentai.v1beta3.Processor.Builder subBuilder = null; + if (processor_ != null) { + subBuilder = processor_.toBuilder(); + } + processor_ = + input.readMessage( + com.google.cloud.documentai.v1beta3.Processor.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(processor_); + processor_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_CreateProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_CreateProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.CreateProcessorRequest.class, + com.google.cloud.documentai.v1beta3.CreateProcessorRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROCESSOR_FIELD_NUMBER = 2;
+ private com.google.cloud.documentai.v1beta3.Processor 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the processor field is set.
+ */
+ @java.lang.Override
+ public boolean hasProcessor() {
+ return processor_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The processor.
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.Processor getProcessor() {
+ return processor_ == null
+ ? com.google.cloud.documentai.v1beta3.Processor.getDefaultInstance()
+ : 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.documentai.v1beta3.ProcessorOrBuilder getProcessorOrBuilder() {
+ return getProcessor();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (processor_ != null) {
+ output.writeMessage(2, getProcessor());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (processor_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProcessor());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.documentai.v1beta3.CreateProcessorRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.documentai.v1beta3.CreateProcessorRequest other =
+ (com.google.cloud.documentai.v1beta3.CreateProcessorRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasProcessor() != other.hasProcessor()) return false;
+ if (hasProcessor()) {
+ if (!getProcessor().equals(other.getProcessor())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (hasProcessor()) {
+ hash = (37 * hash) + PROCESSOR_FIELD_NUMBER;
+ hash = (53 * hash) + getProcessor().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.documentai.v1beta3.CreateProcessorRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for create a processor. Notice this request is sent to + * a regionalized backend service, and if the processor type is not available + * on that region, the creation will fail. + *+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.CreateProcessorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The parent (project and location) under which to create the processor. + * Format: projects/{project}/locations/{location} + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.documentai.v1beta3.Processor processor_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Processor,
+ com.google.cloud.documentai.v1beta3.Processor.Builder,
+ com.google.cloud.documentai.v1beta3.ProcessorOrBuilder>
+ processorBuilder_;
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the processor field is set.
+ */
+ public boolean hasProcessor() {
+ return processorBuilder_ != null || processor_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The processor.
+ */
+ public com.google.cloud.documentai.v1beta3.Processor getProcessor() {
+ if (processorBuilder_ == null) {
+ return processor_ == null
+ ? com.google.cloud.documentai.v1beta3.Processor.getDefaultInstance()
+ : processor_;
+ } else {
+ return processorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setProcessor(com.google.cloud.documentai.v1beta3.Processor value) {
+ if (processorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ processor_ = value;
+ onChanged();
+ } else {
+ processorBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setProcessor(
+ com.google.cloud.documentai.v1beta3.Processor.Builder builderForValue) {
+ if (processorBuilder_ == null) {
+ processor_ = builderForValue.build();
+ onChanged();
+ } else {
+ processorBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeProcessor(com.google.cloud.documentai.v1beta3.Processor value) {
+ if (processorBuilder_ == null) {
+ if (processor_ != null) {
+ processor_ =
+ com.google.cloud.documentai.v1beta3.Processor.newBuilder(processor_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ processor_ = value;
+ }
+ onChanged();
+ } else {
+ processorBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearProcessor() {
+ if (processorBuilder_ == null) {
+ processor_ = null;
+ onChanged();
+ } else {
+ processor_ = null;
+ processorBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.Processor.Builder getProcessorBuilder() {
+
+ onChanged();
+ return getProcessorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.documentai.v1beta3.ProcessorOrBuilder getProcessorOrBuilder() {
+ if (processorBuilder_ != null) {
+ return processorBuilder_.getMessageOrBuilder();
+ } else {
+ return processor_ == null
+ ? com.google.cloud.documentai.v1beta3.Processor.getDefaultInstance()
+ : 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. + *+ * + *
+ * .google.cloud.documentai.v1beta3.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Processor,
+ com.google.cloud.documentai.v1beta3.Processor.Builder,
+ com.google.cloud.documentai.v1beta3.ProcessorOrBuilder>
+ getProcessorFieldBuilder() {
+ if (processorBuilder_ == null) {
+ processorBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.documentai.v1beta3.Processor,
+ com.google.cloud.documentai.v1beta3.Processor.Builder,
+ com.google.cloud.documentai.v1beta3.ProcessorOrBuilder>(
+ getProcessor(), getParentForChildren(), isClean());
+ processor_ = null;
+ }
+ return processorBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.CreateProcessorRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.CreateProcessorRequest)
+ private static final com.google.cloud.documentai.v1beta3.CreateProcessorRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.CreateProcessorRequest();
+ }
+
+ public static com.google.cloud.documentai.v1beta3.CreateProcessorRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser