@@ -29,6 +29,10 @@ option java_outer_classname = "PipelinesProto";
2929option java_package = "com.google.cloud.contentwarehouse.v1" ;
3030option php_namespace = "Google\\Cloud\\ContentWarehouse\\V1" ;
3131option 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.
3438message 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.
0 commit comments