UNPKG

googleapis

Version:
1,231 lines 177 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace documentai_v1beta2 { export interface Options extends GlobalOptions { version: 'v1beta2'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Cloud Document AI API * * Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML. * * @example * ```js * const {google} = require('googleapis'); * const documentai = google.documentai('v1beta2'); * ``` */ export class Documentai { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Metadata of the auto-labeling documents operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * The list of individual auto-labeling statuses of the dataset documents. */ individualAutoLabelStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus[]; /** * Total number of the auto-labeling documents. */ totalDocumentCount?: number | null; } /** * The status of individual documents in the auto-labeling process. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus { /** * The gcs_uri of the auto-labeling document, which uniquely identifies a dataset document. */ gcsUri?: string | null; /** * The status of the document auto-labeling. */ status?: Schema$GoogleRpcStatus; } /** * The response proto of AutoLabelDocuments method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse { } export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * Total number of documents that failed to be deleted in storage. */ errorDocumentCount?: number | null; /** * The list of response details of each document. */ individualBatchDeleteStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus[]; /** * Total number of documents deleting from dataset. */ totalDocumentCount?: number | null; } /** * The status of each individual document in the batch delete process. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus { /** * The document id of the document. */ documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId; /** * The status of deleting the document in storage. */ status?: Schema$GoogleRpcStatus; } /** * Response of the delete documents operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse { } export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * The destination dataset split type. */ destDatasetType?: string | null; /** * The destination dataset split type. */ destSplitType?: string | null; /** * The list of response details of each document. */ individualBatchMoveStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus[]; } /** * The status of each individual document in the batch move process. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus { /** * The document id of the document. */ documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId; /** * The status of moving the document. */ status?: Schema$GoogleRpcStatus; } /** * Response of the batch move documents operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsResponse { } /** * The common metadata for long running operations. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata { /** * The creation time of the operation. */ createTime?: string | null; /** * A related resource to this operation. */ resource?: string | null; /** * The state of the operation. */ state?: string | null; /** * A message providing more details about the current state of processing. */ stateMessage?: string | null; /** * The last update time of the operation. */ updateTime?: string | null; } /** * The long-running operation metadata for the CreateLabelerPool method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for DeleteLabelerPool. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for the DeleteProcessor method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for the DeleteProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for the DeployProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the DeployProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionResponse { } /** * The long-running operation metadata for the DisableProcessor method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the DisableProcessor method. Intentionally empty proto for adding fields in future. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse { } /** * Document Identifier. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DocumentId { /** * A document id within user-managed Cloud Storage. */ gcsManagedDocId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId; /** * Points to a specific revision of the document if set. */ revisionRef?: Schema$GoogleCloudDocumentaiUiv1beta3RevisionRef; /** * A document id within unmanaged dataset. */ unmanagedDocId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId; } /** * Identifies a document uniquely within the scope of a dataset in the user-managed Cloud Storage option. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId { /** * Id of the document (indexed) managed by Content Warehouse. */ cwDocId?: string | null; /** * Required. The Cloud Storage URI where the actual document is stored. */ gcsUri?: string | null; } /** * Identifies a document uniquely within the scope of a dataset in unmanaged option. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId { /** * Required. The id of the document. */ docId?: string | null; } /** * The long-running operation metadata for the EnableProcessor method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the EnableProcessor method. Intentionally empty proto for adding fields in future. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse { } /** * Metadata of the EvaluateProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response of the EvaluateProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse { /** * The resource name of the created evaluation. */ evaluation?: string | null; } /** * Metadata of the batch export documents operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * The list of response details of each document. */ individualExportStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus[]; /** * The list of statistics for each dataset split type. */ splitExportStats?: Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat[]; } /** * The status of each individual document in the export process. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus { /** * The path to source docproto of the document. */ documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId; /** * The output_gcs_destination of the exported document if it was successful, otherwise empty. */ outputGcsDestination?: string | null; /** * The status of the exporting of the document. */ status?: Schema$GoogleRpcStatus; } /** * The statistic representing a dataset split type for this export. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat { /** * The dataset split type. */ splitType?: string | null; /** * Total number of documents with the given dataset split type to be exported. */ totalDocumentCount?: number | null; } /** * The response proto of ExportDocuments method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsResponse { } /** * Metadata message associated with the ExportProcessorVersion operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata { /** * The common metadata about the operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message associated with the ExportProcessorVersion operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse { /** * The Cloud Storage URI containing the output artifacts. */ gcsUri?: string | null; } /** * Metadata of the import document operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * Validation statuses of the batch documents import config. */ importConfigValidationResults?: Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult[]; /** * The list of response details of each document. */ individualImportStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus[]; /** * Total number of the documents that are qualified for importing. */ totalDocumentCount?: number | null; } /** * The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult { /** * The source Cloud Storage URI specified in the import config. */ inputGcsSource?: string | null; /** * The validation status of import config. */ status?: Schema$GoogleRpcStatus; } /** * The status of each individual document in the import process. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus { /** * The source Cloud Storage URI of the document. */ inputGcsSource?: string | null; /** * The document id of imported document if it was successful, otherwise empty. */ outputDocumentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId; /** * The output_gcs_destination of the processed document if it was successful, otherwise empty. */ outputGcsDestination?: string | null; /** * The status of the importing of the document. */ status?: Schema$GoogleRpcStatus; } /** * Response of the import document operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse { } /** * The long-running operation metadata for the ImportProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata { /** * The basic metadata for the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The response message for the ImportProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse { /** * The destination processor version name. */ processorVersion?: string | null; } /** * The metadata proto of ResyncDataset method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * The list of dataset resync statuses. Not checked when `dataset_documents` is specified in ResyncRequest. */ datasetResyncStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus[]; /** * The list of document resync statuses. The same document could have multiple `individual_document_resync_statuses` if it has multiple inconsistencies. */ individualDocumentResyncStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus[]; } /** * Resync status against inconsistency types on the dataset level. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus { /** * The type of the inconsistency of the dataset. */ datasetInconsistencyType?: string | null; /** * The status of resyncing the dataset with regards to the detected inconsistency. Empty if `validate_only` is true in the request. */ status?: Schema$GoogleRpcStatus; } /** * Resync status for each document per inconsistency type. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus { /** * The document identifier. */ documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId; /** * The type of document inconsistency. */ documentInconsistencyType?: string | null; /** * The status of resyncing the document with regards to the detected inconsistency. Empty if `validate_only` is true in the request. */ status?: Schema$GoogleRpcStatus; } /** * The response proto of ResyncDataset method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse { } /** * The revision reference specifies which revision on the document to read. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3RevisionRef { /** * Reads the revision generated by the processor version. The format takes the full resource name of processor version. `projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\}` */ latestProcessorVersion?: string | null; /** * Reads the revision by the predefined case. */ revisionCase?: string | null; /** * Reads the revision given by the id. */ revisionId?: string | null; } /** * Metadata of the sample documents operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response of the sample documents operation. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse { /** * The status of sampling documents in test split. */ sampleTestStatus?: Schema$GoogleRpcStatus; /** * The status of sampling documents in training split. */ sampleTrainingStatus?: Schema$GoogleRpcStatus; /** * The result of the sampling process. */ selectedDocuments?: Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument[]; } export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument { /** * An internal identifier for document. */ documentId?: string | null; } /** * The long-running operation metadata for the SetDefaultProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the SetDefaultProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse { } /** * The metadata that represents a processor version being created. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * The test dataset validation information. */ testDatasetValidation?: Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation; /** * The training dataset validation information. */ trainingDatasetValidation?: Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation; } /** * The dataset validation information. This includes any and all errors with documents and the dataset. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation { /** * The total number of dataset errors. */ datasetErrorCount?: number | null; /** * Error information for the dataset as a whole. A maximum of 10 dataset errors will be returned. A single dataset error is terminal for training. */ datasetErrors?: Schema$GoogleRpcStatus[]; /** * The total number of document errors. */ documentErrorCount?: number | null; /** * Error information pertaining to specific documents. A maximum of 10 document errors will be returned. Any document with errors will not be used throughout training. */ documentErrors?: Schema$GoogleRpcStatus[]; } /** * The response for TrainProcessorVersion. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse { /** * The resource name of the processor version produced by training. */ processorVersion?: string | null; } /** * The long-running operation metadata for the UndeployProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the UndeployProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse { } export interface Schema$GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for updating the human review configuration. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for UpdateLabelerPool. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata { /** * The basic metadata of the long-running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long-running operation metadata for BatchProcessDocuments. */ export interface Schema$GoogleCloudDocumentaiV1BatchProcessMetadata { /** * The creation time of the operation. */ createTime?: string | null; /** * The list of response details of each document. */ individualProcessStatuses?: Schema$GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus[]; /** * The state of the current batch processing. */ state?: string | null; /** * A message providing more details about the current state of processing. For example, the error message if the operation is failed. */ stateMessage?: string | null; /** * The last update time of the operation. */ updateTime?: string | null; } /** * The status of a each individual document in the batch process. */ export interface Schema$GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus { /** * The status of human review on the processed document. */ humanReviewStatus?: Schema$GoogleCloudDocumentaiV1HumanReviewStatus; /** * The source of the document, same as the input_gcs_source field in the request when the batch process started. */ inputGcsSource?: string | null; /** * The Cloud Storage output destination (in the request as DocumentOutputConfig.GcsOutputConfig.gcs_uri) of the processed document if it was successful, otherwise empty. */ outputGcsDestination?: string | null; /** * The status processing the document. */ status?: Schema$GoogleRpcStatus; } /** * Response message for BatchProcessDocuments. */ export interface Schema$GoogleCloudDocumentaiV1BatchProcessResponse { } /** * Encodes the detailed information of a barcode. */ export interface Schema$GoogleCloudDocumentaiV1beta1Barcode { /** * Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. */ format?: string | null; /** * Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. */ rawValue?: string | null; /** * Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. */ valueFormat?: string | null; } /** * Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete. */ export interface Schema$GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse { /** * Responses for each individual document. */ responses?: Schema$GoogleCloudDocumentaiV1beta1ProcessDocumentResponse[]; } /** * A bounding polygon for the detected image annotation. */ export interface Schema$GoogleCloudDocumentaiV1beta1BoundingPoly { /** * The bounding polygon normalized vertices. */ normalizedVertices?: Schema$GoogleCloudDocumentaiV1beta1NormalizedVertex[]; /** * The bounding polygon vertices. */ vertices?: Schema$GoogleCloudDocumentaiV1beta1Vertex[]; } /** * Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. */ export interface Schema$GoogleCloudDocumentaiV1beta1Document { /** * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** * A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries. */ entities?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntity[]; /** * Placeholder. Relationship among Document.entities. */ entityRelations?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntityRelation[]; /** * Any error that occurred while processing this document. */ error?: Schema$GoogleRpcStatus; /** * An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml). */ mimeType?: string | null; /** * Visual page layout for the Document. */ pages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPage[]; /** * Placeholder. Revision history of this document. */ revisions?: Schema$GoogleCloudDocumentaiV1beta1DocumentRevision[]; /** * Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified. */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta1DocumentShardInfo; /** * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** * Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other. */ textChanges?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextChange[]; /** * Styles for the Document.text. */ textStyles?: Schema$GoogleCloudDocumentaiV1beta1DocumentStyle[]; /** * Optional. Currently supports Google Cloud Storage URI of the form `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). */ uri?: string | null; } /** * An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentEntity { /** * Optional. Confidence of detected Schema entity. Range `[0, 1]`. */ confidence?: number | null; /** * Optional. Canonical id. This will be a unique value in the entity list for this document. */ id?: string | null; /** * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** * Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** * Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types. */ normalizedValue?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue; /** * Optional. Represents the provenance of this entity wrt. the location on the page where it was found. */ pageAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchor; /** * Optional. Entities can be nested to form a hierarchical data structure representing the content in the document. */ properties?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntity[]; /** * Optional. The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; /** * Optional. Whether the entity will be redacted for de-identification purposes. */ redacted?: boolean | null; /** * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; /** * Required. Entity type from a schema e.g. `Address`. */ type?: string | null; } /** * Parsed and normalized entity value. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue { /** * Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto */ addressValue?: Schema$GoogleTypePostalAddress; /** * Boolean value. Can be used for entities with binary values, or for checkboxes. */ booleanValue?: boolean | null; /** * DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto */ datetimeValue?: Schema$GoogleTypeDateTime; /** * Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto */ dateValue?: Schema$GoogleTypeDate; /** * Float value. */ floatValue?: number | null; /** * Integer value. */ integerValue?: number | null; /** * Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto */ moneyValue?: Schema$GoogleTypeMoney; /** * Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format. */ text?: string | null; } /** * Relationship between Entities. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentEntityRelation { /** * Object entity id. */ objectId?: string | null; /** * Relationship description. */ relation?: string | null; /** * Subject entity id. */ subjectId?: string | null; } /** * A page in a Document. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPage { /** * A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation. */ blocks?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageBlock[]; /** * A list of detected barcodes. */ detectedBarcodes?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode[]; /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Physical dimension of the page. */ dimension?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDimension; /** * A list of visually detected form fields on the page. */ formFields?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageFormField[]; /** * Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned. */ image?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageImage; /** * Image quality scores. */ imageQualityScores?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores; /** * Layout for the page. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line. */ lines?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLine[]; /** * 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing. */ pageNumber?: number | null; /** * A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph. */ paragraphs?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageParagraph[]; /** * The history of this page. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; /** * A list of visually detected symbols on the page. */ symbols?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageSymbol[]; /** * A list of visually detected tables on the page. */ tables?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageTable[]; /** * A list of visually detected tokens on the page. */ tokens?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageToken[]; /** * Transformation matrices that were applied to the original document image to produce Page.image. */ transforms?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageMatrix[]; /** * A list of detected non-text visual elements e.g. checkbox, signature etc. on the page. */ visualElements?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageVisualElement[]; } /** * Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchor { /** * One or more references to visual page elements */ pageRefs?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef[]; } /** * Represents a weak reference to a page element within a document. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef { /** * Optional. Identifies the bounding polygon of a layout element on the page. */ boundingPoly?: Schema$GoogleCloudDocumentaiV1beta1BoundingPoly; /** * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. */ confidence?: number | null; /** * Optional. Deprecated. Use PageRef.bounding_poly instead. */ layoutId?: string | null; /** * Optional. The type of the layout element that is being referenced if any. */ layoutType?: string | null; /** * Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json. */ page?: string | null; } /** * A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageBlock { /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for Block. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; } /** * A detected barcode. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode { /** * Detailed barcode information of the DetectedBarcode. */ barcode?: Schema$GoogleCloudDocumentaiV1beta1Barcode; /** * Layout for DetectedBarcode. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; } /** * Detected language for a structural component. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage { /** * Confidence of detected language. Range `[0, 1]`. */ confidence?: number | null; /** * The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`. */ languageCode?: string | null; } /** * Dimension for the page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageDimension { /** * Page height. */ height?: number | null; /** * Dimension unit. */ unit?: string | null; /** * Page width. */ width?: number | null; } /** * A form field detected on the page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageFormField { /** * Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction. */ correctedKeyText?: string | null; /** * Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction. */ correctedValueText?: string | null; /** * Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. */ fieldName?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * Layout for the FormField value. */ fieldValue?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * A list of detected languages for name together with confidence. */ nameDetectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; /** * A list of detected languages for value together with confidence. */ valueDetectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox` */ valueType?: string | null; } /** * Rendered image contents for this page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageImage { /** * Raw byte content of the image. */ content?: string | null; /** * Height of the image in pixels. */ height?: number | null; /** * Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image. */ mimeType?: string | null; /** * Width of the image in pixels. */ width?: number | null; } /** * Image quality scores for the page image. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores { /** * A list of detected defects. */ detectedDefects?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect[]; /** * The overall quality score. Range `[0, 1]` where `1` is perfect quality. */ qualityScore?: number | null; } /** * Image Quality Defects */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect { /** * Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists. */ confidence?: number | null; /** * Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare` */ type?: string | null; } /** * Visual element describing a layout unit on a page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout { /** * The bounding polygon for the Layout. */ boundingPoly?: Schema$GoogleCloudDocumentaiV1beta1BoundingPoly; /** * Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`. */ confidence?: number | null; /** * Detected orientation for the Layout. */ orientation?: string | null; /** * Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; } /** * A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageLine { /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for Line. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; } /** * Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageMatrix { /** * Number of columns in the matrix. */ c