From 512ef37b330c16029bd0a2721efe07ce9a31f90b Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Fri, 16 Jun 2023 22:42:12 +0000
Subject: [PATCH] feat: [documentai] add StyleInfo to document.proto (#4352)
- [ ] Regenerate this pull request now.
feat: add IMPORTING enum to State in processor.proto
chore: updated comments
PiperOrigin-RevId: 540937637
Source-Link: https://togithub.com/googleapis/googleapis/commit/b2b372306493306c2c08e808def1412366df690a
Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9f620d19ce9a3aaf50136c9985d605106f72baeb
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjlmNjIwZDE5Y2U5YTNhYWY1MDEzNmM5OTg1ZDYwNTEwNmY3MmJhZWIifQ==
BEGIN_NESTED_COMMIT
feat: [documentai] add StyleInfo to document.proto
feat: add REPLACE enum to OperationType in document.proto
feat: add PropertyMetadata and EntityTypeMetadata to document_schema.proto
feat: add IMPORTING enum to State in processor.proto
chore: updated comments
PiperOrigin-RevId: 540932243
Source-Link: https://togithub.com/googleapis/googleapis/commit/120a89c6c7660b0503a796f91e6e469fb3354131
Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/82a61cd89b4899ac94c87791916b77bf2ab73d16
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjgyYTYxY2Q4OWI0ODk5YWM5NGM4Nzc5MTkxNmI3N2JmMmFiNzNkMTYifQ==
END_NESTED_COMMIT
---
packages/google-cloud-documentai/README.md | 106 +-
.../google/cloud/documentai/v1/barcode.proto | 2 +-
.../google/cloud/documentai/v1/document.proto | 116 +-
.../cloud/documentai/v1/document_io.proto | 2 +-
.../v1/document_processor_service.proto | 302 +-
.../cloud/documentai/v1/document_schema.proto | 15 +-
.../cloud/documentai/v1/evaluation.proto | 2 +-
.../google/cloud/documentai/v1/geometry.proto | 2 +-
.../documentai/v1/operation_metadata.proto | 2 +-
.../cloud/documentai/v1/processor.proto | 22 +-
.../cloud/documentai/v1/processor_type.proto | 7 +-
.../cloud/documentai/v1beta3/barcode.proto | 2 +-
.../cloud/documentai/v1beta3/dataset.proto | 138 +
.../cloud/documentai/v1beta3/document.proto | 118 +-
.../documentai/v1beta3/document_io.proto | 13 +-
.../v1beta3/document_processor_service.proto | 397 +-
.../documentai/v1beta3/document_schema.proto | 53 +-
.../documentai/v1beta3/document_service.proto | 112 +
.../cloud/documentai/v1beta3/evaluation.proto | 2 +-
.../cloud/documentai/v1beta3/geometry.proto | 2 +-
.../v1beta3/operation_metadata.proto | 2 +-
.../cloud/documentai/v1beta3/processor.proto | 22 +-
.../documentai/v1beta3/processor_type.proto | 7 +-
.../protos/protos.d.ts | 10754 +++--
.../google-cloud-documentai/protos/protos.js | 36120 +++++++++-------
.../protos/protos.json | 1143 +-
.../google-cloud-documentai/samples/README.md | 54 +-
...ocessor_service.batch_process_documents.js | 12 +-
...ment_processor_service.create_processor.js | 8 +-
...processor_service.fetch_processor_types.js | 5 +-
...ment_processor_service.list_evaluations.js | 4 +-
..._processor_service.list_processor_types.js | 9 +-
...ocessor_service.list_processor_versions.js | 4 +-
...ument_processor_service.list_processors.js | 4 +-
...ment_processor_service.process_document.js | 11 +-
...ument_processor_service.review_document.js | 5 +-
...ocessor_service.train_processor_version.js | 3 +-
...t_metadata.google.cloud.documentai.v1.json | 22 +-
...adata.google.cloud.documentai.v1beta1.json | 2 +-
...adata.google.cloud.documentai.v1beta2.json | 2 +-
...ocessor_service.batch_process_documents.js | 12 +-
...ment_processor_service.create_processor.js | 8 +-
...processor_service.fetch_processor_types.js | 5 +-
...cessor_service.import_processor_version.js | 3 +-
...ment_processor_service.list_evaluations.js | 4 +-
..._processor_service.list_processor_types.js | 9 +-
...ocessor_service.list_processor_versions.js | 4 +-
...ument_processor_service.list_processors.js | 4 +-
...ment_processor_service.process_document.js | 16 +-
...ument_processor_service.review_document.js | 5 +-
...ocessor_service.train_processor_version.js | 7 +-
.../document_service.get_dataset_schema.js | 67 +
.../document_service.update_dataset.js | 67 +
.../document_service.update_dataset_schema.js | 66 +
...adata.google.cloud.documentai.v1beta3.json | 160 +-
.../v1/document_processor_service_client.ts | 121 +-
...ument_processor_service_client_config.json | 2 +-
.../document_processor_service_client.ts | 238 +-
...ument_processor_service_client_config.json | 2 +-
...document_processor_service_proto_list.json | 2 +
.../src/v1beta3/document_service_client.ts | 1398 +
.../document_service_client_config.json | 38 +
.../v1beta3/document_service_proto_list.json | 14 +
.../src/v1beta3/gapic_metadata.json | 44 +
.../src/v1beta3/index.ts | 1 +
...apic_document_processor_service_v1beta3.ts | 134 +
.../test/gapic_document_service_v1beta3.ts | 1618 +
67 files changed, 32377 insertions(+), 21280 deletions(-)
create mode 100644 packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/dataset.proto
create mode 100644 packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_service.proto
create mode 100644 packages/google-cloud-documentai/samples/generated/v1beta3/document_service.get_dataset_schema.js
create mode 100644 packages/google-cloud-documentai/samples/generated/v1beta3/document_service.update_dataset.js
create mode 100644 packages/google-cloud-documentai/samples/generated/v1beta3/document_service.update_dataset_schema.js
create mode 100644 packages/google-cloud-documentai/src/v1beta3/document_service_client.ts
create mode 100644 packages/google-cloud-documentai/src/v1beta3/document_service_client_config.json
create mode 100644 packages/google-cloud-documentai/src/v1beta3/document_service_proto_list.json
create mode 100644 packages/google-cloud-documentai/test/gapic_document_service_v1beta3.ts
diff --git a/packages/google-cloud-documentai/README.md b/packages/google-cloud-documentai/README.md
index c64b8ae20a6..384030aeb8c 100644
--- a/packages/google-cloud-documentai/README.md
+++ b/packages/google-cloud-documentai/README.md
@@ -2,7 +2,7 @@
[//]: # "To regenerate it, use `python -m synthtool`."
-# [Document AI: Node.js Client](https://github.com/googleapis/google-cloud-node)
+# [Document AI: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-documentai)
[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/documentai.svg)](https://www.npmjs.org/package/@google-cloud/documentai)
@@ -131,60 +131,62 @@ async function quickstart() {
## Samples
-Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
+Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-documentai/samples) directory. Each sample's `README.md` has instructions for running its sample.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
-| Document_processor_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.batch_process_documents.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/v1/document_processor_service.batch_process_documents.js,samples/README.md) |
-| Document_processor_service.create_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.create_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/v1/document_processor_service.create_processor.js,samples/README.md) |
-| Document_processor_service.delete_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.delete_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/v1/document_processor_service.delete_processor.js,samples/README.md) |
-| Document_processor_service.delete_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.delete_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/v1/document_processor_service.delete_processor_version.js,samples/README.md) |
-| Document_processor_service.deploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.deploy_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/v1/document_processor_service.deploy_processor_version.js,samples/README.md) |
-| Document_processor_service.disable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.disable_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/v1/document_processor_service.disable_processor.js,samples/README.md) |
-| Document_processor_service.enable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.enable_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/v1/document_processor_service.enable_processor.js,samples/README.md) |
-| Document_processor_service.evaluate_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_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/v1/document_processor_service.evaluate_processor_version.js,samples/README.md) |
-| Document_processor_service.fetch_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.fetch_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/v1/document_processor_service.fetch_processor_types.js,samples/README.md) |
-| Document_processor_service.get_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.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/v1/document_processor_service.get_evaluation.js,samples/README.md) |
-| Document_processor_service.get_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/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/v1/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/v1/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/v1/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/v1/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/v1/document_processor_service.get_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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/document_processor_service.list_processor_versions.js,samples/README.md) |
-| Document_processor_service.list_processors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processors.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/v1/document_processor_service.list_processors.js,samples/README.md) |
-| Document_processor_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.process_document.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/v1/document_processor_service.process_document.js,samples/README.md) |
-| Document_processor_service.review_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.review_document.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/v1/document_processor_service.review_document.js,samples/README.md) |
-| Document_processor_service.set_default_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.set_default_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/v1/document_processor_service.set_default_processor_version.js,samples/README.md) |
-| Document_processor_service.train_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_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/v1/document_processor_service.train_processor_version.js,samples/README.md) |
-| Document_processor_service.undeploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.undeploy_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/v1/document_processor_service.undeploy_processor_version.js,samples/README.md) |
-| Document_understanding_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta1/document_understanding_service.batch_process_documents.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/v1beta1/document_understanding_service.batch_process_documents.js,samples/README.md) |
-| Document_understanding_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta2/document_understanding_service.batch_process_documents.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/v1beta2/document_understanding_service.batch_process_documents.js,samples/README.md) |
-| Document_understanding_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta2/document_understanding_service.process_document.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/v1beta2/document_understanding_service.process_document.js,samples/README.md) |
-| Document_processor_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.batch_process_documents.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.batch_process_documents.js,samples/README.md) |
-| Document_processor_service.create_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.create_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.create_processor.js,samples/README.md) |
-| Document_processor_service.delete_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.delete_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.delete_processor.js,samples/README.md) |
-| Document_processor_service.delete_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.delete_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.delete_processor_version.js,samples/README.md) |
-| Document_processor_service.deploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.deploy_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.deploy_processor_version.js,samples/README.md) |
-| Document_processor_service.disable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.disable_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.disable_processor.js,samples/README.md) |
-| Document_processor_service.enable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.enable_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.enable_processor.js,samples/README.md) |
-| Document_processor_service.evaluate_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.evaluate_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.evaluate_processor_version.js,samples/README.md) |
-| Document_processor_service.fetch_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.fetch_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.fetch_processor_types.js,samples/README.md) |
-| Document_processor_service.get_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_evaluation.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_evaluation.js,samples/README.md) |
-| 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) |
-| Document_processor_service.list_processors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_processors.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_processors.js,samples/README.md) |
-| Document_processor_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.process_document.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.process_document.js,samples/README.md) |
-| Document_processor_service.review_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.review_document.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.review_document.js,samples/README.md) |
-| Document_processor_service.set_default_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.set_default_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.set_default_processor_version.js,samples/README.md) |
-| Document_processor_service.train_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.train_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.train_processor_version.js,samples/README.md) |
-| Document_processor_service.undeploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.undeploy_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.undeploy_processor_version.js,samples/README.md) |
-| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/quickstart.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/quickstart.js,samples/README.md) |
-| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/test/quickstart.test.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/test/quickstart.test.js,samples/README.md) |
+| Document_processor_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.batch_process_documents.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/v1/document_processor_service.batch_process_documents.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.create_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.create_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/v1/document_processor_service.create_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.delete_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.delete_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/v1/document_processor_service.delete_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.delete_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.delete_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/v1/document_processor_service.delete_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.deploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.deploy_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/v1/document_processor_service.deploy_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.disable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.disable_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/v1/document_processor_service.disable_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.enable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.enable_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/v1/document_processor_service.enable_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.evaluate_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.evaluate_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/v1/document_processor_service.evaluate_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.fetch_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.fetch_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/v1/document_processor_service.fetch_processor_types.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.get_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.get_evaluation.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/v1/document_processor_service.get_evaluation.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.get_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/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/v1/document_processor_service.get_processor.js,packages/google-cloud-documentai/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/v1/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/v1/document_processor_service.get_processor_type.js,packages/google-cloud-documentai/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/v1/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/v1/document_processor_service.get_processor_version.js,packages/google-cloud-documentai/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/v1/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/v1/document_processor_service.list_evaluations.js,packages/google-cloud-documentai/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/v1/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/v1/document_processor_service.list_processor_types.js,packages/google-cloud-documentai/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/v1/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/v1/document_processor_service.list_processor_versions.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.list_processors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.list_processors.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/v1/document_processor_service.list_processors.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.process_document.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/v1/document_processor_service.process_document.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.review_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.review_document.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/v1/document_processor_service.review_document.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.set_default_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.set_default_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/v1/document_processor_service.set_default_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.train_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.train_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/v1/document_processor_service.train_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.undeploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1/document_processor_service.undeploy_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/v1/document_processor_service.undeploy_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_understanding_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta1/document_understanding_service.batch_process_documents.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/v1beta1/document_understanding_service.batch_process_documents.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_understanding_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta2/document_understanding_service.batch_process_documents.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/v1beta2/document_understanding_service.batch_process_documents.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_understanding_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta2/document_understanding_service.process_document.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/v1beta2/document_understanding_service.process_document.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.batch_process_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.batch_process_documents.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.batch_process_documents.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.create_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.create_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.create_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.delete_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.delete_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.delete_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.delete_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.delete_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.delete_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.deploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.deploy_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.deploy_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.disable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.disable_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.disable_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.enable_processor | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.enable_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.enable_processor.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.evaluate_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.evaluate_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.evaluate_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.fetch_processor_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.fetch_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.fetch_processor_types.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.get_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.get_evaluation.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_evaluation.js,packages/google-cloud-documentai/samples/README.md) |
+| 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,packages/google-cloud-documentai/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,packages/google-cloud-documentai/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,packages/google-cloud-documentai/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,packages/google-cloud-documentai/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,packages/google-cloud-documentai/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,packages/google-cloud-documentai/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,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.list_processors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.list_processors.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_processors.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.process_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.process_document.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.process_document.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.review_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.review_document.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.review_document.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.set_default_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.set_default_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.set_default_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.train_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.train_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.train_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_processor_service.undeploy_processor_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_processor_service.undeploy_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.undeploy_processor_version.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_service.get_dataset_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_service.get_dataset_schema.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_service.get_dataset_schema.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_service.update_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_service.update_dataset.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_service.update_dataset.js,packages/google-cloud-documentai/samples/README.md) |
+| Document_service.update_dataset_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/generated/v1beta3/document_service.update_dataset_schema.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_service.update_dataset_schema.js,packages/google-cloud-documentai/samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-documentai/samples/quickstart.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/quickstart.js,packages/google-cloud-documentai/samples/README.md) |
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/barcode.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/barcode.proto
index c131dcbed29..805203ba020 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/barcode.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/barcode.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto
index f3431b3d4af..92ccfc0a929 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -64,7 +64,8 @@ message Document {
// Font size for the text.
float size = 1;
- // Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+ // Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+ // `pt`).
string unit = 2;
}
@@ -78,17 +79,18 @@ message Document {
// Text background color.
google.type.Color background_color = 3;
- // Font weight. Possible values are normal, bold, bolder, and lighter.
- // https://www.w3schools.com/cssref/pr_font_weight.asp
+ // [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+ // Possible values are `normal`, `bold`, `bolder`, and `lighter`.
string font_weight = 4;
- // Text style. Possible values are normal, italic, and oblique.
- // https://www.w3schools.com/cssref/pr_font_font-style.asp
+ // [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+ // Possible values are `normal`, `italic`, and `oblique`.
string text_style = 5;
- // Text decoration. Follows CSS standard.
- //
- // https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+ // [Text
+ // decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+ // Follows CSS standard.
+ //
string text_decoration = 6;
// Font size.
@@ -118,7 +120,9 @@ message Document {
// Raw byte content of the image.
bytes content = 1;
- // Encoding mime type for the image.
+ // Encoding [media type (MIME
+ // type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+ // for the image.
string mime_type = 2;
// Width of the image in pixels.
@@ -255,6 +259,59 @@ message Document {
Type type = 1;
}
+ // Font and other text style attributes.
+ message StyleInfo {
+ // Font size in points (`1` point is `¹⁄₇₂` inches).
+ int32 font_size = 1;
+
+ // Font size in pixels, equal to _unrounded
+ // [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_
+ // * _resolution_ ÷ `72.0`.
+ double pixel_font_size = 2;
+
+ // Letter spacing in points.
+ double letter_spacing = 3;
+
+ // Name or style of the font.
+ string font_type = 4;
+
+ // Whether the text is bold (equivalent to
+ // [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight]
+ // is at least `700`).
+ bool bold = 5;
+
+ // Whether the text is italic.
+ bool italic = 6;
+
+ // Whether the text is underlined.
+ bool underlined = 7;
+
+ // Whether the text is strikethrough.
+ bool strikeout = 8;
+
+ // Whether the text is a subscript.
+ bool subscript = 9;
+
+ // Whether the text is a superscript.
+ bool superscript = 10;
+
+ // Whether the text is in small caps.
+ bool smallcaps = 11;
+
+ // TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+ // Normal is `400`, bold is `700`.
+ int32 font_weight = 12;
+
+ // Whether the text is handwritten.
+ bool handwritten = 13;
+
+ // Color of the text.
+ google.type.Color text_color = 14;
+
+ // Color of the background.
+ google.type.Color background_color = 15;
+ }
+
// [Layout][google.cloud.documentai.v1.Document.Page.Layout] for
// [Token][google.cloud.documentai.v1.Document.Page.Token].
Layout layout = 1;
@@ -268,6 +325,9 @@ message Document {
// The history of this annotation.
Provenance provenance = 4 [deprecated = true];
+
+ // Text style attributes.
+ StyleInfo style_info = 5;
}
// A detected symbol.
@@ -333,7 +393,7 @@ message Document {
repeated DetectedLanguage detected_languages = 4;
// The history of this table.
- Provenance provenance = 5;
+ Provenance provenance = 5 [deprecated = true];
}
// A form field detected on the page.
@@ -388,16 +448,16 @@ message Document {
// Detected language for a structural component.
message DetectedLanguage {
- // The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
- // information, see
- // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ // The [BCP-47 language
+ // code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+ // such as `en-US` or `sr-Latn`.
string language_code = 1;
// Confidence of detected language. Range `[0, 1]`.
float confidence = 2;
}
- // Image Quality Scores for the page image
+ // Image quality scores for the page image.
message ImageQualityScores {
// Image Quality Defects
message DetectedDefect {
@@ -413,12 +473,12 @@ message Document {
// - `quality/defect_glare`
string type = 1;
- // Confidence of detected defect. Range `[0, 1]` where 1 indicates
- // strong confidence of that the defect exists.
+ // Confidence of detected defect. Range `[0, 1]` where `1` indicates
+ // strong confidence that the defect exists.
float confidence = 2;
}
- // The overall quality score. Range `[0, 1]` where 1 is perfect quality.
+ // The overall quality score. Range `[0, 1]` where `1` is perfect quality.
float quality_score = 1;
// A list of detected defects.
@@ -482,7 +542,7 @@ message Document {
// A list of detected barcodes.
repeated DetectedBarcode detected_barcodes = 15;
- // Image Quality Scores.
+ // Image quality scores.
ImageQualityScores image_quality_scores = 17;
// The history of this page.
@@ -736,9 +796,9 @@ message Document {
REMOVE = 2;
// Updates any fields within the given provenance scope of the message. It
- // 'overwrites' the fields rather than replacing them. This is
- // especially relevant when we just want to update a field value of an
- // entity without also affecting all the child properties.
+ // overwrites the fields rather than replacing them. Use this when you
+ // want to update a field value of an entity without also updating all the
+ // child properties.
UPDATE = 7;
// Currently unused. Replace an element identified by `parent`.
@@ -835,10 +895,9 @@ message Document {
// Original source document from the user.
oneof source {
// Optional. Currently supports Google Cloud Storage URI of the form
- // `gs://bucket_name/object_name`. Object versioning is not supported.
- // See [Google Cloud Storage Request
- // URIs](https://cloud.google.com/storage/docs/reference-uris) for more
- // info.
+ // `gs://bucket_name/object_name`. Object versioning is not supported.
+ // For more information, refer to [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris).
string uri = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Inline document content, represented as a stream of bytes.
@@ -847,9 +906,8 @@ message Document {
bytes content = 2 [(google.api.field_behavior) = OPTIONAL];
}
- // An IANA published MIME type (also referred to as media type). For more
- // information, see
- // https://www.iana.org/assignments/media-types/media-types.xhtml.
+ // An IANA published [media type (MIME
+ // type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 3;
// Optional. UTF-8 encoded text in reading order from the document.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_io.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_io.proto
index 23768b7544e..48adefbb98b 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_io.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_io.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto
index eec77bd88e4..915f0fd6438 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_processor_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ option (google.api.resource_definition) = {
pattern: "projects/{project}/locations/{location}"
};
-// Service to call Cloud DocumentAI to process documents according to the
+// Service to call Document AI to process documents according to the
// processor's definition. Processors are built using state-of-the-art Google
// AI such as natural language, computer vision, and translation to extract
// structured information from unstructured or semi-structured documents.
@@ -90,8 +90,9 @@ service DocumentProcessorService {
};
}
- // Fetches processor types. Note that we do not use ListProcessorTypes here
- // because it is not paginated.
+ // Fetches processor types. Note that we don't use
+ // [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
+ // here, because it isn't paginated.
rpc FetchProcessorTypes(FetchProcessorTypesRequest)
returns (FetchProcessorTypesResponse) {
option (google.api.http) = {
@@ -135,7 +136,7 @@ service DocumentProcessorService {
// Trains a new processor version.
// Operation metadata is returned as
- // cloud_documentai_core.TrainProcessorVersionMetadata.
+ // [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata].
rpc TrainProcessorVersion(TrainProcessorVersionRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@@ -209,8 +210,9 @@ service DocumentProcessorService {
};
}
- // Creates a processor from the type processor that the user chose.
- // The processor will be at "ENABLED" state by default after its creation.
+ // Creates a processor from the
+ // [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The
+ // processor will be at `ENABLED` state by default after its creation.
rpc CreateProcessor(CreateProcessorRequest) returns (Processor) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/processors"
@@ -324,7 +326,9 @@ service DocumentProcessorService {
}
}
-// Request message for the process document method.
+// Request message for the
+// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
+// method.
message ProcessRequest {
// The document payload.
oneof source {
@@ -350,13 +354,14 @@ message ProcessRequest {
(google.api.resource_reference) = { type: "*" }
];
- // Whether Human Review feature should be skipped for this request. Default to
- // false.
+ // Whether human review should be skipped for this request. Default to
+ // `false`.
bool skip_human_review = 3;
- // Specifies which fields to include in ProcessResponse's document.
- // Only supports top level document and pages field so it must be in the form
- // of `{document_field_name}` or `pages.{page_field_name}`.
+ // Specifies which fields to include in the
+ // [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document]
+ // output. 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 = 6;
}
@@ -368,7 +373,7 @@ message HumanReviewStatus {
STATE_UNSPECIFIED = 0;
// Human review is skipped for the document. This can happen because human
- // review is not enabled on the processor or the processing request has
+ // review isn't enabled on the processor or the processing request has
// been set to skip this document.
SKIPPED = 1;
@@ -379,7 +384,8 @@ message HumanReviewStatus {
IN_PROGRESS = 3;
// Some error happened during triggering human review, see the
- // [state_message] for details.
+ // [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message]
+ // for details.
ERROR = 4;
}
@@ -390,13 +396,17 @@ message HumanReviewStatus {
string state_message = 2;
// The name of the operation triggered by the processed document. This field
- // is populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has
- // the same response type and metadata as the long running operation returned
- // by [ReviewDocument] method.
+ // is populated only when the
+ // [state][google.cloud.documentai.v1.HumanReviewStatus.state] is
+ // `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as
+ // the long-running operation returned by
+ // [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument].
string human_review_operation = 3;
}
-// Response message for the process document method.
+// Response message for the
+// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
+// method.
message ProcessResponse {
// The document payload, will populate fields based on the processor's
// behavior.
@@ -406,7 +416,8 @@ message ProcessResponse {
HumanReviewStatus human_review_status = 3;
}
-// Request message for batch process document method.
+// Request message for
+// [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessRequest {
// Required. The resource name of
// [Processor][google.cloud.documentai.v1.Processor] or
@@ -419,34 +430,40 @@ message BatchProcessRequest {
(google.api.resource_reference) = { type: "*" }
];
- // The input documents for batch process.
+ // The input documents for the
+ // [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]
+ // method.
BatchDocumentsInputConfig input_documents = 5;
- // The overall output config for batch process.
+ // The output configuration for the
+ // [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]
+ // method.
DocumentOutputConfig document_output_config = 6;
- // Whether Human Review feature should be skipped for this request. Default to
- // false.
+ // Whether human review should be skipped for this request. Default to
+ // `false`.
bool skip_human_review = 4;
}
-// Response message for batch process document method.
+// Response message for
+// [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessResponse {}
-// The long running operation metadata for batch process method.
+// The long-running operation metadata for
+// [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessMetadata {
// The status of a each individual document in the batch process.
message IndividualProcessStatus {
- // The source of the document, same as the [input_gcs_source] field in the
- // request when the batch process started. The batch process is started by
- // take snapshot of that document, since a user can move or change that
- // document during the process.
+ // The source of the document, same as the
+ // [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source]
+ // field in the request when the batch process started.
string input_gcs_source = 1;
// The status processing the document.
google.rpc.Status status = 2;
- // The output_gcs_destination (in the request as `output_gcs_destination`)
+ // The Cloud Storage output destination (in the request as
+ // [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri])
// of the processed document if it was successful, otherwise empty.
string output_gcs_destination = 3;
@@ -495,11 +512,13 @@ message BatchProcessMetadata {
repeated IndividualProcessStatus individual_process_statuses = 5;
}
-// Request message for fetch processor types.
+// Request message for the
+// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]
+// method. Some processor types may require the project be added to an
+// allowlist.
message FetchProcessorTypesRequest {
- // Required. The project of processor type to list.
- // The available processor types may depend on the allow-listing on projects.
- // Format: `projects/{project}/locations/{location}`
+ // Required. The location of processor types to list.
+ // Format: `projects/{project}/locations/{location}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -508,17 +527,21 @@ message FetchProcessorTypesRequest {
];
}
-// Response message for fetch processor types.
+// Response message for the
+// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes]
+// method.
message FetchProcessorTypesResponse {
// The list of processor types.
repeated ProcessorType processor_types = 1;
}
-// Request message for list processor types.
+// Request message for the
+// [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
+// method. Some processor types may require the project be added to an
+// allowlist.
message ListProcessorTypesRequest {
- // Required. The location of processor type to list.
- // The available processor types may depend on the allow-listing on projects.
- // Format: `projects/{project}/locations/{location}`
+ // Required. The location of processor types to list.
+ // Format: `projects/{project}/locations/{location}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -527,15 +550,17 @@ message ListProcessorTypesRequest {
];
// The maximum number of processor types to return.
- // If unspecified, at most 100 processor types will be returned.
- // The maximum value is 500; values above 500 will be coerced to 500.
+ // If unspecified, at most `100` processor types will be returned.
+ // The maximum value is `500`. Values above `500` will be coerced to `500`.
int32 page_size = 2;
// Used to retrieve the next page of results, empty if at the end of the list.
string page_token = 3;
}
-// Response message for list processor types.
+// Response message for the
+// [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
+// method.
message ListProcessorTypesResponse {
// The processor types.
repeated ProcessorType processor_types = 1;
@@ -556,8 +581,8 @@ message ListProcessorsRequest {
];
// The maximum number of processors to return.
- // If unspecified, at most 50 processors will be returned.
- // The maximum value is 100; values above 100 will be coerced to 100.
+ // If unspecified, at most `50` processors will be returned.
+ // The maximum value is `100`. Values above `100` will be coerced to `100`.
int32 page_size = 2;
// We will return the processors sorted by creation time. The page token
@@ -565,7 +590,9 @@ message ListProcessorsRequest {
string page_token = 3;
}
-// Response message for list processors.
+// Response message for the
+// [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors]
+// method.
message ListProcessorsResponse {
// The list of processors.
repeated Processor processors = 1;
@@ -574,7 +601,9 @@ message ListProcessorsResponse {
string next_page_token = 2;
}
-// Request message for get processor.
+// Request message for the
+// [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType]
+// method.
message GetProcessorTypeRequest {
// Required. The processor type resource name.
string name = 1 [
@@ -585,7 +614,9 @@ message GetProcessorTypeRequest {
];
}
-// Request message for get processor.
+// Request message for the
+// [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor]
+// method.
message GetProcessorRequest {
// Required. The processor resource name.
string name = 1 [
@@ -596,7 +627,9 @@ message GetProcessorRequest {
];
}
-// Request message for get processor version.
+// Request message for the
+// [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion]
+// method.
message GetProcessorVersionRequest {
// Required. The processor resource name.
string name = 1 [
@@ -620,8 +653,8 @@ message ListProcessorVersionsRequest {
];
// The maximum number of processor versions to return.
- // If unspecified, at most 10 processor versions will be returned.
- // The maximum value is 20; values above 20 will be coerced to 20.
+ // If unspecified, at most `10` processor versions will be returned.
+ // The maximum value is `20`. Values above `20` will be coerced to `20`.
int32 page_size = 2;
// We will return the processor versions sorted by creation time. The page
@@ -629,7 +662,9 @@ message ListProcessorVersionsRequest {
string page_token = 3;
}
-// Response message for list processors.
+// Response message for the
+// [ListProcessorVersions][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorVersions]
+// method.
message ListProcessorVersionsResponse {
// The list of processors.
repeated ProcessorVersion processor_versions = 1;
@@ -638,7 +673,9 @@ message ListProcessorVersionsResponse {
string next_page_token = 2;
}
-// Request message for the delete processor version method.
+// Request message for the
+// [DeleteProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessorVersion]
+// method.
message DeleteProcessorVersionRequest {
// Required. The processor version resource name to be deleted.
string name = 1 [
@@ -649,13 +686,17 @@ message DeleteProcessorVersionRequest {
];
}
-// The long running operation metadata for delete processor version method.
+// The long-running operation metadata for the
+// [DeleteProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessorVersion]
+// method.
message DeleteProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for the deploy processor version method.
+// Request message for the
+// [DeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeployProcessorVersion]
+// method.
message DeployProcessorVersionRequest {
// Required. The processor version resource name to be deployed.
string name = 1 [
@@ -666,16 +707,22 @@ message DeployProcessorVersionRequest {
];
}
-// Response message for the deploy processor version method.
+// Response message for the
+// [DeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeployProcessorVersion]
+// method.
message DeployProcessorVersionResponse {}
-// The long running operation metadata for deploy processor version method.
+// The long-running operation metadata for the
+// [DeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.DeployProcessorVersion]
+// method.
message DeployProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for the undeploy processor version method.
+// Request message for the
+// [UndeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.UndeployProcessorVersion]
+// method.
message UndeployProcessorVersionRequest {
// Required. The processor version resource name to be undeployed.
string name = 1 [
@@ -686,19 +733,24 @@ message UndeployProcessorVersionRequest {
];
}
-// Response message for the undeploy processor version method.
+// Response message for the
+// [UndeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.UndeployProcessorVersion]
+// method.
message UndeployProcessorVersionResponse {}
-// The long running operation metadata for the undeploy processor version
+// The long-running operation metadata for the
+// [UndeployProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.UndeployProcessorVersion]
// method.
message UndeployProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for create a processor. Notice this request is sent to
-// a regionalized backend service, and if the processor type is not available
-// on that region, the creation will fail.
+// Request message for the
+// [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor]
+// method. Notice this request is sent to a regionalized backend service. If the
+// [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in
+// that region, the creation fails.
message CreateProcessorRequest {
// Required. The parent (project and location) under which to create the
// processor. Format: `projects/{project}/locations/{location}`
@@ -709,13 +761,17 @@ message CreateProcessorRequest {
}
];
- // Required. The processor to be created, requires [processor_type] and
- // [display_name] to be set. Also, the processor is under CMEK if CMEK fields
- // are set.
+ // Required. The processor to be created, requires
+ // [Processor.type][google.cloud.documentai.v1.Processor.type] and
+ // [Processor.display_name]][] to be set. Also, the
+ // [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name]
+ // field must be set if the processor is under CMEK.
Processor processor = 2 [(google.api.field_behavior) = REQUIRED];
}
-// Request message for the delete processor method.
+// Request message for the
+// [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor]
+// method.
message DeleteProcessorRequest {
// Required. The processor resource name to be deleted.
string name = 1 [
@@ -726,13 +782,17 @@ message DeleteProcessorRequest {
];
}
-// The long running operation metadata for delete processor method.
+// The long-running operation metadata for the
+// [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor]
+// method.
message DeleteProcessorMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
-// Request message for the enable processor method.
+// Request message for the
+// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor]
+// method.
message EnableProcessorRequest {
// Required. The processor resource name to be enabled.
string name = 1 [
@@ -743,17 +803,22 @@ message EnableProcessorRequest {
];
}
-// Response message for the enable processor method.
-// Intentionally empty proto for adding fields in future.
+// Response message for the
+// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor]
+// method. Intentionally empty proto for adding fields in future.
message EnableProcessorResponse {}
-// The long running operation metadata for enable processor method.
+// The long-running operation metadata for the
+// [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor]
+// method.
message EnableProcessorMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
-// Request message for the disable processor method.
+// Request message for the
+// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor]
+// method.
message DisableProcessorRequest {
// Required. The processor resource name to be disabled.
string name = 1 [
@@ -764,17 +829,22 @@ message DisableProcessorRequest {
];
}
-// Response message for the disable processor method.
-// Intentionally empty proto for adding fields in future.
+// Response message for the
+// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor]
+// method. Intentionally empty proto for adding fields in future.
message DisableProcessorResponse {}
-// The long running operation metadata for disable processor method.
+// The long-running operation metadata for the
+// [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor]
+// method.
message DisableProcessorMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
-// Request message for the set default processor version method.
+// Request message for the
+// [SetDefaultProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion]
+// method.
message SetDefaultProcessorVersionRequest {
// Required. The resource name of the
// [Processor][google.cloud.documentai.v1.Processor] to change default
@@ -798,19 +868,25 @@ message SetDefaultProcessorVersionRequest {
];
}
-// Response message for set default processor version method.
+// Response message for the
+// [SetDefaultProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion]
+// method.
message SetDefaultProcessorVersionResponse {}
-// The long running operation metadata for set default processor version
+// The long-running operation metadata for the
+// [SetDefaultProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.SetDefaultProcessorVersion]
// method.
message SetDefaultProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for the create processor version method.
+// Request message for the
+// [TrainProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersion]
+// method.
message TrainProcessorVersionRequest {
- // The input data used to train a new `ProcessorVersion`.
+ // The input data used to train a new
+ // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
message InputData {
// The documents used for training the new version.
BatchDocumentsInputConfig training_documents = 3;
@@ -836,7 +912,8 @@ message TrainProcessorVersionRequest {
// Optional. The schema the processor version will be trained with.
DocumentSchema document_schema = 10 [(google.api.field_behavior) = OPTIONAL];
- // Optional. The input data used to train the `ProcessorVersion`.
+ // Optional. The input data used to train the
+ // [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
InputData input_data = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. The processor version to use as a base for training. This
@@ -845,7 +922,8 @@ message TrainProcessorVersionRequest {
string base_processor_version = 8 [(google.api.field_behavior) = OPTIONAL];
}
-// The response for the TrainProcessorVersion method.
+// The response for
+// [TrainProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.TrainProcessorVersion].
message TrainProcessorVersionResponse {
// The resource name of the processor version produced by training.
string processor_version = 1;
@@ -873,7 +951,7 @@ message TrainProcessorVersionMetadata {
repeated google.rpc.Status dataset_errors = 2;
}
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
// The training dataset validation information.
@@ -883,7 +961,9 @@ message TrainProcessorVersionMetadata {
DatasetValidation test_dataset_validation = 3;
}
-// Request message for review document method.
+// Request message for the
+// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]
+// method.
message ReviewDocumentRequest {
// The priority level of the human review task.
enum Priority {
@@ -901,8 +981,9 @@ message ReviewDocumentRequest {
Document inline_document = 4;
}
- // Required. The resource name of the HumanReviewConfig that the document will
- // be reviewed with.
+ // Required. The resource name of the
+ // [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
+ // document will be reviewed with.
string human_review_config = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -920,7 +1001,9 @@ message ReviewDocumentRequest {
DocumentSchema document_schema = 6;
}
-// Response message for review document method.
+// Response message for the
+// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]
+// method.
message ReviewDocumentResponse {
// Possible states of the review operation.
enum State {
@@ -945,16 +1028,20 @@ message ReviewDocumentResponse {
string rejection_reason = 3;
}
-// The long running operation metadata for review document method.
+// The long-running operation metadata for the
+// [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]
+// method.
message ReviewDocumentOperationMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
// The Crowd Compute question ID.
string question_id = 6;
}
-// Evaluates the given ProcessorVersion against the supplied documents.
+// Evaluates the given
+// [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the
+// supplied documents.
message EvaluateProcessorVersionRequest {
// Required. The resource name of the
// [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to
@@ -973,13 +1060,17 @@ message EvaluateProcessorVersionRequest {
[(google.api.field_behavior) = OPTIONAL];
}
-// Metadata of the EvaluateProcessorVersion method.
+// Metadata of the
+// [EvaluateProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.EvaluateProcessorVersion]
+// method.
message EvaluateProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Metadata of the EvaluateProcessorVersion method.
+// Response of the
+// [EvaluateProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.EvaluateProcessorVersion]
+// method.
message EvaluateProcessorVersionResponse {
// The resource name of the created evaluation.
string evaluation = 2;
@@ -998,7 +1089,8 @@ message GetEvaluationRequest {
];
}
-// Retrieves a list of evaluations for a given ProcessorVersion.
+// Retrieves a list of evaluations for a given
+// [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
message ListEvaluationsRequest {
// Required. The resource name of the
// [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list
@@ -1012,8 +1104,8 @@ message ListEvaluationsRequest {
];
// The standard list page size.
- // If unspecified, at most 5 evaluations will be returned.
- // The maximum value is 100; values above 100 will be coerced to 100.
+ // If unspecified, at most `5` evaluations are returned.
+ // The maximum value is `100`. Values above `100` are coerced to `100`.
int32 page_size = 2;
// A page token, received from a previous `ListEvaluations` call.
@@ -1021,7 +1113,7 @@ message ListEvaluationsRequest {
string page_token = 3;
}
-// The response from ListEvaluations.
+// The response from `ListEvaluations`.
message ListEvaluationsResponse {
// The evaluations requested.
repeated Evaluation evaluations = 1;
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto
index 0b2cf60c1e0..028ef2aa750 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document_schema.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -92,16 +92,15 @@ message DocumentSchema {
string display_name = 13;
// Name of the type. It must be unique within the schema file and
- // cannot be a 'Common Type'. Besides that we use the following naming
- // conventions:
+ // cannot be a "Common Type". The following naming conventions are used:
//
- // - *use `snake_casing`*
- // - name matching is case-sensitive
+ // - Use `snake_casing`.
+ // - Name matching is case-sensitive.
// - Maximum 64 characters.
// - Must start with a letter.
// - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
// compatibility internal infrastructure and tooling can handle any ascii
- // character)
+ // character.)
// - The `/` is sometimes used to denote a property of a type. For example
// `line_item/amount`. This convention is deprecated, but will still be
// honored for backward compatibility.
@@ -117,8 +116,8 @@ message DocumentSchema {
// Metadata for global schema behavior.
message Metadata {
- // If true, a `document` entity type can be applied to subdocument (
- // splitting). Otherwise, it can only be applied to the entire document
+ // If true, a `document` entity type can be applied to subdocument
+ // (splitting). Otherwise, it can only be applied to the entire document
// (classification).
bool document_splitter = 1;
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto
index 0662470a8b2..433fba583fe 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/evaluation.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/geometry.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/geometry.proto
index ce668ec8e7a..18fbeaaf0d2 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/geometry.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/geometry.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/operation_metadata.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/operation_metadata.proto
index b922bf4cc3a..533f758ae0a 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/operation_metadata.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/operation_metadata.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto
index 8c257c548b6..68b99bcbd95 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -31,10 +31,9 @@ option php_namespace = "Google\\Cloud\\DocumentAI\\V1";
option ruby_package = "Google::Cloud::DocumentAI::V1";
// A processor version is an implementation of a processor. Each processor
-// can have multiple versions, pre-trained by Google internally or up-trained
-// by the customer. At a time, a processor can only have one default version
-// version. So the processor's behavior (when processing documents) is defined
-// by a default version
+// can have multiple versions, pretrained by Google internally or uptrained
+// by the customer. A processor can only have one default version at a time.
+// Its document-processing behavior is defined by that version.
message ProcessorVersion {
option (google.api.resource) = {
type: "documentai.googleapis.com/ProcessorVersion"
@@ -78,6 +77,9 @@ message ProcessorVersion {
// The processor version failed and is in an indeterminate state.
FAILED = 7;
+
+ // The processor version is being imported.
+ IMPORTING = 8;
}
// The resource name of the processor version.
@@ -106,7 +108,7 @@ message ProcessorVersion {
// The KMS key version with which data is encrypted.
string kms_key_version_name = 10;
- // Denotes that this ProcessorVersion is managed by google.
+ // Denotes that this `ProcessorVersion` is managed by Google.
bool google_managed = 11;
// If set, information about the eventual deprecation of this version.
@@ -163,8 +165,8 @@ message Processor {
(google.api.field_behavior) = OUTPUT_ONLY
];
- // The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
- // To get a list of processors types, see
+ // The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
+ // To get a list of processor types, see
// [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes].
string type = 2;
@@ -189,7 +191,7 @@ message Processor {
// The time the processor was created.
google.protobuf.Timestamp create_time = 7;
- // The KMS key used for encryption/decryption in CMEK scenarios.
- // See https://cloud.google.com/security-key-management.
+ // The [KMS key](https://cloud.google.com/security-key-management) used for
+ // encryption and decryption in CMEK scenarios.
string kms_key_name = 8;
}
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor_type.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor_type.proto
index e5f6eca0a89..ae88dda8d70 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor_type.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/processor_type.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -37,7 +37,8 @@ message ProcessorType {
// The location information about where the processor is available.
message LocationInfo {
- // The location id, currently must be one of [us, eu].
+ // The location ID. For supported locations, refer to [regional and
+ // multi-regional support](/document-ai/docs/regions).
string location_id = 1;
}
@@ -45,7 +46,7 @@ message ProcessorType {
// Format: `projects/{project}/processorTypes/{processor_type}`
string name = 1;
- // The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
+ // The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
string type = 2;
// The processor category, used by UI to group processor types.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/barcode.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/barcode.proto
index a5148172b7b..f0580e69af8 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/barcode.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/barcode.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/dataset.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/dataset.proto
new file mode 100644
index 00000000000..fa50183bbb5
--- /dev/null
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/dataset.proto
@@ -0,0 +1,138 @@
+// Copyright 2023 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.v1beta3;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/documentai/v1beta3/document_io.proto";
+import "google/cloud/documentai/v1beta3/document_schema.proto";
+
+option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
+option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb";
+option java_multiple_files = true;
+option java_outer_classname = "DatasetProto";
+option java_package = "com.google.cloud.documentai.v1beta3";
+option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
+option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
+option (google.api.resource_definition) = {
+ type: "contentwarehouse.googleapis.com/Schema"
+ pattern: "projects/{project}/locations/{location}/schemas/{schema}"
+};
+
+// A singleton resource under a
+// [Processor][google.cloud.documentai.v1beta3.Processor] which configures a
+// collection of documents.
+message Dataset {
+ option (google.api.resource) = {
+ type: "documentai.googleapis.com/Dataset"
+ pattern: "projects/{project}/locations/{location}/processors/{processor}/dataset"
+ };
+
+ // Configuration specific to the Cloud Storage-based implementation.
+ message GCSManagedConfig {
+ // Required. The Cloud Storage URI (a directory) where the documents
+ // belonging to the dataset must be stored.
+ GcsPrefix gcs_prefix = 1 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // Configuration specific to the Document AI Warehouse-based implementation.
+ message DocumentWarehouseConfig {
+ // Output only. The collection in Document AI Warehouse associated with the
+ // dataset.
+ string collection = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The schema in Document AI Warehouse associated with the
+ // dataset.
+ string schema = 2 [
+ (google.api.field_behavior) = OUTPUT_ONLY,
+ (google.api.resource_reference) = {
+ type: "contentwarehouse.googleapis.com/Schema"
+ }
+ ];
+ }
+
+ // Configuration specific to an unmanaged dataset.
+ message UnmanagedDatasetConfig {}
+
+ // Configuration specific to spanner-based indexing.
+ message SpannerIndexingConfig {}
+
+ // Different states of a dataset.
+ enum State {
+ // Default unspecified enum, should not be used.
+ STATE_UNSPECIFIED = 0;
+
+ // Dataset has not been initialized.
+ UNINITIALIZED = 1;
+
+ // Dataset is being initialized.
+ INITIALIZING = 2;
+
+ // Dataset has been initialized.
+ INITIALIZED = 3;
+ }
+
+ oneof storage_source {
+ // Optional. User-managed Cloud Storage dataset configuration. Use this
+ // configuration if the dataset documents are stored under a user-managed
+ // Cloud Storage location.
+ GCSManagedConfig gcs_managed_config = 3
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Document AI Warehouse-based dataset configuration.
+ DocumentWarehouseConfig document_warehouse_config = 5
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Unmanaged dataset configuration. Use this configuration if the
+ // dataset documents are managed by the document service internally (not
+ // user-managed).
+ UnmanagedDatasetConfig unmanaged_dataset_config = 6
+ [(google.api.field_behavior) = OPTIONAL];
+ }
+
+ oneof indexing_source {
+ // Optional. A lightweight indexing source with low latency and high
+ // reliability, but lacking advanced features like CMEK and content-based
+ // search.
+ SpannerIndexingConfig spanner_indexing_config = 4
+ [(google.api.field_behavior) = OPTIONAL];
+ }
+
+ // Dataset resource name.
+ // Format:
+ // `projects/{project}/locations/{location}/processors/{processor}/dataset`
+ string name = 1;
+
+ // Required. State of the dataset. Ignored when updating dataset.
+ State state = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Dataset Schema.
+message DatasetSchema {
+ option (google.api.resource) = {
+ type: "documentai.googleapis.com/DatasetSchema"
+ pattern: "projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema"
+ };
+
+ // Dataset schema resource name.
+ // Format:
+ // `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`
+ string name = 1;
+
+ // Optional. Schema of the dataset.
+ DocumentSchema document_schema = 3 [(google.api.field_behavior) = OPTIONAL];
+}
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto
index 193f7700d51..8250d4d6660 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -64,7 +64,8 @@ message Document {
// Font size for the text.
float size = 1;
- // Unit for the font size. Follows CSS naming (in, px, pt, etc.).
+ // Unit for the font size. Follows CSS naming (such as `in`, `px`, and
+ // `pt`).
string unit = 2;
}
@@ -78,17 +79,18 @@ message Document {
// Text background color.
google.type.Color background_color = 3;
- // Font weight. Possible values are normal, bold, bolder, and lighter.
- // https://www.w3schools.com/cssref/pr_font_weight.asp
+ // [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
+ // Possible values are `normal`, `bold`, `bolder`, and `lighter`.
string font_weight = 4;
- // Text style. Possible values are normal, italic, and oblique.
- // https://www.w3schools.com/cssref/pr_font_font-style.asp
+ // [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
+ // Possible values are `normal`, `italic`, and `oblique`.
string text_style = 5;
- // Text decoration. Follows CSS standard.
- //
- // https://www.w3schools.com/cssref/pr_text_text-decoration.asp
+ // [Text
+ // decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
+ // Follows CSS standard.
+ //
string text_decoration = 6;
// Font size.
@@ -118,7 +120,9 @@ message Document {
// Raw byte content of the image.
bytes content = 1;
- // Encoding mime type for the image.
+ // Encoding [media type (MIME
+ // type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
+ // for the image.
string mime_type = 2;
// Width of the image in pixels.
@@ -255,6 +259,59 @@ message Document {
Type type = 1;
}
+ // Font and other text style attributes.
+ message StyleInfo {
+ // Font size in points (`1` point is `¹⁄₇₂` inches).
+ int32 font_size = 1;
+
+ // Font size in pixels, equal to _unrounded
+ // [font_size][google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo.font_size]_
+ // * _resolution_ ÷ `72.0`.
+ double pixel_font_size = 2;
+
+ // Letter spacing in points.
+ double letter_spacing = 3;
+
+ // Name or style of the font.
+ string font_type = 4;
+
+ // Whether the text is bold (equivalent to
+ // [font_weight][google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo.font_weight]
+ // is at least `700`).
+ bool bold = 5;
+
+ // Whether the text is italic.
+ bool italic = 6;
+
+ // Whether the text is underlined.
+ bool underlined = 7;
+
+ // Whether the text is strikethrough.
+ bool strikeout = 8;
+
+ // Whether the text is a subscript.
+ bool subscript = 9;
+
+ // Whether the text is a superscript.
+ bool superscript = 10;
+
+ // Whether the text is in small caps.
+ bool smallcaps = 11;
+
+ // TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
+ // Normal is `400`, bold is `700`.
+ int32 font_weight = 12;
+
+ // Whether the text is handwritten.
+ bool handwritten = 13;
+
+ // Color of the text.
+ google.type.Color text_color = 14;
+
+ // Color of the background.
+ google.type.Color background_color = 15;
+ }
+
// [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] for
// [Token][google.cloud.documentai.v1beta3.Document.Page.Token].
Layout layout = 1;
@@ -268,6 +325,9 @@ message Document {
// The history of this annotation.
Provenance provenance = 4 [deprecated = true];
+
+ // Text style attributes.
+ StyleInfo style_info = 5;
}
// A detected symbol.
@@ -333,7 +393,7 @@ message Document {
repeated DetectedLanguage detected_languages = 4;
// The history of this table.
- Provenance provenance = 5;
+ Provenance provenance = 5 [deprecated = true];
}
// A form field detected on the page.
@@ -389,16 +449,16 @@ message Document {
// Detected language for a structural component.
message DetectedLanguage {
- // The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
- // information, see
- // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+ // The [BCP-47 language
+ // code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
+ // such as `en-US` or `sr-Latn`.
string language_code = 1;
// Confidence of detected language. Range `[0, 1]`.
float confidence = 2;
}
- // Image Quality Scores for the page image
+ // Image quality scores for the page image.
message ImageQualityScores {
// Image Quality Defects
message DetectedDefect {
@@ -414,12 +474,12 @@ message Document {
// - `quality/defect_glare`
string type = 1;
- // Confidence of detected defect. Range `[0, 1]` where 1 indicates
- // strong confidence of that the defect exists.
+ // Confidence of detected defect. Range `[0, 1]` where `1` indicates
+ // strong confidence that the defect exists.
float confidence = 2;
}
- // The overall quality score. Range `[0, 1]` where 1 is perfect quality.
+ // The overall quality score. Range `[0, 1]` where `1` is perfect quality.
float quality_score = 1;
// A list of detected defects.
@@ -485,7 +545,7 @@ message Document {
// A list of detected barcodes.
repeated DetectedBarcode detected_barcodes = 15;
- // Image Quality Scores.
+ // Image quality scores.
ImageQualityScores image_quality_scores = 17;
// The history of this page.
@@ -740,13 +800,13 @@ message Document {
REMOVE = 2;
// Updates any fields within the given provenance scope of the message. It
- // 'overwrites' the fields rather than replacing them. This is
- // especially relevant when we just want to update a field value of an
- // entity without also affecting all the child properties.
+ // overwrites the fields rather than replacing them. Use this when you
+ // want to update a field value of an entity without also updating all the
+ // child properties.
UPDATE = 7;
// Currently unused. Replace an element identified by `parent`.
- REPLACE = 3 [deprecated = true];
+ REPLACE = 3;
// Deprecated. Request human review for the element identified by
// `parent`.
@@ -839,10 +899,9 @@ message Document {
// Original source document from the user.
oneof source {
// Optional. Currently supports Google Cloud Storage URI of the form
- // `gs://bucket_name/object_name`. Object versioning is not supported.
- // See [Google Cloud Storage Request
- // URIs](https://cloud.google.com/storage/docs/reference-uris) for more
- // info.
+ // `gs://bucket_name/object_name`. Object versioning is not supported.
+ // For more information, refer to [Google Cloud Storage Request
+ // URIs](https://cloud.google.com/storage/docs/reference-uris).
string uri = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Inline document content, represented as a stream of bytes.
@@ -851,9 +910,8 @@ message Document {
bytes content = 2 [(google.api.field_behavior) = OPTIONAL];
}
- // An IANA published MIME type (also referred to as media type). For more
- // information, see
- // https://www.iana.org/assignments/media-types/media-types.xhtml.
+ // An IANA published [media type (MIME
+ // type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 3;
// Optional. UTF-8 encoded text in reading order from the document.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_io.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_io.proto
index 9de0733f467..1b7e7ce2f06 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_io.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_io.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -127,9 +127,18 @@ message OcrConfig {
// Adds additional latency comparable to regular OCR to the process call.
bool enable_image_quality_scores = 4;
- // A list of advanced OCR options to further fine-tune OCR behavior.
+ // A list of advanced OCR options to further fine-tune OCR behavior. Current
+ // valid values are:
+ //
+ // - `legacy_layout`: a heuristics layout detection algorithm, which serves as
+ // an alternative to the current ML-based layout detection algorithm.
+ // Customers can choose the best suitable layout algorithm based on their
+ // situation.
repeated string advanced_ocr_options = 5;
// Includes symbol level OCR information if set to true.
bool enable_symbol = 6;
+
+ // Turn on font id model and returns font style information.
+ bool compute_style_info = 8;
}
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto
index 885bdffd861..b2a87362594 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ import "google/cloud/documentai/v1beta3/operation_metadata.proto";
import "google/cloud/documentai/v1beta3/processor.proto";
import "google/cloud/documentai/v1beta3/processor_type.proto";
import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
@@ -48,7 +49,7 @@ option (google.api.resource_definition) = {
pattern: "projects/{project}/locations/{location}"
};
-// Service to call Cloud DocumentAI to process documents according to the
+// Service to call Document AI to process documents according to the
// processor's definition. Processors are built using state-of-the-art Google
// AI such as natural language, computer vision, and translation to extract
// structured information from unstructured or semi-structured documents.
@@ -89,8 +90,9 @@ service DocumentProcessorService {
};
}
- // Fetches processor types. Note that we do not use ListProcessorTypes here
- // because it is not paginated.
+ // Fetches processor types. Note that we don't use
+ // [ListProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.ListProcessorTypes]
+ // here, because it isn't paginated.
rpc FetchProcessorTypes(FetchProcessorTypesRequest)
returns (FetchProcessorTypesResponse) {
option (google.api.http) = {
@@ -134,7 +136,7 @@ service DocumentProcessorService {
// Trains a new processor version.
// Operation metadata is returned as
- // cloud_documentai_core.TrainProcessorVersionMetadata.
+ // [TrainProcessorVersionMetadata][google.cloud.documentai.v1beta3.TrainProcessorVersionMetadata].
rpc TrainProcessorVersion(TrainProcessorVersionRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@@ -208,8 +210,9 @@ service DocumentProcessorService {
};
}
- // Creates a processor from the type processor that the user chose.
- // The processor will be at "ENABLED" state by default after its creation.
+ // Creates a processor from the
+ // [ProcessorType][google.cloud.documentai.v1beta3.ProcessorType] provided.
+ // The processor will be at `ENABLED` state by default after its creation.
rpc CreateProcessor(CreateProcessorRequest) returns (Processor) {
option (google.api.http) = {
post: "/v1beta3/{parent=projects/*/locations/*}/processors"
@@ -339,12 +342,14 @@ service DocumentProcessorService {
// Options for Process API
message ProcessOptions {
- // Only applicable to "Document OCR Processor". Returns error if set on other
+ // Only applicable to `OCR_PROCESSOR`. Returns error if set on other
// processor types.
OcrConfig ocr_config = 1;
}
-// Request message for the process document method.
+// Request message for the
+// [ProcessDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ProcessDocument]
+// method.
message ProcessRequest {
// The document payload.
oneof source {
@@ -370,16 +375,20 @@ message ProcessRequest {
(google.api.resource_reference) = { type: "*" }
];
- // The document payload, the [content] and [mime_type] fields must be set.
+ // The document payload, the
+ // [content][google.cloud.documentai.v1beta3.Document.content] and
+ // [mime_type][google.cloud.documentai.v1beta3.Document.mime_type] fields must
+ // be set.
Document document = 2 [deprecated = true];
- // Whether Human Review feature should be skipped for this request. Default to
- // false.
+ // Whether human review should be skipped for this request. Default to
+ // `false`.
bool skip_human_review = 3;
- // Specifies which fields to include in ProcessResponse's document.
- // Only supports top level document and pages field so it must be in the form
- // of `{document_field_name}` or `pages.{page_field_name}`.
+ // Specifies which fields to include in the
+ // [ProcessResponse.document][google.cloud.documentai.v1beta3.ProcessResponse.document]
+ // output. 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 = 6;
// Inference-time options for the process API
@@ -394,7 +403,7 @@ message HumanReviewStatus {
STATE_UNSPECIFIED = 0;
// Human review is skipped for the document. This can happen because human
- // review is not enabled on the processor or the processing request has
+ // review isn't enabled on the processor or the processing request has
// been set to skip this document.
SKIPPED = 1;
@@ -405,7 +414,8 @@ message HumanReviewStatus {
IN_PROGRESS = 3;
// Some error happened during triggering human review, see the
- // [state_message] for details.
+ // [state_message][google.cloud.documentai.v1beta3.HumanReviewStatus.state_message]
+ // for details.
ERROR = 4;
}
@@ -416,29 +426,34 @@ message HumanReviewStatus {
string state_message = 2;
// The name of the operation triggered by the processed document. This field
- // is populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has
- // the same response type and metadata as the long running operation returned
- // by [ReviewDocument] method.
+ // is populated only when the
+ // [state][google.cloud.documentai.v1beta3.HumanReviewStatus.state] is
+ // `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as
+ // the long-running operation returned by
+ // [ReviewDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ReviewDocument].
string human_review_operation = 3;
}
-// Response message for the process document method.
+// Response message for the
+// [ProcessDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ProcessDocument]
+// method.
message ProcessResponse {
// The document payload, will populate fields based on the processor's
// behavior.
Document document = 1;
// The name of the operation triggered by the processed document. If the human
- // review process is not triggered, this field will be empty. It has the same
- // response type and metadata as the long running operation returned by
- // ReviewDocument method.
+ // review process isn't triggered, this field is empty. It has the same
+ // response type and metadata as the long-running operation returned by
+ // [ReviewDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ReviewDocument].
string human_review_operation = 2 [deprecated = true];
// The status of human review on the processed document.
HumanReviewStatus human_review_status = 3;
}
-// Request message for batch process document method.
+// Request message for
+// [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessRequest {
// The message for input config in batch process.
message BatchInputConfig {
@@ -447,13 +462,19 @@ message BatchProcessRequest {
// The Cloud Storage location as the source of the document.
string gcs_source = 1;
- // Mimetype of the input. If the input is a raw document, the supported
- // mimetypes are application/pdf, image/tiff, and image/gif.
- // If the input is a [Document] proto, the type should be application/json.
+ // An IANA published [media type (MIME
+ // type)](https://www.iana.org/assignments/media-types/media-types.xhtml) of
+ // the input. If the input is a raw document, refer to [supported file
+ // types](https://cloud.google.com/document-ai/docs/file-types) for the list
+ // of media types. If the input is a
+ // [Document][google.cloud.documentai.v1beta3.Document], the type should be
+ // `application/json`.
string mime_type = 2;
}
- // The message for output config in batch process.
+ // The output configuration in the
+ // [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments]
+ // method.
message BatchOutputConfig {
option deprecated = true;
@@ -478,44 +499,52 @@ message BatchProcessRequest {
// The overall output config for batch process.
BatchOutputConfig output_config = 3 [deprecated = true];
- // The input documents for batch process.
+ // The input documents for the
+ // [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments]
+ // method.
BatchDocumentsInputConfig input_documents = 5;
- // The overall output config for batch process.
+ // The output configuration for the
+ // [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments]
+ // method.
DocumentOutputConfig document_output_config = 6;
- // Whether Human Review feature should be skipped for this request. Default to
- // false.
+ // Whether human review should be skipped for this request. Default to
+ // `false`.
bool skip_human_review = 4;
// Inference-time options for the process API
ProcessOptions process_options = 7;
}
-// Response message for batch process document method.
+// Response message for
+// [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessResponse {}
-// The long running operation metadata for batch process method.
+// The long-running operation metadata for
+// [BatchProcessDocuments][google.cloud.documentai.v1beta3.DocumentProcessorService.BatchProcessDocuments].
message BatchProcessMetadata {
// The status of a each individual document in the batch process.
message IndividualProcessStatus {
- // The source of the document, same as the [input_gcs_source] field in the
- // request when the batch process started. The batch process is started by
- // take snapshot of that document, since a user can move or change that
- // document during the process.
+ // The source of the document, same as the
+ // [input_gcs_source][google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source]
+ // field in the request when the batch process started.
string input_gcs_source = 1;
// The status processing the document.
google.rpc.Status status = 2;
- // The output_gcs_destination (in the request as `output_gcs_destination`)
+ // The Cloud Storage output destination (in the request as
+ // [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.gcs_uri])
// of the processed document if it was successful, otherwise empty.
string output_gcs_destination = 3;
// The name of the operation triggered by the processed document. If the
- // human review process is not triggered, this field will be empty. It has
- // the same response type and metadata as the long running operation
- // returned by ReviewDocument method.
+ // human review process isn't triggered, this field will be empty. It has
+ // the same response type and metadata as the long-running operation
+ // returned by the
+ // [ReviewDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ReviewDocument]
+ // method.
string human_review_operation = 4 [deprecated = true];
// The status of human review on the processed document.
@@ -563,11 +592,13 @@ message BatchProcessMetadata {
repeated IndividualProcessStatus individual_process_statuses = 5;
}
-// Request message for fetch processor types.
+// Request message for the
+// [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes]
+// method. Some processor types may require the project be added to an
+// allowlist.
message FetchProcessorTypesRequest {
- // Required. The project of processor type to list.
- // The available processor types may depend on the allow-listing on projects.
- // Format: `projects/{project}/locations/{location}`
+ // Required. The location of processor types to list.
+ // Format: `projects/{project}/locations/{location}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -576,17 +607,21 @@ message FetchProcessorTypesRequest {
];
}
-// Response message for fetch processor types.
+// Response message for the
+// [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes]
+// method.
message FetchProcessorTypesResponse {
// The list of processor types.
repeated ProcessorType processor_types = 1;
}
-// Request message for list processor types.
+// Request message for the
+// [ListProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.ListProcessorTypes]
+// method. Some processor types may require the project be added to an
+// allowlist.
message ListProcessorTypesRequest {
- // Required. The location of processor type to list.
- // The available processor types may depend on the allow-listing on projects.
- // Format: `projects/{project}/locations/{location}`
+ // Required. The location of processor types to list.
+ // Format: `projects/{project}/locations/{location}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -595,15 +630,17 @@ message ListProcessorTypesRequest {
];
// The maximum number of processor types to return.
- // If unspecified, at most 100 processor types will be returned.
- // The maximum value is 500; values above 500 will be coerced to 500.
+ // If unspecified, at most `100` processor types will be returned.
+ // The maximum value is `500`. Values above `500` will be coerced to `500`.
int32 page_size = 2;
// Used to retrieve the next page of results, empty if at the end of the list.
string page_token = 3;
}
-// Response message for list processor types.
+// Response message for the
+// [ListProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.ListProcessorTypes]
+// method.
message ListProcessorTypesResponse {
// The processor types.
repeated ProcessorType processor_types = 1;
@@ -624,8 +661,8 @@ message ListProcessorsRequest {
];
// The maximum number of processors to return.
- // If unspecified, at most 50 processors will be returned.
- // The maximum value is 100; values above 100 will be coerced to 100.
+ // If unspecified, at most `50` processors will be returned.
+ // The maximum value is `100`. Values above `100` will be coerced to `100`.
int32 page_size = 2;
// We will return the processors sorted by creation time. The page token
@@ -633,7 +670,9 @@ message ListProcessorsRequest {
string page_token = 3;
}
-// Response message for list processors.
+// Response message for the
+// [ListProcessors][google.cloud.documentai.v1beta3.DocumentProcessorService.ListProcessors]
+// method.
message ListProcessorsResponse {
// The list of processors.
repeated Processor processors = 1;
@@ -642,7 +681,9 @@ message ListProcessorsResponse {
string next_page_token = 2;
}
-// Request message for get processor.
+// Request message for the
+// [GetProcessorType][google.cloud.documentai.v1beta3.DocumentProcessorService.GetProcessorType]
+// method.
message GetProcessorTypeRequest {
// Required. The processor type resource name.
string name = 1 [
@@ -653,7 +694,9 @@ message GetProcessorTypeRequest {
];
}
-// Request message for get processor.
+// Request message for the
+// [GetProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.GetProcessor]
+// method.
message GetProcessorRequest {
// Required. The processor resource name.
string name = 1 [
@@ -664,7 +707,9 @@ message GetProcessorRequest {
];
}
-// Request message for get processor version.
+// Request message for the
+// [GetProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.GetProcessorVersion]
+// method.
message GetProcessorVersionRequest {
// Required. The processor resource name.
string name = 1 [
@@ -688,8 +733,8 @@ message ListProcessorVersionsRequest {
];
// The maximum number of processor versions to return.
- // If unspecified, at most 10 processor versions will be returned.
- // The maximum value is 20; values above 20 will be coerced to 20.
+ // If unspecified, at most `10` processor versions will be returned.
+ // The maximum value is `20`. Values above `20` will be coerced to `20`.
int32 page_size = 2;
// We will return the processor versions sorted by creation time. The page
@@ -697,7 +742,9 @@ message ListProcessorVersionsRequest {
string page_token = 3;
}
-// Response message for list processors.
+// Response message for the
+// [ListProcessorVersions][google.cloud.documentai.v1beta3.DocumentProcessorService.ListProcessorVersions]
+// method.
message ListProcessorVersionsResponse {
// The list of processors.
repeated ProcessorVersion processor_versions = 1;
@@ -706,7 +753,9 @@ message ListProcessorVersionsResponse {
string next_page_token = 2;
}
-// Request message for the delete processor version method.
+// Request message for the
+// [DeleteProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.DeleteProcessorVersion]
+// method.
message DeleteProcessorVersionRequest {
// Required. The processor version resource name to be deleted.
string name = 1 [
@@ -717,13 +766,17 @@ message DeleteProcessorVersionRequest {
];
}
-// The long running operation metadata for delete processor version method.
+// The long-running operation metadata for the
+// [DeleteProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.DeleteProcessorVersion]
+// method.
message DeleteProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for the deploy processor version method.
+// Request message for the
+// [DeployProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.DeployProcessorVersion]
+// method.
message DeployProcessorVersionRequest {
// Required. The processor version resource name to be deployed.
string name = 1 [
@@ -734,16 +787,22 @@ message DeployProcessorVersionRequest {
];
}
-// Response message for the deploy processor version method.
+// Response message for the
+// [DeployProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.DeployProcessorVersion]
+// method.
message DeployProcessorVersionResponse {}
-// The long running operation metadata for deploy processor version method.
+// The long-running operation metadata for the
+// [DeployProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.DeployProcessorVersion]
+// method.
message DeployProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for the undeploy processor version method.
+// Request message for the
+// [UndeployProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.UndeployProcessorVersion]
+// method.
message UndeployProcessorVersionRequest {
// Required. The processor version resource name to be undeployed.
string name = 1 [
@@ -754,19 +813,24 @@ message UndeployProcessorVersionRequest {
];
}
-// Response message for the undeploy processor version method.
+// Response message for the
+// [UndeployProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.UndeployProcessorVersion]
+// method.
message UndeployProcessorVersionResponse {}
-// The long running operation metadata for the undeploy processor version
+// The long-running operation metadata for the
+// [UndeployProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.UndeployProcessorVersion]
// method.
message UndeployProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for create a processor. Notice this request is sent to
-// a regionalized backend service, and if the processor type is not available
-// on that region, the creation will fail.
+// Request message for the
+// [CreateProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.CreateProcessor]
+// method. Notice this request is sent to a regionalized backend service. If the
+// [ProcessorType][google.cloud.documentai.v1beta3.ProcessorType] isn't
+// available in that region, the creation fails.
message CreateProcessorRequest {
// Required. The parent (project and location) under which to create the
// processor. Format: `projects/{project}/locations/{location}`
@@ -777,13 +841,17 @@ message CreateProcessorRequest {
}
];
- // Required. The processor to be created, requires [processor_type] and
- // [display_name] to be set. Also, the processor is under CMEK if CMEK fields
- // are set.
+ // Required. The processor to be created, requires
+ // [Processor.type][google.cloud.documentai.v1beta3.Processor.type] and
+ // [Processor.display_name]][] to be set. Also, the
+ // [Processor.kms_key_name][google.cloud.documentai.v1beta3.Processor.kms_key_name]
+ // field must be set if the processor is under CMEK.
Processor processor = 2 [(google.api.field_behavior) = REQUIRED];
}
-// Request message for the delete processor method.
+// Request message for the
+// [DeleteProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.DeleteProcessor]
+// method.
message DeleteProcessorRequest {
// Required. The processor resource name to be deleted.
string name = 1 [
@@ -794,13 +862,17 @@ message DeleteProcessorRequest {
];
}
-// The long running operation metadata for delete processor method.
+// The long-running operation metadata for the
+// [DeleteProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.DeleteProcessor]
+// method.
message DeleteProcessorMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
-// Request message for the enable processor method.
+// Request message for the
+// [EnableProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.EnableProcessor]
+// method.
message EnableProcessorRequest {
// Required. The processor resource name to be enabled.
string name = 1 [
@@ -811,17 +883,22 @@ message EnableProcessorRequest {
];
}
-// Response message for the enable processor method.
-// Intentionally empty proto for adding fields in future.
+// Response message for the
+// [EnableProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.EnableProcessor]
+// method. Intentionally empty proto for adding fields in future.
message EnableProcessorResponse {}
-// The long running operation metadata for enable processor method.
+// The long-running operation metadata for the
+// [EnableProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.EnableProcessor]
+// method.
message EnableProcessorMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
-// Request message for the disable processor method.
+// Request message for the
+// [DisableProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.DisableProcessor]
+// method.
message DisableProcessorRequest {
// Required. The processor resource name to be disabled.
string name = 1 [
@@ -832,17 +909,22 @@ message DisableProcessorRequest {
];
}
-// Response message for the disable processor method.
-// Intentionally empty proto for adding fields in future.
+// Response message for the
+// [DisableProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.DisableProcessor]
+// method. Intentionally empty proto for adding fields in future.
message DisableProcessorResponse {}
-// The long running operation metadata for disable processor method.
+// The long-running operation metadata for the
+// [DisableProcessor][google.cloud.documentai.v1beta3.DocumentProcessorService.DisableProcessor]
+// method.
message DisableProcessorMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
}
-// Request message for the set default processor version method.
+// Request message for the
+// [SetDefaultProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.SetDefaultProcessorVersion]
+// method.
message SetDefaultProcessorVersionRequest {
// Required. The resource name of the
// [Processor][google.cloud.documentai.v1beta3.Processor] to change default
@@ -866,19 +948,25 @@ message SetDefaultProcessorVersionRequest {
];
}
-// Response message for set default processor version method.
+// Response message for the
+// [SetDefaultProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.SetDefaultProcessorVersion]
+// method.
message SetDefaultProcessorVersionResponse {}
-// The long running operation metadata for set default processor version
+// The long-running operation metadata for the
+// [SetDefaultProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.SetDefaultProcessorVersion]
// method.
message SetDefaultProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Request message for the create processor version method.
+// Request message for the
+// [TrainProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.TrainProcessorVersion]
+// method.
message TrainProcessorVersionRequest {
- // The input data used to train a new `ProcessorVersion`.
+ // The input data used to train a new
+ // [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion].
message InputData {
// The documents used for training the new version.
BatchDocumentsInputConfig training_documents = 3;
@@ -887,6 +975,28 @@ message TrainProcessorVersionRequest {
BatchDocumentsInputConfig test_documents = 4;
}
+ // Options to control the training of the Custom Document Extraction (CDE)
+ // Processor.
+ message CustomDocumentExtractionOptions {
+ // Training Method for CDE. TRAINING_METHOD_UNSPECIFIED will fallback to
+ // MODEL_BASED.
+ enum TrainingMethod {
+ TRAINING_METHOD_UNSPECIFIED = 0;
+
+ MODEL_BASED = 1;
+
+ TEMPLATE_BASED = 2;
+ }
+
+ // Training method to use for CDE training.
+ TrainingMethod training_method = 3;
+ }
+
+ oneof processor_flags {
+ // Options to control Custom Document Extraction (CDE) Processor.
+ CustomDocumentExtractionOptions custom_document_extraction_options = 5;
+ }
+
// Required. The parent (project, location and processor) to create the new
// version for. Format:
// `projects/{project}/locations/{location}/processors/{processor}`.
@@ -904,7 +1014,8 @@ message TrainProcessorVersionRequest {
// Optional. The schema the processor version will be trained with.
DocumentSchema document_schema = 10 [(google.api.field_behavior) = OPTIONAL];
- // Optional. The input data used to train the `ProcessorVersion`.
+ // Optional. The input data used to train the
+ // [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion].
InputData input_data = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. The processor version to use as a base for training. This
@@ -913,7 +1024,8 @@ message TrainProcessorVersionRequest {
string base_processor_version = 8 [(google.api.field_behavior) = OPTIONAL];
}
-// The response for the TrainProcessorVersion method.
+// The response for
+// [TrainProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.TrainProcessorVersion].
message TrainProcessorVersionResponse {
// The resource name of the processor version produced by training.
string processor_version = 1;
@@ -941,7 +1053,7 @@ message TrainProcessorVersionMetadata {
repeated google.rpc.Status dataset_errors = 2;
}
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
// The training dataset validation information.
@@ -951,7 +1063,9 @@ message TrainProcessorVersionMetadata {
DatasetValidation test_dataset_validation = 3;
}
-// Request message for review document method.
+// Request message for the
+// [ReviewDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ReviewDocument]
+// method.
message ReviewDocumentRequest {
// The priority level of the human review task.
enum Priority {
@@ -969,8 +1083,9 @@ message ReviewDocumentRequest {
Document inline_document = 4;
}
- // Required. The resource name of the HumanReviewConfig that the document will
- // be reviewed with.
+ // Required. The resource name of the
+ // [HumanReviewConfig][google.cloud.documentai.v1beta3.HumanReviewConfig] that
+ // the document will be reviewed with.
string human_review_config = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -991,7 +1106,9 @@ message ReviewDocumentRequest {
DocumentSchema document_schema = 6;
}
-// Response message for review document method.
+// Response message for the
+// [ReviewDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ReviewDocument]
+// method.
message ReviewDocumentResponse {
// Possible states of the review operation.
enum State {
@@ -1016,9 +1133,11 @@ message ReviewDocumentResponse {
string rejection_reason = 3;
}
-// The long running operation metadata for review document method.
+// The long-running operation metadata for the
+// [ReviewDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ReviewDocument]
+// method.
message ReviewDocumentOperationMetadata {
- // State of the longrunning operation.
+ // State of the long-running operation.
enum State {
// Unspecified state.
STATE_UNSPECIFIED = 0;
@@ -1052,14 +1171,16 @@ message ReviewDocumentOperationMetadata {
// The last update time of the operation.
google.protobuf.Timestamp update_time = 4;
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 5;
// The Crowd Compute question ID.
string question_id = 6;
}
-// Evaluates the given ProcessorVersion against the supplied documents.
+// Evaluates the given
+// [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] against
+// the supplied documents.
message EvaluateProcessorVersionRequest {
// Required. The resource name of the
// [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to
@@ -1078,13 +1199,17 @@ message EvaluateProcessorVersionRequest {
[(google.api.field_behavior) = OPTIONAL];
}
-// Metadata of the EvaluateProcessorVersion method.
+// Metadata of the
+// [EvaluateProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.EvaluateProcessorVersion]
+// method.
message EvaluateProcessorVersionMetadata {
- // The basic metadata of the long running operation.
+ // The basic metadata of the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
-// Metadata of the EvaluateProcessorVersion method.
+// Response of the
+// [EvaluateProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.EvaluateProcessorVersion]
+// method.
message EvaluateProcessorVersionResponse {
// The resource name of the created evaluation.
string evaluation = 2;
@@ -1103,7 +1228,8 @@ message GetEvaluationRequest {
];
}
-// Retrieves a list of evaluations for a given ProcessorVersion.
+// Retrieves a list of evaluations for a given
+// [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion].
message ListEvaluationsRequest {
// Required. The resource name of the
// [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion] to
@@ -1117,8 +1243,8 @@ message ListEvaluationsRequest {
];
// The standard list page size.
- // If unspecified, at most 5 evaluations will be returned.
- // The maximum value is 100; values above 100 will be coerced to 100.
+ // If unspecified, at most `5` evaluations are returned.
+ // The maximum value is `100`. Values above `100` are coerced to `100`.
int32 page_size = 2;
// A page token, received from a previous `ListEvaluations` call.
@@ -1126,7 +1252,7 @@ message ListEvaluationsRequest {
string page_token = 3;
}
-// The response from ListEvaluations.
+// The response from `ListEvaluations`.
message ListEvaluationsResponse {
// The evaluations requested.
repeated Evaluation evaluations = 1;
@@ -1136,19 +1262,27 @@ message ListEvaluationsResponse {
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 request message for the
+// [ImportProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.ImportProcessorVersion]
+// method. Requirements:
//
-// The destination project is specified as part of the `parent` field.
-// The source project is specified as part of `source` field.
+// - The source processor version and destination processor
+// must be in the same location.
+// - The Document AI [Service
+// Agent](https://cloud.google.com/iam/docs/service-agents) of the destination
+// project must have [Document AI Editor
+// role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on
+// the source project.
//
-// The Service Agent for Document AI can be found in
-// https://cloud.google.com/iam/docs/service-agents.
+// The destination project is specified as part of the
+// [parent][google.cloud.documentai.v1beta3.ImportProcessorVersionRequest.parent]
+// field. The source project is specified as part of the
+// [source][google.cloud.documentai.v1beta3.ImportProcessorVersionRequest.processor_version_source]
+// field.
message ImportProcessorVersionRequest {
oneof source {
- // The source processor version to import from.
+ // The source processor version to import from. The source processor version
+ // and destination processor need to be in the same environment and region.
string processor_version_source = 2 [(google.api.resource_reference) = {
type: "documentai.googleapis.com/ProcessorVersion"
}];
@@ -1165,7 +1299,9 @@ message ImportProcessorVersionRequest {
];
}
-// The response message for the ImportProcessorVersion method.
+// The response message for the
+// [ImportProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.ImportProcessorVersion]
+// method.
message ImportProcessorVersionResponse {
// The destination processor version name.
string processor_version = 1 [(google.api.resource_reference) = {
@@ -1173,9 +1309,10 @@ message ImportProcessorVersionResponse {
}];
}
-// The long running operation metadata for the ImportProcessorVersion
+// The long-running operation metadata for the
+// [ImportProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.ImportProcessorVersion]
// method.
message ImportProcessorVersionMetadata {
- // The basic metadata for the long running operation.
+ // The basic metadata for the long-running operation.
CommonOperationMetadata common_metadata = 1;
}
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto
index b792319da4f..b685be5f29f 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -24,6 +24,18 @@ option java_package = "com.google.cloud.documentai.v1beta3";
option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
+// Metadata about a property.
+message PropertyMetadata {
+ // Whether the property should be considered as "inactive".
+ bool inactive = 3;
+}
+
+// Metadata about an entity type.
+message EntityTypeMetadata {
+ // Whether the entity type should be considered inactive.
+ bool inactive = 5;
+}
+
// The schema defines the output of the processed document by a processor.
message DocumentSchema {
// EntityType is the wrapper of a label of the corresponding model with
@@ -38,20 +50,28 @@ message DocumentSchema {
// Defines properties that can be part of the entity type.
message Property {
- // Types of occurrences of the entity type in the document. Note: this
- // represents the number of instances of an entity types, not number of
- // mentions of a given entity instance.
+ // Types of occurrences of the entity type in the document. This
+ // represents the number of instances of instances of an entity, not
+ // number of mentions of an entity. For example, a bank statement may
+ // only have one `account_number`, but this account number may be
+ // mentioned in several places on the document. In this case the
+ // 'account_number' would be considered a `REQUIRED_ONCE` entity type. If,
+ // on the other hand, we expect a bank statement to contain the status of
+ // multiple different accounts for the customers, the occurrence type will
+ // be set to `REQUIRED_MULTIPLE`.
enum OccurrenceType {
// Unspecified occurrence type.
OCCURRENCE_TYPE_UNSPECIFIED = 0;
- // There will be zero or one instance of this entity type.
+ // There will be zero or one instance of this entity type. The same
+ // entity instance may be mentioned multiple times.
OPTIONAL_ONCE = 1;
// The entity type will appear zero or multiple times.
OPTIONAL_MULTIPLE = 2;
- // The entity type will only appear exactly once.
+ // The entity type will only appear exactly once. The same
+ // entity instance may be mentioned multiple times.
REQUIRED_ONCE = 3;
// The entity type will appear once or more times.
@@ -69,6 +89,9 @@ message DocumentSchema {
// Occurrence type limits the number of instances an entity type appears
// in the document.
OccurrenceType occurrence_type = 3;
+
+ // Any additional metadata about the property can be added here.
+ PropertyMetadata property_metadata = 5;
}
oneof value_source {
@@ -84,16 +107,15 @@ message DocumentSchema {
string display_name = 13;
// Name of the type. It must be unique within the schema file and
- // cannot be a 'Common Type'. Besides that we use the following naming
- // conventions:
+ // cannot be a "Common Type". The following naming conventions are used:
//
- // - *use `snake_casing`*
- // - name matching is case-sensitive
+ // - Use `snake_casing`.
+ // - Name matching is case-sensitive.
// - Maximum 64 characters.
// - Must start with a letter.
// - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
// compatibility internal infrastructure and tooling can handle any ascii
- // character)
+ // character.)
// - The `/` is sometimes used to denote a property of a type. For example
// `line_item/amount`. This convention is deprecated, but will still be
// honored for backward compatibility.
@@ -103,14 +125,17 @@ message DocumentSchema {
// one should be set.
repeated string base_types = 2;
- // Describing the nested structure, or composition of an entity.
+ // Description the nested structure, or composition of an entity.
repeated Property properties = 6;
+
+ // Metadata for the entity type.
+ EntityTypeMetadata entity_type_metadata = 11;
}
// Metadata for global schema behavior.
message Metadata {
- // If true, a `document` entity type can be applied to subdocument (
- // splitting). Otherwise, it can only be applied to the entire document
+ // If true, a `document` entity type can be applied to subdocument
+ // (splitting). Otherwise, it can only be applied to the entire document
// (classification).
bool document_splitter = 1;
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_service.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_service.proto
new file mode 100644
index 00000000000..8dcf239e36f
--- /dev/null
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_service.proto
@@ -0,0 +1,112 @@
+// Copyright 2023 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.v1beta3;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/documentai/v1beta3/dataset.proto";
+import "google/cloud/documentai/v1beta3/operation_metadata.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
+option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentAiDocumentService";
+option java_package = "com.google.cloud.documentai.v1beta3";
+option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
+option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
+
+// Service to call Cloud DocumentAI to manage document collection (dataset).
+service DocumentService {
+ option (google.api.default_host) = "documentai.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform";
+
+ // Updates metadata associated with a dataset.
+ rpc UpdateDataset(UpdateDatasetRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ patch: "/v1beta3/{dataset.name=projects/*/locations/*/processors/*/dataset}"
+ body: "dataset"
+ };
+ option (google.api.method_signature) = "dataset,update_mask";
+ option (google.longrunning.operation_info) = {
+ response_type: "Dataset"
+ metadata_type: "UpdateDatasetOperationMetadata"
+ };
+ }
+
+ // Gets the `DatasetSchema` of a `Dataset`.
+ rpc GetDatasetSchema(GetDatasetSchemaRequest) returns (DatasetSchema) {
+ option (google.api.http) = {
+ get: "/v1beta3/{name=projects/*/locations/*/processors/*/dataset/datasetSchema}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Updates a `DatasetSchema`.
+ rpc UpdateDatasetSchema(UpdateDatasetSchemaRequest) returns (DatasetSchema) {
+ option (google.api.http) = {
+ patch: "/v1beta3/{dataset_schema.name=projects/*/locations/*/processors/*/dataset/datasetSchema}"
+ body: "dataset_schema"
+ };
+ option (google.api.method_signature) = "dataset_schema,update_mask";
+ }
+}
+
+message UpdateDatasetRequest {
+ // Required. The `name` field of the `Dataset` is used to identify the
+ // resource to be updated.
+ Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The update mask applies to the resource.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+message UpdateDatasetOperationMetadata {
+ // The basic metadata of the long running operation.
+ CommonOperationMetadata common_metadata = 1;
+}
+
+// Request for `GetDatasetSchema`.
+message GetDatasetSchemaRequest {
+ // Required. The dataset schema resource name.
+ // Format:
+ // projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "documentai.googleapis.com/DatasetSchema"
+ }
+ ];
+
+ // If set, only returns the visible fields of the schema.
+ bool visible_fields_only = 2;
+}
+
+// Request for `UpdateDatasetSchema`.
+message UpdateDatasetSchemaRequest {
+ // Required. The name field of the `DatasetSchema` is used to identify the
+ // resource to be updated.
+ DatasetSchema dataset_schema = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The update mask applies to the resource.
+ google.protobuf.FieldMask update_mask = 2;
+}
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/evaluation.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/evaluation.proto
index e5087c818c2..4de7046b6d7 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/evaluation.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/evaluation.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/geometry.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/geometry.proto
index 05eeac9c493..da949fb1964 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/geometry.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/geometry.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/operation_metadata.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/operation_metadata.proto
index e8f757a543b..509109aba0c 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/operation_metadata.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/operation_metadata.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor.proto
index 7de236e1fec..bafcdc0f430 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -31,10 +31,9 @@ option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
// A processor version is an implementation of a processor. Each processor
-// can have multiple versions, pre-trained by Google internally or up-trained
-// by the customer. At a time, a processor can only have one default version
-// version. So the processor's behavior (when processing documents) is defined
-// by a default version
+// can have multiple versions, pretrained by Google internally or uptrained
+// by the customer. A processor can only have one default version at a time.
+// Its document-processing behavior is defined by that version.
message ProcessorVersion {
option (google.api.resource) = {
type: "documentai.googleapis.com/ProcessorVersion"
@@ -78,6 +77,9 @@ message ProcessorVersion {
// The processor version failed and is in an indeterminate state.
FAILED = 7;
+
+ // The processor version is being imported.
+ IMPORTING = 8;
}
// The resource name of the processor version.
@@ -106,7 +108,7 @@ message ProcessorVersion {
// The KMS key version with which data is encrypted.
string kms_key_version_name = 10;
- // Denotes that this ProcessorVersion is managed by google.
+ // Denotes that this `ProcessorVersion` is managed by Google.
bool google_managed = 11;
// If set, information about the eventual deprecation of this version.
@@ -163,8 +165,8 @@ message Processor {
(google.api.field_behavior) = OUTPUT_ONLY
];
- // The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
- // To get a list of processors types, see
+ // The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
+ // To get a list of processor types, see
// [FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes].
string type = 2;
@@ -189,7 +191,7 @@ message Processor {
// The time the processor was created.
google.protobuf.Timestamp create_time = 7;
- // The KMS key used for encryption/decryption in CMEK scenarios.
- // See https://cloud.google.com/security-key-management.
+ // The [KMS key](https://cloud.google.com/security-key-management) used for
+ // encryption and decryption in CMEK scenarios.
string kms_key_name = 8;
}
diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor_type.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor_type.proto
index 0ff23ffafb3..2840eb0852e 100644
--- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor_type.proto
+++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/processor_type.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -37,7 +37,8 @@ message ProcessorType {
// The location information about where the processor is available.
message LocationInfo {
- // The location id, currently must be one of [us, eu].
+ // The location ID. For supported locations, refer to [regional and
+ // multi-regional support](/document-ai/docs/regions).
string location_id = 1;
}
@@ -45,7 +46,7 @@ message ProcessorType {
// Format: `projects/{project}/processorTypes/{processor_type}`
string name = 1;
- // The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
+ // The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
string type = 2;
// The processor category, used by UI to group processor types.
diff --git a/packages/google-cloud-documentai/protos/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts
index ece5bc5559f..289e0dd4b0b 100644
--- a/packages/google-cloud-documentai/protos/protos.d.ts
+++ b/packages/google-cloud-documentai/protos/protos.d.ts
@@ -1659,6 +1659,9 @@ export namespace google {
/** Token provenance */
provenance?: (google.cloud.documentai.v1.Document.IProvenance|null);
+
+ /** Token styleInfo */
+ styleInfo?: (google.cloud.documentai.v1.Document.Page.Token.IStyleInfo|null);
}
/** Represents a Token. */
@@ -1682,6 +1685,9 @@ export namespace google {
/** Token provenance. */
public provenance?: (google.cloud.documentai.v1.Document.IProvenance|null);
+ /** Token styleInfo. */
+ public styleInfo?: (google.cloud.documentai.v1.Document.Page.Token.IStyleInfo|null);
+
/**
* Creates a new Token instance using the specified properties.
* @param [properties] Properties to set
@@ -1869,6 +1875,187 @@ export namespace google {
HYPHEN = 3
}
}
+
+ /** Properties of a StyleInfo. */
+ interface IStyleInfo {
+
+ /** StyleInfo fontSize */
+ fontSize?: (number|null);
+
+ /** StyleInfo pixelFontSize */
+ pixelFontSize?: (number|null);
+
+ /** StyleInfo letterSpacing */
+ letterSpacing?: (number|null);
+
+ /** StyleInfo fontType */
+ fontType?: (string|null);
+
+ /** StyleInfo bold */
+ bold?: (boolean|null);
+
+ /** StyleInfo italic */
+ italic?: (boolean|null);
+
+ /** StyleInfo underlined */
+ underlined?: (boolean|null);
+
+ /** StyleInfo strikeout */
+ strikeout?: (boolean|null);
+
+ /** StyleInfo subscript */
+ subscript?: (boolean|null);
+
+ /** StyleInfo superscript */
+ superscript?: (boolean|null);
+
+ /** StyleInfo smallcaps */
+ smallcaps?: (boolean|null);
+
+ /** StyleInfo fontWeight */
+ fontWeight?: (number|null);
+
+ /** StyleInfo handwritten */
+ handwritten?: (boolean|null);
+
+ /** StyleInfo textColor */
+ textColor?: (google.type.IColor|null);
+
+ /** StyleInfo backgroundColor */
+ backgroundColor?: (google.type.IColor|null);
+ }
+
+ /** Represents a StyleInfo. */
+ class StyleInfo implements IStyleInfo {
+
+ /**
+ * Constructs a new StyleInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1.Document.Page.Token.IStyleInfo);
+
+ /** StyleInfo fontSize. */
+ public fontSize: number;
+
+ /** StyleInfo pixelFontSize. */
+ public pixelFontSize: number;
+
+ /** StyleInfo letterSpacing. */
+ public letterSpacing: number;
+
+ /** StyleInfo fontType. */
+ public fontType: string;
+
+ /** StyleInfo bold. */
+ public bold: boolean;
+
+ /** StyleInfo italic. */
+ public italic: boolean;
+
+ /** StyleInfo underlined. */
+ public underlined: boolean;
+
+ /** StyleInfo strikeout. */
+ public strikeout: boolean;
+
+ /** StyleInfo subscript. */
+ public subscript: boolean;
+
+ /** StyleInfo superscript. */
+ public superscript: boolean;
+
+ /** StyleInfo smallcaps. */
+ public smallcaps: boolean;
+
+ /** StyleInfo fontWeight. */
+ public fontWeight: number;
+
+ /** StyleInfo handwritten. */
+ public handwritten: boolean;
+
+ /** StyleInfo textColor. */
+ public textColor?: (google.type.IColor|null);
+
+ /** StyleInfo backgroundColor. */
+ public backgroundColor?: (google.type.IColor|null);
+
+ /**
+ * Creates a new StyleInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns StyleInfo instance
+ */
+ public static create(properties?: google.cloud.documentai.v1.Document.Page.Token.IStyleInfo): google.cloud.documentai.v1.Document.Page.Token.StyleInfo;
+
+ /**
+ * Encodes the specified StyleInfo message. Does not implicitly {@link google.cloud.documentai.v1.Document.Page.Token.StyleInfo.verify|verify} messages.
+ * @param message StyleInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1.Document.Page.Token.IStyleInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified StyleInfo message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.Page.Token.StyleInfo.verify|verify} messages.
+ * @param message StyleInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1.Document.Page.Token.IStyleInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a StyleInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns StyleInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1.Document.Page.Token.StyleInfo;
+
+ /**
+ * Decodes a StyleInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns StyleInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1.Document.Page.Token.StyleInfo;
+
+ /**
+ * Verifies a StyleInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a StyleInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns StyleInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.Page.Token.StyleInfo;
+
+ /**
+ * Creates a plain object from a StyleInfo message. Also converts values to other types if specified.
+ * @param message StyleInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1.Document.Page.Token.StyleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this StyleInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for StyleInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
}
/** Properties of a Symbol. */
@@ -13144,7 +13331,8 @@ export namespace google {
UNDEPLOYING = 4,
CREATING = 5,
DELETING = 6,
- FAILED = 7
+ FAILED = 7,
+ IMPORTING = 8
}
}
@@ -23120,5644 +23308,7250 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a Document. */
- interface IDocument {
-
- /** Document uri */
- uri?: (string|null);
-
- /** Document content */
- content?: (Uint8Array|string|null);
-
- /** Document mimeType */
- mimeType?: (string|null);
-
- /** Document text */
- text?: (string|null);
-
- /** Document textStyles */
- textStyles?: (google.cloud.documentai.v1beta3.Document.IStyle[]|null);
-
- /** Document pages */
- pages?: (google.cloud.documentai.v1beta3.Document.IPage[]|null);
+ /** Properties of a Dataset. */
+ interface IDataset {
- /** Document entities */
- entities?: (google.cloud.documentai.v1beta3.Document.IEntity[]|null);
+ /** Dataset gcsManagedConfig */
+ gcsManagedConfig?: (google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig|null);
- /** Document entityRelations */
- entityRelations?: (google.cloud.documentai.v1beta3.Document.IEntityRelation[]|null);
+ /** Dataset documentWarehouseConfig */
+ documentWarehouseConfig?: (google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig|null);
- /** Document textChanges */
- textChanges?: (google.cloud.documentai.v1beta3.Document.ITextChange[]|null);
+ /** Dataset unmanagedDatasetConfig */
+ unmanagedDatasetConfig?: (google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig|null);
- /** Document shardInfo */
- shardInfo?: (google.cloud.documentai.v1beta3.Document.IShardInfo|null);
+ /** Dataset spannerIndexingConfig */
+ spannerIndexingConfig?: (google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null);
- /** Document error */
- error?: (google.rpc.IStatus|null);
+ /** Dataset name */
+ name?: (string|null);
- /** Document revisions */
- revisions?: (google.cloud.documentai.v1beta3.Document.IRevision[]|null);
+ /** Dataset state */
+ state?: (google.cloud.documentai.v1beta3.Dataset.State|keyof typeof google.cloud.documentai.v1beta3.Dataset.State|null);
}
- /** Represents a Document. */
- class Document implements IDocument {
+ /** Represents a Dataset. */
+ class Dataset implements IDataset {
/**
- * Constructs a new Document.
+ * Constructs a new Dataset.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.IDocument);
-
- /** Document uri. */
- public uri?: (string|null);
-
- /** Document content. */
- public content?: (Uint8Array|string|null);
-
- /** Document mimeType. */
- public mimeType: string;
-
- /** Document text. */
- public text: string;
-
- /** Document textStyles. */
- public textStyles: google.cloud.documentai.v1beta3.Document.IStyle[];
+ constructor(properties?: google.cloud.documentai.v1beta3.IDataset);
- /** Document pages. */
- public pages: google.cloud.documentai.v1beta3.Document.IPage[];
+ /** Dataset gcsManagedConfig. */
+ public gcsManagedConfig?: (google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig|null);
- /** Document entities. */
- public entities: google.cloud.documentai.v1beta3.Document.IEntity[];
+ /** Dataset documentWarehouseConfig. */
+ public documentWarehouseConfig?: (google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig|null);
- /** Document entityRelations. */
- public entityRelations: google.cloud.documentai.v1beta3.Document.IEntityRelation[];
+ /** Dataset unmanagedDatasetConfig. */
+ public unmanagedDatasetConfig?: (google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig|null);
- /** Document textChanges. */
- public textChanges: google.cloud.documentai.v1beta3.Document.ITextChange[];
+ /** Dataset spannerIndexingConfig. */
+ public spannerIndexingConfig?: (google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null);
- /** Document shardInfo. */
- public shardInfo?: (google.cloud.documentai.v1beta3.Document.IShardInfo|null);
+ /** Dataset name. */
+ public name: string;
- /** Document error. */
- public error?: (google.rpc.IStatus|null);
+ /** Dataset state. */
+ public state: (google.cloud.documentai.v1beta3.Dataset.State|keyof typeof google.cloud.documentai.v1beta3.Dataset.State);
- /** Document revisions. */
- public revisions: google.cloud.documentai.v1beta3.Document.IRevision[];
+ /** Dataset storageSource. */
+ public storageSource?: ("gcsManagedConfig"|"documentWarehouseConfig"|"unmanagedDatasetConfig");
- /** Document source. */
- public source?: ("uri"|"content");
+ /** Dataset indexingSource. */
+ public indexingSource?: "spannerIndexingConfig";
/**
- * Creates a new Document instance using the specified properties.
+ * Creates a new Dataset instance using the specified properties.
* @param [properties] Properties to set
- * @returns Document instance
+ * @returns Dataset instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.IDocument): google.cloud.documentai.v1beta3.Document;
+ public static create(properties?: google.cloud.documentai.v1beta3.IDataset): google.cloud.documentai.v1beta3.Dataset;
/**
- * Encodes the specified Document message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.verify|verify} messages.
- * @param message Document message or plain object to encode
+ * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.verify|verify} messages.
+ * @param message Dataset message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.IDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.IDataset, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.verify|verify} messages.
- * @param message Document message or plain object to encode
+ * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.verify|verify} messages.
+ * @param message Dataset message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDataset, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Document message from the specified reader or buffer.
+ * Decodes a Dataset message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Document
+ * @returns Dataset
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Dataset;
/**
- * Decodes a Document message from the specified reader or buffer, length delimited.
+ * Decodes a Dataset message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Document
+ * @returns Dataset
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Dataset;
/**
- * Verifies a Document message.
+ * Verifies a Dataset message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Document message from a plain object. Also converts values to their respective internal types.
+ * Creates a Dataset message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Document
+ * @returns Dataset
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Dataset;
/**
- * Creates a plain object from a Document message. Also converts values to other types if specified.
- * @param message Document
+ * Creates a plain object from a Dataset message. Also converts values to other types if specified.
+ * @param message Dataset
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Dataset, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Document to JSON.
+ * Converts this Dataset to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Document
+ * Gets the default type url for Dataset
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace Document {
-
- /** Properties of a ShardInfo. */
- interface IShardInfo {
-
- /** ShardInfo shardIndex */
- shardIndex?: (number|Long|string|null);
+ namespace Dataset {
- /** ShardInfo shardCount */
- shardCount?: (number|Long|string|null);
+ /** Properties of a GCSManagedConfig. */
+ interface IGCSManagedConfig {
- /** ShardInfo textOffset */
- textOffset?: (number|Long|string|null);
+ /** GCSManagedConfig gcsPrefix */
+ gcsPrefix?: (google.cloud.documentai.v1beta3.IGcsPrefix|null);
}
- /** Represents a ShardInfo. */
- class ShardInfo implements IShardInfo {
+ /** Represents a GCSManagedConfig. */
+ class GCSManagedConfig implements IGCSManagedConfig {
/**
- * Constructs a new ShardInfo.
+ * Constructs a new GCSManagedConfig.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IShardInfo);
-
- /** ShardInfo shardIndex. */
- public shardIndex: (number|Long|string);
+ constructor(properties?: google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig);
- /** ShardInfo shardCount. */
- public shardCount: (number|Long|string);
-
- /** ShardInfo textOffset. */
- public textOffset: (number|Long|string);
+ /** GCSManagedConfig gcsPrefix. */
+ public gcsPrefix?: (google.cloud.documentai.v1beta3.IGcsPrefix|null);
/**
- * Creates a new ShardInfo instance using the specified properties.
+ * Creates a new GCSManagedConfig instance using the specified properties.
* @param [properties] Properties to set
- * @returns ShardInfo instance
+ * @returns GCSManagedConfig instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IShardInfo): google.cloud.documentai.v1beta3.Document.ShardInfo;
+ public static create(properties?: google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig): google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig;
/**
- * Encodes the specified ShardInfo message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.ShardInfo.verify|verify} messages.
- * @param message ShardInfo message or plain object to encode
+ * Encodes the specified GCSManagedConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.verify|verify} messages.
+ * @param message GCSManagedConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.IShardInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified ShardInfo message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.ShardInfo.verify|verify} messages.
- * @param message ShardInfo message or plain object to encode
+ * Encodes the specified GCSManagedConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.verify|verify} messages.
+ * @param message GCSManagedConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IShardInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a ShardInfo message from the specified reader or buffer.
+ * Decodes a GCSManagedConfig message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns ShardInfo
+ * @returns GCSManagedConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.ShardInfo;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig;
/**
- * Decodes a ShardInfo message from the specified reader or buffer, length delimited.
+ * Decodes a GCSManagedConfig message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns ShardInfo
+ * @returns GCSManagedConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.ShardInfo;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig;
/**
- * Verifies a ShardInfo message.
+ * Verifies a GCSManagedConfig message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a ShardInfo message from a plain object. Also converts values to their respective internal types.
+ * Creates a GCSManagedConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns ShardInfo
+ * @returns GCSManagedConfig
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.ShardInfo;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig;
/**
- * Creates a plain object from a ShardInfo message. Also converts values to other types if specified.
- * @param message ShardInfo
+ * Creates a plain object from a GCSManagedConfig message. Also converts values to other types if specified.
+ * @param message GCSManagedConfig
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.ShardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this ShardInfo to JSON.
+ * Converts this GCSManagedConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for ShardInfo
+ * Gets the default type url for GCSManagedConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a Style. */
- interface IStyle {
+ /** Properties of a DocumentWarehouseConfig. */
+ interface IDocumentWarehouseConfig {
- /** Style textAnchor */
- textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+ /** DocumentWarehouseConfig collection */
+ collection?: (string|null);
- /** Style color */
- color?: (google.type.IColor|null);
+ /** DocumentWarehouseConfig schema */
+ schema?: (string|null);
+ }
- /** Style backgroundColor */
- backgroundColor?: (google.type.IColor|null);
+ /** Represents a DocumentWarehouseConfig. */
+ class DocumentWarehouseConfig implements IDocumentWarehouseConfig {
- /** Style fontWeight */
- fontWeight?: (string|null);
+ /**
+ * Constructs a new DocumentWarehouseConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig);
- /** Style textStyle */
- textStyle?: (string|null);
+ /** DocumentWarehouseConfig collection. */
+ public collection: string;
- /** Style textDecoration */
- textDecoration?: (string|null);
+ /** DocumentWarehouseConfig schema. */
+ public schema: string;
- /** Style fontSize */
- fontSize?: (google.cloud.documentai.v1beta3.Document.Style.IFontSize|null);
+ /**
+ * Creates a new DocumentWarehouseConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DocumentWarehouseConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig): google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig;
- /** Style fontFamily */
- fontFamily?: (string|null);
- }
+ /**
+ * Encodes the specified DocumentWarehouseConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.verify|verify} messages.
+ * @param message DocumentWarehouseConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Represents a Style. */
- class Style implements IStyle {
+ /**
+ * Encodes the specified DocumentWarehouseConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.verify|verify} messages.
+ * @param message DocumentWarehouseConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Constructs a new Style.
- * @param [properties] Properties to set
+ * Decodes a DocumentWarehouseConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DocumentWarehouseConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IStyle);
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig;
- /** Style textAnchor. */
- public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+ /**
+ * Decodes a DocumentWarehouseConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DocumentWarehouseConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig;
- /** Style color. */
- public color?: (google.type.IColor|null);
+ /**
+ * Verifies a DocumentWarehouseConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Style backgroundColor. */
- public backgroundColor?: (google.type.IColor|null);
+ /**
+ * Creates a DocumentWarehouseConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DocumentWarehouseConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig;
- /** Style fontWeight. */
- public fontWeight: string;
+ /**
+ * Creates a plain object from a DocumentWarehouseConfig message. Also converts values to other types if specified.
+ * @param message DocumentWarehouseConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** Style textStyle. */
- public textStyle: string;
+ /**
+ * Converts this DocumentWarehouseConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Style textDecoration. */
- public textDecoration: string;
+ /**
+ * Gets the default type url for DocumentWarehouseConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** Style fontSize. */
- public fontSize?: (google.cloud.documentai.v1beta3.Document.Style.IFontSize|null);
+ /** Properties of an UnmanagedDatasetConfig. */
+ interface IUnmanagedDatasetConfig {
+ }
- /** Style fontFamily. */
- public fontFamily: string;
+ /** Represents an UnmanagedDatasetConfig. */
+ class UnmanagedDatasetConfig implements IUnmanagedDatasetConfig {
/**
- * Creates a new Style instance using the specified properties.
+ * Constructs a new UnmanagedDatasetConfig.
* @param [properties] Properties to set
- * @returns Style instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IStyle): google.cloud.documentai.v1beta3.Document.Style;
+ constructor(properties?: google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig);
/**
- * Encodes the specified Style message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.verify|verify} messages.
- * @param message Style message or plain object to encode
+ * Creates a new UnmanagedDatasetConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UnmanagedDatasetConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig): google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig;
+
+ /**
+ * Encodes the specified UnmanagedDatasetConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.verify|verify} messages.
+ * @param message UnmanagedDatasetConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.IStyle, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Style message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.verify|verify} messages.
- * @param message Style message or plain object to encode
+ * Encodes the specified UnmanagedDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.verify|verify} messages.
+ * @param message UnmanagedDatasetConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IStyle, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Style message from the specified reader or buffer.
+ * Decodes an UnmanagedDatasetConfig message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Style
+ * @returns UnmanagedDatasetConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Style;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig;
/**
- * Decodes a Style message from the specified reader or buffer, length delimited.
+ * Decodes an UnmanagedDatasetConfig message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Style
+ * @returns UnmanagedDatasetConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Style;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig;
/**
- * Verifies a Style message.
+ * Verifies an UnmanagedDatasetConfig message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Style message from a plain object. Also converts values to their respective internal types.
+ * Creates an UnmanagedDatasetConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Style
+ * @returns UnmanagedDatasetConfig
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Style;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig;
/**
- * Creates a plain object from a Style message. Also converts values to other types if specified.
- * @param message Style
+ * Creates a plain object from an UnmanagedDatasetConfig message. Also converts values to other types if specified.
+ * @param message UnmanagedDatasetConfig
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Style, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Style to JSON.
+ * Converts this UnmanagedDatasetConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Style
+ * Gets the default type url for UnmanagedDatasetConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace Style {
-
- /** Properties of a FontSize. */
- interface IFontSize {
+ /** Properties of a SpannerIndexingConfig. */
+ interface ISpannerIndexingConfig {
+ }
- /** FontSize size */
- size?: (number|null);
+ /** Represents a SpannerIndexingConfig. */
+ class SpannerIndexingConfig implements ISpannerIndexingConfig {
- /** FontSize unit */
- unit?: (string|null);
- }
+ /**
+ * Constructs a new SpannerIndexingConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig);
- /** Represents a FontSize. */
- class FontSize implements IFontSize {
+ /**
+ * Creates a new SpannerIndexingConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SpannerIndexingConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig): google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig;
- /**
- * Constructs a new FontSize.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Style.IFontSize);
+ /**
+ * Encodes the specified SpannerIndexingConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.verify|verify} messages.
+ * @param message SpannerIndexingConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /** FontSize size. */
- public size: number;
+ /**
+ * Encodes the specified SpannerIndexingConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.verify|verify} messages.
+ * @param message SpannerIndexingConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /** FontSize unit. */
- public unit: string;
+ /**
+ * Decodes a SpannerIndexingConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SpannerIndexingConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig;
- /**
- * Creates a new FontSize instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FontSize instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Style.IFontSize): google.cloud.documentai.v1beta3.Document.Style.FontSize;
+ /**
+ * Decodes a SpannerIndexingConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SpannerIndexingConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig;
- /**
- * Encodes the specified FontSize message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.FontSize.verify|verify} messages.
- * @param message FontSize message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Style.IFontSize, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a SpannerIndexingConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Encodes the specified FontSize message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.FontSize.verify|verify} messages.
- * @param message FontSize message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Style.IFontSize, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a SpannerIndexingConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SpannerIndexingConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig;
- /**
- * Decodes a FontSize message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FontSize
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Style.FontSize;
+ /**
+ * Creates a plain object from a SpannerIndexingConfig message. Also converts values to other types if specified.
+ * @param message SpannerIndexingConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Decodes a FontSize message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FontSize
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Style.FontSize;
+ /**
+ * Converts this SpannerIndexingConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Verifies a FontSize message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Gets the default type url for SpannerIndexingConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a FontSize message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FontSize
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Style.FontSize;
+ /** State enum. */
+ enum State {
+ STATE_UNSPECIFIED = 0,
+ UNINITIALIZED = 1,
+ INITIALIZING = 2,
+ INITIALIZED = 3
+ }
+ }
- /**
- * Creates a plain object from a FontSize message. Also converts values to other types if specified.
- * @param message FontSize
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Style.FontSize, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Properties of a DatasetSchema. */
+ interface IDatasetSchema {
- /**
- * Converts this FontSize to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** DatasetSchema name */
+ name?: (string|null);
- /**
- * Gets the default type url for FontSize
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
+ /** DatasetSchema documentSchema */
+ documentSchema?: (google.cloud.documentai.v1beta3.IDocumentSchema|null);
+ }
- /** Properties of a Page. */
- interface IPage {
+ /** Represents a DatasetSchema. */
+ class DatasetSchema implements IDatasetSchema {
- /** Page pageNumber */
- pageNumber?: (number|null);
+ /**
+ * Constructs a new DatasetSchema.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IDatasetSchema);
- /** Page image */
- image?: (google.cloud.documentai.v1beta3.Document.Page.IImage|null);
+ /** DatasetSchema name. */
+ public name: string;
- /** Page transforms */
- transforms?: (google.cloud.documentai.v1beta3.Document.Page.IMatrix[]|null);
+ /** DatasetSchema documentSchema. */
+ public documentSchema?: (google.cloud.documentai.v1beta3.IDocumentSchema|null);
- /** Page dimension */
- dimension?: (google.cloud.documentai.v1beta3.Document.Page.IDimension|null);
+ /**
+ * Creates a new DatasetSchema instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DatasetSchema instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IDatasetSchema): google.cloud.documentai.v1beta3.DatasetSchema;
- /** Page layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
-
- /** Page detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /**
+ * Encodes the specified DatasetSchema message. Does not implicitly {@link google.cloud.documentai.v1beta3.DatasetSchema.verify|verify} messages.
+ * @param message DatasetSchema message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IDatasetSchema, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Page blocks */
- blocks?: (google.cloud.documentai.v1beta3.Document.Page.IBlock[]|null);
+ /**
+ * Encodes the specified DatasetSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DatasetSchema.verify|verify} messages.
+ * @param message DatasetSchema message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDatasetSchema, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Page paragraphs */
- paragraphs?: (google.cloud.documentai.v1beta3.Document.Page.IParagraph[]|null);
+ /**
+ * Decodes a DatasetSchema message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DatasetSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DatasetSchema;
- /** Page lines */
- lines?: (google.cloud.documentai.v1beta3.Document.Page.ILine[]|null);
+ /**
+ * Decodes a DatasetSchema message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DatasetSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DatasetSchema;
- /** Page tokens */
- tokens?: (google.cloud.documentai.v1beta3.Document.Page.IToken[]|null);
+ /**
+ * Verifies a DatasetSchema message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Page visualElements */
- visualElements?: (google.cloud.documentai.v1beta3.Document.Page.IVisualElement[]|null);
+ /**
+ * Creates a DatasetSchema message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DatasetSchema
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DatasetSchema;
- /** Page tables */
- tables?: (google.cloud.documentai.v1beta3.Document.Page.ITable[]|null);
+ /**
+ * Creates a plain object from a DatasetSchema message. Also converts values to other types if specified.
+ * @param message DatasetSchema
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.DatasetSchema, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** Page formFields */
- formFields?: (google.cloud.documentai.v1beta3.Document.Page.IFormField[]|null);
+ /**
+ * Converts this DatasetSchema to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Page symbols */
- symbols?: (google.cloud.documentai.v1beta3.Document.Page.ISymbol[]|null);
+ /**
+ * Gets the default type url for DatasetSchema
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** Page detectedBarcodes */
- detectedBarcodes?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode[]|null);
+ /** Properties of a RawDocument. */
+ interface IRawDocument {
- /** Page imageQualityScores */
- imageQualityScores?: (google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores|null);
+ /** RawDocument content */
+ content?: (Uint8Array|string|null);
- /** Page provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- }
+ /** RawDocument mimeType */
+ mimeType?: (string|null);
+ }
- /** Represents a Page. */
- class Page implements IPage {
+ /** Represents a RawDocument. */
+ class RawDocument implements IRawDocument {
- /**
- * Constructs a new Page.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IPage);
+ /**
+ * Constructs a new RawDocument.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IRawDocument);
- /** Page pageNumber. */
- public pageNumber: number;
+ /** RawDocument content. */
+ public content: (Uint8Array|string);
- /** Page image. */
- public image?: (google.cloud.documentai.v1beta3.Document.Page.IImage|null);
+ /** RawDocument mimeType. */
+ public mimeType: string;
- /** Page transforms. */
- public transforms: google.cloud.documentai.v1beta3.Document.Page.IMatrix[];
+ /**
+ * Creates a new RawDocument instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RawDocument instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IRawDocument): google.cloud.documentai.v1beta3.RawDocument;
- /** Page dimension. */
- public dimension?: (google.cloud.documentai.v1beta3.Document.Page.IDimension|null);
+ /**
+ * Encodes the specified RawDocument message. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocument.verify|verify} messages.
+ * @param message RawDocument message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IRawDocument, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Page layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Encodes the specified RawDocument message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocument.verify|verify} messages.
+ * @param message RawDocument message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IRawDocument, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Page detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /**
+ * Decodes a RawDocument message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RawDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.RawDocument;
- /** Page blocks. */
- public blocks: google.cloud.documentai.v1beta3.Document.Page.IBlock[];
+ /**
+ * Decodes a RawDocument message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RawDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.RawDocument;
- /** Page paragraphs. */
- public paragraphs: google.cloud.documentai.v1beta3.Document.Page.IParagraph[];
+ /**
+ * Verifies a RawDocument message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Page lines. */
- public lines: google.cloud.documentai.v1beta3.Document.Page.ILine[];
+ /**
+ * Creates a RawDocument message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RawDocument
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.RawDocument;
- /** Page tokens. */
- public tokens: google.cloud.documentai.v1beta3.Document.Page.IToken[];
+ /**
+ * Creates a plain object from a RawDocument message. Also converts values to other types if specified.
+ * @param message RawDocument
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.RawDocument, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** Page visualElements. */
- public visualElements: google.cloud.documentai.v1beta3.Document.Page.IVisualElement[];
+ /**
+ * Converts this RawDocument to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Page tables. */
- public tables: google.cloud.documentai.v1beta3.Document.Page.ITable[];
+ /**
+ * Gets the default type url for RawDocument
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** Page formFields. */
- public formFields: google.cloud.documentai.v1beta3.Document.Page.IFormField[];
+ /** Properties of a GcsDocument. */
+ interface IGcsDocument {
- /** Page symbols. */
- public symbols: google.cloud.documentai.v1beta3.Document.Page.ISymbol[];
+ /** GcsDocument gcsUri */
+ gcsUri?: (string|null);
- /** Page detectedBarcodes. */
- public detectedBarcodes: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode[];
+ /** GcsDocument mimeType */
+ mimeType?: (string|null);
+ }
- /** Page imageQualityScores. */
- public imageQualityScores?: (google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores|null);
+ /** Represents a GcsDocument. */
+ class GcsDocument implements IGcsDocument {
- /** Page provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /**
+ * Constructs a new GcsDocument.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IGcsDocument);
- /**
- * Creates a new Page instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Page instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IPage): google.cloud.documentai.v1beta3.Document.Page;
+ /** GcsDocument gcsUri. */
+ public gcsUri: string;
- /**
- * Encodes the specified Page message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.verify|verify} messages.
- * @param message Page message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.IPage, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** GcsDocument mimeType. */
+ public mimeType: string;
- /**
- * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.verify|verify} messages.
- * @param message Page message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IPage, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a new GcsDocument instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GcsDocument instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IGcsDocument): google.cloud.documentai.v1beta3.GcsDocument;
- /**
- * Decodes a Page message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Page
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page;
+ /**
+ * Encodes the specified GcsDocument message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocument.verify|verify} messages.
+ * @param message GcsDocument message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IGcsDocument, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Page message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Page
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page;
+ /**
+ * Encodes the specified GcsDocument message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocument.verify|verify} messages.
+ * @param message GcsDocument message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGcsDocument, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Verifies a Page message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Decodes a GcsDocument message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GcsDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GcsDocument;
- /**
- * Creates a Page message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Page
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page;
+ /**
+ * Decodes a GcsDocument message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GcsDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GcsDocument;
- /**
- * Creates a plain object from a Page message. Also converts values to other types if specified.
- * @param message Page
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Verifies a GcsDocument message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Converts this Page to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a GcsDocument message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GcsDocument
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GcsDocument;
- /**
- * Gets the default type url for Page
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Creates a plain object from a GcsDocument message. Also converts values to other types if specified.
+ * @param message GcsDocument
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.GcsDocument, options?: $protobuf.IConversionOptions): { [k: string]: any };
- namespace Page {
+ /**
+ * Converts this GcsDocument to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Properties of a Dimension. */
- interface IDimension {
+ /**
+ * Gets the default type url for GcsDocument
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** Dimension width */
- width?: (number|null);
+ /** Properties of a GcsDocuments. */
+ interface IGcsDocuments {
- /** Dimension height */
- height?: (number|null);
+ /** GcsDocuments documents */
+ documents?: (google.cloud.documentai.v1beta3.IGcsDocument[]|null);
+ }
- /** Dimension unit */
- unit?: (string|null);
- }
+ /** Represents a GcsDocuments. */
+ class GcsDocuments implements IGcsDocuments {
- /** Represents a Dimension. */
- class Dimension implements IDimension {
+ /**
+ * Constructs a new GcsDocuments.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IGcsDocuments);
- /**
- * Constructs a new Dimension.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IDimension);
+ /** GcsDocuments documents. */
+ public documents: google.cloud.documentai.v1beta3.IGcsDocument[];
- /** Dimension width. */
- public width: number;
+ /**
+ * Creates a new GcsDocuments instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GcsDocuments instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IGcsDocuments): google.cloud.documentai.v1beta3.GcsDocuments;
- /** Dimension height. */
- public height: number;
+ /**
+ * Encodes the specified GcsDocuments message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocuments.verify|verify} messages.
+ * @param message GcsDocuments message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IGcsDocuments, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Dimension unit. */
- public unit: string;
+ /**
+ * Encodes the specified GcsDocuments message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocuments.verify|verify} messages.
+ * @param message GcsDocuments message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGcsDocuments, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a new Dimension instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Dimension instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IDimension): google.cloud.documentai.v1beta3.Document.Page.Dimension;
+ /**
+ * Decodes a GcsDocuments message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GcsDocuments
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GcsDocuments;
- /**
- * Encodes the specified Dimension message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Dimension.verify|verify} messages.
- * @param message Dimension message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IDimension, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Decodes a GcsDocuments message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GcsDocuments
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GcsDocuments;
- /**
- * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Dimension.verify|verify} messages.
- * @param message Dimension message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IDimension, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a GcsDocuments message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Decodes a Dimension message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Dimension
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Dimension;
+ /**
+ * Creates a GcsDocuments message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GcsDocuments
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GcsDocuments;
- /**
- * Decodes a Dimension message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Dimension
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Dimension;
+ /**
+ * Creates a plain object from a GcsDocuments message. Also converts values to other types if specified.
+ * @param message GcsDocuments
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.GcsDocuments, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Verifies a Dimension message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Converts this GcsDocuments to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Creates a Dimension message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Dimension
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Dimension;
+ /**
+ * Gets the default type url for GcsDocuments
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a plain object from a Dimension message. Also converts values to other types if specified.
- * @param message Dimension
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Properties of a GcsPrefix. */
+ interface IGcsPrefix {
- /**
- * Converts this Dimension to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** GcsPrefix gcsUriPrefix */
+ gcsUriPrefix?: (string|null);
+ }
- /**
- * Gets the default type url for Dimension
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** Represents a GcsPrefix. */
+ class GcsPrefix implements IGcsPrefix {
- /** Properties of an Image. */
- interface IImage {
+ /**
+ * Constructs a new GcsPrefix.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IGcsPrefix);
- /** Image content */
- content?: (Uint8Array|string|null);
+ /** GcsPrefix gcsUriPrefix. */
+ public gcsUriPrefix: string;
- /** Image mimeType */
- mimeType?: (string|null);
+ /**
+ * Creates a new GcsPrefix instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GcsPrefix instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IGcsPrefix): google.cloud.documentai.v1beta3.GcsPrefix;
- /** Image width */
- width?: (number|null);
+ /**
+ * Encodes the specified GcsPrefix message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsPrefix.verify|verify} messages.
+ * @param message GcsPrefix message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IGcsPrefix, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Image height */
- height?: (number|null);
+ /**
+ * Encodes the specified GcsPrefix message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsPrefix.verify|verify} messages.
+ * @param message GcsPrefix message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGcsPrefix, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GcsPrefix message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GcsPrefix
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GcsPrefix;
+
+ /**
+ * Decodes a GcsPrefix message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GcsPrefix
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GcsPrefix;
+
+ /**
+ * Verifies a GcsPrefix message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GcsPrefix message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GcsPrefix
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GcsPrefix;
+
+ /**
+ * Creates a plain object from a GcsPrefix message. Also converts values to other types if specified.
+ * @param message GcsPrefix
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.GcsPrefix, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GcsPrefix to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GcsPrefix
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a BatchDocumentsInputConfig. */
+ interface IBatchDocumentsInputConfig {
+
+ /** BatchDocumentsInputConfig gcsPrefix */
+ gcsPrefix?: (google.cloud.documentai.v1beta3.IGcsPrefix|null);
+
+ /** BatchDocumentsInputConfig gcsDocuments */
+ gcsDocuments?: (google.cloud.documentai.v1beta3.IGcsDocuments|null);
+ }
+
+ /** Represents a BatchDocumentsInputConfig. */
+ class BatchDocumentsInputConfig implements IBatchDocumentsInputConfig {
+
+ /**
+ * Constructs a new BatchDocumentsInputConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig);
+
+ /** BatchDocumentsInputConfig gcsPrefix. */
+ public gcsPrefix?: (google.cloud.documentai.v1beta3.IGcsPrefix|null);
+
+ /** BatchDocumentsInputConfig gcsDocuments. */
+ public gcsDocuments?: (google.cloud.documentai.v1beta3.IGcsDocuments|null);
+
+ /** BatchDocumentsInputConfig source. */
+ public source?: ("gcsPrefix"|"gcsDocuments");
+
+ /**
+ * Creates a new BatchDocumentsInputConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BatchDocumentsInputConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+
+ /**
+ * Encodes the specified BatchDocumentsInputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.verify|verify} messages.
+ * @param message BatchDocumentsInputConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified BatchDocumentsInputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.verify|verify} messages.
+ * @param message BatchDocumentsInputConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a BatchDocumentsInputConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BatchDocumentsInputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+
+ /**
+ * Decodes a BatchDocumentsInputConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BatchDocumentsInputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+
+ /**
+ * Verifies a BatchDocumentsInputConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a BatchDocumentsInputConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BatchDocumentsInputConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+
+ /**
+ * Creates a plain object from a BatchDocumentsInputConfig message. Also converts values to other types if specified.
+ * @param message BatchDocumentsInputConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this BatchDocumentsInputConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BatchDocumentsInputConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DocumentOutputConfig. */
+ interface IDocumentOutputConfig {
+
+ /** DocumentOutputConfig gcsOutputConfig */
+ gcsOutputConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig|null);
+ }
+
+ /** Represents a DocumentOutputConfig. */
+ class DocumentOutputConfig implements IDocumentOutputConfig {
+
+ /**
+ * Constructs a new DocumentOutputConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IDocumentOutputConfig);
+
+ /** DocumentOutputConfig gcsOutputConfig. */
+ public gcsOutputConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig|null);
+
+ /** DocumentOutputConfig destination. */
+ public destination?: "gcsOutputConfig";
+
+ /**
+ * Creates a new DocumentOutputConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DocumentOutputConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IDocumentOutputConfig): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+
+ /**
+ * Encodes the specified DocumentOutputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.verify|verify} messages.
+ * @param message DocumentOutputConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IDocumentOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DocumentOutputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.verify|verify} messages.
+ * @param message DocumentOutputConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocumentOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DocumentOutputConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DocumentOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+
+ /**
+ * Decodes a DocumentOutputConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DocumentOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+
+ /**
+ * Verifies a DocumentOutputConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DocumentOutputConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DocumentOutputConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+
+ /**
+ * Creates a plain object from a DocumentOutputConfig message. Also converts values to other types if specified.
+ * @param message DocumentOutputConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DocumentOutputConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DocumentOutputConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace DocumentOutputConfig {
+
+ /** Properties of a GcsOutputConfig. */
+ interface IGcsOutputConfig {
+
+ /** GcsOutputConfig gcsUri */
+ gcsUri?: (string|null);
+
+ /** GcsOutputConfig fieldMask */
+ fieldMask?: (google.protobuf.IFieldMask|null);
+
+ /** GcsOutputConfig shardingConfig */
+ shardingConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig|null);
+ }
+
+ /** Represents a GcsOutputConfig. */
+ class GcsOutputConfig implements IGcsOutputConfig {
+
+ /**
+ * Constructs a new GcsOutputConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig);
+
+ /** GcsOutputConfig gcsUri. */
+ public gcsUri: string;
+
+ /** GcsOutputConfig fieldMask. */
+ public fieldMask?: (google.protobuf.IFieldMask|null);
+
+ /** GcsOutputConfig shardingConfig. */
+ public shardingConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig|null);
+
+ /**
+ * Creates a new GcsOutputConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GcsOutputConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+
+ /**
+ * Encodes the specified GcsOutputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify|verify} messages.
+ * @param message GcsOutputConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GcsOutputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify|verify} messages.
+ * @param message GcsOutputConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GcsOutputConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GcsOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+
+ /**
+ * Decodes a GcsOutputConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GcsOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+
+ /**
+ * Verifies a GcsOutputConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GcsOutputConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GcsOutputConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+
+ /**
+ * Creates a plain object from a GcsOutputConfig message. Also converts values to other types if specified.
+ * @param message GcsOutputConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GcsOutputConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GcsOutputConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace GcsOutputConfig {
+
+ /** Properties of a ShardingConfig. */
+ interface IShardingConfig {
+
+ /** ShardingConfig pagesPerShard */
+ pagesPerShard?: (number|null);
+
+ /** ShardingConfig pagesOverlap */
+ pagesOverlap?: (number|null);
}
- /** Represents an Image. */
- class Image implements IImage {
+ /** Represents a ShardingConfig. */
+ class ShardingConfig implements IShardingConfig {
/**
- * Constructs a new Image.
+ * Constructs a new ShardingConfig.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IImage);
-
- /** Image content. */
- public content: (Uint8Array|string);
-
- /** Image mimeType. */
- public mimeType: string;
+ constructor(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig);
- /** Image width. */
- public width: number;
+ /** ShardingConfig pagesPerShard. */
+ public pagesPerShard: number;
- /** Image height. */
- public height: number;
+ /** ShardingConfig pagesOverlap. */
+ public pagesOverlap: number;
/**
- * Creates a new Image instance using the specified properties.
+ * Creates a new ShardingConfig instance using the specified properties.
* @param [properties] Properties to set
- * @returns Image instance
+ * @returns ShardingConfig instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IImage): google.cloud.documentai.v1beta3.Document.Page.Image;
+ public static create(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
/**
- * Encodes the specified Image message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Image.verify|verify} messages.
- * @param message Image message or plain object to encode
+ * Encodes the specified ShardingConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify|verify} messages.
+ * @param message ShardingConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IImage, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Image.verify|verify} messages.
- * @param message Image message or plain object to encode
+ * Encodes the specified ShardingConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify|verify} messages.
+ * @param message ShardingConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IImage, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes an Image message from the specified reader or buffer.
+ * Decodes a ShardingConfig message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Image
+ * @returns ShardingConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Image;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
/**
- * Decodes an Image message from the specified reader or buffer, length delimited.
+ * Decodes a ShardingConfig message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Image
+ * @returns ShardingConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Image;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
/**
- * Verifies an Image message.
+ * Verifies a ShardingConfig message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates an Image message from a plain object. Also converts values to their respective internal types.
+ * Creates a ShardingConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Image
+ * @returns ShardingConfig
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Image;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
/**
- * Creates a plain object from an Image message. Also converts values to other types if specified.
- * @param message Image
+ * Creates a plain object from a ShardingConfig message. Also converts values to other types if specified.
+ * @param message ShardingConfig
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Image, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Image to JSON.
+ * Converts this ShardingConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Image
+ * Gets the default type url for ShardingConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+ }
+ }
- /** Properties of a Matrix. */
- interface IMatrix {
-
- /** Matrix rows */
- rows?: (number|null);
+ /** Properties of an OcrConfig. */
+ interface IOcrConfig {
- /** Matrix cols */
- cols?: (number|null);
+ /** OcrConfig hints */
+ hints?: (google.cloud.documentai.v1beta3.OcrConfig.IHints|null);
- /** Matrix type */
- type?: (number|null);
+ /** OcrConfig enableNativePdfParsing */
+ enableNativePdfParsing?: (boolean|null);
- /** Matrix data */
- data?: (Uint8Array|string|null);
- }
+ /** OcrConfig enableImageQualityScores */
+ enableImageQualityScores?: (boolean|null);
- /** Represents a Matrix. */
- class Matrix implements IMatrix {
+ /** OcrConfig advancedOcrOptions */
+ advancedOcrOptions?: (string[]|null);
- /**
- * Constructs a new Matrix.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IMatrix);
+ /** OcrConfig enableSymbol */
+ enableSymbol?: (boolean|null);
- /** Matrix rows. */
- public rows: number;
+ /** OcrConfig computeStyleInfo */
+ computeStyleInfo?: (boolean|null);
+ }
- /** Matrix cols. */
- public cols: number;
+ /** Represents an OcrConfig. */
+ class OcrConfig implements IOcrConfig {
- /** Matrix type. */
- public type: number;
+ /**
+ * Constructs a new OcrConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IOcrConfig);
- /** Matrix data. */
- public data: (Uint8Array|string);
+ /** OcrConfig hints. */
+ public hints?: (google.cloud.documentai.v1beta3.OcrConfig.IHints|null);
- /**
- * Creates a new Matrix instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Matrix instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IMatrix): google.cloud.documentai.v1beta3.Document.Page.Matrix;
+ /** OcrConfig enableNativePdfParsing. */
+ public enableNativePdfParsing: boolean;
- /**
- * Encodes the specified Matrix message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Matrix.verify|verify} messages.
- * @param message Matrix message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IMatrix, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** OcrConfig enableImageQualityScores. */
+ public enableImageQualityScores: boolean;
- /**
- * Encodes the specified Matrix message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Matrix.verify|verify} messages.
- * @param message Matrix message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IMatrix, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** OcrConfig advancedOcrOptions. */
+ public advancedOcrOptions: string[];
- /**
- * Decodes a Matrix message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Matrix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Matrix;
+ /** OcrConfig enableSymbol. */
+ public enableSymbol: boolean;
- /**
- * Decodes a Matrix message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Matrix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Matrix;
+ /** OcrConfig computeStyleInfo. */
+ public computeStyleInfo: boolean;
- /**
- * Verifies a Matrix message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Creates a new OcrConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns OcrConfig instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IOcrConfig): google.cloud.documentai.v1beta3.OcrConfig;
- /**
- * Creates a Matrix message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Matrix
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Matrix;
+ /**
+ * Encodes the specified OcrConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.verify|verify} messages.
+ * @param message OcrConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IOcrConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a plain object from a Matrix message. Also converts values to other types if specified.
- * @param message Matrix
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Matrix, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Encodes the specified OcrConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.verify|verify} messages.
+ * @param message OcrConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IOcrConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Converts this Matrix to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Decodes an OcrConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns OcrConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.OcrConfig;
- /**
- * Gets the default type url for Matrix
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Decodes an OcrConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns OcrConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.OcrConfig;
- /** Properties of a Layout. */
- interface ILayout {
+ /**
+ * Verifies an OcrConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Layout textAnchor */
- textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+ /**
+ * Creates an OcrConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns OcrConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.OcrConfig;
- /** Layout confidence */
- confidence?: (number|null);
+ /**
+ * Creates a plain object from an OcrConfig message. Also converts values to other types if specified.
+ * @param message OcrConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.OcrConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** Layout boundingPoly */
- boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
+ /**
+ * Converts this OcrConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Layout orientation */
- orientation?: (google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|null);
- }
+ /**
+ * Gets the default type url for OcrConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** Represents a Layout. */
- class Layout implements ILayout {
+ namespace OcrConfig {
- /**
- * Constructs a new Layout.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ILayout);
+ /** Properties of a Hints. */
+ interface IHints {
- /** Layout textAnchor. */
- public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+ /** Hints languageHints */
+ languageHints?: (string[]|null);
+ }
- /** Layout confidence. */
- public confidence: number;
+ /** Represents a Hints. */
+ class Hints implements IHints {
- /** Layout boundingPoly. */
- public boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
+ /**
+ * Constructs a new Hints.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.OcrConfig.IHints);
- /** Layout orientation. */
- public orientation: (google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation);
+ /** Hints languageHints. */
+ public languageHints: string[];
- /**
- * Creates a new Layout instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Layout instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ILayout): google.cloud.documentai.v1beta3.Document.Page.Layout;
+ /**
+ * Creates a new Hints instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Hints instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.OcrConfig.IHints): google.cloud.documentai.v1beta3.OcrConfig.Hints;
- /**
- * Encodes the specified Layout message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Layout.verify|verify} messages.
- * @param message Layout message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ILayout, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified Hints message. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.Hints.verify|verify} messages.
+ * @param message Hints message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.OcrConfig.IHints, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Layout.verify|verify} messages.
- * @param message Layout message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ILayout, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified Hints message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.Hints.verify|verify} messages.
+ * @param message Hints message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.OcrConfig.IHints, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Layout message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Layout
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Layout;
+ /**
+ * Decodes a Hints message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Hints
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.OcrConfig.Hints;
- /**
- * Decodes a Layout message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Layout
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Layout;
+ /**
+ * Decodes a Hints message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Hints
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.OcrConfig.Hints;
- /**
- * Verifies a Layout message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Verifies a Hints message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a Layout message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Layout
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Layout;
+ /**
+ * Creates a Hints message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Hints
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.OcrConfig.Hints;
- /**
- * Creates a plain object from a Layout message. Also converts values to other types if specified.
- * @param message Layout
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Layout, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Creates a plain object from a Hints message. Also converts values to other types if specified.
+ * @param message Hints
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.OcrConfig.Hints, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Converts this Layout to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Converts this Hints to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Gets the default type url for Layout
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Gets the default type url for Hints
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
- namespace Layout {
+ /** Properties of a PropertyMetadata. */
+ interface IPropertyMetadata {
- /** Orientation enum. */
- enum Orientation {
- ORIENTATION_UNSPECIFIED = 0,
- PAGE_UP = 1,
- PAGE_RIGHT = 2,
- PAGE_DOWN = 3,
- PAGE_LEFT = 4
- }
- }
+ /** PropertyMetadata inactive */
+ inactive?: (boolean|null);
+ }
- /** Properties of a Block. */
- interface IBlock {
+ /** Represents a PropertyMetadata. */
+ class PropertyMetadata implements IPropertyMetadata {
- /** Block layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Constructs a new PropertyMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IPropertyMetadata);
- /** Block detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /** PropertyMetadata inactive. */
+ public inactive: boolean;
- /** Block provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- }
+ /**
+ * Creates a new PropertyMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PropertyMetadata instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IPropertyMetadata): google.cloud.documentai.v1beta3.PropertyMetadata;
- /** Represents a Block. */
- class Block implements IBlock {
+ /**
+ * Encodes the specified PropertyMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.PropertyMetadata.verify|verify} messages.
+ * @param message PropertyMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IPropertyMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Constructs a new Block.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IBlock);
+ /**
+ * Encodes the specified PropertyMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.PropertyMetadata.verify|verify} messages.
+ * @param message PropertyMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IPropertyMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Block layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Decodes a PropertyMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PropertyMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.PropertyMetadata;
- /** Block detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /**
+ * Decodes a PropertyMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PropertyMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.PropertyMetadata;
- /** Block provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /**
+ * Verifies a PropertyMetadata message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a new Block instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Block instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IBlock): google.cloud.documentai.v1beta3.Document.Page.Block;
+ /**
+ * Creates a PropertyMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PropertyMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.PropertyMetadata;
- /**
- * Encodes the specified Block message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Block.verify|verify} messages.
- * @param message Block message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IBlock, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a plain object from a PropertyMetadata message. Also converts values to other types if specified.
+ * @param message PropertyMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.PropertyMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Block.verify|verify} messages.
- * @param message Block message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IBlock, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Converts this PropertyMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Decodes a Block message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Block
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Block;
+ /**
+ * Gets the default type url for PropertyMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Decodes a Block message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Block
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Block;
+ /** Properties of an EntityTypeMetadata. */
+ interface IEntityTypeMetadata {
- /**
- * Verifies a Block message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** EntityTypeMetadata inactive */
+ inactive?: (boolean|null);
+ }
- /**
- * Creates a Block message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Block
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Block;
+ /** Represents an EntityTypeMetadata. */
+ class EntityTypeMetadata implements IEntityTypeMetadata {
- /**
- * Creates a plain object from a Block message. Also converts values to other types if specified.
- * @param message Block
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Block, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Constructs a new EntityTypeMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IEntityTypeMetadata);
- /**
- * Converts this Block to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** EntityTypeMetadata inactive. */
+ public inactive: boolean;
- /**
- * Gets the default type url for Block
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Creates a new EntityTypeMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EntityTypeMetadata instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IEntityTypeMetadata): google.cloud.documentai.v1beta3.EntityTypeMetadata;
- /** Properties of a Paragraph. */
- interface IParagraph {
+ /**
+ * Encodes the specified EntityTypeMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.EntityTypeMetadata.verify|verify} messages.
+ * @param message EntityTypeMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IEntityTypeMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Paragraph layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Encodes the specified EntityTypeMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.EntityTypeMetadata.verify|verify} messages.
+ * @param message EntityTypeMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IEntityTypeMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Paragraph detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /**
+ * Decodes an EntityTypeMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EntityTypeMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.EntityTypeMetadata;
- /** Paragraph provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /**
+ * Decodes an EntityTypeMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EntityTypeMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.EntityTypeMetadata;
+
+ /**
+ * Verifies an EntityTypeMetadata message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EntityTypeMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EntityTypeMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.EntityTypeMetadata;
+
+ /**
+ * Creates a plain object from an EntityTypeMetadata message. Also converts values to other types if specified.
+ * @param message EntityTypeMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.EntityTypeMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EntityTypeMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EntityTypeMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DocumentSchema. */
+ interface IDocumentSchema {
+
+ /** DocumentSchema displayName */
+ displayName?: (string|null);
+
+ /** DocumentSchema description */
+ description?: (string|null);
+
+ /** DocumentSchema entityTypes */
+ entityTypes?: (google.cloud.documentai.v1beta3.DocumentSchema.IEntityType[]|null);
+
+ /** DocumentSchema metadata */
+ metadata?: (google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null);
+ }
+
+ /** Represents a DocumentSchema. */
+ class DocumentSchema implements IDocumentSchema {
+
+ /**
+ * Constructs a new DocumentSchema.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IDocumentSchema);
+
+ /** DocumentSchema displayName. */
+ public displayName: string;
+
+ /** DocumentSchema description. */
+ public description: string;
+
+ /** DocumentSchema entityTypes. */
+ public entityTypes: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType[];
+
+ /** DocumentSchema metadata. */
+ public metadata?: (google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null);
+
+ /**
+ * Creates a new DocumentSchema instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DocumentSchema instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IDocumentSchema): google.cloud.documentai.v1beta3.DocumentSchema;
+
+ /**
+ * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.verify|verify} messages.
+ * @param message DocumentSchema message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.verify|verify} messages.
+ * @param message DocumentSchema message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DocumentSchema message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DocumentSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema;
+
+ /**
+ * Decodes a DocumentSchema message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DocumentSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema;
+
+ /**
+ * Verifies a DocumentSchema message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DocumentSchema message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DocumentSchema
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema;
+
+ /**
+ * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified.
+ * @param message DocumentSchema
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DocumentSchema to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DocumentSchema
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace DocumentSchema {
+
+ /** Properties of an EntityType. */
+ interface IEntityType {
+
+ /** EntityType enumValues */
+ enumValues?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null);
+
+ /** EntityType displayName */
+ displayName?: (string|null);
+
+ /** EntityType name */
+ name?: (string|null);
+
+ /** EntityType baseTypes */
+ baseTypes?: (string[]|null);
+
+ /** EntityType properties */
+ properties?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty[]|null);
+
+ /** EntityType entityTypeMetadata */
+ entityTypeMetadata?: (google.cloud.documentai.v1beta3.IEntityTypeMetadata|null);
+ }
+
+ /** Represents an EntityType. */
+ class EntityType implements IEntityType {
+
+ /**
+ * Constructs a new EntityType.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType);
+
+ /** EntityType enumValues. */
+ public enumValues?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null);
+
+ /** EntityType displayName. */
+ public displayName: string;
+
+ /** EntityType name. */
+ public name: string;
+
+ /** EntityType baseTypes. */
+ public baseTypes: string[];
+
+ /** EntityType properties. */
+ public properties: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty[];
+
+ /** EntityType entityTypeMetadata. */
+ public entityTypeMetadata?: (google.cloud.documentai.v1beta3.IEntityTypeMetadata|null);
+
+ /** EntityType valueSource. */
+ public valueSource?: "enumValues";
+
+ /**
+ * Creates a new EntityType instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EntityType instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
+
+ /**
+ * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify|verify} messages.
+ * @param message EntityType message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify|verify} messages.
+ * @param message EntityType message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EntityType message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EntityType
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
+
+ /**
+ * Decodes an EntityType message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EntityType
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
+
+ /**
+ * Verifies an EntityType message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EntityType message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EntityType
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
+
+ /**
+ * Creates a plain object from an EntityType message. Also converts values to other types if specified.
+ * @param message EntityType
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EntityType to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EntityType
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace EntityType {
+
+ /** Properties of an EnumValues. */
+ interface IEnumValues {
+
+ /** EnumValues values */
+ values?: (string[]|null);
}
- /** Represents a Paragraph. */
- class Paragraph implements IParagraph {
+ /** Represents an EnumValues. */
+ class EnumValues implements IEnumValues {
/**
- * Constructs a new Paragraph.
+ * Constructs a new EnumValues.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IParagraph);
-
- /** Paragraph layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
-
- /** Paragraph detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues);
- /** Paragraph provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** EnumValues values. */
+ public values: string[];
/**
- * Creates a new Paragraph instance using the specified properties.
+ * Creates a new EnumValues instance using the specified properties.
* @param [properties] Properties to set
- * @returns Paragraph instance
+ * @returns EnumValues instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IParagraph): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
+ public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
/**
- * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify|verify} messages.
- * @param message Paragraph message or plain object to encode
+ * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify|verify} messages.
+ * @param message EnumValues message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IParagraph, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify|verify} messages.
- * @param message Paragraph message or plain object to encode
+ * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify|verify} messages.
+ * @param message EnumValues message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IParagraph, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Paragraph message from the specified reader or buffer.
+ * Decodes an EnumValues message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Paragraph
+ * @returns EnumValues
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
/**
- * Decodes a Paragraph message from the specified reader or buffer, length delimited.
+ * Decodes an EnumValues message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Paragraph
+ * @returns EnumValues
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
/**
- * Verifies a Paragraph message.
+ * Verifies an EnumValues message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
+ * Creates an EnumValues message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Paragraph
+ * @returns EnumValues
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
/**
- * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
- * @param message Paragraph
+ * Creates a plain object from an EnumValues message. Also converts values to other types if specified.
+ * @param message EnumValues
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Paragraph, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Paragraph to JSON.
+ * Converts this EnumValues to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Paragraph
+ * Gets the default type url for EnumValues
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a Line. */
- interface ILine {
+ /** Properties of a Property. */
+ interface IProperty {
- /** Line layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Property name */
+ name?: (string|null);
- /** Line detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /** Property valueType */
+ valueType?: (string|null);
- /** Line provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** Property occurrenceType */
+ occurrenceType?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|null);
+
+ /** Property propertyMetadata */
+ propertyMetadata?: (google.cloud.documentai.v1beta3.IPropertyMetadata|null);
}
- /** Represents a Line. */
- class Line implements ILine {
+ /** Represents a Property. */
+ class Property implements IProperty {
/**
- * Constructs a new Line.
+ * Constructs a new Property.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ILine);
+ constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty);
- /** Line layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Property name. */
+ public name: string;
- /** Line detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** Property valueType. */
+ public valueType: string;
- /** Line provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** Property occurrenceType. */
+ public occurrenceType: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType);
+
+ /** Property propertyMetadata. */
+ public propertyMetadata?: (google.cloud.documentai.v1beta3.IPropertyMetadata|null);
/**
- * Creates a new Line instance using the specified properties.
+ * Creates a new Property instance using the specified properties.
* @param [properties] Properties to set
- * @returns Line instance
+ * @returns Property instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ILine): google.cloud.documentai.v1beta3.Document.Page.Line;
+ public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
/**
- * Encodes the specified Line message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Line.verify|verify} messages.
- * @param message Line message or plain object to encode
+ * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify|verify} messages.
+ * @param message Property message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ILine, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Line.verify|verify} messages.
- * @param message Line message or plain object to encode
+ * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify|verify} messages.
+ * @param message Property message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ILine, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Line message from the specified reader or buffer.
+ * Decodes a Property message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Line
+ * @returns Property
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Line;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
/**
- * Decodes a Line message from the specified reader or buffer, length delimited.
+ * Decodes a Property message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Line
+ * @returns Property
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Line;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
/**
- * Verifies a Line message.
+ * Verifies a Property message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Line message from a plain object. Also converts values to their respective internal types.
+ * Creates a Property message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Line
+ * @returns Property
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Line;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
/**
- * Creates a plain object from a Line message. Also converts values to other types if specified.
- * @param message Line
+ * Creates a plain object from a Property message. Also converts values to other types if specified.
+ * @param message Property
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Line, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Line to JSON.
+ * Converts this Property to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Line
+ * Gets the default type url for Property
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a Token. */
- interface IToken {
+ namespace Property {
- /** Token layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** OccurrenceType enum. */
+ enum OccurrenceType {
+ OCCURRENCE_TYPE_UNSPECIFIED = 0,
+ OPTIONAL_ONCE = 1,
+ OPTIONAL_MULTIPLE = 2,
+ REQUIRED_ONCE = 3,
+ REQUIRED_MULTIPLE = 4
+ }
+ }
+ }
- /** Token detectedBreak */
- detectedBreak?: (google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak|null);
+ /** Properties of a Metadata. */
+ interface IMetadata {
- /** Token detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /** Metadata documentSplitter */
+ documentSplitter?: (boolean|null);
- /** Token provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- }
+ /** Metadata documentAllowMultipleLabels */
+ documentAllowMultipleLabels?: (boolean|null);
- /** Represents a Token. */
- class Token implements IToken {
+ /** Metadata prefixedNamingOnProperties */
+ prefixedNamingOnProperties?: (boolean|null);
- /**
- * Constructs a new Token.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IToken);
+ /** Metadata skipNamingValidation */
+ skipNamingValidation?: (boolean|null);
+ }
- /** Token layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Represents a Metadata. */
+ class Metadata implements IMetadata {
- /** Token detectedBreak. */
- public detectedBreak?: (google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak|null);
+ /**
+ * Constructs a new Metadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata);
- /** Token detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** Metadata documentSplitter. */
+ public documentSplitter: boolean;
- /** Token provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** Metadata documentAllowMultipleLabels. */
+ public documentAllowMultipleLabels: boolean;
- /**
- * Creates a new Token instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Token instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IToken): google.cloud.documentai.v1beta3.Document.Page.Token;
+ /** Metadata prefixedNamingOnProperties. */
+ public prefixedNamingOnProperties: boolean;
- /**
- * Encodes the specified Token message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.verify|verify} messages.
- * @param message Token message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Metadata skipNamingValidation. */
+ public skipNamingValidation: boolean;
- /**
- * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.verify|verify} messages.
- * @param message Token message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a new Metadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Metadata instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
- /**
- * Decodes a Token message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Token
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Token;
+ /**
+ * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify|verify} messages.
+ * @param message Metadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Token message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Token
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Token;
+ /**
+ * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify|verify} messages.
+ * @param message Metadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Verifies a Token message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Decodes a Metadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Metadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
- /**
- * Creates a Token message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Token
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Token;
+ /**
+ * Decodes a Metadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Metadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
- /**
- * Creates a plain object from a Token message. Also converts values to other types if specified.
- * @param message Token
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Token, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Verifies a Metadata message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Converts this Token to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a Metadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Metadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
- /**
- * Gets the default type url for Token
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Creates a plain object from a Metadata message. Also converts values to other types if specified.
+ * @param message Metadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
- namespace Token {
+ /**
+ * Converts this Metadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Properties of a DetectedBreak. */
- interface IDetectedBreak {
+ /**
+ * Gets the default type url for Metadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
- /** DetectedBreak type */
- type?: (google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|null);
- }
+ /** Properties of a Document. */
+ interface IDocument {
- /** Represents a DetectedBreak. */
- class DetectedBreak implements IDetectedBreak {
+ /** Document uri */
+ uri?: (string|null);
- /**
- * Constructs a new DetectedBreak.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak);
+ /** Document content */
+ content?: (Uint8Array|string|null);
- /** DetectedBreak type. */
- public type: (google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type);
+ /** Document mimeType */
+ mimeType?: (string|null);
- /**
- * Creates a new DetectedBreak instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DetectedBreak instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
+ /** Document text */
+ text?: (string|null);
- /**
- * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify|verify} messages.
- * @param message DetectedBreak message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Document textStyles */
+ textStyles?: (google.cloud.documentai.v1beta3.Document.IStyle[]|null);
- /**
- * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify|verify} messages.
- * @param message DetectedBreak message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Document pages */
+ pages?: (google.cloud.documentai.v1beta3.Document.IPage[]|null);
- /**
- * Decodes a DetectedBreak message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DetectedBreak
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
+ /** Document entities */
+ entities?: (google.cloud.documentai.v1beta3.Document.IEntity[]|null);
- /**
- * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DetectedBreak
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
+ /** Document entityRelations */
+ entityRelations?: (google.cloud.documentai.v1beta3.Document.IEntityRelation[]|null);
- /**
- * Verifies a DetectedBreak message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Document textChanges */
+ textChanges?: (google.cloud.documentai.v1beta3.Document.ITextChange[]|null);
- /**
- * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DetectedBreak
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
+ /** Document shardInfo */
+ shardInfo?: (google.cloud.documentai.v1beta3.Document.IShardInfo|null);
- /**
- * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
- * @param message DetectedBreak
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Document error */
+ error?: (google.rpc.IStatus|null);
- /**
- * Converts this DetectedBreak to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** Document revisions */
+ revisions?: (google.cloud.documentai.v1beta3.Document.IRevision[]|null);
+ }
- /**
- * Gets the default type url for DetectedBreak
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** Represents a Document. */
+ class Document implements IDocument {
- namespace DetectedBreak {
+ /**
+ * Constructs a new Document.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IDocument);
- /** Type enum. */
- enum Type {
- TYPE_UNSPECIFIED = 0,
- SPACE = 1,
- WIDE_SPACE = 2,
- HYPHEN = 3
- }
- }
- }
+ /** Document uri. */
+ public uri?: (string|null);
- /** Properties of a Symbol. */
- interface ISymbol {
+ /** Document content. */
+ public content?: (Uint8Array|string|null);
- /** Symbol layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Document mimeType. */
+ public mimeType: string;
- /** Symbol detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- }
+ /** Document text. */
+ public text: string;
- /** Represents a Symbol. */
- class Symbol implements ISymbol {
+ /** Document textStyles. */
+ public textStyles: google.cloud.documentai.v1beta3.Document.IStyle[];
- /**
- * Constructs a new Symbol.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ISymbol);
+ /** Document pages. */
+ public pages: google.cloud.documentai.v1beta3.Document.IPage[];
- /** Symbol layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Document entities. */
+ public entities: google.cloud.documentai.v1beta3.Document.IEntity[];
- /** Symbol detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** Document entityRelations. */
+ public entityRelations: google.cloud.documentai.v1beta3.Document.IEntityRelation[];
- /**
- * Creates a new Symbol instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Symbol instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ISymbol): google.cloud.documentai.v1beta3.Document.Page.Symbol;
+ /** Document textChanges. */
+ public textChanges: google.cloud.documentai.v1beta3.Document.ITextChange[];
- /**
- * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Symbol.verify|verify} messages.
- * @param message Symbol message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ISymbol, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Document shardInfo. */
+ public shardInfo?: (google.cloud.documentai.v1beta3.Document.IShardInfo|null);
- /**
- * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Symbol.verify|verify} messages.
- * @param message Symbol message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ISymbol, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Document error. */
+ public error?: (google.rpc.IStatus|null);
- /**
- * Decodes a Symbol message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Symbol
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Symbol;
+ /** Document revisions. */
+ public revisions: google.cloud.documentai.v1beta3.Document.IRevision[];
- /**
- * Decodes a Symbol message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Symbol
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Symbol;
+ /** Document source. */
+ public source?: ("uri"|"content");
- /**
- * Verifies a Symbol message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Creates a new Document instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Document instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IDocument): google.cloud.documentai.v1beta3.Document;
- /**
- * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Symbol
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Symbol;
+ /**
+ * Encodes the specified Document message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.verify|verify} messages.
+ * @param message Document message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IDocument, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a plain object from a Symbol message. Also converts values to other types if specified.
- * @param message Symbol
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Symbol, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.verify|verify} messages.
+ * @param message Document message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocument, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Converts this Symbol to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Decodes a Document message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Document
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document;
- /**
- * Gets the default type url for Symbol
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Decodes a Document message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Document
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document;
- /** Properties of a VisualElement. */
- interface IVisualElement {
+ /**
+ * Verifies a Document message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** VisualElement layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Creates a Document message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Document
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document;
- /** VisualElement type */
- type?: (string|null);
+ /**
+ * Creates a plain object from a Document message. Also converts values to other types if specified.
+ * @param message Document
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** VisualElement detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- }
+ /**
+ * Converts this Document to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Represents a VisualElement. */
- class VisualElement implements IVisualElement {
+ /**
+ * Gets the default type url for Document
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Constructs a new VisualElement.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IVisualElement);
+ namespace Document {
- /** VisualElement layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Properties of a ShardInfo. */
+ interface IShardInfo {
- /** VisualElement type. */
- public type: string;
+ /** ShardInfo shardIndex */
+ shardIndex?: (number|Long|string|null);
- /** VisualElement detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** ShardInfo shardCount */
+ shardCount?: (number|Long|string|null);
- /**
- * Creates a new VisualElement instance using the specified properties.
- * @param [properties] Properties to set
- * @returns VisualElement instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IVisualElement): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
+ /** ShardInfo textOffset */
+ textOffset?: (number|Long|string|null);
+ }
- /**
- * Encodes the specified VisualElement message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify|verify} messages.
- * @param message VisualElement message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IVisualElement, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Represents a ShardInfo. */
+ class ShardInfo implements IShardInfo {
- /**
- * Encodes the specified VisualElement message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify|verify} messages.
- * @param message VisualElement message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IVisualElement, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Constructs a new ShardInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IShardInfo);
- /**
- * Decodes a VisualElement message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns VisualElement
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
+ /** ShardInfo shardIndex. */
+ public shardIndex: (number|Long|string);
- /**
- * Decodes a VisualElement message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns VisualElement
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
+ /** ShardInfo shardCount. */
+ public shardCount: (number|Long|string);
- /**
- * Verifies a VisualElement message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** ShardInfo textOffset. */
+ public textOffset: (number|Long|string);
- /**
- * Creates a VisualElement message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns VisualElement
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
+ /**
+ * Creates a new ShardInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ShardInfo instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IShardInfo): google.cloud.documentai.v1beta3.Document.ShardInfo;
- /**
- * Creates a plain object from a VisualElement message. Also converts values to other types if specified.
- * @param message VisualElement
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.VisualElement, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Encodes the specified ShardInfo message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.ShardInfo.verify|verify} messages.
+ * @param message ShardInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IShardInfo, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Converts this VisualElement to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Encodes the specified ShardInfo message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.ShardInfo.verify|verify} messages.
+ * @param message ShardInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IShardInfo, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Gets the default type url for VisualElement
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Decodes a ShardInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ShardInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.ShardInfo;
- /** Properties of a Table. */
- interface ITable {
+ /**
+ * Decodes a ShardInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ShardInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.ShardInfo;
- /** Table layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Verifies a ShardInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Table headerRows */
- headerRows?: (google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[]|null);
+ /**
+ * Creates a ShardInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ShardInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.ShardInfo;
- /** Table bodyRows */
- bodyRows?: (google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[]|null);
+ /**
+ * Creates a plain object from a ShardInfo message. Also converts values to other types if specified.
+ * @param message ShardInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.ShardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** Table detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /**
+ * Converts this ShardInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Table provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /**
+ * Gets the default type url for ShardInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Style. */
+ interface IStyle {
+
+ /** Style textAnchor */
+ textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+
+ /** Style color */
+ color?: (google.type.IColor|null);
+
+ /** Style backgroundColor */
+ backgroundColor?: (google.type.IColor|null);
+
+ /** Style fontWeight */
+ fontWeight?: (string|null);
+
+ /** Style textStyle */
+ textStyle?: (string|null);
+
+ /** Style textDecoration */
+ textDecoration?: (string|null);
+
+ /** Style fontSize */
+ fontSize?: (google.cloud.documentai.v1beta3.Document.Style.IFontSize|null);
+
+ /** Style fontFamily */
+ fontFamily?: (string|null);
+ }
+
+ /** Represents a Style. */
+ class Style implements IStyle {
+
+ /**
+ * Constructs a new Style.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IStyle);
+
+ /** Style textAnchor. */
+ public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+
+ /** Style color. */
+ public color?: (google.type.IColor|null);
+
+ /** Style backgroundColor. */
+ public backgroundColor?: (google.type.IColor|null);
+
+ /** Style fontWeight. */
+ public fontWeight: string;
+
+ /** Style textStyle. */
+ public textStyle: string;
+
+ /** Style textDecoration. */
+ public textDecoration: string;
+
+ /** Style fontSize. */
+ public fontSize?: (google.cloud.documentai.v1beta3.Document.Style.IFontSize|null);
+
+ /** Style fontFamily. */
+ public fontFamily: string;
+
+ /**
+ * Creates a new Style instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Style instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IStyle): google.cloud.documentai.v1beta3.Document.Style;
+
+ /**
+ * Encodes the specified Style message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.verify|verify} messages.
+ * @param message Style message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IStyle, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Style message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.verify|verify} messages.
+ * @param message Style message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IStyle, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Style message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Style
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Style;
+
+ /**
+ * Decodes a Style message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Style
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Style;
+
+ /**
+ * Verifies a Style message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Style message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Style
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Style;
+
+ /**
+ * Creates a plain object from a Style message. Also converts values to other types if specified.
+ * @param message Style
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Style, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Style to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Style
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Style {
+
+ /** Properties of a FontSize. */
+ interface IFontSize {
+
+ /** FontSize size */
+ size?: (number|null);
+
+ /** FontSize unit */
+ unit?: (string|null);
}
- /** Represents a Table. */
- class Table implements ITable {
+ /** Represents a FontSize. */
+ class FontSize implements IFontSize {
/**
- * Constructs a new Table.
+ * Constructs a new FontSize.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ITable);
-
- /** Table layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
-
- /** Table headerRows. */
- public headerRows: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[];
-
- /** Table bodyRows. */
- public bodyRows: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[];
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Style.IFontSize);
- /** Table detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** FontSize size. */
+ public size: number;
- /** Table provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** FontSize unit. */
+ public unit: string;
/**
- * Creates a new Table instance using the specified properties.
+ * Creates a new FontSize instance using the specified properties.
* @param [properties] Properties to set
- * @returns Table instance
+ * @returns FontSize instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ITable): google.cloud.documentai.v1beta3.Document.Page.Table;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Style.IFontSize): google.cloud.documentai.v1beta3.Document.Style.FontSize;
/**
- * Encodes the specified Table message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.verify|verify} messages.
- * @param message Table message or plain object to encode
+ * Encodes the specified FontSize message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.FontSize.verify|verify} messages.
+ * @param message FontSize message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ITable, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Style.IFontSize, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Table message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.verify|verify} messages.
- * @param message Table message or plain object to encode
+ * Encodes the specified FontSize message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.FontSize.verify|verify} messages.
+ * @param message FontSize message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ITable, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Style.IFontSize, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Table message from the specified reader or buffer.
+ * Decodes a FontSize message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Table
+ * @returns FontSize
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Table;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Style.FontSize;
/**
- * Decodes a Table message from the specified reader or buffer, length delimited.
+ * Decodes a FontSize message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Table
+ * @returns FontSize
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Table;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Style.FontSize;
/**
- * Verifies a Table message.
+ * Verifies a FontSize message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Table message from a plain object. Also converts values to their respective internal types.
+ * Creates a FontSize message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Table
+ * @returns FontSize
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Table;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Style.FontSize;
/**
- * Creates a plain object from a Table message. Also converts values to other types if specified.
- * @param message Table
+ * Creates a plain object from a FontSize message. Also converts values to other types if specified.
+ * @param message FontSize
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Table, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Style.FontSize, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Table to JSON.
+ * Converts this FontSize to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Table
+ * Gets the default type url for FontSize
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+ }
- namespace Table {
+ /** Properties of a Page. */
+ interface IPage {
- /** Properties of a TableRow. */
- interface ITableRow {
+ /** Page pageNumber */
+ pageNumber?: (number|null);
- /** TableRow cells */
- cells?: (google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell[]|null);
- }
+ /** Page image */
+ image?: (google.cloud.documentai.v1beta3.Document.Page.IImage|null);
- /** Represents a TableRow. */
- class TableRow implements ITableRow {
+ /** Page transforms */
+ transforms?: (google.cloud.documentai.v1beta3.Document.Page.IMatrix[]|null);
- /**
- * Constructs a new TableRow.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow);
+ /** Page dimension */
+ dimension?: (google.cloud.documentai.v1beta3.Document.Page.IDimension|null);
- /** TableRow cells. */
- public cells: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell[];
+ /** Page layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Creates a new TableRow instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TableRow instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
+ /** Page detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /**
- * Encodes the specified TableRow message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify|verify} messages.
- * @param message TableRow message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Page blocks */
+ blocks?: (google.cloud.documentai.v1beta3.Document.Page.IBlock[]|null);
- /**
- * Encodes the specified TableRow message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify|verify} messages.
- * @param message TableRow message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Page paragraphs */
+ paragraphs?: (google.cloud.documentai.v1beta3.Document.Page.IParagraph[]|null);
- /**
- * Decodes a TableRow message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TableRow
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
+ /** Page lines */
+ lines?: (google.cloud.documentai.v1beta3.Document.Page.ILine[]|null);
- /**
- * Decodes a TableRow message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TableRow
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
+ /** Page tokens */
+ tokens?: (google.cloud.documentai.v1beta3.Document.Page.IToken[]|null);
- /**
- * Verifies a TableRow message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Page visualElements */
+ visualElements?: (google.cloud.documentai.v1beta3.Document.Page.IVisualElement[]|null);
- /**
- * Creates a TableRow message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TableRow
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
+ /** Page tables */
+ tables?: (google.cloud.documentai.v1beta3.Document.Page.ITable[]|null);
- /**
- * Creates a plain object from a TableRow message. Also converts values to other types if specified.
- * @param message TableRow
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Table.TableRow, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Page formFields */
+ formFields?: (google.cloud.documentai.v1beta3.Document.Page.IFormField[]|null);
- /**
- * Converts this TableRow to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** Page symbols */
+ symbols?: (google.cloud.documentai.v1beta3.Document.Page.ISymbol[]|null);
- /**
- * Gets the default type url for TableRow
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** Page detectedBarcodes */
+ detectedBarcodes?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode[]|null);
- /** Properties of a TableCell. */
- interface ITableCell {
+ /** Page imageQualityScores */
+ imageQualityScores?: (google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores|null);
- /** TableCell layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Page provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ }
- /** TableCell rowSpan */
- rowSpan?: (number|null);
+ /** Represents a Page. */
+ class Page implements IPage {
- /** TableCell colSpan */
- colSpan?: (number|null);
+ /**
+ * Constructs a new Page.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IPage);
- /** TableCell detectedLanguages */
- detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- }
+ /** Page pageNumber. */
+ public pageNumber: number;
- /** Represents a TableCell. */
- class TableCell implements ITableCell {
+ /** Page image. */
+ public image?: (google.cloud.documentai.v1beta3.Document.Page.IImage|null);
- /**
- * Constructs a new TableCell.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell);
+ /** Page transforms. */
+ public transforms: google.cloud.documentai.v1beta3.Document.Page.IMatrix[];
- /** TableCell layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Page dimension. */
+ public dimension?: (google.cloud.documentai.v1beta3.Document.Page.IDimension|null);
- /** TableCell rowSpan. */
- public rowSpan: number;
+ /** Page layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** TableCell colSpan. */
- public colSpan: number;
+ /** Page detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /** TableCell detectedLanguages. */
- public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** Page blocks. */
+ public blocks: google.cloud.documentai.v1beta3.Document.Page.IBlock[];
- /**
- * Creates a new TableCell instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TableCell instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
+ /** Page paragraphs. */
+ public paragraphs: google.cloud.documentai.v1beta3.Document.Page.IParagraph[];
- /**
- * Encodes the specified TableCell message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify|verify} messages.
- * @param message TableCell message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Page lines. */
+ public lines: google.cloud.documentai.v1beta3.Document.Page.ILine[];
- /**
- * Encodes the specified TableCell message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify|verify} messages.
- * @param message TableCell message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Page tokens. */
+ public tokens: google.cloud.documentai.v1beta3.Document.Page.IToken[];
- /**
- * Decodes a TableCell message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TableCell
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
+ /** Page visualElements. */
+ public visualElements: google.cloud.documentai.v1beta3.Document.Page.IVisualElement[];
- /**
- * Decodes a TableCell message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TableCell
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
+ /** Page tables. */
+ public tables: google.cloud.documentai.v1beta3.Document.Page.ITable[];
- /**
- * Verifies a TableCell message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Page formFields. */
+ public formFields: google.cloud.documentai.v1beta3.Document.Page.IFormField[];
- /**
- * Creates a TableCell message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TableCell
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
+ /** Page symbols. */
+ public symbols: google.cloud.documentai.v1beta3.Document.Page.ISymbol[];
- /**
- * Creates a plain object from a TableCell message. Also converts values to other types if specified.
- * @param message TableCell
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Table.TableCell, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Page detectedBarcodes. */
+ public detectedBarcodes: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode[];
- /**
- * Converts this TableCell to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** Page imageQualityScores. */
+ public imageQualityScores?: (google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores|null);
- /**
- * Gets the default type url for TableCell
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
+ /** Page provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- /** Properties of a FormField. */
- interface IFormField {
+ /**
+ * Creates a new Page instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Page instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IPage): google.cloud.documentai.v1beta3.Document.Page;
- /** FormField fieldName */
- fieldName?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Encodes the specified Page message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.verify|verify} messages.
+ * @param message Page message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IPage, writer?: $protobuf.Writer): $protobuf.Writer;
- /** FormField fieldValue */
- fieldValue?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /**
+ * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.verify|verify} messages.
+ * @param message Page message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IPage, writer?: $protobuf.Writer): $protobuf.Writer;
- /** FormField nameDetectedLanguages */
- nameDetectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /**
+ * Decodes a Page message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Page
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page;
- /** FormField valueDetectedLanguages */
- valueDetectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ /**
+ * Decodes a Page message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Page
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page;
- /** FormField valueType */
- valueType?: (string|null);
+ /**
+ * Verifies a Page message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** FormField correctedKeyText */
- correctedKeyText?: (string|null);
+ /**
+ * Creates a Page message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Page
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page;
- /** FormField correctedValueText */
- correctedValueText?: (string|null);
+ /**
+ * Creates a plain object from a Page message. Also converts values to other types if specified.
+ * @param message Page
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** FormField provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- }
+ /**
+ * Converts this Page to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Represents a FormField. */
- class FormField implements IFormField {
+ /**
+ * Gets the default type url for Page
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Constructs a new FormField.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IFormField);
+ namespace Page {
- /** FormField fieldName. */
- public fieldName?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Properties of a Dimension. */
+ interface IDimension {
- /** FormField fieldValue. */
- public fieldValue?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Dimension width */
+ width?: (number|null);
- /** FormField nameDetectedLanguages. */
- public nameDetectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** Dimension height */
+ height?: (number|null);
- /** FormField valueDetectedLanguages. */
- public valueDetectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+ /** Dimension unit */
+ unit?: (string|null);
+ }
- /** FormField valueType. */
- public valueType: string;
+ /** Represents a Dimension. */
+ class Dimension implements IDimension {
- /** FormField correctedKeyText. */
- public correctedKeyText: string;
+ /**
+ * Constructs a new Dimension.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IDimension);
- /** FormField correctedValueText. */
- public correctedValueText: string;
+ /** Dimension width. */
+ public width: number;
- /** FormField provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** Dimension height. */
+ public height: number;
+
+ /** Dimension unit. */
+ public unit: string;
/**
- * Creates a new FormField instance using the specified properties.
+ * Creates a new Dimension instance using the specified properties.
* @param [properties] Properties to set
- * @returns FormField instance
+ * @returns Dimension instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IFormField): google.cloud.documentai.v1beta3.Document.Page.FormField;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IDimension): google.cloud.documentai.v1beta3.Document.Page.Dimension;
/**
- * Encodes the specified FormField message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.FormField.verify|verify} messages.
- * @param message FormField message or plain object to encode
+ * Encodes the specified Dimension message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Dimension.verify|verify} messages.
+ * @param message Dimension message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IFormField, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IDimension, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified FormField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.FormField.verify|verify} messages.
- * @param message FormField message or plain object to encode
+ * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Dimension.verify|verify} messages.
+ * @param message Dimension message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IFormField, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IDimension, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a FormField message from the specified reader or buffer.
+ * Decodes a Dimension message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns FormField
+ * @returns Dimension
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.FormField;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Dimension;
/**
- * Decodes a FormField message from the specified reader or buffer, length delimited.
+ * Decodes a Dimension message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns FormField
+ * @returns Dimension
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.FormField;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Dimension;
/**
- * Verifies a FormField message.
+ * Verifies a Dimension message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a FormField message from a plain object. Also converts values to their respective internal types.
+ * Creates a Dimension message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns FormField
+ * @returns Dimension
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.FormField;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Dimension;
/**
- * Creates a plain object from a FormField message. Also converts values to other types if specified.
- * @param message FormField
+ * Creates a plain object from a Dimension message. Also converts values to other types if specified.
+ * @param message Dimension
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.FormField, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this FormField to JSON.
+ * Converts this Dimension to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for FormField
+ * Gets the default type url for Dimension
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a DetectedBarcode. */
- interface IDetectedBarcode {
+ /** Properties of an Image. */
+ interface IImage {
- /** DetectedBarcode layout */
- layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Image content */
+ content?: (Uint8Array|string|null);
- /** DetectedBarcode barcode */
- barcode?: (google.cloud.documentai.v1beta3.IBarcode|null);
+ /** Image mimeType */
+ mimeType?: (string|null);
+
+ /** Image width */
+ width?: (number|null);
+
+ /** Image height */
+ height?: (number|null);
}
- /** Represents a DetectedBarcode. */
- class DetectedBarcode implements IDetectedBarcode {
+ /** Represents an Image. */
+ class Image implements IImage {
/**
- * Constructs a new DetectedBarcode.
+ * Constructs a new Image.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IImage);
- /** DetectedBarcode layout. */
- public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+ /** Image content. */
+ public content: (Uint8Array|string);
- /** DetectedBarcode barcode. */
- public barcode?: (google.cloud.documentai.v1beta3.IBarcode|null);
+ /** Image mimeType. */
+ public mimeType: string;
+
+ /** Image width. */
+ public width: number;
+
+ /** Image height. */
+ public height: number;
/**
- * Creates a new DetectedBarcode instance using the specified properties.
+ * Creates a new Image instance using the specified properties.
* @param [properties] Properties to set
- * @returns DetectedBarcode instance
+ * @returns Image instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IImage): google.cloud.documentai.v1beta3.Document.Page.Image;
/**
- * Encodes the specified DetectedBarcode message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify|verify} messages.
- * @param message DetectedBarcode message or plain object to encode
+ * Encodes the specified Image message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Image.verify|verify} messages.
+ * @param message Image message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IImage, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified DetectedBarcode message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify|verify} messages.
- * @param message DetectedBarcode message or plain object to encode
+ * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Image.verify|verify} messages.
+ * @param message Image message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IImage, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a DetectedBarcode message from the specified reader or buffer.
+ * Decodes an Image message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns DetectedBarcode
+ * @returns Image
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Image;
/**
- * Decodes a DetectedBarcode message from the specified reader or buffer, length delimited.
+ * Decodes an Image message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns DetectedBarcode
+ * @returns Image
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Image;
/**
- * Verifies a DetectedBarcode message.
+ * Verifies an Image message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a DetectedBarcode message from a plain object. Also converts values to their respective internal types.
+ * Creates an Image message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns DetectedBarcode
+ * @returns Image
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Image;
/**
- * Creates a plain object from a DetectedBarcode message. Also converts values to other types if specified.
- * @param message DetectedBarcode
+ * Creates a plain object from an Image message. Also converts values to other types if specified.
+ * @param message Image
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Image, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this DetectedBarcode to JSON.
+ * Converts this Image to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for DetectedBarcode
+ * Gets the default type url for Image
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a DetectedLanguage. */
- interface IDetectedLanguage {
+ /** Properties of a Matrix. */
+ interface IMatrix {
- /** DetectedLanguage languageCode */
- languageCode?: (string|null);
+ /** Matrix rows */
+ rows?: (number|null);
- /** DetectedLanguage confidence */
- confidence?: (number|null);
+ /** Matrix cols */
+ cols?: (number|null);
+
+ /** Matrix type */
+ type?: (number|null);
+
+ /** Matrix data */
+ data?: (Uint8Array|string|null);
}
- /** Represents a DetectedLanguage. */
- class DetectedLanguage implements IDetectedLanguage {
+ /** Represents a Matrix. */
+ class Matrix implements IMatrix {
/**
- * Constructs a new DetectedLanguage.
+ * Constructs a new Matrix.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IMatrix);
- /** DetectedLanguage languageCode. */
- public languageCode: string;
+ /** Matrix rows. */
+ public rows: number;
- /** DetectedLanguage confidence. */
- public confidence: number;
+ /** Matrix cols. */
+ public cols: number;
+
+ /** Matrix type. */
+ public type: number;
+
+ /** Matrix data. */
+ public data: (Uint8Array|string);
/**
- * Creates a new DetectedLanguage instance using the specified properties.
+ * Creates a new Matrix instance using the specified properties.
* @param [properties] Properties to set
- * @returns DetectedLanguage instance
+ * @returns Matrix instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IMatrix): google.cloud.documentai.v1beta3.Document.Page.Matrix;
/**
- * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify|verify} messages.
- * @param message DetectedLanguage message or plain object to encode
+ * Encodes the specified Matrix message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Matrix.verify|verify} messages.
+ * @param message Matrix message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IMatrix, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify|verify} messages.
- * @param message DetectedLanguage message or plain object to encode
+ * Encodes the specified Matrix message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Matrix.verify|verify} messages.
+ * @param message Matrix message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IMatrix, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a DetectedLanguage message from the specified reader or buffer.
+ * Decodes a Matrix message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns DetectedLanguage
+ * @returns Matrix
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Matrix;
/**
- * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
+ * Decodes a Matrix message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns DetectedLanguage
+ * @returns Matrix
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Matrix;
/**
- * Verifies a DetectedLanguage message.
+ * Verifies a Matrix message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
+ * Creates a Matrix message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns DetectedLanguage
+ * @returns Matrix
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Matrix;
/**
- * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
- * @param message DetectedLanguage
+ * Creates a plain object from a Matrix message. Also converts values to other types if specified.
+ * @param message Matrix
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Matrix, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this DetectedLanguage to JSON.
+ * Converts this Matrix to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for DetectedLanguage
+ * Gets the default type url for Matrix
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of an ImageQualityScores. */
- interface IImageQualityScores {
+ /** Properties of a Layout. */
+ interface ILayout {
- /** ImageQualityScores qualityScore */
- qualityScore?: (number|null);
+ /** Layout textAnchor */
+ textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
- /** ImageQualityScores detectedDefects */
- detectedDefects?: (google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect[]|null);
+ /** Layout confidence */
+ confidence?: (number|null);
+
+ /** Layout boundingPoly */
+ boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
+
+ /** Layout orientation */
+ orientation?: (google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|null);
}
- /** Represents an ImageQualityScores. */
- class ImageQualityScores implements IImageQualityScores {
+ /** Represents a Layout. */
+ class Layout implements ILayout {
/**
- * Constructs a new ImageQualityScores.
+ * Constructs a new Layout.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ILayout);
- /** ImageQualityScores qualityScore. */
- public qualityScore: number;
+ /** Layout textAnchor. */
+ public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
- /** ImageQualityScores detectedDefects. */
- public detectedDefects: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect[];
+ /** Layout confidence. */
+ public confidence: number;
+
+ /** Layout boundingPoly. */
+ public boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
+
+ /** Layout orientation. */
+ public orientation: (google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation);
/**
- * Creates a new ImageQualityScores instance using the specified properties.
+ * Creates a new Layout instance using the specified properties.
* @param [properties] Properties to set
- * @returns ImageQualityScores instance
+ * @returns Layout instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ILayout): google.cloud.documentai.v1beta3.Document.Page.Layout;
/**
- * Encodes the specified ImageQualityScores message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify|verify} messages.
- * @param message ImageQualityScores message or plain object to encode
+ * Encodes the specified Layout message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Layout.verify|verify} messages.
+ * @param message Layout message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ILayout, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified ImageQualityScores message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify|verify} messages.
- * @param message ImageQualityScores message or plain object to encode
+ * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Layout.verify|verify} messages.
+ * @param message Layout message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ILayout, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes an ImageQualityScores message from the specified reader or buffer.
+ * Decodes a Layout message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns ImageQualityScores
+ * @returns Layout
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Layout;
/**
- * Decodes an ImageQualityScores message from the specified reader or buffer, length delimited.
+ * Decodes a Layout message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns ImageQualityScores
+ * @returns Layout
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Layout;
/**
- * Verifies an ImageQualityScores message.
+ * Verifies a Layout message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates an ImageQualityScores message from a plain object. Also converts values to their respective internal types.
+ * Creates a Layout message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns ImageQualityScores
+ * @returns Layout
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Layout;
/**
- * Creates a plain object from an ImageQualityScores message. Also converts values to other types if specified.
- * @param message ImageQualityScores
+ * Creates a plain object from a Layout message. Also converts values to other types if specified.
+ * @param message Layout
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Layout, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this ImageQualityScores to JSON.
+ * Converts this Layout to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for ImageQualityScores
+ * Gets the default type url for Layout
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace ImageQualityScores {
-
- /** Properties of a DetectedDefect. */
- interface IDetectedDefect {
-
- /** DetectedDefect type */
- type?: (string|null);
-
- /** DetectedDefect confidence */
- confidence?: (number|null);
- }
-
- /** Represents a DetectedDefect. */
- class DetectedDefect implements IDetectedDefect {
-
- /**
- * Constructs a new DetectedDefect.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect);
-
- /** DetectedDefect type. */
- public type: string;
-
- /** DetectedDefect confidence. */
- public confidence: number;
-
- /**
- * Creates a new DetectedDefect instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DetectedDefect instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
-
- /**
- * Encodes the specified DetectedDefect message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.verify|verify} messages.
- * @param message DetectedDefect message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified DetectedDefect message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.verify|verify} messages.
- * @param message DetectedDefect message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a DetectedDefect message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DetectedDefect
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
-
- /**
- * Decodes a DetectedDefect message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DetectedDefect
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
-
- /**
- * Verifies a DetectedDefect message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a DetectedDefect message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DetectedDefect
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
-
- /**
- * Creates a plain object from a DetectedDefect message. Also converts values to other types if specified.
- * @param message DetectedDefect
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this DetectedDefect to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ namespace Layout {
- /**
- * Gets the default type url for DetectedDefect
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
+ /** Orientation enum. */
+ enum Orientation {
+ ORIENTATION_UNSPECIFIED = 0,
+ PAGE_UP = 1,
+ PAGE_RIGHT = 2,
+ PAGE_DOWN = 3,
+ PAGE_LEFT = 4
}
}
- }
-
- /** Properties of an Entity. */
- interface IEntity {
-
- /** Entity textAnchor */
- textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
-
- /** Entity type */
- type?: (string|null);
-
- /** Entity mentionText */
- mentionText?: (string|null);
-
- /** Entity mentionId */
- mentionId?: (string|null);
-
- /** Entity confidence */
- confidence?: (number|null);
-
- /** Entity pageAnchor */
- pageAnchor?: (google.cloud.documentai.v1beta3.Document.IPageAnchor|null);
-
- /** Entity id */
- id?: (string|null);
-
- /** Entity normalizedValue */
- normalizedValue?: (google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue|null);
-
- /** Entity properties */
- properties?: (google.cloud.documentai.v1beta3.Document.IEntity[]|null);
-
- /** Entity provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
-
- /** Entity redacted */
- redacted?: (boolean|null);
- }
-
- /** Represents an Entity. */
- class Entity implements IEntity {
-
- /**
- * Constructs a new Entity.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IEntity);
-
- /** Entity textAnchor. */
- public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
-
- /** Entity type. */
- public type: string;
-
- /** Entity mentionText. */
- public mentionText: string;
-
- /** Entity mentionId. */
- public mentionId: string;
-
- /** Entity confidence. */
- public confidence: number;
-
- /** Entity pageAnchor. */
- public pageAnchor?: (google.cloud.documentai.v1beta3.Document.IPageAnchor|null);
-
- /** Entity id. */
- public id: string;
- /** Entity normalizedValue. */
- public normalizedValue?: (google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue|null);
-
- /** Entity properties. */
- public properties: google.cloud.documentai.v1beta3.Document.IEntity[];
+ /** Properties of a Block. */
+ interface IBlock {
- /** Entity provenance. */
- public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ /** Block layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Entity redacted. */
- public redacted: boolean;
+ /** Block detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /**
- * Creates a new Entity instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Entity instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IEntity): google.cloud.documentai.v1beta3.Document.Entity;
+ /** Block provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ }
- /**
- * Encodes the specified Entity message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.verify|verify} messages.
- * @param message Entity message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.IEntity, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Represents a Block. */
+ class Block implements IBlock {
- /**
- * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.verify|verify} messages.
- * @param message Entity message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IEntity, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Constructs a new Block.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IBlock);
- /**
- * Decodes an Entity message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Entity
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Entity;
+ /** Block layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Decodes an Entity message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Entity
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Entity;
+ /** Block detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /**
- * Verifies an Entity message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Block provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- /**
- * Creates an Entity message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Entity
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Entity;
+ /**
+ * Creates a new Block instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Block instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IBlock): google.cloud.documentai.v1beta3.Document.Page.Block;
- /**
- * Creates a plain object from an Entity message. Also converts values to other types if specified.
- * @param message Entity
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Encodes the specified Block message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Block.verify|verify} messages.
+ * @param message Block message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IBlock, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Converts this Entity to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Block.verify|verify} messages.
+ * @param message Block message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IBlock, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Gets the default type url for Entity
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Decodes a Block message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Block
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Block;
- namespace Entity {
+ /**
+ * Decodes a Block message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Block
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Block;
- /** Properties of a NormalizedValue. */
- interface INormalizedValue {
+ /**
+ * Verifies a Block message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** NormalizedValue moneyValue */
- moneyValue?: (google.type.IMoney|null);
+ /**
+ * Creates a Block message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Block
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Block;
- /** NormalizedValue dateValue */
- dateValue?: (google.type.IDate|null);
+ /**
+ * Creates a plain object from a Block message. Also converts values to other types if specified.
+ * @param message Block
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Block, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** NormalizedValue datetimeValue */
- datetimeValue?: (google.type.IDateTime|null);
+ /**
+ * Converts this Block to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** NormalizedValue addressValue */
- addressValue?: (google.type.IPostalAddress|null);
+ /**
+ * Gets the default type url for Block
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** NormalizedValue booleanValue */
- booleanValue?: (boolean|null);
+ /** Properties of a Paragraph. */
+ interface IParagraph {
- /** NormalizedValue integerValue */
- integerValue?: (number|null);
+ /** Paragraph layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** NormalizedValue floatValue */
- floatValue?: (number|null);
+ /** Paragraph detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /** NormalizedValue text */
- text?: (string|null);
+ /** Paragraph provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
}
- /** Represents a NormalizedValue. */
- class NormalizedValue implements INormalizedValue {
+ /** Represents a Paragraph. */
+ class Paragraph implements IParagraph {
/**
- * Constructs a new NormalizedValue.
+ * Constructs a new Paragraph.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue);
-
- /** NormalizedValue moneyValue. */
- public moneyValue?: (google.type.IMoney|null);
-
- /** NormalizedValue dateValue. */
- public dateValue?: (google.type.IDate|null);
-
- /** NormalizedValue datetimeValue. */
- public datetimeValue?: (google.type.IDateTime|null);
-
- /** NormalizedValue addressValue. */
- public addressValue?: (google.type.IPostalAddress|null);
-
- /** NormalizedValue booleanValue. */
- public booleanValue?: (boolean|null);
-
- /** NormalizedValue integerValue. */
- public integerValue?: (number|null);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IParagraph);
- /** NormalizedValue floatValue. */
- public floatValue?: (number|null);
+ /** Paragraph layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** NormalizedValue text. */
- public text: string;
+ /** Paragraph detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /** NormalizedValue structuredValue. */
- public structuredValue?: ("moneyValue"|"dateValue"|"datetimeValue"|"addressValue"|"booleanValue"|"integerValue"|"floatValue");
+ /** Paragraph provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
/**
- * Creates a new NormalizedValue instance using the specified properties.
+ * Creates a new Paragraph instance using the specified properties.
* @param [properties] Properties to set
- * @returns NormalizedValue instance
+ * @returns Paragraph instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IParagraph): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
/**
- * Encodes the specified NormalizedValue message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue.verify|verify} messages.
- * @param message NormalizedValue message or plain object to encode
+ * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify|verify} messages.
+ * @param message Paragraph message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IParagraph, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified NormalizedValue message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue.verify|verify} messages.
- * @param message NormalizedValue message or plain object to encode
+ * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify|verify} messages.
+ * @param message Paragraph message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IParagraph, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a NormalizedValue message from the specified reader or buffer.
+ * Decodes a Paragraph message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns NormalizedValue
+ * @returns Paragraph
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
/**
- * Decodes a NormalizedValue message from the specified reader or buffer, length delimited.
+ * Decodes a Paragraph message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns NormalizedValue
+ * @returns Paragraph
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
/**
- * Verifies a NormalizedValue message.
+ * Verifies a Paragraph message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a NormalizedValue message from a plain object. Also converts values to their respective internal types.
+ * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns NormalizedValue
+ * @returns Paragraph
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Paragraph;
/**
- * Creates a plain object from a NormalizedValue message. Also converts values to other types if specified.
- * @param message NormalizedValue
+ * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
+ * @param message Paragraph
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Paragraph, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this NormalizedValue to JSON.
+ * Converts this Paragraph to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for NormalizedValue
+ * Gets the default type url for Paragraph
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- }
-
- /** Properties of an EntityRelation. */
- interface IEntityRelation {
- /** EntityRelation subjectId */
- subjectId?: (string|null);
+ /** Properties of a Line. */
+ interface ILine {
- /** EntityRelation objectId */
- objectId?: (string|null);
-
- /** EntityRelation relation */
- relation?: (string|null);
- }
-
- /** Represents an EntityRelation. */
- class EntityRelation implements IEntityRelation {
-
- /**
- * Constructs a new EntityRelation.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IEntityRelation);
-
- /** EntityRelation subjectId. */
- public subjectId: string;
-
- /** EntityRelation objectId. */
- public objectId: string;
-
- /** EntityRelation relation. */
- public relation: string;
-
- /**
- * Creates a new EntityRelation instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EntityRelation instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IEntityRelation): google.cloud.documentai.v1beta3.Document.EntityRelation;
-
- /**
- * Encodes the specified EntityRelation message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.EntityRelation.verify|verify} messages.
- * @param message EntityRelation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.IEntityRelation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EntityRelation message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.EntityRelation.verify|verify} messages.
- * @param message EntityRelation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IEntityRelation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EntityRelation message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EntityRelation
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.EntityRelation;
-
- /**
- * Decodes an EntityRelation message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EntityRelation
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.EntityRelation;
-
- /**
- * Verifies an EntityRelation message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an EntityRelation message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EntityRelation
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.EntityRelation;
-
- /**
- * Creates a plain object from an EntityRelation message. Also converts values to other types if specified.
- * @param message EntityRelation
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.EntityRelation, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EntityRelation to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EntityRelation
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a TextAnchor. */
- interface ITextAnchor {
-
- /** TextAnchor textSegments */
- textSegments?: (google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment[]|null);
-
- /** TextAnchor content */
- content?: (string|null);
- }
-
- /** Represents a TextAnchor. */
- class TextAnchor implements ITextAnchor {
-
- /**
- * Constructs a new TextAnchor.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.ITextAnchor);
-
- /** TextAnchor textSegments. */
- public textSegments: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment[];
-
- /** TextAnchor content. */
- public content: string;
-
- /**
- * Creates a new TextAnchor instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TextAnchor instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.ITextAnchor): google.cloud.documentai.v1beta3.Document.TextAnchor;
-
- /**
- * Encodes the specified TextAnchor message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.verify|verify} messages.
- * @param message TextAnchor message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.ITextAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified TextAnchor message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.verify|verify} messages.
- * @param message TextAnchor message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.ITextAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a TextAnchor message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TextAnchor
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.TextAnchor;
-
- /**
- * Decodes a TextAnchor message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TextAnchor
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.TextAnchor;
-
- /**
- * Verifies a TextAnchor message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a TextAnchor message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TextAnchor
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.TextAnchor;
-
- /**
- * Creates a plain object from a TextAnchor message. Also converts values to other types if specified.
- * @param message TextAnchor
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.TextAnchor, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this TextAnchor to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for TextAnchor
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace TextAnchor {
-
- /** Properties of a TextSegment. */
- interface ITextSegment {
+ /** Line layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** TextSegment startIndex */
- startIndex?: (number|Long|string|null);
+ /** Line detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /** TextSegment endIndex */
- endIndex?: (number|Long|string|null);
+ /** Line provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
}
- /** Represents a TextSegment. */
- class TextSegment implements ITextSegment {
+ /** Represents a Line. */
+ class Line implements ILine {
/**
- * Constructs a new TextSegment.
+ * Constructs a new Line.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ILine);
- /** TextSegment startIndex. */
- public startIndex: (number|Long|string);
+ /** Line layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** TextSegment endIndex. */
- public endIndex: (number|Long|string);
+ /** Line detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+
+ /** Line provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
/**
- * Creates a new TextSegment instance using the specified properties.
+ * Creates a new Line instance using the specified properties.
* @param [properties] Properties to set
- * @returns TextSegment instance
+ * @returns Line instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ILine): google.cloud.documentai.v1beta3.Document.Page.Line;
/**
- * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment.verify|verify} messages.
- * @param message TextSegment message or plain object to encode
+ * Encodes the specified Line message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Line.verify|verify} messages.
+ * @param message Line message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ILine, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment.verify|verify} messages.
- * @param message TextSegment message or plain object to encode
+ * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Line.verify|verify} messages.
+ * @param message Line message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ILine, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a TextSegment message from the specified reader or buffer.
+ * Decodes a Line message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns TextSegment
+ * @returns Line
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Line;
/**
- * Decodes a TextSegment message from the specified reader or buffer, length delimited.
+ * Decodes a Line message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns TextSegment
+ * @returns Line
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Line;
/**
- * Verifies a TextSegment message.
+ * Verifies a Line message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a TextSegment message from a plain object. Also converts values to their respective internal types.
+ * Creates a Line message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns TextSegment
+ * @returns Line
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Line;
/**
- * Creates a plain object from a TextSegment message. Also converts values to other types if specified.
- * @param message TextSegment
+ * Creates a plain object from a Line message. Also converts values to other types if specified.
+ * @param message Line
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Line, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this TextSegment to JSON.
+ * Converts this Line to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for TextSegment
+ * Gets the default type url for Line
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- }
-
- /** Properties of a PageAnchor. */
- interface IPageAnchor {
-
- /** PageAnchor pageRefs */
- pageRefs?: (google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef[]|null);
- }
-
- /** Represents a PageAnchor. */
- class PageAnchor implements IPageAnchor {
-
- /**
- * Constructs a new PageAnchor.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IPageAnchor);
-
- /** PageAnchor pageRefs. */
- public pageRefs: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef[];
-
- /**
- * Creates a new PageAnchor instance using the specified properties.
- * @param [properties] Properties to set
- * @returns PageAnchor instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IPageAnchor): google.cloud.documentai.v1beta3.Document.PageAnchor;
-
- /**
- * Encodes the specified PageAnchor message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.verify|verify} messages.
- * @param message PageAnchor message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.IPageAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified PageAnchor message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.verify|verify} messages.
- * @param message PageAnchor message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IPageAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a PageAnchor message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns PageAnchor
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.PageAnchor;
-
- /**
- * Decodes a PageAnchor message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns PageAnchor
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.PageAnchor;
-
- /**
- * Verifies a PageAnchor message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a PageAnchor message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns PageAnchor
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.PageAnchor;
-
- /**
- * Creates a plain object from a PageAnchor message. Also converts values to other types if specified.
- * @param message PageAnchor
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.PageAnchor, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this PageAnchor to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for PageAnchor
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace PageAnchor {
- /** Properties of a PageRef. */
- interface IPageRef {
+ /** Properties of a Token. */
+ interface IToken {
- /** PageRef page */
- page?: (number|Long|string|null);
+ /** Token layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** PageRef layoutType */
- layoutType?: (google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType|keyof typeof google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType|null);
+ /** Token detectedBreak */
+ detectedBreak?: (google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak|null);
- /** PageRef layoutId */
- layoutId?: (string|null);
+ /** Token detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /** PageRef boundingPoly */
- boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
+ /** Token provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- /** PageRef confidence */
- confidence?: (number|null);
+ /** Token styleInfo */
+ styleInfo?: (google.cloud.documentai.v1beta3.Document.Page.Token.IStyleInfo|null);
}
- /** Represents a PageRef. */
- class PageRef implements IPageRef {
+ /** Represents a Token. */
+ class Token implements IToken {
/**
- * Constructs a new PageRef.
+ * Constructs a new Token.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IToken);
- /** PageRef page. */
- public page: (number|Long|string);
+ /** Token layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** PageRef layoutType. */
- public layoutType: (google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType|keyof typeof google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType);
+ /** Token detectedBreak. */
+ public detectedBreak?: (google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak|null);
- /** PageRef layoutId. */
- public layoutId: string;
+ /** Token detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /** PageRef boundingPoly. */
- public boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
+ /** Token provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- /** PageRef confidence. */
- public confidence: number;
+ /** Token styleInfo. */
+ public styleInfo?: (google.cloud.documentai.v1beta3.Document.Page.Token.IStyleInfo|null);
/**
- * Creates a new PageRef instance using the specified properties.
+ * Creates a new Token instance using the specified properties.
* @param [properties] Properties to set
- * @returns PageRef instance
+ * @returns Token instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IToken): google.cloud.documentai.v1beta3.Document.Page.Token;
/**
- * Encodes the specified PageRef message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.verify|verify} messages.
- * @param message PageRef message or plain object to encode
+ * Encodes the specified Token message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.verify|verify} messages.
+ * @param message Token message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified PageRef message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.verify|verify} messages.
- * @param message PageRef message or plain object to encode
+ * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.verify|verify} messages.
+ * @param message Token message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a PageRef message from the specified reader or buffer.
+ * Decodes a Token message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns PageRef
+ * @returns Token
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Token;
/**
- * Decodes a PageRef message from the specified reader or buffer, length delimited.
+ * Decodes a Token message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns PageRef
+ * @returns Token
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Token;
/**
- * Verifies a PageRef message.
+ * Verifies a Token message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a PageRef message from a plain object. Also converts values to their respective internal types.
+ * Creates a Token message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns PageRef
+ * @returns Token
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Token;
/**
- * Creates a plain object from a PageRef message. Also converts values to other types if specified.
- * @param message PageRef
+ * Creates a plain object from a Token message. Also converts values to other types if specified.
+ * @param message Token
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Token, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this PageRef to JSON.
+ * Converts this Token to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for PageRef
+ * Gets the default type url for Token
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace PageRef {
-
- /** LayoutType enum. */
- enum LayoutType {
- LAYOUT_TYPE_UNSPECIFIED = 0,
- BLOCK = 1,
- PARAGRAPH = 2,
- LINE = 3,
- TOKEN = 4,
- VISUAL_ELEMENT = 5,
- TABLE = 6,
- FORM_FIELD = 7
- }
- }
- }
+ namespace Token {
- /** Properties of a Provenance. */
- interface IProvenance {
+ /** Properties of a DetectedBreak. */
+ interface IDetectedBreak {
- /** Provenance revision */
- revision?: (number|null);
+ /** DetectedBreak type */
+ type?: (google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|null);
+ }
- /** Provenance id */
- id?: (number|null);
+ /** Represents a DetectedBreak. */
+ class DetectedBreak implements IDetectedBreak {
- /** Provenance parents */
- parents?: (google.cloud.documentai.v1beta3.Document.Provenance.IParent[]|null);
+ /**
+ * Constructs a new DetectedBreak.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak);
- /** Provenance type */
- type?: (google.cloud.documentai.v1beta3.Document.Provenance.OperationType|keyof typeof google.cloud.documentai.v1beta3.Document.Provenance.OperationType|null);
- }
+ /** DetectedBreak type. */
+ public type: (google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|keyof typeof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type);
- /** Represents a Provenance. */
- class Provenance implements IProvenance {
+ /**
+ * Creates a new DetectedBreak instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DetectedBreak instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
- /**
- * Constructs a new Provenance.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IProvenance);
+ /**
+ * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify|verify} messages.
+ * @param message DetectedBreak message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Provenance revision. */
- public revision: number;
+ /**
+ * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify|verify} messages.
+ * @param message DetectedBreak message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Provenance id. */
- public id: number;
+ /**
+ * Decodes a DetectedBreak message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DetectedBreak
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
- /** Provenance parents. */
- public parents: google.cloud.documentai.v1beta3.Document.Provenance.IParent[];
+ /**
+ * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DetectedBreak
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
- /** Provenance type. */
- public type: (google.cloud.documentai.v1beta3.Document.Provenance.OperationType|keyof typeof google.cloud.documentai.v1beta3.Document.Provenance.OperationType);
+ /**
+ * Verifies a DetectedBreak message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a new Provenance instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Provenance instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IProvenance): google.cloud.documentai.v1beta3.Document.Provenance;
+ /**
+ * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DetectedBreak
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak;
- /**
- * Encodes the specified Provenance message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.verify|verify} messages.
- * @param message Provenance message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.IProvenance, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
+ * @param message DetectedBreak
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Encodes the specified Provenance message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.verify|verify} messages.
- * @param message Provenance message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IProvenance, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Converts this DetectedBreak to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Decodes a Provenance message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Provenance
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Provenance;
+ /**
+ * Gets the default type url for DetectedBreak
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Decodes a Provenance message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Provenance
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Provenance;
+ namespace DetectedBreak {
- /**
- * Verifies a Provenance message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Type enum. */
+ enum Type {
+ TYPE_UNSPECIFIED = 0,
+ SPACE = 1,
+ WIDE_SPACE = 2,
+ HYPHEN = 3
+ }
+ }
- /**
- * Creates a Provenance message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Provenance
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Provenance;
+ /** Properties of a StyleInfo. */
+ interface IStyleInfo {
- /**
- * Creates a plain object from a Provenance message. Also converts values to other types if specified.
- * @param message Provenance
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Provenance, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** StyleInfo fontSize */
+ fontSize?: (number|null);
- /**
- * Converts this Provenance to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** StyleInfo pixelFontSize */
+ pixelFontSize?: (number|null);
- /**
- * Gets the default type url for Provenance
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** StyleInfo letterSpacing */
+ letterSpacing?: (number|null);
- namespace Provenance {
+ /** StyleInfo fontType */
+ fontType?: (string|null);
- /** Properties of a Parent. */
- interface IParent {
+ /** StyleInfo bold */
+ bold?: (boolean|null);
- /** Parent revision */
- revision?: (number|null);
+ /** StyleInfo italic */
+ italic?: (boolean|null);
- /** Parent index */
- index?: (number|null);
+ /** StyleInfo underlined */
+ underlined?: (boolean|null);
- /** Parent id */
- id?: (number|null);
+ /** StyleInfo strikeout */
+ strikeout?: (boolean|null);
+
+ /** StyleInfo subscript */
+ subscript?: (boolean|null);
+
+ /** StyleInfo superscript */
+ superscript?: (boolean|null);
+
+ /** StyleInfo smallcaps */
+ smallcaps?: (boolean|null);
+
+ /** StyleInfo fontWeight */
+ fontWeight?: (number|null);
+
+ /** StyleInfo handwritten */
+ handwritten?: (boolean|null);
+
+ /** StyleInfo textColor */
+ textColor?: (google.type.IColor|null);
+
+ /** StyleInfo backgroundColor */
+ backgroundColor?: (google.type.IColor|null);
+ }
+
+ /** Represents a StyleInfo. */
+ class StyleInfo implements IStyleInfo {
+
+ /**
+ * Constructs a new StyleInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Token.IStyleInfo);
+
+ /** StyleInfo fontSize. */
+ public fontSize: number;
+
+ /** StyleInfo pixelFontSize. */
+ public pixelFontSize: number;
+
+ /** StyleInfo letterSpacing. */
+ public letterSpacing: number;
+
+ /** StyleInfo fontType. */
+ public fontType: string;
+
+ /** StyleInfo bold. */
+ public bold: boolean;
+
+ /** StyleInfo italic. */
+ public italic: boolean;
+
+ /** StyleInfo underlined. */
+ public underlined: boolean;
+
+ /** StyleInfo strikeout. */
+ public strikeout: boolean;
+
+ /** StyleInfo subscript. */
+ public subscript: boolean;
+
+ /** StyleInfo superscript. */
+ public superscript: boolean;
+
+ /** StyleInfo smallcaps. */
+ public smallcaps: boolean;
+
+ /** StyleInfo fontWeight. */
+ public fontWeight: number;
+
+ /** StyleInfo handwritten. */
+ public handwritten: boolean;
+
+ /** StyleInfo textColor. */
+ public textColor?: (google.type.IColor|null);
+
+ /** StyleInfo backgroundColor. */
+ public backgroundColor?: (google.type.IColor|null);
+
+ /**
+ * Creates a new StyleInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns StyleInfo instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Token.IStyleInfo): google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo;
+
+ /**
+ * Encodes the specified StyleInfo message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo.verify|verify} messages.
+ * @param message StyleInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Token.IStyleInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified StyleInfo message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo.verify|verify} messages.
+ * @param message StyleInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Token.IStyleInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a StyleInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns StyleInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo;
+
+ /**
+ * Decodes a StyleInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns StyleInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo;
+
+ /**
+ * Verifies a StyleInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a StyleInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns StyleInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo;
+
+ /**
+ * Creates a plain object from a StyleInfo message. Also converts values to other types if specified.
+ * @param message StyleInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Token.StyleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this StyleInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for StyleInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
}
- /** Represents a Parent. */
- class Parent implements IParent {
+ /** Properties of a Symbol. */
+ interface ISymbol {
+
+ /** Symbol layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
+
+ /** Symbol detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ }
+
+ /** Represents a Symbol. */
+ class Symbol implements ISymbol {
/**
- * Constructs a new Parent.
+ * Constructs a new Symbol.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Provenance.IParent);
-
- /** Parent revision. */
- public revision: number;
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ISymbol);
- /** Parent index. */
- public index: number;
+ /** Symbol layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Parent id. */
- public id: number;
+ /** Symbol detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
/**
- * Creates a new Parent instance using the specified properties.
+ * Creates a new Symbol instance using the specified properties.
* @param [properties] Properties to set
- * @returns Parent instance
+ * @returns Symbol instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Provenance.IParent): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ISymbol): google.cloud.documentai.v1beta3.Document.Page.Symbol;
/**
- * Encodes the specified Parent message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.Parent.verify|verify} messages.
- * @param message Parent message or plain object to encode
+ * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Symbol.verify|verify} messages.
+ * @param message Symbol message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Provenance.IParent, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ISymbol, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Parent message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.Parent.verify|verify} messages.
- * @param message Parent message or plain object to encode
+ * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Symbol.verify|verify} messages.
+ * @param message Symbol message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Provenance.IParent, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ISymbol, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Parent message from the specified reader or buffer.
+ * Decodes a Symbol message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Parent
+ * @returns Symbol
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Symbol;
/**
- * Decodes a Parent message from the specified reader or buffer, length delimited.
+ * Decodes a Symbol message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Parent
+ * @returns Symbol
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Symbol;
/**
- * Verifies a Parent message.
+ * Verifies a Symbol message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Parent message from a plain object. Also converts values to their respective internal types.
+ * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Parent
+ * @returns Symbol
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Symbol;
/**
- * Creates a plain object from a Parent message. Also converts values to other types if specified.
- * @param message Parent
+ * Creates a plain object from a Symbol message. Also converts values to other types if specified.
+ * @param message Symbol
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Provenance.Parent, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Symbol, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Parent to JSON.
+ * Converts this Symbol to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Parent
+ * Gets the default type url for Symbol
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** OperationType enum. */
- enum OperationType {
- OPERATION_TYPE_UNSPECIFIED = 0,
- ADD = 1,
- REMOVE = 2,
- UPDATE = 7,
- REPLACE = 3,
- EVAL_REQUESTED = 4,
- EVAL_APPROVED = 5,
- EVAL_SKIPPED = 6
- }
- }
+ /** Properties of a VisualElement. */
+ interface IVisualElement {
- /** Properties of a Revision. */
- interface IRevision {
+ /** VisualElement layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Revision agent */
- agent?: (string|null);
+ /** VisualElement type */
+ type?: (string|null);
- /** Revision processor */
- processor?: (string|null);
+ /** VisualElement detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ }
- /** Revision id */
- id?: (string|null);
+ /** Represents a VisualElement. */
+ class VisualElement implements IVisualElement {
- /** Revision parent */
- parent?: (number[]|null);
+ /**
+ * Constructs a new VisualElement.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IVisualElement);
- /** Revision parentIds */
- parentIds?: (string[]|null);
+ /** VisualElement layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Revision createTime */
- createTime?: (google.protobuf.ITimestamp|null);
+ /** VisualElement type. */
+ public type: string;
- /** Revision humanReview */
- humanReview?: (google.cloud.documentai.v1beta3.Document.Revision.IHumanReview|null);
- }
+ /** VisualElement detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /** Represents a Revision. */
- class Revision implements IRevision {
+ /**
+ * Creates a new VisualElement instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns VisualElement instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IVisualElement): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
- /**
- * Constructs a new Revision.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.IRevision);
+ /**
+ * Encodes the specified VisualElement message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify|verify} messages.
+ * @param message VisualElement message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IVisualElement, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Revision agent. */
- public agent?: (string|null);
+ /**
+ * Encodes the specified VisualElement message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify|verify} messages.
+ * @param message VisualElement message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IVisualElement, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Revision processor. */
- public processor?: (string|null);
+ /**
+ * Decodes a VisualElement message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns VisualElement
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
- /** Revision id. */
- public id: string;
+ /**
+ * Decodes a VisualElement message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns VisualElement
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
- /** Revision parent. */
- public parent: number[];
+ /**
+ * Verifies a VisualElement message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Revision parentIds. */
- public parentIds: string[];
+ /**
+ * Creates a VisualElement message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns VisualElement
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.VisualElement;
- /** Revision createTime. */
- public createTime?: (google.protobuf.ITimestamp|null);
+ /**
+ * Creates a plain object from a VisualElement message. Also converts values to other types if specified.
+ * @param message VisualElement
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.VisualElement, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** Revision humanReview. */
- public humanReview?: (google.cloud.documentai.v1beta3.Document.Revision.IHumanReview|null);
+ /**
+ * Converts this VisualElement to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Revision source. */
- public source?: ("agent"|"processor");
+ /**
+ * Gets the default type url for VisualElement
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a new Revision instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Revision instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.IRevision): google.cloud.documentai.v1beta3.Document.Revision;
+ /** Properties of a Table. */
+ interface ITable {
- /**
- * Encodes the specified Revision message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.verify|verify} messages.
- * @param message Revision message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.IRevision, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Table layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Encodes the specified Revision message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.verify|verify} messages.
- * @param message Revision message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IRevision, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Table headerRows */
+ headerRows?: (google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[]|null);
- /**
- * Decodes a Revision message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Revision
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Revision;
-
- /**
- * Decodes a Revision message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Revision
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Revision;
-
- /**
- * Verifies a Revision message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Revision message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Revision
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Revision;
-
- /**
- * Creates a plain object from a Revision message. Also converts values to other types if specified.
- * @param message Revision
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Revision, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Revision to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Revision
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Revision {
-
- /** Properties of a HumanReview. */
- interface IHumanReview {
+ /** Table bodyRows */
+ bodyRows?: (google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[]|null);
- /** HumanReview state */
- state?: (string|null);
+ /** Table detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /** HumanReview stateMessage */
- stateMessage?: (string|null);
+ /** Table provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
}
- /** Represents a HumanReview. */
- class HumanReview implements IHumanReview {
+ /** Represents a Table. */
+ class Table implements ITable {
/**
- * Constructs a new HumanReview.
+ * Constructs a new Table.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ITable);
- /** HumanReview state. */
- public state: string;
+ /** Table layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** HumanReview stateMessage. */
- public stateMessage: string;
+ /** Table headerRows. */
+ public headerRows: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[];
+
+ /** Table bodyRows. */
+ public bodyRows: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow[];
+
+ /** Table detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
+
+ /** Table provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
/**
- * Creates a new HumanReview instance using the specified properties.
+ * Creates a new Table instance using the specified properties.
* @param [properties] Properties to set
- * @returns HumanReview instance
+ * @returns Table instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ITable): google.cloud.documentai.v1beta3.Document.Page.Table;
/**
- * Encodes the specified HumanReview message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.HumanReview.verify|verify} messages.
- * @param message HumanReview message or plain object to encode
+ * Encodes the specified Table message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.verify|verify} messages.
+ * @param message Table message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ITable, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified HumanReview message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.HumanReview.verify|verify} messages.
- * @param message HumanReview message or plain object to encode
+ * Encodes the specified Table message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.verify|verify} messages.
+ * @param message Table message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ITable, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a HumanReview message from the specified reader or buffer.
+ * Decodes a Table message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns HumanReview
+ * @returns Table
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Table;
/**
- * Decodes a HumanReview message from the specified reader or buffer, length delimited.
+ * Decodes a Table message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns HumanReview
+ * @returns Table
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Table;
/**
- * Verifies a HumanReview message.
+ * Verifies a Table message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a HumanReview message from a plain object. Also converts values to their respective internal types.
+ * Creates a Table message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns HumanReview
+ * @returns Table
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Table;
/**
- * Creates a plain object from a HumanReview message. Also converts values to other types if specified.
- * @param message HumanReview
+ * Creates a plain object from a Table message. Also converts values to other types if specified.
+ * @param message Table
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.Document.Revision.HumanReview, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Table, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this HumanReview to JSON.
+ * Converts this Table to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for HumanReview
+ * Gets the default type url for Table
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- }
- /** Properties of a TextChange. */
- interface ITextChange {
+ namespace Table {
- /** TextChange textAnchor */
- textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+ /** Properties of a TableRow. */
+ interface ITableRow {
- /** TextChange changedText */
- changedText?: (string|null);
+ /** TableRow cells */
+ cells?: (google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell[]|null);
+ }
- /** TextChange provenance */
- provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance[]|null);
- }
+ /** Represents a TableRow. */
+ class TableRow implements ITableRow {
- /** Represents a TextChange. */
- class TextChange implements ITextChange {
+ /**
+ * Constructs a new TableRow.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow);
- /**
- * Constructs a new TextChange.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.Document.ITextChange);
+ /** TableRow cells. */
+ public cells: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell[];
- /** TextChange textAnchor. */
- public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+ /**
+ * Creates a new TableRow instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TableRow instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
- /** TextChange changedText. */
- public changedText: string;
+ /**
+ * Encodes the specified TableRow message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify|verify} messages.
+ * @param message TableRow message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow, writer?: $protobuf.Writer): $protobuf.Writer;
- /** TextChange provenance. */
- public provenance: google.cloud.documentai.v1beta3.Document.IProvenance[];
+ /**
+ * Encodes the specified TableRow message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify|verify} messages.
+ * @param message TableRow message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a new TextChange instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TextChange instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.Document.ITextChange): google.cloud.documentai.v1beta3.Document.TextChange;
+ /**
+ * Decodes a TableRow message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TableRow
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
- /**
- * Encodes the specified TextChange message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextChange.verify|verify} messages.
- * @param message TextChange message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.Document.ITextChange, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Decodes a TableRow message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TableRow
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
- /**
- * Encodes the specified TextChange message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextChange.verify|verify} messages.
- * @param message TextChange message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.ITextChange, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a TableRow message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Decodes a TextChange message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TextChange
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.TextChange;
+ /**
+ * Creates a TableRow message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TableRow
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Table.TableRow;
- /**
- * Decodes a TextChange message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TextChange
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.TextChange;
+ /**
+ * Creates a plain object from a TableRow message. Also converts values to other types if specified.
+ * @param message TableRow
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Table.TableRow, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Verifies a TextChange message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Converts this TableRow to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Creates a TextChange message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TextChange
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.TextChange;
+ /**
+ * Gets the default type url for TableRow
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a plain object from a TextChange message. Also converts values to other types if specified.
- * @param message TextChange
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Document.TextChange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Properties of a TableCell. */
+ interface ITableCell {
- /**
- * Converts this TextChange to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** TableCell layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Gets the default type url for TextChange
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
+ /** TableCell rowSpan */
+ rowSpan?: (number|null);
- /** Properties of a Vertex. */
- interface IVertex {
+ /** TableCell colSpan */
+ colSpan?: (number|null);
- /** Vertex x */
- x?: (number|null);
+ /** TableCell detectedLanguages */
+ detectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
+ }
- /** Vertex y */
- y?: (number|null);
- }
+ /** Represents a TableCell. */
+ class TableCell implements ITableCell {
- /** Represents a Vertex. */
- class Vertex implements IVertex {
+ /**
+ * Constructs a new TableCell.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell);
- /**
- * Constructs a new Vertex.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IVertex);
+ /** TableCell layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Vertex x. */
- public x: number;
+ /** TableCell rowSpan. */
+ public rowSpan: number;
- /** Vertex y. */
- public y: number;
+ /** TableCell colSpan. */
+ public colSpan: number;
- /**
- * Creates a new Vertex instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Vertex instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IVertex): google.cloud.documentai.v1beta3.Vertex;
+ /** TableCell detectedLanguages. */
+ public detectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /**
- * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.documentai.v1beta3.Vertex.verify|verify} messages.
- * @param message Vertex message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IVertex, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a new TableCell instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TableCell instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
- /**
- * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Vertex.verify|verify} messages.
- * @param message Vertex message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IVertex, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified TableCell message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify|verify} messages.
+ * @param message TableCell message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Vertex message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Vertex
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Vertex;
+ /**
+ * Encodes the specified TableCell message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify|verify} messages.
+ * @param message TableCell message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Vertex message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Vertex
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Vertex;
+ /**
+ * Decodes a TableCell message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TableCell
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
- /**
- * Verifies a Vertex message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Decodes a TableCell message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TableCell
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
- /**
- * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Vertex
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Vertex;
+ /**
+ * Verifies a TableCell message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a plain object from a Vertex message. Also converts values to other types if specified.
- * @param message Vertex
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.Vertex, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Creates a TableCell message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TableCell
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.Table.TableCell;
- /**
- * Converts this Vertex to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a plain object from a TableCell message. Also converts values to other types if specified.
+ * @param message TableCell
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.Table.TableCell, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Gets the default type url for Vertex
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Converts this TableCell to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Properties of a NormalizedVertex. */
- interface INormalizedVertex {
+ /**
+ * Gets the default type url for TableCell
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
- /** NormalizedVertex x */
- x?: (number|null);
+ /** Properties of a FormField. */
+ interface IFormField {
- /** NormalizedVertex y */
- y?: (number|null);
- }
+ /** FormField fieldName */
+ fieldName?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Represents a NormalizedVertex. */
- class NormalizedVertex implements INormalizedVertex {
+ /** FormField fieldValue */
+ fieldValue?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Constructs a new NormalizedVertex.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.INormalizedVertex);
-
- /** NormalizedVertex x. */
- public x: number;
+ /** FormField nameDetectedLanguages */
+ nameDetectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /** NormalizedVertex y. */
- public y: number;
+ /** FormField valueDetectedLanguages */
+ valueDetectedLanguages?: (google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[]|null);
- /**
- * Creates a new NormalizedVertex instance using the specified properties.
- * @param [properties] Properties to set
- * @returns NormalizedVertex instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.INormalizedVertex): google.cloud.documentai.v1beta3.NormalizedVertex;
+ /** FormField valueType */
+ valueType?: (string|null);
- /**
- * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.documentai.v1beta3.NormalizedVertex.verify|verify} messages.
- * @param message NormalizedVertex message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** FormField correctedKeyText */
+ correctedKeyText?: (string|null);
- /**
- * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.NormalizedVertex.verify|verify} messages.
- * @param message NormalizedVertex message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** FormField correctedValueText */
+ correctedValueText?: (string|null);
- /**
- * Decodes a NormalizedVertex message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns NormalizedVertex
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.NormalizedVertex;
+ /** FormField provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+ }
- /**
- * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns NormalizedVertex
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.NormalizedVertex;
+ /** Represents a FormField. */
+ class FormField implements IFormField {
- /**
- * Verifies a NormalizedVertex message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Constructs a new FormField.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IFormField);
- /**
- * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns NormalizedVertex
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.NormalizedVertex;
+ /** FormField fieldName. */
+ public fieldName?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified.
- * @param message NormalizedVertex
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** FormField fieldValue. */
+ public fieldValue?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Converts this NormalizedVertex to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** FormField nameDetectedLanguages. */
+ public nameDetectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /**
- * Gets the default type url for NormalizedVertex
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** FormField valueDetectedLanguages. */
+ public valueDetectedLanguages: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage[];
- /** Properties of a BoundingPoly. */
- interface IBoundingPoly {
+ /** FormField valueType. */
+ public valueType: string;
- /** BoundingPoly vertices */
- vertices?: (google.cloud.documentai.v1beta3.IVertex[]|null);
+ /** FormField correctedKeyText. */
+ public correctedKeyText: string;
- /** BoundingPoly normalizedVertices */
- normalizedVertices?: (google.cloud.documentai.v1beta3.INormalizedVertex[]|null);
- }
+ /** FormField correctedValueText. */
+ public correctedValueText: string;
- /** Represents a BoundingPoly. */
- class BoundingPoly implements IBoundingPoly {
+ /** FormField provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
- /**
- * Constructs a new BoundingPoly.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IBoundingPoly);
+ /**
+ * Creates a new FormField instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FormField instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IFormField): google.cloud.documentai.v1beta3.Document.Page.FormField;
- /** BoundingPoly vertices. */
- public vertices: google.cloud.documentai.v1beta3.IVertex[];
+ /**
+ * Encodes the specified FormField message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.FormField.verify|verify} messages.
+ * @param message FormField message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IFormField, writer?: $protobuf.Writer): $protobuf.Writer;
- /** BoundingPoly normalizedVertices. */
- public normalizedVertices: google.cloud.documentai.v1beta3.INormalizedVertex[];
+ /**
+ * Encodes the specified FormField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.FormField.verify|verify} messages.
+ * @param message FormField message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IFormField, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a new BoundingPoly instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BoundingPoly instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IBoundingPoly): google.cloud.documentai.v1beta3.BoundingPoly;
+ /**
+ * Decodes a FormField message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FormField
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.FormField;
- /**
- * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.documentai.v1beta3.BoundingPoly.verify|verify} messages.
- * @param message BoundingPoly message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Decodes a FormField message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FormField
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.FormField;
- /**
- * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.BoundingPoly.verify|verify} messages.
- * @param message BoundingPoly message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a FormField message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Decodes a BoundingPoly message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BoundingPoly
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.BoundingPoly;
+ /**
+ * Creates a FormField message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FormField
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.FormField;
- /**
- * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BoundingPoly
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.BoundingPoly;
+ /**
+ * Creates a plain object from a FormField message. Also converts values to other types if specified.
+ * @param message FormField
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.FormField, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Verifies a BoundingPoly message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Converts this FormField to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BoundingPoly
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.BoundingPoly;
+ /**
+ * Gets the default type url for FormField
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
- * @param message BoundingPoly
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Properties of a DetectedBarcode. */
+ interface IDetectedBarcode {
- /**
- * Converts this BoundingPoly to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** DetectedBarcode layout */
+ layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /**
- * Gets the default type url for BoundingPoly
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** DetectedBarcode barcode */
+ barcode?: (google.cloud.documentai.v1beta3.IBarcode|null);
+ }
- /** Properties of a RawDocument. */
- interface IRawDocument {
+ /** Represents a DetectedBarcode. */
+ class DetectedBarcode implements IDetectedBarcode {
- /** RawDocument content */
- content?: (Uint8Array|string|null);
+ /**
+ * Constructs a new DetectedBarcode.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode);
- /** RawDocument mimeType */
- mimeType?: (string|null);
- }
+ /** DetectedBarcode layout. */
+ public layout?: (google.cloud.documentai.v1beta3.Document.Page.ILayout|null);
- /** Represents a RawDocument. */
- class RawDocument implements IRawDocument {
+ /** DetectedBarcode barcode. */
+ public barcode?: (google.cloud.documentai.v1beta3.IBarcode|null);
- /**
- * Constructs a new RawDocument.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IRawDocument);
+ /**
+ * Creates a new DetectedBarcode instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DetectedBarcode instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
- /** RawDocument content. */
- public content: (Uint8Array|string);
+ /**
+ * Encodes the specified DetectedBarcode message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify|verify} messages.
+ * @param message DetectedBarcode message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode, writer?: $protobuf.Writer): $protobuf.Writer;
- /** RawDocument mimeType. */
- public mimeType: string;
+ /**
+ * Encodes the specified DetectedBarcode message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify|verify} messages.
+ * @param message DetectedBarcode message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a new RawDocument instance using the specified properties.
- * @param [properties] Properties to set
- * @returns RawDocument instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IRawDocument): google.cloud.documentai.v1beta3.RawDocument;
+ /**
+ * Decodes a DetectedBarcode message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DetectedBarcode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
- /**
- * Encodes the specified RawDocument message. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocument.verify|verify} messages.
- * @param message RawDocument message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IRawDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Decodes a DetectedBarcode message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DetectedBarcode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
- /**
- * Encodes the specified RawDocument message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocument.verify|verify} messages.
- * @param message RawDocument message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IRawDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a DetectedBarcode message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Decodes a RawDocument message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns RawDocument
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.RawDocument;
+ /**
+ * Creates a DetectedBarcode message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DetectedBarcode
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode;
- /**
- * Decodes a RawDocument message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns RawDocument
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.RawDocument;
+ /**
+ * Creates a plain object from a DetectedBarcode message. Also converts values to other types if specified.
+ * @param message DetectedBarcode
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Verifies a RawDocument message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Converts this DetectedBarcode to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Creates a RawDocument message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns RawDocument
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.RawDocument;
+ /**
+ * Gets the default type url for DetectedBarcode
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a plain object from a RawDocument message. Also converts values to other types if specified.
- * @param message RawDocument
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.RawDocument, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Properties of a DetectedLanguage. */
+ interface IDetectedLanguage {
- /**
- * Converts this RawDocument to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** DetectedLanguage languageCode */
+ languageCode?: (string|null);
- /**
- * Gets the default type url for RawDocument
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** DetectedLanguage confidence */
+ confidence?: (number|null);
+ }
- /** Properties of a GcsDocument. */
- interface IGcsDocument {
+ /** Represents a DetectedLanguage. */
+ class DetectedLanguage implements IDetectedLanguage {
- /** GcsDocument gcsUri */
- gcsUri?: (string|null);
+ /**
+ * Constructs a new DetectedLanguage.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage);
- /** GcsDocument mimeType */
- mimeType?: (string|null);
- }
+ /** DetectedLanguage languageCode. */
+ public languageCode: string;
- /** Represents a GcsDocument. */
- class GcsDocument implements IGcsDocument {
+ /** DetectedLanguage confidence. */
+ public confidence: number;
- /**
- * Constructs a new GcsDocument.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IGcsDocument);
+ /**
+ * Creates a new DetectedLanguage instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DetectedLanguage instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
- /** GcsDocument gcsUri. */
- public gcsUri: string;
+ /**
+ * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify|verify} messages.
+ * @param message DetectedLanguage message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage, writer?: $protobuf.Writer): $protobuf.Writer;
- /** GcsDocument mimeType. */
- public mimeType: string;
+ /**
+ * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify|verify} messages.
+ * @param message DetectedLanguage message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a new GcsDocument instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GcsDocument instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IGcsDocument): google.cloud.documentai.v1beta3.GcsDocument;
+ /**
+ * Decodes a DetectedLanguage message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DetectedLanguage
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
- /**
- * Encodes the specified GcsDocument message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocument.verify|verify} messages.
- * @param message GcsDocument message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IGcsDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DetectedLanguage
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
- /**
- * Encodes the specified GcsDocument message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocument.verify|verify} messages.
- * @param message GcsDocument message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGcsDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a DetectedLanguage message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Decodes a GcsDocument message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GcsDocument
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GcsDocument;
+ /**
+ * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DetectedLanguage
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage;
- /**
- * Decodes a GcsDocument message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GcsDocument
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GcsDocument;
+ /**
+ * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
+ * @param message DetectedLanguage
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Verifies a GcsDocument message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Converts this DetectedLanguage to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Creates a GcsDocument message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GcsDocument
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GcsDocument;
+ /**
+ * Gets the default type url for DetectedLanguage
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImageQualityScores. */
+ interface IImageQualityScores {
+
+ /** ImageQualityScores qualityScore */
+ qualityScore?: (number|null);
+
+ /** ImageQualityScores detectedDefects */
+ detectedDefects?: (google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect[]|null);
+ }
+
+ /** Represents an ImageQualityScores. */
+ class ImageQualityScores implements IImageQualityScores {
+
+ /**
+ * Constructs a new ImageQualityScores.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores);
+
+ /** ImageQualityScores qualityScore. */
+ public qualityScore: number;
+
+ /** ImageQualityScores detectedDefects. */
+ public detectedDefects: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect[];
+
+ /**
+ * Creates a new ImageQualityScores instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImageQualityScores instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+
+ /**
+ * Encodes the specified ImageQualityScores message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify|verify} messages.
+ * @param message ImageQualityScores message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImageQualityScores message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify|verify} messages.
+ * @param message ImageQualityScores message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImageQualityScores message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImageQualityScores
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+
+ /**
+ * Decodes an ImageQualityScores message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImageQualityScores
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+
+ /**
+ * Verifies an ImageQualityScores message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an ImageQualityScores message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImageQualityScores
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores;
+
+ /**
+ * Creates a plain object from an ImageQualityScores message. Also converts values to other types if specified.
+ * @param message ImageQualityScores
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImageQualityScores to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImageQualityScores
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ImageQualityScores {
+
+ /** Properties of a DetectedDefect. */
+ interface IDetectedDefect {
+
+ /** DetectedDefect type */
+ type?: (string|null);
+
+ /** DetectedDefect confidence */
+ confidence?: (number|null);
+ }
+
+ /** Represents a DetectedDefect. */
+ class DetectedDefect implements IDetectedDefect {
+
+ /**
+ * Constructs a new DetectedDefect.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect);
+
+ /** DetectedDefect type. */
+ public type: string;
+
+ /** DetectedDefect confidence. */
+ public confidence: number;
+
+ /**
+ * Creates a new DetectedDefect instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DetectedDefect instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
+
+ /**
+ * Encodes the specified DetectedDefect message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.verify|verify} messages.
+ * @param message DetectedDefect message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DetectedDefect message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.verify|verify} messages.
+ * @param message DetectedDefect message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.IDetectedDefect, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DetectedDefect message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DetectedDefect
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
+
+ /**
+ * Decodes a DetectedDefect message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DetectedDefect
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
+
+ /**
+ * Verifies a DetectedDefect message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DetectedDefect message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DetectedDefect
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect;
+
+ /**
+ * Creates a plain object from a DetectedDefect message. Also converts values to other types if specified.
+ * @param message DetectedDefect
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DetectedDefect to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DetectedDefect
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+ }
+
+ /** Properties of an Entity. */
+ interface IEntity {
+
+ /** Entity textAnchor */
+ textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+
+ /** Entity type */
+ type?: (string|null);
+
+ /** Entity mentionText */
+ mentionText?: (string|null);
+
+ /** Entity mentionId */
+ mentionId?: (string|null);
+
+ /** Entity confidence */
+ confidence?: (number|null);
+
+ /** Entity pageAnchor */
+ pageAnchor?: (google.cloud.documentai.v1beta3.Document.IPageAnchor|null);
+
+ /** Entity id */
+ id?: (string|null);
+
+ /** Entity normalizedValue */
+ normalizedValue?: (google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue|null);
+
+ /** Entity properties */
+ properties?: (google.cloud.documentai.v1beta3.Document.IEntity[]|null);
+
+ /** Entity provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+
+ /** Entity redacted */
+ redacted?: (boolean|null);
+ }
+
+ /** Represents an Entity. */
+ class Entity implements IEntity {
+
+ /**
+ * Constructs a new Entity.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IEntity);
+
+ /** Entity textAnchor. */
+ public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+
+ /** Entity type. */
+ public type: string;
+
+ /** Entity mentionText. */
+ public mentionText: string;
+
+ /** Entity mentionId. */
+ public mentionId: string;
+
+ /** Entity confidence. */
+ public confidence: number;
+
+ /** Entity pageAnchor. */
+ public pageAnchor?: (google.cloud.documentai.v1beta3.Document.IPageAnchor|null);
+
+ /** Entity id. */
+ public id: string;
+
+ /** Entity normalizedValue. */
+ public normalizedValue?: (google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue|null);
+
+ /** Entity properties. */
+ public properties: google.cloud.documentai.v1beta3.Document.IEntity[];
+
+ /** Entity provenance. */
+ public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null);
+
+ /** Entity redacted. */
+ public redacted: boolean;
+
+ /**
+ * Creates a new Entity instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Entity instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IEntity): google.cloud.documentai.v1beta3.Document.Entity;
+
+ /**
+ * Encodes the specified Entity message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.verify|verify} messages.
+ * @param message Entity message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IEntity, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.verify|verify} messages.
+ * @param message Entity message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IEntity, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Entity message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Entity
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Entity;
+
+ /**
+ * Decodes an Entity message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Entity
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Entity;
+
+ /**
+ * Verifies an Entity message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Entity message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Entity
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Entity;
+
+ /**
+ * Creates a plain object from an Entity message. Also converts values to other types if specified.
+ * @param message Entity
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Entity to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Entity
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Entity {
+
+ /** Properties of a NormalizedValue. */
+ interface INormalizedValue {
+
+ /** NormalizedValue moneyValue */
+ moneyValue?: (google.type.IMoney|null);
+
+ /** NormalizedValue dateValue */
+ dateValue?: (google.type.IDate|null);
+
+ /** NormalizedValue datetimeValue */
+ datetimeValue?: (google.type.IDateTime|null);
+
+ /** NormalizedValue addressValue */
+ addressValue?: (google.type.IPostalAddress|null);
+
+ /** NormalizedValue booleanValue */
+ booleanValue?: (boolean|null);
+
+ /** NormalizedValue integerValue */
+ integerValue?: (number|null);
+
+ /** NormalizedValue floatValue */
+ floatValue?: (number|null);
+
+ /** NormalizedValue text */
+ text?: (string|null);
+ }
+
+ /** Represents a NormalizedValue. */
+ class NormalizedValue implements INormalizedValue {
+
+ /**
+ * Constructs a new NormalizedValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue);
+
+ /** NormalizedValue moneyValue. */
+ public moneyValue?: (google.type.IMoney|null);
+
+ /** NormalizedValue dateValue. */
+ public dateValue?: (google.type.IDate|null);
+
+ /** NormalizedValue datetimeValue. */
+ public datetimeValue?: (google.type.IDateTime|null);
+
+ /** NormalizedValue addressValue. */
+ public addressValue?: (google.type.IPostalAddress|null);
+
+ /** NormalizedValue booleanValue. */
+ public booleanValue?: (boolean|null);
+
+ /** NormalizedValue integerValue. */
+ public integerValue?: (number|null);
+
+ /** NormalizedValue floatValue. */
+ public floatValue?: (number|null);
+
+ /** NormalizedValue text. */
+ public text: string;
+
+ /** NormalizedValue structuredValue. */
+ public structuredValue?: ("moneyValue"|"dateValue"|"datetimeValue"|"addressValue"|"booleanValue"|"integerValue"|"floatValue");
+
+ /**
+ * Creates a new NormalizedValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns NormalizedValue instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+
+ /**
+ * Encodes the specified NormalizedValue message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue.verify|verify} messages.
+ * @param message NormalizedValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified NormalizedValue message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue.verify|verify} messages.
+ * @param message NormalizedValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Entity.INormalizedValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a NormalizedValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns NormalizedValue
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+
+ /**
+ * Decodes a NormalizedValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns NormalizedValue
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+
+ /**
+ * Verifies a NormalizedValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a NormalizedValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns NormalizedValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue;
+
+ /**
+ * Creates a plain object from a NormalizedValue message. Also converts values to other types if specified.
+ * @param message NormalizedValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this NormalizedValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for NormalizedValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an EntityRelation. */
+ interface IEntityRelation {
+
+ /** EntityRelation subjectId */
+ subjectId?: (string|null);
+
+ /** EntityRelation objectId */
+ objectId?: (string|null);
+
+ /** EntityRelation relation */
+ relation?: (string|null);
+ }
+
+ /** Represents an EntityRelation. */
+ class EntityRelation implements IEntityRelation {
+
+ /**
+ * Constructs a new EntityRelation.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IEntityRelation);
+
+ /** EntityRelation subjectId. */
+ public subjectId: string;
+
+ /** EntityRelation objectId. */
+ public objectId: string;
+
+ /** EntityRelation relation. */
+ public relation: string;
+
+ /**
+ * Creates a new EntityRelation instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EntityRelation instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IEntityRelation): google.cloud.documentai.v1beta3.Document.EntityRelation;
+
+ /**
+ * Encodes the specified EntityRelation message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.EntityRelation.verify|verify} messages.
+ * @param message EntityRelation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IEntityRelation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EntityRelation message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.EntityRelation.verify|verify} messages.
+ * @param message EntityRelation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IEntityRelation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EntityRelation message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EntityRelation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.EntityRelation;
+
+ /**
+ * Decodes an EntityRelation message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EntityRelation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.EntityRelation;
+
+ /**
+ * Verifies an EntityRelation message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EntityRelation message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EntityRelation
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.EntityRelation;
+
+ /**
+ * Creates a plain object from an EntityRelation message. Also converts values to other types if specified.
+ * @param message EntityRelation
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.EntityRelation, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EntityRelation to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EntityRelation
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TextAnchor. */
+ interface ITextAnchor {
+
+ /** TextAnchor textSegments */
+ textSegments?: (google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment[]|null);
+
+ /** TextAnchor content */
+ content?: (string|null);
+ }
+
+ /** Represents a TextAnchor. */
+ class TextAnchor implements ITextAnchor {
+
+ /**
+ * Constructs a new TextAnchor.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.ITextAnchor);
+
+ /** TextAnchor textSegments. */
+ public textSegments: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment[];
+
+ /** TextAnchor content. */
+ public content: string;
+
+ /**
+ * Creates a new TextAnchor instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TextAnchor instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.ITextAnchor): google.cloud.documentai.v1beta3.Document.TextAnchor;
+
+ /**
+ * Encodes the specified TextAnchor message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.verify|verify} messages.
+ * @param message TextAnchor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.ITextAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TextAnchor message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.verify|verify} messages.
+ * @param message TextAnchor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.ITextAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TextAnchor message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TextAnchor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.TextAnchor;
+
+ /**
+ * Decodes a TextAnchor message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TextAnchor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.TextAnchor;
+
+ /**
+ * Verifies a TextAnchor message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TextAnchor message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TextAnchor
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.TextAnchor;
+
+ /**
+ * Creates a plain object from a TextAnchor message. Also converts values to other types if specified.
+ * @param message TextAnchor
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.TextAnchor, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TextAnchor to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TextAnchor
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace TextAnchor {
+
+ /** Properties of a TextSegment. */
+ interface ITextSegment {
+
+ /** TextSegment startIndex */
+ startIndex?: (number|Long|string|null);
+
+ /** TextSegment endIndex */
+ endIndex?: (number|Long|string|null);
+ }
+
+ /** Represents a TextSegment. */
+ class TextSegment implements ITextSegment {
+
+ /**
+ * Constructs a new TextSegment.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment);
+
+ /** TextSegment startIndex. */
+ public startIndex: (number|Long|string);
+
+ /** TextSegment endIndex. */
+ public endIndex: (number|Long|string);
+
+ /**
+ * Creates a new TextSegment instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TextSegment instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+
+ /**
+ * Encodes the specified TextSegment message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment.verify|verify} messages.
+ * @param message TextSegment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TextSegment message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment.verify|verify} messages.
+ * @param message TextSegment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.TextAnchor.ITextSegment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TextSegment message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TextSegment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+
+ /**
+ * Decodes a TextSegment message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TextSegment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+
+ /**
+ * Verifies a TextSegment message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TextSegment message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TextSegment
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment;
+
+ /**
+ * Creates a plain object from a TextSegment message. Also converts values to other types if specified.
+ * @param message TextSegment
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TextSegment to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TextSegment
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a PageAnchor. */
+ interface IPageAnchor {
+
+ /** PageAnchor pageRefs */
+ pageRefs?: (google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef[]|null);
+ }
+
+ /** Represents a PageAnchor. */
+ class PageAnchor implements IPageAnchor {
+
+ /**
+ * Constructs a new PageAnchor.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IPageAnchor);
+
+ /** PageAnchor pageRefs. */
+ public pageRefs: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef[];
+
+ /**
+ * Creates a new PageAnchor instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PageAnchor instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IPageAnchor): google.cloud.documentai.v1beta3.Document.PageAnchor;
+
+ /**
+ * Encodes the specified PageAnchor message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.verify|verify} messages.
+ * @param message PageAnchor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IPageAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PageAnchor message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.verify|verify} messages.
+ * @param message PageAnchor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IPageAnchor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PageAnchor message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PageAnchor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.PageAnchor;
+
+ /**
+ * Decodes a PageAnchor message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PageAnchor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.PageAnchor;
+
+ /**
+ * Verifies a PageAnchor message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PageAnchor message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PageAnchor
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.PageAnchor;
+
+ /**
+ * Creates a plain object from a PageAnchor message. Also converts values to other types if specified.
+ * @param message PageAnchor
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.PageAnchor, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PageAnchor to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PageAnchor
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace PageAnchor {
+
+ /** Properties of a PageRef. */
+ interface IPageRef {
+
+ /** PageRef page */
+ page?: (number|Long|string|null);
- /**
- * Creates a plain object from a GcsDocument message. Also converts values to other types if specified.
- * @param message GcsDocument
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.GcsDocument, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** PageRef layoutType */
+ layoutType?: (google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType|keyof typeof google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType|null);
- /**
- * Converts this GcsDocument to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** PageRef layoutId */
+ layoutId?: (string|null);
- /**
- * Gets the default type url for GcsDocument
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** PageRef boundingPoly */
+ boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
- /** Properties of a GcsDocuments. */
- interface IGcsDocuments {
+ /** PageRef confidence */
+ confidence?: (number|null);
+ }
- /** GcsDocuments documents */
- documents?: (google.cloud.documentai.v1beta3.IGcsDocument[]|null);
- }
+ /** Represents a PageRef. */
+ class PageRef implements IPageRef {
- /** Represents a GcsDocuments. */
- class GcsDocuments implements IGcsDocuments {
+ /**
+ * Constructs a new PageRef.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef);
- /**
- * Constructs a new GcsDocuments.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IGcsDocuments);
+ /** PageRef page. */
+ public page: (number|Long|string);
- /** GcsDocuments documents. */
- public documents: google.cloud.documentai.v1beta3.IGcsDocument[];
+ /** PageRef layoutType. */
+ public layoutType: (google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType|keyof typeof google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.LayoutType);
- /**
- * Creates a new GcsDocuments instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GcsDocuments instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IGcsDocuments): google.cloud.documentai.v1beta3.GcsDocuments;
+ /** PageRef layoutId. */
+ public layoutId: string;
- /**
- * Encodes the specified GcsDocuments message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocuments.verify|verify} messages.
- * @param message GcsDocuments message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IGcsDocuments, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** PageRef boundingPoly. */
+ public boundingPoly?: (google.cloud.documentai.v1beta3.IBoundingPoly|null);
- /**
- * Encodes the specified GcsDocuments message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocuments.verify|verify} messages.
- * @param message GcsDocuments message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGcsDocuments, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** PageRef confidence. */
+ public confidence: number;
- /**
- * Decodes a GcsDocuments message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GcsDocuments
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GcsDocuments;
+ /**
+ * Creates a new PageRef instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PageRef instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
- /**
- * Decodes a GcsDocuments message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GcsDocuments
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GcsDocuments;
+ /**
+ * Encodes the specified PageRef message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.verify|verify} messages.
+ * @param message PageRef message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Verifies a GcsDocuments message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Encodes the specified PageRef message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef.verify|verify} messages.
+ * @param message PageRef message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.PageAnchor.IPageRef, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a GcsDocuments message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GcsDocuments
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GcsDocuments;
+ /**
+ * Decodes a PageRef message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PageRef
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
- /**
- * Creates a plain object from a GcsDocuments message. Also converts values to other types if specified.
- * @param message GcsDocuments
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.GcsDocuments, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Decodes a PageRef message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PageRef
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
- /**
- * Converts this GcsDocuments to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Verifies a PageRef message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Gets the default type url for GcsDocuments
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Creates a PageRef message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PageRef
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef;
- /** Properties of a GcsPrefix. */
- interface IGcsPrefix {
+ /**
+ * Creates a plain object from a PageRef message. Also converts values to other types if specified.
+ * @param message PageRef
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.PageAnchor.PageRef, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** GcsPrefix gcsUriPrefix */
- gcsUriPrefix?: (string|null);
- }
+ /**
+ * Converts this PageRef to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** Represents a GcsPrefix. */
- class GcsPrefix implements IGcsPrefix {
+ /**
+ * Gets the default type url for PageRef
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Constructs a new GcsPrefix.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IGcsPrefix);
+ namespace PageRef {
- /** GcsPrefix gcsUriPrefix. */
- public gcsUriPrefix: string;
+ /** LayoutType enum. */
+ enum LayoutType {
+ LAYOUT_TYPE_UNSPECIFIED = 0,
+ BLOCK = 1,
+ PARAGRAPH = 2,
+ LINE = 3,
+ TOKEN = 4,
+ VISUAL_ELEMENT = 5,
+ TABLE = 6,
+ FORM_FIELD = 7
+ }
+ }
+ }
- /**
- * Creates a new GcsPrefix instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GcsPrefix instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IGcsPrefix): google.cloud.documentai.v1beta3.GcsPrefix;
+ /** Properties of a Provenance. */
+ interface IProvenance {
- /**
- * Encodes the specified GcsPrefix message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsPrefix.verify|verify} messages.
- * @param message GcsPrefix message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IGcsPrefix, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Provenance revision */
+ revision?: (number|null);
- /**
- * Encodes the specified GcsPrefix message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsPrefix.verify|verify} messages.
- * @param message GcsPrefix message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGcsPrefix, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Provenance id */
+ id?: (number|null);
- /**
- * Decodes a GcsPrefix message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GcsPrefix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GcsPrefix;
+ /** Provenance parents */
+ parents?: (google.cloud.documentai.v1beta3.Document.Provenance.IParent[]|null);
- /**
- * Decodes a GcsPrefix message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GcsPrefix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GcsPrefix;
+ /** Provenance type */
+ type?: (google.cloud.documentai.v1beta3.Document.Provenance.OperationType|keyof typeof google.cloud.documentai.v1beta3.Document.Provenance.OperationType|null);
+ }
- /**
- * Verifies a GcsPrefix message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Represents a Provenance. */
+ class Provenance implements IProvenance {
- /**
- * Creates a GcsPrefix message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GcsPrefix
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GcsPrefix;
+ /**
+ * Constructs a new Provenance.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IProvenance);
- /**
- * Creates a plain object from a GcsPrefix message. Also converts values to other types if specified.
- * @param message GcsPrefix
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.GcsPrefix, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Provenance revision. */
+ public revision: number;
- /**
- * Converts this GcsPrefix to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** Provenance id. */
+ public id: number;
- /**
- * Gets the default type url for GcsPrefix
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** Provenance parents. */
+ public parents: google.cloud.documentai.v1beta3.Document.Provenance.IParent[];
- /** Properties of a BatchDocumentsInputConfig. */
- interface IBatchDocumentsInputConfig {
+ /** Provenance type. */
+ public type: (google.cloud.documentai.v1beta3.Document.Provenance.OperationType|keyof typeof google.cloud.documentai.v1beta3.Document.Provenance.OperationType);
- /** BatchDocumentsInputConfig gcsPrefix */
- gcsPrefix?: (google.cloud.documentai.v1beta3.IGcsPrefix|null);
+ /**
+ * Creates a new Provenance instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Provenance instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IProvenance): google.cloud.documentai.v1beta3.Document.Provenance;
- /** BatchDocumentsInputConfig gcsDocuments */
- gcsDocuments?: (google.cloud.documentai.v1beta3.IGcsDocuments|null);
- }
+ /**
+ * Encodes the specified Provenance message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.verify|verify} messages.
+ * @param message Provenance message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IProvenance, writer?: $protobuf.Writer): $protobuf.Writer;
- /** Represents a BatchDocumentsInputConfig. */
- class BatchDocumentsInputConfig implements IBatchDocumentsInputConfig {
+ /**
+ * Encodes the specified Provenance message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.verify|verify} messages.
+ * @param message Provenance message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IProvenance, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Constructs a new BatchDocumentsInputConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig);
+ /**
+ * Decodes a Provenance message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Provenance
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Provenance;
- /** BatchDocumentsInputConfig gcsPrefix. */
- public gcsPrefix?: (google.cloud.documentai.v1beta3.IGcsPrefix|null);
+ /**
+ * Decodes a Provenance message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Provenance
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Provenance;
- /** BatchDocumentsInputConfig gcsDocuments. */
- public gcsDocuments?: (google.cloud.documentai.v1beta3.IGcsDocuments|null);
+ /**
+ * Verifies a Provenance message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** BatchDocumentsInputConfig source. */
- public source?: ("gcsPrefix"|"gcsDocuments");
+ /**
+ * Creates a Provenance message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Provenance
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Provenance;
- /**
- * Creates a new BatchDocumentsInputConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BatchDocumentsInputConfig instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+ /**
+ * Creates a plain object from a Provenance message. Also converts values to other types if specified.
+ * @param message Provenance
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Provenance, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Encodes the specified BatchDocumentsInputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.verify|verify} messages.
- * @param message BatchDocumentsInputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Converts this Provenance to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Encodes the specified BatchDocumentsInputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.verify|verify} messages.
- * @param message BatchDocumentsInputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Gets the default type url for Provenance
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Decodes a BatchDocumentsInputConfig message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BatchDocumentsInputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+ namespace Provenance {
- /**
- * Decodes a BatchDocumentsInputConfig message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BatchDocumentsInputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+ /** Properties of a Parent. */
+ interface IParent {
- /**
- * Verifies a BatchDocumentsInputConfig message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** Parent revision */
+ revision?: (number|null);
- /**
- * Creates a BatchDocumentsInputConfig message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BatchDocumentsInputConfig
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.BatchDocumentsInputConfig;
+ /** Parent index */
+ index?: (number|null);
- /**
- * Creates a plain object from a BatchDocumentsInputConfig message. Also converts values to other types if specified.
- * @param message BatchDocumentsInputConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.BatchDocumentsInputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Parent id */
+ id?: (number|null);
+ }
- /**
- * Converts this BatchDocumentsInputConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** Represents a Parent. */
+ class Parent implements IParent {
- /**
- * Gets the default type url for BatchDocumentsInputConfig
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Constructs a new Parent.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Provenance.IParent);
- /** Properties of a DocumentOutputConfig. */
- interface IDocumentOutputConfig {
+ /** Parent revision. */
+ public revision: number;
- /** DocumentOutputConfig gcsOutputConfig */
- gcsOutputConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig|null);
- }
+ /** Parent index. */
+ public index: number;
- /** Represents a DocumentOutputConfig. */
- class DocumentOutputConfig implements IDocumentOutputConfig {
+ /** Parent id. */
+ public id: number;
+
+ /**
+ * Creates a new Parent instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Parent instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Provenance.IParent): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
- /**
- * Constructs a new DocumentOutputConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IDocumentOutputConfig);
+ /**
+ * Encodes the specified Parent message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.Parent.verify|verify} messages.
+ * @param message Parent message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Provenance.IParent, writer?: $protobuf.Writer): $protobuf.Writer;
- /** DocumentOutputConfig gcsOutputConfig. */
- public gcsOutputConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig|null);
+ /**
+ * Encodes the specified Parent message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Provenance.Parent.verify|verify} messages.
+ * @param message Parent message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Provenance.IParent, writer?: $protobuf.Writer): $protobuf.Writer;
- /** DocumentOutputConfig destination. */
- public destination?: "gcsOutputConfig";
+ /**
+ * Decodes a Parent message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Parent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
- /**
- * Creates a new DocumentOutputConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DocumentOutputConfig instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IDocumentOutputConfig): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+ /**
+ * Decodes a Parent message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Parent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
- /**
- * Encodes the specified DocumentOutputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.verify|verify} messages.
- * @param message DocumentOutputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IDocumentOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Verifies a Parent message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Encodes the specified DocumentOutputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.verify|verify} messages.
- * @param message DocumentOutputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocumentOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a Parent message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Parent
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Provenance.Parent;
- /**
- * Decodes a DocumentOutputConfig message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DocumentOutputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+ /**
+ * Creates a plain object from a Parent message. Also converts values to other types if specified.
+ * @param message Parent
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Provenance.Parent, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Decodes a DocumentOutputConfig message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DocumentOutputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+ /**
+ * Converts this Parent to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Verifies a DocumentOutputConfig message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Gets the default type url for Parent
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /**
- * Creates a DocumentOutputConfig message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DocumentOutputConfig
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentOutputConfig;
+ /** OperationType enum. */
+ enum OperationType {
+ OPERATION_TYPE_UNSPECIFIED = 0,
+ ADD = 1,
+ REMOVE = 2,
+ UPDATE = 7,
+ REPLACE = 3,
+ EVAL_REQUESTED = 4,
+ EVAL_APPROVED = 5,
+ EVAL_SKIPPED = 6
+ }
+ }
- /**
- * Creates a plain object from a DocumentOutputConfig message. Also converts values to other types if specified.
- * @param message DocumentOutputConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /** Properties of a Revision. */
+ interface IRevision {
- /**
- * Converts this DocumentOutputConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** Revision agent */
+ agent?: (string|null);
- /**
- * Gets the default type url for DocumentOutputConfig
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** Revision processor */
+ processor?: (string|null);
- namespace DocumentOutputConfig {
+ /** Revision id */
+ id?: (string|null);
- /** Properties of a GcsOutputConfig. */
- interface IGcsOutputConfig {
+ /** Revision parent */
+ parent?: (number[]|null);
- /** GcsOutputConfig gcsUri */
- gcsUri?: (string|null);
+ /** Revision parentIds */
+ parentIds?: (string[]|null);
- /** GcsOutputConfig fieldMask */
- fieldMask?: (google.protobuf.IFieldMask|null);
+ /** Revision createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
- /** GcsOutputConfig shardingConfig */
- shardingConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig|null);
+ /** Revision humanReview */
+ humanReview?: (google.cloud.documentai.v1beta3.Document.Revision.IHumanReview|null);
}
- /** Represents a GcsOutputConfig. */
- class GcsOutputConfig implements IGcsOutputConfig {
+ /** Represents a Revision. */
+ class Revision implements IRevision {
/**
- * Constructs a new GcsOutputConfig.
+ * Constructs a new Revision.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.IRevision);
- /** GcsOutputConfig gcsUri. */
- public gcsUri: string;
+ /** Revision agent. */
+ public agent?: (string|null);
- /** GcsOutputConfig fieldMask. */
- public fieldMask?: (google.protobuf.IFieldMask|null);
+ /** Revision processor. */
+ public processor?: (string|null);
- /** GcsOutputConfig shardingConfig. */
- public shardingConfig?: (google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig|null);
+ /** Revision id. */
+ public id: string;
+
+ /** Revision parent. */
+ public parent: number[];
+
+ /** Revision parentIds. */
+ public parentIds: string[];
+
+ /** Revision createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** Revision humanReview. */
+ public humanReview?: (google.cloud.documentai.v1beta3.Document.Revision.IHumanReview|null);
+
+ /** Revision source. */
+ public source?: ("agent"|"processor");
/**
- * Creates a new GcsOutputConfig instance using the specified properties.
+ * Creates a new Revision instance using the specified properties.
* @param [properties] Properties to set
- * @returns GcsOutputConfig instance
+ * @returns Revision instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.IRevision): google.cloud.documentai.v1beta3.Document.Revision;
/**
- * Encodes the specified GcsOutputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify|verify} messages.
- * @param message GcsOutputConfig message or plain object to encode
+ * Encodes the specified Revision message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.verify|verify} messages.
+ * @param message Revision message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.IRevision, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified GcsOutputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify|verify} messages.
- * @param message GcsOutputConfig message or plain object to encode
+ * Encodes the specified Revision message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.verify|verify} messages.
+ * @param message Revision message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.IRevision, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a GcsOutputConfig message from the specified reader or buffer.
+ * Decodes a Revision message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns GcsOutputConfig
+ * @returns Revision
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Revision;
/**
- * Decodes a GcsOutputConfig message from the specified reader or buffer, length delimited.
+ * Decodes a Revision message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns GcsOutputConfig
+ * @returns Revision
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Revision;
/**
- * Verifies a GcsOutputConfig message.
+ * Verifies a Revision message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a GcsOutputConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a Revision message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns GcsOutputConfig
+ * @returns Revision
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Revision;
/**
- * Creates a plain object from a GcsOutputConfig message. Also converts values to other types if specified.
- * @param message GcsOutputConfig
+ * Creates a plain object from a Revision message. Also converts values to other types if specified.
+ * @param message Revision
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Revision, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this GcsOutputConfig to JSON.
+ * Converts this Revision to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for GcsOutputConfig
+ * Gets the default type url for Revision
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace GcsOutputConfig {
+ namespace Revision {
- /** Properties of a ShardingConfig. */
- interface IShardingConfig {
+ /** Properties of a HumanReview. */
+ interface IHumanReview {
- /** ShardingConfig pagesPerShard */
- pagesPerShard?: (number|null);
+ /** HumanReview state */
+ state?: (string|null);
- /** ShardingConfig pagesOverlap */
- pagesOverlap?: (number|null);
+ /** HumanReview stateMessage */
+ stateMessage?: (string|null);
}
- /** Represents a ShardingConfig. */
- class ShardingConfig implements IShardingConfig {
+ /** Represents a HumanReview. */
+ class HumanReview implements IHumanReview {
/**
- * Constructs a new ShardingConfig.
+ * Constructs a new HumanReview.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig);
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview);
- /** ShardingConfig pagesPerShard. */
- public pagesPerShard: number;
+ /** HumanReview state. */
+ public state: string;
- /** ShardingConfig pagesOverlap. */
- public pagesOverlap: number;
+ /** HumanReview stateMessage. */
+ public stateMessage: string;
/**
- * Creates a new ShardingConfig instance using the specified properties.
+ * Creates a new HumanReview instance using the specified properties.
* @param [properties] Properties to set
- * @returns ShardingConfig instance
+ * @returns HumanReview instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
/**
- * Encodes the specified ShardingConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify|verify} messages.
- * @param message ShardingConfig message or plain object to encode
+ * Encodes the specified HumanReview message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.HumanReview.verify|verify} messages.
+ * @param message HumanReview message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified ShardingConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify|verify} messages.
- * @param message ShardingConfig message or plain object to encode
+ * Encodes the specified HumanReview message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Revision.HumanReview.verify|verify} messages.
+ * @param message HumanReview message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.Revision.IHumanReview, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a ShardingConfig message from the specified reader or buffer.
+ * Decodes a HumanReview message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns ShardingConfig
+ * @returns HumanReview
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
/**
- * Decodes a ShardingConfig message from the specified reader or buffer, length delimited.
+ * Decodes a HumanReview message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns ShardingConfig
+ * @returns HumanReview
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
/**
- * Verifies a ShardingConfig message.
+ * Verifies a HumanReview message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a ShardingConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a HumanReview message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns ShardingConfig
+ * @returns HumanReview
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.Revision.HumanReview;
+
+ /**
+ * Creates a plain object from a HumanReview message. Also converts values to other types if specified.
+ * @param message HumanReview
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.Revision.HumanReview, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this HumanReview to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for HumanReview
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a TextChange. */
+ interface ITextChange {
+
+ /** TextChange textAnchor */
+ textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+
+ /** TextChange changedText */
+ changedText?: (string|null);
+
+ /** TextChange provenance */
+ provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance[]|null);
+ }
+
+ /** Represents a TextChange. */
+ class TextChange implements ITextChange {
+
+ /**
+ * Constructs a new TextChange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.Document.ITextChange);
+
+ /** TextChange textAnchor. */
+ public textAnchor?: (google.cloud.documentai.v1beta3.Document.ITextAnchor|null);
+
+ /** TextChange changedText. */
+ public changedText: string;
+
+ /** TextChange provenance. */
+ public provenance: google.cloud.documentai.v1beta3.Document.IProvenance[];
+
+ /**
+ * Creates a new TextChange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TextChange instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.Document.ITextChange): google.cloud.documentai.v1beta3.Document.TextChange;
+
+ /**
+ * Encodes the specified TextChange message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextChange.verify|verify} messages.
+ * @param message TextChange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.Document.ITextChange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TextChange message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.TextChange.verify|verify} messages.
+ * @param message TextChange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.Document.ITextChange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TextChange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TextChange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Document.TextChange;
+
+ /**
+ * Decodes a TextChange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TextChange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Document.TextChange;
+
+ /**
+ * Verifies a TextChange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TextChange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TextChange
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Document.TextChange;
+
+ /**
+ * Creates a plain object from a TextChange message. Also converts values to other types if specified.
+ * @param message TextChange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Document.TextChange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TextChange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TextChange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a Vertex. */
+ interface IVertex {
+
+ /** Vertex x */
+ x?: (number|null);
+
+ /** Vertex y */
+ y?: (number|null);
+ }
+
+ /** Represents a Vertex. */
+ class Vertex implements IVertex {
+
+ /**
+ * Constructs a new Vertex.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IVertex);
+
+ /** Vertex x. */
+ public x: number;
+
+ /** Vertex y. */
+ public y: number;
+
+ /**
+ * Creates a new Vertex instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Vertex instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IVertex): google.cloud.documentai.v1beta3.Vertex;
+
+ /**
+ * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.documentai.v1beta3.Vertex.verify|verify} messages.
+ * @param message Vertex message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IVertex, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Vertex.verify|verify} messages.
+ * @param message Vertex message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IVertex, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Vertex message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Vertex
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.Vertex;
- /**
- * Creates a plain object from a ShardingConfig message. Also converts values to other types if specified.
- * @param message ShardingConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Decodes a Vertex message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Vertex
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.Vertex;
- /**
- * Converts this ShardingConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Verifies a Vertex message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Gets the default type url for ShardingConfig
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
- }
+ /**
+ * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Vertex
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Vertex;
- /** Properties of an OcrConfig. */
- interface IOcrConfig {
+ /**
+ * Creates a plain object from a Vertex message. Also converts values to other types if specified.
+ * @param message Vertex
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.Vertex, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** OcrConfig hints */
- hints?: (google.cloud.documentai.v1beta3.OcrConfig.IHints|null);
+ /**
+ * Converts this Vertex to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** OcrConfig enableNativePdfParsing */
- enableNativePdfParsing?: (boolean|null);
+ /**
+ * Gets the default type url for Vertex
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** OcrConfig enableImageQualityScores */
- enableImageQualityScores?: (boolean|null);
+ /** Properties of a NormalizedVertex. */
+ interface INormalizedVertex {
- /** OcrConfig advancedOcrOptions */
- advancedOcrOptions?: (string[]|null);
+ /** NormalizedVertex x */
+ x?: (number|null);
- /** OcrConfig enableSymbol */
- enableSymbol?: (boolean|null);
+ /** NormalizedVertex y */
+ y?: (number|null);
}
- /** Represents an OcrConfig. */
- class OcrConfig implements IOcrConfig {
+ /** Represents a NormalizedVertex. */
+ class NormalizedVertex implements INormalizedVertex {
/**
- * Constructs a new OcrConfig.
+ * Constructs a new NormalizedVertex.
* @param [properties] Properties to set
*/
- constructor(properties?: google.cloud.documentai.v1beta3.IOcrConfig);
-
- /** OcrConfig hints. */
- public hints?: (google.cloud.documentai.v1beta3.OcrConfig.IHints|null);
-
- /** OcrConfig enableNativePdfParsing. */
- public enableNativePdfParsing: boolean;
-
- /** OcrConfig enableImageQualityScores. */
- public enableImageQualityScores: boolean;
+ constructor(properties?: google.cloud.documentai.v1beta3.INormalizedVertex);
- /** OcrConfig advancedOcrOptions. */
- public advancedOcrOptions: string[];
+ /** NormalizedVertex x. */
+ public x: number;
- /** OcrConfig enableSymbol. */
- public enableSymbol: boolean;
+ /** NormalizedVertex y. */
+ public y: number;
/**
- * Creates a new OcrConfig instance using the specified properties.
+ * Creates a new NormalizedVertex instance using the specified properties.
* @param [properties] Properties to set
- * @returns OcrConfig instance
+ * @returns NormalizedVertex instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.IOcrConfig): google.cloud.documentai.v1beta3.OcrConfig;
+ public static create(properties?: google.cloud.documentai.v1beta3.INormalizedVertex): google.cloud.documentai.v1beta3.NormalizedVertex;
/**
- * Encodes the specified OcrConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.verify|verify} messages.
- * @param message OcrConfig message or plain object to encode
+ * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.documentai.v1beta3.NormalizedVertex.verify|verify} messages.
+ * @param message NormalizedVertex message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.IOcrConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified OcrConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.verify|verify} messages.
- * @param message OcrConfig message or plain object to encode
+ * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.NormalizedVertex.verify|verify} messages.
+ * @param message NormalizedVertex message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IOcrConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes an OcrConfig message from the specified reader or buffer.
+ * Decodes a NormalizedVertex message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns OcrConfig
+ * @returns NormalizedVertex
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.OcrConfig;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.NormalizedVertex;
/**
- * Decodes an OcrConfig message from the specified reader or buffer, length delimited.
+ * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns OcrConfig
+ * @returns NormalizedVertex
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.OcrConfig;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.NormalizedVertex;
/**
- * Verifies an OcrConfig message.
+ * Verifies a NormalizedVertex message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates an OcrConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns OcrConfig
+ * @returns NormalizedVertex
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.OcrConfig;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.NormalizedVertex;
/**
- * Creates a plain object from an OcrConfig message. Also converts values to other types if specified.
- * @param message OcrConfig
+ * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified.
+ * @param message NormalizedVertex
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.OcrConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this OcrConfig to JSON.
+ * Converts this NormalizedVertex to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for OcrConfig
+ * Gets the default type url for NormalizedVertex
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace OcrConfig {
+ /** Properties of a BoundingPoly. */
+ interface IBoundingPoly {
- /** Properties of a Hints. */
- interface IHints {
+ /** BoundingPoly vertices */
+ vertices?: (google.cloud.documentai.v1beta3.IVertex[]|null);
- /** Hints languageHints */
- languageHints?: (string[]|null);
- }
+ /** BoundingPoly normalizedVertices */
+ normalizedVertices?: (google.cloud.documentai.v1beta3.INormalizedVertex[]|null);
+ }
- /** Represents a Hints. */
- class Hints implements IHints {
+ /** Represents a BoundingPoly. */
+ class BoundingPoly implements IBoundingPoly {
- /**
- * Constructs a new Hints.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.OcrConfig.IHints);
+ /**
+ * Constructs a new BoundingPoly.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IBoundingPoly);
- /** Hints languageHints. */
- public languageHints: string[];
+ /** BoundingPoly vertices. */
+ public vertices: google.cloud.documentai.v1beta3.IVertex[];
- /**
- * Creates a new Hints instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Hints instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.OcrConfig.IHints): google.cloud.documentai.v1beta3.OcrConfig.Hints;
+ /** BoundingPoly normalizedVertices. */
+ public normalizedVertices: google.cloud.documentai.v1beta3.INormalizedVertex[];
- /**
- * Encodes the specified Hints message. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.Hints.verify|verify} messages.
- * @param message Hints message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.OcrConfig.IHints, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a new BoundingPoly instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BoundingPoly instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IBoundingPoly): google.cloud.documentai.v1beta3.BoundingPoly;
- /**
- * Encodes the specified Hints message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.Hints.verify|verify} messages.
- * @param message Hints message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.OcrConfig.IHints, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.documentai.v1beta3.BoundingPoly.verify|verify} messages.
+ * @param message BoundingPoly message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Hints message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Hints
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.OcrConfig.Hints;
+ /**
+ * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.BoundingPoly.verify|verify} messages.
+ * @param message BoundingPoly message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a Hints message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Hints
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.OcrConfig.Hints;
+ /**
+ * Decodes a BoundingPoly message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BoundingPoly
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.BoundingPoly;
- /**
- * Verifies a Hints message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BoundingPoly
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.BoundingPoly;
- /**
- * Creates a Hints message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Hints
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.OcrConfig.Hints;
+ /**
+ * Verifies a BoundingPoly message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a plain object from a Hints message. Also converts values to other types if specified.
- * @param message Hints
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.OcrConfig.Hints, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BoundingPoly
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.BoundingPoly;
- /**
- * Converts this Hints to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
+ * @param message BoundingPoly
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Gets the default type url for Hints
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Converts this BoundingPoly to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BoundingPoly
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Represents a DocumentProcessorService */
@@ -33459,6 +35253,9 @@ export namespace google {
/** Properties of a TrainProcessorVersionRequest. */
interface ITrainProcessorVersionRequest {
+ /** TrainProcessorVersionRequest customDocumentExtractionOptions */
+ customDocumentExtractionOptions?: (google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.ICustomDocumentExtractionOptions|null);
+
/** TrainProcessorVersionRequest parent */
parent?: (string|null);
@@ -33484,6 +35281,9 @@ export namespace google {
*/
constructor(properties?: google.cloud.documentai.v1beta3.ITrainProcessorVersionRequest);
+ /** TrainProcessorVersionRequest customDocumentExtractionOptions. */
+ public customDocumentExtractionOptions?: (google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.ICustomDocumentExtractionOptions|null);
+
/** TrainProcessorVersionRequest parent. */
public parent: string;
@@ -33499,6 +35299,9 @@ export namespace google {
/** TrainProcessorVersionRequest baseProcessorVersion. */
public baseProcessorVersion: string;
+ /** TrainProcessorVersionRequest processorFlags. */
+ public processorFlags?: "customDocumentExtractionOptions";
+
/**
* Creates a new TrainProcessorVersionRequest instance using the specified properties.
* @param [properties] Properties to set
@@ -33681,6 +35484,113 @@ export namespace google {
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+
+ /** Properties of a CustomDocumentExtractionOptions. */
+ interface ICustomDocumentExtractionOptions {
+
+ /** CustomDocumentExtractionOptions trainingMethod */
+ trainingMethod?: (google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod|keyof typeof google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod|null);
+ }
+
+ /** Represents a CustomDocumentExtractionOptions. */
+ class CustomDocumentExtractionOptions implements ICustomDocumentExtractionOptions {
+
+ /**
+ * Constructs a new CustomDocumentExtractionOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.ICustomDocumentExtractionOptions);
+
+ /** CustomDocumentExtractionOptions trainingMethod. */
+ public trainingMethod: (google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod|keyof typeof google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.TrainingMethod);
+
+ /**
+ * Creates a new CustomDocumentExtractionOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CustomDocumentExtractionOptions instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.ICustomDocumentExtractionOptions): google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions;
+
+ /**
+ * Encodes the specified CustomDocumentExtractionOptions message. Does not implicitly {@link google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.verify|verify} messages.
+ * @param message CustomDocumentExtractionOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.ICustomDocumentExtractionOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CustomDocumentExtractionOptions message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions.verify|verify} messages.
+ * @param message CustomDocumentExtractionOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.ICustomDocumentExtractionOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CustomDocumentExtractionOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CustomDocumentExtractionOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions;
+
+ /**
+ * Decodes a CustomDocumentExtractionOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CustomDocumentExtractionOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions;
+
+ /**
+ * Verifies a CustomDocumentExtractionOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CustomDocumentExtractionOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CustomDocumentExtractionOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions;
+
+ /**
+ * Creates a plain object from a CustomDocumentExtractionOptions message. Also converts values to other types if specified.
+ * @param message CustomDocumentExtractionOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.TrainProcessorVersionRequest.CustomDocumentExtractionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CustomDocumentExtractionOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CustomDocumentExtractionOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace CustomDocumentExtractionOptions {
+
+ /** TrainingMethod enum. */
+ enum TrainingMethod {
+ TRAINING_METHOD_UNSPECIFIED = 0,
+ MODEL_BASED = 1,
+ TEMPLATE_BASED = 2
+ }
+ }
}
/** Properties of a TrainProcessorVersionResponse. */
@@ -35231,664 +37141,86 @@ export namespace google {
constructor(properties?: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata);
/** ImportProcessorVersionMetadata commonMetadata. */
- public commonMetadata?: (google.cloud.documentai.v1beta3.ICommonOperationMetadata|null);
-
- /**
- * Creates a new ImportProcessorVersionMetadata instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ImportProcessorVersionMetadata instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
-
- /**
- * Encodes the specified ImportProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata.verify|verify} messages.
- * @param message ImportProcessorVersionMetadata message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ImportProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata.verify|verify} messages.
- * @param message ImportProcessorVersionMetadata message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an ImportProcessorVersionMetadata message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ImportProcessorVersionMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
-
- /**
- * Decodes an ImportProcessorVersionMetadata message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ImportProcessorVersionMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
-
- /**
- * Verifies an ImportProcessorVersionMetadata message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an ImportProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ImportProcessorVersionMetadata
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
-
- /**
- * Creates a plain object from an ImportProcessorVersionMetadata message. Also converts values to other types if specified.
- * @param message ImportProcessorVersionMetadata
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ImportProcessorVersionMetadata to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ImportProcessorVersionMetadata
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a DocumentSchema. */
- interface IDocumentSchema {
-
- /** DocumentSchema displayName */
- displayName?: (string|null);
-
- /** DocumentSchema description */
- description?: (string|null);
-
- /** DocumentSchema entityTypes */
- entityTypes?: (google.cloud.documentai.v1beta3.DocumentSchema.IEntityType[]|null);
-
- /** DocumentSchema metadata */
- metadata?: (google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null);
- }
-
- /** Represents a DocumentSchema. */
- class DocumentSchema implements IDocumentSchema {
-
- /**
- * Constructs a new DocumentSchema.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.IDocumentSchema);
-
- /** DocumentSchema displayName. */
- public displayName: string;
-
- /** DocumentSchema description. */
- public description: string;
-
- /** DocumentSchema entityTypes. */
- public entityTypes: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType[];
-
- /** DocumentSchema metadata. */
- public metadata?: (google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null);
+ public commonMetadata?: (google.cloud.documentai.v1beta3.ICommonOperationMetadata|null);
/**
- * Creates a new DocumentSchema instance using the specified properties.
+ * Creates a new ImportProcessorVersionMetadata instance using the specified properties.
* @param [properties] Properties to set
- * @returns DocumentSchema instance
+ * @returns ImportProcessorVersionMetadata instance
*/
- public static create(properties?: google.cloud.documentai.v1beta3.IDocumentSchema): google.cloud.documentai.v1beta3.DocumentSchema;
+ public static create(properties?: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
/**
- * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.verify|verify} messages.
- * @param message DocumentSchema message or plain object to encode
+ * Encodes the specified ImportProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata.verify|verify} messages.
+ * @param message ImportProcessorVersionMetadata message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.cloud.documentai.v1beta3.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.verify|verify} messages.
- * @param message DocumentSchema message or plain object to encode
+ * Encodes the specified ImportProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata.verify|verify} messages.
+ * @param message ImportProcessorVersionMetadata message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocumentSchema, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IImportProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a DocumentSchema message from the specified reader or buffer.
+ * Decodes an ImportProcessorVersionMetadata message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns DocumentSchema
+ * @returns ImportProcessorVersionMetadata
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
/**
- * Decodes a DocumentSchema message from the specified reader or buffer, length delimited.
+ * Decodes an ImportProcessorVersionMetadata message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns DocumentSchema
+ * @returns ImportProcessorVersionMetadata
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
/**
- * Verifies a DocumentSchema message.
+ * Verifies an ImportProcessorVersionMetadata message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a DocumentSchema message from a plain object. Also converts values to their respective internal types.
+ * Creates an ImportProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns DocumentSchema
+ * @returns ImportProcessorVersionMetadata
*/
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema;
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata;
/**
- * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified.
- * @param message DocumentSchema
+ * Creates a plain object from an ImportProcessorVersionMetadata message. Also converts values to other types if specified.
+ * @param message ImportProcessorVersionMetadata
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this DocumentSchema to JSON.
+ * Converts this ImportProcessorVersionMetadata to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for DocumentSchema
+ * Gets the default type url for ImportProcessorVersionMetadata
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace DocumentSchema {
-
- /** Properties of an EntityType. */
- interface IEntityType {
-
- /** EntityType enumValues */
- enumValues?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null);
-
- /** EntityType displayName */
- displayName?: (string|null);
-
- /** EntityType name */
- name?: (string|null);
-
- /** EntityType baseTypes */
- baseTypes?: (string[]|null);
-
- /** EntityType properties */
- properties?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty[]|null);
- }
-
- /** Represents an EntityType. */
- class EntityType implements IEntityType {
-
- /**
- * Constructs a new EntityType.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType);
-
- /** EntityType enumValues. */
- public enumValues?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null);
-
- /** EntityType displayName. */
- public displayName: string;
-
- /** EntityType name. */
- public name: string;
-
- /** EntityType baseTypes. */
- public baseTypes: string[];
-
- /** EntityType properties. */
- public properties: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty[];
-
- /** EntityType valueSource. */
- public valueSource?: "enumValues";
-
- /**
- * Creates a new EntityType instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EntityType instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
-
- /**
- * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify|verify} messages.
- * @param message EntityType message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify|verify} messages.
- * @param message EntityType message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EntityType message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EntityType
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
-
- /**
- * Decodes an EntityType message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EntityType
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
-
- /**
- * Verifies an EntityType message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an EntityType message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EntityType
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.EntityType;
-
- /**
- * Creates a plain object from an EntityType message. Also converts values to other types if specified.
- * @param message EntityType
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EntityType to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EntityType
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace EntityType {
-
- /** Properties of an EnumValues. */
- interface IEnumValues {
-
- /** EnumValues values */
- values?: (string[]|null);
- }
-
- /** Represents an EnumValues. */
- class EnumValues implements IEnumValues {
-
- /**
- * Constructs a new EnumValues.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues);
-
- /** EnumValues values. */
- public values: string[];
-
- /**
- * Creates a new EnumValues instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EnumValues instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
-
- /**
- * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify|verify} messages.
- * @param message EnumValues message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify|verify} messages.
- * @param message EnumValues message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EnumValues message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EnumValues
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
-
- /**
- * Decodes an EnumValues message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EnumValues
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
-
- /**
- * Verifies an EnumValues message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an EnumValues message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EnumValues
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues;
-
- /**
- * Creates a plain object from an EnumValues message. Also converts values to other types if specified.
- * @param message EnumValues
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EnumValues to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EnumValues
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Property. */
- interface IProperty {
-
- /** Property name */
- name?: (string|null);
-
- /** Property valueType */
- valueType?: (string|null);
-
- /** Property occurrenceType */
- occurrenceType?: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|null);
- }
-
- /** Represents a Property. */
- class Property implements IProperty {
-
- /**
- * Constructs a new Property.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty);
-
- /** Property name. */
- public name: string;
-
- /** Property valueType. */
- public valueType: string;
-
- /** Property occurrenceType. */
- public occurrenceType: (google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|keyof typeof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType);
-
- /**
- * Creates a new Property instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Property instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
-
- /**
- * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify|verify} messages.
- * @param message Property message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify|verify} messages.
- * @param message Property message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Property message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Property
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
-
- /**
- * Decodes a Property message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Property
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
-
- /**
- * Verifies a Property message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Property message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Property
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property;
-
- /**
- * Creates a plain object from a Property message. Also converts values to other types if specified.
- * @param message Property
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Property to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Property
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Property {
-
- /** OccurrenceType enum. */
- enum OccurrenceType {
- OCCURRENCE_TYPE_UNSPECIFIED = 0,
- OPTIONAL_ONCE = 1,
- OPTIONAL_MULTIPLE = 2,
- REQUIRED_ONCE = 3,
- REQUIRED_MULTIPLE = 4
- }
- }
- }
-
- /** Properties of a Metadata. */
- interface IMetadata {
-
- /** Metadata documentSplitter */
- documentSplitter?: (boolean|null);
-
- /** Metadata documentAllowMultipleLabels */
- documentAllowMultipleLabels?: (boolean|null);
-
- /** Metadata prefixedNamingOnProperties */
- prefixedNamingOnProperties?: (boolean|null);
-
- /** Metadata skipNamingValidation */
- skipNamingValidation?: (boolean|null);
- }
-
- /** Represents a Metadata. */
- class Metadata implements IMetadata {
-
- /**
- * Constructs a new Metadata.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata);
-
- /** Metadata documentSplitter. */
- public documentSplitter: boolean;
-
- /** Metadata documentAllowMultipleLabels. */
- public documentAllowMultipleLabels: boolean;
-
- /** Metadata prefixedNamingOnProperties. */
- public prefixedNamingOnProperties: boolean;
-
- /** Metadata skipNamingValidation. */
- public skipNamingValidation: boolean;
-
- /**
- * Creates a new Metadata instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Metadata instance
- */
- public static create(properties?: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
-
- /**
- * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify|verify} messages.
- * @param message Metadata message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify|verify} messages.
- * @param message Metadata message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.documentai.v1beta3.DocumentSchema.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Metadata message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Metadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
-
- /**
- * Decodes a Metadata message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Metadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
-
- /**
- * Verifies a Metadata message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Metadata message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Metadata
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.DocumentSchema.Metadata;
-
- /**
- * Creates a plain object from a Metadata message. Also converts values to other types if specified.
- * @param message Metadata
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.documentai.v1beta3.DocumentSchema.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Metadata to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Metadata
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
/** Properties of an EvaluationReference. */
interface IEvaluationReference {
@@ -37056,7 +38388,8 @@ export namespace google {
UNDEPLOYING = 4,
CREATING = 5,
DELETING = 6,
- FAILED = 7
+ FAILED = 7,
+ IMPORTING = 8
}
}
@@ -37446,6 +38779,499 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
+
+ /** Represents a DocumentService */
+ class DocumentService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new DocumentService service.
+ * @param rpcImpl RPC implementation
+ * @param [requestDelimited=false] Whether requests are length-delimited
+ * @param [responseDelimited=false] Whether responses are length-delimited
+ */
+ constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
+
+ /**
+ * Creates new DocumentService service using the specified rpc implementation.
+ * @param rpcImpl RPC implementation
+ * @param [requestDelimited=false] Whether requests are length-delimited
+ * @param [responseDelimited=false] Whether responses are length-delimited
+ * @returns RPC service. Useful where requests and/or responses are streamed.
+ */
+ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DocumentService;
+
+ /**
+ * Calls UpdateDataset.
+ * @param request UpdateDatasetRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Operation
+ */
+ public updateDataset(request: google.cloud.documentai.v1beta3.IUpdateDatasetRequest, callback: google.cloud.documentai.v1beta3.DocumentService.UpdateDatasetCallback): void;
+
+ /**
+ * Calls UpdateDataset.
+ * @param request UpdateDatasetRequest message or plain object
+ * @returns Promise
+ */
+ public updateDataset(request: google.cloud.documentai.v1beta3.IUpdateDatasetRequest): Promise;
+
+ /**
+ * Calls GetDatasetSchema.
+ * @param request GetDatasetSchemaRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and DatasetSchema
+ */
+ public getDatasetSchema(request: google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest, callback: google.cloud.documentai.v1beta3.DocumentService.GetDatasetSchemaCallback): void;
+
+ /**
+ * Calls GetDatasetSchema.
+ * @param request GetDatasetSchemaRequest message or plain object
+ * @returns Promise
+ */
+ public getDatasetSchema(request: google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest): Promise;
+
+ /**
+ * Calls UpdateDatasetSchema.
+ * @param request UpdateDatasetSchemaRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and DatasetSchema
+ */
+ public updateDatasetSchema(request: google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest, callback: google.cloud.documentai.v1beta3.DocumentService.UpdateDatasetSchemaCallback): void;
+
+ /**
+ * Calls UpdateDatasetSchema.
+ * @param request UpdateDatasetSchemaRequest message or plain object
+ * @returns Promise
+ */
+ public updateDatasetSchema(request: google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest): Promise;
+ }
+
+ namespace DocumentService {
+
+ /**
+ * Callback as used by {@link google.cloud.documentai.v1beta3.DocumentService|updateDataset}.
+ * @param error Error, if any
+ * @param [response] Operation
+ */
+ type UpdateDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.documentai.v1beta3.DocumentService|getDatasetSchema}.
+ * @param error Error, if any
+ * @param [response] DatasetSchema
+ */
+ type GetDatasetSchemaCallback = (error: (Error|null), response?: google.cloud.documentai.v1beta3.DatasetSchema) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.documentai.v1beta3.DocumentService|updateDatasetSchema}.
+ * @param error Error, if any
+ * @param [response] DatasetSchema
+ */
+ type UpdateDatasetSchemaCallback = (error: (Error|null), response?: google.cloud.documentai.v1beta3.DatasetSchema) => void;
+ }
+
+ /** Properties of an UpdateDatasetRequest. */
+ interface IUpdateDatasetRequest {
+
+ /** UpdateDatasetRequest dataset */
+ dataset?: (google.cloud.documentai.v1beta3.IDataset|null);
+
+ /** UpdateDatasetRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateDatasetRequest. */
+ class UpdateDatasetRequest implements IUpdateDatasetRequest {
+
+ /**
+ * Constructs a new UpdateDatasetRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IUpdateDatasetRequest);
+
+ /** UpdateDatasetRequest dataset. */
+ public dataset?: (google.cloud.documentai.v1beta3.IDataset|null);
+
+ /** UpdateDatasetRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateDatasetRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateDatasetRequest instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IUpdateDatasetRequest): google.cloud.documentai.v1beta3.UpdateDatasetRequest;
+
+ /**
+ * Encodes the specified UpdateDatasetRequest message. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateDatasetRequest.verify|verify} messages.
+ * @param message UpdateDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateDatasetRequest.verify|verify} messages.
+ * @param message UpdateDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IUpdateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateDatasetRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.UpdateDatasetRequest;
+
+ /**
+ * Decodes an UpdateDatasetRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.UpdateDatasetRequest;
+
+ /**
+ * Verifies an UpdateDatasetRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UpdateDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateDatasetRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.UpdateDatasetRequest;
+
+ /**
+ * Creates a plain object from an UpdateDatasetRequest message. Also converts values to other types if specified.
+ * @param message UpdateDatasetRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.UpdateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateDatasetRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateDatasetRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateDatasetOperationMetadata. */
+ interface IUpdateDatasetOperationMetadata {
+
+ /** UpdateDatasetOperationMetadata commonMetadata */
+ commonMetadata?: (google.cloud.documentai.v1beta3.ICommonOperationMetadata|null);
+ }
+
+ /** Represents an UpdateDatasetOperationMetadata. */
+ class UpdateDatasetOperationMetadata implements IUpdateDatasetOperationMetadata {
+
+ /**
+ * Constructs a new UpdateDatasetOperationMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IUpdateDatasetOperationMetadata);
+
+ /** UpdateDatasetOperationMetadata commonMetadata. */
+ public commonMetadata?: (google.cloud.documentai.v1beta3.ICommonOperationMetadata|null);
+
+ /**
+ * Creates a new UpdateDatasetOperationMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateDatasetOperationMetadata instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IUpdateDatasetOperationMetadata): google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata;
+
+ /**
+ * Encodes the specified UpdateDatasetOperationMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata.verify|verify} messages.
+ * @param message UpdateDatasetOperationMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IUpdateDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata.verify|verify} messages.
+ * @param message UpdateDatasetOperationMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IUpdateDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateDatasetOperationMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateDatasetOperationMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata;
+
+ /**
+ * Decodes an UpdateDatasetOperationMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateDatasetOperationMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata;
+
+ /**
+ * Verifies an UpdateDatasetOperationMetadata message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UpdateDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateDatasetOperationMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata;
+
+ /**
+ * Creates a plain object from an UpdateDatasetOperationMetadata message. Also converts values to other types if specified.
+ * @param message UpdateDatasetOperationMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.UpdateDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateDatasetOperationMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateDatasetOperationMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetDatasetSchemaRequest. */
+ interface IGetDatasetSchemaRequest {
+
+ /** GetDatasetSchemaRequest name */
+ name?: (string|null);
+
+ /** GetDatasetSchemaRequest visibleFieldsOnly */
+ visibleFieldsOnly?: (boolean|null);
+ }
+
+ /** Represents a GetDatasetSchemaRequest. */
+ class GetDatasetSchemaRequest implements IGetDatasetSchemaRequest {
+
+ /**
+ * Constructs a new GetDatasetSchemaRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest);
+
+ /** GetDatasetSchemaRequest name. */
+ public name: string;
+
+ /** GetDatasetSchemaRequest visibleFieldsOnly. */
+ public visibleFieldsOnly: boolean;
+
+ /**
+ * Creates a new GetDatasetSchemaRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetDatasetSchemaRequest instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest): google.cloud.documentai.v1beta3.GetDatasetSchemaRequest;
+
+ /**
+ * Encodes the specified GetDatasetSchemaRequest message. Does not implicitly {@link google.cloud.documentai.v1beta3.GetDatasetSchemaRequest.verify|verify} messages.
+ * @param message GetDatasetSchemaRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetDatasetSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GetDatasetSchemaRequest.verify|verify} messages.
+ * @param message GetDatasetSchemaRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetDatasetSchemaRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetDatasetSchemaRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.GetDatasetSchemaRequest;
+
+ /**
+ * Decodes a GetDatasetSchemaRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetDatasetSchemaRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.GetDatasetSchemaRequest;
+
+ /**
+ * Verifies a GetDatasetSchemaRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetDatasetSchemaRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetDatasetSchemaRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.GetDatasetSchemaRequest;
+
+ /**
+ * Creates a plain object from a GetDatasetSchemaRequest message. Also converts values to other types if specified.
+ * @param message GetDatasetSchemaRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.GetDatasetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetDatasetSchemaRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetDatasetSchemaRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateDatasetSchemaRequest. */
+ interface IUpdateDatasetSchemaRequest {
+
+ /** UpdateDatasetSchemaRequest datasetSchema */
+ datasetSchema?: (google.cloud.documentai.v1beta3.IDatasetSchema|null);
+
+ /** UpdateDatasetSchemaRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateDatasetSchemaRequest. */
+ class UpdateDatasetSchemaRequest implements IUpdateDatasetSchemaRequest {
+
+ /**
+ * Constructs a new UpdateDatasetSchemaRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest);
+
+ /** UpdateDatasetSchemaRequest datasetSchema. */
+ public datasetSchema?: (google.cloud.documentai.v1beta3.IDatasetSchema|null);
+
+ /** UpdateDatasetSchemaRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateDatasetSchemaRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateDatasetSchemaRequest instance
+ */
+ public static create(properties?: google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest): google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest;
+
+ /**
+ * Encodes the specified UpdateDatasetSchemaRequest message. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest.verify|verify} messages.
+ * @param message UpdateDatasetSchemaRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateDatasetSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest.verify|verify} messages.
+ * @param message UpdateDatasetSchemaRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateDatasetSchemaRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateDatasetSchemaRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest;
+
+ /**
+ * Decodes an UpdateDatasetSchemaRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateDatasetSchemaRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest;
+
+ /**
+ * Verifies an UpdateDatasetSchemaRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UpdateDatasetSchemaRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateDatasetSchemaRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest;
+
+ /**
+ * Creates a plain object from an UpdateDatasetSchemaRequest message. Also converts values to other types if specified.
+ * @param message UpdateDatasetSchemaRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateDatasetSchemaRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateDatasetSchemaRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
}
}
}
diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js
index c90616ef955..712340a4078 100644
--- a/packages/google-cloud-documentai/protos/protos.js
+++ b/packages/google-cloud-documentai/protos/protos.js
@@ -4674,6 +4674,7 @@
* @property {google.cloud.documentai.v1.Document.Page.Token.IDetectedBreak|null} [detectedBreak] Token detectedBreak
* @property {Array.|null} [detectedLanguages] Token detectedLanguages
* @property {google.cloud.documentai.v1.Document.IProvenance|null} [provenance] Token provenance
+ * @property {google.cloud.documentai.v1.Document.Page.Token.IStyleInfo|null} [styleInfo] Token styleInfo
*/
/**
@@ -4724,6 +4725,14 @@
*/
Token.prototype.provenance = null;
+ /**
+ * Token styleInfo.
+ * @member {google.cloud.documentai.v1.Document.Page.Token.IStyleInfo|null|undefined} styleInfo
+ * @memberof google.cloud.documentai.v1.Document.Page.Token
+ * @instance
+ */
+ Token.prototype.styleInfo = null;
+
/**
* Creates a new Token instance using the specified properties.
* @function create
@@ -4757,6 +4766,8 @@
$root.google.cloud.documentai.v1.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
$root.google.cloud.documentai.v1.Document.Provenance.encode(message.provenance, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.styleInfo != null && Object.hasOwnProperty.call(message, "styleInfo"))
+ $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo.encode(message.styleInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
return writer;
};
@@ -4809,6 +4820,10 @@
message.provenance = $root.google.cloud.documentai.v1.Document.Provenance.decode(reader, reader.uint32());
break;
}
+ case 5: {
+ message.styleInfo = $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo.decode(reader, reader.uint32());
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -4868,6 +4883,11 @@
if (error)
return "provenance." + error;
}
+ if (message.styleInfo != null && message.hasOwnProperty("styleInfo")) {
+ var error = $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo.verify(message.styleInfo);
+ if (error)
+ return "styleInfo." + error;
+ }
return null;
};
@@ -4908,6 +4928,11 @@
throw TypeError(".google.cloud.documentai.v1.Document.Page.Token.provenance: object expected");
message.provenance = $root.google.cloud.documentai.v1.Document.Provenance.fromObject(object.provenance);
}
+ if (object.styleInfo != null) {
+ if (typeof object.styleInfo !== "object")
+ throw TypeError(".google.cloud.documentai.v1.Document.Page.Token.styleInfo: object expected");
+ message.styleInfo = $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo.fromObject(object.styleInfo);
+ }
return message;
};
@@ -4930,6 +4955,7 @@
object.layout = null;
object.detectedBreak = null;
object.provenance = null;
+ object.styleInfo = null;
}
if (message.layout != null && message.hasOwnProperty("layout"))
object.layout = $root.google.cloud.documentai.v1.Document.Page.Layout.toObject(message.layout, options);
@@ -4942,6 +4968,8 @@
}
if (message.provenance != null && message.hasOwnProperty("provenance"))
object.provenance = $root.google.cloud.documentai.v1.Document.Provenance.toObject(message.provenance, options);
+ if (message.styleInfo != null && message.hasOwnProperty("styleInfo"))
+ object.styleInfo = $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo.toObject(message.styleInfo, options);
return object;
};
@@ -5221,6 +5249,542 @@
return DetectedBreak;
})();
+ Token.StyleInfo = (function() {
+
+ /**
+ * Properties of a StyleInfo.
+ * @memberof google.cloud.documentai.v1.Document.Page.Token
+ * @interface IStyleInfo
+ * @property {number|null} [fontSize] StyleInfo fontSize
+ * @property {number|null} [pixelFontSize] StyleInfo pixelFontSize
+ * @property {number|null} [letterSpacing] StyleInfo letterSpacing
+ * @property {string|null} [fontType] StyleInfo fontType
+ * @property {boolean|null} [bold] StyleInfo bold
+ * @property {boolean|null} [italic] StyleInfo italic
+ * @property {boolean|null} [underlined] StyleInfo underlined
+ * @property {boolean|null} [strikeout] StyleInfo strikeout
+ * @property {boolean|null} [subscript] StyleInfo subscript
+ * @property {boolean|null} [superscript] StyleInfo superscript
+ * @property {boolean|null} [smallcaps] StyleInfo smallcaps
+ * @property {number|null} [fontWeight] StyleInfo fontWeight
+ * @property {boolean|null} [handwritten] StyleInfo handwritten
+ * @property {google.type.IColor|null} [textColor] StyleInfo textColor
+ * @property {google.type.IColor|null} [backgroundColor] StyleInfo backgroundColor
+ */
+
+ /**
+ * Constructs a new StyleInfo.
+ * @memberof google.cloud.documentai.v1.Document.Page.Token
+ * @classdesc Represents a StyleInfo.
+ * @implements IStyleInfo
+ * @constructor
+ * @param {google.cloud.documentai.v1.Document.Page.Token.IStyleInfo=} [properties] Properties to set
+ */
+ function StyleInfo(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * StyleInfo fontSize.
+ * @member {number} fontSize
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.fontSize = 0;
+
+ /**
+ * StyleInfo pixelFontSize.
+ * @member {number} pixelFontSize
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.pixelFontSize = 0;
+
+ /**
+ * StyleInfo letterSpacing.
+ * @member {number} letterSpacing
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.letterSpacing = 0;
+
+ /**
+ * StyleInfo fontType.
+ * @member {string} fontType
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.fontType = "";
+
+ /**
+ * StyleInfo bold.
+ * @member {boolean} bold
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.bold = false;
+
+ /**
+ * StyleInfo italic.
+ * @member {boolean} italic
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.italic = false;
+
+ /**
+ * StyleInfo underlined.
+ * @member {boolean} underlined
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.underlined = false;
+
+ /**
+ * StyleInfo strikeout.
+ * @member {boolean} strikeout
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.strikeout = false;
+
+ /**
+ * StyleInfo subscript.
+ * @member {boolean} subscript
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.subscript = false;
+
+ /**
+ * StyleInfo superscript.
+ * @member {boolean} superscript
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.superscript = false;
+
+ /**
+ * StyleInfo smallcaps.
+ * @member {boolean} smallcaps
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.smallcaps = false;
+
+ /**
+ * StyleInfo fontWeight.
+ * @member {number} fontWeight
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.fontWeight = 0;
+
+ /**
+ * StyleInfo handwritten.
+ * @member {boolean} handwritten
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.handwritten = false;
+
+ /**
+ * StyleInfo textColor.
+ * @member {google.type.IColor|null|undefined} textColor
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.textColor = null;
+
+ /**
+ * StyleInfo backgroundColor.
+ * @member {google.type.IColor|null|undefined} backgroundColor
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ */
+ StyleInfo.prototype.backgroundColor = null;
+
+ /**
+ * Creates a new StyleInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {google.cloud.documentai.v1.Document.Page.Token.IStyleInfo=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1.Document.Page.Token.StyleInfo} StyleInfo instance
+ */
+ StyleInfo.create = function create(properties) {
+ return new StyleInfo(properties);
+ };
+
+ /**
+ * Encodes the specified StyleInfo message. Does not implicitly {@link google.cloud.documentai.v1.Document.Page.Token.StyleInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {google.cloud.documentai.v1.Document.Page.Token.IStyleInfo} message StyleInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ StyleInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.fontSize != null && Object.hasOwnProperty.call(message, "fontSize"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fontSize);
+ if (message.pixelFontSize != null && Object.hasOwnProperty.call(message, "pixelFontSize"))
+ writer.uint32(/* id 2, wireType 1 =*/17).double(message.pixelFontSize);
+ if (message.letterSpacing != null && Object.hasOwnProperty.call(message, "letterSpacing"))
+ writer.uint32(/* id 3, wireType 1 =*/25).double(message.letterSpacing);
+ if (message.fontType != null && Object.hasOwnProperty.call(message, "fontType"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.fontType);
+ if (message.bold != null && Object.hasOwnProperty.call(message, "bold"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.bold);
+ if (message.italic != null && Object.hasOwnProperty.call(message, "italic"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.italic);
+ if (message.underlined != null && Object.hasOwnProperty.call(message, "underlined"))
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.underlined);
+ if (message.strikeout != null && Object.hasOwnProperty.call(message, "strikeout"))
+ writer.uint32(/* id 8, wireType 0 =*/64).bool(message.strikeout);
+ if (message.subscript != null && Object.hasOwnProperty.call(message, "subscript"))
+ writer.uint32(/* id 9, wireType 0 =*/72).bool(message.subscript);
+ if (message.superscript != null && Object.hasOwnProperty.call(message, "superscript"))
+ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.superscript);
+ if (message.smallcaps != null && Object.hasOwnProperty.call(message, "smallcaps"))
+ writer.uint32(/* id 11, wireType 0 =*/88).bool(message.smallcaps);
+ if (message.fontWeight != null && Object.hasOwnProperty.call(message, "fontWeight"))
+ writer.uint32(/* id 12, wireType 0 =*/96).int32(message.fontWeight);
+ if (message.handwritten != null && Object.hasOwnProperty.call(message, "handwritten"))
+ writer.uint32(/* id 13, wireType 0 =*/104).bool(message.handwritten);
+ if (message.textColor != null && Object.hasOwnProperty.call(message, "textColor"))
+ $root.google.type.Color.encode(message.textColor, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
+ if (message.backgroundColor != null && Object.hasOwnProperty.call(message, "backgroundColor"))
+ $root.google.type.Color.encode(message.backgroundColor, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified StyleInfo message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.Page.Token.StyleInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {google.cloud.documentai.v1.Document.Page.Token.IStyleInfo} message StyleInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ StyleInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a StyleInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1.Document.Page.Token.StyleInfo} StyleInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ StyleInfo.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.fontSize = reader.int32();
+ break;
+ }
+ case 2: {
+ message.pixelFontSize = reader.double();
+ break;
+ }
+ case 3: {
+ message.letterSpacing = reader.double();
+ break;
+ }
+ case 4: {
+ message.fontType = reader.string();
+ break;
+ }
+ case 5: {
+ message.bold = reader.bool();
+ break;
+ }
+ case 6: {
+ message.italic = reader.bool();
+ break;
+ }
+ case 7: {
+ message.underlined = reader.bool();
+ break;
+ }
+ case 8: {
+ message.strikeout = reader.bool();
+ break;
+ }
+ case 9: {
+ message.subscript = reader.bool();
+ break;
+ }
+ case 10: {
+ message.superscript = reader.bool();
+ break;
+ }
+ case 11: {
+ message.smallcaps = reader.bool();
+ break;
+ }
+ case 12: {
+ message.fontWeight = reader.int32();
+ break;
+ }
+ case 13: {
+ message.handwritten = reader.bool();
+ break;
+ }
+ case 14: {
+ message.textColor = $root.google.type.Color.decode(reader, reader.uint32());
+ break;
+ }
+ case 15: {
+ message.backgroundColor = $root.google.type.Color.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a StyleInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1.Document.Page.Token.StyleInfo} StyleInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ StyleInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a StyleInfo message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ StyleInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.fontSize != null && message.hasOwnProperty("fontSize"))
+ if (!$util.isInteger(message.fontSize))
+ return "fontSize: integer expected";
+ if (message.pixelFontSize != null && message.hasOwnProperty("pixelFontSize"))
+ if (typeof message.pixelFontSize !== "number")
+ return "pixelFontSize: number expected";
+ if (message.letterSpacing != null && message.hasOwnProperty("letterSpacing"))
+ if (typeof message.letterSpacing !== "number")
+ return "letterSpacing: number expected";
+ if (message.fontType != null && message.hasOwnProperty("fontType"))
+ if (!$util.isString(message.fontType))
+ return "fontType: string expected";
+ if (message.bold != null && message.hasOwnProperty("bold"))
+ if (typeof message.bold !== "boolean")
+ return "bold: boolean expected";
+ if (message.italic != null && message.hasOwnProperty("italic"))
+ if (typeof message.italic !== "boolean")
+ return "italic: boolean expected";
+ if (message.underlined != null && message.hasOwnProperty("underlined"))
+ if (typeof message.underlined !== "boolean")
+ return "underlined: boolean expected";
+ if (message.strikeout != null && message.hasOwnProperty("strikeout"))
+ if (typeof message.strikeout !== "boolean")
+ return "strikeout: boolean expected";
+ if (message.subscript != null && message.hasOwnProperty("subscript"))
+ if (typeof message.subscript !== "boolean")
+ return "subscript: boolean expected";
+ if (message.superscript != null && message.hasOwnProperty("superscript"))
+ if (typeof message.superscript !== "boolean")
+ return "superscript: boolean expected";
+ if (message.smallcaps != null && message.hasOwnProperty("smallcaps"))
+ if (typeof message.smallcaps !== "boolean")
+ return "smallcaps: boolean expected";
+ if (message.fontWeight != null && message.hasOwnProperty("fontWeight"))
+ if (!$util.isInteger(message.fontWeight))
+ return "fontWeight: integer expected";
+ if (message.handwritten != null && message.hasOwnProperty("handwritten"))
+ if (typeof message.handwritten !== "boolean")
+ return "handwritten: boolean expected";
+ if (message.textColor != null && message.hasOwnProperty("textColor")) {
+ var error = $root.google.type.Color.verify(message.textColor);
+ if (error)
+ return "textColor." + error;
+ }
+ if (message.backgroundColor != null && message.hasOwnProperty("backgroundColor")) {
+ var error = $root.google.type.Color.verify(message.backgroundColor);
+ if (error)
+ return "backgroundColor." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a StyleInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1.Document.Page.Token.StyleInfo} StyleInfo
+ */
+ StyleInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo)
+ return object;
+ var message = new $root.google.cloud.documentai.v1.Document.Page.Token.StyleInfo();
+ if (object.fontSize != null)
+ message.fontSize = object.fontSize | 0;
+ if (object.pixelFontSize != null)
+ message.pixelFontSize = Number(object.pixelFontSize);
+ if (object.letterSpacing != null)
+ message.letterSpacing = Number(object.letterSpacing);
+ if (object.fontType != null)
+ message.fontType = String(object.fontType);
+ if (object.bold != null)
+ message.bold = Boolean(object.bold);
+ if (object.italic != null)
+ message.italic = Boolean(object.italic);
+ if (object.underlined != null)
+ message.underlined = Boolean(object.underlined);
+ if (object.strikeout != null)
+ message.strikeout = Boolean(object.strikeout);
+ if (object.subscript != null)
+ message.subscript = Boolean(object.subscript);
+ if (object.superscript != null)
+ message.superscript = Boolean(object.superscript);
+ if (object.smallcaps != null)
+ message.smallcaps = Boolean(object.smallcaps);
+ if (object.fontWeight != null)
+ message.fontWeight = object.fontWeight | 0;
+ if (object.handwritten != null)
+ message.handwritten = Boolean(object.handwritten);
+ if (object.textColor != null) {
+ if (typeof object.textColor !== "object")
+ throw TypeError(".google.cloud.documentai.v1.Document.Page.Token.StyleInfo.textColor: object expected");
+ message.textColor = $root.google.type.Color.fromObject(object.textColor);
+ }
+ if (object.backgroundColor != null) {
+ if (typeof object.backgroundColor !== "object")
+ throw TypeError(".google.cloud.documentai.v1.Document.Page.Token.StyleInfo.backgroundColor: object expected");
+ message.backgroundColor = $root.google.type.Color.fromObject(object.backgroundColor);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a StyleInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {google.cloud.documentai.v1.Document.Page.Token.StyleInfo} message StyleInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ StyleInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.fontSize = 0;
+ object.pixelFontSize = 0;
+ object.letterSpacing = 0;
+ object.fontType = "";
+ object.bold = false;
+ object.italic = false;
+ object.underlined = false;
+ object.strikeout = false;
+ object.subscript = false;
+ object.superscript = false;
+ object.smallcaps = false;
+ object.fontWeight = 0;
+ object.handwritten = false;
+ object.textColor = null;
+ object.backgroundColor = null;
+ }
+ if (message.fontSize != null && message.hasOwnProperty("fontSize"))
+ object.fontSize = message.fontSize;
+ if (message.pixelFontSize != null && message.hasOwnProperty("pixelFontSize"))
+ object.pixelFontSize = options.json && !isFinite(message.pixelFontSize) ? String(message.pixelFontSize) : message.pixelFontSize;
+ if (message.letterSpacing != null && message.hasOwnProperty("letterSpacing"))
+ object.letterSpacing = options.json && !isFinite(message.letterSpacing) ? String(message.letterSpacing) : message.letterSpacing;
+ if (message.fontType != null && message.hasOwnProperty("fontType"))
+ object.fontType = message.fontType;
+ if (message.bold != null && message.hasOwnProperty("bold"))
+ object.bold = message.bold;
+ if (message.italic != null && message.hasOwnProperty("italic"))
+ object.italic = message.italic;
+ if (message.underlined != null && message.hasOwnProperty("underlined"))
+ object.underlined = message.underlined;
+ if (message.strikeout != null && message.hasOwnProperty("strikeout"))
+ object.strikeout = message.strikeout;
+ if (message.subscript != null && message.hasOwnProperty("subscript"))
+ object.subscript = message.subscript;
+ if (message.superscript != null && message.hasOwnProperty("superscript"))
+ object.superscript = message.superscript;
+ if (message.smallcaps != null && message.hasOwnProperty("smallcaps"))
+ object.smallcaps = message.smallcaps;
+ if (message.fontWeight != null && message.hasOwnProperty("fontWeight"))
+ object.fontWeight = message.fontWeight;
+ if (message.handwritten != null && message.hasOwnProperty("handwritten"))
+ object.handwritten = message.handwritten;
+ if (message.textColor != null && message.hasOwnProperty("textColor"))
+ object.textColor = $root.google.type.Color.toObject(message.textColor, options);
+ if (message.backgroundColor != null && message.hasOwnProperty("backgroundColor"))
+ object.backgroundColor = $root.google.type.Color.toObject(message.backgroundColor, options);
+ return object;
+ };
+
+ /**
+ * Converts this StyleInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ StyleInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for StyleInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1.Document.Page.Token.StyleInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ StyleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1.Document.Page.Token.StyleInfo";
+ };
+
+ return StyleInfo;
+ })();
+
return Token;
})();
@@ -31462,6 +32026,7 @@
case 5:
case 6:
case 7:
+ case 8:
break;
}
if (message.createTime != null && message.hasOwnProperty("createTime")) {
@@ -31551,6 +32116,10 @@
case 7:
message.state = 7;
break;
+ case "IMPORTING":
+ case 8:
+ message.state = 8;
+ break;
}
if (object.createTime != null) {
if (typeof object.createTime !== "object")
@@ -31894,6 +32463,7 @@
* @property {number} CREATING=5 CREATING value
* @property {number} DELETING=6 DELETING value
* @property {number} FAILED=7 FAILED value
+ * @property {number} IMPORTING=8 IMPORTING value
*/
ProcessorVersion.State = (function() {
var valuesById = {}, values = Object.create(valuesById);
@@ -31905,6 +32475,7 @@
values[valuesById[5] = "CREATING"] = 5;
values[valuesById[6] = "DELETING"] = 6;
values[valuesById[7] = "FAILED"] = 7;
+ values[valuesById[8] = "IMPORTING"] = 8;
return values;
})();
@@ -57156,41 +57727,29 @@
return Barcode;
})();
- v1beta3.Document = (function() {
+ v1beta3.Dataset = (function() {
/**
- * Properties of a Document.
+ * Properties of a Dataset.
* @memberof google.cloud.documentai.v1beta3
- * @interface IDocument
- * @property {string|null} [uri] Document uri
- * @property {Uint8Array|null} [content] Document content
- * @property {string|null} [mimeType] Document mimeType
- * @property {string|null} [text] Document text
- * @property {Array.|null} [textStyles] Document textStyles
- * @property {Array.|null} [pages] Document pages
- * @property {Array.|null} [entities] Document entities
- * @property {Array.|null} [entityRelations] Document entityRelations
- * @property {Array.|null} [textChanges] Document textChanges
- * @property {google.cloud.documentai.v1beta3.Document.IShardInfo|null} [shardInfo] Document shardInfo
- * @property {google.rpc.IStatus|null} [error] Document error
- * @property {Array.|null} [revisions] Document revisions
+ * @interface IDataset
+ * @property {google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig|null} [gcsManagedConfig] Dataset gcsManagedConfig
+ * @property {google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig|null} [documentWarehouseConfig] Dataset documentWarehouseConfig
+ * @property {google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig|null} [unmanagedDatasetConfig] Dataset unmanagedDatasetConfig
+ * @property {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null} [spannerIndexingConfig] Dataset spannerIndexingConfig
+ * @property {string|null} [name] Dataset name
+ * @property {google.cloud.documentai.v1beta3.Dataset.State|null} [state] Dataset state
*/
/**
- * Constructs a new Document.
+ * Constructs a new Dataset.
* @memberof google.cloud.documentai.v1beta3
- * @classdesc Represents a Document.
- * @implements IDocument
+ * @classdesc Represents a Dataset.
+ * @implements IDataset
* @constructor
- * @param {google.cloud.documentai.v1beta3.IDocument=} [properties] Properties to set
+ * @param {google.cloud.documentai.v1beta3.IDataset=} [properties] Properties to set
*/
- function Document(properties) {
- this.textStyles = [];
- this.pages = [];
- this.entities = [];
- this.entityRelations = [];
- this.textChanges = [];
- this.revisions = [];
+ function Dataset(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -57198,261 +57757,170 @@
}
/**
- * Document uri.
- * @member {string|null|undefined} uri
- * @memberof google.cloud.documentai.v1beta3.Document
- * @instance
- */
- Document.prototype.uri = null;
-
- /**
- * Document content.
- * @member {Uint8Array|null|undefined} content
- * @memberof google.cloud.documentai.v1beta3.Document
- * @instance
- */
- Document.prototype.content = null;
-
- /**
- * Document mimeType.
- * @member {string} mimeType
- * @memberof google.cloud.documentai.v1beta3.Document
- * @instance
- */
- Document.prototype.mimeType = "";
-
- /**
- * Document text.
- * @member {string} text
- * @memberof google.cloud.documentai.v1beta3.Document
- * @instance
- */
- Document.prototype.text = "";
-
- /**
- * Document textStyles.
- * @member {Array.} textStyles
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset gcsManagedConfig.
+ * @member {google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig|null|undefined} gcsManagedConfig
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.textStyles = $util.emptyArray;
+ Dataset.prototype.gcsManagedConfig = null;
/**
- * Document pages.
- * @member {Array.} pages
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset documentWarehouseConfig.
+ * @member {google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig|null|undefined} documentWarehouseConfig
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.pages = $util.emptyArray;
+ Dataset.prototype.documentWarehouseConfig = null;
/**
- * Document entities.
- * @member {Array.} entities
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset unmanagedDatasetConfig.
+ * @member {google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig|null|undefined} unmanagedDatasetConfig
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.entities = $util.emptyArray;
+ Dataset.prototype.unmanagedDatasetConfig = null;
/**
- * Document entityRelations.
- * @member {Array.} entityRelations
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset spannerIndexingConfig.
+ * @member {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null|undefined} spannerIndexingConfig
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.entityRelations = $util.emptyArray;
+ Dataset.prototype.spannerIndexingConfig = null;
/**
- * Document textChanges.
- * @member {Array.} textChanges
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset name.
+ * @member {string} name
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.textChanges = $util.emptyArray;
+ Dataset.prototype.name = "";
/**
- * Document shardInfo.
- * @member {google.cloud.documentai.v1beta3.Document.IShardInfo|null|undefined} shardInfo
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset state.
+ * @member {google.cloud.documentai.v1beta3.Dataset.State} state
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.shardInfo = null;
+ Dataset.prototype.state = 0;
- /**
- * Document error.
- * @member {google.rpc.IStatus|null|undefined} error
- * @memberof google.cloud.documentai.v1beta3.Document
- * @instance
- */
- Document.prototype.error = null;
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
/**
- * Document revisions.
- * @member {Array.} revisions
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset storageSource.
+ * @member {"gcsManagedConfig"|"documentWarehouseConfig"|"unmanagedDatasetConfig"|undefined} storageSource
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Document.prototype.revisions = $util.emptyArray;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
+ Object.defineProperty(Dataset.prototype, "storageSource", {
+ get: $util.oneOfGetter($oneOfFields = ["gcsManagedConfig", "documentWarehouseConfig", "unmanagedDatasetConfig"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
/**
- * Document source.
- * @member {"uri"|"content"|undefined} source
- * @memberof google.cloud.documentai.v1beta3.Document
+ * Dataset indexingSource.
+ * @member {"spannerIndexingConfig"|undefined} indexingSource
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
*/
- Object.defineProperty(Document.prototype, "source", {
- get: $util.oneOfGetter($oneOfFields = ["uri", "content"]),
+ Object.defineProperty(Dataset.prototype, "indexingSource", {
+ get: $util.oneOfGetter($oneOfFields = ["spannerIndexingConfig"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
- * Creates a new Document instance using the specified properties.
+ * Creates a new Dataset instance using the specified properties.
* @function create
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
- * @param {google.cloud.documentai.v1beta3.IDocument=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document} Document instance
+ * @param {google.cloud.documentai.v1beta3.IDataset=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.Dataset} Dataset instance
*/
- Document.create = function create(properties) {
- return new Document(properties);
+ Dataset.create = function create(properties) {
+ return new Dataset(properties);
};
/**
- * Encodes the specified Document message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.verify|verify} messages.
+ * Encodes the specified Dataset message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.verify|verify} messages.
* @function encode
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
- * @param {google.cloud.documentai.v1beta3.IDocument} message Document message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.IDataset} message Dataset message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Document.encode = function encode(message, writer) {
+ Dataset.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
- if (message.content != null && Object.hasOwnProperty.call(message, "content"))
- writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.content);
- if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType);
- if (message.text != null && Object.hasOwnProperty.call(message, "text"))
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.text);
- if (message.textStyles != null && message.textStyles.length)
- for (var i = 0; i < message.textStyles.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Style.encode(message.textStyles[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.pages != null && message.pages.length)
- for (var i = 0; i < message.pages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.encode(message.pages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.entities != null && message.entities.length)
- for (var i = 0; i < message.entities.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Entity.encode(message.entities[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.entityRelations != null && message.entityRelations.length)
- for (var i = 0; i < message.entityRelations.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.EntityRelation.encode(message.entityRelations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
- if (message.shardInfo != null && Object.hasOwnProperty.call(message, "shardInfo"))
- $root.google.cloud.documentai.v1beta3.Document.ShardInfo.encode(message.shardInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.error != null && Object.hasOwnProperty.call(message, "error"))
- $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
- if (message.revisions != null && message.revisions.length)
- for (var i = 0; i < message.revisions.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Revision.encode(message.revisions[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
- if (message.textChanges != null && message.textChanges.length)
- for (var i = 0; i < message.textChanges.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.TextChange.encode(message.textChanges[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state);
+ if (message.gcsManagedConfig != null && Object.hasOwnProperty.call(message, "gcsManagedConfig"))
+ $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.encode(message.gcsManagedConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.spannerIndexingConfig != null && Object.hasOwnProperty.call(message, "spannerIndexingConfig"))
+ $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.encode(message.spannerIndexingConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.documentWarehouseConfig != null && Object.hasOwnProperty.call(message, "documentWarehouseConfig"))
+ $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.encode(message.documentWarehouseConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.unmanagedDatasetConfig != null && Object.hasOwnProperty.call(message, "unmanagedDatasetConfig"))
+ $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.encode(message.unmanagedDatasetConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.verify|verify} messages.
+ * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
- * @param {google.cloud.documentai.v1beta3.IDocument} message Document message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.IDataset} message Dataset message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Document.encodeDelimited = function encodeDelimited(message, writer) {
+ Dataset.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a Document message from the specified reader or buffer.
+ * Decodes a Dataset message from the specified reader or buffer.
* @function decode
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document} Document
+ * @returns {google.cloud.documentai.v1beta3.Dataset} Dataset
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Document.decode = function decode(reader, length) {
+ Dataset.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Dataset();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
- case 1: {
- message.uri = reader.string();
- break;
- }
- case 2: {
- message.content = reader.bytes();
- break;
- }
case 3: {
- message.mimeType = reader.string();
- break;
- }
- case 4: {
- message.text = reader.string();
+ message.gcsManagedConfig = $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.decode(reader, reader.uint32());
break;
}
case 5: {
- if (!(message.textStyles && message.textStyles.length))
- message.textStyles = [];
- message.textStyles.push($root.google.cloud.documentai.v1beta3.Document.Style.decode(reader, reader.uint32()));
+ message.documentWarehouseConfig = $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.decode(reader, reader.uint32());
break;
}
case 6: {
- if (!(message.pages && message.pages.length))
- message.pages = [];
- message.pages.push($root.google.cloud.documentai.v1beta3.Document.Page.decode(reader, reader.uint32()));
- break;
- }
- case 7: {
- if (!(message.entities && message.entities.length))
- message.entities = [];
- message.entities.push($root.google.cloud.documentai.v1beta3.Document.Entity.decode(reader, reader.uint32()));
- break;
- }
- case 8: {
- if (!(message.entityRelations && message.entityRelations.length))
- message.entityRelations = [];
- message.entityRelations.push($root.google.cloud.documentai.v1beta3.Document.EntityRelation.decode(reader, reader.uint32()));
- break;
- }
- case 14: {
- if (!(message.textChanges && message.textChanges.length))
- message.textChanges = [];
- message.textChanges.push($root.google.cloud.documentai.v1beta3.Document.TextChange.decode(reader, reader.uint32()));
+ message.unmanagedDatasetConfig = $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.decode(reader, reader.uint32());
break;
}
- case 9: {
- message.shardInfo = $root.google.cloud.documentai.v1beta3.Document.ShardInfo.decode(reader, reader.uint32());
+ case 4: {
+ message.spannerIndexingConfig = $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.decode(reader, reader.uint32());
break;
}
- case 10: {
- message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
+ case 1: {
+ message.name = reader.string();
break;
}
- case 13: {
- if (!(message.revisions && message.revisions.length))
- message.revisions = [];
- message.revisions.push($root.google.cloud.documentai.v1beta3.Document.Revision.decode(reader, reader.uint32()));
+ case 2: {
+ message.state = reader.int32();
break;
}
default:
@@ -57464,338 +57932,234 @@
};
/**
- * Decodes a Document message from the specified reader or buffer, length delimited.
+ * Decodes a Dataset message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document} Document
+ * @returns {google.cloud.documentai.v1beta3.Dataset} Dataset
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Document.decodeDelimited = function decodeDelimited(reader) {
+ Dataset.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a Document message.
+ * Verifies a Dataset message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Document.verify = function verify(message) {
+ Dataset.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
var properties = {};
- if (message.uri != null && message.hasOwnProperty("uri")) {
- properties.source = 1;
- if (!$util.isString(message.uri))
- return "uri: string expected";
- }
- if (message.content != null && message.hasOwnProperty("content")) {
- if (properties.source === 1)
- return "source: multiple values";
- properties.source = 1;
- if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
- return "content: buffer expected";
- }
- if (message.mimeType != null && message.hasOwnProperty("mimeType"))
- if (!$util.isString(message.mimeType))
- return "mimeType: string expected";
- if (message.text != null && message.hasOwnProperty("text"))
- if (!$util.isString(message.text))
- return "text: string expected";
- if (message.textStyles != null && message.hasOwnProperty("textStyles")) {
- if (!Array.isArray(message.textStyles))
- return "textStyles: array expected";
- for (var i = 0; i < message.textStyles.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Style.verify(message.textStyles[i]);
- if (error)
- return "textStyles." + error;
- }
- }
- if (message.pages != null && message.hasOwnProperty("pages")) {
- if (!Array.isArray(message.pages))
- return "pages: array expected";
- for (var i = 0; i < message.pages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.verify(message.pages[i]);
+ if (message.gcsManagedConfig != null && message.hasOwnProperty("gcsManagedConfig")) {
+ properties.storageSource = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.verify(message.gcsManagedConfig);
if (error)
- return "pages." + error;
+ return "gcsManagedConfig." + error;
}
}
- if (message.entities != null && message.hasOwnProperty("entities")) {
- if (!Array.isArray(message.entities))
- return "entities: array expected";
- for (var i = 0; i < message.entities.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Entity.verify(message.entities[i]);
+ if (message.documentWarehouseConfig != null && message.hasOwnProperty("documentWarehouseConfig")) {
+ if (properties.storageSource === 1)
+ return "storageSource: multiple values";
+ properties.storageSource = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.verify(message.documentWarehouseConfig);
if (error)
- return "entities." + error;
+ return "documentWarehouseConfig." + error;
}
}
- if (message.entityRelations != null && message.hasOwnProperty("entityRelations")) {
- if (!Array.isArray(message.entityRelations))
- return "entityRelations: array expected";
- for (var i = 0; i < message.entityRelations.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.EntityRelation.verify(message.entityRelations[i]);
+ if (message.unmanagedDatasetConfig != null && message.hasOwnProperty("unmanagedDatasetConfig")) {
+ if (properties.storageSource === 1)
+ return "storageSource: multiple values";
+ properties.storageSource = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.verify(message.unmanagedDatasetConfig);
if (error)
- return "entityRelations." + error;
+ return "unmanagedDatasetConfig." + error;
}
}
- if (message.textChanges != null && message.hasOwnProperty("textChanges")) {
- if (!Array.isArray(message.textChanges))
- return "textChanges: array expected";
- for (var i = 0; i < message.textChanges.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.TextChange.verify(message.textChanges[i]);
+ if (message.spannerIndexingConfig != null && message.hasOwnProperty("spannerIndexingConfig")) {
+ properties.indexingSource = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.verify(message.spannerIndexingConfig);
if (error)
- return "textChanges." + error;
+ return "spannerIndexingConfig." + error;
}
}
- if (message.shardInfo != null && message.hasOwnProperty("shardInfo")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.ShardInfo.verify(message.shardInfo);
- if (error)
- return "shardInfo." + error;
- }
- if (message.error != null && message.hasOwnProperty("error")) {
- var error = $root.google.rpc.Status.verify(message.error);
- if (error)
- return "error." + error;
- }
- if (message.revisions != null && message.hasOwnProperty("revisions")) {
- if (!Array.isArray(message.revisions))
- return "revisions: array expected";
- for (var i = 0; i < message.revisions.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Revision.verify(message.revisions[i]);
- if (error)
- return "revisions." + error;
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.state != null && message.hasOwnProperty("state"))
+ switch (message.state) {
+ default:
+ return "state: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
}
- }
return null;
};
/**
- * Creates a Document message from a plain object. Also converts values to their respective internal types.
+ * Creates a Dataset message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document} Document
+ * @returns {google.cloud.documentai.v1beta3.Dataset} Dataset
*/
- Document.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document)
+ Dataset.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.Dataset)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document();
- if (object.uri != null)
- message.uri = String(object.uri);
- if (object.content != null)
- if (typeof object.content === "string")
- $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
- else if (object.content.length >= 0)
- message.content = object.content;
- if (object.mimeType != null)
- message.mimeType = String(object.mimeType);
- if (object.text != null)
- message.text = String(object.text);
- if (object.textStyles) {
- if (!Array.isArray(object.textStyles))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.textStyles: array expected");
- message.textStyles = [];
- for (var i = 0; i < object.textStyles.length; ++i) {
- if (typeof object.textStyles[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.textStyles: object expected");
- message.textStyles[i] = $root.google.cloud.documentai.v1beta3.Document.Style.fromObject(object.textStyles[i]);
- }
- }
- if (object.pages) {
- if (!Array.isArray(object.pages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.pages: array expected");
- message.pages = [];
- for (var i = 0; i < object.pages.length; ++i) {
- if (typeof object.pages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.pages: object expected");
- message.pages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.fromObject(object.pages[i]);
- }
+ var message = new $root.google.cloud.documentai.v1beta3.Dataset();
+ if (object.gcsManagedConfig != null) {
+ if (typeof object.gcsManagedConfig !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.Dataset.gcsManagedConfig: object expected");
+ message.gcsManagedConfig = $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.fromObject(object.gcsManagedConfig);
+ }
+ if (object.documentWarehouseConfig != null) {
+ if (typeof object.documentWarehouseConfig !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.Dataset.documentWarehouseConfig: object expected");
+ message.documentWarehouseConfig = $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.fromObject(object.documentWarehouseConfig);
+ }
+ if (object.unmanagedDatasetConfig != null) {
+ if (typeof object.unmanagedDatasetConfig !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.Dataset.unmanagedDatasetConfig: object expected");
+ message.unmanagedDatasetConfig = $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.fromObject(object.unmanagedDatasetConfig);
+ }
+ if (object.spannerIndexingConfig != null) {
+ if (typeof object.spannerIndexingConfig !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.Dataset.spannerIndexingConfig: object expected");
+ message.spannerIndexingConfig = $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.fromObject(object.spannerIndexingConfig);
}
- if (object.entities) {
- if (!Array.isArray(object.entities))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.entities: array expected");
- message.entities = [];
- for (var i = 0; i < object.entities.length; ++i) {
- if (typeof object.entities[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.entities: object expected");
- message.entities[i] = $root.google.cloud.documentai.v1beta3.Document.Entity.fromObject(object.entities[i]);
- }
- }
- if (object.entityRelations) {
- if (!Array.isArray(object.entityRelations))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.entityRelations: array expected");
- message.entityRelations = [];
- for (var i = 0; i < object.entityRelations.length; ++i) {
- if (typeof object.entityRelations[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.entityRelations: object expected");
- message.entityRelations[i] = $root.google.cloud.documentai.v1beta3.Document.EntityRelation.fromObject(object.entityRelations[i]);
- }
- }
- if (object.textChanges) {
- if (!Array.isArray(object.textChanges))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.textChanges: array expected");
- message.textChanges = [];
- for (var i = 0; i < object.textChanges.length; ++i) {
- if (typeof object.textChanges[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.textChanges: object expected");
- message.textChanges[i] = $root.google.cloud.documentai.v1beta3.Document.TextChange.fromObject(object.textChanges[i]);
- }
- }
- if (object.shardInfo != null) {
- if (typeof object.shardInfo !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.shardInfo: object expected");
- message.shardInfo = $root.google.cloud.documentai.v1beta3.Document.ShardInfo.fromObject(object.shardInfo);
- }
- if (object.error != null) {
- if (typeof object.error !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.error: object expected");
- message.error = $root.google.rpc.Status.fromObject(object.error);
- }
- if (object.revisions) {
- if (!Array.isArray(object.revisions))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.revisions: array expected");
- message.revisions = [];
- for (var i = 0; i < object.revisions.length; ++i) {
- if (typeof object.revisions[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.revisions: object expected");
- message.revisions[i] = $root.google.cloud.documentai.v1beta3.Document.Revision.fromObject(object.revisions[i]);
+ if (object.name != null)
+ message.name = String(object.name);
+ switch (object.state) {
+ default:
+ if (typeof object.state === "number") {
+ message.state = object.state;
+ break;
}
+ break;
+ case "STATE_UNSPECIFIED":
+ case 0:
+ message.state = 0;
+ break;
+ case "UNINITIALIZED":
+ case 1:
+ message.state = 1;
+ break;
+ case "INITIALIZING":
+ case 2:
+ message.state = 2;
+ break;
+ case "INITIALIZED":
+ case 3:
+ message.state = 3;
+ break;
}
return message;
};
/**
- * Creates a plain object from a Document message. Also converts values to other types if specified.
+ * Creates a plain object from a Dataset message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
- * @param {google.cloud.documentai.v1beta3.Document} message Document
+ * @param {google.cloud.documentai.v1beta3.Dataset} message Dataset
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Document.toObject = function toObject(message, options) {
+ Dataset.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.arrays || options.defaults) {
- object.textStyles = [];
- object.pages = [];
- object.entities = [];
- object.entityRelations = [];
- object.revisions = [];
- object.textChanges = [];
- }
if (options.defaults) {
- object.mimeType = "";
- object.text = "";
- object.shardInfo = null;
- object.error = null;
+ object.name = "";
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
}
- if (message.uri != null && message.hasOwnProperty("uri")) {
- object.uri = message.uri;
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.state != null && message.hasOwnProperty("state"))
+ object.state = options.enums === String ? $root.google.cloud.documentai.v1beta3.Dataset.State[message.state] === undefined ? message.state : $root.google.cloud.documentai.v1beta3.Dataset.State[message.state] : message.state;
+ if (message.gcsManagedConfig != null && message.hasOwnProperty("gcsManagedConfig")) {
+ object.gcsManagedConfig = $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.toObject(message.gcsManagedConfig, options);
if (options.oneofs)
- object.source = "uri";
+ object.storageSource = "gcsManagedConfig";
}
- if (message.content != null && message.hasOwnProperty("content")) {
- object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
+ if (message.spannerIndexingConfig != null && message.hasOwnProperty("spannerIndexingConfig")) {
+ object.spannerIndexingConfig = $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.toObject(message.spannerIndexingConfig, options);
if (options.oneofs)
- object.source = "content";
+ object.indexingSource = "spannerIndexingConfig";
}
- if (message.mimeType != null && message.hasOwnProperty("mimeType"))
- object.mimeType = message.mimeType;
- if (message.text != null && message.hasOwnProperty("text"))
- object.text = message.text;
- if (message.textStyles && message.textStyles.length) {
- object.textStyles = [];
- for (var j = 0; j < message.textStyles.length; ++j)
- object.textStyles[j] = $root.google.cloud.documentai.v1beta3.Document.Style.toObject(message.textStyles[j], options);
- }
- if (message.pages && message.pages.length) {
- object.pages = [];
- for (var j = 0; j < message.pages.length; ++j)
- object.pages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.toObject(message.pages[j], options);
- }
- if (message.entities && message.entities.length) {
- object.entities = [];
- for (var j = 0; j < message.entities.length; ++j)
- object.entities[j] = $root.google.cloud.documentai.v1beta3.Document.Entity.toObject(message.entities[j], options);
- }
- if (message.entityRelations && message.entityRelations.length) {
- object.entityRelations = [];
- for (var j = 0; j < message.entityRelations.length; ++j)
- object.entityRelations[j] = $root.google.cloud.documentai.v1beta3.Document.EntityRelation.toObject(message.entityRelations[j], options);
- }
- if (message.shardInfo != null && message.hasOwnProperty("shardInfo"))
- object.shardInfo = $root.google.cloud.documentai.v1beta3.Document.ShardInfo.toObject(message.shardInfo, options);
- if (message.error != null && message.hasOwnProperty("error"))
- object.error = $root.google.rpc.Status.toObject(message.error, options);
- if (message.revisions && message.revisions.length) {
- object.revisions = [];
- for (var j = 0; j < message.revisions.length; ++j)
- object.revisions[j] = $root.google.cloud.documentai.v1beta3.Document.Revision.toObject(message.revisions[j], options);
+ if (message.documentWarehouseConfig != null && message.hasOwnProperty("documentWarehouseConfig")) {
+ object.documentWarehouseConfig = $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.toObject(message.documentWarehouseConfig, options);
+ if (options.oneofs)
+ object.storageSource = "documentWarehouseConfig";
}
- if (message.textChanges && message.textChanges.length) {
- object.textChanges = [];
- for (var j = 0; j < message.textChanges.length; ++j)
- object.textChanges[j] = $root.google.cloud.documentai.v1beta3.Document.TextChange.toObject(message.textChanges[j], options);
+ if (message.unmanagedDatasetConfig != null && message.hasOwnProperty("unmanagedDatasetConfig")) {
+ object.unmanagedDatasetConfig = $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.toObject(message.unmanagedDatasetConfig, options);
+ if (options.oneofs)
+ object.storageSource = "unmanagedDatasetConfig";
}
return object;
};
/**
- * Converts this Document to JSON.
+ * Converts this Dataset to JSON.
* @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @instance
* @returns {Object.} JSON object
*/
- Document.prototype.toJSON = function toJSON() {
+ Dataset.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for Document
+ * Gets the default type url for Dataset
* @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document
+ * @memberof google.cloud.documentai.v1beta3.Dataset
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ Dataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document";
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Dataset";
};
- Document.ShardInfo = (function() {
+ Dataset.GCSManagedConfig = (function() {
/**
- * Properties of a ShardInfo.
- * @memberof google.cloud.documentai.v1beta3.Document
- * @interface IShardInfo
- * @property {number|Long|null} [shardIndex] ShardInfo shardIndex
- * @property {number|Long|null} [shardCount] ShardInfo shardCount
- * @property {number|Long|null} [textOffset] ShardInfo textOffset
+ * Properties of a GCSManagedConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @interface IGCSManagedConfig
+ * @property {google.cloud.documentai.v1beta3.IGcsPrefix|null} [gcsPrefix] GCSManagedConfig gcsPrefix
*/
/**
- * Constructs a new ShardInfo.
- * @memberof google.cloud.documentai.v1beta3.Document
- * @classdesc Represents a ShardInfo.
- * @implements IShardInfo
+ * Constructs a new GCSManagedConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @classdesc Represents a GCSManagedConfig.
+ * @implements IGCSManagedConfig
* @constructor
- * @param {google.cloud.documentai.v1beta3.Document.IShardInfo=} [properties] Properties to set
+ * @param {google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig=} [properties] Properties to set
*/
- function ShardInfo(properties) {
+ function GCSManagedConfig(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -57803,103 +58167,75 @@
}
/**
- * ShardInfo shardIndex.
- * @member {number|Long} shardIndex
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
- * @instance
- */
- ShardInfo.prototype.shardIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
- /**
- * ShardInfo shardCount.
- * @member {number|Long} shardCount
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
- * @instance
- */
- ShardInfo.prototype.shardCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
- /**
- * ShardInfo textOffset.
- * @member {number|Long} textOffset
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * GCSManagedConfig gcsPrefix.
+ * @member {google.cloud.documentai.v1beta3.IGcsPrefix|null|undefined} gcsPrefix
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @instance
*/
- ShardInfo.prototype.textOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+ GCSManagedConfig.prototype.gcsPrefix = null;
/**
- * Creates a new ShardInfo instance using the specified properties.
+ * Creates a new GCSManagedConfig instance using the specified properties.
* @function create
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IShardInfo=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.ShardInfo} ShardInfo instance
+ * @param {google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig} GCSManagedConfig instance
*/
- ShardInfo.create = function create(properties) {
- return new ShardInfo(properties);
+ GCSManagedConfig.create = function create(properties) {
+ return new GCSManagedConfig(properties);
};
/**
- * Encodes the specified ShardInfo message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.ShardInfo.verify|verify} messages.
+ * Encodes the specified GCSManagedConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.verify|verify} messages.
* @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IShardInfo} message ShardInfo message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig} message GCSManagedConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ShardInfo.encode = function encode(message, writer) {
+ GCSManagedConfig.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.shardIndex != null && Object.hasOwnProperty.call(message, "shardIndex"))
- writer.uint32(/* id 1, wireType 0 =*/8).int64(message.shardIndex);
- if (message.shardCount != null && Object.hasOwnProperty.call(message, "shardCount"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.shardCount);
- if (message.textOffset != null && Object.hasOwnProperty.call(message, "textOffset"))
- writer.uint32(/* id 3, wireType 0 =*/24).int64(message.textOffset);
+ if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix"))
+ $root.google.cloud.documentai.v1beta3.GcsPrefix.encode(message.gcsPrefix, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified ShardInfo message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.ShardInfo.verify|verify} messages.
+ * Encodes the specified GCSManagedConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IShardInfo} message ShardInfo message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.Dataset.IGCSManagedConfig} message GCSManagedConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ShardInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ GCSManagedConfig.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a ShardInfo message from the specified reader or buffer.
+ * Decodes a GCSManagedConfig message from the specified reader or buffer.
* @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.ShardInfo} ShardInfo
+ * @returns {google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig} GCSManagedConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ShardInfo.decode = function decode(reader, length) {
+ GCSManagedConfig.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.ShardInfo();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.shardIndex = reader.int64();
- break;
- }
- case 2: {
- message.shardCount = reader.int64();
- break;
- }
- case 3: {
- message.textOffset = reader.int64();
+ message.gcsPrefix = $root.google.cloud.documentai.v1beta3.GcsPrefix.decode(reader, reader.uint32());
break;
}
default:
@@ -57911,188 +58247,128 @@
};
/**
- * Decodes a ShardInfo message from the specified reader or buffer, length delimited.
+ * Decodes a GCSManagedConfig message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.ShardInfo} ShardInfo
+ * @returns {google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig} GCSManagedConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ShardInfo.decodeDelimited = function decodeDelimited(reader) {
+ GCSManagedConfig.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a ShardInfo message.
+ * Verifies a GCSManagedConfig message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- ShardInfo.verify = function verify(message) {
+ GCSManagedConfig.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.shardIndex != null && message.hasOwnProperty("shardIndex"))
- if (!$util.isInteger(message.shardIndex) && !(message.shardIndex && $util.isInteger(message.shardIndex.low) && $util.isInteger(message.shardIndex.high)))
- return "shardIndex: integer|Long expected";
- if (message.shardCount != null && message.hasOwnProperty("shardCount"))
- if (!$util.isInteger(message.shardCount) && !(message.shardCount && $util.isInteger(message.shardCount.low) && $util.isInteger(message.shardCount.high)))
- return "shardCount: integer|Long expected";
- if (message.textOffset != null && message.hasOwnProperty("textOffset"))
- if (!$util.isInteger(message.textOffset) && !(message.textOffset && $util.isInteger(message.textOffset.low) && $util.isInteger(message.textOffset.high)))
- return "textOffset: integer|Long expected";
+ if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) {
+ var error = $root.google.cloud.documentai.v1beta3.GcsPrefix.verify(message.gcsPrefix);
+ if (error)
+ return "gcsPrefix." + error;
+ }
return null;
};
/**
- * Creates a ShardInfo message from a plain object. Also converts values to their respective internal types.
+ * Creates a GCSManagedConfig message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.ShardInfo} ShardInfo
+ * @returns {google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig} GCSManagedConfig
*/
- ShardInfo.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.ShardInfo)
+ GCSManagedConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.ShardInfo();
- if (object.shardIndex != null)
- if ($util.Long)
- (message.shardIndex = $util.Long.fromValue(object.shardIndex)).unsigned = false;
- else if (typeof object.shardIndex === "string")
- message.shardIndex = parseInt(object.shardIndex, 10);
- else if (typeof object.shardIndex === "number")
- message.shardIndex = object.shardIndex;
- else if (typeof object.shardIndex === "object")
- message.shardIndex = new $util.LongBits(object.shardIndex.low >>> 0, object.shardIndex.high >>> 0).toNumber();
- if (object.shardCount != null)
- if ($util.Long)
- (message.shardCount = $util.Long.fromValue(object.shardCount)).unsigned = false;
- else if (typeof object.shardCount === "string")
- message.shardCount = parseInt(object.shardCount, 10);
- else if (typeof object.shardCount === "number")
- message.shardCount = object.shardCount;
- else if (typeof object.shardCount === "object")
- message.shardCount = new $util.LongBits(object.shardCount.low >>> 0, object.shardCount.high >>> 0).toNumber();
- if (object.textOffset != null)
- if ($util.Long)
- (message.textOffset = $util.Long.fromValue(object.textOffset)).unsigned = false;
- else if (typeof object.textOffset === "string")
- message.textOffset = parseInt(object.textOffset, 10);
- else if (typeof object.textOffset === "number")
- message.textOffset = object.textOffset;
- else if (typeof object.textOffset === "object")
- message.textOffset = new $util.LongBits(object.textOffset.low >>> 0, object.textOffset.high >>> 0).toNumber();
+ var message = new $root.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig();
+ if (object.gcsPrefix != null) {
+ if (typeof object.gcsPrefix !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig.gcsPrefix: object expected");
+ message.gcsPrefix = $root.google.cloud.documentai.v1beta3.GcsPrefix.fromObject(object.gcsPrefix);
+ }
return message;
};
/**
- * Creates a plain object from a ShardInfo message. Also converts values to other types if specified.
+ * Creates a plain object from a GCSManagedConfig message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.ShardInfo} message ShardInfo
+ * @param {google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig} message GCSManagedConfig
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- ShardInfo.toObject = function toObject(message, options) {
+ GCSManagedConfig.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.defaults) {
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.shardIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.shardIndex = options.longs === String ? "0" : 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.shardCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.shardCount = options.longs === String ? "0" : 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.textOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.textOffset = options.longs === String ? "0" : 0;
- }
- if (message.shardIndex != null && message.hasOwnProperty("shardIndex"))
- if (typeof message.shardIndex === "number")
- object.shardIndex = options.longs === String ? String(message.shardIndex) : message.shardIndex;
- else
- object.shardIndex = options.longs === String ? $util.Long.prototype.toString.call(message.shardIndex) : options.longs === Number ? new $util.LongBits(message.shardIndex.low >>> 0, message.shardIndex.high >>> 0).toNumber() : message.shardIndex;
- if (message.shardCount != null && message.hasOwnProperty("shardCount"))
- if (typeof message.shardCount === "number")
- object.shardCount = options.longs === String ? String(message.shardCount) : message.shardCount;
- else
- object.shardCount = options.longs === String ? $util.Long.prototype.toString.call(message.shardCount) : options.longs === Number ? new $util.LongBits(message.shardCount.low >>> 0, message.shardCount.high >>> 0).toNumber() : message.shardCount;
- if (message.textOffset != null && message.hasOwnProperty("textOffset"))
- if (typeof message.textOffset === "number")
- object.textOffset = options.longs === String ? String(message.textOffset) : message.textOffset;
- else
- object.textOffset = options.longs === String ? $util.Long.prototype.toString.call(message.textOffset) : options.longs === Number ? new $util.LongBits(message.textOffset.low >>> 0, message.textOffset.high >>> 0).toNumber() : message.textOffset;
+ if (options.defaults)
+ object.gcsPrefix = null;
+ if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix"))
+ object.gcsPrefix = $root.google.cloud.documentai.v1beta3.GcsPrefix.toObject(message.gcsPrefix, options);
return object;
};
/**
- * Converts this ShardInfo to JSON.
+ * Converts this GCSManagedConfig to JSON.
* @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @instance
* @returns {Object.} JSON object
*/
- ShardInfo.prototype.toJSON = function toJSON() {
+ GCSManagedConfig.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for ShardInfo
+ * Gets the default type url for GCSManagedConfig
* @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.ShardInfo
+ * @memberof google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- ShardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ GCSManagedConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.ShardInfo";
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig";
};
- return ShardInfo;
+ return GCSManagedConfig;
})();
- Document.Style = (function() {
+ Dataset.DocumentWarehouseConfig = (function() {
/**
- * Properties of a Style.
- * @memberof google.cloud.documentai.v1beta3.Document
- * @interface IStyle
- * @property {google.cloud.documentai.v1beta3.Document.ITextAnchor|null} [textAnchor] Style textAnchor
- * @property {google.type.IColor|null} [color] Style color
- * @property {google.type.IColor|null} [backgroundColor] Style backgroundColor
- * @property {string|null} [fontWeight] Style fontWeight
- * @property {string|null} [textStyle] Style textStyle
- * @property {string|null} [textDecoration] Style textDecoration
- * @property {google.cloud.documentai.v1beta3.Document.Style.IFontSize|null} [fontSize] Style fontSize
- * @property {string|null} [fontFamily] Style fontFamily
+ * Properties of a DocumentWarehouseConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @interface IDocumentWarehouseConfig
+ * @property {string|null} [collection] DocumentWarehouseConfig collection
+ * @property {string|null} [schema] DocumentWarehouseConfig schema
*/
/**
- * Constructs a new Style.
- * @memberof google.cloud.documentai.v1beta3.Document
- * @classdesc Represents a Style.
- * @implements IStyle
+ * Constructs a new DocumentWarehouseConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @classdesc Represents a DocumentWarehouseConfig.
+ * @implements IDocumentWarehouseConfig
* @constructor
- * @param {google.cloud.documentai.v1beta3.Document.IStyle=} [properties] Properties to set
+ * @param {google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig=} [properties] Properties to set
*/
- function Style(properties) {
+ function DocumentWarehouseConfig(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -58100,173 +58376,89 @@
}
/**
- * Style textAnchor.
- * @member {google.cloud.documentai.v1beta3.Document.ITextAnchor|null|undefined} textAnchor
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @instance
- */
- Style.prototype.textAnchor = null;
-
- /**
- * Style color.
- * @member {google.type.IColor|null|undefined} color
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @instance
- */
- Style.prototype.color = null;
-
- /**
- * Style backgroundColor.
- * @member {google.type.IColor|null|undefined} backgroundColor
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @instance
- */
- Style.prototype.backgroundColor = null;
-
- /**
- * Style fontWeight.
- * @member {string} fontWeight
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @instance
- */
- Style.prototype.fontWeight = "";
-
- /**
- * Style textStyle.
- * @member {string} textStyle
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @instance
- */
- Style.prototype.textStyle = "";
-
- /**
- * Style textDecoration.
- * @member {string} textDecoration
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @instance
- */
- Style.prototype.textDecoration = "";
-
- /**
- * Style fontSize.
- * @member {google.cloud.documentai.v1beta3.Document.Style.IFontSize|null|undefined} fontSize
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * DocumentWarehouseConfig collection.
+ * @member {string} collection
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @instance
*/
- Style.prototype.fontSize = null;
+ DocumentWarehouseConfig.prototype.collection = "";
/**
- * Style fontFamily.
- * @member {string} fontFamily
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * DocumentWarehouseConfig schema.
+ * @member {string} schema
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @instance
*/
- Style.prototype.fontFamily = "";
+ DocumentWarehouseConfig.prototype.schema = "";
/**
- * Creates a new Style instance using the specified properties.
+ * Creates a new DocumentWarehouseConfig instance using the specified properties.
* @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IStyle=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Style} Style instance
+ * @param {google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig} DocumentWarehouseConfig instance
*/
- Style.create = function create(properties) {
- return new Style(properties);
+ DocumentWarehouseConfig.create = function create(properties) {
+ return new DocumentWarehouseConfig(properties);
};
/**
- * Encodes the specified Style message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.verify|verify} messages.
+ * Encodes the specified DocumentWarehouseConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.verify|verify} messages.
* @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IStyle} message Style message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig} message DocumentWarehouseConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Style.encode = function encode(message, writer) {
+ DocumentWarehouseConfig.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.textAnchor != null && Object.hasOwnProperty.call(message, "textAnchor"))
- $root.google.cloud.documentai.v1beta3.Document.TextAnchor.encode(message.textAnchor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.color != null && Object.hasOwnProperty.call(message, "color"))
- $root.google.type.Color.encode(message.color, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.backgroundColor != null && Object.hasOwnProperty.call(message, "backgroundColor"))
- $root.google.type.Color.encode(message.backgroundColor, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.fontWeight != null && Object.hasOwnProperty.call(message, "fontWeight"))
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.fontWeight);
- if (message.textStyle != null && Object.hasOwnProperty.call(message, "textStyle"))
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.textStyle);
- if (message.textDecoration != null && Object.hasOwnProperty.call(message, "textDecoration"))
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.textDecoration);
- if (message.fontSize != null && Object.hasOwnProperty.call(message, "fontSize"))
- $root.google.cloud.documentai.v1beta3.Document.Style.FontSize.encode(message.fontSize, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.fontFamily != null && Object.hasOwnProperty.call(message, "fontFamily"))
- writer.uint32(/* id 8, wireType 2 =*/66).string(message.fontFamily);
+ if (message.collection != null && Object.hasOwnProperty.call(message, "collection"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.collection);
+ if (message.schema != null && Object.hasOwnProperty.call(message, "schema"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema);
return writer;
};
/**
- * Encodes the specified Style message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.verify|verify} messages.
+ * Encodes the specified DocumentWarehouseConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IStyle} message Style message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.Dataset.IDocumentWarehouseConfig} message DocumentWarehouseConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Style.encodeDelimited = function encodeDelimited(message, writer) {
+ DocumentWarehouseConfig.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a Style message from the specified reader or buffer.
+ * Decodes a DocumentWarehouseConfig message from the specified reader or buffer.
* @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Style} Style
+ * @returns {google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig} DocumentWarehouseConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Style.decode = function decode(reader, length) {
+ DocumentWarehouseConfig.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Style();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.textAnchor = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.decode(reader, reader.uint32());
+ message.collection = reader.string();
break;
}
case 2: {
- message.color = $root.google.type.Color.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.backgroundColor = $root.google.type.Color.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.fontWeight = reader.string();
- break;
- }
- case 5: {
- message.textStyle = reader.string();
- break;
- }
- case 6: {
- message.textDecoration = reader.string();
- break;
- }
- case 7: {
- message.fontSize = $root.google.cloud.documentai.v1beta3.Document.Style.FontSize.decode(reader, reader.uint32());
- break;
- }
- case 8: {
- message.fontFamily = reader.string();
+ message.schema = reader.string();
break;
}
default:
@@ -58278,453 +58470,130 @@
};
/**
- * Decodes a Style message from the specified reader or buffer, length delimited.
+ * Decodes a DocumentWarehouseConfig message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Style} Style
+ * @returns {google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig} DocumentWarehouseConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Style.decodeDelimited = function decodeDelimited(reader) {
+ DocumentWarehouseConfig.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a Style message.
+ * Verifies a DocumentWarehouseConfig message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Style.verify = function verify(message) {
+ DocumentWarehouseConfig.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.textAnchor != null && message.hasOwnProperty("textAnchor")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.verify(message.textAnchor);
- if (error)
- return "textAnchor." + error;
- }
- if (message.color != null && message.hasOwnProperty("color")) {
- var error = $root.google.type.Color.verify(message.color);
- if (error)
- return "color." + error;
- }
- if (message.backgroundColor != null && message.hasOwnProperty("backgroundColor")) {
- var error = $root.google.type.Color.verify(message.backgroundColor);
- if (error)
- return "backgroundColor." + error;
- }
- if (message.fontWeight != null && message.hasOwnProperty("fontWeight"))
- if (!$util.isString(message.fontWeight))
- return "fontWeight: string expected";
- if (message.textStyle != null && message.hasOwnProperty("textStyle"))
- if (!$util.isString(message.textStyle))
- return "textStyle: string expected";
- if (message.textDecoration != null && message.hasOwnProperty("textDecoration"))
- if (!$util.isString(message.textDecoration))
- return "textDecoration: string expected";
- if (message.fontSize != null && message.hasOwnProperty("fontSize")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Style.FontSize.verify(message.fontSize);
- if (error)
- return "fontSize." + error;
- }
- if (message.fontFamily != null && message.hasOwnProperty("fontFamily"))
- if (!$util.isString(message.fontFamily))
- return "fontFamily: string expected";
+ if (message.collection != null && message.hasOwnProperty("collection"))
+ if (!$util.isString(message.collection))
+ return "collection: string expected";
+ if (message.schema != null && message.hasOwnProperty("schema"))
+ if (!$util.isString(message.schema))
+ return "schema: string expected";
return null;
};
/**
- * Creates a Style message from a plain object. Also converts values to their respective internal types.
+ * Creates a DocumentWarehouseConfig message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Style} Style
+ * @returns {google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig} DocumentWarehouseConfig
*/
- Style.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Style)
+ DocumentWarehouseConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Style();
- if (object.textAnchor != null) {
- if (typeof object.textAnchor !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Style.textAnchor: object expected");
- message.textAnchor = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.fromObject(object.textAnchor);
- }
- if (object.color != null) {
- if (typeof object.color !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Style.color: object expected");
- message.color = $root.google.type.Color.fromObject(object.color);
- }
- if (object.backgroundColor != null) {
- if (typeof object.backgroundColor !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Style.backgroundColor: object expected");
- message.backgroundColor = $root.google.type.Color.fromObject(object.backgroundColor);
- }
- if (object.fontWeight != null)
- message.fontWeight = String(object.fontWeight);
- if (object.textStyle != null)
- message.textStyle = String(object.textStyle);
- if (object.textDecoration != null)
- message.textDecoration = String(object.textDecoration);
- if (object.fontSize != null) {
- if (typeof object.fontSize !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Style.fontSize: object expected");
- message.fontSize = $root.google.cloud.documentai.v1beta3.Document.Style.FontSize.fromObject(object.fontSize);
- }
- if (object.fontFamily != null)
- message.fontFamily = String(object.fontFamily);
+ var message = new $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig();
+ if (object.collection != null)
+ message.collection = String(object.collection);
+ if (object.schema != null)
+ message.schema = String(object.schema);
return message;
};
/**
- * Creates a plain object from a Style message. Also converts values to other types if specified.
+ * Creates a plain object from a DocumentWarehouseConfig message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Style} message Style
+ * @param {google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig} message DocumentWarehouseConfig
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Style.toObject = function toObject(message, options) {
+ DocumentWarehouseConfig.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
- object.textAnchor = null;
- object.color = null;
- object.backgroundColor = null;
- object.fontWeight = "";
- object.textStyle = "";
- object.textDecoration = "";
- object.fontSize = null;
- object.fontFamily = "";
+ object.collection = "";
+ object.schema = "";
}
- if (message.textAnchor != null && message.hasOwnProperty("textAnchor"))
- object.textAnchor = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.toObject(message.textAnchor, options);
- if (message.color != null && message.hasOwnProperty("color"))
- object.color = $root.google.type.Color.toObject(message.color, options);
- if (message.backgroundColor != null && message.hasOwnProperty("backgroundColor"))
- object.backgroundColor = $root.google.type.Color.toObject(message.backgroundColor, options);
- if (message.fontWeight != null && message.hasOwnProperty("fontWeight"))
- object.fontWeight = message.fontWeight;
- if (message.textStyle != null && message.hasOwnProperty("textStyle"))
- object.textStyle = message.textStyle;
- if (message.textDecoration != null && message.hasOwnProperty("textDecoration"))
- object.textDecoration = message.textDecoration;
- if (message.fontSize != null && message.hasOwnProperty("fontSize"))
- object.fontSize = $root.google.cloud.documentai.v1beta3.Document.Style.FontSize.toObject(message.fontSize, options);
- if (message.fontFamily != null && message.hasOwnProperty("fontFamily"))
- object.fontFamily = message.fontFamily;
+ if (message.collection != null && message.hasOwnProperty("collection"))
+ object.collection = message.collection;
+ if (message.schema != null && message.hasOwnProperty("schema"))
+ object.schema = message.schema;
return object;
};
/**
- * Converts this Style to JSON.
+ * Converts this DocumentWarehouseConfig to JSON.
* @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @instance
* @returns {Object.} JSON object
*/
- Style.prototype.toJSON = function toJSON() {
+ DocumentWarehouseConfig.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for Style
+ * Gets the default type url for DocumentWarehouseConfig
* @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Style
+ * @memberof google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- Style.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ DocumentWarehouseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Style";
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig";
};
- Style.FontSize = (function() {
-
- /**
- * Properties of a FontSize.
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @interface IFontSize
- * @property {number|null} [size] FontSize size
- * @property {string|null} [unit] FontSize unit
- */
-
- /**
- * Constructs a new FontSize.
- * @memberof google.cloud.documentai.v1beta3.Document.Style
- * @classdesc Represents a FontSize.
- * @implements IFontSize
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Style.IFontSize=} [properties] Properties to set
- */
- function FontSize(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- /**
- * FontSize size.
- * @member {number} size
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @instance
- */
- FontSize.prototype.size = 0;
-
- /**
- * FontSize unit.
- * @member {string} unit
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @instance
- */
- FontSize.prototype.unit = "";
-
- /**
- * Creates a new FontSize instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Style.IFontSize=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Style.FontSize} FontSize instance
- */
- FontSize.create = function create(properties) {
- return new FontSize(properties);
- };
-
- /**
- * Encodes the specified FontSize message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.FontSize.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Style.IFontSize} message FontSize message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- FontSize.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.size != null && Object.hasOwnProperty.call(message, "size"))
- writer.uint32(/* id 1, wireType 5 =*/13).float(message.size);
- if (message.unit != null && Object.hasOwnProperty.call(message, "unit"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.unit);
- return writer;
- };
-
- /**
- * Encodes the specified FontSize message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Style.FontSize.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Style.IFontSize} message FontSize message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- FontSize.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a FontSize message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Style.FontSize} FontSize
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- FontSize.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Style.FontSize();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.size = reader.float();
- break;
- }
- case 2: {
- message.unit = reader.string();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a FontSize message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Style.FontSize} FontSize
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- FontSize.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a FontSize message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- FontSize.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.size != null && message.hasOwnProperty("size"))
- if (typeof message.size !== "number")
- return "size: number expected";
- if (message.unit != null && message.hasOwnProperty("unit"))
- if (!$util.isString(message.unit))
- return "unit: string expected";
- return null;
- };
-
- /**
- * Creates a FontSize message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Style.FontSize} FontSize
- */
- FontSize.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Style.FontSize)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Style.FontSize();
- if (object.size != null)
- message.size = Number(object.size);
- if (object.unit != null)
- message.unit = String(object.unit);
- return message;
- };
-
- /**
- * Creates a plain object from a FontSize message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Style.FontSize} message FontSize
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- FontSize.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.size = 0;
- object.unit = "";
- }
- if (message.size != null && message.hasOwnProperty("size"))
- object.size = options.json && !isFinite(message.size) ? String(message.size) : message.size;
- if (message.unit != null && message.hasOwnProperty("unit"))
- object.unit = message.unit;
- return object;
- };
-
- /**
- * Converts this FontSize to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @instance
- * @returns {Object.} JSON object
- */
- FontSize.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for FontSize
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Style.FontSize
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- FontSize.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Style.FontSize";
- };
-
- return FontSize;
- })();
-
- return Style;
+ return DocumentWarehouseConfig;
})();
- Document.Page = (function() {
+ Dataset.UnmanagedDatasetConfig = (function() {
/**
- * Properties of a Page.
- * @memberof google.cloud.documentai.v1beta3.Document
- * @interface IPage
- * @property {number|null} [pageNumber] Page pageNumber
- * @property {google.cloud.documentai.v1beta3.Document.Page.IImage|null} [image] Page image
- * @property {Array.|null} [transforms] Page transforms
- * @property {google.cloud.documentai.v1beta3.Document.Page.IDimension|null} [dimension] Page dimension
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Page layout
- * @property {Array.|null} [detectedLanguages] Page detectedLanguages
- * @property {Array.|null} [blocks] Page blocks
- * @property {Array.|null} [paragraphs] Page paragraphs
- * @property {Array.|null} [lines] Page lines
- * @property {Array.|null} [tokens] Page tokens
- * @property {Array.|null} [visualElements] Page visualElements
- * @property {Array.|null} [tables] Page tables
- * @property {Array.|null} [formFields] Page formFields
- * @property {Array.|null} [symbols] Page symbols
- * @property {Array.|null} [detectedBarcodes] Page detectedBarcodes
- * @property {google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores|null} [imageQualityScores] Page imageQualityScores
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] Page provenance
+ * Properties of an UnmanagedDatasetConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @interface IUnmanagedDatasetConfig
*/
/**
- * Constructs a new Page.
- * @memberof google.cloud.documentai.v1beta3.Document
- * @classdesc Represents a Page.
- * @implements IPage
+ * Constructs a new UnmanagedDatasetConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @classdesc Represents an UnmanagedDatasetConfig.
+ * @implements IUnmanagedDatasetConfig
* @constructor
- * @param {google.cloud.documentai.v1beta3.Document.IPage=} [properties] Properties to set
+ * @param {google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig=} [properties] Properties to set
*/
- function Page(properties) {
- this.transforms = [];
- this.detectedLanguages = [];
- this.blocks = [];
- this.paragraphs = [];
- this.lines = [];
- this.tokens = [];
- this.visualElements = [];
- this.tables = [];
- this.formFields = [];
- this.symbols = [];
- this.detectedBarcodes = [];
+ function UnmanagedDatasetConfig(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -58732,334 +58601,238 @@
}
/**
- * Page pageNumber.
- * @member {number} pageNumber
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Creates a new UnmanagedDatasetConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig} UnmanagedDatasetConfig instance
*/
- Page.prototype.pageNumber = 0;
+ UnmanagedDatasetConfig.create = function create(properties) {
+ return new UnmanagedDatasetConfig(properties);
+ };
/**
- * Page image.
- * @member {google.cloud.documentai.v1beta3.Document.Page.IImage|null|undefined} image
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Encodes the specified UnmanagedDatasetConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig} message UnmanagedDatasetConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
*/
- Page.prototype.image = null;
+ UnmanagedDatasetConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
/**
- * Page transforms.
- * @member {Array.} transforms
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Encodes the specified UnmanagedDatasetConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig} message UnmanagedDatasetConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
*/
- Page.prototype.transforms = $util.emptyArray;
+ UnmanagedDatasetConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
/**
- * Page dimension.
- * @member {google.cloud.documentai.v1beta3.Document.Page.IDimension|null|undefined} dimension
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Decodes an UnmanagedDatasetConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig} UnmanagedDatasetConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Page.prototype.dimension = null;
+ UnmanagedDatasetConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
/**
- * Page layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Decodes an UnmanagedDatasetConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig} UnmanagedDatasetConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Page.prototype.layout = null;
+ UnmanagedDatasetConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
/**
- * Page detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Verifies an UnmanagedDatasetConfig message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Page.prototype.detectedLanguages = $util.emptyArray;
+ UnmanagedDatasetConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
/**
- * Page blocks.
- * @member {Array.} blocks
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Creates an UnmanagedDatasetConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig} UnmanagedDatasetConfig
*/
- Page.prototype.blocks = $util.emptyArray;
+ UnmanagedDatasetConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig)
+ return object;
+ return new $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig();
+ };
/**
- * Page paragraphs.
- * @member {Array.} paragraphs
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Creates a plain object from an UnmanagedDatasetConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig} message UnmanagedDatasetConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
*/
- Page.prototype.paragraphs = $util.emptyArray;
+ UnmanagedDatasetConfig.toObject = function toObject() {
+ return {};
+ };
/**
- * Page lines.
- * @member {Array.} lines
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * Converts this UnmanagedDatasetConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
* @instance
+ * @returns {Object.} JSON object
*/
- Page.prototype.lines = $util.emptyArray;
+ UnmanagedDatasetConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
/**
- * Page tokens.
- * @member {Array.} tokens
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Gets the default type url for UnmanagedDatasetConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
*/
- Page.prototype.tokens = $util.emptyArray;
+ UnmanagedDatasetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig";
+ };
+
+ return UnmanagedDatasetConfig;
+ })();
+
+ Dataset.SpannerIndexingConfig = (function() {
/**
- * Page visualElements.
- * @member {Array.} visualElements
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Properties of a SpannerIndexingConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @interface ISpannerIndexingConfig
*/
- Page.prototype.visualElements = $util.emptyArray;
/**
- * Page tables.
- * @member {Array.} tables
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
+ * Constructs a new SpannerIndexingConfig.
+ * @memberof google.cloud.documentai.v1beta3.Dataset
+ * @classdesc Represents a SpannerIndexingConfig.
+ * @implements ISpannerIndexingConfig
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig=} [properties] Properties to set
*/
- Page.prototype.tables = $util.emptyArray;
+ function SpannerIndexingConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
/**
- * Page formFields.
- * @member {Array.} formFields
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
- */
- Page.prototype.formFields = $util.emptyArray;
-
- /**
- * Page symbols.
- * @member {Array.} symbols
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
- */
- Page.prototype.symbols = $util.emptyArray;
-
- /**
- * Page detectedBarcodes.
- * @member {Array.} detectedBarcodes
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
- */
- Page.prototype.detectedBarcodes = $util.emptyArray;
-
- /**
- * Page imageQualityScores.
- * @member {google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores|null|undefined} imageQualityScores
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
- */
- Page.prototype.imageQualityScores = null;
-
- /**
- * Page provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
- */
- Page.prototype.provenance = null;
-
- /**
- * Creates a new Page instance using the specified properties.
+ * Creates a new SpannerIndexingConfig instance using the specified properties.
* @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IPage=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page} Page instance
+ * @param {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} SpannerIndexingConfig instance
*/
- Page.create = function create(properties) {
- return new Page(properties);
+ SpannerIndexingConfig.create = function create(properties) {
+ return new SpannerIndexingConfig(properties);
};
/**
- * Encodes the specified Page message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.verify|verify} messages.
+ * Encodes the specified SpannerIndexingConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.verify|verify} messages.
* @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IPage} message Page message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig} message SpannerIndexingConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Page.encode = function encode(message, writer) {
+ SpannerIndexingConfig.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageNumber);
- if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Dimension.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.blocks != null && message.blocks.length)
- for (var i = 0; i < message.blocks.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Block.encode(message.blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.paragraphs != null && message.paragraphs.length)
- for (var i = 0; i < message.paragraphs.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph.encode(message.paragraphs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.lines != null && message.lines.length)
- for (var i = 0; i < message.lines.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Line.encode(message.lines[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.tokens != null && message.tokens.length)
- for (var i = 0; i < message.tokens.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Token.encode(message.tokens[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
- if (message.visualElements != null && message.visualElements.length)
- for (var i = 0; i < message.visualElements.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement.encode(message.visualElements[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.tables != null && message.tables.length)
- for (var i = 0; i < message.tables.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Table.encode(message.tables[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
- if (message.formFields != null && message.formFields.length)
- for (var i = 0; i < message.formFields.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.FormField.encode(message.formFields[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
- if (message.symbols != null && message.symbols.length)
- for (var i = 0; i < message.symbols.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Symbol.encode(message.symbols[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
- if (message.image != null && Object.hasOwnProperty.call(message, "image"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Image.encode(message.image, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
- if (message.transforms != null && message.transforms.length)
- for (var i = 0; i < message.transforms.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Matrix.encode(message.transforms[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
- if (message.detectedBarcodes != null && message.detectedBarcodes.length)
- for (var i = 0; i < message.detectedBarcodes.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.encode(message.detectedBarcodes[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
- if (message.imageQualityScores != null && Object.hasOwnProperty.call(message, "imageQualityScores"))
- $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.encode(message.imageQualityScores, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.verify|verify} messages.
+ * Encodes the specified SpannerIndexingConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.IPage} message Page message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig} message SpannerIndexingConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Page.encodeDelimited = function encodeDelimited(message, writer) {
+ SpannerIndexingConfig.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a Page message from the specified reader or buffer.
+ * Decodes a SpannerIndexingConfig message from the specified reader or buffer.
* @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page} Page
+ * @returns {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} SpannerIndexingConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Page.decode = function decode(reader, length) {
+ SpannerIndexingConfig.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
- case 1: {
- message.pageNumber = reader.int32();
- break;
- }
- case 13: {
- message.image = $root.google.cloud.documentai.v1beta3.Document.Page.Image.decode(reader, reader.uint32());
- break;
- }
- case 14: {
- if (!(message.transforms && message.transforms.length))
- message.transforms = [];
- message.transforms.push($root.google.cloud.documentai.v1beta3.Document.Page.Matrix.decode(reader, reader.uint32()));
- break;
- }
- case 2: {
- message.dimension = $root.google.cloud.documentai.v1beta3.Document.Page.Dimension.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 5: {
- if (!(message.blocks && message.blocks.length))
- message.blocks = [];
- message.blocks.push($root.google.cloud.documentai.v1beta3.Document.Page.Block.decode(reader, reader.uint32()));
- break;
- }
- case 6: {
- if (!(message.paragraphs && message.paragraphs.length))
- message.paragraphs = [];
- message.paragraphs.push($root.google.cloud.documentai.v1beta3.Document.Page.Paragraph.decode(reader, reader.uint32()));
- break;
- }
- case 7: {
- if (!(message.lines && message.lines.length))
- message.lines = [];
- message.lines.push($root.google.cloud.documentai.v1beta3.Document.Page.Line.decode(reader, reader.uint32()));
- break;
- }
- case 8: {
- if (!(message.tokens && message.tokens.length))
- message.tokens = [];
- message.tokens.push($root.google.cloud.documentai.v1beta3.Document.Page.Token.decode(reader, reader.uint32()));
- break;
- }
- case 9: {
- if (!(message.visualElements && message.visualElements.length))
- message.visualElements = [];
- message.visualElements.push($root.google.cloud.documentai.v1beta3.Document.Page.VisualElement.decode(reader, reader.uint32()));
- break;
- }
- case 10: {
- if (!(message.tables && message.tables.length))
- message.tables = [];
- message.tables.push($root.google.cloud.documentai.v1beta3.Document.Page.Table.decode(reader, reader.uint32()));
- break;
- }
- case 11: {
- if (!(message.formFields && message.formFields.length))
- message.formFields = [];
- message.formFields.push($root.google.cloud.documentai.v1beta3.Document.Page.FormField.decode(reader, reader.uint32()));
- break;
- }
- case 12: {
- if (!(message.symbols && message.symbols.length))
- message.symbols = [];
- message.symbols.push($root.google.cloud.documentai.v1beta3.Document.Page.Symbol.decode(reader, reader.uint32()));
- break;
- }
- case 15: {
- if (!(message.detectedBarcodes && message.detectedBarcodes.length))
- message.detectedBarcodes = [];
- message.detectedBarcodes.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.decode(reader, reader.uint32()));
- break;
- }
- case 17: {
- message.imageQualityScores = $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.decode(reader, reader.uint32());
- break;
- }
- case 16: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
- break;
- }
default:
reader.skipType(tag & 7);
break;
@@ -59069,2584 +58842,2086 @@
};
/**
- * Decodes a Page message from the specified reader or buffer, length delimited.
+ * Decodes a SpannerIndexingConfig message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page} Page
+ * @returns {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} SpannerIndexingConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Page.decodeDelimited = function decodeDelimited(reader) {
+ SpannerIndexingConfig.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a Page message.
+ * Verifies a SpannerIndexingConfig message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Page.verify = function verify(message) {
+ SpannerIndexingConfig.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
- if (!$util.isInteger(message.pageNumber))
- return "pageNumber: integer expected";
- if (message.image != null && message.hasOwnProperty("image")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Image.verify(message.image);
- if (error)
- return "image." + error;
- }
- if (message.transforms != null && message.hasOwnProperty("transforms")) {
- if (!Array.isArray(message.transforms))
- return "transforms: array expected";
- for (var i = 0; i < message.transforms.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Matrix.verify(message.transforms[i]);
- if (error)
- return "transforms." + error;
- }
- }
- if (message.dimension != null && message.hasOwnProperty("dimension")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Dimension.verify(message.dimension);
- if (error)
- return "dimension." + error;
- }
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- if (message.blocks != null && message.hasOwnProperty("blocks")) {
- if (!Array.isArray(message.blocks))
- return "blocks: array expected";
- for (var i = 0; i < message.blocks.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Block.verify(message.blocks[i]);
- if (error)
- return "blocks." + error;
- }
- }
- if (message.paragraphs != null && message.hasOwnProperty("paragraphs")) {
- if (!Array.isArray(message.paragraphs))
- return "paragraphs: array expected";
- for (var i = 0; i < message.paragraphs.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify(message.paragraphs[i]);
- if (error)
- return "paragraphs." + error;
- }
- }
- if (message.lines != null && message.hasOwnProperty("lines")) {
- if (!Array.isArray(message.lines))
- return "lines: array expected";
- for (var i = 0; i < message.lines.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Line.verify(message.lines[i]);
- if (error)
- return "lines." + error;
- }
- }
- if (message.tokens != null && message.hasOwnProperty("tokens")) {
- if (!Array.isArray(message.tokens))
- return "tokens: array expected";
- for (var i = 0; i < message.tokens.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Token.verify(message.tokens[i]);
- if (error)
- return "tokens." + error;
- }
- }
- if (message.visualElements != null && message.hasOwnProperty("visualElements")) {
- if (!Array.isArray(message.visualElements))
- return "visualElements: array expected";
- for (var i = 0; i < message.visualElements.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify(message.visualElements[i]);
- if (error)
- return "visualElements." + error;
- }
- }
- if (message.tables != null && message.hasOwnProperty("tables")) {
- if (!Array.isArray(message.tables))
- return "tables: array expected";
- for (var i = 0; i < message.tables.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Table.verify(message.tables[i]);
- if (error)
- return "tables." + error;
- }
- }
- if (message.formFields != null && message.hasOwnProperty("formFields")) {
- if (!Array.isArray(message.formFields))
- return "formFields: array expected";
- for (var i = 0; i < message.formFields.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.FormField.verify(message.formFields[i]);
- if (error)
- return "formFields." + error;
- }
- }
- if (message.symbols != null && message.hasOwnProperty("symbols")) {
- if (!Array.isArray(message.symbols))
- return "symbols: array expected";
- for (var i = 0; i < message.symbols.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Symbol.verify(message.symbols[i]);
- if (error)
- return "symbols." + error;
- }
- }
- if (message.detectedBarcodes != null && message.hasOwnProperty("detectedBarcodes")) {
- if (!Array.isArray(message.detectedBarcodes))
- return "detectedBarcodes: array expected";
- for (var i = 0; i < message.detectedBarcodes.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify(message.detectedBarcodes[i]);
- if (error)
- return "detectedBarcodes." + error;
- }
- }
- if (message.imageQualityScores != null && message.hasOwnProperty("imageQualityScores")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify(message.imageQualityScores);
- if (error)
- return "imageQualityScores." + error;
- }
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
- }
return null;
};
/**
- * Creates a Page message from a plain object. Also converts values to their respective internal types.
+ * Creates a SpannerIndexingConfig message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page} Page
+ * @returns {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} SpannerIndexingConfig
*/
- Page.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page)
+ SpannerIndexingConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page();
- if (object.pageNumber != null)
- message.pageNumber = object.pageNumber | 0;
- if (object.image != null) {
- if (typeof object.image !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.image: object expected");
- message.image = $root.google.cloud.documentai.v1beta3.Document.Page.Image.fromObject(object.image);
- }
- if (object.transforms) {
- if (!Array.isArray(object.transforms))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.transforms: array expected");
- message.transforms = [];
- for (var i = 0; i < object.transforms.length; ++i) {
- if (typeof object.transforms[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.transforms: object expected");
- message.transforms[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Matrix.fromObject(object.transforms[i]);
- }
- }
- if (object.dimension != null) {
- if (typeof object.dimension !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.dimension: object expected");
- message.dimension = $root.google.cloud.documentai.v1beta3.Document.Page.Dimension.fromObject(object.dimension);
- }
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- if (object.blocks) {
- if (!Array.isArray(object.blocks))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.blocks: array expected");
- message.blocks = [];
- for (var i = 0; i < object.blocks.length; ++i) {
- if (typeof object.blocks[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.blocks: object expected");
- message.blocks[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Block.fromObject(object.blocks[i]);
- }
- }
- if (object.paragraphs) {
- if (!Array.isArray(object.paragraphs))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.paragraphs: array expected");
- message.paragraphs = [];
- for (var i = 0; i < object.paragraphs.length; ++i) {
- if (typeof object.paragraphs[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.paragraphs: object expected");
- message.paragraphs[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph.fromObject(object.paragraphs[i]);
- }
- }
- if (object.lines) {
- if (!Array.isArray(object.lines))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.lines: array expected");
- message.lines = [];
- for (var i = 0; i < object.lines.length; ++i) {
- if (typeof object.lines[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.lines: object expected");
- message.lines[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Line.fromObject(object.lines[i]);
- }
- }
- if (object.tokens) {
- if (!Array.isArray(object.tokens))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.tokens: array expected");
- message.tokens = [];
- for (var i = 0; i < object.tokens.length; ++i) {
- if (typeof object.tokens[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.tokens: object expected");
- message.tokens[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Token.fromObject(object.tokens[i]);
- }
- }
- if (object.visualElements) {
- if (!Array.isArray(object.visualElements))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.visualElements: array expected");
- message.visualElements = [];
- for (var i = 0; i < object.visualElements.length; ++i) {
- if (typeof object.visualElements[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.visualElements: object expected");
- message.visualElements[i] = $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement.fromObject(object.visualElements[i]);
- }
- }
- if (object.tables) {
- if (!Array.isArray(object.tables))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.tables: array expected");
- message.tables = [];
- for (var i = 0; i < object.tables.length; ++i) {
- if (typeof object.tables[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.tables: object expected");
- message.tables[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.fromObject(object.tables[i]);
- }
- }
- if (object.formFields) {
- if (!Array.isArray(object.formFields))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.formFields: array expected");
- message.formFields = [];
- for (var i = 0; i < object.formFields.length; ++i) {
- if (typeof object.formFields[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.formFields: object expected");
- message.formFields[i] = $root.google.cloud.documentai.v1beta3.Document.Page.FormField.fromObject(object.formFields[i]);
- }
- }
- if (object.symbols) {
- if (!Array.isArray(object.symbols))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.symbols: array expected");
- message.symbols = [];
- for (var i = 0; i < object.symbols.length; ++i) {
- if (typeof object.symbols[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.symbols: object expected");
- message.symbols[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Symbol.fromObject(object.symbols[i]);
- }
- }
- if (object.detectedBarcodes) {
- if (!Array.isArray(object.detectedBarcodes))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.detectedBarcodes: array expected");
- message.detectedBarcodes = [];
- for (var i = 0; i < object.detectedBarcodes.length; ++i) {
- if (typeof object.detectedBarcodes[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.detectedBarcodes: object expected");
- message.detectedBarcodes[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.fromObject(object.detectedBarcodes[i]);
- }
- }
- if (object.imageQualityScores != null) {
- if (typeof object.imageQualityScores !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.imageQualityScores: object expected");
- message.imageQualityScores = $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.fromObject(object.imageQualityScores);
- }
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
- }
- return message;
+ return new $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig();
};
/**
- * Creates a plain object from a Page message. Also converts values to other types if specified.
+ * Creates a plain object from a SpannerIndexingConfig message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page} message Page
+ * @param {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} message SpannerIndexingConfig
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Page.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.detectedLanguages = [];
- object.blocks = [];
- object.paragraphs = [];
- object.lines = [];
- object.tokens = [];
- object.visualElements = [];
- object.tables = [];
- object.formFields = [];
- object.symbols = [];
- object.transforms = [];
- object.detectedBarcodes = [];
+ SpannerIndexingConfig.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this SpannerIndexingConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ SpannerIndexingConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for SpannerIndexingConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ SpannerIndexingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
}
- if (options.defaults) {
- object.pageNumber = 0;
- object.dimension = null;
- object.layout = null;
- object.image = null;
- object.provenance = null;
- object.imageQualityScores = null;
- }
- if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
- object.pageNumber = message.pageNumber;
- if (message.dimension != null && message.hasOwnProperty("dimension"))
- object.dimension = $root.google.cloud.documentai.v1beta3.Document.Page.Dimension.toObject(message.dimension, options);
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
- }
- if (message.blocks && message.blocks.length) {
- object.blocks = [];
- for (var j = 0; j < message.blocks.length; ++j)
- object.blocks[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Block.toObject(message.blocks[j], options);
- }
- if (message.paragraphs && message.paragraphs.length) {
- object.paragraphs = [];
- for (var j = 0; j < message.paragraphs.length; ++j)
- object.paragraphs[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph.toObject(message.paragraphs[j], options);
- }
- if (message.lines && message.lines.length) {
- object.lines = [];
- for (var j = 0; j < message.lines.length; ++j)
- object.lines[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Line.toObject(message.lines[j], options);
- }
- if (message.tokens && message.tokens.length) {
- object.tokens = [];
- for (var j = 0; j < message.tokens.length; ++j)
- object.tokens[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Token.toObject(message.tokens[j], options);
- }
- if (message.visualElements && message.visualElements.length) {
- object.visualElements = [];
- for (var j = 0; j < message.visualElements.length; ++j)
- object.visualElements[j] = $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement.toObject(message.visualElements[j], options);
- }
- if (message.tables && message.tables.length) {
- object.tables = [];
- for (var j = 0; j < message.tables.length; ++j)
- object.tables[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.toObject(message.tables[j], options);
- }
- if (message.formFields && message.formFields.length) {
- object.formFields = [];
- for (var j = 0; j < message.formFields.length; ++j)
- object.formFields[j] = $root.google.cloud.documentai.v1beta3.Document.Page.FormField.toObject(message.formFields[j], options);
- }
- if (message.symbols && message.symbols.length) {
- object.symbols = [];
- for (var j = 0; j < message.symbols.length; ++j)
- object.symbols[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Symbol.toObject(message.symbols[j], options);
- }
- if (message.image != null && message.hasOwnProperty("image"))
- object.image = $root.google.cloud.documentai.v1beta3.Document.Page.Image.toObject(message.image, options);
- if (message.transforms && message.transforms.length) {
- object.transforms = [];
- for (var j = 0; j < message.transforms.length; ++j)
- object.transforms[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Matrix.toObject(message.transforms[j], options);
- }
- if (message.detectedBarcodes && message.detectedBarcodes.length) {
- object.detectedBarcodes = [];
- for (var j = 0; j < message.detectedBarcodes.length; ++j)
- object.detectedBarcodes[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.toObject(message.detectedBarcodes[j], options);
- }
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
- if (message.imageQualityScores != null && message.hasOwnProperty("imageQualityScores"))
- object.imageQualityScores = $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.toObject(message.imageQualityScores, options);
- return object;
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig";
};
- /**
- * Converts this Page to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @instance
- * @returns {Object.} JSON object
- */
- Page.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ return SpannerIndexingConfig;
+ })();
- /**
- * Gets the default type url for Page
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page";
- };
+ /**
+ * State enum.
+ * @name google.cloud.documentai.v1beta3.Dataset.State
+ * @enum {number}
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
+ * @property {number} UNINITIALIZED=1 UNINITIALIZED value
+ * @property {number} INITIALIZING=2 INITIALIZING value
+ * @property {number} INITIALIZED=3 INITIALIZED value
+ */
+ Dataset.State = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "UNINITIALIZED"] = 1;
+ values[valuesById[2] = "INITIALIZING"] = 2;
+ values[valuesById[3] = "INITIALIZED"] = 3;
+ return values;
+ })();
- Page.Dimension = (function() {
+ return Dataset;
+ })();
- /**
- * Properties of a Dimension.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IDimension
- * @property {number|null} [width] Dimension width
- * @property {number|null} [height] Dimension height
- * @property {string|null} [unit] Dimension unit
- */
+ v1beta3.DatasetSchema = (function() {
- /**
- * Constructs a new Dimension.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Dimension.
- * @implements IDimension
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDimension=} [properties] Properties to set
- */
- function Dimension(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Properties of a DatasetSchema.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IDatasetSchema
+ * @property {string|null} [name] DatasetSchema name
+ * @property {google.cloud.documentai.v1beta3.IDocumentSchema|null} [documentSchema] DatasetSchema documentSchema
+ */
- /**
- * Dimension width.
- * @member {number} width
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @instance
- */
- Dimension.prototype.width = 0;
+ /**
+ * Constructs a new DatasetSchema.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a DatasetSchema.
+ * @implements IDatasetSchema
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IDatasetSchema=} [properties] Properties to set
+ */
+ function DatasetSchema(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Dimension height.
- * @member {number} height
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @instance
- */
- Dimension.prototype.height = 0;
+ /**
+ * DatasetSchema name.
+ * @member {string} name
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @instance
+ */
+ DatasetSchema.prototype.name = "";
- /**
- * Dimension unit.
- * @member {string} unit
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @instance
- */
- Dimension.prototype.unit = "";
+ /**
+ * DatasetSchema documentSchema.
+ * @member {google.cloud.documentai.v1beta3.IDocumentSchema|null|undefined} documentSchema
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @instance
+ */
+ DatasetSchema.prototype.documentSchema = null;
- /**
- * Creates a new Dimension instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDimension=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Dimension} Dimension instance
- */
- Dimension.create = function create(properties) {
- return new Dimension(properties);
- };
+ /**
+ * Creates a new DatasetSchema instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDatasetSchema=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DatasetSchema} DatasetSchema instance
+ */
+ DatasetSchema.create = function create(properties) {
+ return new DatasetSchema(properties);
+ };
- /**
- * Encodes the specified Dimension message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Dimension.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDimension} message Dimension message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Dimension.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.width != null && Object.hasOwnProperty.call(message, "width"))
- writer.uint32(/* id 1, wireType 5 =*/13).float(message.width);
- if (message.height != null && Object.hasOwnProperty.call(message, "height"))
- writer.uint32(/* id 2, wireType 5 =*/21).float(message.height);
- if (message.unit != null && Object.hasOwnProperty.call(message, "unit"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.unit);
- return writer;
- };
+ /**
+ * Encodes the specified DatasetSchema message. Does not implicitly {@link google.cloud.documentai.v1beta3.DatasetSchema.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDatasetSchema} message DatasetSchema message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DatasetSchema.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.documentSchema != null && Object.hasOwnProperty.call(message, "documentSchema"))
+ $root.google.cloud.documentai.v1beta3.DocumentSchema.encode(message.documentSchema, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
- /**
- * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Dimension.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDimension} message Dimension message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Dimension.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Encodes the specified DatasetSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DatasetSchema.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDatasetSchema} message DatasetSchema message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DatasetSchema.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Decodes a Dimension message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Dimension} Dimension
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Dimension.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Dimension();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.width = reader.float();
- break;
- }
- case 2: {
- message.height = reader.float();
- break;
- }
- case 3: {
- message.unit = reader.string();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
+ /**
+ * Decodes a DatasetSchema message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DatasetSchema} DatasetSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DatasetSchema.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DatasetSchema();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
}
- return message;
- };
+ case 3: {
+ message.documentSchema = $root.google.cloud.documentai.v1beta3.DocumentSchema.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Decodes a Dimension message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Dimension} Dimension
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Dimension.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Decodes a DatasetSchema message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.DatasetSchema} DatasetSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DatasetSchema.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Verifies a Dimension message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Dimension.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.width != null && message.hasOwnProperty("width"))
- if (typeof message.width !== "number")
- return "width: number expected";
- if (message.height != null && message.hasOwnProperty("height"))
- if (typeof message.height !== "number")
- return "height: number expected";
- if (message.unit != null && message.hasOwnProperty("unit"))
- if (!$util.isString(message.unit))
- return "unit: string expected";
- return null;
- };
+ /**
+ * Verifies a DatasetSchema message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DatasetSchema.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.documentSchema != null && message.hasOwnProperty("documentSchema")) {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentSchema.verify(message.documentSchema);
+ if (error)
+ return "documentSchema." + error;
+ }
+ return null;
+ };
- /**
- * Creates a Dimension message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Dimension} Dimension
- */
- Dimension.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Dimension)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Dimension();
- if (object.width != null)
- message.width = Number(object.width);
- if (object.height != null)
- message.height = Number(object.height);
- if (object.unit != null)
- message.unit = String(object.unit);
- return message;
- };
+ /**
+ * Creates a DatasetSchema message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.DatasetSchema} DatasetSchema
+ */
+ DatasetSchema.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DatasetSchema)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.DatasetSchema();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.documentSchema != null) {
+ if (typeof object.documentSchema !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DatasetSchema.documentSchema: object expected");
+ message.documentSchema = $root.google.cloud.documentai.v1beta3.DocumentSchema.fromObject(object.documentSchema);
+ }
+ return message;
+ };
- /**
- * Creates a plain object from a Dimension message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Dimension} message Dimension
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Dimension.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.width = 0;
- object.height = 0;
- object.unit = "";
- }
- if (message.width != null && message.hasOwnProperty("width"))
- object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width;
- if (message.height != null && message.hasOwnProperty("height"))
- object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height;
- if (message.unit != null && message.hasOwnProperty("unit"))
- object.unit = message.unit;
- return object;
- };
+ /**
+ * Creates a plain object from a DatasetSchema message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DatasetSchema} message DatasetSchema
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DatasetSchema.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.documentSchema = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.documentSchema != null && message.hasOwnProperty("documentSchema"))
+ object.documentSchema = $root.google.cloud.documentai.v1beta3.DocumentSchema.toObject(message.documentSchema, options);
+ return object;
+ };
- /**
- * Converts this Dimension to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @instance
- * @returns {Object.} JSON object
- */
- Dimension.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Converts this DatasetSchema to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DatasetSchema.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Gets the default type url for Dimension
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Dimension
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Dimension";
- };
+ /**
+ * Gets the default type url for DatasetSchema
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.DatasetSchema
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DatasetSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DatasetSchema";
+ };
- return Dimension;
- })();
+ return DatasetSchema;
+ })();
- Page.Image = (function() {
+ v1beta3.RawDocument = (function() {
- /**
- * Properties of an Image.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IImage
- * @property {Uint8Array|null} [content] Image content
- * @property {string|null} [mimeType] Image mimeType
- * @property {number|null} [width] Image width
- * @property {number|null} [height] Image height
- */
+ /**
+ * Properties of a RawDocument.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IRawDocument
+ * @property {Uint8Array|null} [content] RawDocument content
+ * @property {string|null} [mimeType] RawDocument mimeType
+ */
- /**
- * Constructs a new Image.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents an Image.
- * @implements IImage
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImage=} [properties] Properties to set
- */
- function Image(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- /**
- * Image content.
- * @member {Uint8Array} content
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @instance
- */
- Image.prototype.content = $util.newBuffer([]);
-
- /**
- * Image mimeType.
- * @member {string} mimeType
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @instance
- */
- Image.prototype.mimeType = "";
+ /**
+ * Constructs a new RawDocument.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a RawDocument.
+ * @implements IRawDocument
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IRawDocument=} [properties] Properties to set
+ */
+ function RawDocument(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Image width.
- * @member {number} width
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @instance
- */
- Image.prototype.width = 0;
+ /**
+ * RawDocument content.
+ * @member {Uint8Array} content
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @instance
+ */
+ RawDocument.prototype.content = $util.newBuffer([]);
- /**
- * Image height.
- * @member {number} height
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @instance
- */
- Image.prototype.height = 0;
+ /**
+ * RawDocument mimeType.
+ * @member {string} mimeType
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @instance
+ */
+ RawDocument.prototype.mimeType = "";
- /**
- * Creates a new Image instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImage=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Image} Image instance
- */
- Image.create = function create(properties) {
- return new Image(properties);
- };
+ /**
+ * Creates a new RawDocument instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IRawDocument=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.RawDocument} RawDocument instance
+ */
+ RawDocument.create = function create(properties) {
+ return new RawDocument(properties);
+ };
- /**
- * Encodes the specified Image message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Image.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImage} message Image message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Image.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.content != null && Object.hasOwnProperty.call(message, "content"))
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
- if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
- if (message.width != null && Object.hasOwnProperty.call(message, "width"))
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.width);
- if (message.height != null && Object.hasOwnProperty.call(message, "height"))
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.height);
- return writer;
- };
+ /**
+ * Encodes the specified RawDocument message. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocument.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IRawDocument} message RawDocument message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RawDocument.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.content != null && Object.hasOwnProperty.call(message, "content"))
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
+ if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
+ return writer;
+ };
- /**
- * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Image.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImage} message Image message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Image.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Encodes the specified RawDocument message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocument.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IRawDocument} message RawDocument message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RawDocument.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Decodes an Image message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Image} Image
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Image.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Image();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.content = reader.bytes();
- break;
- }
- case 2: {
- message.mimeType = reader.string();
- break;
- }
- case 3: {
- message.width = reader.int32();
- break;
- }
- case 4: {
- message.height = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
+ /**
+ * Decodes a RawDocument message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.RawDocument} RawDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RawDocument.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.RawDocument();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.content = reader.bytes();
+ break;
}
- return message;
- };
+ case 2: {
+ message.mimeType = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Decodes an Image message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Image} Image
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Image.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Decodes a RawDocument message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.RawDocument} RawDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RawDocument.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Verifies an Image message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Image.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.content != null && message.hasOwnProperty("content"))
- if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
- return "content: buffer expected";
- if (message.mimeType != null && message.hasOwnProperty("mimeType"))
- if (!$util.isString(message.mimeType))
- return "mimeType: string expected";
- if (message.width != null && message.hasOwnProperty("width"))
- if (!$util.isInteger(message.width))
- return "width: integer expected";
- if (message.height != null && message.hasOwnProperty("height"))
- if (!$util.isInteger(message.height))
- return "height: integer expected";
- return null;
- };
+ /**
+ * Verifies a RawDocument message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RawDocument.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.content != null && message.hasOwnProperty("content"))
+ if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
+ return "content: buffer expected";
+ if (message.mimeType != null && message.hasOwnProperty("mimeType"))
+ if (!$util.isString(message.mimeType))
+ return "mimeType: string expected";
+ return null;
+ };
- /**
- * Creates an Image message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Image} Image
- */
- Image.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Image)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Image();
- if (object.content != null)
- if (typeof object.content === "string")
- $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
- else if (object.content.length >= 0)
- message.content = object.content;
- if (object.mimeType != null)
- message.mimeType = String(object.mimeType);
- if (object.width != null)
- message.width = object.width | 0;
- if (object.height != null)
- message.height = object.height | 0;
- return message;
- };
+ /**
+ * Creates a RawDocument message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.RawDocument} RawDocument
+ */
+ RawDocument.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.RawDocument)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.RawDocument();
+ if (object.content != null)
+ if (typeof object.content === "string")
+ $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
+ else if (object.content.length >= 0)
+ message.content = object.content;
+ if (object.mimeType != null)
+ message.mimeType = String(object.mimeType);
+ return message;
+ };
- /**
- * Creates a plain object from an Image message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Image} message Image
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Image.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- if (options.bytes === String)
- object.content = "";
- else {
- object.content = [];
- if (options.bytes !== Array)
- object.content = $util.newBuffer(object.content);
- }
- object.mimeType = "";
- object.width = 0;
- object.height = 0;
- }
- if (message.content != null && message.hasOwnProperty("content"))
- object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
- if (message.mimeType != null && message.hasOwnProperty("mimeType"))
- object.mimeType = message.mimeType;
- if (message.width != null && message.hasOwnProperty("width"))
- object.width = message.width;
- if (message.height != null && message.hasOwnProperty("height"))
- object.height = message.height;
- return object;
- };
+ /**
+ * Creates a plain object from a RawDocument message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.RawDocument} message RawDocument
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RawDocument.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ if (options.bytes === String)
+ object.content = "";
+ else {
+ object.content = [];
+ if (options.bytes !== Array)
+ object.content = $util.newBuffer(object.content);
+ }
+ object.mimeType = "";
+ }
+ if (message.content != null && message.hasOwnProperty("content"))
+ object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
+ if (message.mimeType != null && message.hasOwnProperty("mimeType"))
+ object.mimeType = message.mimeType;
+ return object;
+ };
- /**
- * Converts this Image to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @instance
- * @returns {Object.} JSON object
- */
- Image.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Converts this RawDocument to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RawDocument.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Gets the default type url for Image
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Image
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Image";
- };
+ /**
+ * Gets the default type url for RawDocument
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.RawDocument
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RawDocument.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.RawDocument";
+ };
- return Image;
- })();
+ return RawDocument;
+ })();
- Page.Matrix = (function() {
+ v1beta3.GcsDocument = (function() {
- /**
- * Properties of a Matrix.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IMatrix
- * @property {number|null} [rows] Matrix rows
- * @property {number|null} [cols] Matrix cols
- * @property {number|null} [type] Matrix type
- * @property {Uint8Array|null} [data] Matrix data
- */
+ /**
+ * Properties of a GcsDocument.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IGcsDocument
+ * @property {string|null} [gcsUri] GcsDocument gcsUri
+ * @property {string|null} [mimeType] GcsDocument mimeType
+ */
- /**
- * Constructs a new Matrix.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Matrix.
- * @implements IMatrix
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IMatrix=} [properties] Properties to set
- */
- function Matrix(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Constructs a new GcsDocument.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a GcsDocument.
+ * @implements IGcsDocument
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IGcsDocument=} [properties] Properties to set
+ */
+ function GcsDocument(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Matrix rows.
- * @member {number} rows
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @instance
- */
- Matrix.prototype.rows = 0;
-
- /**
- * Matrix cols.
- * @member {number} cols
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @instance
- */
- Matrix.prototype.cols = 0;
-
- /**
- * Matrix type.
- * @member {number} type
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @instance
- */
- Matrix.prototype.type = 0;
+ /**
+ * GcsDocument gcsUri.
+ * @member {string} gcsUri
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @instance
+ */
+ GcsDocument.prototype.gcsUri = "";
- /**
- * Matrix data.
- * @member {Uint8Array} data
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @instance
- */
- Matrix.prototype.data = $util.newBuffer([]);
+ /**
+ * GcsDocument mimeType.
+ * @member {string} mimeType
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @instance
+ */
+ GcsDocument.prototype.mimeType = "";
- /**
- * Creates a new Matrix instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IMatrix=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Matrix} Matrix instance
- */
- Matrix.create = function create(properties) {
- return new Matrix(properties);
- };
+ /**
+ * Creates a new GcsDocument instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsDocument=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.GcsDocument} GcsDocument instance
+ */
+ GcsDocument.create = function create(properties) {
+ return new GcsDocument(properties);
+ };
- /**
- * Encodes the specified Matrix message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Matrix.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IMatrix} message Matrix message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Matrix.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.rows != null && Object.hasOwnProperty.call(message, "rows"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rows);
- if (message.cols != null && Object.hasOwnProperty.call(message, "cols"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cols);
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
- if (message.data != null && Object.hasOwnProperty.call(message, "data"))
- writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data);
- return writer;
- };
+ /**
+ * Encodes the specified GcsDocument message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocument.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsDocument} message GcsDocument message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsDocument.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri);
+ if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
+ return writer;
+ };
- /**
- * Encodes the specified Matrix message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Matrix.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IMatrix} message Matrix message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Matrix.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Encodes the specified GcsDocument message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocument.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsDocument} message GcsDocument message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsDocument.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Decodes a Matrix message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Matrix} Matrix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Matrix.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Matrix();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.rows = reader.int32();
- break;
- }
- case 2: {
- message.cols = reader.int32();
- break;
- }
- case 3: {
- message.type = reader.int32();
- break;
- }
- case 4: {
- message.data = reader.bytes();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
+ /**
+ * Decodes a GcsDocument message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.GcsDocument} GcsDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsDocument.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.GcsDocument();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.gcsUri = reader.string();
+ break;
}
- return message;
- };
-
- /**
- * Decodes a Matrix message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Matrix} Matrix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Matrix.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ case 2: {
+ message.mimeType = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Verifies a Matrix message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Matrix.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.rows != null && message.hasOwnProperty("rows"))
- if (!$util.isInteger(message.rows))
- return "rows: integer expected";
- if (message.cols != null && message.hasOwnProperty("cols"))
- if (!$util.isInteger(message.cols))
- return "cols: integer expected";
- if (message.type != null && message.hasOwnProperty("type"))
- if (!$util.isInteger(message.type))
- return "type: integer expected";
- if (message.data != null && message.hasOwnProperty("data"))
- if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
- return "data: buffer expected";
- return null;
- };
+ /**
+ * Decodes a GcsDocument message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.GcsDocument} GcsDocument
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsDocument.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Creates a Matrix message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Matrix} Matrix
- */
- Matrix.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Matrix)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Matrix();
- if (object.rows != null)
- message.rows = object.rows | 0;
- if (object.cols != null)
- message.cols = object.cols | 0;
- if (object.type != null)
- message.type = object.type | 0;
- if (object.data != null)
- if (typeof object.data === "string")
- $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
- else if (object.data.length >= 0)
- message.data = object.data;
- return message;
- };
+ /**
+ * Verifies a GcsDocument message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GcsDocument.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.gcsUri != null && message.hasOwnProperty("gcsUri"))
+ if (!$util.isString(message.gcsUri))
+ return "gcsUri: string expected";
+ if (message.mimeType != null && message.hasOwnProperty("mimeType"))
+ if (!$util.isString(message.mimeType))
+ return "mimeType: string expected";
+ return null;
+ };
- /**
- * Creates a plain object from a Matrix message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Matrix} message Matrix
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Matrix.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.rows = 0;
- object.cols = 0;
- object.type = 0;
- if (options.bytes === String)
- object.data = "";
- else {
- object.data = [];
- if (options.bytes !== Array)
- object.data = $util.newBuffer(object.data);
- }
- }
- if (message.rows != null && message.hasOwnProperty("rows"))
- object.rows = message.rows;
- if (message.cols != null && message.hasOwnProperty("cols"))
- object.cols = message.cols;
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = message.type;
- if (message.data != null && message.hasOwnProperty("data"))
- object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
- return object;
- };
+ /**
+ * Creates a GcsDocument message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.GcsDocument} GcsDocument
+ */
+ GcsDocument.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.GcsDocument)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.GcsDocument();
+ if (object.gcsUri != null)
+ message.gcsUri = String(object.gcsUri);
+ if (object.mimeType != null)
+ message.mimeType = String(object.mimeType);
+ return message;
+ };
- /**
- * Converts this Matrix to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @instance
- * @returns {Object.} JSON object
- */
- Matrix.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Creates a plain object from a GcsDocument message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {google.cloud.documentai.v1beta3.GcsDocument} message GcsDocument
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GcsDocument.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.gcsUri = "";
+ object.mimeType = "";
+ }
+ if (message.gcsUri != null && message.hasOwnProperty("gcsUri"))
+ object.gcsUri = message.gcsUri;
+ if (message.mimeType != null && message.hasOwnProperty("mimeType"))
+ object.mimeType = message.mimeType;
+ return object;
+ };
- /**
- * Gets the default type url for Matrix
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Matrix
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Matrix.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Matrix";
- };
+ /**
+ * Converts this GcsDocument to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GcsDocument.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- return Matrix;
- })();
+ /**
+ * Gets the default type url for GcsDocument
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.GcsDocument
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GcsDocument.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.GcsDocument";
+ };
- Page.Layout = (function() {
+ return GcsDocument;
+ })();
- /**
- * Properties of a Layout.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface ILayout
- * @property {google.cloud.documentai.v1beta3.Document.ITextAnchor|null} [textAnchor] Layout textAnchor
- * @property {number|null} [confidence] Layout confidence
- * @property {google.cloud.documentai.v1beta3.IBoundingPoly|null} [boundingPoly] Layout boundingPoly
- * @property {google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation|null} [orientation] Layout orientation
- */
+ v1beta3.GcsDocuments = (function() {
- /**
- * Constructs a new Layout.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Layout.
- * @implements ILayout
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILayout=} [properties] Properties to set
- */
- function Layout(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Properties of a GcsDocuments.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IGcsDocuments
+ * @property {Array.|null} [documents] GcsDocuments documents
+ */
- /**
- * Layout textAnchor.
- * @member {google.cloud.documentai.v1beta3.Document.ITextAnchor|null|undefined} textAnchor
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @instance
- */
- Layout.prototype.textAnchor = null;
+ /**
+ * Constructs a new GcsDocuments.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a GcsDocuments.
+ * @implements IGcsDocuments
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IGcsDocuments=} [properties] Properties to set
+ */
+ function GcsDocuments(properties) {
+ this.documents = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Layout confidence.
- * @member {number} confidence
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @instance
- */
- Layout.prototype.confidence = 0;
+ /**
+ * GcsDocuments documents.
+ * @member {Array.} documents
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @instance
+ */
+ GcsDocuments.prototype.documents = $util.emptyArray;
- /**
- * Layout boundingPoly.
- * @member {google.cloud.documentai.v1beta3.IBoundingPoly|null|undefined} boundingPoly
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @instance
- */
- Layout.prototype.boundingPoly = null;
+ /**
+ * Creates a new GcsDocuments instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsDocuments=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.GcsDocuments} GcsDocuments instance
+ */
+ GcsDocuments.create = function create(properties) {
+ return new GcsDocuments(properties);
+ };
- /**
- * Layout orientation.
- * @member {google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation} orientation
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @instance
- */
- Layout.prototype.orientation = 0;
-
- /**
- * Creates a new Layout instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILayout=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Layout} Layout instance
- */
- Layout.create = function create(properties) {
- return new Layout(properties);
- };
-
- /**
- * Encodes the specified Layout message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Layout.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILayout} message Layout message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Layout.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.textAnchor != null && Object.hasOwnProperty.call(message, "textAnchor"))
- $root.google.cloud.documentai.v1beta3.Document.TextAnchor.encode(message.textAnchor, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
- writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
- if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
- $root.google.cloud.documentai.v1beta3.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.orientation != null && Object.hasOwnProperty.call(message, "orientation"))
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.orientation);
- return writer;
- };
+ /**
+ * Encodes the specified GcsDocuments message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocuments.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsDocuments} message GcsDocuments message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsDocuments.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.documents != null && message.documents.length)
+ for (var i = 0; i < message.documents.length; ++i)
+ $root.google.cloud.documentai.v1beta3.GcsDocument.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
- /**
- * Encodes the specified Layout message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Layout.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILayout} message Layout message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Layout.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Encodes the specified GcsDocuments message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsDocuments.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsDocuments} message GcsDocuments message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsDocuments.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Decodes a Layout message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Layout} Layout
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Layout.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Layout();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.textAnchor = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.confidence = reader.float();
- break;
- }
- case 3: {
- message.boundingPoly = $root.google.cloud.documentai.v1beta3.BoundingPoly.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.orientation = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
+ /**
+ * Decodes a GcsDocuments message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.GcsDocuments} GcsDocuments
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsDocuments.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.GcsDocuments();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.documents && message.documents.length))
+ message.documents = [];
+ message.documents.push($root.google.cloud.documentai.v1beta3.GcsDocument.decode(reader, reader.uint32()));
+ break;
}
- return message;
- };
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Decodes a Layout message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Layout} Layout
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Layout.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Decodes a GcsDocuments message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.GcsDocuments} GcsDocuments
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsDocuments.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Verifies a Layout message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Layout.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.textAnchor != null && message.hasOwnProperty("textAnchor")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.verify(message.textAnchor);
- if (error)
- return "textAnchor." + error;
- }
- if (message.confidence != null && message.hasOwnProperty("confidence"))
- if (typeof message.confidence !== "number")
- return "confidence: number expected";
- if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
- var error = $root.google.cloud.documentai.v1beta3.BoundingPoly.verify(message.boundingPoly);
- if (error)
- return "boundingPoly." + error;
- }
- if (message.orientation != null && message.hasOwnProperty("orientation"))
- switch (message.orientation) {
- default:
- return "orientation: enum value expected";
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- break;
- }
- return null;
- };
+ /**
+ * Verifies a GcsDocuments message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GcsDocuments.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.documents != null && message.hasOwnProperty("documents")) {
+ if (!Array.isArray(message.documents))
+ return "documents: array expected";
+ for (var i = 0; i < message.documents.length; ++i) {
+ var error = $root.google.cloud.documentai.v1beta3.GcsDocument.verify(message.documents[i]);
+ if (error)
+ return "documents." + error;
+ }
+ }
+ return null;
+ };
- /**
- * Creates a Layout message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Layout} Layout
- */
- Layout.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Layout)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Layout();
- if (object.textAnchor != null) {
- if (typeof object.textAnchor !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Layout.textAnchor: object expected");
- message.textAnchor = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.fromObject(object.textAnchor);
- }
- if (object.confidence != null)
- message.confidence = Number(object.confidence);
- if (object.boundingPoly != null) {
- if (typeof object.boundingPoly !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Layout.boundingPoly: object expected");
- message.boundingPoly = $root.google.cloud.documentai.v1beta3.BoundingPoly.fromObject(object.boundingPoly);
- }
- switch (object.orientation) {
- default:
- if (typeof object.orientation === "number") {
- message.orientation = object.orientation;
- break;
- }
- break;
- case "ORIENTATION_UNSPECIFIED":
- case 0:
- message.orientation = 0;
- break;
- case "PAGE_UP":
- case 1:
- message.orientation = 1;
- break;
- case "PAGE_RIGHT":
- case 2:
- message.orientation = 2;
- break;
- case "PAGE_DOWN":
- case 3:
- message.orientation = 3;
- break;
- case "PAGE_LEFT":
- case 4:
- message.orientation = 4;
- break;
- }
- return message;
- };
+ /**
+ * Creates a GcsDocuments message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.GcsDocuments} GcsDocuments
+ */
+ GcsDocuments.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.GcsDocuments)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.GcsDocuments();
+ if (object.documents) {
+ if (!Array.isArray(object.documents))
+ throw TypeError(".google.cloud.documentai.v1beta3.GcsDocuments.documents: array expected");
+ message.documents = [];
+ for (var i = 0; i < object.documents.length; ++i) {
+ if (typeof object.documents[i] !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.GcsDocuments.documents: object expected");
+ message.documents[i] = $root.google.cloud.documentai.v1beta3.GcsDocument.fromObject(object.documents[i]);
+ }
+ }
+ return message;
+ };
- /**
- * Creates a plain object from a Layout message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Layout} message Layout
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Layout.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.textAnchor = null;
- object.confidence = 0;
- object.boundingPoly = null;
- object.orientation = options.enums === String ? "ORIENTATION_UNSPECIFIED" : 0;
- }
- if (message.textAnchor != null && message.hasOwnProperty("textAnchor"))
- object.textAnchor = $root.google.cloud.documentai.v1beta3.Document.TextAnchor.toObject(message.textAnchor, options);
- if (message.confidence != null && message.hasOwnProperty("confidence"))
- object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
- if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
- object.boundingPoly = $root.google.cloud.documentai.v1beta3.BoundingPoly.toObject(message.boundingPoly, options);
- if (message.orientation != null && message.hasOwnProperty("orientation"))
- object.orientation = options.enums === String ? $root.google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation[message.orientation] === undefined ? message.orientation : $root.google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation[message.orientation] : message.orientation;
- return object;
- };
+ /**
+ * Creates a plain object from a GcsDocuments message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {google.cloud.documentai.v1beta3.GcsDocuments} message GcsDocuments
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GcsDocuments.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.documents = [];
+ if (message.documents && message.documents.length) {
+ object.documents = [];
+ for (var j = 0; j < message.documents.length; ++j)
+ object.documents[j] = $root.google.cloud.documentai.v1beta3.GcsDocument.toObject(message.documents[j], options);
+ }
+ return object;
+ };
- /**
- * Converts this Layout to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @instance
- * @returns {Object.} JSON object
- */
- Layout.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Converts this GcsDocuments to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GcsDocuments.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Gets the default type url for Layout
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Layout
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Layout.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Layout";
- };
+ /**
+ * Gets the default type url for GcsDocuments
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.GcsDocuments
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GcsDocuments.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.GcsDocuments";
+ };
- /**
- * Orientation enum.
- * @name google.cloud.documentai.v1beta3.Document.Page.Layout.Orientation
- * @enum {number}
- * @property {number} ORIENTATION_UNSPECIFIED=0 ORIENTATION_UNSPECIFIED value
- * @property {number} PAGE_UP=1 PAGE_UP value
- * @property {number} PAGE_RIGHT=2 PAGE_RIGHT value
- * @property {number} PAGE_DOWN=3 PAGE_DOWN value
- * @property {number} PAGE_LEFT=4 PAGE_LEFT value
- */
- Layout.Orientation = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "ORIENTATION_UNSPECIFIED"] = 0;
- values[valuesById[1] = "PAGE_UP"] = 1;
- values[valuesById[2] = "PAGE_RIGHT"] = 2;
- values[valuesById[3] = "PAGE_DOWN"] = 3;
- values[valuesById[4] = "PAGE_LEFT"] = 4;
- return values;
- })();
+ return GcsDocuments;
+ })();
- return Layout;
- })();
+ v1beta3.GcsPrefix = (function() {
- Page.Block = (function() {
+ /**
+ * Properties of a GcsPrefix.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IGcsPrefix
+ * @property {string|null} [gcsUriPrefix] GcsPrefix gcsUriPrefix
+ */
- /**
- * Properties of a Block.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IBlock
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Block layout
- * @property {Array.|null} [detectedLanguages] Block detectedLanguages
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] Block provenance
- */
+ /**
+ * Constructs a new GcsPrefix.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a GcsPrefix.
+ * @implements IGcsPrefix
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IGcsPrefix=} [properties] Properties to set
+ */
+ function GcsPrefix(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Constructs a new Block.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Block.
- * @implements IBlock
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IBlock=} [properties] Properties to set
- */
- function Block(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * GcsPrefix gcsUriPrefix.
+ * @member {string} gcsUriPrefix
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @instance
+ */
+ GcsPrefix.prototype.gcsUriPrefix = "";
- /**
- * Block layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @instance
- */
- Block.prototype.layout = null;
+ /**
+ * Creates a new GcsPrefix instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsPrefix=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.GcsPrefix} GcsPrefix instance
+ */
+ GcsPrefix.create = function create(properties) {
+ return new GcsPrefix(properties);
+ };
- /**
- * Block detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @instance
- */
- Block.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Encodes the specified GcsPrefix message. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsPrefix.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsPrefix} message GcsPrefix message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsPrefix.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.gcsUriPrefix != null && Object.hasOwnProperty.call(message, "gcsUriPrefix"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUriPrefix);
+ return writer;
+ };
- /**
- * Block provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @instance
- */
- Block.prototype.provenance = null;
+ /**
+ * Encodes the specified GcsPrefix message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.GcsPrefix.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IGcsPrefix} message GcsPrefix message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsPrefix.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Creates a new Block instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IBlock=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Block} Block instance
- */
- Block.create = function create(properties) {
- return new Block(properties);
- };
+ /**
+ * Decodes a GcsPrefix message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.GcsPrefix} GcsPrefix
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsPrefix.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.GcsPrefix();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.gcsUriPrefix = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Encodes the specified Block message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Block.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IBlock} message Block message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Block.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- return writer;
- };
+ /**
+ * Decodes a GcsPrefix message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.GcsPrefix} GcsPrefix
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsPrefix.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Block.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IBlock} message Block message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Block.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Verifies a GcsPrefix message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GcsPrefix.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.gcsUriPrefix != null && message.hasOwnProperty("gcsUriPrefix"))
+ if (!$util.isString(message.gcsUriPrefix))
+ return "gcsUriPrefix: string expected";
+ return null;
+ };
- /**
- * Decodes a Block message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Block} Block
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Block.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Block();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 3: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * Creates a GcsPrefix message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.GcsPrefix} GcsPrefix
+ */
+ GcsPrefix.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.GcsPrefix)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.GcsPrefix();
+ if (object.gcsUriPrefix != null)
+ message.gcsUriPrefix = String(object.gcsUriPrefix);
+ return message;
+ };
- /**
- * Decodes a Block message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Block} Block
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Block.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Creates a plain object from a GcsPrefix message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {google.cloud.documentai.v1beta3.GcsPrefix} message GcsPrefix
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GcsPrefix.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.gcsUriPrefix = "";
+ if (message.gcsUriPrefix != null && message.hasOwnProperty("gcsUriPrefix"))
+ object.gcsUriPrefix = message.gcsUriPrefix;
+ return object;
+ };
- /**
- * Verifies a Block message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Block.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
- }
- return null;
- };
+ /**
+ * Converts this GcsPrefix to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GcsPrefix.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Creates a Block message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Block} Block
- */
- Block.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Block)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Block();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Block.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Block.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Block.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Block.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
- }
- return message;
- };
+ /**
+ * Gets the default type url for GcsPrefix
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.GcsPrefix
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GcsPrefix.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.GcsPrefix";
+ };
- /**
- * Creates a plain object from a Block message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Block} message Block
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Block.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
- if (options.defaults) {
- object.layout = null;
- object.provenance = null;
- }
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
- }
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
- return object;
- };
+ return GcsPrefix;
+ })();
- /**
- * Converts this Block to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @instance
- * @returns {Object.} JSON object
- */
- Block.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ v1beta3.BatchDocumentsInputConfig = (function() {
- /**
- * Gets the default type url for Block
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Block
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Block";
- };
+ /**
+ * Properties of a BatchDocumentsInputConfig.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IBatchDocumentsInputConfig
+ * @property {google.cloud.documentai.v1beta3.IGcsPrefix|null} [gcsPrefix] BatchDocumentsInputConfig gcsPrefix
+ * @property {google.cloud.documentai.v1beta3.IGcsDocuments|null} [gcsDocuments] BatchDocumentsInputConfig gcsDocuments
+ */
- return Block;
- })();
+ /**
+ * Constructs a new BatchDocumentsInputConfig.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a BatchDocumentsInputConfig.
+ * @implements IBatchDocumentsInputConfig
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig=} [properties] Properties to set
+ */
+ function BatchDocumentsInputConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- Page.Paragraph = (function() {
+ /**
+ * BatchDocumentsInputConfig gcsPrefix.
+ * @member {google.cloud.documentai.v1beta3.IGcsPrefix|null|undefined} gcsPrefix
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @instance
+ */
+ BatchDocumentsInputConfig.prototype.gcsPrefix = null;
- /**
- * Properties of a Paragraph.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IParagraph
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Paragraph layout
- * @property {Array.|null} [detectedLanguages] Paragraph detectedLanguages
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] Paragraph provenance
- */
+ /**
+ * BatchDocumentsInputConfig gcsDocuments.
+ * @member {google.cloud.documentai.v1beta3.IGcsDocuments|null|undefined} gcsDocuments
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @instance
+ */
+ BatchDocumentsInputConfig.prototype.gcsDocuments = null;
- /**
- * Constructs a new Paragraph.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Paragraph.
- * @implements IParagraph
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IParagraph=} [properties] Properties to set
- */
- function Paragraph(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
- /**
- * Paragraph layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @instance
- */
- Paragraph.prototype.layout = null;
+ /**
+ * BatchDocumentsInputConfig source.
+ * @member {"gcsPrefix"|"gcsDocuments"|undefined} source
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @instance
+ */
+ Object.defineProperty(BatchDocumentsInputConfig.prototype, "source", {
+ get: $util.oneOfGetter($oneOfFields = ["gcsPrefix", "gcsDocuments"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
- /**
- * Paragraph detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @instance
- */
- Paragraph.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Creates a new BatchDocumentsInputConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.BatchDocumentsInputConfig} BatchDocumentsInputConfig instance
+ */
+ BatchDocumentsInputConfig.create = function create(properties) {
+ return new BatchDocumentsInputConfig(properties);
+ };
- /**
- * Paragraph provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @instance
- */
- Paragraph.prototype.provenance = null;
+ /**
+ * Encodes the specified BatchDocumentsInputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig} message BatchDocumentsInputConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ BatchDocumentsInputConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix"))
+ $root.google.cloud.documentai.v1beta3.GcsPrefix.encode(message.gcsPrefix, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.gcsDocuments != null && Object.hasOwnProperty.call(message, "gcsDocuments"))
+ $root.google.cloud.documentai.v1beta3.GcsDocuments.encode(message.gcsDocuments, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
- /**
- * Creates a new Paragraph instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IParagraph=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Paragraph} Paragraph instance
- */
- Paragraph.create = function create(properties) {
- return new Paragraph(properties);
- };
-
- /**
- * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IParagraph} message Paragraph message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Paragraph.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Paragraph.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IParagraph} message Paragraph message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Paragraph.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Paragraph message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Paragraph} Paragraph
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Paragraph.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 3: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Paragraph message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Paragraph} Paragraph
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Paragraph.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Paragraph message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Paragraph.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
- }
- return null;
- };
+ /**
+ * Encodes the specified BatchDocumentsInputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig} message BatchDocumentsInputConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ BatchDocumentsInputConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Paragraph} Paragraph
- */
- Paragraph.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Paragraph();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Paragraph.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Paragraph.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Paragraph.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
+ /**
+ * Decodes a BatchDocumentsInputConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.BatchDocumentsInputConfig} BatchDocumentsInputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ BatchDocumentsInputConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.gcsPrefix = $root.google.cloud.documentai.v1beta3.GcsPrefix.decode(reader, reader.uint32());
+ break;
}
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Paragraph.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
+ case 2: {
+ message.gcsDocuments = $root.google.cloud.documentai.v1beta3.GcsDocuments.decode(reader, reader.uint32());
+ break;
}
- return message;
- };
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Paragraph} message Paragraph
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Paragraph.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
- if (options.defaults) {
- object.layout = null;
- object.provenance = null;
- }
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
- }
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
- return object;
- };
+ /**
+ * Decodes a BatchDocumentsInputConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.BatchDocumentsInputConfig} BatchDocumentsInputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ BatchDocumentsInputConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Converts this Paragraph to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @instance
- * @returns {Object.} JSON object
- */
- Paragraph.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Verifies a BatchDocumentsInputConfig message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ BatchDocumentsInputConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) {
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.GcsPrefix.verify(message.gcsPrefix);
+ if (error)
+ return "gcsPrefix." + error;
+ }
+ }
+ if (message.gcsDocuments != null && message.hasOwnProperty("gcsDocuments")) {
+ if (properties.source === 1)
+ return "source: multiple values";
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.GcsDocuments.verify(message.gcsDocuments);
+ if (error)
+ return "gcsDocuments." + error;
+ }
+ }
+ return null;
+ };
- /**
- * Gets the default type url for Paragraph
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Paragraph
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Paragraph.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Paragraph";
- };
+ /**
+ * Creates a BatchDocumentsInputConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.BatchDocumentsInputConfig} BatchDocumentsInputConfig
+ */
+ BatchDocumentsInputConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig();
+ if (object.gcsPrefix != null) {
+ if (typeof object.gcsPrefix !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.gcsPrefix: object expected");
+ message.gcsPrefix = $root.google.cloud.documentai.v1beta3.GcsPrefix.fromObject(object.gcsPrefix);
+ }
+ if (object.gcsDocuments != null) {
+ if (typeof object.gcsDocuments !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.gcsDocuments: object expected");
+ message.gcsDocuments = $root.google.cloud.documentai.v1beta3.GcsDocuments.fromObject(object.gcsDocuments);
+ }
+ return message;
+ };
- return Paragraph;
- })();
+ /**
+ * Creates a plain object from a BatchDocumentsInputConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.BatchDocumentsInputConfig} message BatchDocumentsInputConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ BatchDocumentsInputConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) {
+ object.gcsPrefix = $root.google.cloud.documentai.v1beta3.GcsPrefix.toObject(message.gcsPrefix, options);
+ if (options.oneofs)
+ object.source = "gcsPrefix";
+ }
+ if (message.gcsDocuments != null && message.hasOwnProperty("gcsDocuments")) {
+ object.gcsDocuments = $root.google.cloud.documentai.v1beta3.GcsDocuments.toObject(message.gcsDocuments, options);
+ if (options.oneofs)
+ object.source = "gcsDocuments";
+ }
+ return object;
+ };
- Page.Line = (function() {
+ /**
+ * Converts this BatchDocumentsInputConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ BatchDocumentsInputConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Properties of a Line.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface ILine
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Line layout
- * @property {Array.|null} [detectedLanguages] Line detectedLanguages
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] Line provenance
- */
+ /**
+ * Gets the default type url for BatchDocumentsInputConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.BatchDocumentsInputConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ BatchDocumentsInputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.BatchDocumentsInputConfig";
+ };
- /**
- * Constructs a new Line.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Line.
- * @implements ILine
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILine=} [properties] Properties to set
- */
- function Line(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ return BatchDocumentsInputConfig;
+ })();
- /**
- * Line layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @instance
- */
- Line.prototype.layout = null;
+ v1beta3.DocumentOutputConfig = (function() {
- /**
- * Line detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @instance
- */
- Line.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Properties of a DocumentOutputConfig.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IDocumentOutputConfig
+ * @property {google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig|null} [gcsOutputConfig] DocumentOutputConfig gcsOutputConfig
+ */
- /**
- * Line provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @instance
- */
- Line.prototype.provenance = null;
+ /**
+ * Constructs a new DocumentOutputConfig.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a DocumentOutputConfig.
+ * @implements IDocumentOutputConfig
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IDocumentOutputConfig=} [properties] Properties to set
+ */
+ function DocumentOutputConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Creates a new Line instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILine=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Line} Line instance
- */
- Line.create = function create(properties) {
- return new Line(properties);
- };
+ /**
+ * DocumentOutputConfig gcsOutputConfig.
+ * @member {google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig|null|undefined} gcsOutputConfig
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @instance
+ */
+ DocumentOutputConfig.prototype.gcsOutputConfig = null;
- /**
- * Encodes the specified Line message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Line.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILine} message Line message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Line.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- return writer;
- };
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
- /**
- * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Line.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ILine} message Line message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Line.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * DocumentOutputConfig destination.
+ * @member {"gcsOutputConfig"|undefined} destination
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @instance
+ */
+ Object.defineProperty(DocumentOutputConfig.prototype, "destination", {
+ get: $util.oneOfGetter($oneOfFields = ["gcsOutputConfig"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
- /**
- * Decodes a Line message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Line} Line
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Line.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Line();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 3: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Line message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Line} Line
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Line.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Creates a new DocumentOutputConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDocumentOutputConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig} DocumentOutputConfig instance
+ */
+ DocumentOutputConfig.create = function create(properties) {
+ return new DocumentOutputConfig(properties);
+ };
- /**
- * Verifies a Line message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Line.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
- }
- return null;
- };
+ /**
+ * Encodes the specified DocumentOutputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDocumentOutputConfig} message DocumentOutputConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DocumentOutputConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig"))
+ $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.encode(message.gcsOutputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
- /**
- * Creates a Line message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Line} Line
- */
- Line.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Line)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Line();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Line.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Line.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Line.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Line.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
- }
- return message;
- };
+ /**
+ * Encodes the specified DocumentOutputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDocumentOutputConfig} message DocumentOutputConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DocumentOutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Creates a plain object from a Line message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Line} message Line
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Line.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
- if (options.defaults) {
- object.layout = null;
- object.provenance = null;
- }
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
+ /**
+ * Decodes a DocumentOutputConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig} DocumentOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DocumentOutputConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentOutputConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.gcsOutputConfig = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.decode(reader, reader.uint32());
+ break;
}
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
- return object;
- };
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Converts this Line to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @instance
- * @returns {Object.} JSON object
- */
- Line.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Decodes a DocumentOutputConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig} DocumentOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DocumentOutputConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Gets the default type url for Line
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Line
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Line.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Line";
- };
+ /**
+ * Verifies a DocumentOutputConfig message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DocumentOutputConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.gcsOutputConfig != null && message.hasOwnProperty("gcsOutputConfig")) {
+ properties.destination = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify(message.gcsOutputConfig);
+ if (error)
+ return "gcsOutputConfig." + error;
+ }
+ }
+ return null;
+ };
- return Line;
- })();
+ /**
+ * Creates a DocumentOutputConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig} DocumentOutputConfig
+ */
+ DocumentOutputConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentOutputConfig)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentOutputConfig();
+ if (object.gcsOutputConfig != null) {
+ if (typeof object.gcsOutputConfig !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentOutputConfig.gcsOutputConfig: object expected");
+ message.gcsOutputConfig = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.fromObject(object.gcsOutputConfig);
+ }
+ return message;
+ };
- Page.Token = (function() {
+ /**
+ * Creates a plain object from a DocumentOutputConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig} message DocumentOutputConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DocumentOutputConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (message.gcsOutputConfig != null && message.hasOwnProperty("gcsOutputConfig")) {
+ object.gcsOutputConfig = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.toObject(message.gcsOutputConfig, options);
+ if (options.oneofs)
+ object.destination = "gcsOutputConfig";
+ }
+ return object;
+ };
- /**
- * Properties of a Token.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IToken
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Token layout
- * @property {google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak|null} [detectedBreak] Token detectedBreak
- * @property {Array.|null} [detectedLanguages] Token detectedLanguages
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] Token provenance
- */
+ /**
+ * Converts this DocumentOutputConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DocumentOutputConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Constructs a new Token.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Token.
- * @implements IToken
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IToken=} [properties] Properties to set
- */
- function Token(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Gets the default type url for DocumentOutputConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DocumentOutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentOutputConfig";
+ };
- /**
- * Token layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @instance
- */
- Token.prototype.layout = null;
+ DocumentOutputConfig.GcsOutputConfig = (function() {
- /**
- * Token detectedBreak.
- * @member {google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak|null|undefined} detectedBreak
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @instance
- */
- Token.prototype.detectedBreak = null;
+ /**
+ * Properties of a GcsOutputConfig.
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @interface IGcsOutputConfig
+ * @property {string|null} [gcsUri] GcsOutputConfig gcsUri
+ * @property {google.protobuf.IFieldMask|null} [fieldMask] GcsOutputConfig fieldMask
+ * @property {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig|null} [shardingConfig] GcsOutputConfig shardingConfig
+ */
- /**
- * Token detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @instance
- */
- Token.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Constructs a new GcsOutputConfig.
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig
+ * @classdesc Represents a GcsOutputConfig.
+ * @implements IGcsOutputConfig
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig=} [properties] Properties to set
+ */
+ function GcsOutputConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Token provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @instance
- */
- Token.prototype.provenance = null;
+ /**
+ * GcsOutputConfig gcsUri.
+ * @member {string} gcsUri
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @instance
+ */
+ GcsOutputConfig.prototype.gcsUri = "";
- /**
- * Creates a new Token instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IToken=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token} Token instance
- */
- Token.create = function create(properties) {
- return new Token(properties);
- };
+ /**
+ * GcsOutputConfig fieldMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} fieldMask
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @instance
+ */
+ GcsOutputConfig.prototype.fieldMask = null;
- /**
- * Encodes the specified Token message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IToken} message Token message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Token.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.detectedBreak != null && Object.hasOwnProperty.call(message, "detectedBreak"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.encode(message.detectedBreak, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- return writer;
- };
+ /**
+ * GcsOutputConfig shardingConfig.
+ * @member {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig|null|undefined} shardingConfig
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @instance
+ */
+ GcsOutputConfig.prototype.shardingConfig = null;
- /**
- * Encodes the specified Token message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IToken} message Token message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Token.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Creates a new GcsOutputConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig} GcsOutputConfig instance
+ */
+ GcsOutputConfig.create = function create(properties) {
+ return new GcsOutputConfig(properties);
+ };
- /**
- * Decodes a Token message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token} Token
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Token.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Token();
- while (reader.pos < end) {
- var tag = reader.uint32();
+ /**
+ * Encodes the specified GcsOutputConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig} message GcsOutputConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsOutputConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri);
+ if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask"))
+ $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.shardingConfig != null && Object.hasOwnProperty.call(message, "shardingConfig"))
+ $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.encode(message.shardingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GcsOutputConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.IGcsOutputConfig} message GcsOutputConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsOutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GcsOutputConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig} GcsOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsOutputConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.gcsUri = reader.string();
+ break;
+ }
+ case 2: {
+ message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.shardingConfig = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a GcsOutputConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig} GcsOutputConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsOutputConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GcsOutputConfig message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GcsOutputConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.gcsUri != null && message.hasOwnProperty("gcsUri"))
+ if (!$util.isString(message.gcsUri))
+ return "gcsUri: string expected";
+ if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.fieldMask);
+ if (error)
+ return "fieldMask." + error;
+ }
+ if (message.shardingConfig != null && message.hasOwnProperty("shardingConfig")) {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify(message.shardingConfig);
+ if (error)
+ return "shardingConfig." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a GcsOutputConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig} GcsOutputConfig
+ */
+ GcsOutputConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig();
+ if (object.gcsUri != null)
+ message.gcsUri = String(object.gcsUri);
+ if (object.fieldMask != null) {
+ if (typeof object.fieldMask !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.fieldMask: object expected");
+ message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask);
+ }
+ if (object.shardingConfig != null) {
+ if (typeof object.shardingConfig !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.shardingConfig: object expected");
+ message.shardingConfig = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.fromObject(object.shardingConfig);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GcsOutputConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig} message GcsOutputConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GcsOutputConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.gcsUri = "";
+ object.fieldMask = null;
+ object.shardingConfig = null;
+ }
+ if (message.gcsUri != null && message.hasOwnProperty("gcsUri"))
+ object.gcsUri = message.gcsUri;
+ if (message.fieldMask != null && message.hasOwnProperty("fieldMask"))
+ object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options);
+ if (message.shardingConfig != null && message.hasOwnProperty("shardingConfig"))
+ object.shardingConfig = $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.toObject(message.shardingConfig, options);
+ return object;
+ };
+
+ /**
+ * Converts this GcsOutputConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GcsOutputConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GcsOutputConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GcsOutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig";
+ };
+
+ GcsOutputConfig.ShardingConfig = (function() {
+
+ /**
+ * Properties of a ShardingConfig.
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @interface IShardingConfig
+ * @property {number|null} [pagesPerShard] ShardingConfig pagesPerShard
+ * @property {number|null} [pagesOverlap] ShardingConfig pagesOverlap
+ */
+
+ /**
+ * Constructs a new ShardingConfig.
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig
+ * @classdesc Represents a ShardingConfig.
+ * @implements IShardingConfig
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig=} [properties] Properties to set
+ */
+ function ShardingConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ShardingConfig pagesPerShard.
+ * @member {number} pagesPerShard
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
+ * @instance
+ */
+ ShardingConfig.prototype.pagesPerShard = 0;
+
+ /**
+ * ShardingConfig pagesOverlap.
+ * @member {number} pagesOverlap
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
+ * @instance
+ */
+ ShardingConfig.prototype.pagesOverlap = 0;
+
+ /**
+ * Creates a new ShardingConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig} ShardingConfig instance
+ */
+ ShardingConfig.create = function create(properties) {
+ return new ShardingConfig(properties);
+ };
+
+ /**
+ * Encodes the specified ShardingConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig} message ShardingConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ShardingConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pagesPerShard != null && Object.hasOwnProperty.call(message, "pagesPerShard"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pagesPerShard);
+ if (message.pagesOverlap != null && Object.hasOwnProperty.call(message, "pagesOverlap"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pagesOverlap);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ShardingConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.IShardingConfig} message ShardingConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ShardingConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ShardingConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig} ShardingConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ShardingConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
+ message.pagesPerShard = reader.int32();
break;
}
case 2: {
- message.detectedBreak = $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 4: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
+ message.pagesOverlap = reader.int32();
break;
}
default:
@@ -61658,1864 +60933,1786 @@
};
/**
- * Decodes a Token message from the specified reader or buffer, length delimited.
+ * Decodes a ShardingConfig message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token} Token
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig} ShardingConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Token.decodeDelimited = function decodeDelimited(reader) {
+ ShardingConfig.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a Token message.
+ * Verifies a ShardingConfig message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Token.verify = function verify(message) {
+ ShardingConfig.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify(message.detectedBreak);
- if (error)
- return "detectedBreak." + error;
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
- }
+ if (message.pagesPerShard != null && message.hasOwnProperty("pagesPerShard"))
+ if (!$util.isInteger(message.pagesPerShard))
+ return "pagesPerShard: integer expected";
+ if (message.pagesOverlap != null && message.hasOwnProperty("pagesOverlap"))
+ if (!$util.isInteger(message.pagesOverlap))
+ return "pagesOverlap: integer expected";
return null;
};
/**
- * Creates a Token message from a plain object. Also converts values to their respective internal types.
+ * Creates a ShardingConfig message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token} Token
+ * @returns {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig} ShardingConfig
*/
- Token.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Token)
+ ShardingConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Token();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Token.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.detectedBreak != null) {
- if (typeof object.detectedBreak !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Token.detectedBreak: object expected");
- message.detectedBreak = $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.fromObject(object.detectedBreak);
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Token.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Token.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Token.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
- }
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig();
+ if (object.pagesPerShard != null)
+ message.pagesPerShard = object.pagesPerShard | 0;
+ if (object.pagesOverlap != null)
+ message.pagesOverlap = object.pagesOverlap | 0;
return message;
};
/**
- * Creates a plain object from a Token message. Also converts values to other types if specified.
+ * Creates a plain object from a ShardingConfig message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Token} message Token
+ * @param {google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig} message ShardingConfig
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Token.toObject = function toObject(message, options) {
+ ShardingConfig.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
if (options.defaults) {
- object.layout = null;
- object.detectedBreak = null;
- object.provenance = null;
- }
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak"))
- object.detectedBreak = $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.toObject(message.detectedBreak, options);
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
+ object.pagesPerShard = 0;
+ object.pagesOverlap = 0;
}
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
+ if (message.pagesPerShard != null && message.hasOwnProperty("pagesPerShard"))
+ object.pagesPerShard = message.pagesPerShard;
+ if (message.pagesOverlap != null && message.hasOwnProperty("pagesOverlap"))
+ object.pagesOverlap = message.pagesOverlap;
return object;
};
/**
- * Converts this Token to JSON.
+ * Converts this ShardingConfig to JSON.
* @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
* @instance
* @returns {Object.} JSON object
*/
- Token.prototype.toJSON = function toJSON() {
+ ShardingConfig.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for Token
+ * Gets the default type url for ShardingConfig
* @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
+ * @memberof google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- Token.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ ShardingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Token";
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig";
};
- Token.DetectedBreak = (function() {
+ return ShardingConfig;
+ })();
- /**
- * Properties of a DetectedBreak.
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @interface IDetectedBreak
- * @property {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type|null} [type] DetectedBreak type
- */
+ return GcsOutputConfig;
+ })();
- /**
- * Constructs a new DetectedBreak.
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token
- * @classdesc Represents a DetectedBreak.
- * @implements IDetectedBreak
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak=} [properties] Properties to set
- */
- function DetectedBreak(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ return DocumentOutputConfig;
+ })();
- /**
- * DetectedBreak type.
- * @member {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type} type
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @instance
- */
- DetectedBreak.prototype.type = 0;
+ v1beta3.OcrConfig = (function() {
- /**
- * Creates a new DetectedBreak instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak} DetectedBreak instance
- */
- DetectedBreak.create = function create(properties) {
- return new DetectedBreak(properties);
- };
+ /**
+ * Properties of an OcrConfig.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IOcrConfig
+ * @property {google.cloud.documentai.v1beta3.OcrConfig.IHints|null} [hints] OcrConfig hints
+ * @property {boolean|null} [enableNativePdfParsing] OcrConfig enableNativePdfParsing
+ * @property {boolean|null} [enableImageQualityScores] OcrConfig enableImageQualityScores
+ * @property {Array.|null} [advancedOcrOptions] OcrConfig advancedOcrOptions
+ * @property {boolean|null} [enableSymbol] OcrConfig enableSymbol
+ * @property {boolean|null} [computeStyleInfo] OcrConfig computeStyleInfo
+ */
- /**
- * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak} message DetectedBreak message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DetectedBreak.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
- return writer;
- };
+ /**
+ * Constructs a new OcrConfig.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents an OcrConfig.
+ * @implements IOcrConfig
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IOcrConfig=} [properties] Properties to set
+ */
+ function OcrConfig(properties) {
+ this.advancedOcrOptions = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Token.IDetectedBreak} message DetectedBreak message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DetectedBreak.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * OcrConfig hints.
+ * @member {google.cloud.documentai.v1beta3.OcrConfig.IHints|null|undefined} hints
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ */
+ OcrConfig.prototype.hints = null;
- /**
- * Decodes a DetectedBreak message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak} DetectedBreak
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DetectedBreak.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.type = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * OcrConfig enableNativePdfParsing.
+ * @member {boolean} enableNativePdfParsing
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ */
+ OcrConfig.prototype.enableNativePdfParsing = false;
- /**
- * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak} DetectedBreak
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DetectedBreak.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * OcrConfig enableImageQualityScores.
+ * @member {boolean} enableImageQualityScores
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ */
+ OcrConfig.prototype.enableImageQualityScores = false;
- /**
- * Verifies a DetectedBreak message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- DetectedBreak.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.type != null && message.hasOwnProperty("type"))
- switch (message.type) {
- default:
- return "type: enum value expected";
- case 0:
- case 1:
- case 2:
- case 3:
- break;
- }
- return null;
- };
+ /**
+ * OcrConfig advancedOcrOptions.
+ * @member {Array.} advancedOcrOptions
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ */
+ OcrConfig.prototype.advancedOcrOptions = $util.emptyArray;
- /**
- * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak} DetectedBreak
- */
- DetectedBreak.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak();
- switch (object.type) {
- default:
- if (typeof object.type === "number") {
- message.type = object.type;
- break;
- }
- break;
- case "TYPE_UNSPECIFIED":
- case 0:
- message.type = 0;
- break;
- case "SPACE":
- case 1:
- message.type = 1;
- break;
- case "WIDE_SPACE":
- case 2:
- message.type = 2;
- break;
- case "HYPHEN":
- case 3:
- message.type = 3;
- break;
- }
- return message;
- };
+ /**
+ * OcrConfig enableSymbol.
+ * @member {boolean} enableSymbol
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ */
+ OcrConfig.prototype.enableSymbol = false;
- /**
- * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak} message DetectedBreak
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- DetectedBreak.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = options.enums === String ? $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type[message.type] === undefined ? message.type : $root.google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type[message.type] : message.type;
- return object;
- };
+ /**
+ * OcrConfig computeStyleInfo.
+ * @member {boolean} computeStyleInfo
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ */
+ OcrConfig.prototype.computeStyleInfo = false;
- /**
- * Converts this DetectedBreak to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @instance
- * @returns {Object.} JSON object
- */
- DetectedBreak.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Creates a new OcrConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IOcrConfig=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig} OcrConfig instance
+ */
+ OcrConfig.create = function create(properties) {
+ return new OcrConfig(properties);
+ };
- /**
- * Gets the default type url for DetectedBreak
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- DetectedBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak";
- };
+ /**
+ * Encodes the specified OcrConfig message. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IOcrConfig} message OcrConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ OcrConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.hints != null && Object.hasOwnProperty.call(message, "hints"))
+ $root.google.cloud.documentai.v1beta3.OcrConfig.Hints.encode(message.hints, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.enableNativePdfParsing != null && Object.hasOwnProperty.call(message, "enableNativePdfParsing"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableNativePdfParsing);
+ if (message.enableImageQualityScores != null && Object.hasOwnProperty.call(message, "enableImageQualityScores"))
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableImageQualityScores);
+ if (message.advancedOcrOptions != null && message.advancedOcrOptions.length)
+ for (var i = 0; i < message.advancedOcrOptions.length; ++i)
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.advancedOcrOptions[i]);
+ if (message.enableSymbol != null && Object.hasOwnProperty.call(message, "enableSymbol"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enableSymbol);
+ if (message.computeStyleInfo != null && Object.hasOwnProperty.call(message, "computeStyleInfo"))
+ writer.uint32(/* id 8, wireType 0 =*/64).bool(message.computeStyleInfo);
+ return writer;
+ };
- /**
- * Type enum.
- * @name google.cloud.documentai.v1beta3.Document.Page.Token.DetectedBreak.Type
- * @enum {number}
- * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
- * @property {number} SPACE=1 SPACE value
- * @property {number} WIDE_SPACE=2 WIDE_SPACE value
- * @property {number} HYPHEN=3 HYPHEN value
- */
- DetectedBreak.Type = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "SPACE"] = 1;
- values[valuesById[2] = "WIDE_SPACE"] = 2;
- values[valuesById[3] = "HYPHEN"] = 3;
- return values;
- })();
+ /**
+ * Encodes the specified OcrConfig message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IOcrConfig} message OcrConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ OcrConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- return DetectedBreak;
- })();
+ /**
+ * Decodes an OcrConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig} OcrConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ OcrConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.OcrConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.hints = $root.google.cloud.documentai.v1beta3.OcrConfig.Hints.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.enableNativePdfParsing = reader.bool();
+ break;
+ }
+ case 4: {
+ message.enableImageQualityScores = reader.bool();
+ break;
+ }
+ case 5: {
+ if (!(message.advancedOcrOptions && message.advancedOcrOptions.length))
+ message.advancedOcrOptions = [];
+ message.advancedOcrOptions.push(reader.string());
+ break;
+ }
+ case 6: {
+ message.enableSymbol = reader.bool();
+ break;
+ }
+ case 8: {
+ message.computeStyleInfo = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- return Token;
- })();
+ /**
+ * Decodes an OcrConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig} OcrConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ OcrConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- Page.Symbol = (function() {
+ /**
+ * Verifies an OcrConfig message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ OcrConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.hints != null && message.hasOwnProperty("hints")) {
+ var error = $root.google.cloud.documentai.v1beta3.OcrConfig.Hints.verify(message.hints);
+ if (error)
+ return "hints." + error;
+ }
+ if (message.enableNativePdfParsing != null && message.hasOwnProperty("enableNativePdfParsing"))
+ if (typeof message.enableNativePdfParsing !== "boolean")
+ return "enableNativePdfParsing: boolean expected";
+ if (message.enableImageQualityScores != null && message.hasOwnProperty("enableImageQualityScores"))
+ if (typeof message.enableImageQualityScores !== "boolean")
+ return "enableImageQualityScores: boolean expected";
+ if (message.advancedOcrOptions != null && message.hasOwnProperty("advancedOcrOptions")) {
+ if (!Array.isArray(message.advancedOcrOptions))
+ return "advancedOcrOptions: array expected";
+ for (var i = 0; i < message.advancedOcrOptions.length; ++i)
+ if (!$util.isString(message.advancedOcrOptions[i]))
+ return "advancedOcrOptions: string[] expected";
+ }
+ if (message.enableSymbol != null && message.hasOwnProperty("enableSymbol"))
+ if (typeof message.enableSymbol !== "boolean")
+ return "enableSymbol: boolean expected";
+ if (message.computeStyleInfo != null && message.hasOwnProperty("computeStyleInfo"))
+ if (typeof message.computeStyleInfo !== "boolean")
+ return "computeStyleInfo: boolean expected";
+ return null;
+ };
- /**
- * Properties of a Symbol.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface ISymbol
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Symbol layout
- * @property {Array.|null} [detectedLanguages] Symbol detectedLanguages
- */
+ /**
+ * Creates an OcrConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig} OcrConfig
+ */
+ OcrConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.OcrConfig)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.OcrConfig();
+ if (object.hints != null) {
+ if (typeof object.hints !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.OcrConfig.hints: object expected");
+ message.hints = $root.google.cloud.documentai.v1beta3.OcrConfig.Hints.fromObject(object.hints);
+ }
+ if (object.enableNativePdfParsing != null)
+ message.enableNativePdfParsing = Boolean(object.enableNativePdfParsing);
+ if (object.enableImageQualityScores != null)
+ message.enableImageQualityScores = Boolean(object.enableImageQualityScores);
+ if (object.advancedOcrOptions) {
+ if (!Array.isArray(object.advancedOcrOptions))
+ throw TypeError(".google.cloud.documentai.v1beta3.OcrConfig.advancedOcrOptions: array expected");
+ message.advancedOcrOptions = [];
+ for (var i = 0; i < object.advancedOcrOptions.length; ++i)
+ message.advancedOcrOptions[i] = String(object.advancedOcrOptions[i]);
+ }
+ if (object.enableSymbol != null)
+ message.enableSymbol = Boolean(object.enableSymbol);
+ if (object.computeStyleInfo != null)
+ message.computeStyleInfo = Boolean(object.computeStyleInfo);
+ return message;
+ };
- /**
- * Constructs a new Symbol.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Symbol.
- * @implements ISymbol
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.ISymbol=} [properties] Properties to set
- */
- function Symbol(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Creates a plain object from an OcrConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {google.cloud.documentai.v1beta3.OcrConfig} message OcrConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ OcrConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.advancedOcrOptions = [];
+ if (options.defaults) {
+ object.hints = null;
+ object.enableNativePdfParsing = false;
+ object.enableImageQualityScores = false;
+ object.enableSymbol = false;
+ object.computeStyleInfo = false;
+ }
+ if (message.hints != null && message.hasOwnProperty("hints"))
+ object.hints = $root.google.cloud.documentai.v1beta3.OcrConfig.Hints.toObject(message.hints, options);
+ if (message.enableNativePdfParsing != null && message.hasOwnProperty("enableNativePdfParsing"))
+ object.enableNativePdfParsing = message.enableNativePdfParsing;
+ if (message.enableImageQualityScores != null && message.hasOwnProperty("enableImageQualityScores"))
+ object.enableImageQualityScores = message.enableImageQualityScores;
+ if (message.advancedOcrOptions && message.advancedOcrOptions.length) {
+ object.advancedOcrOptions = [];
+ for (var j = 0; j < message.advancedOcrOptions.length; ++j)
+ object.advancedOcrOptions[j] = message.advancedOcrOptions[j];
+ }
+ if (message.enableSymbol != null && message.hasOwnProperty("enableSymbol"))
+ object.enableSymbol = message.enableSymbol;
+ if (message.computeStyleInfo != null && message.hasOwnProperty("computeStyleInfo"))
+ object.computeStyleInfo = message.computeStyleInfo;
+ return object;
+ };
- /**
- * Symbol layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @instance
- */
- Symbol.prototype.layout = null;
+ /**
+ * Converts this OcrConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ OcrConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Symbol detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @instance
- */
- Symbol.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Gets the default type url for OcrConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ OcrConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.OcrConfig";
+ };
- /**
- * Creates a new Symbol instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ISymbol=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Symbol} Symbol instance
- */
- Symbol.create = function create(properties) {
- return new Symbol(properties);
- };
+ OcrConfig.Hints = (function() {
- /**
- * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Symbol.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ISymbol} message Symbol message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Symbol.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- return writer;
- };
+ /**
+ * Properties of a Hints.
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @interface IHints
+ * @property {Array.|null} [languageHints] Hints languageHints
+ */
- /**
- * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Symbol.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ISymbol} message Symbol message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Symbol.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Constructs a new Hints.
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig
+ * @classdesc Represents a Hints.
+ * @implements IHints
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.OcrConfig.IHints=} [properties] Properties to set
+ */
+ function Hints(properties) {
+ this.languageHints = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Decodes a Symbol message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Symbol} Symbol
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Symbol.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Symbol();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * Hints languageHints.
+ * @member {Array.} languageHints
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @instance
+ */
+ Hints.prototype.languageHints = $util.emptyArray;
- /**
- * Decodes a Symbol message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Symbol} Symbol
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Symbol.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Creates a new Hints instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {google.cloud.documentai.v1beta3.OcrConfig.IHints=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig.Hints} Hints instance
+ */
+ Hints.create = function create(properties) {
+ return new Hints(properties);
+ };
- /**
- * Verifies a Symbol message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Symbol.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- return null;
- };
+ /**
+ * Encodes the specified Hints message. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.Hints.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {google.cloud.documentai.v1beta3.OcrConfig.IHints} message Hints message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Hints.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.languageHints != null && message.languageHints.length)
+ for (var i = 0; i < message.languageHints.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageHints[i]);
+ return writer;
+ };
- /**
- * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Symbol} Symbol
- */
- Symbol.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Symbol)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Symbol();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Symbol.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Symbol.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Symbol.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- return message;
- };
+ /**
+ * Encodes the specified Hints message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.OcrConfig.Hints.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {google.cloud.documentai.v1beta3.OcrConfig.IHints} message Hints message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Hints.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Creates a plain object from a Symbol message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Symbol} message Symbol
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Symbol.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
- if (options.defaults)
- object.layout = null;
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
+ /**
+ * Decodes a Hints message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig.Hints} Hints
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Hints.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.OcrConfig.Hints();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.languageHints && message.languageHints.length))
+ message.languageHints = [];
+ message.languageHints.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
}
- return object;
- };
+ }
+ return message;
+ };
- /**
- * Converts this Symbol to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @instance
- * @returns {Object.} JSON object
- */
- Symbol.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Decodes a Hints message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig.Hints} Hints
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Hints.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Gets the default type url for Symbol
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Symbol
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Symbol.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Symbol";
- };
+ /**
+ * Verifies a Hints message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Hints.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.languageHints != null && message.hasOwnProperty("languageHints")) {
+ if (!Array.isArray(message.languageHints))
+ return "languageHints: array expected";
+ for (var i = 0; i < message.languageHints.length; ++i)
+ if (!$util.isString(message.languageHints[i]))
+ return "languageHints: string[] expected";
+ }
+ return null;
+ };
- return Symbol;
- })();
+ /**
+ * Creates a Hints message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.OcrConfig.Hints} Hints
+ */
+ Hints.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.OcrConfig.Hints)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.OcrConfig.Hints();
+ if (object.languageHints) {
+ if (!Array.isArray(object.languageHints))
+ throw TypeError(".google.cloud.documentai.v1beta3.OcrConfig.Hints.languageHints: array expected");
+ message.languageHints = [];
+ for (var i = 0; i < object.languageHints.length; ++i)
+ message.languageHints[i] = String(object.languageHints[i]);
+ }
+ return message;
+ };
- Page.VisualElement = (function() {
+ /**
+ * Creates a plain object from a Hints message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {google.cloud.documentai.v1beta3.OcrConfig.Hints} message Hints
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Hints.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.languageHints = [];
+ if (message.languageHints && message.languageHints.length) {
+ object.languageHints = [];
+ for (var j = 0; j < message.languageHints.length; ++j)
+ object.languageHints[j] = message.languageHints[j];
+ }
+ return object;
+ };
- /**
- * Properties of a VisualElement.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IVisualElement
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] VisualElement layout
- * @property {string|null} [type] VisualElement type
- * @property {Array.|null} [detectedLanguages] VisualElement detectedLanguages
- */
+ /**
+ * Converts this Hints to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Hints.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Constructs a new VisualElement.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a VisualElement.
- * @implements IVisualElement
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IVisualElement=} [properties] Properties to set
- */
- function VisualElement(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ /**
+ * Gets the default type url for Hints
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.OcrConfig.Hints
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Hints.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
}
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.OcrConfig.Hints";
+ };
- /**
- * VisualElement layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @instance
- */
- VisualElement.prototype.layout = null;
+ return Hints;
+ })();
- /**
- * VisualElement type.
- * @member {string} type
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @instance
- */
- VisualElement.prototype.type = "";
+ return OcrConfig;
+ })();
- /**
- * VisualElement detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @instance
- */
- VisualElement.prototype.detectedLanguages = $util.emptyArray;
+ v1beta3.PropertyMetadata = (function() {
- /**
- * Creates a new VisualElement instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IVisualElement=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.VisualElement} VisualElement instance
- */
- VisualElement.create = function create(properties) {
- return new VisualElement(properties);
- };
+ /**
+ * Properties of a PropertyMetadata.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IPropertyMetadata
+ * @property {boolean|null} [inactive] PropertyMetadata inactive
+ */
- /**
- * Encodes the specified VisualElement message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IVisualElement} message VisualElement message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- VisualElement.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.type);
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- return writer;
- };
+ /**
+ * Constructs a new PropertyMetadata.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a PropertyMetadata.
+ * @implements IPropertyMetadata
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IPropertyMetadata=} [properties] Properties to set
+ */
+ function PropertyMetadata(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Encodes the specified VisualElement message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.VisualElement.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IVisualElement} message VisualElement message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- VisualElement.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * PropertyMetadata inactive.
+ * @member {boolean} inactive
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @instance
+ */
+ PropertyMetadata.prototype.inactive = false;
- /**
- * Decodes a VisualElement message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.VisualElement} VisualElement
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- VisualElement.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.type = reader.string();
- break;
- }
- case 3: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a VisualElement message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.VisualElement} VisualElement
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- VisualElement.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Creates a new PropertyMetadata instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IPropertyMetadata=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.PropertyMetadata} PropertyMetadata instance
+ */
+ PropertyMetadata.create = function create(properties) {
+ return new PropertyMetadata(properties);
+ };
- /**
- * Verifies a VisualElement message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- VisualElement.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.type != null && message.hasOwnProperty("type"))
- if (!$util.isString(message.type))
- return "type: string expected";
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- return null;
- };
+ /**
+ * Encodes the specified PropertyMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.PropertyMetadata.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IPropertyMetadata} message PropertyMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PropertyMetadata.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.inactive != null && Object.hasOwnProperty.call(message, "inactive"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.inactive);
+ return writer;
+ };
- /**
- * Creates a VisualElement message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.VisualElement} VisualElement
- */
- VisualElement.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.VisualElement();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.VisualElement.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.type != null)
- message.type = String(object.type);
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.VisualElement.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.VisualElement.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- return message;
- };
+ /**
+ * Encodes the specified PropertyMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.PropertyMetadata.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IPropertyMetadata} message PropertyMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PropertyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Creates a plain object from a VisualElement message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.VisualElement} message VisualElement
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- VisualElement.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
- if (options.defaults) {
- object.layout = null;
- object.type = "";
- }
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = message.type;
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
+ /**
+ * Decodes a PropertyMetadata message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.PropertyMetadata} PropertyMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PropertyMetadata.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.PropertyMetadata();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 3: {
+ message.inactive = reader.bool();
+ break;
}
- return object;
- };
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Converts this VisualElement to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @instance
- * @returns {Object.} JSON object
- */
- VisualElement.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Decodes a PropertyMetadata message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.PropertyMetadata} PropertyMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PropertyMetadata.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Gets the default type url for VisualElement
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.VisualElement
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- VisualElement.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.VisualElement";
- };
+ /**
+ * Verifies a PropertyMetadata message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PropertyMetadata.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.inactive != null && message.hasOwnProperty("inactive"))
+ if (typeof message.inactive !== "boolean")
+ return "inactive: boolean expected";
+ return null;
+ };
- return VisualElement;
- })();
+ /**
+ * Creates a PropertyMetadata message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.PropertyMetadata} PropertyMetadata
+ */
+ PropertyMetadata.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.PropertyMetadata)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.PropertyMetadata();
+ if (object.inactive != null)
+ message.inactive = Boolean(object.inactive);
+ return message;
+ };
- Page.Table = (function() {
+ /**
+ * Creates a plain object from a PropertyMetadata message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.PropertyMetadata} message PropertyMetadata
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PropertyMetadata.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.inactive = false;
+ if (message.inactive != null && message.hasOwnProperty("inactive"))
+ object.inactive = message.inactive;
+ return object;
+ };
- /**
- * Properties of a Table.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface ITable
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] Table layout
- * @property {Array.|null} [headerRows] Table headerRows
- * @property {Array.|null} [bodyRows] Table bodyRows
- * @property {Array.|null} [detectedLanguages] Table detectedLanguages
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] Table provenance
- */
+ /**
+ * Converts this PropertyMetadata to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PropertyMetadata.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Constructs a new Table.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a Table.
- * @implements ITable
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.ITable=} [properties] Properties to set
- */
- function Table(properties) {
- this.headerRows = [];
- this.bodyRows = [];
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Gets the default type url for PropertyMetadata
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.PropertyMetadata
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PropertyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.PropertyMetadata";
+ };
- /**
- * Table layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @instance
- */
- Table.prototype.layout = null;
+ return PropertyMetadata;
+ })();
- /**
- * Table headerRows.
- * @member {Array.} headerRows
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @instance
- */
- Table.prototype.headerRows = $util.emptyArray;
+ v1beta3.EntityTypeMetadata = (function() {
- /**
- * Table bodyRows.
- * @member {Array.} bodyRows
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @instance
- */
- Table.prototype.bodyRows = $util.emptyArray;
+ /**
+ * Properties of an EntityTypeMetadata.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IEntityTypeMetadata
+ * @property {boolean|null} [inactive] EntityTypeMetadata inactive
+ */
- /**
- * Table detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @instance
- */
- Table.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Constructs a new EntityTypeMetadata.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents an EntityTypeMetadata.
+ * @implements IEntityTypeMetadata
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IEntityTypeMetadata=} [properties] Properties to set
+ */
+ function EntityTypeMetadata(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Table provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @instance
- */
- Table.prototype.provenance = null;
+ /**
+ * EntityTypeMetadata inactive.
+ * @member {boolean} inactive
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @instance
+ */
+ EntityTypeMetadata.prototype.inactive = false;
- /**
- * Creates a new Table instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ITable=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table} Table instance
- */
- Table.create = function create(properties) {
- return new Table(properties);
- };
+ /**
+ * Creates a new EntityTypeMetadata instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IEntityTypeMetadata=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.EntityTypeMetadata} EntityTypeMetadata instance
+ */
+ EntityTypeMetadata.create = function create(properties) {
+ return new EntityTypeMetadata(properties);
+ };
- /**
- * Encodes the specified Table message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ITable} message Table message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Table.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.headerRows != null && message.headerRows.length)
- for (var i = 0; i < message.headerRows.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.encode(message.headerRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.bodyRows != null && message.bodyRows.length)
- for (var i = 0; i < message.bodyRows.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.encode(message.bodyRows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- return writer;
- };
+ /**
+ * Encodes the specified EntityTypeMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.EntityTypeMetadata.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IEntityTypeMetadata} message EntityTypeMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EntityTypeMetadata.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.inactive != null && Object.hasOwnProperty.call(message, "inactive"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.inactive);
+ return writer;
+ };
- /**
- * Encodes the specified Table message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.ITable} message Table message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Table.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Encodes the specified EntityTypeMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.EntityTypeMetadata.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IEntityTypeMetadata} message EntityTypeMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EntityTypeMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Decodes a Table message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table} Table
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Table.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Table();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- if (!(message.headerRows && message.headerRows.length))
- message.headerRows = [];
- message.headerRows.push($root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.decode(reader, reader.uint32()));
- break;
- }
- case 3: {
- if (!(message.bodyRows && message.bodyRows.length))
- message.bodyRows = [];
- message.bodyRows.push($root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.decode(reader, reader.uint32()));
- break;
- }
- case 4: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 5: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
+ /**
+ * Decodes an EntityTypeMetadata message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.EntityTypeMetadata} EntityTypeMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EntityTypeMetadata.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.EntityTypeMetadata();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 5: {
+ message.inactive = reader.bool();
+ break;
}
- return message;
- };
-
- /**
- * Decodes a Table message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table} Table
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Table.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Verifies a Table message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Table.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.headerRows != null && message.hasOwnProperty("headerRows")) {
- if (!Array.isArray(message.headerRows))
- return "headerRows: array expected";
- for (var i = 0; i < message.headerRows.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify(message.headerRows[i]);
- if (error)
- return "headerRows." + error;
- }
- }
- if (message.bodyRows != null && message.hasOwnProperty("bodyRows")) {
- if (!Array.isArray(message.bodyRows))
- return "bodyRows: array expected";
- for (var i = 0; i < message.bodyRows.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify(message.bodyRows[i]);
- if (error)
- return "bodyRows." + error;
- }
- }
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
- }
- return null;
- };
+ /**
+ * Decodes an EntityTypeMetadata message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.EntityTypeMetadata} EntityTypeMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EntityTypeMetadata.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Creates a Table message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table} Table
- */
- Table.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Table)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Table();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.headerRows) {
- if (!Array.isArray(object.headerRows))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.headerRows: array expected");
- message.headerRows = [];
- for (var i = 0; i < object.headerRows.length; ++i) {
- if (typeof object.headerRows[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.headerRows: object expected");
- message.headerRows[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.fromObject(object.headerRows[i]);
- }
- }
- if (object.bodyRows) {
- if (!Array.isArray(object.bodyRows))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.bodyRows: array expected");
- message.bodyRows = [];
- for (var i = 0; i < object.bodyRows.length; ++i) {
- if (typeof object.bodyRows[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.bodyRows: object expected");
- message.bodyRows[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.fromObject(object.bodyRows[i]);
- }
- }
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
- }
- return message;
- };
+ /**
+ * Verifies an EntityTypeMetadata message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EntityTypeMetadata.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.inactive != null && message.hasOwnProperty("inactive"))
+ if (typeof message.inactive !== "boolean")
+ return "inactive: boolean expected";
+ return null;
+ };
- /**
- * Creates a plain object from a Table message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table} message Table
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Table.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.headerRows = [];
- object.bodyRows = [];
- object.detectedLanguages = [];
- }
- if (options.defaults) {
- object.layout = null;
- object.provenance = null;
- }
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.headerRows && message.headerRows.length) {
- object.headerRows = [];
- for (var j = 0; j < message.headerRows.length; ++j)
- object.headerRows[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.toObject(message.headerRows[j], options);
- }
- if (message.bodyRows && message.bodyRows.length) {
- object.bodyRows = [];
- for (var j = 0; j < message.bodyRows.length; ++j)
- object.bodyRows[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.toObject(message.bodyRows[j], options);
- }
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
- }
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
- return object;
- };
+ /**
+ * Creates an EntityTypeMetadata message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.EntityTypeMetadata} EntityTypeMetadata
+ */
+ EntityTypeMetadata.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.EntityTypeMetadata)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.EntityTypeMetadata();
+ if (object.inactive != null)
+ message.inactive = Boolean(object.inactive);
+ return message;
+ };
- /**
- * Converts this Table to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @instance
- * @returns {Object.} JSON object
- */
- Table.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Creates a plain object from an EntityTypeMetadata message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.EntityTypeMetadata} message EntityTypeMetadata
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EntityTypeMetadata.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.inactive = false;
+ if (message.inactive != null && message.hasOwnProperty("inactive"))
+ object.inactive = message.inactive;
+ return object;
+ };
- /**
- * Gets the default type url for Table
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Table.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Table";
- };
+ /**
+ * Converts this EntityTypeMetadata to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EntityTypeMetadata.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- Table.TableRow = (function() {
+ /**
+ * Gets the default type url for EntityTypeMetadata
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.EntityTypeMetadata
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EntityTypeMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.EntityTypeMetadata";
+ };
- /**
- * Properties of a TableRow.
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @interface ITableRow
- * @property {Array.|null} [cells] TableRow cells
- */
+ return EntityTypeMetadata;
+ })();
- /**
- * Constructs a new TableRow.
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @classdesc Represents a TableRow.
- * @implements ITableRow
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow=} [properties] Properties to set
- */
- function TableRow(properties) {
- this.cells = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ v1beta3.DocumentSchema = (function() {
- /**
- * TableRow cells.
- * @member {Array.} cells
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @instance
- */
- TableRow.prototype.cells = $util.emptyArray;
+ /**
+ * Properties of a DocumentSchema.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IDocumentSchema
+ * @property {string|null} [displayName] DocumentSchema displayName
+ * @property {string|null} [description] DocumentSchema description
+ * @property {Array.|null} [entityTypes] DocumentSchema entityTypes
+ * @property {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null} [metadata] DocumentSchema metadata
+ */
- /**
- * Creates a new TableRow instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableRow} TableRow instance
- */
- TableRow.create = function create(properties) {
- return new TableRow(properties);
- };
+ /**
+ * Constructs a new DocumentSchema.
+ * @memberof google.cloud.documentai.v1beta3
+ * @classdesc Represents a DocumentSchema.
+ * @implements IDocumentSchema
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.IDocumentSchema=} [properties] Properties to set
+ */
+ function DocumentSchema(properties) {
+ this.entityTypes = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Encodes the specified TableRow message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow} message TableRow message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TableRow.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.cells != null && message.cells.length)
- for (var i = 0; i < message.cells.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.encode(message.cells[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- return writer;
- };
+ /**
+ * DocumentSchema displayName.
+ * @member {string} displayName
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @instance
+ */
+ DocumentSchema.prototype.displayName = "";
- /**
- * Encodes the specified TableRow message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableRow} message TableRow message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TableRow.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * DocumentSchema description.
+ * @member {string} description
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @instance
+ */
+ DocumentSchema.prototype.description = "";
- /**
- * Decodes a TableRow message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableRow} TableRow
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TableRow.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.cells && message.cells.length))
- message.cells = [];
- message.cells.push($root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * DocumentSchema entityTypes.
+ * @member {Array.} entityTypes
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @instance
+ */
+ DocumentSchema.prototype.entityTypes = $util.emptyArray;
- /**
- * Decodes a TableRow message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableRow} TableRow
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TableRow.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * DocumentSchema metadata.
+ * @member {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null|undefined} metadata
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @instance
+ */
+ DocumentSchema.prototype.metadata = null;
- /**
- * Verifies a TableRow message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- TableRow.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.cells != null && message.hasOwnProperty("cells")) {
- if (!Array.isArray(message.cells))
- return "cells: array expected";
- for (var i = 0; i < message.cells.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify(message.cells[i]);
- if (error)
- return "cells." + error;
- }
- }
- return null;
- };
+ /**
+ * Creates a new DocumentSchema instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDocumentSchema=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema} DocumentSchema instance
+ */
+ DocumentSchema.create = function create(properties) {
+ return new DocumentSchema(properties);
+ };
- /**
- * Creates a TableRow message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableRow} TableRow
- */
- TableRow.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableRow();
- if (object.cells) {
- if (!Array.isArray(object.cells))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.cells: array expected");
- message.cells = [];
- for (var i = 0; i < object.cells.length; ++i) {
- if (typeof object.cells[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.TableRow.cells: object expected");
- message.cells[i] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.fromObject(object.cells[i]);
- }
- }
- return message;
- };
+ /**
+ * Encodes the specified DocumentSchema message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDocumentSchema} message DocumentSchema message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DocumentSchema.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName);
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
+ if (message.entityTypes != null && message.entityTypes.length)
+ for (var i = 0; i < message.entityTypes.length; ++i)
+ $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
+ $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ return writer;
+ };
- /**
- * Creates a plain object from a TableRow message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.TableRow} message TableRow
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- TableRow.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.cells = [];
- if (message.cells && message.cells.length) {
- object.cells = [];
- for (var j = 0; j < message.cells.length; ++j)
- object.cells[j] = $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.toObject(message.cells[j], options);
- }
- return object;
- };
+ /**
+ * Encodes the specified DocumentSchema message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.IDocumentSchema} message DocumentSchema message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DocumentSchema.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Converts this TableRow to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @instance
- * @returns {Object.} JSON object
- */
- TableRow.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Decodes a DocumentSchema message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema} DocumentSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DocumentSchema.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentSchema();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.displayName = reader.string();
+ break;
+ }
+ case 2: {
+ message.description = reader.string();
+ break;
+ }
+ case 3: {
+ if (!(message.entityTypes && message.entityTypes.length))
+ message.entityTypes = [];
+ message.entityTypes.push($root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.decode(reader, reader.uint32()));
+ break;
+ }
+ case 4: {
+ message.metadata = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Gets the default type url for TableRow
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableRow
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- TableRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Table.TableRow";
- };
+ /**
+ * Decodes a DocumentSchema message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema} DocumentSchema
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DocumentSchema.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- return TableRow;
- })();
+ /**
+ * Verifies a DocumentSchema message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DocumentSchema.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.description != null && message.hasOwnProperty("description"))
+ if (!$util.isString(message.description))
+ return "description: string expected";
+ if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) {
+ if (!Array.isArray(message.entityTypes))
+ return "entityTypes: array expected";
+ for (var i = 0; i < message.entityTypes.length; ++i) {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify(message.entityTypes[i]);
+ if (error)
+ return "entityTypes." + error;
+ }
+ }
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify(message.metadata);
+ if (error)
+ return "metadata." + error;
+ }
+ return null;
+ };
- Table.TableCell = (function() {
+ /**
+ * Creates a DocumentSchema message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema} DocumentSchema
+ */
+ DocumentSchema.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentSchema)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentSchema();
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.description != null)
+ message.description = String(object.description);
+ if (object.entityTypes) {
+ if (!Array.isArray(object.entityTypes))
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.entityTypes: array expected");
+ message.entityTypes = [];
+ for (var i = 0; i < object.entityTypes.length; ++i) {
+ if (typeof object.entityTypes[i] !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.entityTypes: object expected");
+ message.entityTypes[i] = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.fromObject(object.entityTypes[i]);
+ }
+ }
+ if (object.metadata != null) {
+ if (typeof object.metadata !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.metadata: object expected");
+ message.metadata = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.fromObject(object.metadata);
+ }
+ return message;
+ };
- /**
- * Properties of a TableCell.
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @interface ITableCell
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] TableCell layout
- * @property {number|null} [rowSpan] TableCell rowSpan
- * @property {number|null} [colSpan] TableCell colSpan
- * @property {Array.|null} [detectedLanguages] TableCell detectedLanguages
- */
+ /**
+ * Creates a plain object from a DocumentSchema message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema} message DocumentSchema
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DocumentSchema.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.entityTypes = [];
+ if (options.defaults) {
+ object.displayName = "";
+ object.description = "";
+ object.metadata = null;
+ }
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ object.displayName = message.displayName;
+ if (message.description != null && message.hasOwnProperty("description"))
+ object.description = message.description;
+ if (message.entityTypes && message.entityTypes.length) {
+ object.entityTypes = [];
+ for (var j = 0; j < message.entityTypes.length; ++j)
+ object.entityTypes[j] = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.toObject(message.entityTypes[j], options);
+ }
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
+ object.metadata = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.toObject(message.metadata, options);
+ return object;
+ };
- /**
- * Constructs a new TableCell.
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table
- * @classdesc Represents a TableCell.
- * @implements ITableCell
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell=} [properties] Properties to set
- */
- function TableCell(properties) {
- this.detectedLanguages = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * Converts this DocumentSchema to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DocumentSchema.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * TableCell layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @instance
- */
- TableCell.prototype.layout = null;
+ /**
+ * Gets the default type url for DocumentSchema
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DocumentSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentSchema";
+ };
- /**
- * TableCell rowSpan.
- * @member {number} rowSpan
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @instance
- */
- TableCell.prototype.rowSpan = 0;
+ DocumentSchema.EntityType = (function() {
- /**
- * TableCell colSpan.
- * @member {number} colSpan
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @instance
- */
- TableCell.prototype.colSpan = 0;
+ /**
+ * Properties of an EntityType.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @interface IEntityType
+ * @property {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null} [enumValues] EntityType enumValues
+ * @property {string|null} [displayName] EntityType displayName
+ * @property {string|null} [name] EntityType name
+ * @property {Array.|null} [baseTypes] EntityType baseTypes
+ * @property {Array.|null} [properties] EntityType properties
+ * @property {google.cloud.documentai.v1beta3.IEntityTypeMetadata|null} [entityTypeMetadata] EntityType entityTypeMetadata
+ */
- /**
- * TableCell detectedLanguages.
- * @member {Array.} detectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @instance
- */
- TableCell.prototype.detectedLanguages = $util.emptyArray;
+ /**
+ * Constructs a new EntityType.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @classdesc Represents an EntityType.
+ * @implements IEntityType
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IEntityType=} [properties] Properties to set
+ */
+ function EntityType(properties) {
+ this.baseTypes = [];
+ this.properties = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Creates a new TableCell instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableCell} TableCell instance
- */
- TableCell.create = function create(properties) {
- return new TableCell(properties);
- };
+ /**
+ * EntityType enumValues.
+ * @member {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null|undefined} enumValues
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ EntityType.prototype.enumValues = null;
- /**
- * Encodes the specified TableCell message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell} message TableCell message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TableCell.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.rowSpan != null && Object.hasOwnProperty.call(message, "rowSpan"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rowSpan);
- if (message.colSpan != null && Object.hasOwnProperty.call(message, "colSpan"))
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.colSpan);
- if (message.detectedLanguages != null && message.detectedLanguages.length)
- for (var i = 0; i < message.detectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- return writer;
- };
+ /**
+ * EntityType displayName.
+ * @member {string} displayName
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ EntityType.prototype.displayName = "";
- /**
- * Encodes the specified TableCell message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.ITableCell} message TableCell message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TableCell.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * EntityType name.
+ * @member {string} name
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ EntityType.prototype.name = "";
- /**
- * Decodes a TableCell message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableCell} TableCell
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TableCell.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.rowSpan = reader.int32();
- break;
- }
- case 3: {
- message.colSpan = reader.int32();
- break;
- }
- case 4: {
- if (!(message.detectedLanguages && message.detectedLanguages.length))
- message.detectedLanguages = [];
- message.detectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * EntityType baseTypes.
+ * @member {Array.} baseTypes
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ EntityType.prototype.baseTypes = $util.emptyArray;
- /**
- * Decodes a TableCell message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableCell} TableCell
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TableCell.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * EntityType properties.
+ * @member {Array.} properties
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ EntityType.prototype.properties = $util.emptyArray;
- /**
- * Verifies a TableCell message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- TableCell.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.rowSpan != null && message.hasOwnProperty("rowSpan"))
- if (!$util.isInteger(message.rowSpan))
- return "rowSpan: integer expected";
- if (message.colSpan != null && message.hasOwnProperty("colSpan"))
- if (!$util.isInteger(message.colSpan))
- return "colSpan: integer expected";
- if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
- if (!Array.isArray(message.detectedLanguages))
- return "detectedLanguages: array expected";
- for (var i = 0; i < message.detectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.detectedLanguages[i]);
- if (error)
- return "detectedLanguages." + error;
- }
- }
- return null;
- };
+ /**
+ * EntityType entityTypeMetadata.
+ * @member {google.cloud.documentai.v1beta3.IEntityTypeMetadata|null|undefined} entityTypeMetadata
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ EntityType.prototype.entityTypeMetadata = null;
- /**
- * Creates a TableCell message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.Table.TableCell} TableCell
- */
- TableCell.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.Table.TableCell();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
- }
- if (object.rowSpan != null)
- message.rowSpan = object.rowSpan | 0;
- if (object.colSpan != null)
- message.colSpan = object.colSpan | 0;
- if (object.detectedLanguages) {
- if (!Array.isArray(object.detectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.detectedLanguages: array expected");
- message.detectedLanguages = [];
- for (var i = 0; i < object.detectedLanguages.length; ++i) {
- if (typeof object.detectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.Table.TableCell.detectedLanguages: object expected");
- message.detectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.detectedLanguages[i]);
- }
- }
- return message;
- };
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
- /**
- * Creates a plain object from a TableCell message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.Table.TableCell} message TableCell
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- TableCell.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.detectedLanguages = [];
- if (options.defaults) {
- object.layout = null;
- object.rowSpan = 0;
- object.colSpan = 0;
+ /**
+ * EntityType valueSource.
+ * @member {"enumValues"|undefined} valueSource
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ */
+ Object.defineProperty(EntityType.prototype, "valueSource", {
+ get: $util.oneOfGetter($oneOfFields = ["enumValues"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new EntityType instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IEntityType=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType} EntityType instance
+ */
+ EntityType.create = function create(properties) {
+ return new EntityType(properties);
+ };
+
+ /**
+ * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IEntityType} message EntityType message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EntityType.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.baseTypes != null && message.baseTypes.length)
+ for (var i = 0; i < message.baseTypes.length; ++i)
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseTypes[i]);
+ if (message.properties != null && message.properties.length)
+ for (var i = 0; i < message.properties.length; ++i)
+ $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.encode(message.properties[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.entityTypeMetadata != null && Object.hasOwnProperty.call(message, "entityTypeMetadata"))
+ $root.google.cloud.documentai.v1beta3.EntityTypeMetadata.encode(message.entityTypeMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.displayName);
+ if (message.enumValues != null && Object.hasOwnProperty.call(message, "enumValues"))
+ $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.encode(message.enumValues, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IEntityType} message EntityType message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EntityType.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EntityType message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType} EntityType
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EntityType.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 14: {
+ message.enumValues = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.decode(reader, reader.uint32());
+ break;
}
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.rowSpan != null && message.hasOwnProperty("rowSpan"))
- object.rowSpan = message.rowSpan;
- if (message.colSpan != null && message.hasOwnProperty("colSpan"))
- object.colSpan = message.colSpan;
- if (message.detectedLanguages && message.detectedLanguages.length) {
- object.detectedLanguages = [];
- for (var j = 0; j < message.detectedLanguages.length; ++j)
- object.detectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.detectedLanguages[j], options);
+ case 13: {
+ message.displayName = reader.string();
+ break;
}
- return object;
- };
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ if (!(message.baseTypes && message.baseTypes.length))
+ message.baseTypes = [];
+ message.baseTypes.push(reader.string());
+ break;
+ }
+ case 6: {
+ if (!(message.properties && message.properties.length))
+ message.properties = [];
+ message.properties.push($root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.decode(reader, reader.uint32()));
+ break;
+ }
+ case 11: {
+ message.entityTypeMetadata = $root.google.cloud.documentai.v1beta3.EntityTypeMetadata.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
- /**
- * Converts this TableCell to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @instance
- * @returns {Object.} JSON object
- */
- TableCell.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Decodes an EntityType message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType} EntityType
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EntityType.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Gets the default type url for TableCell
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.Table.TableCell
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- TableCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.Table.TableCell";
- };
+ /**
+ * Verifies an EntityType message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EntityType.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.enumValues != null && message.hasOwnProperty("enumValues")) {
+ properties.valueSource = 1;
+ {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify(message.enumValues);
+ if (error)
+ return "enumValues." + error;
+ }
+ }
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.baseTypes != null && message.hasOwnProperty("baseTypes")) {
+ if (!Array.isArray(message.baseTypes))
+ return "baseTypes: array expected";
+ for (var i = 0; i < message.baseTypes.length; ++i)
+ if (!$util.isString(message.baseTypes[i]))
+ return "baseTypes: string[] expected";
+ }
+ if (message.properties != null && message.hasOwnProperty("properties")) {
+ if (!Array.isArray(message.properties))
+ return "properties: array expected";
+ for (var i = 0; i < message.properties.length; ++i) {
+ var error = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify(message.properties[i]);
+ if (error)
+ return "properties." + error;
+ }
+ }
+ if (message.entityTypeMetadata != null && message.hasOwnProperty("entityTypeMetadata")) {
+ var error = $root.google.cloud.documentai.v1beta3.EntityTypeMetadata.verify(message.entityTypeMetadata);
+ if (error)
+ return "entityTypeMetadata." + error;
+ }
+ return null;
+ };
- return TableCell;
- })();
+ /**
+ * Creates an EntityType message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType} EntityType
+ */
+ EntityType.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType();
+ if (object.enumValues != null) {
+ if (typeof object.enumValues !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.enumValues: object expected");
+ message.enumValues = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.fromObject(object.enumValues);
+ }
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.baseTypes) {
+ if (!Array.isArray(object.baseTypes))
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.baseTypes: array expected");
+ message.baseTypes = [];
+ for (var i = 0; i < object.baseTypes.length; ++i)
+ message.baseTypes[i] = String(object.baseTypes[i]);
+ }
+ if (object.properties) {
+ if (!Array.isArray(object.properties))
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.properties: array expected");
+ message.properties = [];
+ for (var i = 0; i < object.properties.length; ++i) {
+ if (typeof object.properties[i] !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.properties: object expected");
+ message.properties[i] = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.fromObject(object.properties[i]);
+ }
+ }
+ if (object.entityTypeMetadata != null) {
+ if (typeof object.entityTypeMetadata !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.entityTypeMetadata: object expected");
+ message.entityTypeMetadata = $root.google.cloud.documentai.v1beta3.EntityTypeMetadata.fromObject(object.entityTypeMetadata);
+ }
+ return message;
+ };
- return Table;
- })();
+ /**
+ * Creates a plain object from an EntityType message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType} message EntityType
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EntityType.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.baseTypes = [];
+ object.properties = [];
+ }
+ if (options.defaults) {
+ object.name = "";
+ object.entityTypeMetadata = null;
+ object.displayName = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.baseTypes && message.baseTypes.length) {
+ object.baseTypes = [];
+ for (var j = 0; j < message.baseTypes.length; ++j)
+ object.baseTypes[j] = message.baseTypes[j];
+ }
+ if (message.properties && message.properties.length) {
+ object.properties = [];
+ for (var j = 0; j < message.properties.length; ++j)
+ object.properties[j] = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.toObject(message.properties[j], options);
+ }
+ if (message.entityTypeMetadata != null && message.hasOwnProperty("entityTypeMetadata"))
+ object.entityTypeMetadata = $root.google.cloud.documentai.v1beta3.EntityTypeMetadata.toObject(message.entityTypeMetadata, options);
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ object.displayName = message.displayName;
+ if (message.enumValues != null && message.hasOwnProperty("enumValues")) {
+ object.enumValues = $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.toObject(message.enumValues, options);
+ if (options.oneofs)
+ object.valueSource = "enumValues";
+ }
+ return object;
+ };
- Page.FormField = (function() {
+ /**
+ * Converts this EntityType to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EntityType.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EntityType
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentSchema.EntityType";
+ };
+
+ EntityType.EnumValues = (function() {
/**
- * Properties of a FormField.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IFormField
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [fieldName] FormField fieldName
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [fieldValue] FormField fieldValue
- * @property {Array.|null} [nameDetectedLanguages] FormField nameDetectedLanguages
- * @property {Array.|null} [valueDetectedLanguages] FormField valueDetectedLanguages
- * @property {string|null} [valueType] FormField valueType
- * @property {string|null} [correctedKeyText] FormField correctedKeyText
- * @property {string|null} [correctedValueText] FormField correctedValueText
- * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] FormField provenance
+ * Properties of an EnumValues.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @interface IEnumValues
+ * @property {Array.|null} [values] EnumValues values
*/
/**
- * Constructs a new FormField.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a FormField.
- * @implements IFormField
+ * Constructs a new EnumValues.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @classdesc Represents an EnumValues.
+ * @implements IEnumValues
* @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IFormField=} [properties] Properties to set
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues=} [properties] Properties to set
*/
- function FormField(properties) {
- this.nameDetectedLanguages = [];
- this.valueDetectedLanguages = [];
+ function EnumValues(properties) {
+ this.values = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -63523,179 +62720,78 @@
}
/**
- * FormField fieldName.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} fieldName
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.fieldName = null;
-
- /**
- * FormField fieldValue.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} fieldValue
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.fieldValue = null;
-
- /**
- * FormField nameDetectedLanguages.
- * @member {Array.} nameDetectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.nameDetectedLanguages = $util.emptyArray;
-
- /**
- * FormField valueDetectedLanguages.
- * @member {Array.} valueDetectedLanguages
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.valueDetectedLanguages = $util.emptyArray;
-
- /**
- * FormField valueType.
- * @member {string} valueType
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.valueType = "";
-
- /**
- * FormField correctedKeyText.
- * @member {string} correctedKeyText
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.correctedKeyText = "";
-
- /**
- * FormField correctedValueText.
- * @member {string} correctedValueText
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
- * @instance
- */
- FormField.prototype.correctedValueText = "";
-
- /**
- * FormField provenance.
- * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * EnumValues values.
+ * @member {Array.} values
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @instance
*/
- FormField.prototype.provenance = null;
+ EnumValues.prototype.values = $util.emptyArray;
/**
- * Creates a new FormField instance using the specified properties.
+ * Creates a new EnumValues instance using the specified properties.
* @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IFormField=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.FormField} FormField instance
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues} EnumValues instance
*/
- FormField.create = function create(properties) {
- return new FormField(properties);
+ EnumValues.create = function create(properties) {
+ return new EnumValues(properties);
};
/**
- * Encodes the specified FormField message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.FormField.verify|verify} messages.
+ * Encodes the specified EnumValues message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify|verify} messages.
* @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IFormField} message FormField message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues} message EnumValues message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- FormField.encode = function encode(message, writer) {
+ EnumValues.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.fieldName, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.fieldValue != null && Object.hasOwnProperty.call(message, "fieldValue"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.fieldValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.nameDetectedLanguages != null && message.nameDetectedLanguages.length)
- for (var i = 0; i < message.nameDetectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.nameDetectedLanguages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.valueDetectedLanguages != null && message.valueDetectedLanguages.length)
- for (var i = 0; i < message.valueDetectedLanguages.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.encode(message.valueDetectedLanguages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType"))
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.valueType);
- if (message.correctedKeyText != null && Object.hasOwnProperty.call(message, "correctedKeyText"))
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.correctedKeyText);
- if (message.correctedValueText != null && Object.hasOwnProperty.call(message, "correctedValueText"))
- writer.uint32(/* id 7, wireType 2 =*/58).string(message.correctedValueText);
- if (message.provenance != null && Object.hasOwnProperty.call(message, "provenance"))
- $root.google.cloud.documentai.v1beta3.Document.Provenance.encode(message.provenance, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.values != null && message.values.length)
+ for (var i = 0; i < message.values.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]);
return writer;
};
/**
- * Encodes the specified FormField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.FormField.verify|verify} messages.
+ * Encodes the specified EnumValues message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IFormField} message FormField message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues} message EnumValues message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- FormField.encodeDelimited = function encodeDelimited(message, writer) {
+ EnumValues.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a FormField message from the specified reader or buffer.
+ * Decodes an EnumValues message from the specified reader or buffer.
* @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.FormField} FormField
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues} EnumValues
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- FormField.decode = function decode(reader, length) {
+ EnumValues.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.FormField();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.fieldName = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.fieldValue = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- if (!(message.nameDetectedLanguages && message.nameDetectedLanguages.length))
- message.nameDetectedLanguages = [];
- message.nameDetectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 4: {
- if (!(message.valueDetectedLanguages && message.valueDetectedLanguages.length))
- message.valueDetectedLanguages = [];
- message.valueDetectedLanguages.push($root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.decode(reader, reader.uint32()));
- break;
- }
- case 5: {
- message.valueType = reader.string();
- break;
- }
- case 6: {
- message.correctedKeyText = reader.string();
- break;
- }
- case 7: {
- message.correctedValueText = reader.string();
- break;
- }
- case 8: {
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32());
+ if (!(message.values && message.values.length))
+ message.values = [];
+ message.values.push(reader.string());
break;
}
default:
@@ -63707,231 +62803,137 @@
};
/**
- * Decodes a FormField message from the specified reader or buffer, length delimited.
+ * Decodes an EnumValues message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.FormField} FormField
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues} EnumValues
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- FormField.decodeDelimited = function decodeDelimited(reader) {
+ EnumValues.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a FormField message.
+ * Verifies an EnumValues message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- FormField.verify = function verify(message) {
+ EnumValues.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.fieldName != null && message.hasOwnProperty("fieldName")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.fieldName);
- if (error)
- return "fieldName." + error;
- }
- if (message.fieldValue != null && message.hasOwnProperty("fieldValue")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.fieldValue);
- if (error)
- return "fieldValue." + error;
- }
- if (message.nameDetectedLanguages != null && message.hasOwnProperty("nameDetectedLanguages")) {
- if (!Array.isArray(message.nameDetectedLanguages))
- return "nameDetectedLanguages: array expected";
- for (var i = 0; i < message.nameDetectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.nameDetectedLanguages[i]);
- if (error)
- return "nameDetectedLanguages." + error;
- }
- }
- if (message.valueDetectedLanguages != null && message.hasOwnProperty("valueDetectedLanguages")) {
- if (!Array.isArray(message.valueDetectedLanguages))
- return "valueDetectedLanguages: array expected";
- for (var i = 0; i < message.valueDetectedLanguages.length; ++i) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify(message.valueDetectedLanguages[i]);
- if (error)
- return "valueDetectedLanguages." + error;
- }
- }
- if (message.valueType != null && message.hasOwnProperty("valueType"))
- if (!$util.isString(message.valueType))
- return "valueType: string expected";
- if (message.correctedKeyText != null && message.hasOwnProperty("correctedKeyText"))
- if (!$util.isString(message.correctedKeyText))
- return "correctedKeyText: string expected";
- if (message.correctedValueText != null && message.hasOwnProperty("correctedValueText"))
- if (!$util.isString(message.correctedValueText))
- return "correctedValueText: string expected";
- if (message.provenance != null && message.hasOwnProperty("provenance")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Provenance.verify(message.provenance);
- if (error)
- return "provenance." + error;
+ if (message.values != null && message.hasOwnProperty("values")) {
+ if (!Array.isArray(message.values))
+ return "values: array expected";
+ for (var i = 0; i < message.values.length; ++i)
+ if (!$util.isString(message.values[i]))
+ return "values: string[] expected";
}
return null;
};
/**
- * Creates a FormField message from a plain object. Also converts values to their respective internal types.
+ * Creates an EnumValues message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.FormField} FormField
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues} EnumValues
*/
- FormField.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.FormField)
+ EnumValues.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.FormField();
- if (object.fieldName != null) {
- if (typeof object.fieldName !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.fieldName: object expected");
- message.fieldName = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.fieldName);
- }
- if (object.fieldValue != null) {
- if (typeof object.fieldValue !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.fieldValue: object expected");
- message.fieldValue = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.fieldValue);
- }
- if (object.nameDetectedLanguages) {
- if (!Array.isArray(object.nameDetectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.nameDetectedLanguages: array expected");
- message.nameDetectedLanguages = [];
- for (var i = 0; i < object.nameDetectedLanguages.length; ++i) {
- if (typeof object.nameDetectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.nameDetectedLanguages: object expected");
- message.nameDetectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.nameDetectedLanguages[i]);
- }
- }
- if (object.valueDetectedLanguages) {
- if (!Array.isArray(object.valueDetectedLanguages))
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.valueDetectedLanguages: array expected");
- message.valueDetectedLanguages = [];
- for (var i = 0; i < object.valueDetectedLanguages.length; ++i) {
- if (typeof object.valueDetectedLanguages[i] !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.valueDetectedLanguages: object expected");
- message.valueDetectedLanguages[i] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.fromObject(object.valueDetectedLanguages[i]);
- }
- }
- if (object.valueType != null)
- message.valueType = String(object.valueType);
- if (object.correctedKeyText != null)
- message.correctedKeyText = String(object.correctedKeyText);
- if (object.correctedValueText != null)
- message.correctedValueText = String(object.correctedValueText);
- if (object.provenance != null) {
- if (typeof object.provenance !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.FormField.provenance: object expected");
- message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance);
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues();
+ if (object.values) {
+ if (!Array.isArray(object.values))
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.values: array expected");
+ message.values = [];
+ for (var i = 0; i < object.values.length; ++i)
+ message.values[i] = String(object.values[i]);
}
return message;
};
/**
- * Creates a plain object from a FormField message. Also converts values to other types if specified.
+ * Creates a plain object from an EnumValues message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.FormField} message FormField
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues} message EnumValues
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- FormField.toObject = function toObject(message, options) {
+ EnumValues.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.arrays || options.defaults) {
- object.nameDetectedLanguages = [];
- object.valueDetectedLanguages = [];
- }
- if (options.defaults) {
- object.fieldName = null;
- object.fieldValue = null;
- object.valueType = "";
- object.correctedKeyText = "";
- object.correctedValueText = "";
- object.provenance = null;
- }
- if (message.fieldName != null && message.hasOwnProperty("fieldName"))
- object.fieldName = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.fieldName, options);
- if (message.fieldValue != null && message.hasOwnProperty("fieldValue"))
- object.fieldValue = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.fieldValue, options);
- if (message.nameDetectedLanguages && message.nameDetectedLanguages.length) {
- object.nameDetectedLanguages = [];
- for (var j = 0; j < message.nameDetectedLanguages.length; ++j)
- object.nameDetectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.nameDetectedLanguages[j], options);
- }
- if (message.valueDetectedLanguages && message.valueDetectedLanguages.length) {
- object.valueDetectedLanguages = [];
- for (var j = 0; j < message.valueDetectedLanguages.length; ++j)
- object.valueDetectedLanguages[j] = $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.toObject(message.valueDetectedLanguages[j], options);
+ if (options.arrays || options.defaults)
+ object.values = [];
+ if (message.values && message.values.length) {
+ object.values = [];
+ for (var j = 0; j < message.values.length; ++j)
+ object.values[j] = message.values[j];
}
- if (message.valueType != null && message.hasOwnProperty("valueType"))
- object.valueType = message.valueType;
- if (message.correctedKeyText != null && message.hasOwnProperty("correctedKeyText"))
- object.correctedKeyText = message.correctedKeyText;
- if (message.correctedValueText != null && message.hasOwnProperty("correctedValueText"))
- object.correctedValueText = message.correctedValueText;
- if (message.provenance != null && message.hasOwnProperty("provenance"))
- object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options);
return object;
};
/**
- * Converts this FormField to JSON.
+ * Converts this EnumValues to JSON.
* @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @instance
* @returns {Object.} JSON object
*/
- FormField.prototype.toJSON = function toJSON() {
+ EnumValues.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for FormField
+ * Gets the default type url for EnumValues
* @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.FormField
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- FormField.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ EnumValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.FormField";
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues";
};
- return FormField;
+ return EnumValues;
})();
- Page.DetectedBarcode = (function() {
+ EntityType.Property = (function() {
/**
- * Properties of a DetectedBarcode.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IDetectedBarcode
- * @property {google.cloud.documentai.v1beta3.Document.Page.ILayout|null} [layout] DetectedBarcode layout
- * @property {google.cloud.documentai.v1beta3.IBarcode|null} [barcode] DetectedBarcode barcode
+ * Properties of a Property.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @interface IProperty
+ * @property {string|null} [name] Property name
+ * @property {string|null} [valueType] Property valueType
+ * @property {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|null} [occurrenceType] Property occurrenceType
+ * @property {google.cloud.documentai.v1beta3.IPropertyMetadata|null} [propertyMetadata] Property propertyMetadata
*/
/**
- * Constructs a new DetectedBarcode.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a DetectedBarcode.
- * @implements IDetectedBarcode
+ * Constructs a new Property.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType
+ * @classdesc Represents a Property.
+ * @implements IProperty
* @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode=} [properties] Properties to set
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty=} [properties] Properties to set
*/
- function DetectedBarcode(properties) {
+ function Property(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -63939,89 +62941,117 @@
}
/**
- * DetectedBarcode layout.
- * @member {google.cloud.documentai.v1beta3.Document.Page.ILayout|null|undefined} layout
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * Property name.
+ * @member {string} name
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @instance
*/
- DetectedBarcode.prototype.layout = null;
+ Property.prototype.name = "";
/**
- * DetectedBarcode barcode.
- * @member {google.cloud.documentai.v1beta3.IBarcode|null|undefined} barcode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * Property valueType.
+ * @member {string} valueType
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @instance
*/
- DetectedBarcode.prototype.barcode = null;
+ Property.prototype.valueType = "";
/**
- * Creates a new DetectedBarcode instance using the specified properties.
+ * Property occurrenceType.
+ * @member {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType} occurrenceType
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
+ * @instance
+ */
+ Property.prototype.occurrenceType = 0;
+
+ /**
+ * Property propertyMetadata.
+ * @member {google.cloud.documentai.v1beta3.IPropertyMetadata|null|undefined} propertyMetadata
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
+ * @instance
+ */
+ Property.prototype.propertyMetadata = null;
+
+ /**
+ * Creates a new Property instance using the specified properties.
* @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode} DetectedBarcode instance
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property} Property instance
*/
- DetectedBarcode.create = function create(properties) {
- return new DetectedBarcode(properties);
+ Property.create = function create(properties) {
+ return new Property(properties);
};
/**
- * Encodes the specified DetectedBarcode message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify|verify} messages.
+ * Encodes the specified Property message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify|verify} messages.
* @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode} message DetectedBarcode message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty} message Property message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- DetectedBarcode.encode = function encode(message, writer) {
+ Property.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.layout != null && Object.hasOwnProperty.call(message, "layout"))
- $root.google.cloud.documentai.v1beta3.Document.Page.Layout.encode(message.layout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.barcode != null && Object.hasOwnProperty.call(message, "barcode"))
- $root.google.cloud.documentai.v1beta3.Barcode.encode(message.barcode, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.valueType);
+ if (message.occurrenceType != null && Object.hasOwnProperty.call(message, "occurrenceType"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.occurrenceType);
+ if (message.propertyMetadata != null && Object.hasOwnProperty.call(message, "propertyMetadata"))
+ $root.google.cloud.documentai.v1beta3.PropertyMetadata.encode(message.propertyMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified DetectedBarcode message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.verify|verify} messages.
+ * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedBarcode} message DetectedBarcode message or plain object to encode
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IProperty} message Property message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- DetectedBarcode.encodeDelimited = function encodeDelimited(message, writer) {
+ Property.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a DetectedBarcode message from the specified reader or buffer.
+ * Decodes a Property message from the specified reader or buffer.
* @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode} DetectedBarcode
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property} Property
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- DetectedBarcode.decode = function decode(reader, length) {
+ Property.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.decode(reader, reader.uint32());
+ message.name = reader.string();
break;
}
case 2: {
- message.barcode = $root.google.cloud.documentai.v1beta3.Barcode.decode(reader, reader.uint32());
+ message.valueType = reader.string();
+ break;
+ }
+ case 3: {
+ message.occurrenceType = reader.int32();
+ break;
+ }
+ case 5: {
+ message.propertyMetadata = $root.google.cloud.documentai.v1beta3.PropertyMetadata.decode(reader, reader.uint32());
break;
}
default:
@@ -64033,857 +63063,1107 @@
};
/**
- * Decodes a DetectedBarcode message from the specified reader or buffer, length delimited.
+ * Decodes a Property message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode} DetectedBarcode
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property} Property
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- DetectedBarcode.decodeDelimited = function decodeDelimited(reader) {
+ Property.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a DetectedBarcode message.
+ * Verifies a Property message.
* @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- DetectedBarcode.verify = function verify(message) {
+ Property.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.layout != null && message.hasOwnProperty("layout")) {
- var error = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.verify(message.layout);
- if (error)
- return "layout." + error;
- }
- if (message.barcode != null && message.hasOwnProperty("barcode")) {
- var error = $root.google.cloud.documentai.v1beta3.Barcode.verify(message.barcode);
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.valueType != null && message.hasOwnProperty("valueType"))
+ if (!$util.isString(message.valueType))
+ return "valueType: string expected";
+ if (message.occurrenceType != null && message.hasOwnProperty("occurrenceType"))
+ switch (message.occurrenceType) {
+ default:
+ return "occurrenceType: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.propertyMetadata != null && message.hasOwnProperty("propertyMetadata")) {
+ var error = $root.google.cloud.documentai.v1beta3.PropertyMetadata.verify(message.propertyMetadata);
if (error)
- return "barcode." + error;
+ return "propertyMetadata." + error;
}
return null;
};
/**
- * Creates a DetectedBarcode message from a plain object. Also converts values to their respective internal types.
+ * Creates a Property message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
* @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode} DetectedBarcode
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property} Property
*/
- DetectedBarcode.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode)
+ Property.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property)
return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode();
- if (object.layout != null) {
- if (typeof object.layout !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.layout: object expected");
- message.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.fromObject(object.layout);
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.valueType != null)
+ message.valueType = String(object.valueType);
+ switch (object.occurrenceType) {
+ default:
+ if (typeof object.occurrenceType === "number") {
+ message.occurrenceType = object.occurrenceType;
+ break;
+ }
+ break;
+ case "OCCURRENCE_TYPE_UNSPECIFIED":
+ case 0:
+ message.occurrenceType = 0;
+ break;
+ case "OPTIONAL_ONCE":
+ case 1:
+ message.occurrenceType = 1;
+ break;
+ case "OPTIONAL_MULTIPLE":
+ case 2:
+ message.occurrenceType = 2;
+ break;
+ case "REQUIRED_ONCE":
+ case 3:
+ message.occurrenceType = 3;
+ break;
+ case "REQUIRED_MULTIPLE":
+ case 4:
+ message.occurrenceType = 4;
+ break;
}
- if (object.barcode != null) {
- if (typeof object.barcode !== "object")
- throw TypeError(".google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode.barcode: object expected");
- message.barcode = $root.google.cloud.documentai.v1beta3.Barcode.fromObject(object.barcode);
+ if (object.propertyMetadata != null) {
+ if (typeof object.propertyMetadata !== "object")
+ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.propertyMetadata: object expected");
+ message.propertyMetadata = $root.google.cloud.documentai.v1beta3.PropertyMetadata.fromObject(object.propertyMetadata);
}
return message;
};
/**
- * Creates a plain object from a DetectedBarcode message. Also converts values to other types if specified.
+ * Creates a plain object from a Property message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode} message DetectedBarcode
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property} message Property
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- DetectedBarcode.toObject = function toObject(message, options) {
+ Property.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
- object.layout = null;
- object.barcode = null;
+ object.name = "";
+ object.valueType = "";
+ object.occurrenceType = options.enums === String ? "OCCURRENCE_TYPE_UNSPECIFIED" : 0;
+ object.propertyMetadata = null;
}
- if (message.layout != null && message.hasOwnProperty("layout"))
- object.layout = $root.google.cloud.documentai.v1beta3.Document.Page.Layout.toObject(message.layout, options);
- if (message.barcode != null && message.hasOwnProperty("barcode"))
- object.barcode = $root.google.cloud.documentai.v1beta3.Barcode.toObject(message.barcode, options);
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.valueType != null && message.hasOwnProperty("valueType"))
+ object.valueType = message.valueType;
+ if (message.occurrenceType != null && message.hasOwnProperty("occurrenceType"))
+ object.occurrenceType = options.enums === String ? $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType[message.occurrenceType] === undefined ? message.occurrenceType : $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType[message.occurrenceType] : message.occurrenceType;
+ if (message.propertyMetadata != null && message.hasOwnProperty("propertyMetadata"))
+ object.propertyMetadata = $root.google.cloud.documentai.v1beta3.PropertyMetadata.toObject(message.propertyMetadata, options);
return object;
};
/**
- * Converts this DetectedBarcode to JSON.
+ * Converts this Property to JSON.
* @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @instance
* @returns {Object.} JSON object
*/
- DetectedBarcode.prototype.toJSON = function toJSON() {
+ Property.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for DetectedBarcode
+ * Gets the default type url for Property
* @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- DetectedBarcode.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.DetectedBarcode";
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property";
};
- return DetectedBarcode;
- })();
-
- Page.DetectedLanguage = (function() {
-
/**
- * Properties of a DetectedLanguage.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IDetectedLanguage
- * @property {string|null} [languageCode] DetectedLanguage languageCode
- * @property {number|null} [confidence] DetectedLanguage confidence
+ * OccurrenceType enum.
+ * @name google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType
+ * @enum {number}
+ * @property {number} OCCURRENCE_TYPE_UNSPECIFIED=0 OCCURRENCE_TYPE_UNSPECIFIED value
+ * @property {number} OPTIONAL_ONCE=1 OPTIONAL_ONCE value
+ * @property {number} OPTIONAL_MULTIPLE=2 OPTIONAL_MULTIPLE value
+ * @property {number} REQUIRED_ONCE=3 REQUIRED_ONCE value
+ * @property {number} REQUIRED_MULTIPLE=4 REQUIRED_MULTIPLE value
*/
+ Property.OccurrenceType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "OCCURRENCE_TYPE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "OPTIONAL_ONCE"] = 1;
+ values[valuesById[2] = "OPTIONAL_MULTIPLE"] = 2;
+ values[valuesById[3] = "REQUIRED_ONCE"] = 3;
+ values[valuesById[4] = "REQUIRED_MULTIPLE"] = 4;
+ return values;
+ })();
- /**
- * Constructs a new DetectedLanguage.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents a DetectedLanguage.
- * @implements IDetectedLanguage
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage=} [properties] Properties to set
- */
- function DetectedLanguage(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ return Property;
+ })();
- /**
- * DetectedLanguage languageCode.
- * @member {string} languageCode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @instance
- */
- DetectedLanguage.prototype.languageCode = "";
+ return EntityType;
+ })();
- /**
- * DetectedLanguage confidence.
- * @member {number} confidence
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @instance
- */
- DetectedLanguage.prototype.confidence = 0;
+ DocumentSchema.Metadata = (function() {
- /**
- * Creates a new DetectedLanguage instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage} DetectedLanguage instance
- */
- DetectedLanguage.create = function create(properties) {
- return new DetectedLanguage(properties);
- };
+ /**
+ * Properties of a Metadata.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @interface IMetadata
+ * @property {boolean|null} [documentSplitter] Metadata documentSplitter
+ * @property {boolean|null} [documentAllowMultipleLabels] Metadata documentAllowMultipleLabels
+ * @property {boolean|null} [prefixedNamingOnProperties] Metadata prefixedNamingOnProperties
+ * @property {boolean|null} [skipNamingValidation] Metadata skipNamingValidation
+ */
- /**
- * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage} message DetectedLanguage message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DetectedLanguage.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode);
- if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
- writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
- return writer;
- };
+ /**
+ * Constructs a new Metadata.
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema
+ * @classdesc Represents a Metadata.
+ * @implements IMetadata
+ * @constructor
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata=} [properties] Properties to set
+ */
+ function Metadata(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IDetectedLanguage} message DetectedLanguage message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DetectedLanguage.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Metadata documentSplitter.
+ * @member {boolean} documentSplitter
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @instance
+ */
+ Metadata.prototype.documentSplitter = false;
- /**
- * Decodes a DetectedLanguage message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage} DetectedLanguage
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DetectedLanguage.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.languageCode = reader.string();
- break;
- }
- case 2: {
- message.confidence = reader.float();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * Metadata documentAllowMultipleLabels.
+ * @member {boolean} documentAllowMultipleLabels
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @instance
+ */
+ Metadata.prototype.documentAllowMultipleLabels = false;
- /**
- * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage} DetectedLanguage
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DetectedLanguage.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Metadata prefixedNamingOnProperties.
+ * @member {boolean} prefixedNamingOnProperties
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @instance
+ */
+ Metadata.prototype.prefixedNamingOnProperties = false;
- /**
- * Verifies a DetectedLanguage message.
- * @function verify
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- DetectedLanguage.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.languageCode != null && message.hasOwnProperty("languageCode"))
- if (!$util.isString(message.languageCode))
- return "languageCode: string expected";
- if (message.confidence != null && message.hasOwnProperty("confidence"))
- if (typeof message.confidence !== "number")
- return "confidence: number expected";
- return null;
- };
+ /**
+ * Metadata skipNamingValidation.
+ * @member {boolean} skipNamingValidation
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @instance
+ */
+ Metadata.prototype.skipNamingValidation = false;
- /**
- * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage} DetectedLanguage
- */
- DetectedLanguage.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage)
- return object;
- var message = new $root.google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage();
- if (object.languageCode != null)
- message.languageCode = String(object.languageCode);
- if (object.confidence != null)
- message.confidence = Number(object.confidence);
- return message;
- };
+ /**
+ * Creates a new Metadata instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata=} [properties] Properties to set
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.Metadata} Metadata instance
+ */
+ Metadata.create = function create(properties) {
+ return new Metadata(properties);
+ };
- /**
- * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage} message DetectedLanguage
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- DetectedLanguage.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.languageCode = "";
- object.confidence = 0;
- }
- if (message.languageCode != null && message.hasOwnProperty("languageCode"))
- object.languageCode = message.languageCode;
- if (message.confidence != null && message.hasOwnProperty("confidence"))
- object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
- return object;
- };
+ /**
+ * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata} message Metadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Metadata.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.documentSplitter != null && Object.hasOwnProperty.call(message, "documentSplitter"))
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.documentSplitter);
+ if (message.documentAllowMultipleLabels != null && Object.hasOwnProperty.call(message, "documentAllowMultipleLabels"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.documentAllowMultipleLabels);
+ if (message.prefixedNamingOnProperties != null && Object.hasOwnProperty.call(message, "prefixedNamingOnProperties"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prefixedNamingOnProperties);
+ if (message.skipNamingValidation != null && Object.hasOwnProperty.call(message, "skipNamingValidation"))
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.skipNamingValidation);
+ return writer;
+ };
- /**
- * Converts this DetectedLanguage to JSON.
- * @function toJSON
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @instance
- * @returns {Object.} JSON object
- */
- DetectedLanguage.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.DocumentSchema.Metadata.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata} message Metadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Metadata.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Gets the default type url for DetectedLanguage
- * @function getTypeUrl
- * @memberof google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- DetectedLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
+ /**
+ * Decodes a Metadata message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.Metadata} Metadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Metadata.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.documentSplitter = reader.bool();
+ break;
+ }
+ case 2: {
+ message.documentAllowMultipleLabels = reader.bool();
+ break;
+ }
+ case 6: {
+ message.prefixedNamingOnProperties = reader.bool();
+ break;
+ }
+ case 7: {
+ message.skipNamingValidation = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
}
- return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Document.Page.DetectedLanguage";
- };
+ }
+ return message;
+ };
- return DetectedLanguage;
- })();
+ /**
+ * Decodes a Metadata message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.Metadata} Metadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Metadata.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- Page.ImageQualityScores = (function() {
+ /**
+ * Verifies a Metadata message.
+ * @function verify
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Metadata.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.documentSplitter != null && message.hasOwnProperty("documentSplitter"))
+ if (typeof message.documentSplitter !== "boolean")
+ return "documentSplitter: boolean expected";
+ if (message.documentAllowMultipleLabels != null && message.hasOwnProperty("documentAllowMultipleLabels"))
+ if (typeof message.documentAllowMultipleLabels !== "boolean")
+ return "documentAllowMultipleLabels: boolean expected";
+ if (message.prefixedNamingOnProperties != null && message.hasOwnProperty("prefixedNamingOnProperties"))
+ if (typeof message.prefixedNamingOnProperties !== "boolean")
+ return "prefixedNamingOnProperties: boolean expected";
+ if (message.skipNamingValidation != null && message.hasOwnProperty("skipNamingValidation"))
+ if (typeof message.skipNamingValidation !== "boolean")
+ return "skipNamingValidation: boolean expected";
+ return null;
+ };
- /**
- * Properties of an ImageQualityScores.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @interface IImageQualityScores
- * @property {number|null} [qualityScore] ImageQualityScores qualityScore
- * @property {Array.|null} [detectedDefects] ImageQualityScores detectedDefects
- */
+ /**
+ * Creates a Metadata message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.documentai.v1beta3.DocumentSchema.Metadata} Metadata
+ */
+ Metadata.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata)
+ return object;
+ var message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata();
+ if (object.documentSplitter != null)
+ message.documentSplitter = Boolean(object.documentSplitter);
+ if (object.documentAllowMultipleLabels != null)
+ message.documentAllowMultipleLabels = Boolean(object.documentAllowMultipleLabels);
+ if (object.prefixedNamingOnProperties != null)
+ message.prefixedNamingOnProperties = Boolean(object.prefixedNamingOnProperties);
+ if (object.skipNamingValidation != null)
+ message.skipNamingValidation = Boolean(object.skipNamingValidation);
+ return message;
+ };
- /**
- * Constructs a new ImageQualityScores.
- * @memberof google.cloud.documentai.v1beta3.Document.Page
- * @classdesc Represents an ImageQualityScores.
- * @implements IImageQualityScores
- * @constructor
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores=} [properties] Properties to set
- */
- function ImageQualityScores(properties) {
- this.detectedDefects = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
+ /**
+ * Creates a plain object from a Metadata message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {google.cloud.documentai.v1beta3.DocumentSchema.Metadata} message Metadata
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Metadata.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.documentSplitter = false;
+ object.documentAllowMultipleLabels = false;
+ object.prefixedNamingOnProperties = false;
+ object.skipNamingValidation = false;
}
+ if (message.documentSplitter != null && message.hasOwnProperty("documentSplitter"))
+ object.documentSplitter = message.documentSplitter;
+ if (message.documentAllowMultipleLabels != null && message.hasOwnProperty("documentAllowMultipleLabels"))
+ object.documentAllowMultipleLabels = message.documentAllowMultipleLabels;
+ if (message.prefixedNamingOnProperties != null && message.hasOwnProperty("prefixedNamingOnProperties"))
+ object.prefixedNamingOnProperties = message.prefixedNamingOnProperties;
+ if (message.skipNamingValidation != null && message.hasOwnProperty("skipNamingValidation"))
+ object.skipNamingValidation = message.skipNamingValidation;
+ return object;
+ };
- /**
- * ImageQualityScores qualityScore.
- * @member {number} qualityScore
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @instance
- */
- ImageQualityScores.prototype.qualityScore = 0;
+ /**
+ * Converts this Metadata to JSON.
+ * @function toJSON
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Metadata.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * ImageQualityScores detectedDefects.
- * @member {Array.} detectedDefects
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @instance
- */
- ImageQualityScores.prototype.detectedDefects = $util.emptyArray;
+ /**
+ * Gets the default type url for Metadata
+ * @function getTypeUrl
+ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.Metadata
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.documentai.v1beta3.DocumentSchema.Metadata";
+ };
- /**
- * Creates a new ImageQualityScores instance using the specified properties.
- * @function create
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores=} [properties] Properties to set
- * @returns {google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores} ImageQualityScores instance
- */
- ImageQualityScores.create = function create(properties) {
- return new ImageQualityScores(properties);
- };
+ return Metadata;
+ })();
- /**
- * Encodes the specified ImageQualityScores message. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores} message ImageQualityScores message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ImageQualityScores.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.qualityScore != null && Object.hasOwnProperty.call(message, "qualityScore"))
- writer.uint32(/* id 1, wireType 5 =*/13).float(message.qualityScore);
- if (message.detectedDefects != null && message.detectedDefects.length)
- for (var i = 0; i < message.detectedDefects.length; ++i)
- $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.encode(message.detectedDefects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- return writer;
- };
+ return DocumentSchema;
+ })();
- /**
- * Encodes the specified ImageQualityScores message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @static
- * @param {google.cloud.documentai.v1beta3.Document.Page.IImageQualityScores} message ImageQualityScores message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ImageQualityScores.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ v1beta3.Document = (function() {
- /**
- * Decodes an ImageQualityScores message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores} ImageQualityScores
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ImageQualityScores.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.qualityScore = reader.float();
- break;
- }
- case 2: {
- if (!(message.detectedDefects && message.detectedDefects.length))
- message.detectedDefects = [];
- message.detectedDefects.push($root.google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores.DetectedDefect.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an ImageQualityScores message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.documentai.v1beta3.Document.Page.ImageQualityScores} ImageQualityScores
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ImageQualityScores.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Properties of a Document.
+ * @memberof google.cloud.documentai.v1beta3
+ * @interface IDocument
+ * @property {string|null} [uri] Document uri
+ * @property {Uint8Array|null} [content] Document content
+ * @property {string|null} [mimeType] Document mimeType
+ * @property {string|null} [text] Document text
+ * @property {Array.|null} [textStyles] Document textStyles
+ * @property {Array.|null} [pages] Document pages
+ * @property {Array.|null} [entities] Document entities
+ * @property {Array.|null} [entityRelations] Document entityRelations
+ * @property {Array.|null} [textChanges] Document textChanges
+ * @property {google.cloud.documentai.v1beta3.Document.IShardInfo|null} [shardInfo] Document shardInfo
+ * @property {google.rpc.IStatus|null} [error] Document error
+ * @property {Array.