google-cloud-document_ai-v1beta3 0.7.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +1 -1
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +516 -53
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +34 -25
  6. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +17 -0
  7. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  8. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +4 -0
  9. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +64 -16
  10. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +14 -0
  11. data/lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb +36 -0
  12. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +45 -0
  13. data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +32 -0
  14. data/proto_docs/google/api/field_behavior.rb +7 -1
  15. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +15 -0
  16. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +149 -39
  17. data/proto_docs/google/cloud/documentai/v1beta3/geometry.rb +2 -2
  18. data/proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb +65 -0
  19. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +86 -0
  20. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +59 -0
  21. data/proto_docs/google/type/color.rb +16 -11
  22. data/proto_docs/google/type/date.rb +14 -11
  23. data/proto_docs/google/type/datetime.rb +9 -1
  24. data/proto_docs/google/type/money.rb +1 -1
  25. metadata +19 -7
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -190,6 +190,9 @@ module Google
190
190
  # @!attribute [rw] form_fields
191
191
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>]
192
192
  # A list of visually detected form fields on the page.
193
+ # @!attribute [rw] provenance
194
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
195
+ # The history of this page.
193
196
  class Page
194
197
  include ::Google::Protobuf::MessageExts
195
198
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -461,6 +464,9 @@ module Google
461
464
  # - blank (this indicates the field_value is normal text)
462
465
  # - "unfilled_checkbox"
463
466
  # - "filled_checkbox"
467
+ # @!attribute [rw] provenance
468
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
469
+ # The history of this annotation.
464
470
  class FormField
465
471
  include ::Google::Protobuf::MessageExts
466
472
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -621,6 +627,8 @@ module Google
621
627
  # @return [::Integer]
622
628
  # Required. Index into the {::Google::Cloud::DocumentAI::V1beta3::Document#pages Document.pages} element, for example using
623
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
631
+ # https://developers.google.com/protocol-buffers/docs/proto3#json.
624
632
  # @!attribute [rw] layout_type
625
633
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::PageAnchor::PageRef::LayoutType]
626
634
  # Optional. The type of the layout element that is being referenced if any.
@@ -630,6 +638,9 @@ module Google
630
638
  # @!attribute [rw] bounding_poly
631
639
  # @return [::Google::Cloud::DocumentAI::V1beta3::BoundingPoly]
632
640
  # Optional. Identifies the bounding polygon of a layout element on the page.
641
+ # @!attribute [rw] confidence
642
+ # @return [::Float]
643
+ # Optional. Confidence of detected page element, if applicable. Range [0, 1].
633
644
  class PageRef
634
645
  include ::Google::Protobuf::MessageExts
635
646
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -688,6 +699,10 @@ module Google
688
699
  # @!attribute [rw] revision
689
700
  # @return [::Integer]
690
701
  # The index of the [Document.revisions] identifying the parent revision.
702
+ # @!attribute [rw] index
703
+ # @return [::Integer]
704
+ # The index of the parent revisions corresponding collection of items
705
+ # (eg. list of entities, properties within entities, etc.)
691
706
  # @!attribute [rw] id
692
707
  # @return [::Integer]
693
708
  # The id of the parent provenance.
@@ -229,7 +229,140 @@ module Google
229
229
  end
230
230
  end
231
231
 
232
+ # Request message for fetch processor types.
233
+ # @!attribute [rw] parent
234
+ # @return [::String]
235
+ # Required. The project of processor type to list.
236
+ # Format: projects/\\{project}/locations/\\{location}
237
+ class FetchProcessorTypesRequest
238
+ include ::Google::Protobuf::MessageExts
239
+ extend ::Google::Protobuf::MessageExts::ClassMethods
240
+ end
241
+
242
+ # Response message for fetch processor types.
243
+ # @!attribute [rw] processor_types
244
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
245
+ # The list of processor types.
246
+ class FetchProcessorTypesResponse
247
+ include ::Google::Protobuf::MessageExts
248
+ extend ::Google::Protobuf::MessageExts::ClassMethods
249
+ end
250
+
251
+ # Request message for list all processors belongs to a project.
252
+ # @!attribute [rw] parent
253
+ # @return [::String]
254
+ # Required. The parent (project and location) which owns this collection of Processors.
255
+ # Format: projects/\\{project}/locations/\\{location}
256
+ # @!attribute [rw] page_size
257
+ # @return [::Integer]
258
+ # The maximum number of processors to return.
259
+ # If unspecified, at most 50 processors will be returned.
260
+ # The maximum value is 100; values above 100 will be coerced to 100.
261
+ # @!attribute [rw] page_token
262
+ # @return [::String]
263
+ # We will return the processors sorted by creation time. The page token
264
+ # will point to the next processor.
265
+ class ListProcessorsRequest
266
+ include ::Google::Protobuf::MessageExts
267
+ extend ::Google::Protobuf::MessageExts::ClassMethods
268
+ end
269
+
270
+ # Response message for list processors.
271
+ # @!attribute [rw] processors
272
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Processor>]
273
+ # The list of processors.
274
+ # @!attribute [rw] next_page_token
275
+ # @return [::String]
276
+ # Points to the next processor, otherwise empty.
277
+ class ListProcessorsResponse
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+ end
281
+
282
+ # Request message for create a processor. Notice this request is sent to
283
+ # a regionalized backend service, and if the processor type is not available
284
+ # on that region, the creation will fail.
285
+ # @!attribute [rw] parent
286
+ # @return [::String]
287
+ # Required. The parent (project and location) under which to create the processor.
288
+ # Format: projects/\\{project}/locations/\\{location}
289
+ # @!attribute [rw] processor
290
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Processor]
291
+ # Required. The processor to be created, requires [processor_type] and [display_name]
292
+ # to be set. Also, the processor is under CMEK if CMEK fields are set.
293
+ class CreateProcessorRequest
294
+ include ::Google::Protobuf::MessageExts
295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
296
+ end
297
+
298
+ # Request message for the delete processor method.
299
+ # @!attribute [rw] name
300
+ # @return [::String]
301
+ # Required. The processor resource name to be deleted.
302
+ class DeleteProcessorRequest
303
+ include ::Google::Protobuf::MessageExts
304
+ extend ::Google::Protobuf::MessageExts::ClassMethods
305
+ end
306
+
307
+ # The long running operation metadata for delete processor method.
308
+ # @!attribute [rw] common_metadata
309
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
310
+ # The basic metadata of the long running operation.
311
+ class DeleteProcessorMetadata
312
+ include ::Google::Protobuf::MessageExts
313
+ extend ::Google::Protobuf::MessageExts::ClassMethods
314
+ end
315
+
316
+ # Request message for the enable processor method.
317
+ # @!attribute [rw] name
318
+ # @return [::String]
319
+ # Required. The processor resource name to be enabled.
320
+ class EnableProcessorRequest
321
+ include ::Google::Protobuf::MessageExts
322
+ extend ::Google::Protobuf::MessageExts::ClassMethods
323
+ end
324
+
325
+ # Response message for the enable processor method.
326
+ class EnableProcessorResponse
327
+ include ::Google::Protobuf::MessageExts
328
+ extend ::Google::Protobuf::MessageExts::ClassMethods
329
+ end
330
+
331
+ # The long running operation metadata for enable processor method.
332
+ # @!attribute [rw] common_metadata
333
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
334
+ # The basic metadata of the long running operation.
335
+ class EnableProcessorMetadata
336
+ include ::Google::Protobuf::MessageExts
337
+ extend ::Google::Protobuf::MessageExts::ClassMethods
338
+ end
339
+
340
+ # Request message for the disable processor method.
341
+ # @!attribute [rw] name
342
+ # @return [::String]
343
+ # Required. The processor resource name to be disabled.
344
+ class DisableProcessorRequest
345
+ include ::Google::Protobuf::MessageExts
346
+ extend ::Google::Protobuf::MessageExts::ClassMethods
347
+ end
348
+
349
+ # Response message for the disable processor method.
350
+ class DisableProcessorResponse
351
+ include ::Google::Protobuf::MessageExts
352
+ extend ::Google::Protobuf::MessageExts::ClassMethods
353
+ end
354
+
355
+ # The long running operation metadata for disable processor method.
356
+ # @!attribute [rw] common_metadata
357
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
358
+ # The basic metadata of the long running operation.
359
+ class DisableProcessorMetadata
360
+ include ::Google::Protobuf::MessageExts
361
+ extend ::Google::Protobuf::MessageExts::ClassMethods
362
+ end
363
+
232
364
  # Request message for review document method.
365
+ # Next Id: 6.
233
366
  # @!attribute [rw] inline_document
234
367
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
235
368
  # An inline document proto.
@@ -240,9 +373,25 @@ module Google
240
373
  # @!attribute [rw] document
241
374
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
242
375
  # The document that needs human review.
376
+ # @!attribute [rw] enable_schema_validation
377
+ # @return [::Boolean]
378
+ # Whether the validation should be performed on the ad-hoc review request.
379
+ # @!attribute [rw] priority
380
+ # @return [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest::Priority]
381
+ # The priority of the human review task.
243
382
  class ReviewDocumentRequest
244
383
  include ::Google::Protobuf::MessageExts
245
384
  extend ::Google::Protobuf::MessageExts::ClassMethods
385
+
386
+ # The priority level of the human review task.
387
+ module Priority
388
+ # The default priority level.
389
+ DEFAULT = 0
390
+
391
+ # The urgent priority level. The labeling manager should allocate labeler
392
+ # resource to the urgent task queue to respect this priority level.
393
+ URGENT = 1
394
+ end
246
395
  end
247
396
 
248
397
  # Response message for review document method.
@@ -296,45 +445,6 @@ module Google
296
445
  CANCELLED = 5
297
446
  end
298
447
  end
299
-
300
- # The common metadata for long running operations.
301
- # @!attribute [rw] state
302
- # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata::State]
303
- # The state of the operation.
304
- # @!attribute [rw] state_message
305
- # @return [::String]
306
- # A message providing more details about the current state of processing.
307
- # @!attribute [rw] create_time
308
- # @return [::Google::Protobuf::Timestamp]
309
- # The creation time of the operation.
310
- # @!attribute [rw] update_time
311
- # @return [::Google::Protobuf::Timestamp]
312
- # The last update time of the operation.
313
- class CommonOperationMetadata
314
- include ::Google::Protobuf::MessageExts
315
- extend ::Google::Protobuf::MessageExts::ClassMethods
316
-
317
- # State of the longrunning operation.
318
- module State
319
- # Unspecified state.
320
- STATE_UNSPECIFIED = 0
321
-
322
- # Operation is still running.
323
- RUNNING = 1
324
-
325
- # Operation is being cancelled.
326
- CANCELLING = 2
327
-
328
- # Operation succeeded.
329
- SUCCEEDED = 3
330
-
331
- # Operation failed.
332
- FAILED = 4
333
-
334
- # Operation is cancelled.
335
- CANCELLED = 5
336
- end
337
- end
338
448
  end
339
449
  end
340
450
  end
@@ -28,7 +28,7 @@ module Google
28
28
  # X coordinate.
29
29
  # @!attribute [rw] y
30
30
  # @return [::Integer]
31
- # Y coordinate.
31
+ # Y coordinate (starts from the top of the image).
32
32
  class Vertex
33
33
  include ::Google::Protobuf::MessageExts
34
34
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -42,7 +42,7 @@ module Google
42
42
  # X coordinate.
43
43
  # @!attribute [rw] y
44
44
  # @return [::Float]
45
- # Y coordinate.
45
+ # Y coordinate (starts from the top of the image).
46
46
  class NormalizedVertex
47
47
  include ::Google::Protobuf::MessageExts
48
48
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,65 @@
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 Cloud
22
+ module DocumentAI
23
+ module V1beta3
24
+ # The common metadata for long running operations.
25
+ # @!attribute [rw] state
26
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata::State]
27
+ # The state of the operation.
28
+ # @!attribute [rw] state_message
29
+ # @return [::String]
30
+ # A message providing more details about the current state of processing.
31
+ # @!attribute [rw] create_time
32
+ # @return [::Google::Protobuf::Timestamp]
33
+ # The creation time of the operation.
34
+ # @!attribute [rw] update_time
35
+ # @return [::Google::Protobuf::Timestamp]
36
+ # The last update time of the operation.
37
+ class CommonOperationMetadata
38
+ include ::Google::Protobuf::MessageExts
39
+ extend ::Google::Protobuf::MessageExts::ClassMethods
40
+
41
+ # State of the longrunning operation.
42
+ module State
43
+ # Unspecified state.
44
+ STATE_UNSPECIFIED = 0
45
+
46
+ # Operation is still running.
47
+ RUNNING = 1
48
+
49
+ # Operation is being cancelled.
50
+ CANCELLING = 2
51
+
52
+ # Operation succeeded.
53
+ SUCCEEDED = 3
54
+
55
+ # Operation failed.
56
+ FAILED = 4
57
+
58
+ # Operation is cancelled.
59
+ CANCELLED = 5
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,86 @@
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 Cloud
22
+ module DocumentAI
23
+ module V1beta3
24
+ # The first-class citizen for DocumentAI. Each processor defines how to extract
25
+ # structural information from a document.
26
+ # @!attribute [r] name
27
+ # @return [::String]
28
+ # Output only. Immutable. The resource name of the processor.
29
+ # Format: projects/\\{project}/locations/\\{location}/processors/\\{processor}
30
+ # @!attribute [rw] type
31
+ # @return [::String]
32
+ # The processor type.
33
+ # @!attribute [rw] display_name
34
+ # @return [::String]
35
+ # The display name of the processor.
36
+ # @!attribute [r] state
37
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Processor::State]
38
+ # Output only. The state of the processor.
39
+ # @!attribute [rw] default_processor_version
40
+ # @return [::String]
41
+ # The default processor version.
42
+ # @!attribute [r] process_endpoint
43
+ # @return [::String]
44
+ # Output only. Immutable. The http endpoint that can be called to invoke processing.
45
+ # @!attribute [rw] create_time
46
+ # @return [::Google::Protobuf::Timestamp]
47
+ # The time the processor was created.
48
+ # @!attribute [rw] kms_key_name
49
+ # @return [::String]
50
+ # The KMS key used for encryption/decryption in CMEK scenarios.
51
+ # See https://cloud.google.com/security-key-management.
52
+ class Processor
53
+ include ::Google::Protobuf::MessageExts
54
+ extend ::Google::Protobuf::MessageExts::ClassMethods
55
+
56
+ # The possible states of the processor.
57
+ module State
58
+ # The processor is in an unspecified state.
59
+ STATE_UNSPECIFIED = 0
60
+
61
+ # The processor is enabled.
62
+ ENABLED = 1
63
+
64
+ # The processor is disabled.
65
+ DISABLED = 2
66
+
67
+ # The processor is being enabled, will become ENABLED if successful.
68
+ ENABLING = 3
69
+
70
+ # The processor is being disabled, will become DISABLED if successful.
71
+ DISABLING = 4
72
+
73
+ # The processor is being created.
74
+ CREATING = 5
75
+
76
+ # The processor failed during creation.
77
+ FAILED = 6
78
+
79
+ # The processor is being deleted, will be removed if successful.
80
+ DELETING = 7
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end