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 15syntax = "proto3"; 16 17package google.cloud.contentwarehouse.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/contentwarehouse/v1/common.proto"; 24import "google/cloud/contentwarehouse/v1/pipelines.proto"; 25import "google/longrunning/operations.proto"; 26 27option csharp_namespace = "Google.Cloud.ContentWarehouse.V1"; 28option go_package = "cloud.google.com/go/contentwarehouse/apiv1/contentwarehousepb;contentwarehousepb"; 29option java_multiple_files = true; 30option java_outer_classname = "PipelineServiceProto"; 31option java_package = "com.google.cloud.contentwarehouse.v1"; 32option php_namespace = "Google\\Cloud\\ContentWarehouse\\V1"; 33option ruby_package = "Google::Cloud::ContentWarehouse::V1"; 34 35// This service lets you manage pipelines. 36service PipelineService { 37 option (google.api.default_host) = "contentwarehouse.googleapis.com"; 38 option (google.api.oauth_scopes) = 39 "https://www.googleapis.com/auth/cloud-platform"; 40 41 // Run a predefined pipeline. 42 rpc RunPipeline(RunPipelineRequest) returns (google.longrunning.Operation) { 43 option (google.api.http) = { 44 post: "/v1/{name=projects/*/locations/*}:runPipeline" 45 body: "*" 46 }; 47 option (google.api.method_signature) = "name"; 48 option (google.longrunning.operation_info) = { 49 response_type: "RunPipelineResponse" 50 metadata_type: "RunPipelineMetadata" 51 }; 52 } 53} 54 55// Request message for DocumentService.RunPipeline. 56message RunPipelineRequest { 57 // Required. The resource name which owns the resources of the pipeline. 58 // Format: projects/{project_number}/locations/{location}. 59 string name = 1 [ 60 (google.api.field_behavior) = REQUIRED, 61 (google.api.resource_reference) = { 62 type: "contentwarehouse.googleapis.com/Location" 63 } 64 ]; 65 66 // The predefined pipelines. 67 oneof pipeline { 68 // Cloud Storage ingestion pipeline. 69 GcsIngestPipeline gcs_ingest_pipeline = 2; 70 71 // Use DocAI processors to process documents in Cloud Storage and ingest 72 // them to Document Warehouse. 73 GcsIngestWithDocAiProcessorsPipeline 74 gcs_ingest_with_doc_ai_processors_pipeline = 3; 75 76 // Export docuemnts from Document Warehouse to CDW for training purpose. 77 ExportToCdwPipeline export_cdw_pipeline = 4; 78 79 // Use a DocAI processor to process documents in Document Warehouse, and 80 // re-ingest the updated results into Document Warehouse. 81 ProcessWithDocAiPipeline process_with_doc_ai_pipeline = 5; 82 } 83 84 // The meta information collected about the end user, used to enforce access 85 // control for the service. 86 RequestMetadata request_metadata = 6; 87} 88