google-cloud-document_ai-v1 0.21.0 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +106 -56
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +13 -5
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +106 -56
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +11 -4
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +9 -5
- data/lib/google/cloud/documentai/v1/processor_pb.rb +1 -1
- data/proto_docs/google/cloud/documentai/v1/document.rb +136 -76
- data/proto_docs/google/cloud/documentai/v1/document_io.rb +3 -1
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +127 -76
- data/proto_docs/google/cloud/documentai/v1/processor.rb +5 -4
- metadata +2 -2
@@ -41,7 +41,8 @@ module Google
|
|
41
41
|
# LRO endpoint to batch process many documents. The output is written
|
42
42
|
# to Cloud Storage as JSON in the [Document] format.
|
43
43
|
rpc :BatchProcessDocuments, ::Google::Cloud::DocumentAI::V1::BatchProcessRequest, ::Google::Longrunning::Operation
|
44
|
-
# Fetches processor types. Note that we don't use
|
44
|
+
# Fetches processor types. Note that we don't use
|
45
|
+
# [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
|
45
46
|
# here, because it isn't paginated.
|
46
47
|
rpc :FetchProcessorTypes, ::Google::Cloud::DocumentAI::V1::FetchProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse
|
47
48
|
# Lists the processor types that exist.
|
@@ -67,8 +68,9 @@ module Google
|
|
67
68
|
rpc :DeployProcessorVersion, ::Google::Cloud::DocumentAI::V1::DeployProcessorVersionRequest, ::Google::Longrunning::Operation
|
68
69
|
# Undeploys the processor version.
|
69
70
|
rpc :UndeployProcessorVersion, ::Google::Cloud::DocumentAI::V1::UndeployProcessorVersionRequest, ::Google::Longrunning::Operation
|
70
|
-
# Creates a processor from the
|
71
|
-
#
|
71
|
+
# Creates a processor from the
|
72
|
+
# [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The
|
73
|
+
# processor will be at `ENABLED` state by default after its creation.
|
72
74
|
rpc :CreateProcessor, ::Google::Cloud::DocumentAI::V1::CreateProcessorRequest, ::Google::Cloud::DocumentAI::V1::Processor
|
73
75
|
# Deletes the processor, unloads all deployed model artifacts if it was
|
74
76
|
# enabled and then deletes all artifacts associated with this processor.
|
@@ -77,8 +79,10 @@ module Google
|
|
77
79
|
rpc :EnableProcessor, ::Google::Cloud::DocumentAI::V1::EnableProcessorRequest, ::Google::Longrunning::Operation
|
78
80
|
# Disables a processor
|
79
81
|
rpc :DisableProcessor, ::Google::Cloud::DocumentAI::V1::DisableProcessorRequest, ::Google::Longrunning::Operation
|
80
|
-
# Set the default (active) version of a
|
81
|
-
# [
|
82
|
+
# Set the default (active) version of a
|
83
|
+
# [Processor][google.cloud.documentai.v1.Processor] that will be used in
|
84
|
+
# [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
|
85
|
+
# and
|
82
86
|
# [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
|
83
87
|
rpc :SetDefaultProcessorVersion, ::Google::Cloud::DocumentAI::V1::SetDefaultProcessorVersionRequest, ::Google::Longrunning::Operation
|
84
88
|
# Send a document for Human Review. The input document should be processed by
|
@@ -11,7 +11,7 @@ require 'google/cloud/documentai/v1/evaluation_pb'
|
|
11
11
|
require 'google/protobuf/timestamp_pb'
|
12
12
|
|
13
13
|
|
14
|
-
descriptor_data = "\n*google/cloud/documentai/v1/processor.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/documentai/v1/document_schema.proto\x1a+google/cloud/documentai/v1/evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
14
|
+
descriptor_data = "\n*google/cloud/documentai/v1/processor.proto\x12\x1agoogle.cloud.documentai.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/documentai/v1/document_schema.proto\x1a+google/cloud/documentai/v1/evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xeb\x08\n\x10ProcessorVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\x0f\x64ocument_schema\x18\x0c \x01(\x0b\x32*.google.cloud.documentai.v1.DocumentSchema\x12\x46\n\x05state\x18\x06 \x01(\x0e\x32\x32.google.cloud.documentai.v1.ProcessorVersion.StateB\x03\xe0\x41\x03\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12J\n\x11latest_evaluation\x18\x08 \x01(\x0b\x32/.google.cloud.documentai.v1.EvaluationReference\x12\x14\n\x0ckms_key_name\x18\t \x01(\t\x12\x1c\n\x14kms_key_version_name\x18\n \x01(\t\x12\x1b\n\x0egoogle_managed\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12V\n\x10\x64\x65precation_info\x18\r \x01(\x0b\x32<.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo\x12O\n\nmodel_type\x18\x0f \x01(\x0e\x32\x36.google.cloud.documentai.v1.ProcessorVersion.ModelTypeB\x03\xe0\x41\x03\x1a\x9f\x01\n\x0f\x44\x65precationInfo\x12\x34\n\x10\x64\x65precation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12V\n\x1dreplacement_processor_version\x18\x02 \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\"\x93\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\r\n\tDEPLOYING\x10\x02\x12\x0e\n\nUNDEPLOYED\x10\x03\x12\x0f\n\x0bUNDEPLOYING\x10\x04\x12\x0c\n\x08\x43REATING\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07\x12\r\n\tIMPORTING\x10\x08\"Y\n\tModelType\x12\x1a\n\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15MODEL_TYPE_GENERATIVE\x10\x01\x12\x15\n\x11MODEL_TYPE_CUSTOM\x10\x02:\x96\x01\xea\x41\x92\x01\n*documentai.googleapis.com/ProcessorVersion\x12\x64projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}\"r\n\x15ProcessorVersionAlias\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12J\n\x11processor_version\x18\x02 \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\"\x88\x05\n\tProcessor\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12?\n\x05state\x18\x04 \x01(\x0e\x32+.google.cloud.documentai.v1.Processor.StateB\x03\xe0\x41\x03\x12R\n\x19\x64\x65\x66\x61ult_processor_version\x18\t \x01(\tB/\xfa\x41,\n*documentai.googleapis.com/ProcessorVersion\x12Y\n\x19processor_version_aliases\x18\n \x03(\x0b\x32\x31.google.cloud.documentai.v1.ProcessorVersionAliasB\x03\xe0\x41\x03\x12 \n\x10process_endpoint\x18\x06 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ckms_key_name\x18\x08 \x01(\t\"~\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x0c\n\x08\x45NABLING\x10\x03\x12\r\n\tDISABLING\x10\x04\x12\x0c\n\x08\x43REATING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x0c\n\x08\x44\x45LETING\x10\x07:h\xea\x41\x65\n#documentai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}B\xd1\x01\n\x1e\x63om.google.cloud.documentai.v1B\x13\x44ocumentAiProcessorP\x01Z>cloud.google.com/go/documentai/apiv1/documentaipb;documentaipb\xaa\x02\x1aGoogle.Cloud.DocumentAI.V1\xca\x02\x1aGoogle\\Cloud\\DocumentAI\\V1\xea\x02\x1dGoogle::Cloud::DocumentAI::V1b\x06proto3"
|
15
15
|
|
16
16
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
17
|
|
@@ -52,16 +52,19 @@ module Google
|
|
52
52
|
# Visual page layout for the {::Google::Cloud::DocumentAI::V1::Document Document}.
|
53
53
|
# @!attribute [rw] entities
|
54
54
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
|
55
|
-
# A list of entities detected on
|
56
|
-
#
|
55
|
+
# A list of entities detected on
|
56
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. For document
|
57
|
+
# shards, entities in this list may cross shard boundaries.
|
57
58
|
# @!attribute [rw] entity_relations
|
58
59
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::EntityRelation>]
|
59
|
-
# Placeholder. Relationship among
|
60
|
+
# Placeholder. Relationship among
|
61
|
+
# {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
|
60
62
|
# @!attribute [rw] text_changes
|
61
63
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextChange>]
|
62
|
-
# Placeholder. A list of text corrections made to
|
63
|
-
#
|
64
|
-
# for
|
64
|
+
# Placeholder. A list of text corrections made to
|
65
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. This is usually
|
66
|
+
# used for annotating corrections to OCR mistakes. Text changes for a given
|
67
|
+
# revision may not overlap with each other.
|
65
68
|
# @!attribute [rw] shard_info
|
66
69
|
# @return [::Google::Cloud::DocumentAI::V1::Document::ShardInfo]
|
67
70
|
# Information about the sharding if this document is sharded part of a larger
|
@@ -87,7 +90,8 @@ module Google
|
|
87
90
|
# Total number of shards.
|
88
91
|
# @!attribute [rw] text_offset
|
89
92
|
# @return [::Integer]
|
90
|
-
# The index of the first character in
|
93
|
+
# The index of the first character in
|
94
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
|
91
95
|
# document global text.
|
92
96
|
class ShardInfo
|
93
97
|
include ::Google::Protobuf::MessageExts
|
@@ -98,7 +102,8 @@ module Google
|
|
98
102
|
# conventions as much as possible.
|
99
103
|
# @!attribute [rw] text_anchor
|
100
104
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
101
|
-
# Text anchor indexing into the
|
105
|
+
# Text anchor indexing into the
|
106
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
102
107
|
# @!attribute [rw] color
|
103
108
|
# @return [::Google::Type::Color]
|
104
109
|
# Text color.
|
@@ -147,9 +152,11 @@ module Google
|
|
147
152
|
# A page in a {::Google::Cloud::DocumentAI::V1::Document Document}.
|
148
153
|
# @!attribute [rw] page_number
|
149
154
|
# @return [::Integer]
|
150
|
-
# 1-based index for current
|
151
|
-
#
|
152
|
-
#
|
155
|
+
# 1-based index for current
|
156
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page Page} in a parent
|
157
|
+
# {::Google::Cloud::DocumentAI::V1::Document Document}. Useful when a page is
|
158
|
+
# taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for
|
159
|
+
# individual processing.
|
153
160
|
# @!attribute [rw] image
|
154
161
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Image]
|
155
162
|
# Rendered image for this page. This image is preprocessed to remove any
|
@@ -271,18 +278,23 @@ module Google
|
|
271
278
|
# Visual element describing a layout unit on a page.
|
272
279
|
# @!attribute [rw] text_anchor
|
273
280
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
274
|
-
# Text anchor indexing into the
|
281
|
+
# Text anchor indexing into the
|
282
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
275
283
|
# @!attribute [rw] confidence
|
276
284
|
# @return [::Float]
|
277
|
-
# Confidence of the current
|
278
|
-
#
|
279
|
-
#
|
285
|
+
# Confidence of the current
|
286
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} within
|
287
|
+
# context of the object this layout is for. e.g. confidence can be for a
|
288
|
+
# single token, a table, a visual element, etc. depending on context.
|
289
|
+
# Range `[0, 1]`.
|
280
290
|
# @!attribute [rw] bounding_poly
|
281
291
|
# @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
|
282
|
-
# The bounding polygon for the
|
292
|
+
# The bounding polygon for the
|
293
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
283
294
|
# @!attribute [rw] orientation
|
284
295
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout::Orientation]
|
285
|
-
# Detected orientation for the
|
296
|
+
# Detected orientation for the
|
297
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
|
286
298
|
class Layout
|
287
299
|
include ::Google::Protobuf::MessageExts
|
288
300
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -313,7 +325,8 @@ module Google
|
|
313
325
|
# common line-spacing and orientation.
|
314
326
|
# @!attribute [rw] layout
|
315
327
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
316
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
328
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
329
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
|
317
330
|
# @!attribute [rw] detected_languages
|
318
331
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
319
332
|
# A list of detected languages together with confidence.
|
@@ -329,7 +342,8 @@ module Google
|
|
329
342
|
# A collection of lines that a human would perceive as a paragraph.
|
330
343
|
# @!attribute [rw] layout
|
331
344
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
332
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
345
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
346
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
|
333
347
|
# @!attribute [rw] detected_languages
|
334
348
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
335
349
|
# A list of detected languages together with confidence.
|
@@ -346,7 +360,8 @@ module Google
|
|
346
360
|
# Does not cross column boundaries, can be horizontal, vertical, etc.
|
347
361
|
# @!attribute [rw] layout
|
348
362
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
349
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
363
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
364
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
|
350
365
|
# @!attribute [rw] detected_languages
|
351
366
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
352
367
|
# A list of detected languages together with confidence.
|
@@ -362,10 +377,12 @@ module Google
|
|
362
377
|
# A detected token.
|
363
378
|
# @!attribute [rw] layout
|
364
379
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
365
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
380
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
381
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
366
382
|
# @!attribute [rw] detected_break
|
367
383
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak]
|
368
|
-
# Detected break at the end of a
|
384
|
+
# Detected break at the end of a
|
385
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
369
386
|
# @!attribute [rw] detected_languages
|
370
387
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
371
388
|
# A list of detected languages together with confidence.
|
@@ -380,7 +397,8 @@ module Google
|
|
380
397
|
include ::Google::Protobuf::MessageExts
|
381
398
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
382
399
|
|
383
|
-
# Detected break at the end of a
|
400
|
+
# Detected break at the end of a
|
401
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
|
384
402
|
# @!attribute [rw] type
|
385
403
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak::Type]
|
386
404
|
# Detected break type.
|
@@ -410,8 +428,9 @@ module Google
|
|
410
428
|
# Font size in points (`1` point is `¹⁄₇₂` inches).
|
411
429
|
# @!attribute [rw] pixel_font_size
|
412
430
|
# @return [::Float]
|
413
|
-
# Font size in pixels, equal to _unrounded
|
414
|
-
#
|
431
|
+
# Font size in pixels, equal to _unrounded
|
432
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token::StyleInfo#font_size font_size}_
|
433
|
+
# * _resolution_ ÷ `72.0`.
|
415
434
|
# @!attribute [rw] letter_spacing
|
416
435
|
# @return [::Float]
|
417
436
|
# Letter spacing in points.
|
@@ -420,8 +439,9 @@ module Google
|
|
420
439
|
# Name or style of the font.
|
421
440
|
# @!attribute [rw] bold
|
422
441
|
# @return [::Boolean]
|
423
|
-
# Whether the text is bold (equivalent to
|
424
|
-
#
|
442
|
+
# Whether the text is bold (equivalent to
|
443
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Token::StyleInfo#font_weight font_weight}
|
444
|
+
# is at least `700`).
|
425
445
|
# @!attribute [rw] italic
|
426
446
|
# @return [::Boolean]
|
427
447
|
# Whether the text is italic.
|
@@ -430,16 +450,16 @@ module Google
|
|
430
450
|
# Whether the text is underlined.
|
431
451
|
# @!attribute [rw] strikeout
|
432
452
|
# @return [::Boolean]
|
433
|
-
# Whether the text is strikethrough.
|
453
|
+
# Whether the text is strikethrough. This feature is not supported yet.
|
434
454
|
# @!attribute [rw] subscript
|
435
455
|
# @return [::Boolean]
|
436
|
-
# Whether the text is a subscript.
|
456
|
+
# Whether the text is a subscript. This feature is not supported yet.
|
437
457
|
# @!attribute [rw] superscript
|
438
458
|
# @return [::Boolean]
|
439
|
-
# Whether the text is a superscript.
|
459
|
+
# Whether the text is a superscript. This feature is not supported yet.
|
440
460
|
# @!attribute [rw] smallcaps
|
441
461
|
# @return [::Boolean]
|
442
|
-
# Whether the text is in small caps.
|
462
|
+
# Whether the text is in small caps. This feature is not supported yet.
|
443
463
|
# @!attribute [rw] font_weight
|
444
464
|
# @return [::Integer]
|
445
465
|
# TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
|
@@ -462,7 +482,8 @@ module Google
|
|
462
482
|
# A detected symbol.
|
463
483
|
# @!attribute [rw] layout
|
464
484
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
465
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
485
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
486
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Symbol Symbol}.
|
466
487
|
# @!attribute [rw] detected_languages
|
467
488
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
468
489
|
# A list of detected languages together with confidence.
|
@@ -475,10 +496,12 @@ module Google
|
|
475
496
|
# page.
|
476
497
|
# @!attribute [rw] layout
|
477
498
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
478
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
499
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
500
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
479
501
|
# @!attribute [rw] type
|
480
502
|
# @return [::String]
|
481
|
-
# Type of the
|
503
|
+
# Type of the
|
504
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
|
482
505
|
# @!attribute [rw] detected_languages
|
483
506
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
484
507
|
# A list of detected languages together with confidence.
|
@@ -490,7 +513,8 @@ module Google
|
|
490
513
|
# A table representation similar to HTML table structure.
|
491
514
|
# @!attribute [rw] layout
|
492
515
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
493
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
516
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
517
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
|
494
518
|
# @!attribute [rw] header_rows
|
495
519
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableRow>]
|
496
520
|
# Header rows of the table.
|
@@ -520,7 +544,8 @@ module Google
|
|
520
544
|
# A cell representation inside the table.
|
521
545
|
# @!attribute [rw] layout
|
522
546
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
523
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
547
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
548
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
|
524
549
|
# @!attribute [rw] row_span
|
525
550
|
# @return [::Integer]
|
526
551
|
# How many rows this cell spans.
|
@@ -539,11 +564,13 @@ module Google
|
|
539
564
|
# A form field detected on the page.
|
540
565
|
# @!attribute [rw] field_name
|
541
566
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
542
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
543
|
-
#
|
567
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
568
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} name.
|
569
|
+
# e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
|
544
570
|
# @!attribute [rw] field_value
|
545
571
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
546
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
572
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
|
573
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
|
547
574
|
# @!attribute [rw] name_detected_languages
|
548
575
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
|
549
576
|
# A list of detected languages for name together with confidence.
|
@@ -579,10 +606,12 @@ module Google
|
|
579
606
|
# A detected barcode.
|
580
607
|
# @!attribute [rw] layout
|
581
608
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
|
582
|
-
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
609
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
|
610
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::DetectedBarcode DetectedBarcode}.
|
583
611
|
# @!attribute [rw] barcode
|
584
612
|
# @return [::Google::Cloud::DocumentAI::V1::Barcode]
|
585
|
-
# Detailed barcode information of the
|
613
|
+
# Detailed barcode information of the
|
614
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page::DetectedBarcode DetectedBarcode}.
|
586
615
|
class DetectedBarcode
|
587
616
|
include ::Google::Protobuf::MessageExts
|
588
617
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -643,7 +672,8 @@ module Google
|
|
643
672
|
# @!attribute [rw] text_anchor
|
644
673
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
645
674
|
# Optional. Provenance of the entity.
|
646
|
-
# Text anchor indexing into the
|
675
|
+
# Text anchor indexing into the
|
676
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
647
677
|
# @!attribute [rw] type
|
648
678
|
# @return [::String]
|
649
679
|
# Required. Entity type from a schema e.g. `Address`.
|
@@ -658,28 +688,29 @@ module Google
|
|
658
688
|
# Optional. Confidence of detected Schema entity. Range `[0, 1]`.
|
659
689
|
# @!attribute [rw] page_anchor
|
660
690
|
# @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor]
|
661
|
-
# Optional. Represents the provenance of this entity wrt. the location on
|
662
|
-
# page where it was found.
|
691
|
+
# Optional. Represents the provenance of this entity wrt. the location on
|
692
|
+
# the page where it was found.
|
663
693
|
# @!attribute [rw] id
|
664
694
|
# @return [::String]
|
665
695
|
# Optional. Canonical id. This will be a unique value in the entity list
|
666
696
|
# for this document.
|
667
697
|
# @!attribute [rw] normalized_value
|
668
698
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Entity::NormalizedValue]
|
669
|
-
# Optional. Normalized entity value. Absent if the extracted value could
|
670
|
-
# converted or the type (e.g. address) is not supported for certain
|
699
|
+
# Optional. Normalized entity value. Absent if the extracted value could
|
700
|
+
# not be converted or the type (e.g. address) is not supported for certain
|
671
701
|
# parsers. This field is also only populated for certain supported document
|
672
702
|
# types.
|
673
703
|
# @!attribute [rw] properties
|
674
704
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
|
675
|
-
# Optional. Entities can be nested to form a hierarchical data structure
|
676
|
-
# the content in the document.
|
705
|
+
# Optional. Entities can be nested to form a hierarchical data structure
|
706
|
+
# representing the content in the document.
|
677
707
|
# @!attribute [rw] provenance
|
678
708
|
# @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
|
679
709
|
# Optional. The history of this annotation.
|
680
710
|
# @!attribute [rw] redacted
|
681
711
|
# @return [::Boolean]
|
682
|
-
# Optional. Whether the entity will be redacted for de-identification
|
712
|
+
# Optional. Whether the entity will be redacted for de-identification
|
713
|
+
# purposes.
|
683
714
|
class Entity
|
684
715
|
include ::Google::Protobuf::MessageExts
|
685
716
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -730,7 +761,8 @@ module Google
|
|
730
761
|
end
|
731
762
|
end
|
732
763
|
|
733
|
-
# Relationship between
|
764
|
+
# Relationship between
|
765
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
|
734
766
|
# @!attribute [rw] subject_id
|
735
767
|
# @return [::String]
|
736
768
|
# Subject entity id.
|
@@ -745,10 +777,12 @@ module Google
|
|
745
777
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
746
778
|
end
|
747
779
|
|
748
|
-
# Text reference indexing into the
|
780
|
+
# Text reference indexing into the
|
781
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
749
782
|
# @!attribute [rw] text_segments
|
750
783
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment>]
|
751
|
-
# The text segments from the
|
784
|
+
# The text segments from the
|
785
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
752
786
|
# @!attribute [rw] content
|
753
787
|
# @return [::String]
|
754
788
|
# Contains the content of the text span so that users do
|
@@ -758,15 +792,20 @@ module Google
|
|
758
792
|
include ::Google::Protobuf::MessageExts
|
759
793
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
760
794
|
|
761
|
-
# A text segment in the
|
762
|
-
#
|
763
|
-
#
|
795
|
+
# A text segment in the
|
796
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. The indices
|
797
|
+
# may be out of bounds which indicate that the text extends into another
|
798
|
+
# document shard for large sharded documents. See
|
799
|
+
# {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
764
800
|
# @!attribute [rw] start_index
|
765
801
|
# @return [::Integer]
|
766
|
-
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
802
|
+
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
803
|
+
# start UTF-8 char index in the
|
804
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
767
805
|
# @!attribute [rw] end_index
|
768
806
|
# @return [::Integer]
|
769
|
-
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
807
|
+
# {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
|
808
|
+
# half open end UTF-8 char index in the
|
770
809
|
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
|
771
810
|
class TextSegment
|
772
811
|
include ::Google::Protobuf::MessageExts
|
@@ -774,9 +813,10 @@ module Google
|
|
774
813
|
end
|
775
814
|
end
|
776
815
|
|
777
|
-
# Referencing the visual context of the entity in the
|
778
|
-
# Page anchors
|
779
|
-
#
|
816
|
+
# Referencing the visual context of the entity in the
|
817
|
+
# {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages}. Page anchors
|
818
|
+
# can be cross-page, consist of multiple bounding polygons and optionally
|
819
|
+
# reference specific layout element types.
|
780
820
|
# @!attribute [rw] page_refs
|
781
821
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef>]
|
782
822
|
# One or more references to visual page elements
|
@@ -787,25 +827,31 @@ module Google
|
|
787
827
|
# Represents a weak reference to a page element within a document.
|
788
828
|
# @!attribute [rw] page
|
789
829
|
# @return [::Integer]
|
790
|
-
# Required. Index into the
|
830
|
+
# Required. Index into the
|
831
|
+
# {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages} element,
|
832
|
+
# for example using
|
791
833
|
# `[Document.pages][page_refs.page]` to locate the related page element.
|
792
834
|
# This field is skipped when its value is the default `0`. See
|
793
835
|
# https://developers.google.com/protocol-buffers/docs/proto3#json.
|
794
836
|
# @!attribute [rw] layout_type
|
795
837
|
# @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType]
|
796
|
-
# Optional. The type of the layout element that is being referenced if
|
838
|
+
# Optional. The type of the layout element that is being referenced if
|
839
|
+
# any.
|
797
840
|
# @!attribute [rw] layout_id
|
798
841
|
# @deprecated This field is deprecated and may be removed in the next major version update.
|
799
842
|
# @return [::String]
|
800
|
-
# Optional. Deprecated. Use
|
843
|
+
# Optional. Deprecated. Use
|
844
|
+
# {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly}
|
845
|
+
# instead.
|
801
846
|
# @!attribute [rw] bounding_poly
|
802
847
|
# @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
|
803
|
-
# Optional. Identifies the bounding polygon of a layout element on the
|
804
|
-
# If `layout_type` is set, the bounding polygon must be exactly the
|
805
|
-
# to the layout element it's referring to.
|
848
|
+
# Optional. Identifies the bounding polygon of a layout element on the
|
849
|
+
# page. If `layout_type` is set, the bounding polygon must be exactly the
|
850
|
+
# same to the layout element it's referring to.
|
806
851
|
# @!attribute [rw] confidence
|
807
852
|
# @return [::Float]
|
808
|
-
# Optional. Confidence of detected page element, if applicable. Range
|
853
|
+
# Optional. Confidence of detected page element, if applicable. Range
|
854
|
+
# `[0, 1]`.
|
809
855
|
class PageRef
|
810
856
|
include ::Google::Protobuf::MessageExts
|
811
857
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -815,25 +861,38 @@ module Google
|
|
815
861
|
# Layout Unspecified.
|
816
862
|
LAYOUT_TYPE_UNSPECIFIED = 0
|
817
863
|
|
818
|
-
# References a
|
864
|
+
# References a
|
865
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks}
|
866
|
+
# element.
|
819
867
|
BLOCK = 1
|
820
868
|
|
821
|
-
# References a
|
869
|
+
# References a
|
870
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs}
|
871
|
+
# element.
|
822
872
|
PARAGRAPH = 2
|
823
873
|
|
824
|
-
# References a
|
874
|
+
# References a
|
875
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
|
825
876
|
LINE = 3
|
826
877
|
|
827
|
-
# References a
|
878
|
+
# References a
|
879
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens}
|
880
|
+
# element.
|
828
881
|
TOKEN = 4
|
829
882
|
|
830
|
-
# References a
|
883
|
+
# References a
|
884
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements}
|
885
|
+
# element.
|
831
886
|
VISUAL_ELEMENT = 5
|
832
887
|
|
833
|
-
# Refrrences a
|
888
|
+
# Refrrences a
|
889
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables}
|
890
|
+
# element.
|
834
891
|
TABLE = 6
|
835
892
|
|
836
|
-
# References a
|
893
|
+
# References a
|
894
|
+
# {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields}
|
895
|
+
# element.
|
837
896
|
FORM_FIELD = 7
|
838
897
|
end
|
839
898
|
end
|
@@ -965,8 +1024,9 @@ module Google
|
|
965
1024
|
# @!attribute [rw] text_anchor
|
966
1025
|
# @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
|
967
1026
|
# Provenance of the correction.
|
968
|
-
# Text anchor indexing into the
|
969
|
-
#
|
1027
|
+
# Text anchor indexing into the
|
1028
|
+
# {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. There can
|
1029
|
+
# only be a single `TextAnchor.text_segments` element. If the start and
|
970
1030
|
# end index of the text segment are the same, the text change is inserted
|
971
1031
|
# before that index.
|
972
1032
|
# @!attribute [rw] changed_text
|
@@ -151,7 +151,9 @@ module Google
|
|
151
151
|
# @deprecated This field is deprecated and may be removed in the next major version update.
|
152
152
|
# @return [::Boolean]
|
153
153
|
# Turn on font identification model and return font style information.
|
154
|
-
# Deprecated, use
|
154
|
+
# Deprecated, use
|
155
|
+
# {::Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures#compute_style_info PremiumFeatures.compute_style_info}
|
156
|
+
# instead.
|
155
157
|
# @!attribute [rw] disable_character_boxes_detection
|
156
158
|
# @return [::Boolean]
|
157
159
|
# Turn off character box detector in OCR engine. Character box detection is
|