Skip to content

Commit

Permalink
feat: [documentai] Added Training and Evaluation functions, request, …
Browse files Browse the repository at this point in the history
…responses and metadata to document_processor_service.proto (#9145)

* feat: Added Training and Evaluation functions, request, responses and metadata to document_processor_service.proto
feat: Added evaluation.proto
feat: Added latest_evaluation to processor.proto
chore: removed deprecated flag from REPLACE in OperationType in document.proto

PiperOrigin-RevId: 511230520

Source-Link: googleapis/googleapis@c53bf8d

Source-Link: googleapis/googleapis-gen@5693cbc
Copy-Tag: eyJwIjoiamF2YS1kb2N1bWVudC1haS8uT3dsQm90LnlhbWwiLCJoIjoiNTY5M2NiYzk4YjY0MTIwODVmZjZkM2FiYTcxOWI2OGUzMDdjNTM1NyJ9

* 🦉 Updates from OwlBot post-processor

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

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Feb 28, 2023
1 parent 7fcde13 commit 79ee60b
Show file tree
Hide file tree
Showing 69 changed files with 28,698 additions and 497 deletions.
6 changes: 3 additions & 3 deletions java-document-ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-document-ai</artifactId>
<version>2.14.0</version>
<version>2.15.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-document-ai:2.14.0'
implementation 'com.google.cloud:google-cloud-document-ai:2.15.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "2.14.0"
libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "2.15.0"
```
<!--- {x-version-update-end} -->

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.documentai.v1;

import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListEvaluationsPagedResponse;
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
Expand Down Expand Up @@ -135,6 +136,23 @@ public UnaryCallSettings<GetProcessorRequest, Processor> getProcessorSettings()
return ((DocumentProcessorServiceStubSettings) getStubSettings()).getProcessorSettings();
}

/** Returns the object with the settings used for calls to trainProcessorVersion. */
public UnaryCallSettings<TrainProcessorVersionRequest, Operation>
trainProcessorVersionSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings())
.trainProcessorVersionSettings();
}

/** Returns the object with the settings used for calls to trainProcessorVersion. */
public OperationCallSettings<
TrainProcessorVersionRequest,
TrainProcessorVersionResponse,
TrainProcessorVersionMetadata>
trainProcessorVersionOperationSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings())
.trainProcessorVersionOperationSettings();
}

/** Returns the object with the settings used for calls to getProcessorVersion. */
public UnaryCallSettings<GetProcessorVersionRequest, ProcessorVersion>
getProcessorVersionSettings() {
Expand Down Expand Up @@ -272,6 +290,35 @@ public UnaryCallSettings<ReviewDocumentRequest, Operation> reviewDocumentSetting
.reviewDocumentOperationSettings();
}

/** Returns the object with the settings used for calls to evaluateProcessorVersion. */
public UnaryCallSettings<EvaluateProcessorVersionRequest, Operation>
evaluateProcessorVersionSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings())
.evaluateProcessorVersionSettings();
}

/** Returns the object with the settings used for calls to evaluateProcessorVersion. */
public OperationCallSettings<
EvaluateProcessorVersionRequest,
EvaluateProcessorVersionResponse,
EvaluateProcessorVersionMetadata>
evaluateProcessorVersionOperationSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings())
.evaluateProcessorVersionOperationSettings();
}

/** Returns the object with the settings used for calls to getEvaluation. */
public UnaryCallSettings<GetEvaluationRequest, Evaluation> getEvaluationSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings()).getEvaluationSettings();
}

/** Returns the object with the settings used for calls to listEvaluations. */
public PagedCallSettings<
ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse>
listEvaluationsSettings() {
return ((DocumentProcessorServiceStubSettings) getStubSettings()).listEvaluationsSettings();
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -448,6 +495,21 @@ public UnaryCallSettings.Builder<GetProcessorRequest, Processor> getProcessorSet
return getStubSettingsBuilder().getProcessorSettings();
}

/** Returns the builder for the settings used for calls to trainProcessorVersion. */
public UnaryCallSettings.Builder<TrainProcessorVersionRequest, Operation>
trainProcessorVersionSettings() {
return getStubSettingsBuilder().trainProcessorVersionSettings();
}

/** Returns the builder for the settings used for calls to trainProcessorVersion. */
public OperationCallSettings.Builder<
TrainProcessorVersionRequest,
TrainProcessorVersionResponse,
TrainProcessorVersionMetadata>
trainProcessorVersionOperationSettings() {
return getStubSettingsBuilder().trainProcessorVersionOperationSettings();
}

/** Returns the builder for the settings used for calls to getProcessorVersion. */
public UnaryCallSettings.Builder<GetProcessorVersionRequest, ProcessorVersion>
getProcessorVersionSettings() {
Expand Down Expand Up @@ -574,6 +636,33 @@ public UnaryCallSettings.Builder<ReviewDocumentRequest, Operation> reviewDocumen
return getStubSettingsBuilder().reviewDocumentOperationSettings();
}

/** Returns the builder for the settings used for calls to evaluateProcessorVersion. */
public UnaryCallSettings.Builder<EvaluateProcessorVersionRequest, Operation>
evaluateProcessorVersionSettings() {
return getStubSettingsBuilder().evaluateProcessorVersionSettings();
}

/** Returns the builder for the settings used for calls to evaluateProcessorVersion. */
public OperationCallSettings.Builder<
EvaluateProcessorVersionRequest,
EvaluateProcessorVersionResponse,
EvaluateProcessorVersionMetadata>
evaluateProcessorVersionOperationSettings() {
return getStubSettingsBuilder().evaluateProcessorVersionOperationSettings();
}

/** Returns the builder for the settings used for calls to getEvaluation. */
public UnaryCallSettings.Builder<GetEvaluationRequest, Evaluation> getEvaluationSettings() {
return getStubSettingsBuilder().getEvaluationSettings();
}

/** Returns the builder for the settings used for calls to listEvaluations. */
public PagedCallSettings.Builder<
ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse>
listEvaluationsSettings() {
return getStubSettingsBuilder().listEvaluationsSettings();
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@
"EnableProcessor": {
"methods": ["enableProcessorAsync", "enableProcessorOperationCallable", "enableProcessorCallable"]
},
"EvaluateProcessorVersion": {
"methods": ["evaluateProcessorVersionAsync", "evaluateProcessorVersionAsync", "evaluateProcessorVersionAsync", "evaluateProcessorVersionOperationCallable", "evaluateProcessorVersionCallable"]
},
"FetchProcessorTypes": {
"methods": ["fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypesCallable"]
},
"GetEvaluation": {
"methods": ["getEvaluation", "getEvaluation", "getEvaluation", "getEvaluationCallable"]
},
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
Expand All @@ -46,6 +52,9 @@
"GetProcessorVersion": {
"methods": ["getProcessorVersion", "getProcessorVersion", "getProcessorVersion", "getProcessorVersionCallable"]
},
"ListEvaluations": {
"methods": ["listEvaluations", "listEvaluations", "listEvaluations", "listEvaluationsPagedCallable", "listEvaluationsCallable"]
},
"ListLocations": {
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
Expand All @@ -67,6 +76,9 @@
"SetDefaultProcessorVersion": {
"methods": ["setDefaultProcessorVersionAsync", "setDefaultProcessorVersionOperationCallable", "setDefaultProcessorVersionCallable"]
},
"TrainProcessorVersion": {
"methods": ["trainProcessorVersionAsync", "trainProcessorVersionAsync", "trainProcessorVersionAsync", "trainProcessorVersionOperationCallable", "trainProcessorVersionCallable"]
},
"UndeployProcessorVersion": {
"methods": ["undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionOperationCallable", "undeployProcessorVersionCallable"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.documentai.v1.stub;

import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListEvaluationsPagedResponse;
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
Expand All @@ -41,11 +42,18 @@
import com.google.cloud.documentai.v1.EnableProcessorMetadata;
import com.google.cloud.documentai.v1.EnableProcessorRequest;
import com.google.cloud.documentai.v1.EnableProcessorResponse;
import com.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata;
import com.google.cloud.documentai.v1.EvaluateProcessorVersionRequest;
import com.google.cloud.documentai.v1.EvaluateProcessorVersionResponse;
import com.google.cloud.documentai.v1.Evaluation;
import com.google.cloud.documentai.v1.FetchProcessorTypesRequest;
import com.google.cloud.documentai.v1.FetchProcessorTypesResponse;
import com.google.cloud.documentai.v1.GetEvaluationRequest;
import com.google.cloud.documentai.v1.GetProcessorRequest;
import com.google.cloud.documentai.v1.GetProcessorTypeRequest;
import com.google.cloud.documentai.v1.GetProcessorVersionRequest;
import com.google.cloud.documentai.v1.ListEvaluationsRequest;
import com.google.cloud.documentai.v1.ListEvaluationsResponse;
import com.google.cloud.documentai.v1.ListProcessorTypesRequest;
import com.google.cloud.documentai.v1.ListProcessorTypesResponse;
import com.google.cloud.documentai.v1.ListProcessorVersionsRequest;
Expand All @@ -63,6 +71,9 @@
import com.google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata;
import com.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest;
import com.google.cloud.documentai.v1.SetDefaultProcessorVersionResponse;
import com.google.cloud.documentai.v1.TrainProcessorVersionMetadata;
import com.google.cloud.documentai.v1.TrainProcessorVersionRequest;
import com.google.cloud.documentai.v1.TrainProcessorVersionResponse;
import com.google.cloud.documentai.v1.UndeployProcessorVersionMetadata;
import com.google.cloud.documentai.v1.UndeployProcessorVersionRequest;
import com.google.cloud.documentai.v1.UndeployProcessorVersionResponse;
Expand Down Expand Up @@ -138,6 +149,19 @@ public UnaryCallable<GetProcessorRequest, Processor> getProcessorCallable() {
throw new UnsupportedOperationException("Not implemented: getProcessorCallable()");
}

public OperationCallable<
TrainProcessorVersionRequest,
TrainProcessorVersionResponse,
TrainProcessorVersionMetadata>
trainProcessorVersionOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: trainProcessorVersionOperationCallable()");
}

public UnaryCallable<TrainProcessorVersionRequest, Operation> trainProcessorVersionCallable() {
throw new UnsupportedOperationException("Not implemented: trainProcessorVersionCallable()");
}

public UnaryCallable<GetProcessorVersionRequest, ProcessorVersion> getProcessorVersionCallable() {
throw new UnsupportedOperationException("Not implemented: getProcessorVersionCallable()");
}
Expand Down Expand Up @@ -247,6 +271,33 @@ public UnaryCallable<ReviewDocumentRequest, Operation> reviewDocumentCallable()
throw new UnsupportedOperationException("Not implemented: reviewDocumentCallable()");
}

public OperationCallable<
EvaluateProcessorVersionRequest,
EvaluateProcessorVersionResponse,
EvaluateProcessorVersionMetadata>
evaluateProcessorVersionOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: evaluateProcessorVersionOperationCallable()");
}

public UnaryCallable<EvaluateProcessorVersionRequest, Operation>
evaluateProcessorVersionCallable() {
throw new UnsupportedOperationException("Not implemented: evaluateProcessorVersionCallable()");
}

public UnaryCallable<GetEvaluationRequest, Evaluation> getEvaluationCallable() {
throw new UnsupportedOperationException("Not implemented: getEvaluationCallable()");
}

public UnaryCallable<ListEvaluationsRequest, ListEvaluationsPagedResponse>
listEvaluationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listEvaluationsPagedCallable()");
}

public UnaryCallable<ListEvaluationsRequest, ListEvaluationsResponse> listEvaluationsCallable() {
throw new UnsupportedOperationException("Not implemented: listEvaluationsCallable()");
}

public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
listLocationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
Expand Down

0 comments on commit 79ee60b

Please sign in to comment.