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 ec0958f97c7..02a4cd4bfac 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 2025 Google LLC +// Copyright 2026 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 index 31cb997a761..08321edd64c 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/dataset.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/dataset.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -69,9 +69,6 @@ message Dataset { // 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. @@ -106,14 +103,6 @@ message Dataset { [(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` 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 4560ae86dd3..c803d16bbbd 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.documentai.v1beta3; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/documentai/v1beta3/barcode.proto"; import "google/cloud/documentai/v1beta3/geometry.proto"; import "google/protobuf/timestamp.proto"; @@ -340,7 +341,7 @@ message Document { repeated DetectedLanguage detected_languages = 2; } - // Detected non-text visual elements, for example, checkbox, signature, etc. + // Detected non-text visual elements, for example, checkbox, signature etc. // on the page. message VisualElement { // [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] for @@ -530,7 +531,7 @@ message Document { // A list of visually detected tokens on the page. repeated Token tokens = 8; - // A list of detected non-text visual elements for example, checkbox, + // A list of detected non-text visual elements, for example, checkbox, // signature etc. on the page. repeated VisualElement visual_elements = 9; @@ -628,10 +629,11 @@ message Document { // [Document.text][google.cloud.documentai.v1beta3.Document.text]. TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. Entity type from a schema for example, `Address`. + // Required. Entity type from a schema, for example, `Address`. string type = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Text value of the entity for example, `1600 Amphitheatre Pkwy`. + // Optional. Text value of the entity, for example, `1600 Amphitheatre + // Pkwy`. string mention_text = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Deprecated. Use `id` field instead. @@ -644,7 +646,7 @@ message Document { // the page where it was found. PageAnchor page_anchor = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Canonical ID. This will be a unique value in the entity list + // Optional. Canonical id. This will be a unique value in the entity list // for this document. string id = 7 [(google.api.field_behavior) = OPTIONAL]; @@ -673,10 +675,10 @@ message Document { // Relationship between // [Entities][google.cloud.documentai.v1beta3.Document.Entity]. message EntityRelation { - // Subject entity ID. + // Subject entity id. string subject_id = 1; - // Object entity ID. + // Object entity id. string object_id = 2; // Relationship description. @@ -806,7 +808,7 @@ message Document { // of entities, properties within entities, etc.) in the parent revision. int32 index = 3; - // The ID of the parent provenance. + // The id of the parent provenance. int32 id = 2 [deprecated = true]; } @@ -846,7 +848,7 @@ message Document { // The index of the revision that produced this element. int32 revision = 1 [deprecated = true]; - // The ID of this operation. Needs to be unique within the scope of the + // The Id of this operation. Needs to be unique within the scope of the // revision. int32 id = 2 [deprecated = true]; @@ -871,7 +873,7 @@ message Document { // Who/what made the change oneof source { - // If the change was made by a person specify the name or ID of that + // If the change was made by a person specify the name or id of that // person. string agent = 4; @@ -880,7 +882,7 @@ message Document { string processor = 5; } - // ID of the revision, internally generated by doc proto storage. + // Id of the revision, internally generated by doc proto storage. // Unique within the context of the document. string id = 1; @@ -889,7 +891,7 @@ message Document { // index into the `revisions` field. repeated int32 parent = 2 [deprecated = true]; - // The revisions that this revision is based on. Must include all the IDs + // The revisions that this revision is based on. Must include all the ids // that have anything to do with this revision - eg. there are // `provenance.parent.revision` fields that index into this field. repeated string parent_ids = 7; @@ -1013,18 +1015,18 @@ message Document { message LayoutImageBlock { // Source of the image. oneof image_source { - // Optional. Asset ID of the inline image. If set, find the image + // Optional. Asset id of the inline image. If set, find the image // content in the blob_assets field. string blob_asset_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Google Cloud Storage URI of the image. + // Optional. Google Cloud Storage uri of the image. string gcs_uri = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Data URI of the image. + // Optional. Data uri of the image. // It is composed of four parts: a prefix (data:), a MIME type // indicating the type of data, an optional base64 token if // non-textual, and the data itself: - // data:[][;base64],. + // data:[][;base64], string data_uri = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -1103,18 +1105,18 @@ message Document { message ImageChunkField { // Source of the image. oneof image_source { - // Optional. Asset ID of the inline image. If set, find the image + // Optional. Asset id of the inline image. If set, find the image // content in the blob_assets field. string blob_asset_id = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Google Cloud Storage URI of the image. + // Optional. Google Cloud Storage uri of the image. string gcs_uri = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Data URI of the image. + // Optional. Data uri of the image. // It is composed of four parts: a prefix (data:), a MIME type // indicating the type of data, an optional base64 token if // non-textual, and the data itself: - // data:[][;base64],. + // data:[][;base64], string data_uri = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -1171,7 +1173,7 @@ message Document { // in this document, for example, image bytes, such that it can be referenced // by other fields in the document via asset ID. message BlobAsset { - // Optional. The ID of the blob asset. + // Optional. The id of the blob asset. string asset_id = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The content of the blob asset, for example, image bytes. @@ -1205,7 +1207,7 @@ message Document { VALIDATION_RESULT_TYPE_NOT_APPLICABLE = 4; } - // The name of the validation rule. + // The display name of the validation rule. string rule_name = 1; // The description of the validation rule. @@ -1229,7 +1231,7 @@ message Document { // Entity revision. message EntitiesRevision { - // The revision ID. + // The revision id. string revision_id = 1; // The entities in this revision. @@ -1237,6 +1239,9 @@ message Document { // The entity validation output for this revision. EntityValidationOutput entity_validation_output = 3; + + // Optional. The history of this revision. + Provenance provenance = 4 [(google.api.field_behavior) = OPTIONAL]; } // Original source document from the user. @@ -1320,7 +1325,7 @@ message Document { // The entity revision ID that `document.entities` field is based on. // If this field is set and `entities_revisions` is not empty, the entities in // `document.entities` field are the entities in the entity revision with this - // ID and `document.entity_validation_output` field is the + // id and `document.entity_validation_output` field is the // `entity_validation_output` field in this entity revision. string entities_revision_id = 23; } @@ -1347,7 +1352,7 @@ message RevisionRef { // Reads the revision by the predefined case. RevisionCase revision_case = 1; - // Reads the revision given by the ID. + // Reads the revision given by the id. string revision_id = 2; // Reads the revision generated by the processor version. 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 9de9bb9d5c6..a80f1a95be5 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.documentai.v1beta3; +import "google/cloud/documentai/v1beta3/document.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; @@ -26,6 +27,12 @@ option java_package = "com.google.cloud.documentai.v1beta3"; option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3"; option ruby_package = "Google::Cloud::DocumentAI::V1beta3"; +// A set of inline documents. +message Documents { + // The list of documents. + repeated Document documents = 1; +} + // Payload message of raw document content (bytes). message RawDocument { // Inline document content. @@ -64,6 +71,12 @@ message GcsPrefix { string gcs_uri_prefix = 1; } +// Specifies a set of raw documents. +message RawDocuments { + // Specifies raw document content and mime type. + repeated RawDocument documents = 1; +} + // The common config to specify a set of documents used as input. message BatchDocumentsInputConfig { // The source. Make sure that the caller of the API has storage.objects.get 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 b5b5a3ad246..c3e4c98e4c6 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -286,6 +286,7 @@ service DocumentProcessorService { // the specified processor. rpc ReviewDocument(ReviewDocumentRequest) returns (google.longrunning.Operation) { + option deprecated = true; option (google.api.http) = { post: "/v1beta3/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument" body: "*" @@ -393,6 +394,9 @@ message ProcessOptions { // Optional. Whether to include table annotations in layout parser response. bool enable_table_annotation = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to split table. + bool enable_table_split = 8 [(google.api.field_behavior) = OPTIONAL]; } // A list of individual page numbers. @@ -475,7 +479,7 @@ message ProcessRequest { // Whether human review should be skipped for this request. Default to // `false`. - bool skip_human_review = 3; + bool skip_human_review = 3 [deprecated = true]; // Specifies which fields to include in the // [ProcessResponse.document][google.cloud.documentai.v1beta3.ProcessResponse.document] @@ -614,7 +618,7 @@ message BatchProcessRequest { // Whether human review should be skipped for this request. Default to // `false`. - bool skip_human_review = 4; + bool skip_human_review = 4 [deprecated = true]; // Inference-time options for the process API ProcessOptions process_options = 7; @@ -1458,3 +1462,11 @@ message ImportProcessorVersionMetadata { // The basic metadata for the long-running operation. CommonOperationMetadata common_metadata = 1; } + +// The long-running operation metadata for the +// [UpdateProcessorVersion][google.cloud.documentai.v1beta3.DocumentProcessorService.UpdateProcessorVersion] +// method. +message UpdateProcessorVersionMetadata { + // 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 637bb999716..8539769f467 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.documentai.v1beta3; +import "google/api/field_behavior.proto"; + option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb"; option java_multiple_files = true; @@ -100,9 +102,9 @@ message DocumentSchema { // For example, a bank statement might only have one // `account_number`, but this account number can be mentioned in several // places on the document. In this case, the `account_number` is - // 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 is set to + // considered a `REQUIRED_ONCE` entity type. If, on the other hand, it's + // expected that a bank statement contains the status of multiple + // different accounts for the customers, the occurrence type is set to // `REQUIRED_MULTIPLE`. enum OccurrenceType { // Unspecified occurrence type. @@ -166,7 +168,7 @@ message DocumentSchema { oneof value_source { // If specified, lists all the possible values for this entity. This // should not be more than a handful of values. If the number of values - // is >10 or could change frequently use the `EntityType.value_ontology` + // is >10 or could change frequently, use the `EntityType.value_ontology` // field and specify a list of all possible values in a value ontology // file. EnumValues enum_values = 14; @@ -183,7 +185,7 @@ message DocumentSchema { // - 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 + // compatibility, internal infrastructure and tooling can handle any ASCII // 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 @@ -219,13 +221,13 @@ message DocumentSchema { // If set, all the nested entities must be prefixed with the parents. bool prefixed_naming_on_properties = 6; - // If set, we will skip the naming format validation in the schema. So the + // If set, this will skip the naming format validation in the schema. So the // string values in `DocumentSchema.EntityType.name` and // `DocumentSchema.EntityType.Property.name` will not be checked. bool skip_naming_validation = 7; } - // Display name to show to users. + // Display name to show users. string display_name = 1; // Description of the schema. @@ -236,4 +238,9 @@ message DocumentSchema { // Metadata of the schema. Metadata metadata = 4; + + // Optional. Document level prompt provided by the user. This custom text is + // injected into the AI model's prompt to provide extra, document-wide + // guidance for processing. + string document_prompt = 5 [(google.api.field_behavior) = OPTIONAL]; } 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 index e794c99d715..91cc4f9c80c 100644 --- 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 @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -190,6 +190,13 @@ message ImportDocumentsRequest { // The common config to specify a set of documents used as input. BatchDocumentsInputConfig batch_input_config = 1; + + // Optional. If set, determines the type of the documents to be imported in + // this batch. It can be used to auto-label the documents with a single + // entity of the provided type. This field can only be used with a + // classifier or splitter processor. Providing this field is mutually + // exclusive with `entities` and `auto_labeling_config`. + string document_type = 6 [(google.api.field_behavior) = OPTIONAL]; } // Required. The dataset resource name. 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 da1189e7b88..6f60de0536e 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -77,7 +77,7 @@ message Evaluation { // The calculated recall. float recall = 2; - // The calculated f1 score. + // The calculated F1 score. float f1_score = 3; // The amount of occurrences in predicted documents. @@ -157,6 +157,23 @@ message Evaluation { MetricsType metrics_type = 7; } + // A revision of the evaluation. + message EvaluationRevision { + // Output only. The revision ID of the evaluation. + string revision_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Counters for the documents used in the evaluation. + Counters document_counters = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metrics for all the entities in aggregate. + MultiConfidenceMetrics all_entities_metrics = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metrics across confidence levels, for different entities. + map entity_metrics = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // The resource name of the evaluation. // Format: // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` @@ -179,4 +196,7 @@ message Evaluation { // The KMS key version with which data is encrypted. string kms_key_version_name = 7; + + // Contains all revisions of the evaluation, excluding the latest one. + repeated EvaluationRevision revisions = 9; } 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 21bd4ae0fce..3febecc8f97 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 2025 Google LLC +// Copyright 2026 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 de0e127ac05..1d6fa007ae1 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 2025 Google LLC +// Copyright 2026 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 b7bebd3b9fa..36d95318cf3 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -56,11 +56,11 @@ message ProcessorVersion { message GenAiModelInfo { // Information for a pretrained Google-managed foundation model. message FoundationGenAiModelInfo { - // Whether finetuning is allowed for this base processor version. + // Whether fine tuning is allowed for this base processor version. bool finetuning_allowed = 1; // The minimum number of labeled documents in the training dataset - // required for finetuning. + // required for fine tuning. int32 min_train_labeled_documents = 2; } 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 989b6e6c0de..5ca013e43e9 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 2025 Google LLC +// Copyright 2026 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/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts index aa31aa840a2..9f1f13615f2 100644 --- a/packages/google-cloud-documentai/protos/protos.d.ts +++ b/packages/google-cloud-documentai/protos/protos.d.ts @@ -17300,9 +17300,6 @@ export namespace google { /** Dataset unmanagedDatasetConfig */ unmanagedDatasetConfig?: (google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig|null); - /** Dataset spannerIndexingConfig */ - spannerIndexingConfig?: (google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null); - /** Dataset name */ name?: (string|null); @@ -17334,9 +17331,6 @@ export namespace google { /** Dataset unmanagedDatasetConfig. */ public unmanagedDatasetConfig?: (google.cloud.documentai.v1beta3.Dataset.IUnmanagedDatasetConfig|null); - /** Dataset spannerIndexingConfig. */ - public spannerIndexingConfig?: (google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null); - /** Dataset name. */ public name: string; @@ -17352,9 +17346,6 @@ export namespace google { /** Dataset storageSource. */ public storageSource?: ("gcsManagedConfig"|"documentWarehouseConfig"|"unmanagedDatasetConfig"); - /** Dataset indexingSource. */ - public indexingSource?: "spannerIndexingConfig"; - /** * Creates a new Dataset instance using the specified properties. * @param [properties] Properties to set @@ -17726,97 +17717,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SpannerIndexingConfig. */ - interface ISpannerIndexingConfig { - } - - /** Represents a SpannerIndexingConfig. */ - class SpannerIndexingConfig implements ISpannerIndexingConfig { - - /** - * Constructs a new SpannerIndexingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig); - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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); - - /** - * 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; - - /** - * 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 }; - - /** - * Converts this SpannerIndexingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - /** State enum. */ enum State { STATE_UNSPECIFIED = 0, @@ -25419,6 +25319,9 @@ export namespace google { /** EntitiesRevision entityValidationOutput */ entityValidationOutput?: (google.cloud.documentai.v1beta3.Document.IEntityValidationOutput|null); + + /** EntitiesRevision provenance */ + provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null); } /** Represents an EntitiesRevision. */ @@ -25439,6 +25342,9 @@ export namespace google { /** EntitiesRevision entityValidationOutput. */ public entityValidationOutput?: (google.cloud.documentai.v1beta3.Document.IEntityValidationOutput|null); + /** EntitiesRevision provenance. */ + public provenance?: (google.cloud.documentai.v1beta3.Document.IProvenance|null); + /** * Creates a new EntitiesRevision instance using the specified properties. * @param [properties] Properties to set @@ -25950,6 +25856,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Documents. */ + interface IDocuments { + + /** Documents documents */ + documents?: (google.cloud.documentai.v1beta3.IDocument[]|null); + } + + /** Represents a Documents. */ + class Documents implements IDocuments { + + /** + * Constructs a new Documents. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1beta3.IDocuments); + + /** Documents documents. */ + public documents: google.cloud.documentai.v1beta3.IDocument[]; + + /** + * Creates a new Documents instance using the specified properties. + * @param [properties] Properties to set + * @returns Documents instance + */ + public static create(properties?: google.cloud.documentai.v1beta3.IDocuments): google.cloud.documentai.v1beta3.Documents; + + /** + * Encodes the specified Documents message. Does not implicitly {@link google.cloud.documentai.v1beta3.Documents.verify|verify} messages. + * @param message Documents message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1beta3.IDocuments, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Documents message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Documents.verify|verify} messages. + * @param message Documents message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1beta3.IDocuments, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Documents message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Documents + * @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.Documents; + + /** + * Decodes a Documents message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Documents + * @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.Documents; + + /** + * Verifies a Documents 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 Documents message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Documents + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Documents; + + /** + * Creates a plain object from a Documents message. Also converts values to other types if specified. + * @param message Documents + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1beta3.Documents, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Documents to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Documents + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RawDocument. */ interface IRawDocument { @@ -26356,6 +26359,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a RawDocuments. */ + interface IRawDocuments { + + /** RawDocuments documents */ + documents?: (google.cloud.documentai.v1beta3.IRawDocument[]|null); + } + + /** Represents a RawDocuments. */ + class RawDocuments implements IRawDocuments { + + /** + * Constructs a new RawDocuments. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1beta3.IRawDocuments); + + /** RawDocuments documents. */ + public documents: google.cloud.documentai.v1beta3.IRawDocument[]; + + /** + * Creates a new RawDocuments instance using the specified properties. + * @param [properties] Properties to set + * @returns RawDocuments instance + */ + public static create(properties?: google.cloud.documentai.v1beta3.IRawDocuments): google.cloud.documentai.v1beta3.RawDocuments; + + /** + * Encodes the specified RawDocuments message. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocuments.verify|verify} messages. + * @param message RawDocuments message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1beta3.IRawDocuments, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RawDocuments message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocuments.verify|verify} messages. + * @param message RawDocuments message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1beta3.IRawDocuments, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RawDocuments message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RawDocuments + * @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.RawDocuments; + + /** + * Decodes a RawDocuments message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RawDocuments + * @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.RawDocuments; + + /** + * Verifies a RawDocuments 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 RawDocuments message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RawDocuments + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.RawDocuments; + + /** + * Creates a plain object from a RawDocuments message. Also converts values to other types if specified. + * @param message RawDocuments + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1beta3.RawDocuments, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RawDocuments to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RawDocuments + * @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 { @@ -27560,6 +27660,9 @@ export namespace google { /** DocumentSchema metadata */ metadata?: (google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null); + + /** DocumentSchema documentPrompt */ + documentPrompt?: (string|null); } /** Represents a DocumentSchema. */ @@ -27583,6 +27686,9 @@ export namespace google { /** DocumentSchema metadata. */ public metadata?: (google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null); + /** DocumentSchema documentPrompt. */ + public documentPrompt: string; + /** * Creates a new DocumentSchema instance using the specified properties. * @param [properties] Properties to set @@ -28829,6 +28935,9 @@ export namespace google { /** LayoutConfig enableTableAnnotation */ enableTableAnnotation?: (boolean|null); + + /** LayoutConfig enableTableSplit */ + enableTableSplit?: (boolean|null); } /** Represents a LayoutConfig. */ @@ -28861,6 +28970,9 @@ export namespace google { /** LayoutConfig enableTableAnnotation. */ public enableTableAnnotation: boolean; + /** LayoutConfig enableTableSplit. */ + public enableTableSplit: boolean; + /** * Creates a new LayoutConfig instance using the specified properties. * @param [properties] Properties to set @@ -35463,6 +35575,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UpdateProcessorVersionMetadata. */ + interface IUpdateProcessorVersionMetadata { + + /** UpdateProcessorVersionMetadata commonMetadata */ + commonMetadata?: (google.cloud.documentai.v1beta3.ICommonOperationMetadata|null); + } + + /** Represents an UpdateProcessorVersionMetadata. */ + class UpdateProcessorVersionMetadata implements IUpdateProcessorVersionMetadata { + + /** + * Constructs a new UpdateProcessorVersionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata); + + /** UpdateProcessorVersionMetadata commonMetadata. */ + public commonMetadata?: (google.cloud.documentai.v1beta3.ICommonOperationMetadata|null); + + /** + * Creates a new UpdateProcessorVersionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateProcessorVersionMetadata instance + */ + public static create(properties?: google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata): google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata; + + /** + * Encodes the specified UpdateProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata.verify|verify} messages. + * @param message UpdateProcessorVersionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata.verify|verify} messages. + * @param message UpdateProcessorVersionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateProcessorVersionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateProcessorVersionMetadata + * @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.UpdateProcessorVersionMetadata; + + /** + * Decodes an UpdateProcessorVersionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateProcessorVersionMetadata + * @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.UpdateProcessorVersionMetadata; + + /** + * Verifies an UpdateProcessorVersionMetadata 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 UpdateProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateProcessorVersionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata; + + /** + * Creates a plain object from an UpdateProcessorVersionMetadata message. Also converts values to other types if specified. + * @param message UpdateProcessorVersionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateProcessorVersionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateProcessorVersionMetadata + * @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 { @@ -35601,6 +35810,9 @@ export namespace google { /** Evaluation kmsKeyVersionName */ kmsKeyVersionName?: (string|null); + + /** Evaluation revisions */ + revisions?: (google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision[]|null); } /** Represents an Evaluation. */ @@ -35633,6 +35845,9 @@ export namespace google { /** Evaluation kmsKeyVersionName. */ public kmsKeyVersionName: string; + /** Evaluation revisions. */ + public revisions: google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision[]; + /** * Creates a new Evaluation instance using the specified properties. * @param [properties] Properties to set @@ -36229,6 +36444,121 @@ export namespace google { AGGREGATE = 1 } } + + /** Properties of an EvaluationRevision. */ + interface IEvaluationRevision { + + /** EvaluationRevision revisionId */ + revisionId?: (string|null); + + /** EvaluationRevision documentCounters */ + documentCounters?: (google.cloud.documentai.v1beta3.Evaluation.ICounters|null); + + /** EvaluationRevision allEntitiesMetrics */ + allEntitiesMetrics?: (google.cloud.documentai.v1beta3.Evaluation.IMultiConfidenceMetrics|null); + + /** EvaluationRevision entityMetrics */ + entityMetrics?: ({ [k: string]: google.cloud.documentai.v1beta3.Evaluation.IMultiConfidenceMetrics }|null); + } + + /** Represents an EvaluationRevision. */ + class EvaluationRevision implements IEvaluationRevision { + + /** + * Constructs a new EvaluationRevision. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision); + + /** EvaluationRevision revisionId. */ + public revisionId: string; + + /** EvaluationRevision documentCounters. */ + public documentCounters?: (google.cloud.documentai.v1beta3.Evaluation.ICounters|null); + + /** EvaluationRevision allEntitiesMetrics. */ + public allEntitiesMetrics?: (google.cloud.documentai.v1beta3.Evaluation.IMultiConfidenceMetrics|null); + + /** EvaluationRevision entityMetrics. */ + public entityMetrics: { [k: string]: google.cloud.documentai.v1beta3.Evaluation.IMultiConfidenceMetrics }; + + /** + * Creates a new EvaluationRevision instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluationRevision instance + */ + public static create(properties?: google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision): google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision; + + /** + * Encodes the specified EvaluationRevision message. Does not implicitly {@link google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.verify|verify} messages. + * @param message EvaluationRevision message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluationRevision message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.verify|verify} messages. + * @param message EvaluationRevision message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluationRevision message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluationRevision + * @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.Evaluation.EvaluationRevision; + + /** + * Decodes an EvaluationRevision message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluationRevision + * @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.Evaluation.EvaluationRevision; + + /** + * Verifies an EvaluationRevision 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 EvaluationRevision message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluationRevision + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision; + + /** + * Creates a plain object from an EvaluationRevision message. Also converts values to other types if specified. + * @param message EvaluationRevision + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluationRevision to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluationRevision + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a CommonOperationMetadata. */ @@ -38002,6 +38332,9 @@ export namespace google { /** BatchDocumentsImportConfig batchInputConfig */ batchInputConfig?: (google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig|null); + + /** BatchDocumentsImportConfig documentType */ + documentType?: (string|null); } /** Represents a BatchDocumentsImportConfig. */ @@ -38022,6 +38355,9 @@ export namespace google { /** BatchDocumentsImportConfig batchInputConfig. */ public batchInputConfig?: (google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig|null); + /** BatchDocumentsImportConfig documentType. */ + public documentType: string; + /** BatchDocumentsImportConfig splitTypeConfig. */ public splitTypeConfig?: ("datasetSplit"|"autoSplitConfig"); diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js index 5e7b120a570..3ff43c29245 100644 --- a/packages/google-cloud-documentai/protos/protos.js +++ b/packages/google-cloud-documentai/protos/protos.js @@ -42954,7 +42954,6 @@ * @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 * @property {boolean|null} [satisfiesPzs] Dataset satisfiesPzs @@ -43000,14 +42999,6 @@ */ Dataset.prototype.unmanagedDatasetConfig = null; - /** - * Dataset spannerIndexingConfig. - * @member {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig|null|undefined} spannerIndexingConfig - * @memberof google.cloud.documentai.v1beta3.Dataset - * @instance - */ - Dataset.prototype.spannerIndexingConfig = null; - /** * Dataset name. * @member {string} name @@ -43054,17 +43045,6 @@ set: $util.oneOfSetter($oneOfFields) }); - /** - * Dataset indexingSource. - * @member {"spannerIndexingConfig"|undefined} indexingSource - * @memberof google.cloud.documentai.v1beta3.Dataset - * @instance - */ - Object.defineProperty(Dataset.prototype, "indexingSource", { - get: $util.oneOfGetter($oneOfFields = ["spannerIndexingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** * Creates a new Dataset instance using the specified properties. * @function create @@ -43095,8 +43075,6 @@ 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")) @@ -43153,10 +43131,6 @@ message.unmanagedDatasetConfig = $root.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig.decode(reader, reader.uint32()); break; } - case 4: { - message.spannerIndexingConfig = $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.decode(reader, reader.uint32()); - break; - } case 1: { message.name = reader.string(); break; @@ -43237,14 +43211,6 @@ return "unmanagedDatasetConfig." + error; } } - 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 "spannerIndexingConfig." + error; - } - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -43294,11 +43260,6 @@ 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.name != null) message.name = String(object.name); switch (object.state) { @@ -43360,11 +43321,6 @@ if (options.oneofs) object.storageSource = "gcsManagedConfig"; } - if (message.spannerIndexingConfig != null && message.hasOwnProperty("spannerIndexingConfig")) { - object.spannerIndexingConfig = $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig.toObject(message.spannerIndexingConfig, options); - if (options.oneofs) - object.indexingSource = "spannerIndexingConfig"; - } if (message.documentWarehouseConfig != null && message.hasOwnProperty("documentWarehouseConfig")) { object.documentWarehouseConfig = $root.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig.toObject(message.documentWarehouseConfig, options); if (options.oneofs) @@ -44024,183 +43980,6 @@ return UnmanagedDatasetConfig; })(); - Dataset.SpannerIndexingConfig = (function() { - - /** - * Properties of a SpannerIndexingConfig. - * @memberof google.cloud.documentai.v1beta3.Dataset - * @interface ISpannerIndexingConfig - */ - - /** - * 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 - */ - 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]]; - } - - /** - * Creates a new SpannerIndexingConfig instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig - * @static - * @param {google.cloud.documentai.v1beta3.Dataset.ISpannerIndexingConfig=} [properties] Properties to set - * @returns {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} SpannerIndexingConfig instance - */ - SpannerIndexingConfig.create = function create(properties) { - return new SpannerIndexingConfig(properties); - }; - - /** - * 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.Dataset.SpannerIndexingConfig - * @static - * @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 - */ - SpannerIndexingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * 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.Dataset.SpannerIndexingConfig - * @static - * @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 - */ - SpannerIndexingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SpannerIndexingConfig message from the specified reader or buffer. - * @function decode - * @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.Dataset.SpannerIndexingConfig} SpannerIndexingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpannerIndexingConfig.decode = function decode(reader, length, error) { - 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.SpannerIndexingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SpannerIndexingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - SpannerIndexingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SpannerIndexingConfig message. - * @function verify - * @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 - */ - SpannerIndexingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SpannerIndexingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} SpannerIndexingConfig - */ - SpannerIndexingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig) - return object; - return new $root.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig(); - }; - - /** - * Creates a plain object from a SpannerIndexingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig - * @static - * @param {google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig} message SpannerIndexingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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"; - } - return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig"; - }; - - return SpannerIndexingConfig; - })(); - /** * State enum. * @name google.cloud.documentai.v1beta3.Dataset.State @@ -64209,6 +63988,7 @@ * @property {string|null} [revisionId] EntitiesRevision revisionId * @property {Array.|null} [entities] EntitiesRevision entities * @property {google.cloud.documentai.v1beta3.Document.IEntityValidationOutput|null} [entityValidationOutput] EntitiesRevision entityValidationOutput + * @property {google.cloud.documentai.v1beta3.Document.IProvenance|null} [provenance] EntitiesRevision provenance */ /** @@ -64251,6 +64031,14 @@ */ EntitiesRevision.prototype.entityValidationOutput = null; + /** + * EntitiesRevision provenance. + * @member {google.cloud.documentai.v1beta3.Document.IProvenance|null|undefined} provenance + * @memberof google.cloud.documentai.v1beta3.Document.EntitiesRevision + * @instance + */ + EntitiesRevision.prototype.provenance = null; + /** * Creates a new EntitiesRevision instance using the specified properties. * @function create @@ -64282,6 +64070,8 @@ $root.google.cloud.documentai.v1beta3.Document.Entity.encode(message.entities[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.entityValidationOutput != null && Object.hasOwnProperty.call(message, "entityValidationOutput")) $root.google.cloud.documentai.v1beta3.Document.EntityValidationOutput.encode(message.entityValidationOutput, 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; }; @@ -64332,6 +64122,10 @@ message.entityValidationOutput = $root.google.cloud.documentai.v1beta3.Document.EntityValidationOutput.decode(reader, reader.uint32()); break; } + case 4: { + message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -64384,6 +64178,11 @@ if (error) return "entityValidationOutput." + 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; }; @@ -64416,6 +64215,11 @@ throw TypeError(".google.cloud.documentai.v1beta3.Document.EntitiesRevision.entityValidationOutput: object expected"); message.entityValidationOutput = $root.google.cloud.documentai.v1beta3.Document.EntityValidationOutput.fromObject(object.entityValidationOutput); } + if (object.provenance != null) { + if (typeof object.provenance !== "object") + throw TypeError(".google.cloud.documentai.v1beta3.Document.EntitiesRevision.provenance: object expected"); + message.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.fromObject(object.provenance); + } return message; }; @@ -64437,6 +64241,7 @@ if (options.defaults) { object.revisionId = ""; object.entityValidationOutput = null; + object.provenance = null; } if (message.revisionId != null && message.hasOwnProperty("revisionId")) object.revisionId = message.revisionId; @@ -64447,6 +64252,8 @@ } if (message.entityValidationOutput != null && message.hasOwnProperty("entityValidationOutput")) object.entityValidationOutput = $root.google.cloud.documentai.v1beta3.Document.EntityValidationOutput.toObject(message.entityValidationOutput, options); + if (message.provenance != null && message.hasOwnProperty("provenance")) + object.provenance = $root.google.cloud.documentai.v1beta3.Document.Provenance.toObject(message.provenance, options); return object; }; @@ -65539,6 +65346,232 @@ return BoundingPoly; })(); + v1beta3.Documents = (function() { + + /** + * Properties of a Documents. + * @memberof google.cloud.documentai.v1beta3 + * @interface IDocuments + * @property {Array.|null} [documents] Documents documents + */ + + /** + * Constructs a new Documents. + * @memberof google.cloud.documentai.v1beta3 + * @classdesc Represents a Documents. + * @implements IDocuments + * @constructor + * @param {google.cloud.documentai.v1beta3.IDocuments=} [properties] Properties to set + */ + function Documents(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]]; + } + + /** + * Documents documents. + * @member {Array.} documents + * @memberof google.cloud.documentai.v1beta3.Documents + * @instance + */ + Documents.prototype.documents = $util.emptyArray; + + /** + * Creates a new Documents instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {google.cloud.documentai.v1beta3.IDocuments=} [properties] Properties to set + * @returns {google.cloud.documentai.v1beta3.Documents} Documents instance + */ + Documents.create = function create(properties) { + return new Documents(properties); + }; + + /** + * Encodes the specified Documents message. Does not implicitly {@link google.cloud.documentai.v1beta3.Documents.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {google.cloud.documentai.v1beta3.IDocuments} message Documents message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documents.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.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Documents message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Documents.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {google.cloud.documentai.v1beta3.IDocuments} message Documents message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documents.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Documents message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1beta3.Documents + * @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.Documents} Documents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documents.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Documents(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.documentai.v1beta3.Document.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Documents message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1beta3.Documents} Documents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documents.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Documents message. + * @function verify + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Documents.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.Document.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + return null; + }; + + /** + * Creates a Documents message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1beta3.Documents} Documents + */ + Documents.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1beta3.Documents) + return object; + var message = new $root.google.cloud.documentai.v1beta3.Documents(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.documentai.v1beta3.Documents.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.Documents.documents: object expected"); + message.documents[i] = $root.google.cloud.documentai.v1beta3.Document.fromObject(object.documents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Documents message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {google.cloud.documentai.v1beta3.Documents} message Documents + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Documents.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.Document.toObject(message.documents[j], options); + } + return object; + }; + + /** + * Converts this Documents to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1beta3.Documents + * @instance + * @returns {Object.} JSON object + */ + Documents.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Documents + * @function getTypeUrl + * @memberof google.cloud.documentai.v1beta3.Documents + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Documents.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Documents"; + }; + + return Documents; + })(); + v1beta3.RawDocument = (function() { /** @@ -66460,6 +66493,232 @@ return GcsPrefix; })(); + v1beta3.RawDocuments = (function() { + + /** + * Properties of a RawDocuments. + * @memberof google.cloud.documentai.v1beta3 + * @interface IRawDocuments + * @property {Array.|null} [documents] RawDocuments documents + */ + + /** + * Constructs a new RawDocuments. + * @memberof google.cloud.documentai.v1beta3 + * @classdesc Represents a RawDocuments. + * @implements IRawDocuments + * @constructor + * @param {google.cloud.documentai.v1beta3.IRawDocuments=} [properties] Properties to set + */ + function RawDocuments(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]]; + } + + /** + * RawDocuments documents. + * @member {Array.} documents + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @instance + */ + RawDocuments.prototype.documents = $util.emptyArray; + + /** + * Creates a new RawDocuments instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {google.cloud.documentai.v1beta3.IRawDocuments=} [properties] Properties to set + * @returns {google.cloud.documentai.v1beta3.RawDocuments} RawDocuments instance + */ + RawDocuments.create = function create(properties) { + return new RawDocuments(properties); + }; + + /** + * Encodes the specified RawDocuments message. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocuments.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {google.cloud.documentai.v1beta3.IRawDocuments} message RawDocuments message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RawDocuments.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.RawDocument.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RawDocuments message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.RawDocuments.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {google.cloud.documentai.v1beta3.IRawDocuments} message RawDocuments message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RawDocuments.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RawDocuments message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @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.RawDocuments} RawDocuments + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RawDocuments.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.RawDocuments(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.documentai.v1beta3.RawDocument.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RawDocuments message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1beta3.RawDocuments} RawDocuments + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RawDocuments.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RawDocuments message. + * @function verify + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RawDocuments.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.RawDocument.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + return null; + }; + + /** + * Creates a RawDocuments message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1beta3.RawDocuments} RawDocuments + */ + RawDocuments.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1beta3.RawDocuments) + return object; + var message = new $root.google.cloud.documentai.v1beta3.RawDocuments(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.documentai.v1beta3.RawDocuments.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.RawDocuments.documents: object expected"); + message.documents[i] = $root.google.cloud.documentai.v1beta3.RawDocument.fromObject(object.documents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RawDocuments message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {google.cloud.documentai.v1beta3.RawDocuments} message RawDocuments + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RawDocuments.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.RawDocument.toObject(message.documents[j], options); + } + return object; + }; + + /** + * Converts this RawDocuments to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @instance + * @returns {Object.} JSON object + */ + RawDocuments.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RawDocuments + * @function getTypeUrl + * @memberof google.cloud.documentai.v1beta3.RawDocuments + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RawDocuments.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1beta3.RawDocuments"; + }; + + return RawDocuments; + })(); + v1beta3.BatchDocumentsInputConfig = (function() { /** @@ -69286,6 +69545,7 @@ * @property {string|null} [description] DocumentSchema description * @property {Array.|null} [entityTypes] DocumentSchema entityTypes * @property {google.cloud.documentai.v1beta3.DocumentSchema.IMetadata|null} [metadata] DocumentSchema metadata + * @property {string|null} [documentPrompt] DocumentSchema documentPrompt */ /** @@ -69336,6 +69596,14 @@ */ DocumentSchema.prototype.metadata = null; + /** + * DocumentSchema documentPrompt. + * @member {string} documentPrompt + * @memberof google.cloud.documentai.v1beta3.DocumentSchema + * @instance + */ + DocumentSchema.prototype.documentPrompt = ""; + /** * Creates a new DocumentSchema instance using the specified properties. * @function create @@ -69369,6 +69637,8 @@ $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(); + if (message.documentPrompt != null && Object.hasOwnProperty.call(message, "documentPrompt")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.documentPrompt); return writer; }; @@ -69423,6 +69693,10 @@ message.metadata = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.decode(reader, reader.uint32()); break; } + case 5: { + message.documentPrompt = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -69478,6 +69752,9 @@ if (error) return "metadata." + error; } + if (message.documentPrompt != null && message.hasOwnProperty("documentPrompt")) + if (!$util.isString(message.documentPrompt)) + return "documentPrompt: string expected"; return null; }; @@ -69512,6 +69789,8 @@ throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.metadata: object expected"); message.metadata = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.fromObject(object.metadata); } + if (object.documentPrompt != null) + message.documentPrompt = String(object.documentPrompt); return message; }; @@ -69534,6 +69813,7 @@ object.displayName = ""; object.description = ""; object.metadata = null; + object.documentPrompt = ""; } if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; @@ -69546,6 +69826,8 @@ } if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = $root.google.cloud.documentai.v1beta3.DocumentSchema.Metadata.toObject(message.metadata, options); + if (message.documentPrompt != null && message.hasOwnProperty("documentPrompt")) + object.documentPrompt = message.documentPrompt; return object; }; @@ -72107,6 +72389,7 @@ * @property {boolean|null} [enableImageExtraction] LayoutConfig enableImageExtraction * @property {boolean|null} [enableLlmLayoutParsing] LayoutConfig enableLlmLayoutParsing * @property {boolean|null} [enableTableAnnotation] LayoutConfig enableTableAnnotation + * @property {boolean|null} [enableTableSplit] LayoutConfig enableTableSplit */ /** @@ -72180,6 +72463,14 @@ */ LayoutConfig.prototype.enableTableAnnotation = false; + /** + * LayoutConfig enableTableSplit. + * @member {boolean} enableTableSplit + * @memberof google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + * @instance + */ + LayoutConfig.prototype.enableTableSplit = false; + /** * Creates a new LayoutConfig instance using the specified properties. * @function create @@ -72218,6 +72509,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enableTableAnnotation); if (message.enableImageExtraction != null && Object.hasOwnProperty.call(message, "enableImageExtraction")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableImageExtraction); + if (message.enableTableSplit != null && Object.hasOwnProperty.call(message, "enableTableSplit")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableTableSplit); return writer; }; @@ -72282,6 +72575,10 @@ message.enableTableAnnotation = reader.bool(); break; } + case 8: { + message.enableTableSplit = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -72340,6 +72637,9 @@ if (message.enableTableAnnotation != null && message.hasOwnProperty("enableTableAnnotation")) if (typeof message.enableTableAnnotation !== "boolean") return "enableTableAnnotation: boolean expected"; + if (message.enableTableSplit != null && message.hasOwnProperty("enableTableSplit")) + if (typeof message.enableTableSplit !== "boolean") + return "enableTableSplit: boolean expected"; return null; }; @@ -72372,6 +72672,8 @@ message.enableLlmLayoutParsing = Boolean(object.enableLlmLayoutParsing); if (object.enableTableAnnotation != null) message.enableTableAnnotation = Boolean(object.enableTableAnnotation); + if (object.enableTableSplit != null) + message.enableTableSplit = Boolean(object.enableTableSplit); return message; }; @@ -72396,6 +72698,7 @@ object.enableLlmLayoutParsing = false; object.enableTableAnnotation = false; object.enableImageExtraction = false; + object.enableTableSplit = false; } if (message.chunkingConfig != null && message.hasOwnProperty("chunkingConfig")) object.chunkingConfig = $root.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.toObject(message.chunkingConfig, options); @@ -72411,6 +72714,8 @@ object.enableTableAnnotation = message.enableTableAnnotation; if (message.enableImageExtraction != null && message.hasOwnProperty("enableImageExtraction")) object.enableImageExtraction = message.enableImageExtraction; + if (message.enableTableSplit != null && message.hasOwnProperty("enableTableSplit")) + object.enableTableSplit = message.enableTableSplit; return object; }; @@ -87653,6 +87958,216 @@ return ImportProcessorVersionMetadata; })(); + v1beta3.UpdateProcessorVersionMetadata = (function() { + + /** + * Properties of an UpdateProcessorVersionMetadata. + * @memberof google.cloud.documentai.v1beta3 + * @interface IUpdateProcessorVersionMetadata + * @property {google.cloud.documentai.v1beta3.ICommonOperationMetadata|null} [commonMetadata] UpdateProcessorVersionMetadata commonMetadata + */ + + /** + * Constructs a new UpdateProcessorVersionMetadata. + * @memberof google.cloud.documentai.v1beta3 + * @classdesc Represents an UpdateProcessorVersionMetadata. + * @implements IUpdateProcessorVersionMetadata + * @constructor + * @param {google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata=} [properties] Properties to set + */ + function UpdateProcessorVersionMetadata(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]]; + } + + /** + * UpdateProcessorVersionMetadata commonMetadata. + * @member {google.cloud.documentai.v1beta3.ICommonOperationMetadata|null|undefined} commonMetadata + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @instance + */ + UpdateProcessorVersionMetadata.prototype.commonMetadata = null; + + /** + * Creates a new UpdateProcessorVersionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata=} [properties] Properties to set + * @returns {google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata} UpdateProcessorVersionMetadata instance + */ + UpdateProcessorVersionMetadata.create = function create(properties) { + return new UpdateProcessorVersionMetadata(properties); + }; + + /** + * Encodes the specified UpdateProcessorVersionMetadata message. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata} message UpdateProcessorVersionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProcessorVersionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commonMetadata != null && Object.hasOwnProperty.call(message, "commonMetadata")) + $root.google.cloud.documentai.v1beta3.CommonOperationMetadata.encode(message.commonMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateProcessorVersionMetadata message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1beta3.IUpdateProcessorVersionMetadata} message UpdateProcessorVersionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProcessorVersionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateProcessorVersionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @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.UpdateProcessorVersionMetadata} UpdateProcessorVersionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProcessorVersionMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.commonMetadata = $root.google.cloud.documentai.v1beta3.CommonOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateProcessorVersionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata} UpdateProcessorVersionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProcessorVersionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateProcessorVersionMetadata message. + * @function verify + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateProcessorVersionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) { + var error = $root.google.cloud.documentai.v1beta3.CommonOperationMetadata.verify(message.commonMetadata); + if (error) + return "commonMetadata." + error; + } + return null; + }; + + /** + * Creates an UpdateProcessorVersionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata} UpdateProcessorVersionMetadata + */ + UpdateProcessorVersionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata) + return object; + var message = new $root.google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata(); + if (object.commonMetadata != null) { + if (typeof object.commonMetadata !== "object") + throw TypeError(".google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata.commonMetadata: object expected"); + message.commonMetadata = $root.google.cloud.documentai.v1beta3.CommonOperationMetadata.fromObject(object.commonMetadata); + } + return message; + }; + + /** + * Creates a plain object from an UpdateProcessorVersionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata} message UpdateProcessorVersionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateProcessorVersionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.commonMetadata = null; + if (message.commonMetadata != null && message.hasOwnProperty("commonMetadata")) + object.commonMetadata = $root.google.cloud.documentai.v1beta3.CommonOperationMetadata.toObject(message.commonMetadata, options); + return object; + }; + + /** + * Converts this UpdateProcessorVersionMetadata to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateProcessorVersionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateProcessorVersionMetadata + * @function getTypeUrl + * @memberof google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateProcessorVersionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1beta3.UpdateProcessorVersionMetadata"; + }; + + return UpdateProcessorVersionMetadata; + })(); + v1beta3.EvaluationReference = (function() { /** @@ -87951,6 +88466,7 @@ * @property {Object.|null} [entityMetrics] Evaluation entityMetrics * @property {string|null} [kmsKeyName] Evaluation kmsKeyName * @property {string|null} [kmsKeyVersionName] Evaluation kmsKeyVersionName + * @property {Array.|null} [revisions] Evaluation revisions */ /** @@ -87963,6 +88479,7 @@ */ function Evaluation(properties) { this.entityMetrics = {}; + this.revisions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88025,6 +88542,14 @@ */ Evaluation.prototype.kmsKeyVersionName = ""; + /** + * Evaluation revisions. + * @member {Array.} revisions + * @memberof google.cloud.documentai.v1beta3.Evaluation + * @instance + */ + Evaluation.prototype.revisions = $util.emptyArray; + /** * Creates a new Evaluation instance using the specified properties. * @function create @@ -88066,6 +88591,9 @@ writer.uint32(/* id 6, wireType 2 =*/50).string(message.kmsKeyName); if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.kmsKeyVersionName); + if (message.revisions != null && message.revisions.length) + for (var i = 0; i < message.revisions.length; ++i) + $root.google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.encode(message.revisions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -88149,6 +88677,12 @@ message.kmsKeyVersionName = reader.string(); break; } + case 9: { + if (!(message.revisions && message.revisions.length)) + message.revisions = []; + message.revisions.push($root.google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -88218,6 +88752,15 @@ if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; + 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.Evaluation.EvaluationRevision.verify(message.revisions[i]); + if (error) + return "revisions." + error; + } + } return null; }; @@ -88264,6 +88807,16 @@ message.kmsKeyName = String(object.kmsKeyName); if (object.kmsKeyVersionName != null) message.kmsKeyVersionName = String(object.kmsKeyVersionName); + if (object.revisions) { + if (!Array.isArray(object.revisions)) + throw TypeError(".google.cloud.documentai.v1beta3.Evaluation.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.Evaluation.revisions: object expected"); + message.revisions[i] = $root.google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.fromObject(object.revisions[i]); + } + } return message; }; @@ -88280,6 +88833,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.revisions = []; if (options.objects || options.defaults) object.entityMetrics = {}; if (options.defaults) { @@ -88308,6 +88863,11 @@ object.kmsKeyName = message.kmsKeyName; if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; + 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.Evaluation.EvaluationRevision.toObject(message.revisions[j], options); + } return object; }; @@ -89703,6 +90263,334 @@ return MultiConfidenceMetrics; })(); + Evaluation.EvaluationRevision = (function() { + + /** + * Properties of an EvaluationRevision. + * @memberof google.cloud.documentai.v1beta3.Evaluation + * @interface IEvaluationRevision + * @property {string|null} [revisionId] EvaluationRevision revisionId + * @property {google.cloud.documentai.v1beta3.Evaluation.ICounters|null} [documentCounters] EvaluationRevision documentCounters + * @property {google.cloud.documentai.v1beta3.Evaluation.IMultiConfidenceMetrics|null} [allEntitiesMetrics] EvaluationRevision allEntitiesMetrics + * @property {Object.|null} [entityMetrics] EvaluationRevision entityMetrics + */ + + /** + * Constructs a new EvaluationRevision. + * @memberof google.cloud.documentai.v1beta3.Evaluation + * @classdesc Represents an EvaluationRevision. + * @implements IEvaluationRevision + * @constructor + * @param {google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision=} [properties] Properties to set + */ + function EvaluationRevision(properties) { + this.entityMetrics = {}; + 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]]; + } + + /** + * EvaluationRevision revisionId. + * @member {string} revisionId + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @instance + */ + EvaluationRevision.prototype.revisionId = ""; + + /** + * EvaluationRevision documentCounters. + * @member {google.cloud.documentai.v1beta3.Evaluation.ICounters|null|undefined} documentCounters + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @instance + */ + EvaluationRevision.prototype.documentCounters = null; + + /** + * EvaluationRevision allEntitiesMetrics. + * @member {google.cloud.documentai.v1beta3.Evaluation.IMultiConfidenceMetrics|null|undefined} allEntitiesMetrics + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @instance + */ + EvaluationRevision.prototype.allEntitiesMetrics = null; + + /** + * EvaluationRevision entityMetrics. + * @member {Object.} entityMetrics + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @instance + */ + EvaluationRevision.prototype.entityMetrics = $util.emptyObject; + + /** + * Creates a new EvaluationRevision instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision=} [properties] Properties to set + * @returns {google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision} EvaluationRevision instance + */ + EvaluationRevision.create = function create(properties) { + return new EvaluationRevision(properties); + }; + + /** + * Encodes the specified EvaluationRevision message. Does not implicitly {@link google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision} message EvaluationRevision message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluationRevision.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.revisionId); + if (message.documentCounters != null && Object.hasOwnProperty.call(message, "documentCounters")) + $root.google.cloud.documentai.v1beta3.Evaluation.Counters.encode(message.documentCounters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allEntitiesMetrics != null && Object.hasOwnProperty.call(message, "allEntitiesMetrics")) + $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.encode(message.allEntitiesMetrics, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.entityMetrics != null && Object.hasOwnProperty.call(message, "entityMetrics")) + for (var keys = Object.keys(message.entityMetrics), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.encode(message.entityMetrics[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified EvaluationRevision message, length delimited. Does not implicitly {@link google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {google.cloud.documentai.v1beta3.Evaluation.IEvaluationRevision} message EvaluationRevision message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluationRevision.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluationRevision message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @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.Evaluation.EvaluationRevision} EvaluationRevision + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluationRevision.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.revisionId = reader.string(); + break; + } + case 2: { + message.documentCounters = $root.google.cloud.documentai.v1beta3.Evaluation.Counters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allEntitiesMetrics = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.entityMetrics === $util.emptyObject) + message.entityMetrics = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.entityMetrics[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluationRevision message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision} EvaluationRevision + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluationRevision.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluationRevision message. + * @function verify + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluationRevision.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.documentCounters != null && message.hasOwnProperty("documentCounters")) { + var error = $root.google.cloud.documentai.v1beta3.Evaluation.Counters.verify(message.documentCounters); + if (error) + return "documentCounters." + error; + } + if (message.allEntitiesMetrics != null && message.hasOwnProperty("allEntitiesMetrics")) { + var error = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.verify(message.allEntitiesMetrics); + if (error) + return "allEntitiesMetrics." + error; + } + if (message.entityMetrics != null && message.hasOwnProperty("entityMetrics")) { + if (!$util.isObject(message.entityMetrics)) + return "entityMetrics: object expected"; + var key = Object.keys(message.entityMetrics); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.verify(message.entityMetrics[key[i]]); + if (error) + return "entityMetrics." + error; + } + } + return null; + }; + + /** + * Creates an EvaluationRevision message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision} EvaluationRevision + */ + EvaluationRevision.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision) + return object; + var message = new $root.google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision(); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.documentCounters != null) { + if (typeof object.documentCounters !== "object") + throw TypeError(".google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.documentCounters: object expected"); + message.documentCounters = $root.google.cloud.documentai.v1beta3.Evaluation.Counters.fromObject(object.documentCounters); + } + if (object.allEntitiesMetrics != null) { + if (typeof object.allEntitiesMetrics !== "object") + throw TypeError(".google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.allEntitiesMetrics: object expected"); + message.allEntitiesMetrics = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.fromObject(object.allEntitiesMetrics); + } + if (object.entityMetrics) { + if (typeof object.entityMetrics !== "object") + throw TypeError(".google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.entityMetrics: object expected"); + message.entityMetrics = {}; + for (var keys = Object.keys(object.entityMetrics), i = 0; i < keys.length; ++i) { + if (typeof object.entityMetrics[keys[i]] !== "object") + throw TypeError(".google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision.entityMetrics: object expected"); + message.entityMetrics[keys[i]] = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.fromObject(object.entityMetrics[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvaluationRevision message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision} message EvaluationRevision + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluationRevision.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.entityMetrics = {}; + if (options.defaults) { + object.revisionId = ""; + object.documentCounters = null; + object.allEntitiesMetrics = null; + } + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.documentCounters != null && message.hasOwnProperty("documentCounters")) + object.documentCounters = $root.google.cloud.documentai.v1beta3.Evaluation.Counters.toObject(message.documentCounters, options); + if (message.allEntitiesMetrics != null && message.hasOwnProperty("allEntitiesMetrics")) + object.allEntitiesMetrics = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.toObject(message.allEntitiesMetrics, options); + var keys2; + if (message.entityMetrics && (keys2 = Object.keys(message.entityMetrics)).length) { + object.entityMetrics = {}; + for (var j = 0; j < keys2.length; ++j) + object.entityMetrics[keys2[j]] = $root.google.cloud.documentai.v1beta3.Evaluation.MultiConfidenceMetrics.toObject(message.entityMetrics[keys2[j]], options); + } + return object; + }; + + /** + * Converts this EvaluationRevision to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @instance + * @returns {Object.} JSON object + */ + EvaluationRevision.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluationRevision + * @function getTypeUrl + * @memberof google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluationRevision.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1beta3.Evaluation.EvaluationRevision"; + }; + + return EvaluationRevision; + })(); + return Evaluation; })(); @@ -94134,6 +95022,7 @@ * @property {google.cloud.documentai.v1beta3.DatasetSplitType|null} [datasetSplit] BatchDocumentsImportConfig datasetSplit * @property {google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.IAutoSplitConfig|null} [autoSplitConfig] BatchDocumentsImportConfig autoSplitConfig * @property {google.cloud.documentai.v1beta3.IBatchDocumentsInputConfig|null} [batchInputConfig] BatchDocumentsImportConfig batchInputConfig + * @property {string|null} [documentType] BatchDocumentsImportConfig documentType */ /** @@ -94175,6 +95064,14 @@ */ BatchDocumentsImportConfig.prototype.batchInputConfig = null; + /** + * BatchDocumentsImportConfig documentType. + * @member {string} documentType + * @memberof google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig + * @instance + */ + BatchDocumentsImportConfig.prototype.documentType = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -94219,6 +95116,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.datasetSplit); if (message.autoSplitConfig != null && Object.hasOwnProperty.call(message, "autoSplitConfig")) $root.google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.AutoSplitConfig.encode(message.autoSplitConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.documentType); return writer; }; @@ -94267,6 +95166,10 @@ message.batchInputConfig = $root.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.decode(reader, reader.uint32()); break; } + case 6: { + message.documentType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -94330,6 +95233,9 @@ if (error) return "batchInputConfig." + error; } + if (message.documentType != null && message.hasOwnProperty("documentType")) + if (!$util.isString(message.documentType)) + return "documentType: string expected"; return null; }; @@ -94379,6 +95285,8 @@ throw TypeError(".google.cloud.documentai.v1beta3.ImportDocumentsRequest.BatchDocumentsImportConfig.batchInputConfig: object expected"); message.batchInputConfig = $root.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.fromObject(object.batchInputConfig); } + if (object.documentType != null) + message.documentType = String(object.documentType); return message; }; @@ -94395,8 +95303,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.batchInputConfig = null; + object.documentType = ""; + } if (message.batchInputConfig != null && message.hasOwnProperty("batchInputConfig")) object.batchInputConfig = $root.google.cloud.documentai.v1beta3.BatchDocumentsInputConfig.toObject(message.batchInputConfig, options); if (message.datasetSplit != null && message.hasOwnProperty("datasetSplit")) { @@ -94409,6 +95319,8 @@ if (options.oneofs) object.splitTypeConfig = "autoSplitConfig"; } + if (message.documentType != null && message.hasOwnProperty("documentType")) + object.documentType = message.documentType; return object; }; diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index ac4054e0574..439c727fdc6 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -3862,11 +3862,6 @@ "documentWarehouseConfig", "unmanagedDatasetConfig" ] - }, - "indexingSource": { - "oneof": [ - "spannerIndexingConfig" - ] } }, "fields": { @@ -3892,13 +3887,6 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "spannerIndexingConfig": { - "type": "SpannerIndexingConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, "name": { "type": "string", "id": 1 @@ -3959,9 +3947,6 @@ "UnmanagedDatasetConfig": { "fields": {} }, - "SpannerIndexingConfig": { - "fields": {} - }, "State": { "values": { "STATE_UNSPECIFIED": 0, @@ -5660,6 +5645,13 @@ "entityValidationOutput": { "type": "EntityValidationOutput", "id": 3 + }, + "provenance": { + "type": "Provenance", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } } @@ -5738,6 +5730,15 @@ } } }, + "Documents": { + "fields": { + "documents": { + "rule": "repeated", + "type": "Document", + "id": 1 + } + } + }, "RawDocument": { "fields": { "content": { @@ -5783,6 +5784,15 @@ } } }, + "RawDocuments": { + "fields": { + "documents": { + "rule": "repeated", + "type": "RawDocument", + "id": 1 + } + } + }, "BatchDocumentsInputConfig": { "oneofs": { "source": { @@ -5992,6 +6002,13 @@ "metadata": { "type": "Metadata", "id": 4 + }, + "documentPrompt": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -6543,6 +6560,7 @@ "requestType": "ReviewDocumentRequest", "responseType": "google.longrunning.Operation", "options": { + "deprecated": true, "(google.api.http).post": "/v1beta3/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument", "(google.api.http).body": "*", "(google.api.method_signature)": "human_review_config", @@ -6550,6 +6568,9 @@ "(google.longrunning.operation_info).metadata_type": "ReviewDocumentOperationMetadata" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1beta3/{human_review_config=projects/*/locations/*/processors/*/humanReviewConfig}:reviewDocument", @@ -6754,6 +6775,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "enableTableSplit": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -6845,7 +6873,10 @@ }, "skipHumanReview": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "deprecated": true + } }, "fieldMask": { "type": "google.protobuf.FieldMask", @@ -6953,7 +6984,10 @@ }, "skipHumanReview": { "type": "bool", - "id": 4 + "id": 4, + "options": { + "deprecated": true + } }, "processOptions": { "type": "ProcessOptions", @@ -7824,6 +7858,14 @@ } } }, + "UpdateProcessorVersionMetadata": { + "fields": { + "commonMetadata": { + "type": "CommonOperationMetadata", + "id": 1 + } + } + }, "EvaluationReference": { "fields": { "operation": { @@ -7881,6 +7923,11 @@ "kmsKeyVersionName": { "type": "string", "id": 7 + }, + "revisions": { + "rule": "repeated", + "type": "EvaluationRevision", + "id": 9 } }, "nested": { @@ -8005,6 +8052,39 @@ } } } + }, + "EvaluationRevision": { + "fields": { + "revisionId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "documentCounters": { + "type": "Counters", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "allEntitiesMetrics": { + "type": "MultiConfidenceMetrics", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "entityMetrics": { + "keyType": "string", + "type": "MultiConfidenceMetrics", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } } } }, @@ -8641,6 +8721,13 @@ "batchInputConfig": { "type": "BatchDocumentsInputConfig", "id": 1 + }, + "documentType": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { diff --git a/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts b/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts index 42465cc099d..3af96b9c5a9 100644 --- a/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts +++ b/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts @@ -2264,6 +2264,7 @@ export class DocumentProcessorServiceClient { * for more details and examples. * @example include:samples/generated/v1beta3/document_processor_service.review_document.js * region_tag:documentai_v1beta3_generated_DocumentProcessorService_ReviewDocument_async + * @deprecated ReviewDocument is deprecated and may be removed in a future version. */ reviewDocument( request?: protos.google.cloud.documentai.v1beta3.IReviewDocumentRequest, @@ -2317,6 +2318,7 @@ export class DocumentProcessorServiceClient { 'human_review_config': request.humanReviewConfig ?? '', }); this.initialize().catch(err => {throw err}); + this.warn('DEP$DocumentProcessorService-$ReviewDocument','ReviewDocument is deprecated and may be removed in a future version.', 'DeprecationWarning'); const wrappedCallback: Callback< LROperation, protos.google.longrunning.IOperation|null|undefined, @@ -2346,8 +2348,10 @@ export class DocumentProcessorServiceClient { * for more details and examples. * @example include:samples/generated/v1beta3/document_processor_service.review_document.js * region_tag:documentai_v1beta3_generated_DocumentProcessorService_ReviewDocument_async + * @deprecated ReviewDocument is deprecated and may be removed in a future version. */ async checkReviewDocumentProgress(name: string): Promise>{ + this.warn('DEP$DocumentProcessorService-$checkReviewDocumentProgress','checkReviewDocumentProgress is deprecated and may be removed in a future version.', 'DeprecationWarning'); this._log.info('reviewDocument long-running'); const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); const [operation] = await this.operationsClient.getOperation(request); diff --git a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts index 4bf1678d650..693ad00eb7b 100644 --- a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts +++ b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts @@ -2423,6 +2423,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() @@ -2437,6 +2438,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { client.innerApiCalls.reviewDocument = stubLongRunningCall(expectedResponse); const [operation] = await client.reviewDocument(request); const [response] = await operation.promise(); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.reviewDocument as SinonStub) .getCall(0).args[0]; @@ -2451,6 +2453,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() @@ -2478,6 +2481,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); const operation = await promise as LROperation; const [response] = await operation.promise(); + assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); const actualRequest = (client.innerApiCalls.reviewDocument as SinonStub) .getCall(0).args[0]; @@ -2492,6 +2496,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() @@ -2503,6 +2508,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { const expectedError = new Error('expected'); client.innerApiCalls.reviewDocument = stubLongRunningCall(undefined, expectedError); await assert.rejects(client.reviewDocument(request), expectedError); + assert(stub.calledOnce); const actualRequest = (client.innerApiCalls.reviewDocument as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); @@ -2516,6 +2522,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() @@ -2528,6 +2535,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { client.innerApiCalls.reviewDocument = stubLongRunningCall(undefined, undefined, expectedError); const [operation] = await client.reviewDocument(request); await assert.rejects(operation.promise(), expectedError); + assert(stub.calledOnce); const actualRequest = (client.innerApiCalls.reviewDocument as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); @@ -2541,6 +2549,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2551,6 +2560,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = await client.checkReviewDocumentProgress(expectedResponse.name); + assert(stub.calledOnce); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); @@ -2561,11 +2571,13 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + const stub = sinon.stub(client, 'warn'); await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); await assert.rejects(client.checkReviewDocumentProgress(''), expectedError); + assert(stub.calledOnce); assert((client.operationsClient.getOperation as SinonStub) .getCall(0)); });