12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- // Copyright 2022 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- syntax = "proto3";
- package google.cloud.documentai.v1;
- import "google/protobuf/field_mask.proto";
- option csharp_namespace = "Google.Cloud.DocumentAI.V1";
- option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1;documentai";
- option java_multiple_files = true;
- option java_outer_classname = "DocumentIoProto";
- option java_package = "com.google.cloud.documentai.v1";
- option php_namespace = "Google\\Cloud\\DocumentAI\\V1";
- option ruby_package = "Google::Cloud::DocumentAI::V1";
- // Payload message of raw document content (bytes).
- message RawDocument {
- // Inline document content.
- bytes content = 1;
- // An IANA MIME type (RFC6838) indicating the nature and format of the
- // [content][google.cloud.documentai.v1.RawDocument.content].
- string mime_type = 2;
- }
- // Specifies a document stored on Cloud Storage.
- message GcsDocument {
- // The Cloud Storage object uri.
- string gcs_uri = 1;
- // An IANA MIME type (RFC6838) of the content.
- string mime_type = 2;
- }
- // Specifies a set of documents on Cloud Storage.
- message GcsDocuments {
- // The list of documents.
- repeated GcsDocument documents = 1;
- }
- // Specifies all documents on Cloud Storage with a common prefix.
- message GcsPrefix {
- // The URI prefix.
- string gcs_uri_prefix = 1;
- }
- // The common config to specify a set of documents used as input.
- message BatchDocumentsInputConfig {
- // The source.
- oneof source {
- // The set of documents that match the specified Cloud Storage `gcs_prefix`.
- GcsPrefix gcs_prefix = 1;
- // The set of documents individually specified on Cloud Storage.
- GcsDocuments gcs_documents = 2;
- }
- }
- // Config that controls the output of documents. All documents will be written
- // as a JSON file.
- message DocumentOutputConfig {
- // The configuration used when outputting documents.
- message GcsOutputConfig {
- // The Cloud Storage uri (a directory) of the output.
- string gcs_uri = 1;
- // Specifies which fields to include in the output documents.
- // Only supports top level document and pages field so it must be in the
- // form of `{document_field_name}` or `pages.{page_field_name}`.
- google.protobuf.FieldMask field_mask = 2;
- }
- // The destination of the results.
- oneof destination {
- // Output config to write the results to Cloud Storage.
- GcsOutputConfig gcs_output_config = 1;
- }
- }
|