google-cloud-document_ai-v1beta3 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-document_ai-v1beta3.rb +21 -0
- data/lib/google/cloud/document_ai/v1beta3.rb +35 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +53 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +570 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/credentials.rb +51 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +570 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +71 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +28 -0
- data/lib/google/cloud/documentai/v1beta3/document_pb.rb +303 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +106 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +54 -0
- data/lib/google/cloud/documentai/v1beta3/geometry_pb.rb +34 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document.rb +816 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +235 -0
- data/proto_docs/google/cloud/documentai/v1beta3/geometry.rb +65 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/color.rb +168 -0
- data/proto_docs/google/type/date.rb +50 -0
- data/proto_docs/google/type/datetime.rb +91 -0
- data/proto_docs/google/type/money.rb +43 -0
- data/proto_docs/google/type/postal_address.rb +135 -0
- metadata +219 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/documentai/v1beta3/document_processor_service.proto for package 'Google.Cloud.DocumentAI.V1beta3'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/documentai/v1beta3/document_processor_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DocumentAI
|
25
|
+
module V1beta3
|
26
|
+
module DocumentProcessorService
|
27
|
+
# Service to call Cloud DocumentAI to process documents according to the
|
28
|
+
# processor's definition. Processors are built using state-of-the-art Google
|
29
|
+
# AI such as natural language, computer vision, and translation to extract
|
30
|
+
# structured information from unstructured or semi-structured documents.
|
31
|
+
class Service
|
32
|
+
|
33
|
+
include GRPC::GenericService
|
34
|
+
|
35
|
+
self.marshal_class_method = :encode
|
36
|
+
self.unmarshal_class_method = :decode
|
37
|
+
self.service_name = 'google.cloud.documentai.v1beta3.DocumentProcessorService'
|
38
|
+
|
39
|
+
# Processes a single document.
|
40
|
+
rpc :ProcessDocument, ::Google::Cloud::DocumentAI::V1beta3::ProcessRequest, ::Google::Cloud::DocumentAI::V1beta3::ProcessResponse
|
41
|
+
# LRO endpoint to batch process many documents. The output is written
|
42
|
+
# to Cloud Storage as JSON in the [Document] format.
|
43
|
+
rpc :BatchProcessDocuments, ::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest, ::Google::Longrunning::Operation
|
44
|
+
# Send a document for Human Review. The input document should be processed by
|
45
|
+
# the specified processor.
|
46
|
+
rpc :ReviewDocument, ::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest, ::Google::Longrunning::Operation
|
47
|
+
end
|
48
|
+
|
49
|
+
Stub = Service.rpc_stub_class
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/documentai/v1beta3/geometry.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/cloud/documentai/v1beta3/geometry.proto", :syntax => :proto3) do
|
9
|
+
add_message "google.cloud.documentai.v1beta3.Vertex" do
|
10
|
+
optional :x, :int32, 1
|
11
|
+
optional :y, :int32, 2
|
12
|
+
end
|
13
|
+
add_message "google.cloud.documentai.v1beta3.NormalizedVertex" do
|
14
|
+
optional :x, :float, 1
|
15
|
+
optional :y, :float, 2
|
16
|
+
end
|
17
|
+
add_message "google.cloud.documentai.v1beta3.BoundingPoly" do
|
18
|
+
repeated :vertices, :message, 1, "google.cloud.documentai.v1beta3.Vertex"
|
19
|
+
repeated :normalized_vertices, :message, 2, "google.cloud.documentai.v1beta3.NormalizedVertex"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module DocumentAI
|
27
|
+
module V1beta3
|
28
|
+
Vertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Vertex").msgclass
|
29
|
+
NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.NormalizedVertex").msgclass
|
30
|
+
BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.BoundingPoly").msgclass
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,283 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [::String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [::Array<::String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [::String]
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
190
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
194
|
+
# @!attribute [rw] singular
|
195
|
+
# @return [::String]
|
196
|
+
# The same concept of the `singular` field in k8s CRD spec
|
197
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
198
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
204
|
+
class ResourceDescriptor
|
205
|
+
include ::Google::Protobuf::MessageExts
|
206
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
|
+
|
208
|
+
# A description of the historical or future-looking state of the
|
209
|
+
# resource pattern.
|
210
|
+
module History
|
211
|
+
# The "unset" value.
|
212
|
+
HISTORY_UNSPECIFIED = 0
|
213
|
+
|
214
|
+
# The resource originally had one pattern and launched as such, and
|
215
|
+
# additional patterns were added later.
|
216
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
217
|
+
|
218
|
+
# The resource has one pattern, but the API owner expects to add more
|
219
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
220
|
+
# that from being necessary once there are multiple patterns.)
|
221
|
+
FUTURE_MULTI_PATTERN = 2
|
222
|
+
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
# Defines a proto annotation that describes a string field that refers to
|
242
|
+
# an API resource.
|
243
|
+
# @!attribute [rw] type
|
244
|
+
# @return [::String]
|
245
|
+
# The resource type that the annotated field references.
|
246
|
+
#
|
247
|
+
# Example:
|
248
|
+
#
|
249
|
+
# message Subscription {
|
250
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
251
|
+
# type: "pubsub.googleapis.com/Topic"
|
252
|
+
# }];
|
253
|
+
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
265
|
+
# @!attribute [rw] child_type
|
266
|
+
# @return [::String]
|
267
|
+
# The resource type of a child collection that the annotated field
|
268
|
+
# references. This is useful for annotating the `parent` field that
|
269
|
+
# doesn't have a fixed resource type.
|
270
|
+
#
|
271
|
+
# Example:
|
272
|
+
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
278
|
+
class ResourceReference
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
@@ -0,0 +1,816 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
# Document represents the canonical document resource in Document Understanding
|
25
|
+
# AI.
|
26
|
+
# It is an interchange format that provides insights into documents and allows
|
27
|
+
# for collaboration between users and Document Understanding AI to iterate and
|
28
|
+
# optimize for quality.
|
29
|
+
# @!attribute [rw] uri
|
30
|
+
# @return [::String]
|
31
|
+
# Currently supports Google Cloud Storage URI of the form
|
32
|
+
# `gs://bucket_name/object_name`. Object versioning is not supported.
|
33
|
+
# See [Google Cloud Storage Request
|
34
|
+
# URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
35
|
+
# info.
|
36
|
+
# @!attribute [rw] content
|
37
|
+
# @return [::String]
|
38
|
+
# Inline document content, represented as a stream of bytes.
|
39
|
+
# Note: As with all `bytes` fields, protobuffers use a pure binary
|
40
|
+
# representation, whereas JSON representations use base64.
|
41
|
+
# @!attribute [rw] mime_type
|
42
|
+
# @return [::String]
|
43
|
+
# An IANA published MIME type (also referred to as media type). For more
|
44
|
+
# information, see
|
45
|
+
# https://www.iana.org/assignments/media-types/media-types.xhtml.
|
46
|
+
# @!attribute [rw] text
|
47
|
+
# @return [::String]
|
48
|
+
# UTF-8 encoded text in reading order from the document.
|
49
|
+
# @!attribute [rw] text_styles
|
50
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>]
|
51
|
+
# Styles for the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
52
|
+
# @!attribute [rw] pages
|
53
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>]
|
54
|
+
# Visual page layout for the {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
55
|
+
# @!attribute [rw] entities
|
56
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>]
|
57
|
+
# A list of entities detected on {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. For document shards,
|
58
|
+
# entities in this list may cross shard boundaries.
|
59
|
+
# @!attribute [rw] entity_relations
|
60
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>]
|
61
|
+
# Relationship among {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
|
62
|
+
# @!attribute [rw] translations
|
63
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Translation>]
|
64
|
+
# A list of translations on {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. For document shards,
|
65
|
+
# translations in this list may cross shard boundaries.
|
66
|
+
# @!attribute [rw] text_changes
|
67
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>]
|
68
|
+
# A list of text corrections made to [Document.text]. This is usually
|
69
|
+
# used for annotating corrections to OCR mistakes. Text changes for a given
|
70
|
+
# revision may not overlap with each other.
|
71
|
+
# @!attribute [rw] shard_info
|
72
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo]
|
73
|
+
# Information about the sharding if this document is sharded part of a larger
|
74
|
+
# document. If the document is not sharded, this message is not specified.
|
75
|
+
# @!attribute [rw] error
|
76
|
+
# @return [::Google::Rpc::Status]
|
77
|
+
# Any error that occurred while processing this document.
|
78
|
+
# @!attribute [rw] revisions
|
79
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>]
|
80
|
+
# Revision history of this document.
|
81
|
+
class Document
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
|
85
|
+
# For a large document, sharding may be performed to produce several
|
86
|
+
# document shards. Each document shard contains this field to detail which
|
87
|
+
# shard it is.
|
88
|
+
# @!attribute [rw] shard_index
|
89
|
+
# @return [::Integer]
|
90
|
+
# The 0-based index of this shard.
|
91
|
+
# @!attribute [rw] shard_count
|
92
|
+
# @return [::Integer]
|
93
|
+
# Total number of shards.
|
94
|
+
# @!attribute [rw] text_offset
|
95
|
+
# @return [::Integer]
|
96
|
+
# The index of the first character in {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text} in the overall
|
97
|
+
# document global text.
|
98
|
+
class ShardInfo
|
99
|
+
include ::Google::Protobuf::MessageExts
|
100
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
101
|
+
end
|
102
|
+
|
103
|
+
# Annotation for common text style attributes. This adheres to CSS
|
104
|
+
# conventions as much as possible.
|
105
|
+
# @!attribute [rw] text_anchor
|
106
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
107
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
108
|
+
# @!attribute [rw] color
|
109
|
+
# @return [::Google::Type::Color]
|
110
|
+
# Text color.
|
111
|
+
# @!attribute [rw] background_color
|
112
|
+
# @return [::Google::Type::Color]
|
113
|
+
# Text background color.
|
114
|
+
# @!attribute [rw] font_weight
|
115
|
+
# @return [::String]
|
116
|
+
# Font weight. Possible values are normal, bold, bolder, and lighter.
|
117
|
+
# https://www.w3schools.com/cssref/pr_font_weight.asp
|
118
|
+
# @!attribute [rw] text_style
|
119
|
+
# @return [::String]
|
120
|
+
# Text style. Possible values are normal, italic, and oblique.
|
121
|
+
# https://www.w3schools.com/cssref/pr_font_font-style.asp
|
122
|
+
# @!attribute [rw] text_decoration
|
123
|
+
# @return [::String]
|
124
|
+
# Text decoration. Follows CSS standard.
|
125
|
+
# <text-decoration-line> <text-decoration-color> <text-decoration-style>
|
126
|
+
# https://www.w3schools.com/cssref/pr_text_text-decoration.asp
|
127
|
+
# @!attribute [rw] font_size
|
128
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize]
|
129
|
+
# Font size.
|
130
|
+
class Style
|
131
|
+
include ::Google::Protobuf::MessageExts
|
132
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
133
|
+
|
134
|
+
# Font size with unit.
|
135
|
+
# @!attribute [rw] size
|
136
|
+
# @return [::Float]
|
137
|
+
# Font size for the text.
|
138
|
+
# @!attribute [rw] unit
|
139
|
+
# @return [::String]
|
140
|
+
# Unit for the font size. Follows CSS naming (in, px, pt, etc.).
|
141
|
+
class FontSize
|
142
|
+
include ::Google::Protobuf::MessageExts
|
143
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# A page in a {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
148
|
+
# @!attribute [rw] page_number
|
149
|
+
# @return [::Integer]
|
150
|
+
# 1-based index for current {::Google::Cloud::DocumentAI::V1beta3::Document::Page Page} in a parent {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
|
151
|
+
# Useful when a page is taken out of a {::Google::Cloud::DocumentAI::V1beta3::Document Document} for individual
|
152
|
+
# processing.
|
153
|
+
# @!attribute [rw] image
|
154
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Image]
|
155
|
+
# Rendered image for this page. This image is preprocessed to remove any
|
156
|
+
# skew, rotation, and distortions such that the annotation bounding boxes
|
157
|
+
# can be upright and axis-aligned.
|
158
|
+
# @!attribute [rw] transforms
|
159
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Matrix>]
|
160
|
+
# Transformation matrices that were applied to the original document image
|
161
|
+
# to produce {::Google::Cloud::DocumentAI::V1beta3::Document::Page#image Page.image}.
|
162
|
+
# @!attribute [rw] dimension
|
163
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Dimension]
|
164
|
+
# Physical dimension of the page.
|
165
|
+
# @!attribute [rw] layout
|
166
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
167
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the page.
|
168
|
+
# @!attribute [rw] detected_languages
|
169
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
170
|
+
# A list of detected languages together with confidence.
|
171
|
+
# @!attribute [rw] blocks
|
172
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block>]
|
173
|
+
# A list of visually detected text blocks on the page.
|
174
|
+
# A block has a set of lines (collected into paragraphs) that have a common
|
175
|
+
# line-spacing and orientation.
|
176
|
+
# @!attribute [rw] paragraphs
|
177
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph>]
|
178
|
+
# A list of visually detected text paragraphs on the page.
|
179
|
+
# A collection of lines that a human would perceive as a paragraph.
|
180
|
+
# @!attribute [rw] lines
|
181
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line>]
|
182
|
+
# A list of visually detected text lines on the page.
|
183
|
+
# A collection of tokens that a human would perceive as a line.
|
184
|
+
# @!attribute [rw] tokens
|
185
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token>]
|
186
|
+
# A list of visually detected tokens on the page.
|
187
|
+
# @!attribute [rw] visual_elements
|
188
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement>]
|
189
|
+
# A list of detected non-text visual elements e.g. checkbox,
|
190
|
+
# signature etc. on the page.
|
191
|
+
# @!attribute [rw] tables
|
192
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table>]
|
193
|
+
# A list of visually detected tables on the page.
|
194
|
+
# @!attribute [rw] form_fields
|
195
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>]
|
196
|
+
# A list of visually detected form fields on the page.
|
197
|
+
class Page
|
198
|
+
include ::Google::Protobuf::MessageExts
|
199
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
200
|
+
|
201
|
+
# Dimension for the page.
|
202
|
+
# @!attribute [rw] width
|
203
|
+
# @return [::Float]
|
204
|
+
# Page width.
|
205
|
+
# @!attribute [rw] height
|
206
|
+
# @return [::Float]
|
207
|
+
# Page height.
|
208
|
+
# @!attribute [rw] unit
|
209
|
+
# @return [::String]
|
210
|
+
# Dimension unit.
|
211
|
+
class Dimension
|
212
|
+
include ::Google::Protobuf::MessageExts
|
213
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
214
|
+
end
|
215
|
+
|
216
|
+
# Rendered image contents for this page.
|
217
|
+
# @!attribute [rw] content
|
218
|
+
# @return [::String]
|
219
|
+
# Raw byte content of the image.
|
220
|
+
# @!attribute [rw] mime_type
|
221
|
+
# @return [::String]
|
222
|
+
# Encoding mime type for the image.
|
223
|
+
# @!attribute [rw] width
|
224
|
+
# @return [::Integer]
|
225
|
+
# Width of the image in pixels.
|
226
|
+
# @!attribute [rw] height
|
227
|
+
# @return [::Integer]
|
228
|
+
# Height of the image in pixels.
|
229
|
+
class Image
|
230
|
+
include ::Google::Protobuf::MessageExts
|
231
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
232
|
+
end
|
233
|
+
|
234
|
+
# Representation for transformation matrix, intended to be compatible and
|
235
|
+
# used with OpenCV format for image manipulation.
|
236
|
+
# @!attribute [rw] rows
|
237
|
+
# @return [::Integer]
|
238
|
+
# Number of rows in the matrix.
|
239
|
+
# @!attribute [rw] cols
|
240
|
+
# @return [::Integer]
|
241
|
+
# Number of columns in the matrix.
|
242
|
+
# @!attribute [rw] type
|
243
|
+
# @return [::Integer]
|
244
|
+
# This encodes information about what data type the matrix uses.
|
245
|
+
# For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
|
246
|
+
# of OpenCV primitive data types, please refer to
|
247
|
+
# https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
|
248
|
+
# @!attribute [rw] data
|
249
|
+
# @return [::String]
|
250
|
+
# The matrix data.
|
251
|
+
class Matrix
|
252
|
+
include ::Google::Protobuf::MessageExts
|
253
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
254
|
+
end
|
255
|
+
|
256
|
+
# Visual element describing a layout unit on a page.
|
257
|
+
# @!attribute [rw] text_anchor
|
258
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
259
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
260
|
+
# @!attribute [rw] confidence
|
261
|
+
# @return [::Float]
|
262
|
+
# Confidence of the current {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} within context of the object this
|
263
|
+
# layout is for. e.g. confidence can be for a single token, a table,
|
264
|
+
# a visual element, etc. depending on context. Range [0, 1].
|
265
|
+
# @!attribute [rw] bounding_poly
|
266
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
|
267
|
+
# The bounding polygon for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
268
|
+
# @!attribute [rw] orientation
|
269
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout::Orientation]
|
270
|
+
# Detected orientation for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout}.
|
271
|
+
class Layout
|
272
|
+
include ::Google::Protobuf::MessageExts
|
273
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
274
|
+
|
275
|
+
# Detected human reading orientation.
|
276
|
+
module Orientation
|
277
|
+
# Unspecified orientation.
|
278
|
+
ORIENTATION_UNSPECIFIED = 0
|
279
|
+
|
280
|
+
# Orientation is aligned with page up.
|
281
|
+
PAGE_UP = 1
|
282
|
+
|
283
|
+
# Orientation is aligned with page right.
|
284
|
+
# Turn the head 90 degrees clockwise from upright to read.
|
285
|
+
PAGE_RIGHT = 2
|
286
|
+
|
287
|
+
# Orientation is aligned with page down.
|
288
|
+
# Turn the head 180 degrees from upright to read.
|
289
|
+
PAGE_DOWN = 3
|
290
|
+
|
291
|
+
# Orientation is aligned with page left.
|
292
|
+
# Turn the head 90 degrees counterclockwise from upright to read.
|
293
|
+
PAGE_LEFT = 4
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# A block has a set of lines (collected into paragraphs) that have a
|
298
|
+
# common line-spacing and orientation.
|
299
|
+
# @!attribute [rw] layout
|
300
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
301
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Block Block}.
|
302
|
+
# @!attribute [rw] detected_languages
|
303
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
304
|
+
# A list of detected languages together with confidence.
|
305
|
+
# @!attribute [rw] provenance
|
306
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
307
|
+
# The history of this annotation.
|
308
|
+
class Block
|
309
|
+
include ::Google::Protobuf::MessageExts
|
310
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
311
|
+
end
|
312
|
+
|
313
|
+
# A collection of lines that a human would perceive as a paragraph.
|
314
|
+
# @!attribute [rw] layout
|
315
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
316
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Paragraph Paragraph}.
|
317
|
+
# @!attribute [rw] detected_languages
|
318
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
319
|
+
# A list of detected languages together with confidence.
|
320
|
+
# @!attribute [rw] provenance
|
321
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
322
|
+
# The history of this annotation.
|
323
|
+
class Paragraph
|
324
|
+
include ::Google::Protobuf::MessageExts
|
325
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
326
|
+
end
|
327
|
+
|
328
|
+
# A collection of tokens that a human would perceive as a line.
|
329
|
+
# Does not cross column boundaries, can be horizontal, vertical, etc.
|
330
|
+
# @!attribute [rw] layout
|
331
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
332
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Line Line}.
|
333
|
+
# @!attribute [rw] detected_languages
|
334
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
335
|
+
# A list of detected languages together with confidence.
|
336
|
+
# @!attribute [rw] provenance
|
337
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
338
|
+
# The history of this annotation.
|
339
|
+
class Line
|
340
|
+
include ::Google::Protobuf::MessageExts
|
341
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
342
|
+
end
|
343
|
+
|
344
|
+
# A detected token.
|
345
|
+
# @!attribute [rw] layout
|
346
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
347
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
348
|
+
# @!attribute [rw] detected_break
|
349
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak]
|
350
|
+
# Detected break at the end of a {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
351
|
+
# @!attribute [rw] detected_languages
|
352
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
353
|
+
# A list of detected languages together with confidence.
|
354
|
+
# @!attribute [rw] provenance
|
355
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
356
|
+
# The history of this annotation.
|
357
|
+
class Token
|
358
|
+
include ::Google::Protobuf::MessageExts
|
359
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
360
|
+
|
361
|
+
# Detected break at the end of a {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
|
362
|
+
# @!attribute [rw] type
|
363
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
|
364
|
+
# Detected break type.
|
365
|
+
class DetectedBreak
|
366
|
+
include ::Google::Protobuf::MessageExts
|
367
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
368
|
+
|
369
|
+
# Enum to denote the type of break found.
|
370
|
+
module Type
|
371
|
+
# Unspecified break type.
|
372
|
+
TYPE_UNSPECIFIED = 0
|
373
|
+
|
374
|
+
# A single whitespace.
|
375
|
+
SPACE = 1
|
376
|
+
|
377
|
+
# A wider whitespace.
|
378
|
+
WIDE_SPACE = 2
|
379
|
+
|
380
|
+
# A hyphen that indicates that a token has been split across lines.
|
381
|
+
HYPHEN = 3
|
382
|
+
end
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
# Detected non-text visual elements e.g. checkbox, signature etc. on the
|
387
|
+
# page.
|
388
|
+
# @!attribute [rw] layout
|
389
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
390
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
391
|
+
# @!attribute [rw] type
|
392
|
+
# @return [::String]
|
393
|
+
# Type of the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::VisualElement VisualElement}.
|
394
|
+
# @!attribute [rw] detected_languages
|
395
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
396
|
+
# A list of detected languages together with confidence.
|
397
|
+
class VisualElement
|
398
|
+
include ::Google::Protobuf::MessageExts
|
399
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
400
|
+
end
|
401
|
+
|
402
|
+
# A table representation similar to HTML table structure.
|
403
|
+
# @!attribute [rw] layout
|
404
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
405
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table Table}.
|
406
|
+
# @!attribute [rw] header_rows
|
407
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>]
|
408
|
+
# Header rows of the table.
|
409
|
+
# @!attribute [rw] body_rows
|
410
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableRow>]
|
411
|
+
# Body rows of the table.
|
412
|
+
# @!attribute [rw] detected_languages
|
413
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
414
|
+
# A list of detected languages together with confidence.
|
415
|
+
class Table
|
416
|
+
include ::Google::Protobuf::MessageExts
|
417
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
418
|
+
|
419
|
+
# A row of table cells.
|
420
|
+
# @!attribute [rw] cells
|
421
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell>]
|
422
|
+
# Cells that make up this row.
|
423
|
+
class TableRow
|
424
|
+
include ::Google::Protobuf::MessageExts
|
425
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
426
|
+
end
|
427
|
+
|
428
|
+
# A cell representation inside the table.
|
429
|
+
# @!attribute [rw] layout
|
430
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
431
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Table::TableCell TableCell}.
|
432
|
+
# @!attribute [rw] row_span
|
433
|
+
# @return [::Integer]
|
434
|
+
# How many rows this cell spans.
|
435
|
+
# @!attribute [rw] col_span
|
436
|
+
# @return [::Integer]
|
437
|
+
# How many columns this cell spans.
|
438
|
+
# @!attribute [rw] detected_languages
|
439
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
440
|
+
# A list of detected languages together with confidence.
|
441
|
+
class TableCell
|
442
|
+
include ::Google::Protobuf::MessageExts
|
443
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
444
|
+
end
|
445
|
+
end
|
446
|
+
|
447
|
+
# A form field detected on the page.
|
448
|
+
# @!attribute [rw] field_name
|
449
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
450
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} name. e.g. `Address`, `Email`,
|
451
|
+
# `Grand total`, `Phone number`, etc.
|
452
|
+
# @!attribute [rw] field_value
|
453
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
|
454
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField FormField} value.
|
455
|
+
# @!attribute [rw] name_detected_languages
|
456
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
457
|
+
# A list of detected languages for name together with confidence.
|
458
|
+
# @!attribute [rw] value_detected_languages
|
459
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>]
|
460
|
+
# A list of detected languages for value together with confidence.
|
461
|
+
# @!attribute [rw] value_type
|
462
|
+
# @return [::String]
|
463
|
+
# If the value is non-textual, this field represents the type. Current
|
464
|
+
# valid values are:
|
465
|
+
# - blank (this indicates the field_value is normal text)
|
466
|
+
# - "unfilled_checkbox"
|
467
|
+
# - "filled_checkbox"
|
468
|
+
class FormField
|
469
|
+
include ::Google::Protobuf::MessageExts
|
470
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
471
|
+
end
|
472
|
+
|
473
|
+
# Detected language for a structural component.
|
474
|
+
# @!attribute [rw] language_code
|
475
|
+
# @return [::String]
|
476
|
+
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
477
|
+
# information, see
|
478
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
479
|
+
# @!attribute [rw] confidence
|
480
|
+
# @return [::Float]
|
481
|
+
# Confidence of detected language. Range [0, 1].
|
482
|
+
class DetectedLanguage
|
483
|
+
include ::Google::Protobuf::MessageExts
|
484
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
485
|
+
end
|
486
|
+
end
|
487
|
+
|
488
|
+
# A phrase in the text that is a known entity type, such as a person, an
|
489
|
+
# organization, or location.
|
490
|
+
# @!attribute [rw] text_anchor
|
491
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
492
|
+
# Provenance of the entity.
|
493
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
494
|
+
# @!attribute [rw] type
|
495
|
+
# @return [::String]
|
496
|
+
# Entity type from a schema e.g. `Address`.
|
497
|
+
# @!attribute [rw] mention_text
|
498
|
+
# @return [::String]
|
499
|
+
# Text value in the document e.g. `1600 Amphitheatre Pkwy`.
|
500
|
+
# @!attribute [rw] mention_id
|
501
|
+
# @return [::String]
|
502
|
+
# Deprecated. Use `id` field instead.
|
503
|
+
# @!attribute [rw] confidence
|
504
|
+
# @return [::Float]
|
505
|
+
# Optional. Confidence of detected Schema entity. Range [0, 1].
|
506
|
+
# @!attribute [rw] page_anchor
|
507
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor]
|
508
|
+
# Optional. Represents the provenance of this entity wrt. the location on the
|
509
|
+
# page where it was found.
|
510
|
+
# @!attribute [rw] id
|
511
|
+
# @return [::String]
|
512
|
+
# Canonical id. This will be a unique value in the entity list
|
513
|
+
# for this document.
|
514
|
+
# @!attribute [rw] normalized_value
|
515
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Entity::NormalizedValue]
|
516
|
+
# Optional. Normalized entity value. Absent if the extracted value could not be
|
517
|
+
# converted or the type (e.g. address) is not supported for certain
|
518
|
+
# parsers. This field is also only populated for certain supported document
|
519
|
+
# types.
|
520
|
+
# @!attribute [rw] properties
|
521
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Entity>]
|
522
|
+
# Optional. Entities can be nested to form a hierarchical data structure representing
|
523
|
+
# the content in the document.
|
524
|
+
# @!attribute [rw] provenance
|
525
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
|
526
|
+
# Optional. The history of this annotation.
|
527
|
+
# @!attribute [rw] redacted
|
528
|
+
# @return [::Boolean]
|
529
|
+
# Optional. Whether the entity will be redacted for de-identification purposes.
|
530
|
+
class Entity
|
531
|
+
include ::Google::Protobuf::MessageExts
|
532
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
533
|
+
|
534
|
+
# Parsed and normalized entity value.
|
535
|
+
# @!attribute [rw] money_value
|
536
|
+
# @return [::Google::Type::Money]
|
537
|
+
# Money value. See also:
|
538
|
+
#
|
539
|
+
# https:
|
540
|
+
# github.com/googleapis/googleapis/blob/master/google/type/money.proto
|
541
|
+
# @!attribute [rw] date_value
|
542
|
+
# @return [::Google::Type::Date]
|
543
|
+
# Date value. Includes year, month, day. See also:
|
544
|
+
#
|
545
|
+
# https:
|
546
|
+
# github.com/googleapis/googleapis/blob/master/google/type/date.proto
|
547
|
+
# @!attribute [rw] datetime_value
|
548
|
+
# @return [::Google::Type::DateTime]
|
549
|
+
# DateTime value. Includes date, time, and timezone. See also:
|
550
|
+
#
|
551
|
+
# https:
|
552
|
+
# github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
|
553
|
+
# @!attribute [rw] address_value
|
554
|
+
# @return [::Google::Type::PostalAddress]
|
555
|
+
# Postal address. See also:
|
556
|
+
#
|
557
|
+
# https:
|
558
|
+
# github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
|
559
|
+
# @!attribute [rw] text
|
560
|
+
# @return [::String]
|
561
|
+
# Required. Normalized entity value stored as a string. This field is populated for
|
562
|
+
# supported document type (e.g. Invoice). For some entity types, one of
|
563
|
+
# respective 'structured_value' fields may also be populated.
|
564
|
+
#
|
565
|
+
# - Money/Currency type (`money_value`) is in the ISO 4217 text format.
|
566
|
+
# - Date type (`date_value`) is in the ISO 8601 text format.
|
567
|
+
# - Datetime type (`datetime_value`) is in the ISO 8601 text format.
|
568
|
+
class NormalizedValue
|
569
|
+
include ::Google::Protobuf::MessageExts
|
570
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
# Relationship between {::Google::Cloud::DocumentAI::V1beta3::Document::Entity Entities}.
|
575
|
+
# @!attribute [rw] subject_id
|
576
|
+
# @return [::String]
|
577
|
+
# Subject entity id.
|
578
|
+
# @!attribute [rw] object_id
|
579
|
+
# @return [::String]
|
580
|
+
# Object entity id.
|
581
|
+
# @!attribute [rw] relation
|
582
|
+
# @return [::String]
|
583
|
+
# Relationship description.
|
584
|
+
class EntityRelation
|
585
|
+
include ::Google::Protobuf::MessageExts
|
586
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
587
|
+
end
|
588
|
+
|
589
|
+
# A translation of the text segment.
|
590
|
+
# @!attribute [rw] text_anchor
|
591
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
592
|
+
# Provenance of the translation.
|
593
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There can only be a
|
594
|
+
# single `TextAnchor.text_segments` element. If the start and
|
595
|
+
# end index of the text segment are the same, the text change is inserted
|
596
|
+
# before that index.
|
597
|
+
# @!attribute [rw] language_code
|
598
|
+
# @return [::String]
|
599
|
+
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
600
|
+
# information, see
|
601
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
602
|
+
# @!attribute [rw] translated_text
|
603
|
+
# @return [::String]
|
604
|
+
# Text translated into the target language.
|
605
|
+
# @!attribute [rw] provenance
|
606
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>]
|
607
|
+
# The history of this annotation.
|
608
|
+
class Translation
|
609
|
+
include ::Google::Protobuf::MessageExts
|
610
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
611
|
+
end
|
612
|
+
|
613
|
+
# Text reference indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
614
|
+
# @!attribute [rw] text_segments
|
615
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment>]
|
616
|
+
# The text segments from the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
617
|
+
# @!attribute [rw] content
|
618
|
+
# @return [::String]
|
619
|
+
# Contains the content of the text span so that users do
|
620
|
+
# not have to look it up in the text_segments.
|
621
|
+
class TextAnchor
|
622
|
+
include ::Google::Protobuf::MessageExts
|
623
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
624
|
+
|
625
|
+
# A text segment in the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. The indices may be out of bounds
|
626
|
+
# which indicate that the text extends into another document shard for
|
627
|
+
# large sharded documents. See {::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo#text_offset ShardInfo.text_offset}
|
628
|
+
# @!attribute [rw] start_index
|
629
|
+
# @return [::Integer]
|
630
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} start UTF-8 char index in the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
631
|
+
# @!attribute [rw] end_index
|
632
|
+
# @return [::Integer]
|
633
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor::TextSegment TextSegment} half open end UTF-8 char index in the
|
634
|
+
# {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
|
635
|
+
class TextSegment
|
636
|
+
include ::Google::Protobuf::MessageExts
|
637
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
638
|
+
end
|
639
|
+
end
|
640
|
+
|
641
|
+
# Referencing the visual context of the entity in the {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages}.
|
642
|
+
# Page anchors can be cross-page, consist of multiple bounding polygons and
|
643
|
+
# optionally reference specific layout element types.
|
644
|
+
# @!attribute [rw] page_refs
|
645
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef>]
|
646
|
+
# One or more references to visual page elements
|
647
|
+
class PageAnchor
|
648
|
+
include ::Google::Protobuf::MessageExts
|
649
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
650
|
+
|
651
|
+
# Represents a weak reference to a page element within a document.
|
652
|
+
# @!attribute [rw] page
|
653
|
+
# @return [::Integer]
|
654
|
+
# Required. Index into the {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} element
|
655
|
+
# @!attribute [rw] layout_type
|
656
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType]
|
657
|
+
# Optional. The type of the layout element that is being referenced if any.
|
658
|
+
# @!attribute [rw] layout_id
|
659
|
+
# @return [::String]
|
660
|
+
# Optional. Deprecated. Use {::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} instead.
|
661
|
+
# @!attribute [rw] bounding_poly
|
662
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
|
663
|
+
# Optional. Identifies the bounding polygon of a layout element on the page.
|
664
|
+
class PageRef
|
665
|
+
include ::Google::Protobuf::MessageExts
|
666
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
667
|
+
|
668
|
+
# The type of layout that is being referenced.
|
669
|
+
module LayoutType
|
670
|
+
# Layout Unspecified.
|
671
|
+
LAYOUT_TYPE_UNSPECIFIED = 0
|
672
|
+
|
673
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#blocks Page.blocks} element.
|
674
|
+
BLOCK = 1
|
675
|
+
|
676
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#paragraphs Page.paragraphs} element.
|
677
|
+
PARAGRAPH = 2
|
678
|
+
|
679
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#lines Page.lines} element.
|
680
|
+
LINE = 3
|
681
|
+
|
682
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tokens Page.tokens} element.
|
683
|
+
TOKEN = 4
|
684
|
+
|
685
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#visual_elements Page.visual_elements} element.
|
686
|
+
VISUAL_ELEMENT = 5
|
687
|
+
|
688
|
+
# Refrrences a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#tables Page.tables} element.
|
689
|
+
TABLE = 6
|
690
|
+
|
691
|
+
# References a {::Google::Cloud::DocumentAI::V1beta3::Document::Page#form_fields Page.form_fields} element.
|
692
|
+
FORM_FIELD = 7
|
693
|
+
end
|
694
|
+
end
|
695
|
+
end
|
696
|
+
|
697
|
+
# Structure to identify provenance relationships between annotations in
|
698
|
+
# different revisions.
|
699
|
+
# @!attribute [rw] revision
|
700
|
+
# @return [::Integer]
|
701
|
+
# The index of the revision that produced this element.
|
702
|
+
# @!attribute [rw] id
|
703
|
+
# @return [::Integer]
|
704
|
+
# The Id of this operation. Needs to be unique within the scope of the
|
705
|
+
# revision.
|
706
|
+
# @!attribute [rw] parents
|
707
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::Parent>]
|
708
|
+
# References to the original elements that are replaced.
|
709
|
+
# @!attribute [rw] type
|
710
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance::OperationType]
|
711
|
+
# The type of provenance operation.
|
712
|
+
class Provenance
|
713
|
+
include ::Google::Protobuf::MessageExts
|
714
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
715
|
+
|
716
|
+
# Structure for referencing parent provenances. When an element replaces
|
717
|
+
# one of more other elements parent references identify the elements that
|
718
|
+
# are replaced.
|
719
|
+
# @!attribute [rw] revision
|
720
|
+
# @return [::Integer]
|
721
|
+
# The index of the [Document.revisions] identifying the parent revision.
|
722
|
+
# @!attribute [rw] id
|
723
|
+
# @return [::Integer]
|
724
|
+
# The id of the parent provenance.
|
725
|
+
class Parent
|
726
|
+
include ::Google::Protobuf::MessageExts
|
727
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
728
|
+
end
|
729
|
+
|
730
|
+
# If a processor or agent does an explicit operation on existing elements.
|
731
|
+
module OperationType
|
732
|
+
# Operation type unspecified.
|
733
|
+
OPERATION_TYPE_UNSPECIFIED = 0
|
734
|
+
|
735
|
+
# Add an element. Implicit if no `parents` are set for the provenance.
|
736
|
+
ADD = 1
|
737
|
+
|
738
|
+
# The element is removed. No `parents` should be set.
|
739
|
+
REMOVE = 2
|
740
|
+
|
741
|
+
# Explicitly replaces the element(s) identified by `parents`.
|
742
|
+
REPLACE = 3
|
743
|
+
|
744
|
+
# Element is requested for human review.
|
745
|
+
EVAL_REQUESTED = 4
|
746
|
+
|
747
|
+
# Element is review and approved at human review, confidence will be set
|
748
|
+
# to 1.0
|
749
|
+
EVAL_APPROVED = 5
|
750
|
+
end
|
751
|
+
end
|
752
|
+
|
753
|
+
# Contains past or forward revisions of this document.
|
754
|
+
# @!attribute [rw] agent
|
755
|
+
# @return [::String]
|
756
|
+
# If the change was made by a person specify the name or id of that
|
757
|
+
# person.
|
758
|
+
# @!attribute [rw] processor
|
759
|
+
# @return [::String]
|
760
|
+
# If the annotation was made by processor identify the processor by its
|
761
|
+
# resource name.
|
762
|
+
# @!attribute [rw] id
|
763
|
+
# @return [::String]
|
764
|
+
# Id of the revision. Unique within the context of the document.
|
765
|
+
# @!attribute [rw] parent
|
766
|
+
# @return [::Array<::Integer>]
|
767
|
+
# The revisions that this revision is based on. This can include one or
|
768
|
+
# more parent (when documents are merged.) This field represents the
|
769
|
+
# index into the `revisions` field.
|
770
|
+
# @!attribute [rw] create_time
|
771
|
+
# @return [::Google::Protobuf::Timestamp]
|
772
|
+
# The time that the revision was created.
|
773
|
+
# @!attribute [rw] human_review
|
774
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::Revision::HumanReview]
|
775
|
+
# Human Review information of this revision.
|
776
|
+
class Revision
|
777
|
+
include ::Google::Protobuf::MessageExts
|
778
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
779
|
+
|
780
|
+
# Human Review information of the document.
|
781
|
+
# @!attribute [rw] state
|
782
|
+
# @return [::String]
|
783
|
+
# Human review state. e.g. `requested`, `succeeded`, `rejected`.
|
784
|
+
# @!attribute [rw] state_message
|
785
|
+
# @return [::String]
|
786
|
+
# A message providing more details about the current state of processing.
|
787
|
+
# For example, the rejection reason when the state is `rejected`.
|
788
|
+
class HumanReview
|
789
|
+
include ::Google::Protobuf::MessageExts
|
790
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
791
|
+
end
|
792
|
+
end
|
793
|
+
|
794
|
+
# This message is used for text changes aka. OCR corrections.
|
795
|
+
# @!attribute [rw] text_anchor
|
796
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::Document::TextAnchor]
|
797
|
+
# Provenance of the correction.
|
798
|
+
# Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}. There can only be a
|
799
|
+
# single `TextAnchor.text_segments` element. If the start and
|
800
|
+
# end index of the text segment are the same, the text change is inserted
|
801
|
+
# before that index.
|
802
|
+
# @!attribute [rw] changed_text
|
803
|
+
# @return [::String]
|
804
|
+
# The text that replaces the text identified in the `text_anchor`.
|
805
|
+
# @!attribute [rw] provenance
|
806
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Provenance>]
|
807
|
+
# The history of this annotation.
|
808
|
+
class TextChange
|
809
|
+
include ::Google::Protobuf::MessageExts
|
810
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
811
|
+
end
|
812
|
+
end
|
813
|
+
end
|
814
|
+
end
|
815
|
+
end
|
816
|
+
end
|