Skip to content

Commit 998711e

Browse files
feat: [contentwarehouse] add ROOT_FOLDER field to Document Warehouse API v1 (#4672)
* feat: add `ROOT_FOLDER` field to Document Warehouse API v1 feat: add `cloud_function`fields to support new ingestion option in Document Warehouse API v1 PiperOrigin-RevId: 566393178 Source-Link: googleapis/googleapis@c7c2ce2 Source-Link: googleapis/googleapis-gen@b24ddfe Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6ImIyNGRkZmVjODM1MmUwNWMxNzAyMTU5ZTE4OTQxOTRmNmQ1ZWY4NDUifQ== * 🦉 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 12528e1 commit 998711e

5 files changed

Lines changed: 83 additions & 4 deletions

File tree

packages/google-cloud-contentwarehouse/protos/google/cloud/contentwarehouse/v1/filters.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ message FileTypeFilter {
262262

263263
// Returns only non-folder documents.
264264
DOCUMENT = 3;
265+
266+
// Returns only root folders
267+
ROOT_FOLDER = 4;
265268
}
266269

267270
// The type of files to return.

packages/google-cloud-contentwarehouse/protos/google/cloud/contentwarehouse/v1/pipelines.proto

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ option java_outer_classname = "PipelinesProto";
2929
option java_package = "com.google.cloud.contentwarehouse.v1";
3030
option php_namespace = "Google\\Cloud\\ContentWarehouse\\V1";
3131
option ruby_package = "Google::Cloud::ContentWarehouse::V1";
32+
option (google.api.resource_definition) = {
33+
type: "cloudfunctions.googleapis.com/CloudFunction"
34+
pattern: "projects/{project}/locations/{location}/functions/{function}"
35+
};
3236

3337
// Response message of RunPipeline method.
3438
message RunPipelineResponse {}
@@ -146,6 +150,33 @@ message IngestPipelineConfig {
146150
// linked during ingestion process. Format is
147151
// `projects/{project}/locations/{location}/documents/{folder_id}`
148152
string folder = 3 [(google.api.field_behavior) = OPTIONAL];
153+
154+
// The Cloud Function resource name. The Cloud Function needs to live inside
155+
// consumer project and is accessible to Document AI Warehouse P4SA.
156+
// Only Cloud Functions V2 is supported. Cloud function execution should
157+
// complete within 5 minutes or this file ingestion may fail due to timeout.
158+
// Format: `https://{region}-{project_id}.cloudfunctions.net/{cloud_function}`
159+
// The following keys are available the request json payload.
160+
// * display_name
161+
// * properties
162+
// * plain_text
163+
// * reference_id
164+
// * document_schema_name
165+
// * raw_document_path
166+
// * raw_document_file_type
167+
//
168+
// The following keys from the cloud function json response payload will be
169+
// ingested to the Document AI Warehouse as part of Document proto content
170+
// and/or related information. The original values will be overridden if any
171+
// key is present in the response.
172+
// * display_name
173+
// * properties
174+
// * plain_text
175+
// * document_acl_policy
176+
// * folder
177+
string cloud_function = 4 [(google.api.resource_reference) = {
178+
type: "cloudfunctions.googleapis.com/CloudFunction"
179+
}];
149180
}
150181

151182
// The configuration of the Cloud Storage Ingestion pipeline.

packages/google-cloud-contentwarehouse/protos/protos.d.ts

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-contentwarehouse/protos/protos.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-contentwarehouse/protos/protos.json

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)