google-cloud-document_ai-v1 0.2.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24fbe2305962ad733b73b86b892f2cc056719f9b15ae68448b51af84f6f8e41e
4
- data.tar.gz: 5ec64c940d4f4cee643127bcbf8574a87bceeebf170e2e329c9ba9d2ad9c28d2
3
+ metadata.gz: 562e387a9f1223223d1f86d8098518ae4182e5ecddaecb5c505f4d6b839925fb
4
+ data.tar.gz: 831dcae5c7bae6958388ede6eca2897a9aebe7f21dda4996fe70360072015f95
5
5
  SHA512:
6
- metadata.gz: e0b706410acad88a8670fcd63053426d20a3de05d4aa97d1e573c583262af4bbe6394df875c26bcbe0c7e0cfa4550cf96988db55b1acbf8def5e9ac2e5b7eb30
7
- data.tar.gz: 69bedf13c4c6362ca21903f79eafc347420b2222931a545679ecac9351e9df6dbb0224b09ae5ae2e87147028dbdc1e319a017910e3ae25a66e5ffb9bb9252d57
6
+ metadata.gz: 4c6b676f289b8221727d896f03af136309ac2ef9860773d3fc03f0a93bd9b40ffad204dbd5b44cf1c430f0247974aa754889b15d3d1c431a7a18fcf48bdae934
7
+ data.tar.gz: e98aebaebda84263d1b6bf788ccf105ac93d9948201f101016c6da1f998800953536c53b882e07754411fd321dc9d5a184be8004b68fec2b8e67bd403bd68724
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Document AI V1 API
2
+ --title="Document AI V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::DocumentAI::V1::ProcessRequest.new # (request fields
37
37
  response = client.process_document request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-document_ai-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/document-ai/)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -153,6 +153,7 @@ module Google
153
153
 
154
154
  @operations_client = Operations.new do |config|
155
155
  config.credentials = credentials
156
+ config.quota_project = @quota_project_id
156
157
  config.endpoint = @config.endpoint
157
158
  end
158
159
 
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DocumentAI
23
23
  module V1
24
- VERSION = "0.2.3"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/document_ai/v1"
29
31
  # client = ::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client.new
30
32
  #
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document_io.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/protobuf'
6
5
 
7
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/field_behavior_pb'
5
7
  require 'google/cloud/documentai/v1/geometry_pb'
6
8
  require 'google/protobuf/timestamp_pb'
@@ -10,8 +12,6 @@ require 'google/type/date_pb'
10
12
  require 'google/type/datetime_pb'
11
13
  require 'google/type/money_pb'
12
14
  require 'google/type/postal_address_pb'
13
- require 'google/api/annotations_pb'
14
- require 'google/protobuf'
15
15
 
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/cloud/documentai/v1/document.proto", :syntax => :proto3) do
@@ -63,6 +63,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
63
  repeated :visual_elements, :message, 9, "google.cloud.documentai.v1.Document.Page.VisualElement"
64
64
  repeated :tables, :message, 10, "google.cloud.documentai.v1.Document.Page.Table"
65
65
  repeated :form_fields, :message, 11, "google.cloud.documentai.v1.Document.Page.FormField"
66
+ repeated :symbols, :message, 12, "google.cloud.documentai.v1.Document.Page.Symbol"
66
67
  optional :provenance, :message, 16, "google.cloud.documentai.v1.Document.Provenance"
67
68
  end
68
69
  add_message "google.cloud.documentai.v1.Document.Page.Dimension" do
@@ -125,6 +126,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
125
126
  value :WIDE_SPACE, 2
126
127
  value :HYPHEN, 3
127
128
  end
129
+ add_message "google.cloud.documentai.v1.Document.Page.Symbol" do
130
+ optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
131
+ repeated :detected_languages, :message, 2, "google.cloud.documentai.v1.Document.Page.DetectedLanguage"
132
+ end
128
133
  add_message "google.cloud.documentai.v1.Document.Page.VisualElement" do
129
134
  optional :layout, :message, 1, "google.cloud.documentai.v1.Document.Page.Layout"
130
135
  optional :type, :string, 2
@@ -275,6 +280,7 @@ module Google
275
280
  Document::Page::Token = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token").msgclass
276
281
  Document::Page::Token::DetectedBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token.DetectedBreak").msgclass
277
282
  Document::Page::Token::DetectedBreak::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Token.DetectedBreak.Type").enummodule
283
+ Document::Page::Symbol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Symbol").msgclass
278
284
  Document::Page::VisualElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.VisualElement").msgclass
279
285
  Document::Page::Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table").msgclass
280
286
  Document::Page::Table::TableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.Document.Page.Table.TableRow").msgclass
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/document_processor_service.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -9,10 +11,8 @@ require 'google/cloud/documentai/v1/document_pb'
9
11
  require 'google/cloud/documentai/v1/document_io_pb'
10
12
  require 'google/cloud/documentai/v1/operation_metadata_pb'
11
13
  require 'google/longrunning/operations_pb'
12
- require 'google/protobuf/field_mask_pb'
13
14
  require 'google/protobuf/timestamp_pb'
14
15
  require 'google/rpc/status_pb'
15
- require 'google/protobuf'
16
16
 
17
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
18
18
  add_file("google/cloud/documentai/v1/document_processor_service.proto", :syntax => :proto3) do
@@ -87,6 +87,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
87
87
  end
88
88
  add_message "google.cloud.documentai.v1.ReviewDocumentOperationMetadata" do
89
89
  optional :common_metadata, :message, 5, "google.cloud.documentai.v1.CommonOperationMetadata"
90
+ optional :question_id, :string, 6
90
91
  end
91
92
  end
92
93
  end
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/geometry.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/protobuf'
6
5
 
7
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/documentai/v1/operation_metadata.proto
3
3
 
4
- require 'google/protobuf/timestamp_pb'
5
- require 'google/api/annotations_pb'
6
4
  require 'google/protobuf'
7
5
 
6
+ require 'google/protobuf/timestamp_pb'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/documentai/v1/operation_metadata.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.documentai.v1.CommonOperationMetadata" do
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
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
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - 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}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # 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
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - 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"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -54,11 +54,13 @@ module Google
54
54
  # Visual page layout for the {::Google::Cloud::DocumentAI::V1::Document Document}.
55
55
  # @!attribute [rw] entities
56
56
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
57
- # A list of entities detected on {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. For document shards,
58
- # entities in this list may cross shard boundaries.
57
+ # A list of entities detected on
58
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. For document
59
+ # shards, entities in this list may cross shard boundaries.
59
60
  # @!attribute [rw] entity_relations
60
61
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::EntityRelation>]
61
- # Relationship among {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
62
+ # Relationship among
63
+ # {::Google::Cloud::DocumentAI::V1::Document#entities Document.entities}.
62
64
  # @!attribute [rw] text_changes
63
65
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextChange>]
64
66
  # A list of text corrections made to [Document.text]. This is usually
@@ -89,7 +91,8 @@ module Google
89
91
  # Total number of shards.
90
92
  # @!attribute [rw] text_offset
91
93
  # @return [::Integer]
92
- # The index of the first character in {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
94
+ # The index of the first character in
95
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text} in the overall
93
96
  # document global text.
94
97
  class ShardInfo
95
98
  include ::Google::Protobuf::MessageExts
@@ -100,7 +103,8 @@ module Google
100
103
  # conventions as much as possible.
101
104
  # @!attribute [rw] text_anchor
102
105
  # @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
103
- # Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
106
+ # Text anchor indexing into the
107
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
104
108
  # @!attribute [rw] color
105
109
  # @return [::Google::Type::Color]
106
110
  # Text color.
@@ -143,9 +147,11 @@ module Google
143
147
  # A page in a {::Google::Cloud::DocumentAI::V1::Document Document}.
144
148
  # @!attribute [rw] page_number
145
149
  # @return [::Integer]
146
- # 1-based index for current {::Google::Cloud::DocumentAI::V1::Document::Page Page} in a parent {::Google::Cloud::DocumentAI::V1::Document Document}.
147
- # Useful when a page is taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for individual
148
- # processing.
150
+ # 1-based index for current
151
+ # {::Google::Cloud::DocumentAI::V1::Document::Page Page} in a parent
152
+ # {::Google::Cloud::DocumentAI::V1::Document Document}. Useful when a page is
153
+ # taken out of a {::Google::Cloud::DocumentAI::V1::Document Document} for
154
+ # individual processing.
149
155
  # @!attribute [rw] image
150
156
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Image]
151
157
  # Rendered image for this page. This image is preprocessed to remove any
@@ -190,6 +196,9 @@ module Google
190
196
  # @!attribute [rw] form_fields
191
197
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::FormField>]
192
198
  # A list of visually detected form fields on the page.
199
+ # @!attribute [rw] symbols
200
+ # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Symbol>]
201
+ # A list of visually detected symbols on the page.
193
202
  # @!attribute [rw] provenance
194
203
  # @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
195
204
  # The history of this page.
@@ -255,18 +264,23 @@ module Google
255
264
  # Visual element describing a layout unit on a page.
256
265
  # @!attribute [rw] text_anchor
257
266
  # @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
258
- # Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
267
+ # Text anchor indexing into the
268
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
259
269
  # @!attribute [rw] confidence
260
270
  # @return [::Float]
261
- # Confidence of the current {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} within context of the object this
262
- # layout is for. e.g. confidence can be for a single token, a table,
263
- # a visual element, etc. depending on context. Range [0, 1].
271
+ # Confidence of the current
272
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} within
273
+ # context of the object this layout is for. e.g. confidence can be for a
274
+ # single token, a table, a visual element, etc. depending on context.
275
+ # Range [0, 1].
264
276
  # @!attribute [rw] bounding_poly
265
277
  # @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
266
- # The bounding polygon for the {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
278
+ # The bounding polygon for the
279
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
267
280
  # @!attribute [rw] orientation
268
281
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout::Orientation]
269
- # Detected orientation for the {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
282
+ # Detected orientation for the
283
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout}.
270
284
  class Layout
271
285
  include ::Google::Protobuf::MessageExts
272
286
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,7 +311,8 @@ module Google
297
311
  # common line-spacing and orientation.
298
312
  # @!attribute [rw] layout
299
313
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
300
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
314
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
315
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Block Block}.
301
316
  # @!attribute [rw] detected_languages
302
317
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
303
318
  # A list of detected languages together with confidence.
@@ -312,7 +327,8 @@ module Google
312
327
  # A collection of lines that a human would perceive as a paragraph.
313
328
  # @!attribute [rw] layout
314
329
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
315
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
330
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
331
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Paragraph Paragraph}.
316
332
  # @!attribute [rw] detected_languages
317
333
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
318
334
  # A list of detected languages together with confidence.
@@ -328,7 +344,8 @@ module Google
328
344
  # Does not cross column boundaries, can be horizontal, vertical, etc.
329
345
  # @!attribute [rw] layout
330
346
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
331
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
347
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
348
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Line Line}.
332
349
  # @!attribute [rw] detected_languages
333
350
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
334
351
  # A list of detected languages together with confidence.
@@ -343,10 +360,12 @@ module Google
343
360
  # A detected token.
344
361
  # @!attribute [rw] layout
345
362
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
346
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
363
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
364
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
347
365
  # @!attribute [rw] detected_break
348
366
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak]
349
- # Detected break at the end of a {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
367
+ # Detected break at the end of a
368
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
350
369
  # @!attribute [rw] detected_languages
351
370
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
352
371
  # A list of detected languages together with confidence.
@@ -357,7 +376,8 @@ module Google
357
376
  include ::Google::Protobuf::MessageExts
358
377
  extend ::Google::Protobuf::MessageExts::ClassMethods
359
378
 
360
- # Detected break at the end of a {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
379
+ # Detected break at the end of a
380
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Token Token}.
361
381
  # @!attribute [rw] type
362
382
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Token::DetectedBreak::Type]
363
383
  # Detected break type.
@@ -382,14 +402,29 @@ module Google
382
402
  end
383
403
  end
384
404
 
405
+ # A detected symbol.
406
+ # @!attribute [rw] layout
407
+ # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
408
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
409
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Symbol Symbol}.
410
+ # @!attribute [rw] detected_languages
411
+ # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
412
+ # A list of detected languages together with confidence.
413
+ class Symbol
414
+ include ::Google::Protobuf::MessageExts
415
+ extend ::Google::Protobuf::MessageExts::ClassMethods
416
+ end
417
+
385
418
  # Detected non-text visual elements e.g. checkbox, signature etc. on the
386
419
  # page.
387
420
  # @!attribute [rw] layout
388
421
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
389
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
422
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
423
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
390
424
  # @!attribute [rw] type
391
425
  # @return [::String]
392
- # Type of the {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
426
+ # Type of the
427
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::VisualElement VisualElement}.
393
428
  # @!attribute [rw] detected_languages
394
429
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
395
430
  # A list of detected languages together with confidence.
@@ -401,7 +436,8 @@ module Google
401
436
  # A table representation similar to HTML table structure.
402
437
  # @!attribute [rw] layout
403
438
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
404
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
439
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
440
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Table Table}.
405
441
  # @!attribute [rw] header_rows
406
442
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableRow>]
407
443
  # Header rows of the table.
@@ -427,7 +463,8 @@ module Google
427
463
  # A cell representation inside the table.
428
464
  # @!attribute [rw] layout
429
465
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
430
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
466
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for
467
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Table::TableCell TableCell}.
431
468
  # @!attribute [rw] row_span
432
469
  # @return [::Integer]
433
470
  # How many rows this cell spans.
@@ -446,11 +483,13 @@ module Google
446
483
  # A form field detected on the page.
447
484
  # @!attribute [rw] field_name
448
485
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
449
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} name. e.g. `Address`, `Email`,
450
- # `Grand total`, `Phone number`, etc.
486
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
487
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} name.
488
+ # e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
451
489
  # @!attribute [rw] field_value
452
490
  # @return [::Google::Cloud::DocumentAI::V1::Document::Page::Layout]
453
- # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
491
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::Layout Layout} for the
492
+ # {::Google::Cloud::DocumentAI::V1::Document::Page::FormField FormField} value.
454
493
  # @!attribute [rw] name_detected_languages
455
494
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Page::DetectedLanguage>]
456
495
  # A list of detected languages for name together with confidence.
@@ -477,7 +516,7 @@ module Google
477
516
  # @return [::String]
478
517
  # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
479
518
  # information, see
480
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
519
+ # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
481
520
  # @!attribute [rw] confidence
482
521
  # @return [::Float]
483
522
  # Confidence of detected language. Range [0, 1].
@@ -487,18 +526,21 @@ module Google
487
526
  end
488
527
  end
489
528
 
490
- # A phrase in the text that is a known entity type, such as a person, an
491
- # organization, or location.
529
+ # An entity that could be a phrase in the text or a property that belongs to
530
+ # the document. It is a known entity type, such as a person, an organization,
531
+ # or location.
492
532
  # @!attribute [rw] text_anchor
493
533
  # @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
494
534
  # Optional. Provenance of the entity.
495
- # Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
535
+ # Text anchor indexing into the
536
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
496
537
  # @!attribute [rw] type
497
538
  # @return [::String]
498
- # Entity type from a schema e.g. `Address`.
539
+ # Required. Entity type from a schema e.g. `Address`.
499
540
  # @!attribute [rw] mention_text
500
541
  # @return [::String]
501
- # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
542
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
543
+ # the entity is not present in the document, this field will be empty.
502
544
  # @!attribute [rw] mention_id
503
545
  # @return [::String]
504
546
  # Optional. Deprecated. Use `id` field instead.
@@ -507,28 +549,29 @@ module Google
507
549
  # Optional. Confidence of detected Schema entity. Range [0, 1].
508
550
  # @!attribute [rw] page_anchor
509
551
  # @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor]
510
- # Optional. Represents the provenance of this entity wrt. the location on the
511
- # page where it was found.
552
+ # Optional. Represents the provenance of this entity wrt. the location on
553
+ # the page where it was found.
512
554
  # @!attribute [rw] id
513
555
  # @return [::String]
514
556
  # Optional. Canonical id. This will be a unique value in the entity list
515
557
  # for this document.
516
558
  # @!attribute [rw] normalized_value
517
559
  # @return [::Google::Cloud::DocumentAI::V1::Document::Entity::NormalizedValue]
518
- # Optional. Normalized entity value. Absent if the extracted value could not be
519
- # converted or the type (e.g. address) is not supported for certain
560
+ # Optional. Normalized entity value. Absent if the extracted value could
561
+ # not be converted or the type (e.g. address) is not supported for certain
520
562
  # parsers. This field is also only populated for certain supported document
521
563
  # types.
522
564
  # @!attribute [rw] properties
523
565
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::Entity>]
524
- # Optional. Entities can be nested to form a hierarchical data structure representing
525
- # the content in the document.
566
+ # Optional. Entities can be nested to form a hierarchical data structure
567
+ # representing the content in the document.
526
568
  # @!attribute [rw] provenance
527
569
  # @return [::Google::Cloud::DocumentAI::V1::Document::Provenance]
528
570
  # Optional. The history of this annotation.
529
571
  # @!attribute [rw] redacted
530
572
  # @return [::Boolean]
531
- # Optional. Whether the entity will be redacted for de-identification purposes.
573
+ # Optional. Whether the entity will be redacted for de-identification
574
+ # purposes.
532
575
  class Entity
533
576
  include ::Google::Protobuf::MessageExts
534
577
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -556,10 +599,13 @@ module Google
556
599
  # checkboxes.
557
600
  # @!attribute [rw] text
558
601
  # @return [::String]
559
- # Required. Normalized entity value stored as a string. This field is populated for
560
- # supported document type (e.g. Invoice). For some entity types, one of
561
- # respective 'structured_value' fields may also be populated.
602
+ # Optional. An optional field to store a normalized string.
603
+ # For some entity types, one of respective `structured_value` fields may
604
+ # also be populated. Also not all the types of `structured_value` will be
605
+ # normalized. For example, some processors may not generate float
606
+ # or int normalized text by default.
562
607
  #
608
+ # Below are sample formats mapped to structured values.
563
609
  # - Money/Currency type (`money_value`) is in the ISO 4217 text format.
564
610
  # - Date type (`date_value`) is in the ISO 8601 text format.
565
611
  # - Datetime type (`datetime_value`) is in the ISO 8601 text format.
@@ -569,7 +615,8 @@ module Google
569
615
  end
570
616
  end
571
617
 
572
- # Relationship between {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
618
+ # Relationship between
619
+ # {::Google::Cloud::DocumentAI::V1::Document::Entity Entities}.
573
620
  # @!attribute [rw] subject_id
574
621
  # @return [::String]
575
622
  # Subject entity id.
@@ -584,27 +631,35 @@ module Google
584
631
  extend ::Google::Protobuf::MessageExts::ClassMethods
585
632
  end
586
633
 
587
- # Text reference indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
634
+ # Text reference indexing into the
635
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
588
636
  # @!attribute [rw] text_segments
589
637
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment>]
590
- # The text segments from the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
638
+ # The text segments from the
639
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
591
640
  # @!attribute [rw] content
592
641
  # @return [::String]
593
642
  # Contains the content of the text span so that users do
594
- # not have to look it up in the text_segments.
643
+ # not have to look it up in the text_segments. It is always
644
+ # populated for formFields.
595
645
  class TextAnchor
596
646
  include ::Google::Protobuf::MessageExts
597
647
  extend ::Google::Protobuf::MessageExts::ClassMethods
598
648
 
599
- # A text segment in the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. The indices may be out of bounds
600
- # which indicate that the text extends into another document shard for
601
- # large sharded documents. See {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
649
+ # A text segment in the
650
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. The indices
651
+ # may be out of bounds which indicate that the text extends into another
652
+ # document shard for large sharded documents. See
653
+ # {::Google::Cloud::DocumentAI::V1::Document::ShardInfo#text_offset ShardInfo.text_offset}
602
654
  # @!attribute [rw] start_index
603
655
  # @return [::Integer]
604
- # {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment} start UTF-8 char index in the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
656
+ # {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
657
+ # start UTF-8 char index in the
658
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
605
659
  # @!attribute [rw] end_index
606
660
  # @return [::Integer]
607
- # {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment} half open end UTF-8 char index in the
661
+ # {::Google::Cloud::DocumentAI::V1::Document::TextAnchor::TextSegment TextSegment}
662
+ # half open end UTF-8 char index in the
608
663
  # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}.
609
664
  class TextSegment
610
665
  include ::Google::Protobuf::MessageExts
@@ -612,9 +667,10 @@ module Google
612
667
  end
613
668
  end
614
669
 
615
- # Referencing the visual context of the entity in the {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages}.
616
- # Page anchors can be cross-page, consist of multiple bounding polygons and
617
- # optionally reference specific layout element types.
670
+ # Referencing the visual context of the entity in the
671
+ # {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages}. Page anchors
672
+ # can be cross-page, consist of multiple bounding polygons and optionally
673
+ # reference specific layout element types.
618
674
  # @!attribute [rw] page_refs
619
675
  # @return [::Array<::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef>]
620
676
  # One or more references to visual page elements
@@ -625,22 +681,29 @@ module Google
625
681
  # Represents a weak reference to a page element within a document.
626
682
  # @!attribute [rw] page
627
683
  # @return [::Integer]
628
- # Required. Index into the {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages} element, for example using
629
- # [Document.pages][page_refs.page] to locate the related page element.
630
- # This field is skipped when its value is the default 0. See
684
+ # Required. Index into the
685
+ # {::Google::Cloud::DocumentAI::V1::Document#pages Document.pages} element,
686
+ # for example using [Document.pages][page_refs.page] to locate the
687
+ # related page element. This field is skipped when its value is the
688
+ # default 0. See
631
689
  # https://developers.google.com/protocol-buffers/docs/proto3#json.
632
690
  # @!attribute [rw] layout_type
633
691
  # @return [::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType]
634
- # Optional. The type of the layout element that is being referenced if any.
692
+ # Optional. The type of the layout element that is being referenced if
693
+ # any.
635
694
  # @!attribute [rw] layout_id
636
695
  # @return [::String]
637
- # Optional. Deprecated. Use {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly} instead.
696
+ # Optional. Deprecated. Use
697
+ # {::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly PageRef.bounding_poly}
698
+ # instead.
638
699
  # @!attribute [rw] bounding_poly
639
700
  # @return [::Google::Cloud::DocumentAI::V1::BoundingPoly]
640
- # Optional. Identifies the bounding polygon of a layout element on the page.
701
+ # Optional. Identifies the bounding polygon of a layout element on the
702
+ # page.
641
703
  # @!attribute [rw] confidence
642
704
  # @return [::Float]
643
- # Optional. Confidence of detected page element, if applicable. Range [0, 1].
705
+ # Optional. Confidence of detected page element, if applicable. Range [0,
706
+ # 1].
644
707
  class PageRef
645
708
  include ::Google::Protobuf::MessageExts
646
709
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -650,25 +713,38 @@ module Google
650
713
  # Layout Unspecified.
651
714
  LAYOUT_TYPE_UNSPECIFIED = 0
652
715
 
653
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks} element.
716
+ # References a
717
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#blocks Page.blocks}
718
+ # element.
654
719
  BLOCK = 1
655
720
 
656
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs} element.
721
+ # References a
722
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#paragraphs Page.paragraphs}
723
+ # element.
657
724
  PARAGRAPH = 2
658
725
 
659
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
726
+ # References a
727
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#lines Page.lines} element.
660
728
  LINE = 3
661
729
 
662
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens} element.
730
+ # References a
731
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#tokens Page.tokens}
732
+ # element.
663
733
  TOKEN = 4
664
734
 
665
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements} element.
735
+ # References a
736
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#visual_elements Page.visual_elements}
737
+ # element.
666
738
  VISUAL_ELEMENT = 5
667
739
 
668
- # Refrrences a {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables} element.
740
+ # Refrrences a
741
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#tables Page.tables}
742
+ # element.
669
743
  TABLE = 6
670
744
 
671
- # References a {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields} element.
745
+ # References a
746
+ # {::Google::Cloud::DocumentAI::V1::Document::Page#form_fields Page.form_fields}
747
+ # element.
672
748
  FORM_FIELD = 7
673
749
  end
674
750
  end
@@ -693,16 +769,15 @@ module Google
693
769
  include ::Google::Protobuf::MessageExts
694
770
  extend ::Google::Protobuf::MessageExts::ClassMethods
695
771
 
696
- # Structure for referencing parent provenances. When an element replaces
697
- # one of more other elements parent references identify the elements that
698
- # are replaced.
772
+ # The parent element the current element is based on. Used for
773
+ # referencing/aligning, removal and replacement operations.
699
774
  # @!attribute [rw] revision
700
775
  # @return [::Integer]
701
- # The index of the [Document.revisions] identifying the parent revision.
776
+ # The index of the index into current revision's parent_ids list.
702
777
  # @!attribute [rw] index
703
778
  # @return [::Integer]
704
- # The index of the parent revisions corresponding collection of items
705
- # (eg. list of entities, properties within entities, etc.)
779
+ # The index of the parent item in the corresponding item list (eg. list
780
+ # of entities, properties within entities, etc.) in the parent revision.
706
781
  # @!attribute [rw] id
707
782
  # @return [::Integer]
708
783
  # The id of the parent provenance.
@@ -713,19 +788,20 @@ module Google
713
788
 
714
789
  # If a processor or agent does an explicit operation on existing elements.
715
790
  module OperationType
716
- # Operation type unspecified.
791
+ # Operation type unspecified. If no operation is specified a provenance
792
+ # entry is simply used to match against a `parent`.
717
793
  OPERATION_TYPE_UNSPECIFIED = 0
718
794
 
719
- # Add an element. Implicit if no `parents` are set for the provenance.
795
+ # Add an element.
720
796
  ADD = 1
721
797
 
722
- # The element is removed. No `parents` should be set.
798
+ # Remove an element identified by `parent`.
723
799
  REMOVE = 2
724
800
 
725
- # Explicitly replaces the element(s) identified by `parents`.
801
+ # Replace an element identified by `parent`.
726
802
  REPLACE = 3
727
803
 
728
- # Element is requested for human review.
804
+ # Request human review for the element identified by `parent`.
729
805
  EVAL_REQUESTED = 4
730
806
 
731
807
  # Element is reviewed and approved at human review, confidence will be
@@ -782,8 +858,9 @@ module Google
782
858
  # @!attribute [rw] text_anchor
783
859
  # @return [::Google::Cloud::DocumentAI::V1::Document::TextAnchor]
784
860
  # Provenance of the correction.
785
- # Text anchor indexing into the {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. There can only be a
786
- # single `TextAnchor.text_segments` element. If the start and
861
+ # Text anchor indexing into the
862
+ # {::Google::Cloud::DocumentAI::V1::Document#text Document.text}. There can
863
+ # only be a single `TextAnchor.text_segments` element. If the start and
787
864
  # end index of the text segment are the same, the text change is inserted
788
865
  # before that index.
789
866
  # @!attribute [rw] changed_text
@@ -227,6 +227,9 @@ module Google
227
227
  # @!attribute [rw] common_metadata
228
228
  # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
229
229
  # The basic metadata of the long running operation.
230
+ # @!attribute [rw] question_id
231
+ # @return [::String]
232
+ # The question ID.
230
233
  class ReviewDocumentOperationMetadata
231
234
  include ::Google::Protobuf::MessageExts
232
235
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-document_ai-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,6 @@ files:
196
196
  - proto_docs/google/protobuf/any.rb
197
197
  - proto_docs/google/protobuf/duration.rb
198
198
  - proto_docs/google/protobuf/empty.rb
199
- - proto_docs/google/protobuf/field_mask.rb
200
199
  - proto_docs/google/protobuf/timestamp.rb
201
200
  - proto_docs/google/protobuf/wrappers.rb
202
201
  - proto_docs/google/rpc/status.rb
@@ -217,14 +216,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
216
  requirements:
218
217
  - - ">="
219
218
  - !ruby/object:Gem::Version
220
- version: '2.5'
219
+ version: '2.6'
221
220
  required_rubygems_version: !ruby/object:Gem::Requirement
222
221
  requirements:
223
222
  - - ">="
224
223
  - !ruby/object:Gem::Version
225
224
  version: '0'
226
225
  requirements: []
227
- rubygems_version: 3.2.17
226
+ rubygems_version: 3.3.14
228
227
  signing_key:
229
228
  specification_version: 4
230
229
  summary: API Client library for the Document AI V1 API
@@ -1,229 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2021 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 Protobuf
22
- # `FieldMask` represents a set of symbolic field paths, for example:
23
- #
24
- # paths: "f.a"
25
- # paths: "f.b.d"
26
- #
27
- # Here `f` represents a field in some root message, `a` and `b`
28
- # fields in the message found in `f`, and `d` a field found in the
29
- # message in `f.b`.
30
- #
31
- # Field masks are used to specify a subset of fields that should be
32
- # returned by a get operation or modified by an update operation.
33
- # Field masks also have a custom JSON encoding (see below).
34
- #
35
- # # Field Masks in Projections
36
- #
37
- # When used in the context of a projection, a response message or
38
- # sub-message is filtered by the API to only contain those fields as
39
- # specified in the mask. For example, if the mask in the previous
40
- # example is applied to a response message as follows:
41
- #
42
- # f {
43
- # a : 22
44
- # b {
45
- # d : 1
46
- # x : 2
47
- # }
48
- # y : 13
49
- # }
50
- # z: 8
51
- #
52
- # The result will not contain specific values for fields x,y and z
53
- # (their value will be set to the default, and omitted in proto text
54
- # output):
55
- #
56
- #
57
- # f {
58
- # a : 22
59
- # b {
60
- # d : 1
61
- # }
62
- # }
63
- #
64
- # A repeated field is not allowed except at the last position of a
65
- # paths string.
66
- #
67
- # If a FieldMask object is not present in a get operation, the
68
- # operation applies to all fields (as if a FieldMask of all fields
69
- # had been specified).
70
- #
71
- # Note that a field mask does not necessarily apply to the
72
- # top-level response message. In case of a REST get operation, the
73
- # field mask applies directly to the response, but in case of a REST
74
- # list operation, the mask instead applies to each individual message
75
- # in the returned resource list. In case of a REST custom method,
76
- # other definitions may be used. Where the mask applies will be
77
- # clearly documented together with its declaration in the API. In
78
- # any case, the effect on the returned resource/resources is required
79
- # behavior for APIs.
80
- #
81
- # # Field Masks in Update Operations
82
- #
83
- # A field mask in update operations specifies which fields of the
84
- # targeted resource are going to be updated. The API is required
85
- # to only change the values of the fields as specified in the mask
86
- # and leave the others untouched. If a resource is passed in to
87
- # describe the updated values, the API ignores the values of all
88
- # fields not covered by the mask.
89
- #
90
- # If a repeated field is specified for an update operation, new values will
91
- # be appended to the existing repeated field in the target resource. Note that
92
- # a repeated field is only allowed in the last position of a `paths` string.
93
- #
94
- # If a sub-message is specified in the last position of the field mask for an
95
- # update operation, then new value will be merged into the existing sub-message
96
- # in the target resource.
97
- #
98
- # For example, given the target message:
99
- #
100
- # f {
101
- # b {
102
- # d: 1
103
- # x: 2
104
- # }
105
- # c: [1]
106
- # }
107
- #
108
- # And an update message:
109
- #
110
- # f {
111
- # b {
112
- # d: 10
113
- # }
114
- # c: [2]
115
- # }
116
- #
117
- # then if the field mask is:
118
- #
119
- # paths: ["f.b", "f.c"]
120
- #
121
- # then the result will be:
122
- #
123
- # f {
124
- # b {
125
- # d: 10
126
- # x: 2
127
- # }
128
- # c: [1, 2]
129
- # }
130
- #
131
- # An implementation may provide options to override this default behavior for
132
- # repeated and message fields.
133
- #
134
- # In order to reset a field's value to the default, the field must
135
- # be in the mask and set to the default value in the provided resource.
136
- # Hence, in order to reset all fields of a resource, provide a default
137
- # instance of the resource and set all fields in the mask, or do
138
- # not provide a mask as described below.
139
- #
140
- # If a field mask is not present on update, the operation applies to
141
- # all fields (as if a field mask of all fields has been specified).
142
- # Note that in the presence of schema evolution, this may mean that
143
- # fields the client does not know and has therefore not filled into
144
- # the request will be reset to their default. If this is unwanted
145
- # behavior, a specific service may require a client to always specify
146
- # a field mask, producing an error if not.
147
- #
148
- # As with get operations, the location of the resource which
149
- # describes the updated values in the request message depends on the
150
- # operation kind. In any case, the effect of the field mask is
151
- # required to be honored by the API.
152
- #
153
- # ## Considerations for HTTP REST
154
- #
155
- # The HTTP kind of an update operation which uses a field mask must
156
- # be set to PATCH instead of PUT in order to satisfy HTTP semantics
157
- # (PUT must only be used for full updates).
158
- #
159
- # # JSON Encoding of Field Masks
160
- #
161
- # In JSON, a field mask is encoded as a single string where paths are
162
- # separated by a comma. Fields name in each path are converted
163
- # to/from lower-camel naming conventions.
164
- #
165
- # As an example, consider the following message declarations:
166
- #
167
- # message Profile {
168
- # User user = 1;
169
- # Photo photo = 2;
170
- # }
171
- # message User {
172
- # string display_name = 1;
173
- # string address = 2;
174
- # }
175
- #
176
- # In proto a field mask for `Profile` may look as such:
177
- #
178
- # mask {
179
- # paths: "user.display_name"
180
- # paths: "photo"
181
- # }
182
- #
183
- # In JSON, the same mask is represented as below:
184
- #
185
- # {
186
- # mask: "user.displayName,photo"
187
- # }
188
- #
189
- # # Field Masks and Oneof Fields
190
- #
191
- # Field masks treat fields in oneofs just as regular fields. Consider the
192
- # following message:
193
- #
194
- # message SampleMessage {
195
- # oneof test_oneof {
196
- # string name = 4;
197
- # SubMessage sub_message = 9;
198
- # }
199
- # }
200
- #
201
- # The field mask can be:
202
- #
203
- # mask {
204
- # paths: "name"
205
- # }
206
- #
207
- # Or:
208
- #
209
- # mask {
210
- # paths: "sub_message"
211
- # }
212
- #
213
- # Note that oneof type names ("test_oneof" in this case) cannot be used in
214
- # paths.
215
- #
216
- # ## Field Mask Verification
217
- #
218
- # The implementation of any API method which has a FieldMask type field in the
219
- # request should verify the included field paths, and return an
220
- # `INVALID_ARGUMENT` error if any path is unmappable.
221
- # @!attribute [rw] paths
222
- # @return [::Array<::String>]
223
- # The set of field mask paths.
224
- class FieldMask
225
- include ::Google::Protobuf::MessageExts
226
- extend ::Google::Protobuf::MessageExts::ClassMethods
227
- end
228
- end
229
- end