google-cloud-document_ai-v1 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +1490 -58
- data/lib/google/cloud/document_ai/v1/document_processor_service/paths.rb +38 -0
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/barcode_pb.rb +24 -0
- data/lib/google/cloud/documentai/v1/document_pb.rb +12 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +140 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +34 -0
- data/lib/google/cloud/documentai/v1/document_schema_pb.rb +60 -0
- data/lib/google/cloud/documentai/v1/operation_metadata_pb.rb +1 -0
- data/lib/google/cloud/documentai/v1/processor_pb.rb +71 -0
- data/lib/google/cloud/documentai/v1/processor_type_pb.rb +34 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/documentai/v1/barcode.rb +71 -0
- data/proto_docs/google/cloud/documentai/v1/document.rb +110 -131
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +352 -6
- data/proto_docs/google/cloud/documentai/v1/document_schema.rb +154 -0
- data/proto_docs/google/cloud/documentai/v1/operation_metadata.rb +3 -0
- data/proto_docs/google/cloud/documentai/v1/processor.rb +171 -0
- data/proto_docs/google/cloud/documentai/v1/processor_type.rb +62 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +32 -2
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DocumentAI
|
23
|
+
module V1
|
24
|
+
# Encodes the detailed information of a barcode.
|
25
|
+
# @!attribute [rw] format
|
26
|
+
# @return [::String]
|
27
|
+
# Format of a barcode.
|
28
|
+
# The supported formats are:
|
29
|
+
# CODE_128: Code 128 type.
|
30
|
+
# CODE_39: Code 39 type.
|
31
|
+
# CODE_93: Code 93 type.
|
32
|
+
# CODABAR: Codabar type.
|
33
|
+
# DATA_MATRIX: 2D Data Matrix type.
|
34
|
+
# ITF: ITF type.
|
35
|
+
# EAN_13: EAN-13 type.
|
36
|
+
# EAN_8: EAN-8 type.
|
37
|
+
# QR_CODE: 2D QR code type.
|
38
|
+
# UPC_A: UPC-A type.
|
39
|
+
# UPC_E: UPC-E type.
|
40
|
+
# PDF417: PDF417 type.
|
41
|
+
# AZTEC: 2D Aztec code type.
|
42
|
+
# DATABAR: GS1 DataBar code type.
|
43
|
+
# @!attribute [rw] value_format
|
44
|
+
# @return [::String]
|
45
|
+
# Value format describes the format of the value that a barcode
|
46
|
+
# encodes.
|
47
|
+
# The supported formats are:
|
48
|
+
# CONTACT_INFO: Contact information.
|
49
|
+
# EMAIL: Email address.
|
50
|
+
# ISBN: ISBN identifier.
|
51
|
+
# PHONE: Phone number.
|
52
|
+
# PRODUCT: Product.
|
53
|
+
# SMS: SMS message.
|
54
|
+
# TEXT: Text string.
|
55
|
+
# URL: URL address.
|
56
|
+
# WIFI: Wifi information.
|
57
|
+
# GEO: Geo-localization.
|
58
|
+
# CALENDAR_EVENT: Calendar event.
|
59
|
+
# DRIVER_LICENSE: Driver's license.
|
60
|
+
# @!attribute [rw] raw_value
|
61
|
+
# @return [::String]
|
62
|
+
# Raw value encoded in the barcode.
|
63
|
+
# For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
|
64
|
+
class Barcode
|
65
|
+
include ::Google::Protobuf::MessageExts
|
66
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -21,11 +21,10 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module DocumentAI
|
23
23
|
module V1
|
24
|
-
# Document represents the canonical document resource in Document
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# optimize for quality.
|
24
|
+
# Document represents the canonical document resource in Document AI. It is an
|
25
|
+
# interchange format that provides insights into documents and allows for
|
26
|
+
# collaboration between users and Document AI to iterate and optimize for
|
27
|
+
# quality.
|
29
28
|
# @!attribute [rw] uri
|
30
29
|
# @return [::String]
|
31
30
|
# Optional. Currently supports Google Cloud Storage URI of the form
|
@@ -48,24 +47,22 @@ module Google
|
|
48
47
|
# Optional. UTF-8 encoded text in reading order from the document.
|
49
48
|
# @!attribute [rw] text_styles
|
50
49
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Style>]
|
51
|
-
# Styles for the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
50
|
+
# Placeholder. Styles for the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
52
51
|
# @!attribute [rw] pages
|
53
52
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page>]
|
54
53
|
# Visual page layout for the {::Google::Cloud::DocumentAI::V1::Document Document}.
|
55
54
|
# @!attribute [rw] entities
|
56
55
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
|
57
|
-
# A list of entities detected on
|
58
|
-
#
|
59
|
-
# shards, entities in this list may cross shard boundaries.
|
56
|
+
# A list of entities detected on {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. For document shards,
|
57
|
+
# entities in this list may cross shard boundaries.
|
60
58
|
# @!attribute [rw] entity_relations
|
61
59
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::EntityRelation>]
|
62
|
-
# Relationship among
|
63
|
-
# {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
|
60
|
+
# Placeholder. Relationship among {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
|
64
61
|
# @!attribute [rw] text_changes
|
65
62
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextChange>]
|
66
|
-
# A list of text corrections made to [Document.text]. This is
|
67
|
-
# used for annotating corrections to OCR mistakes. Text changes for
|
68
|
-
# revision may not overlap with each other.
|
63
|
+
# Placeholder. A list of text corrections made to [Document.text]. This is
|
64
|
+
# usually used for annotating corrections to OCR mistakes. Text changes for
|
65
|
+
# a given revision may not overlap with each other.
|
69
66
|
# @!attribute [rw] shard_info
|
70
67
|
# @return [::Google::Cloud::DocumentAI::V1::Document::ShardInfo]
|
71
68
|
# Information about the sharding if this document is sharded part of a larger
|
@@ -75,7 +72,7 @@ module Google
|
|
75
72
|
# Any error that occurred while processing this document.
|
76
73
|
# @!attribute [rw] revisions
|
77
74
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Revision>]
|
78
|
-
# Revision history of this document.
|
75
|
+
# Placeholder. Revision history of this document.
|
79
76
|
class Document
|
80
77
|
include ::Google::Protobuf::MessageExts
|
81
78
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -91,8 +88,7 @@ module Google
|
|
91
88
|
# Total number of shards.
|
92
89
|
# @!attribute [rw] text_offset
|
93
90
|
# @return [::Integer]
|
94
|
-
# The index of the first character in
|
95
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
|
91
|
+
# The index of the first character in {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
|
96
92
|
# document global text.
|
97
93
|
class ShardInfo
|
98
94
|
include ::Google::Protobuf::MessageExts
|
@@ -103,8 +99,7 @@ module Google
|
|
103
99
|
# conventions as much as possible.
|
104
100
|
# @!attribute [rw] text_anchor
|
105
101
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
106
|
-
# Text anchor indexing into the
|
107
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
102
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
108
103
|
# @!attribute [rw] color
|
109
104
|
# @return [::Google::Type::Color]
|
110
105
|
# Text color.
|
@@ -147,11 +142,9 @@ module Google
|
|
147
142
|
# A page in a {::Google::Cloud::DocumentAI::V1::Document Document}.
|
148
143
|
# @!attribute [rw] page_number
|
149
144
|
# @return [::Integer]
|
150
|
-
# 1-based index for current
|
151
|
-
# {::Google::Cloud::DocumentAI::V1::Document
|
152
|
-
#
|
153
|
-
# taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for
|
154
|
-
# individual processing.
|
145
|
+
# 1-based index for current {::Google::Cloud::DocumentAI::V1::Document::Page Page} in a parent {::Google::Cloud::DocumentAI::V1::Document Document}.
|
146
|
+
# Useful when a page is taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for individual
|
147
|
+
# processing.
|
155
148
|
# @!attribute [rw] image
|
156
149
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Image]
|
157
150
|
# Rendered image for this page. This image is preprocessed to remove any
|
@@ -199,6 +192,9 @@ module Google
|
|
199
192
|
# @!attribute [rw] symbols
|
200
193
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Symbol>]
|
201
194
|
# A list of visually detected symbols on the page.
|
195
|
+
# @!attribute [rw] detected_barcodes
|
196
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedBarcode>]
|
197
|
+
# A list of detected barcodes.
|
202
198
|
# @!attribute [rw] provenance
|
203
199
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
|
204
200
|
# The history of this page.
|
@@ -264,23 +260,18 @@ module Google
|
|
264
260
|
# Visual element describing a layout unit on a page.
|
265
261
|
# @!attribute [rw] text_anchor
|
266
262
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
267
|
-
# Text anchor indexing into the
|
268
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
263
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
269
264
|
# @!attribute [rw] confidence
|
270
265
|
# @return [::Float]
|
271
|
-
# Confidence of the current
|
272
|
-
#
|
273
|
-
#
|
274
|
-
# single token, a table, a visual element, etc. depending on context.
|
275
|
-
# Range [0, 1].
|
266
|
+
# Confidence of the current {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} within context of the object this
|
267
|
+
# layout is for. e.g. confidence can be for a single token, a table,
|
268
|
+
# a visual element, etc. depending on context. Range [0, 1].
|
276
269
|
# @!attribute [rw] bounding_poly
|
277
270
|
# @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
|
278
|
-
# The bounding polygon for the
|
279
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
271
|
+
# The bounding polygon for the {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
280
272
|
# @!attribute [rw] orientation
|
281
273
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout::Orientation]
|
282
|
-
# Detected orientation for the
|
283
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
274
|
+
# Detected orientation for the {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
284
275
|
class Layout
|
285
276
|
include ::Google::Protobuf::MessageExts
|
286
277
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -311,8 +302,7 @@ module Google
|
|
311
302
|
# common line-spacing and orientation.
|
312
303
|
# @!attribute [rw] layout
|
313
304
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
314
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
315
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
|
305
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
|
316
306
|
# @!attribute [rw] detected_languages
|
317
307
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
318
308
|
# A list of detected languages together with confidence.
|
@@ -327,8 +317,7 @@ module Google
|
|
327
317
|
# A collection of lines that a human would perceive as a paragraph.
|
328
318
|
# @!attribute [rw] layout
|
329
319
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
330
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
331
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
|
320
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
|
332
321
|
# @!attribute [rw] detected_languages
|
333
322
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
334
323
|
# A list of detected languages together with confidence.
|
@@ -344,8 +333,7 @@ module Google
|
|
344
333
|
# Does not cross column boundaries, can be horizontal, vertical, etc.
|
345
334
|
# @!attribute [rw] layout
|
346
335
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
347
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
348
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
|
336
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
|
349
337
|
# @!attribute [rw] detected_languages
|
350
338
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
351
339
|
# A list of detected languages together with confidence.
|
@@ -360,12 +348,10 @@ module Google
|
|
360
348
|
# A detected token.
|
361
349
|
# @!attribute [rw] layout
|
362
350
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
363
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
364
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
351
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
365
352
|
# @!attribute [rw] detected_break
|
366
353
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak]
|
367
|
-
# Detected break at the end of a
|
368
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
354
|
+
# Detected break at the end of a {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
369
355
|
# @!attribute [rw] detected_languages
|
370
356
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
371
357
|
# A list of detected languages together with confidence.
|
@@ -376,8 +362,7 @@ module Google
|
|
376
362
|
include ::Google::Protobuf::MessageExts
|
377
363
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
378
364
|
|
379
|
-
# Detected break at the end of a
|
380
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
365
|
+
# Detected break at the end of a {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
381
366
|
# @!attribute [rw] type
|
382
367
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak::Type]
|
383
368
|
# Detected break type.
|
@@ -405,8 +390,7 @@ module Google
|
|
405
390
|
# A detected symbol.
|
406
391
|
# @!attribute [rw] layout
|
407
392
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
408
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
409
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Symbol Symbol}.
|
393
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Symbol Symbol}.
|
410
394
|
# @!attribute [rw] detected_languages
|
411
395
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
412
396
|
# A list of detected languages together with confidence.
|
@@ -419,12 +403,10 @@ module Google
|
|
419
403
|
# page.
|
420
404
|
# @!attribute [rw] layout
|
421
405
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
422
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
423
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
406
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
424
407
|
# @!attribute [rw] type
|
425
408
|
# @return [::String]
|
426
|
-
# Type of the
|
427
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
409
|
+
# Type of the {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
428
410
|
# @!attribute [rw] detected_languages
|
429
411
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
430
412
|
# A list of detected languages together with confidence.
|
@@ -436,8 +418,7 @@ module Google
|
|
436
418
|
# A table representation similar to HTML table structure.
|
437
419
|
# @!attribute [rw] layout
|
438
420
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
439
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
440
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
|
421
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
|
441
422
|
# @!attribute [rw] header_rows
|
442
423
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableRow>]
|
443
424
|
# Header rows of the table.
|
@@ -463,8 +444,7 @@ module Google
|
|
463
444
|
# A cell representation inside the table.
|
464
445
|
# @!attribute [rw] layout
|
465
446
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
466
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
467
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
|
447
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
|
468
448
|
# @!attribute [rw] row_span
|
469
449
|
# @return [::Integer]
|
470
450
|
# How many rows this cell spans.
|
@@ -483,13 +463,11 @@ module Google
|
|
483
463
|
# A form field detected on the page.
|
484
464
|
# @!attribute [rw] field_name
|
485
465
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
486
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
487
|
-
#
|
488
|
-
# e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
|
466
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} name. e.g. `Address`, `Email`,
|
467
|
+
# `Grand total`, `Phone number`, etc.
|
489
468
|
# @!attribute [rw] field_value
|
490
469
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
491
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
492
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
|
470
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
|
493
471
|
# @!attribute [rw] name_detected_languages
|
494
472
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
495
473
|
# A list of detected languages for name together with confidence.
|
@@ -503,6 +481,16 @@ module Google
|
|
503
481
|
# - blank (this indicates the field_value is normal text)
|
504
482
|
# - "unfilled_checkbox"
|
505
483
|
# - "filled_checkbox"
|
484
|
+
# @!attribute [rw] corrected_key_text
|
485
|
+
# @return [::String]
|
486
|
+
# Created for Labeling UI to export key text.
|
487
|
+
# If corrections were made to the text identified by the
|
488
|
+
# `field_name.text_anchor`, this field will contain the correction.
|
489
|
+
# @!attribute [rw] corrected_value_text
|
490
|
+
# @return [::String]
|
491
|
+
# Created for Labeling UI to export value text.
|
492
|
+
# If corrections were made to the text identified by the
|
493
|
+
# `field_value.text_anchor`, this field will contain the correction.
|
506
494
|
# @!attribute [rw] provenance
|
507
495
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
|
508
496
|
# The history of this annotation.
|
@@ -511,6 +499,18 @@ module Google
|
|
511
499
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
512
500
|
end
|
513
501
|
|
502
|
+
# A detected barcode.
|
503
|
+
# @!attribute [rw] layout
|
504
|
+
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
505
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::DetectedBarcode DetectedBarcode}.
|
506
|
+
# @!attribute [rw] barcode
|
507
|
+
# @return [::Google::Cloud::DocumentAI::V1::Barcode]
|
508
|
+
# Detailed barcode information of the {::Google::Cloud::DocumentAI::V1::Document::Page::DetectedBarcode DetectedBarcode}.
|
509
|
+
class DetectedBarcode
|
510
|
+
include ::Google::Protobuf::MessageExts
|
511
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
512
|
+
end
|
513
|
+
|
514
514
|
# Detected language for a structural component.
|
515
515
|
# @!attribute [rw] language_code
|
516
516
|
# @return [::String]
|
@@ -532,15 +532,14 @@ module Google
|
|
532
532
|
# @!attribute [rw] text_anchor
|
533
533
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
534
534
|
# Optional. Provenance of the entity.
|
535
|
-
# Text anchor indexing into the
|
536
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
535
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
537
536
|
# @!attribute [rw] type
|
538
537
|
# @return [::String]
|
539
538
|
# Required. Entity type from a schema e.g. `Address`.
|
540
539
|
# @!attribute [rw] mention_text
|
541
540
|
# @return [::String]
|
542
|
-
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
|
543
|
-
#
|
541
|
+
# Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity
|
542
|
+
# is not present in the document, this field will be empty.
|
544
543
|
# @!attribute [rw] mention_id
|
545
544
|
# @return [::String]
|
546
545
|
# Optional. Deprecated. Use `id` field instead.
|
@@ -549,29 +548,28 @@ module Google
|
|
549
548
|
# Optional. Confidence of detected Schema entity. Range [0, 1].
|
550
549
|
# @!attribute [rw] page_anchor
|
551
550
|
# @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor]
|
552
|
-
# Optional. Represents the provenance of this entity wrt. the location on
|
553
|
-
#
|
551
|
+
# Optional. Represents the provenance of this entity wrt. the location on the
|
552
|
+
# page where it was found.
|
554
553
|
# @!attribute [rw] id
|
555
554
|
# @return [::String]
|
556
555
|
# Optional. Canonical id. This will be a unique value in the entity list
|
557
556
|
# for this document.
|
558
557
|
# @!attribute [rw] normalized_value
|
559
558
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Entity::NormalizedValue]
|
560
|
-
# Optional. Normalized entity value. Absent if the extracted value could
|
561
|
-
#
|
559
|
+
# Optional. Normalized entity value. Absent if the extracted value could not be
|
560
|
+
# converted or the type (e.g. address) is not supported for certain
|
562
561
|
# parsers. This field is also only populated for certain supported document
|
563
562
|
# types.
|
564
563
|
# @!attribute [rw] properties
|
565
564
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
|
566
|
-
# Optional. Entities can be nested to form a hierarchical data structure
|
567
|
-
#
|
565
|
+
# Optional. Entities can be nested to form a hierarchical data structure representing
|
566
|
+
# the content in the document.
|
568
567
|
# @!attribute [rw] provenance
|
569
568
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
|
570
569
|
# Optional. The history of this annotation.
|
571
570
|
# @!attribute [rw] redacted
|
572
571
|
# @return [::Boolean]
|
573
|
-
# Optional. Whether the entity will be redacted for de-identification
|
574
|
-
# purposes.
|
572
|
+
# Optional. Whether the entity will be redacted for de-identification purposes.
|
575
573
|
class Entity
|
576
574
|
include ::Google::Protobuf::MessageExts
|
577
575
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -597,6 +595,12 @@ module Google
|
|
597
595
|
# @return [::Boolean]
|
598
596
|
# Boolean value. Can be used for entities with binary values, or for
|
599
597
|
# checkboxes.
|
598
|
+
# @!attribute [rw] integer_value
|
599
|
+
# @return [::Integer]
|
600
|
+
# Integer value.
|
601
|
+
# @!attribute [rw] float_value
|
602
|
+
# @return [::Float]
|
603
|
+
# Float value.
|
600
604
|
# @!attribute [rw] text
|
601
605
|
# @return [::String]
|
602
606
|
# Optional. An optional field to store a normalized string.
|
@@ -615,8 +619,7 @@ module Google
|
|
615
619
|
end
|
616
620
|
end
|
617
621
|
|
618
|
-
# Relationship between
|
619
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
|
622
|
+
# Relationship between {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
|
620
623
|
# @!attribute [rw] subject_id
|
621
624
|
# @return [::String]
|
622
625
|
# Subject entity id.
|
@@ -631,12 +634,10 @@ module Google
|
|
631
634
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
632
635
|
end
|
633
636
|
|
634
|
-
# Text reference indexing into the
|
635
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
637
|
+
# Text reference indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
636
638
|
# @!attribute [rw] text_segments
|
637
639
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment>]
|
638
|
-
# The text segments from the
|
639
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
640
|
+
# The text segments from the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
640
641
|
# @!attribute [rw] content
|
641
642
|
# @return [::String]
|
642
643
|
# Contains the content of the text span so that users do
|
@@ -646,20 +647,15 @@ module Google
|
|
646
647
|
include ::Google::Protobuf::MessageExts
|
647
648
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
648
649
|
|
649
|
-
# A text segment in the
|
650
|
-
#
|
651
|
-
#
|
652
|
-
# document shard for large sharded documents. See
|
653
|
-
# {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
650
|
+
# A text segment in the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. The indices may be out of bounds
|
651
|
+
# which indicate that the text extends into another document shard for
|
652
|
+
# large sharded documents. See {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
654
653
|
# @!attribute [rw] start_index
|
655
654
|
# @return [::Integer]
|
656
|
-
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
657
|
-
# start UTF-8 char index in the
|
658
|
-
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
655
|
+
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment} start UTF-8 char index in the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
659
656
|
# @!attribute [rw] end_index
|
660
657
|
# @return [::Integer]
|
661
|
-
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
662
|
-
# half open end UTF-8 char index in the
|
658
|
+
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment} half open end UTF-8 char index in the
|
663
659
|
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
664
660
|
class TextSegment
|
665
661
|
include ::Google::Protobuf::MessageExts
|
@@ -667,10 +663,9 @@ module Google
|
|
667
663
|
end
|
668
664
|
end
|
669
665
|
|
670
|
-
# Referencing the visual context of the entity in the
|
671
|
-
#
|
672
|
-
#
|
673
|
-
# reference specific layout element types.
|
666
|
+
# Referencing the visual context of the entity in the {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages}.
|
667
|
+
# Page anchors can be cross-page, consist of multiple bounding polygons and
|
668
|
+
# optionally reference specific layout element types.
|
674
669
|
# @!attribute [rw] page_refs
|
675
670
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef>]
|
676
671
|
# One or more references to visual page elements
|
@@ -681,29 +676,22 @@ module Google
|
|
681
676
|
# Represents a weak reference to a page element within a document.
|
682
677
|
# @!attribute [rw] page
|
683
678
|
# @return [::Integer]
|
684
|
-
# Required. Index into the
|
685
|
-
#
|
686
|
-
#
|
687
|
-
# related page element. This field is skipped when its value is the
|
688
|
-
# default 0. See
|
679
|
+
# Required. Index into the {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages} element, for example using
|
680
|
+
# [Document.pages][page_refs.page] to locate the related page element.
|
681
|
+
# This field is skipped when its value is the default 0. See
|
689
682
|
# https://developers.google.com/protocol-buffers/docs/proto3#json.
|
690
683
|
# @!attribute [rw] layout_type
|
691
684
|
# @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType]
|
692
|
-
# Optional. The type of the layout element that is being referenced if
|
693
|
-
# any.
|
685
|
+
# Optional. The type of the layout element that is being referenced if any.
|
694
686
|
# @!attribute [rw] layout_id
|
695
687
|
# @return [::String]
|
696
|
-
# Optional. Deprecated. Use
|
697
|
-
# {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly}
|
698
|
-
# instead.
|
688
|
+
# Optional. Deprecated. Use {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} instead.
|
699
689
|
# @!attribute [rw] bounding_poly
|
700
690
|
# @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
|
701
|
-
# Optional. Identifies the bounding polygon of a layout element on the
|
702
|
-
# page.
|
691
|
+
# Optional. Identifies the bounding polygon of a layout element on the page.
|
703
692
|
# @!attribute [rw] confidence
|
704
693
|
# @return [::Float]
|
705
|
-
# Optional. Confidence of detected page element, if applicable. Range [0,
|
706
|
-
# 1].
|
694
|
+
# Optional. Confidence of detected page element, if applicable. Range [0, 1].
|
707
695
|
class PageRef
|
708
696
|
include ::Google::Protobuf::MessageExts
|
709
697
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -713,38 +701,25 @@ module Google
|
|
713
701
|
# Layout Unspecified.
|
714
702
|
LAYOUT_TYPE_UNSPECIFIED = 0
|
715
703
|
|
716
|
-
# References a
|
717
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks}
|
718
|
-
# element.
|
704
|
+
# References a {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks} element.
|
719
705
|
BLOCK = 1
|
720
706
|
|
721
|
-
# References a
|
722
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs}
|
723
|
-
# element.
|
707
|
+
# References a {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs} element.
|
724
708
|
PARAGRAPH = 2
|
725
709
|
|
726
|
-
# References a
|
727
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
|
710
|
+
# References a {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
|
728
711
|
LINE = 3
|
729
712
|
|
730
|
-
# References a
|
731
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens}
|
732
|
-
# element.
|
713
|
+
# References a {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens} element.
|
733
714
|
TOKEN = 4
|
734
715
|
|
735
|
-
# References a
|
736
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements}
|
737
|
-
# element.
|
716
|
+
# References a {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements} element.
|
738
717
|
VISUAL_ELEMENT = 5
|
739
718
|
|
740
|
-
# Refrrences a
|
741
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables}
|
742
|
-
# element.
|
719
|
+
# Refrrences a {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables} element.
|
743
720
|
TABLE = 6
|
744
721
|
|
745
|
-
# References a
|
746
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields}
|
747
|
-
# element.
|
722
|
+
# References a {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields} element.
|
748
723
|
FORM_FIELD = 7
|
749
724
|
end
|
750
725
|
end
|
@@ -830,6 +805,11 @@ module Google
|
|
830
805
|
# The revisions that this revision is based on. This can include one or
|
831
806
|
# more parent (when documents are merged.) This field represents the
|
832
807
|
# index into the `revisions` field.
|
808
|
+
# @!attribute [rw] parent_ids
|
809
|
+
# @return [::Array<::String>]
|
810
|
+
# The revisions that this revision is based on. Must include all the ids
|
811
|
+
# that have anything to do with this revision - eg. there are
|
812
|
+
# `provenance.parent.revision` fields that index into this field.
|
833
813
|
# @!attribute [rw] create_time
|
834
814
|
# @return [::Google::Protobuf::Timestamp]
|
835
815
|
# The time that the revision was created.
|
@@ -858,9 +838,8 @@ module Google
|
|
858
838
|
# @!attribute [rw] text_anchor
|
859
839
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
860
840
|
# Provenance of the correction.
|
861
|
-
# Text anchor indexing into the
|
862
|
-
#
|
863
|
-
# only be a single `TextAnchor.text_segments` element. If the start and
|
841
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. There can only be a
|
842
|
+
# single `TextAnchor.text_segments` element. If the start and
|
864
843
|
# end index of the text segment are the same, the text change is inserted
|
865
844
|
# before that index.
|
866
845
|
# @!attribute [rw] changed_text
|