Skip to content

Commit 120a89c

Browse files
Google APIscopybara-github
authored andcommitted
feat: add StyleInfo to document.proto
feat: add REPLACE enum to OperationType in document.proto feat: add PropertyMetadata and EntityTypeMetadata to document_schema.proto feat: add IMPORTING enum to State in processor.proto chore: updated comments PiperOrigin-RevId: 540932243
1 parent 2d7af51 commit 120a89c

15 files changed

Lines changed: 707 additions & 196 deletions

google/cloud/documentai/v1beta3/BUILD.bazel

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ proto_library(
2222
name = "documentai_proto",
2323
srcs = [
2424
"barcode.proto",
25+
"dataset.proto",
2526
"document.proto",
2627
"document_io.proto",
2728
"document_processor_service.proto",
2829
"document_schema.proto",
30+
"document_service.proto",
2931
"evaluation.proto",
3032
"geometry.proto",
3133
"operation_metadata.proto",
@@ -91,8 +93,8 @@ java_gapic_library(
9193
rest_numeric_enums = True,
9294
service_yaml = "documentai_v1beta3.yaml",
9395
test_deps = [
94-
":documentai_java_grpc",
9596
"//google/cloud/location:location_java_grpc",
97+
":documentai_java_grpc",
9698
],
9799
transport = "grpc+rest",
98100
deps = [
@@ -107,6 +109,8 @@ java_gapic_test(
107109
test_classes = [
108110
"com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClientHttpJsonTest",
109111
"com.google.cloud.documentai.v1beta3.DocumentProcessorServiceClientTest",
112+
"com.google.cloud.documentai.v1beta3.DocumentServiceClientHttpJsonTest",
113+
"com.google.cloud.documentai.v1beta3.DocumentServiceClientTest",
110114
],
111115
runtime_deps = [":documentai_java_gapic_test"],
112116
)
@@ -242,10 +246,13 @@ php_gapic_library(
242246
name = "documentai_php_gapic",
243247
srcs = [":documentai_proto_with_info"],
244248
grpc_service_config = "documentai_v1beta3_grpc_service_config.json",
249+
migration_mode = "PRE_MIGRATION_SURFACE_ONLY",
245250
rest_numeric_enums = True,
246251
service_yaml = "documentai_v1beta3.yaml",
247252
transport = "grpc+rest",
248-
deps = [":documentai_php_proto"],
253+
deps = [
254+
":documentai_php_proto",
255+
],
249256
)
250257

251258
# Open Source Packages
@@ -355,6 +362,7 @@ load(
355362

356363
csharp_proto_library(
357364
name = "documentai_csharp_proto",
365+
extra_opts = [""],
358366
deps = [":documentai_proto"],
359367
)
360368

google/cloud/documentai/v1beta3/barcode.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.documentai.v1beta3;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/cloud/documentai/v1beta3/document_io.proto";
22+
import "google/cloud/documentai/v1beta3/document_schema.proto";
23+
24+
option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
25+
option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "DatasetProto";
28+
option java_package = "com.google.cloud.documentai.v1beta3";
29+
option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
30+
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
31+
option (google.api.resource_definition) = {
32+
type: "contentwarehouse.googleapis.com/Schema"
33+
pattern: "projects/{project}/locations/{location}/schemas/{schema}"
34+
};
35+
36+
// A singleton resource under a
37+
// [Processor][google.cloud.documentai.v1beta3.Processor] which configures a
38+
// collection of documents.
39+
message Dataset {
40+
option (google.api.resource) = {
41+
type: "documentai.googleapis.com/Dataset"
42+
pattern: "projects/{project}/locations/{location}/processors/{processor}/dataset"
43+
};
44+
45+
// Configuration specific to the Cloud Storage-based implementation.
46+
message GCSManagedConfig {
47+
// Required. The Cloud Storage URI (a directory) where the documents
48+
// belonging to the dataset must be stored.
49+
GcsPrefix gcs_prefix = 1 [(google.api.field_behavior) = REQUIRED];
50+
}
51+
52+
// Configuration specific to the Document AI Warehouse-based implementation.
53+
message DocumentWarehouseConfig {
54+
// Output only. The collection in Document AI Warehouse associated with the
55+
// dataset.
56+
string collection = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
57+
58+
// Output only. The schema in Document AI Warehouse associated with the
59+
// dataset.
60+
string schema = 2 [
61+
(google.api.field_behavior) = OUTPUT_ONLY,
62+
(google.api.resource_reference) = {
63+
type: "contentwarehouse.googleapis.com/Schema"
64+
}
65+
];
66+
}
67+
68+
// Configuration specific to an unmanaged dataset.
69+
message UnmanagedDatasetConfig {}
70+
71+
// Configuration specific to spanner-based indexing.
72+
message SpannerIndexingConfig {}
73+
74+
// Different states of a dataset.
75+
enum State {
76+
// Default unspecified enum, should not be used.
77+
STATE_UNSPECIFIED = 0;
78+
79+
// Dataset has not been initialized.
80+
UNINITIALIZED = 1;
81+
82+
// Dataset is being initialized.
83+
INITIALIZING = 2;
84+
85+
// Dataset has been initialized.
86+
INITIALIZED = 3;
87+
}
88+
89+
oneof storage_source {
90+
// Optional. User-managed Cloud Storage dataset configuration. Use this
91+
// configuration if the dataset documents are stored under a user-managed
92+
// Cloud Storage location.
93+
GCSManagedConfig gcs_managed_config = 3
94+
[(google.api.field_behavior) = OPTIONAL];
95+
96+
// Optional. Document AI Warehouse-based dataset configuration.
97+
DocumentWarehouseConfig document_warehouse_config = 5
98+
[(google.api.field_behavior) = OPTIONAL];
99+
100+
// Optional. Unmanaged dataset configuration. Use this configuration if the
101+
// dataset documents are managed by the document service internally (not
102+
// user-managed).
103+
UnmanagedDatasetConfig unmanaged_dataset_config = 6
104+
[(google.api.field_behavior) = OPTIONAL];
105+
}
106+
107+
oneof indexing_source {
108+
// Optional. A lightweight indexing source with low latency and high
109+
// reliability, but lacking advanced features like CMEK and content-based
110+
// search.
111+
SpannerIndexingConfig spanner_indexing_config = 4
112+
[(google.api.field_behavior) = OPTIONAL];
113+
}
114+
115+
// Dataset resource name.
116+
// Format:
117+
// `projects/{project}/locations/{location}/processors/{processor}/dataset`
118+
string name = 1;
119+
120+
// Required. State of the dataset. Ignored when updating dataset.
121+
State state = 2 [(google.api.field_behavior) = REQUIRED];
122+
}
123+
124+
// Dataset Schema.
125+
message DatasetSchema {
126+
option (google.api.resource) = {
127+
type: "documentai.googleapis.com/DatasetSchema"
128+
pattern: "projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema"
129+
};
130+
131+
// Dataset schema resource name.
132+
// Format:
133+
// `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`
134+
string name = 1;
135+
136+
// Optional. Schema of the dataset.
137+
DocumentSchema document_schema = 3 [(google.api.field_behavior) = OPTIONAL];
138+
}

0 commit comments

Comments
 (0)