Skip to content

Commit 79ee60b

Browse files
feat: [documentai] Added Training and Evaluation functions, request, 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: https://github.com/googleapis/googleapis-gen/commit/5693cbc98b6412085ff6d3aba719b68e307c5357 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>
1 parent 7fcde13 commit 79ee60b

File tree

69 files changed

+28698
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+28698
-497
lines changed

java-document-ai/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ If you are using Maven, add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>google-cloud-document-ai</artifactId>
23-
<version>2.14.0</version>
23+
<version>2.15.0</version>
2424
</dependency>
2525
```
2626

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

2929
```Groovy
30-
implementation 'com.google.cloud:google-cloud-document-ai:2.14.0'
30+
implementation 'com.google.cloud:google-cloud-document-ai:2.15.0'
3131
```
3232

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

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

java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceClient.java

Lines changed: 771 additions & 2 deletions
Large diffs are not rendered by default.

java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.documentai.v1;
1818

19+
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListEvaluationsPagedResponse;
1920
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
2021
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
2122
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
@@ -135,6 +136,23 @@ public UnaryCallSettings<GetProcessorRequest, Processor> getProcessorSettings()
135136
return ((DocumentProcessorServiceStubSettings) getStubSettings()).getProcessorSettings();
136137
}
137138

139+
/** Returns the object with the settings used for calls to trainProcessorVersion. */
140+
public UnaryCallSettings<TrainProcessorVersionRequest, Operation>
141+
trainProcessorVersionSettings() {
142+
return ((DocumentProcessorServiceStubSettings) getStubSettings())
143+
.trainProcessorVersionSettings();
144+
}
145+
146+
/** Returns the object with the settings used for calls to trainProcessorVersion. */
147+
public OperationCallSettings<
148+
TrainProcessorVersionRequest,
149+
TrainProcessorVersionResponse,
150+
TrainProcessorVersionMetadata>
151+
trainProcessorVersionOperationSettings() {
152+
return ((DocumentProcessorServiceStubSettings) getStubSettings())
153+
.trainProcessorVersionOperationSettings();
154+
}
155+
138156
/** Returns the object with the settings used for calls to getProcessorVersion. */
139157
public UnaryCallSettings<GetProcessorVersionRequest, ProcessorVersion>
140158
getProcessorVersionSettings() {
@@ -272,6 +290,35 @@ public UnaryCallSettings<ReviewDocumentRequest, Operation> reviewDocumentSetting
272290
.reviewDocumentOperationSettings();
273291
}
274292

293+
/** Returns the object with the settings used for calls to evaluateProcessorVersion. */
294+
public UnaryCallSettings<EvaluateProcessorVersionRequest, Operation>
295+
evaluateProcessorVersionSettings() {
296+
return ((DocumentProcessorServiceStubSettings) getStubSettings())
297+
.evaluateProcessorVersionSettings();
298+
}
299+
300+
/** Returns the object with the settings used for calls to evaluateProcessorVersion. */
301+
public OperationCallSettings<
302+
EvaluateProcessorVersionRequest,
303+
EvaluateProcessorVersionResponse,
304+
EvaluateProcessorVersionMetadata>
305+
evaluateProcessorVersionOperationSettings() {
306+
return ((DocumentProcessorServiceStubSettings) getStubSettings())
307+
.evaluateProcessorVersionOperationSettings();
308+
}
309+
310+
/** Returns the object with the settings used for calls to getEvaluation. */
311+
public UnaryCallSettings<GetEvaluationRequest, Evaluation> getEvaluationSettings() {
312+
return ((DocumentProcessorServiceStubSettings) getStubSettings()).getEvaluationSettings();
313+
}
314+
315+
/** Returns the object with the settings used for calls to listEvaluations. */
316+
public PagedCallSettings<
317+
ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse>
318+
listEvaluationsSettings() {
319+
return ((DocumentProcessorServiceStubSettings) getStubSettings()).listEvaluationsSettings();
320+
}
321+
275322
/** Returns the object with the settings used for calls to listLocations. */
276323
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
277324
listLocationsSettings() {
@@ -448,6 +495,21 @@ public UnaryCallSettings.Builder<GetProcessorRequest, Processor> getProcessorSet
448495
return getStubSettingsBuilder().getProcessorSettings();
449496
}
450497

498+
/** Returns the builder for the settings used for calls to trainProcessorVersion. */
499+
public UnaryCallSettings.Builder<TrainProcessorVersionRequest, Operation>
500+
trainProcessorVersionSettings() {
501+
return getStubSettingsBuilder().trainProcessorVersionSettings();
502+
}
503+
504+
/** Returns the builder for the settings used for calls to trainProcessorVersion. */
505+
public OperationCallSettings.Builder<
506+
TrainProcessorVersionRequest,
507+
TrainProcessorVersionResponse,
508+
TrainProcessorVersionMetadata>
509+
trainProcessorVersionOperationSettings() {
510+
return getStubSettingsBuilder().trainProcessorVersionOperationSettings();
511+
}
512+
451513
/** Returns the builder for the settings used for calls to getProcessorVersion. */
452514
public UnaryCallSettings.Builder<GetProcessorVersionRequest, ProcessorVersion>
453515
getProcessorVersionSettings() {
@@ -574,6 +636,33 @@ public UnaryCallSettings.Builder<ReviewDocumentRequest, Operation> reviewDocumen
574636
return getStubSettingsBuilder().reviewDocumentOperationSettings();
575637
}
576638

639+
/** Returns the builder for the settings used for calls to evaluateProcessorVersion. */
640+
public UnaryCallSettings.Builder<EvaluateProcessorVersionRequest, Operation>
641+
evaluateProcessorVersionSettings() {
642+
return getStubSettingsBuilder().evaluateProcessorVersionSettings();
643+
}
644+
645+
/** Returns the builder for the settings used for calls to evaluateProcessorVersion. */
646+
public OperationCallSettings.Builder<
647+
EvaluateProcessorVersionRequest,
648+
EvaluateProcessorVersionResponse,
649+
EvaluateProcessorVersionMetadata>
650+
evaluateProcessorVersionOperationSettings() {
651+
return getStubSettingsBuilder().evaluateProcessorVersionOperationSettings();
652+
}
653+
654+
/** Returns the builder for the settings used for calls to getEvaluation. */
655+
public UnaryCallSettings.Builder<GetEvaluationRequest, Evaluation> getEvaluationSettings() {
656+
return getStubSettingsBuilder().getEvaluationSettings();
657+
}
658+
659+
/** Returns the builder for the settings used for calls to listEvaluations. */
660+
public PagedCallSettings.Builder<
661+
ListEvaluationsRequest, ListEvaluationsResponse, ListEvaluationsPagedResponse>
662+
listEvaluationsSettings() {
663+
return getStubSettingsBuilder().listEvaluationsSettings();
664+
}
665+
577666
/** Returns the builder for the settings used for calls to listLocations. */
578667
public PagedCallSettings.Builder<
579668
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/gapic_metadata.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@
3131
"EnableProcessor": {
3232
"methods": ["enableProcessorAsync", "enableProcessorOperationCallable", "enableProcessorCallable"]
3333
},
34+
"EvaluateProcessorVersion": {
35+
"methods": ["evaluateProcessorVersionAsync", "evaluateProcessorVersionAsync", "evaluateProcessorVersionAsync", "evaluateProcessorVersionOperationCallable", "evaluateProcessorVersionCallable"]
36+
},
3437
"FetchProcessorTypes": {
3538
"methods": ["fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypes", "fetchProcessorTypesCallable"]
3639
},
40+
"GetEvaluation": {
41+
"methods": ["getEvaluation", "getEvaluation", "getEvaluation", "getEvaluationCallable"]
42+
},
3743
"GetLocation": {
3844
"methods": ["getLocation", "getLocationCallable"]
3945
},
@@ -46,6 +52,9 @@
4652
"GetProcessorVersion": {
4753
"methods": ["getProcessorVersion", "getProcessorVersion", "getProcessorVersion", "getProcessorVersionCallable"]
4854
},
55+
"ListEvaluations": {
56+
"methods": ["listEvaluations", "listEvaluations", "listEvaluations", "listEvaluationsPagedCallable", "listEvaluationsCallable"]
57+
},
4958
"ListLocations": {
5059
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
5160
},
@@ -67,6 +76,9 @@
6776
"SetDefaultProcessorVersion": {
6877
"methods": ["setDefaultProcessorVersionAsync", "setDefaultProcessorVersionOperationCallable", "setDefaultProcessorVersionCallable"]
6978
},
79+
"TrainProcessorVersion": {
80+
"methods": ["trainProcessorVersionAsync", "trainProcessorVersionAsync", "trainProcessorVersionAsync", "trainProcessorVersionOperationCallable", "trainProcessorVersionCallable"]
81+
},
7082
"UndeployProcessorVersion": {
7183
"methods": ["undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionAsync", "undeployProcessorVersionOperationCallable", "undeployProcessorVersionCallable"]
7284
}

java-document-ai/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStub.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

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

19+
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListEvaluationsPagedResponse;
1920
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListLocationsPagedResponse;
2021
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorTypesPagedResponse;
2122
import static com.google.cloud.documentai.v1.DocumentProcessorServiceClient.ListProcessorVersionsPagedResponse;
@@ -41,11 +42,18 @@
4142
import com.google.cloud.documentai.v1.EnableProcessorMetadata;
4243
import com.google.cloud.documentai.v1.EnableProcessorRequest;
4344
import com.google.cloud.documentai.v1.EnableProcessorResponse;
45+
import com.google.cloud.documentai.v1.EvaluateProcessorVersionMetadata;
46+
import com.google.cloud.documentai.v1.EvaluateProcessorVersionRequest;
47+
import com.google.cloud.documentai.v1.EvaluateProcessorVersionResponse;
48+
import com.google.cloud.documentai.v1.Evaluation;
4449
import com.google.cloud.documentai.v1.FetchProcessorTypesRequest;
4550
import com.google.cloud.documentai.v1.FetchProcessorTypesResponse;
51+
import com.google.cloud.documentai.v1.GetEvaluationRequest;
4652
import com.google.cloud.documentai.v1.GetProcessorRequest;
4753
import com.google.cloud.documentai.v1.GetProcessorTypeRequest;
4854
import com.google.cloud.documentai.v1.GetProcessorVersionRequest;
55+
import com.google.cloud.documentai.v1.ListEvaluationsRequest;
56+
import com.google.cloud.documentai.v1.ListEvaluationsResponse;
4957
import com.google.cloud.documentai.v1.ListProcessorTypesRequest;
5058
import com.google.cloud.documentai.v1.ListProcessorTypesResponse;
5159
import com.google.cloud.documentai.v1.ListProcessorVersionsRequest;
@@ -63,6 +71,9 @@
6371
import com.google.cloud.documentai.v1.SetDefaultProcessorVersionMetadata;
6472
import com.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest;
6573
import com.google.cloud.documentai.v1.SetDefaultProcessorVersionResponse;
74+
import com.google.cloud.documentai.v1.TrainProcessorVersionMetadata;
75+
import com.google.cloud.documentai.v1.TrainProcessorVersionRequest;
76+
import com.google.cloud.documentai.v1.TrainProcessorVersionResponse;
6677
import com.google.cloud.documentai.v1.UndeployProcessorVersionMetadata;
6778
import com.google.cloud.documentai.v1.UndeployProcessorVersionRequest;
6879
import com.google.cloud.documentai.v1.UndeployProcessorVersionResponse;
@@ -138,6 +149,19 @@ public UnaryCallable<GetProcessorRequest, Processor> getProcessorCallable() {
138149
throw new UnsupportedOperationException("Not implemented: getProcessorCallable()");
139150
}
140151

152+
public OperationCallable<
153+
TrainProcessorVersionRequest,
154+
TrainProcessorVersionResponse,
155+
TrainProcessorVersionMetadata>
156+
trainProcessorVersionOperationCallable() {
157+
throw new UnsupportedOperationException(
158+
"Not implemented: trainProcessorVersionOperationCallable()");
159+
}
160+
161+
public UnaryCallable<TrainProcessorVersionRequest, Operation> trainProcessorVersionCallable() {
162+
throw new UnsupportedOperationException("Not implemented: trainProcessorVersionCallable()");
163+
}
164+
141165
public UnaryCallable<GetProcessorVersionRequest, ProcessorVersion> getProcessorVersionCallable() {
142166
throw new UnsupportedOperationException("Not implemented: getProcessorVersionCallable()");
143167
}
@@ -247,6 +271,33 @@ public UnaryCallable<ReviewDocumentRequest, Operation> reviewDocumentCallable()
247271
throw new UnsupportedOperationException("Not implemented: reviewDocumentCallable()");
248272
}
249273

274+
public OperationCallable<
275+
EvaluateProcessorVersionRequest,
276+
EvaluateProcessorVersionResponse,
277+
EvaluateProcessorVersionMetadata>
278+
evaluateProcessorVersionOperationCallable() {
279+
throw new UnsupportedOperationException(
280+
"Not implemented: evaluateProcessorVersionOperationCallable()");
281+
}
282+
283+
public UnaryCallable<EvaluateProcessorVersionRequest, Operation>
284+
evaluateProcessorVersionCallable() {
285+
throw new UnsupportedOperationException("Not implemented: evaluateProcessorVersionCallable()");
286+
}
287+
288+
public UnaryCallable<GetEvaluationRequest, Evaluation> getEvaluationCallable() {
289+
throw new UnsupportedOperationException("Not implemented: getEvaluationCallable()");
290+
}
291+
292+
public UnaryCallable<ListEvaluationsRequest, ListEvaluationsPagedResponse>
293+
listEvaluationsPagedCallable() {
294+
throw new UnsupportedOperationException("Not implemented: listEvaluationsPagedCallable()");
295+
}
296+
297+
public UnaryCallable<ListEvaluationsRequest, ListEvaluationsResponse> listEvaluationsCallable() {
298+
throw new UnsupportedOperationException("Not implemented: listEvaluationsCallable()");
299+
}
300+
250301
public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
251302
listLocationsPagedCallable() {
252303
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");

0 commit comments

Comments
 (0)