google-cloud-document_ai-v1beta3 0.23.0 → 0.25.0
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/v1beta3/document_processor_service/client.rb +57 -40
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +57 -40
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +932 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/credentials.rb +51 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +770 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/paths.rb +90 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +761 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +815 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb +406 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest.rb +54 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service.rb +56 -0
- data/lib/google/cloud/document_ai/v1beta3/rest.rb +1 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3.rb +1 -0
- data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +62 -0
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/document_pb.rb +4 -1
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +4 -1
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +8 -6
- data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +3 -1
- data/lib/google/cloud/documentai/v1beta3/document_service_pb.rb +78 -0
- data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +55 -0
- data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +1 -1
- data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +187 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document.rb +120 -27
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +10 -1
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +261 -123
- data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +44 -13
- data/proto_docs/google/cloud/documentai/v1beta3/document_service.rb +275 -0
- data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +12 -10
- data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -2
- metadata +16 -2
@@ -0,0 +1,187 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 V1beta3
|
24
|
+
# A singleton resource under a
|
25
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} which configures a
|
26
|
+
# collection of documents.
|
27
|
+
# @!attribute [rw] gcs_managed_config
|
28
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Dataset::GCSManagedConfig]
|
29
|
+
# Optional. User-managed Cloud Storage dataset configuration. Use this
|
30
|
+
# configuration if the dataset documents are stored under a user-managed
|
31
|
+
# Cloud Storage location.
|
32
|
+
# @!attribute [rw] document_warehouse_config
|
33
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Dataset::DocumentWarehouseConfig]
|
34
|
+
# Optional. Document AI Warehouse-based dataset configuration.
|
35
|
+
# @!attribute [rw] unmanaged_dataset_config
|
36
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Dataset::UnmanagedDatasetConfig]
|
37
|
+
# Optional. Unmanaged dataset configuration. Use this configuration if the
|
38
|
+
# dataset documents are managed by the document service internally (not
|
39
|
+
# user-managed).
|
40
|
+
# @!attribute [rw] spanner_indexing_config
|
41
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Dataset::SpannerIndexingConfig]
|
42
|
+
# Optional. A lightweight indexing source with low latency and high
|
43
|
+
# reliability, but lacking advanced features like CMEK and content-based
|
44
|
+
# search.
|
45
|
+
# @!attribute [rw] name
|
46
|
+
# @return [::String]
|
47
|
+
# Dataset resource name.
|
48
|
+
# Format:
|
49
|
+
# `projects/{project}/locations/{location}/processors/{processor}/dataset`
|
50
|
+
# @!attribute [rw] state
|
51
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Dataset::State]
|
52
|
+
# Required. State of the dataset. Ignored when updating dataset.
|
53
|
+
class Dataset
|
54
|
+
include ::Google::Protobuf::MessageExts
|
55
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
|
+
|
57
|
+
# Configuration specific to the Cloud Storage-based implementation.
|
58
|
+
# @!attribute [rw] gcs_prefix
|
59
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::GcsPrefix]
|
60
|
+
# Required. The Cloud Storage URI (a directory) where the documents
|
61
|
+
# belonging to the dataset must be stored.
|
62
|
+
class GCSManagedConfig
|
63
|
+
include ::Google::Protobuf::MessageExts
|
64
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
65
|
+
end
|
66
|
+
|
67
|
+
# Configuration specific to the Document AI Warehouse-based implementation.
|
68
|
+
# @!attribute [r] collection
|
69
|
+
# @return [::String]
|
70
|
+
# Output only. The collection in Document AI Warehouse associated with the
|
71
|
+
# dataset.
|
72
|
+
# @!attribute [r] schema
|
73
|
+
# @return [::String]
|
74
|
+
# Output only. The schema in Document AI Warehouse associated with the
|
75
|
+
# dataset.
|
76
|
+
class DocumentWarehouseConfig
|
77
|
+
include ::Google::Protobuf::MessageExts
|
78
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
79
|
+
end
|
80
|
+
|
81
|
+
# Configuration specific to an unmanaged dataset.
|
82
|
+
class UnmanagedDatasetConfig
|
83
|
+
include ::Google::Protobuf::MessageExts
|
84
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
85
|
+
end
|
86
|
+
|
87
|
+
# Configuration specific to spanner-based indexing.
|
88
|
+
class SpannerIndexingConfig
|
89
|
+
include ::Google::Protobuf::MessageExts
|
90
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
91
|
+
end
|
92
|
+
|
93
|
+
# Different states of a dataset.
|
94
|
+
module State
|
95
|
+
# Default unspecified enum, should not be used.
|
96
|
+
STATE_UNSPECIFIED = 0
|
97
|
+
|
98
|
+
# Dataset has not been initialized.
|
99
|
+
UNINITIALIZED = 1
|
100
|
+
|
101
|
+
# Dataset is being initialized.
|
102
|
+
INITIALIZING = 2
|
103
|
+
|
104
|
+
# Dataset has been initialized.
|
105
|
+
INITIALIZED = 3
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# Document Identifier.
|
110
|
+
# @!attribute [rw] gcs_managed_doc_id
|
111
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DocumentId::GCSManagedDocumentId]
|
112
|
+
# A document id within user-managed Cloud Storage.
|
113
|
+
# @!attribute [rw] unmanaged_doc_id
|
114
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DocumentId::UnmanagedDocumentId]
|
115
|
+
# A document id within unmanaged dataset.
|
116
|
+
# @!attribute [rw] revision_ref
|
117
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::RevisionRef]
|
118
|
+
# Points to a specific revision of the document if set.
|
119
|
+
class DocumentId
|
120
|
+
include ::Google::Protobuf::MessageExts
|
121
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
122
|
+
|
123
|
+
# Identifies a document uniquely within the scope of a dataset in the
|
124
|
+
# user-managed Cloud Storage option.
|
125
|
+
# @!attribute [rw] gcs_uri
|
126
|
+
# @return [::String]
|
127
|
+
# Required. The Cloud Storage URI where the actual document is stored.
|
128
|
+
# @!attribute [rw] cw_doc_id
|
129
|
+
# @return [::String]
|
130
|
+
# Id of the document (indexed) managed by Content Warehouse.
|
131
|
+
class GCSManagedDocumentId
|
132
|
+
include ::Google::Protobuf::MessageExts
|
133
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
134
|
+
end
|
135
|
+
|
136
|
+
# Identifies a document uniquely within the scope of a dataset in unmanaged
|
137
|
+
# option.
|
138
|
+
# @!attribute [rw] doc_id
|
139
|
+
# @return [::String]
|
140
|
+
# Required. The id of the document.
|
141
|
+
class UnmanagedDocumentId
|
142
|
+
include ::Google::Protobuf::MessageExts
|
143
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Dataset Schema.
|
148
|
+
# @!attribute [rw] name
|
149
|
+
# @return [::String]
|
150
|
+
# Dataset schema resource name.
|
151
|
+
# Format:
|
152
|
+
# `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`
|
153
|
+
# @!attribute [rw] document_schema
|
154
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema]
|
155
|
+
# Optional. Schema of the dataset.
|
156
|
+
class DatasetSchema
|
157
|
+
include ::Google::Protobuf::MessageExts
|
158
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
159
|
+
end
|
160
|
+
|
161
|
+
# Dataset documents that the batch operation will be applied to.
|
162
|
+
# @!attribute [rw] individual_document_ids
|
163
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::BatchDatasetDocuments::IndividualDocumentIds]
|
164
|
+
# Document identifiers.
|
165
|
+
# @!attribute [rw] filter
|
166
|
+
# @return [::String]
|
167
|
+
# A filter matching the documents.
|
168
|
+
# Follows the same format and restriction as
|
169
|
+
# [google.cloud.documentai.master.ListDocumentsRequest.filter].
|
170
|
+
class BatchDatasetDocuments
|
171
|
+
include ::Google::Protobuf::MessageExts
|
172
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
173
|
+
|
174
|
+
# List of individual DocumentIds.
|
175
|
+
# @!attribute [rw] document_ids
|
176
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::DocumentId>]
|
177
|
+
# Required. List of Document IDs indicating where the actual documents are
|
178
|
+
# stored.
|
179
|
+
class IndividualDocumentIds
|
180
|
+
include ::Google::Protobuf::MessageExts
|
181
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
@@ -28,10 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] uri
|
29
29
|
# @return [::String]
|
30
30
|
# Optional. Currently supports Google Cloud Storage URI of the form
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# info.
|
31
|
+
# `gs://bucket_name/object_name`. Object versioning is not supported.
|
32
|
+
# For more information, refer to [Google Cloud Storage Request
|
33
|
+
# URIs](https://cloud.google.com/storage/docs/reference-uris).
|
35
34
|
# @!attribute [rw] content
|
36
35
|
# @return [::String]
|
37
36
|
# Optional. Inline document content, represented as a stream of bytes.
|
@@ -39,9 +38,8 @@ module Google
|
|
39
38
|
# representation, whereas JSON representations use base64.
|
40
39
|
# @!attribute [rw] mime_type
|
41
40
|
# @return [::String]
|
42
|
-
# An IANA published
|
43
|
-
#
|
44
|
-
# https://www.iana.org/assignments/media-types/media-types.xhtml.
|
41
|
+
# An IANA published [media type (MIME
|
42
|
+
# type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
|
45
43
|
# @!attribute [rw] text
|
46
44
|
# @return [::String]
|
47
45
|
# Optional. UTF-8 encoded text in reading order from the document.
|
@@ -115,17 +113,18 @@ module Google
|
|
115
113
|
# Text background color.
|
116
114
|
# @!attribute [rw] font_weight
|
117
115
|
# @return [::String]
|
118
|
-
# Font weight.
|
119
|
-
#
|
116
|
+
# [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
|
117
|
+
# Possible values are `normal`, `bold`, `bolder`, and `lighter`.
|
120
118
|
# @!attribute [rw] text_style
|
121
119
|
# @return [::String]
|
122
|
-
# Text style.
|
123
|
-
#
|
120
|
+
# [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
|
121
|
+
# Possible values are `normal`, `italic`, and `oblique`.
|
124
122
|
# @!attribute [rw] text_decoration
|
125
123
|
# @return [::String]
|
126
|
-
# Text
|
127
|
-
#
|
128
|
-
#
|
124
|
+
# [Text
|
125
|
+
# decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
|
126
|
+
# Follows CSS standard. <text-decoration-line> <text-decoration-color>
|
127
|
+
# <text-decoration-style>
|
129
128
|
# @!attribute [rw] font_size
|
130
129
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize]
|
131
130
|
# Font size.
|
@@ -143,7 +142,8 @@ module Google
|
|
143
142
|
# Font size for the text.
|
144
143
|
# @!attribute [rw] unit
|
145
144
|
# @return [::String]
|
146
|
-
# Unit for the font size. Follows CSS naming (in
|
145
|
+
# Unit for the font size. Follows CSS naming (such as `in`, `px`, and
|
146
|
+
# `pt`).
|
147
147
|
class FontSize
|
148
148
|
include ::Google::Protobuf::MessageExts
|
149
149
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -212,7 +212,7 @@ module Google
|
|
212
212
|
# A list of detected barcodes.
|
213
213
|
# @!attribute [rw] image_quality_scores
|
214
214
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores]
|
215
|
-
# Image
|
215
|
+
# Image quality scores.
|
216
216
|
# @!attribute [rw] provenance
|
217
217
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
218
218
|
# The history of this page.
|
@@ -241,7 +241,9 @@ module Google
|
|
241
241
|
# Raw byte content of the image.
|
242
242
|
# @!attribute [rw] mime_type
|
243
243
|
# @return [::String]
|
244
|
-
# Encoding
|
244
|
+
# Encoding [media type (MIME
|
245
|
+
# type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
|
246
|
+
# for the image.
|
245
247
|
# @!attribute [rw] width
|
246
248
|
# @return [::Integer]
|
247
249
|
# Width of the image in pixels.
|
@@ -386,6 +388,9 @@ module Google
|
|
386
388
|
# @!attribute [rw] provenance
|
387
389
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
388
390
|
# The history of this annotation.
|
391
|
+
# @!attribute [rw] style_info
|
392
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo]
|
393
|
+
# Text style attributes.
|
389
394
|
class Token
|
390
395
|
include ::Google::Protobuf::MessageExts
|
391
396
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -414,6 +419,62 @@ module Google
|
|
414
419
|
HYPHEN = 3
|
415
420
|
end
|
416
421
|
end
|
422
|
+
|
423
|
+
# Font and other text style attributes.
|
424
|
+
# @!attribute [rw] font_size
|
425
|
+
# @return [::Integer]
|
426
|
+
# Font size in points (`1` point is `¹⁄₇₂` inches).
|
427
|
+
# @!attribute [rw] pixel_font_size
|
428
|
+
# @return [::Float]
|
429
|
+
# Font size in pixels, equal to _unrounded
|
430
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
|
431
|
+
# * _resolution_ ÷ `72.0`.
|
432
|
+
# @!attribute [rw] letter_spacing
|
433
|
+
# @return [::Float]
|
434
|
+
# Letter spacing in points.
|
435
|
+
# @!attribute [rw] font_type
|
436
|
+
# @return [::String]
|
437
|
+
# Name or style of the font.
|
438
|
+
# @!attribute [rw] bold
|
439
|
+
# @return [::Boolean]
|
440
|
+
# Whether the text is bold (equivalent to
|
441
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
|
442
|
+
# is at least `700`).
|
443
|
+
# @!attribute [rw] italic
|
444
|
+
# @return [::Boolean]
|
445
|
+
# Whether the text is italic.
|
446
|
+
# @!attribute [rw] underlined
|
447
|
+
# @return [::Boolean]
|
448
|
+
# Whether the text is underlined.
|
449
|
+
# @!attribute [rw] strikeout
|
450
|
+
# @return [::Boolean]
|
451
|
+
# Whether the text is strikethrough.
|
452
|
+
# @!attribute [rw] subscript
|
453
|
+
# @return [::Boolean]
|
454
|
+
# Whether the text is a subscript.
|
455
|
+
# @!attribute [rw] superscript
|
456
|
+
# @return [::Boolean]
|
457
|
+
# Whether the text is a superscript.
|
458
|
+
# @!attribute [rw] smallcaps
|
459
|
+
# @return [::Boolean]
|
460
|
+
# Whether the text is in small caps.
|
461
|
+
# @!attribute [rw] font_weight
|
462
|
+
# @return [::Integer]
|
463
|
+
# TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
|
464
|
+
# Normal is `400`, bold is `700`.
|
465
|
+
# @!attribute [rw] handwritten
|
466
|
+
# @return [::Boolean]
|
467
|
+
# Whether the text is handwritten.
|
468
|
+
# @!attribute [rw] text_color
|
469
|
+
# @return [::Google::Type::Color]
|
470
|
+
# Color of the text.
|
471
|
+
# @!attribute [rw] background_color
|
472
|
+
# @return [::Google::Type::Color]
|
473
|
+
# Color of the background.
|
474
|
+
class StyleInfo
|
475
|
+
include ::Google::Protobuf::MessageExts
|
476
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
477
|
+
end
|
417
478
|
end
|
418
479
|
|
419
480
|
# A detected symbol.
|
@@ -557,9 +618,9 @@ module Google
|
|
557
618
|
# Detected language for a structural component.
|
558
619
|
# @!attribute [rw] language_code
|
559
620
|
# @return [::String]
|
560
|
-
# The BCP-47 language
|
561
|
-
#
|
562
|
-
#
|
621
|
+
# The [BCP-47 language
|
622
|
+
# code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
|
623
|
+
# such as `en-US` or `sr-Latn`.
|
563
624
|
# @!attribute [rw] confidence
|
564
625
|
# @return [::Float]
|
565
626
|
# Confidence of detected language. Range `[0, 1]`.
|
@@ -568,10 +629,10 @@ module Google
|
|
568
629
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
569
630
|
end
|
570
631
|
|
571
|
-
# Image
|
632
|
+
# Image quality scores for the page image.
|
572
633
|
# @!attribute [rw] quality_score
|
573
634
|
# @return [::Float]
|
574
|
-
# The overall quality score. Range `[0, 1]` where 1 is perfect quality.
|
635
|
+
# The overall quality score. Range `[0, 1]` where `1` is perfect quality.
|
575
636
|
# @!attribute [rw] detected_defects
|
576
637
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>]
|
577
638
|
# A list of detected defects.
|
@@ -594,8 +655,8 @@ module Google
|
|
594
655
|
# - `quality/defect_glare`
|
595
656
|
# @!attribute [rw] confidence
|
596
657
|
# @return [::Float]
|
597
|
-
# Confidence of detected defect. Range `[0, 1]` where 1 indicates
|
598
|
-
# strong confidence
|
658
|
+
# Confidence of detected defect. Range `[0, 1]` where `1` indicates
|
659
|
+
# strong confidence that the defect exists.
|
599
660
|
class DetectedDefect
|
600
661
|
include ::Google::Protobuf::MessageExts
|
601
662
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -883,9 +944,9 @@ module Google
|
|
883
944
|
REMOVE = 2
|
884
945
|
|
885
946
|
# Updates any fields within the given provenance scope of the message. It
|
886
|
-
#
|
887
|
-
#
|
888
|
-
#
|
947
|
+
# overwrites the fields rather than replacing them. Use this when you
|
948
|
+
# want to update a field value of an entity without also updating all the
|
949
|
+
# child properties.
|
889
950
|
UPDATE = 7
|
890
951
|
|
891
952
|
# Currently unused. Replace an element identified by `parent`.
|
@@ -972,6 +1033,38 @@ module Google
|
|
972
1033
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
973
1034
|
end
|
974
1035
|
end
|
1036
|
+
|
1037
|
+
# The revision reference specifies which revision on the document to read.
|
1038
|
+
# @!attribute [rw] revision_case
|
1039
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::RevisionRef::RevisionCase]
|
1040
|
+
# Reads the revision by the predefined case.
|
1041
|
+
# @!attribute [rw] revision_id
|
1042
|
+
# @return [::String]
|
1043
|
+
# Reads the revision given by the id.
|
1044
|
+
# @!attribute [rw] latest_processor_version
|
1045
|
+
# @return [::String]
|
1046
|
+
# Reads the revision generated by the processor version.
|
1047
|
+
# The format takes the full resource name of processor version.
|
1048
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
1049
|
+
class RevisionRef
|
1050
|
+
include ::Google::Protobuf::MessageExts
|
1051
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1052
|
+
|
1053
|
+
# Some predefined revision cases.
|
1054
|
+
module RevisionCase
|
1055
|
+
# Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.
|
1056
|
+
REVISION_CASE_UNSPECIFIED = 0
|
1057
|
+
|
1058
|
+
# The latest revision made by a human.
|
1059
|
+
LATEST_HUMAN_REVIEW = 1
|
1060
|
+
|
1061
|
+
# The latest revision based on timestamp.
|
1062
|
+
LATEST_TIMESTAMP = 2
|
1063
|
+
|
1064
|
+
# The first (OCR) revision.
|
1065
|
+
BASE_OCR_REVISION = 3
|
1066
|
+
end
|
1067
|
+
end
|
975
1068
|
end
|
976
1069
|
end
|
977
1070
|
end
|
@@ -130,10 +130,19 @@ module Google
|
|
130
130
|
# Adds additional latency comparable to regular OCR to the process call.
|
131
131
|
# @!attribute [rw] advanced_ocr_options
|
132
132
|
# @return [::Array<::String>]
|
133
|
-
# A list of advanced OCR options to further fine-tune OCR behavior.
|
133
|
+
# A list of advanced OCR options to further fine-tune OCR behavior. Current
|
134
|
+
# valid values are:
|
135
|
+
#
|
136
|
+
# - `legacy_layout`: a heuristics layout detection algorithm, which serves as
|
137
|
+
# an alternative to the current ML-based layout detection algorithm.
|
138
|
+
# Customers can choose the best suitable layout algorithm based on their
|
139
|
+
# situation.
|
134
140
|
# @!attribute [rw] enable_symbol
|
135
141
|
# @return [::Boolean]
|
136
142
|
# Includes symbol level OCR information if set to true.
|
143
|
+
# @!attribute [rw] compute_style_info
|
144
|
+
# @return [::Boolean]
|
145
|
+
# Turn on font id model and returns font style information.
|
137
146
|
class OcrConfig
|
138
147
|
include ::Google::Protobuf::MessageExts
|
139
148
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|