@@ -321,6 +321,20 @@ service DocumentProcessorService {
321321 };
322322 option (google.api.method_signature ) = "parent" ;
323323 }
324+
325+ // Imports a processor version from source processor version.
326+ rpc ImportProcessorVersion (ImportProcessorVersionRequest )
327+ returns (google.longrunning.Operation ) {
328+ option (google.api.http ) = {
329+ post : "/v1beta3/{parent=projects/*/locations/*/processors/*}/processorVersions:importProcessorVersion"
330+ body : "*"
331+ };
332+ option (google.api.method_signature ) = "parent" ;
333+ option (google.longrunning.operation_info ) = {
334+ response_type : "ImportProcessorVersionResponse"
335+ metadata_type : "ImportProcessorVersionMetadata"
336+ };
337+ }
324338}
325339
326340// Options for Process API
@@ -1121,3 +1135,47 @@ message ListEvaluationsResponse {
11211135 // If this field is omitted, there are no subsequent pages.
11221136 string next_page_token = 2 ;
11231137}
1138+
1139+ // The request message for the ImportProcessorVersion method.
1140+ // This method requires Document AI Service Agent of the destination project in
1141+ // the source project's IAM with [Document AI Editor
1142+ // role](https://cloud.google.com/document-ai/docs/access-control/iam-roles).
1143+ //
1144+ // The destination project is specified as part of the `parent` field.
1145+ // The source project is specified as part of `source` field.
1146+ //
1147+ // The Service Agent for Document AI can be found in
1148+ // https://cloud.google.com/iam/docs/service-agents.
1149+ message ImportProcessorVersionRequest {
1150+ oneof source {
1151+ // The source processor version to import from.
1152+ string processor_version_source = 2 [(google.api.resource_reference ) = {
1153+ type : "documentai.googleapis.com/ProcessorVersion"
1154+ }];
1155+ }
1156+
1157+ // Required. The destination processor name to create the processor version
1158+ // in. Format:
1159+ // `projects/{project}/locations/{location}/processors/{processor}`
1160+ string parent = 1 [
1161+ (google.api.field_behavior ) = REQUIRED ,
1162+ (google.api.resource_reference ) = {
1163+ child_type : "documentai.googleapis.com/ProcessorVersion"
1164+ }
1165+ ];
1166+ }
1167+
1168+ // The response message for the ImportProcessorVersion method.
1169+ message ImportProcessorVersionResponse {
1170+ // The destination processor version name.
1171+ string processor_version = 1 [(google.api.resource_reference ) = {
1172+ type : "documentai.googleapis.com/ProcessorVersion"
1173+ }];
1174+ }
1175+
1176+ // The long running operation metadata for the ImportProcessorVersion
1177+ // method.
1178+ message ImportProcessorVersionMetadata {
1179+ // The basic metadata for the long running operation.
1180+ CommonOperationMetadata common_metadata = 1 ;
1181+ }
0 commit comments