Skip to content

Commit

Permalink
feat: [documentai] Add ImportProcessorVersion in v1beta3 (#4109)
Browse files Browse the repository at this point in the history
* feat: Add ImportProcessorVersion in v1beta3

PiperOrigin-RevId: 517997886

Source-Link: googleapis/googleapis@ae3e613

Source-Link: googleapis/googleapis-gen@a9e1daa
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6ImE5ZTFkYWFiMTQxZjMwMmEzMzIwNDc4ZDIyYzA3YWE2NWI4MGQ4ZWIifQ==

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Mar 21, 2023
1 parent d47d3a3 commit 764faca
Show file tree
Hide file tree
Showing 12 changed files with 1,663 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-documentai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Document_processor_service.get_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_processor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_processor.js,samples/README.md) |
| Document_processor_service.get_processor_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_processor_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_processor_type.js,samples/README.md) |
| Document_processor_service.get_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_processor_version.js,samples/README.md) |
| Document_processor_service.import_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.import_processor_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.import_processor_version.js,samples/README.md) |
| Document_processor_service.list_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_evaluations.js,samples/README.md) |
| Document_processor_service.list_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_processor_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_processor_types.js,samples/README.md) |
| Document_processor_service.list_processor_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_processor_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_processor_versions.js,samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,20 @@ service DocumentProcessorService {
};
option (google.api.method_signature) = "parent";
}

// Imports a processor version from source processor version.
rpc ImportProcessorVersion(ImportProcessorVersionRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta3/{parent=projects/*/locations/*/processors/*}/processorVersions:importProcessorVersion"
body: "*"
};
option (google.api.method_signature) = "parent";
option (google.longrunning.operation_info) = {
response_type: "ImportProcessorVersionResponse"
metadata_type: "ImportProcessorVersionMetadata"
};
}
}

// Options for Process API
Expand Down Expand Up @@ -1121,3 +1135,47 @@ message ListEvaluationsResponse {
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}

// The request message for the ImportProcessorVersion method.
// This method requires Document AI Service Agent of the destination project in
// the source project's IAM with [Document AI Editor
// role](https://cloud.google.com/document-ai/docs/access-control/iam-roles).
//
// The destination project is specified as part of the `parent` field.
// The source project is specified as part of `source` field.
//
// The Service Agent for Document AI can be found in
// https://cloud.google.com/iam/docs/service-agents.
message ImportProcessorVersionRequest {
oneof source {
// The source processor version to import from.
string processor_version_source = 2 [(google.api.resource_reference) = {
type: "documentai.googleapis.com/ProcessorVersion"
}];
}

// Required. The destination processor name to create the processor version
// in. Format:
// `projects/{project}/locations/{location}/processors/{processor}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "documentai.googleapis.com/ProcessorVersion"
}
];
}

// The response message for the ImportProcessorVersion method.
message ImportProcessorVersionResponse {
// The destination processor version name.
string processor_version = 1 [(google.api.resource_reference) = {
type: "documentai.googleapis.com/ProcessorVersion"
}];
}

// The long running operation metadata for the ImportProcessorVersion
// method.
message ImportProcessorVersionMetadata {
// The basic metadata for the long running operation.
CommonOperationMetadata common_metadata = 1;
}
Loading

0 comments on commit 764faca

Please sign in to comment.