google-cloud-document_ai-v1beta3 0.10.0 → 0.13.0

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +957 -123
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +3 -0
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +21 -0
  6. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  7. data/lib/google/cloud/document_ai/v1beta3.rb +2 -0
  8. data/lib/google/cloud/documentai/v1beta3/barcode_pb.rb +24 -0
  9. data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +0 -1
  10. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +20 -2
  11. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +85 -1
  12. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +21 -1
  13. data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +60 -0
  14. data/lib/google/cloud/documentai/v1beta3/geometry_pb.rb +0 -1
  15. data/lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb +3 -2
  16. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +29 -3
  17. data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +4 -2
  18. data/proto_docs/google/api/launch_stage.rb +71 -0
  19. data/proto_docs/google/cloud/documentai/v1beta3/barcode.rb +71 -0
  20. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +87 -31
  21. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +223 -10
  22. data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +154 -0
  23. data/proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb +3 -0
  24. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +92 -7
  25. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +9 -6
  26. data/proto_docs/google/protobuf/any.rb +3 -3
  27. data/proto_docs/google/protobuf/empty.rb +0 -2
  28. metadata +37 -12
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ # Encodes the detailed information of a barcode.
25
+ # @!attribute [rw] format
26
+ # @return [::String]
27
+ # Format of a barcode.
28
+ # The supported formats are:
29
+ # CODE_128: Code 128 type.
30
+ # CODE_39: Code 39 type.
31
+ # CODE_93: Code 93 type.
32
+ # CODABAR: Codabar type.
33
+ # DATA_MATRIX: 2D Data Matrix type.
34
+ # ITF: ITF type.
35
+ # EAN_13: EAN-13 type.
36
+ # EAN_8: EAN-8 type.
37
+ # QR_CODE: 2D QR code type.
38
+ # UPC_A: UPC-A type.
39
+ # UPC_E: UPC-E type.
40
+ # PDF417: PDF417 type.
41
+ # AZTEC: 2D Aztec code type.
42
+ # DATABAR: GS1 DataBar code type.
43
+ # @!attribute [rw] value_format
44
+ # @return [::String]
45
+ # Value format describes the format of the value that a barcode
46
+ # encodes.
47
+ # The supported formats are:
48
+ # CONTACT_INFO: Contact information.
49
+ # EMAIL: Email address.
50
+ # ISBN: ISBN identifier.
51
+ # PHONE: Phone number.
52
+ # PRODUCT: Product.
53
+ # SMS: SMS message.
54
+ # TEXT: Text string.
55
+ # URL: URL address.
56
+ # WIFI: Wifi information.
57
+ # GEO: Geo-localization.
58
+ # CALENDAR_EVENT: Calendar event.
59
+ # DRIVER_LICENSE: Driver's license.
60
+ # @!attribute [rw] raw_value
61
+ # @return [::String]
62
+ # Raw value encoded in the barcode.
63
+ # For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.
64
+ class Barcode
65
+ include ::Google::Protobuf::MessageExts
66
+ extend ::Google::Protobuf::MessageExts::ClassMethods
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -21,11 +21,10 @@ module Google
21
21
  module Cloud
22
22
  module DocumentAI
23
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.
24
+ # Document represents the canonical document resource in Document AI. It is an
25
+ # interchange format that provides insights into documents and allows for
26
+ # collaboration between users and Document AI to iterate and optimize for
27
+ # quality.
29
28
  # @!attribute [rw] uri
30
29
  # @return [::String]
31
30
  # Optional. Currently supports Google Cloud Storage URI of the form
@@ -48,7 +47,7 @@ module Google
48
47
  # Optional. UTF-8 encoded text in reading order from the document.
49
48
  # @!attribute [rw] text_styles
50
49
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Style>]
51
- # Styles for the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
50
+ # Placeholder. Styles for the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
52
51
  # @!attribute [rw] pages
53
52
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page>]
54
53
  # Visual page layout for the {::Google::Cloud::DocumentAI::V1beta3::Document Document}.
@@ -58,12 +57,12 @@ module Google
58
57
  # entities in this list may cross shard boundaries.
59
58
  # @!attribute [rw] entity_relations
60
59
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::EntityRelation>]
61
- # Relationship among {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
60
+ # Placeholder. Relationship among {::Google::Cloud::DocumentAI::V1beta3::Document#entities Document.entities}.
62
61
  # @!attribute [rw] text_changes
63
62
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::TextChange>]
64
- # A list of text corrections made to [Document.text]. This is usually
65
- # used for annotating corrections to OCR mistakes. Text changes for a given
66
- # revision may not overlap with each other.
63
+ # Placeholder. A list of text corrections made to [Document.text]. This is
64
+ # usually used for annotating corrections to OCR mistakes. Text changes for
65
+ # a given revision may not overlap with each other.
67
66
  # @!attribute [rw] shard_info
68
67
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::ShardInfo]
69
68
  # Information about the sharding if this document is sharded part of a larger
@@ -73,7 +72,7 @@ module Google
73
72
  # Any error that occurred while processing this document.
74
73
  # @!attribute [rw] revisions
75
74
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Revision>]
76
- # Revision history of this document.
75
+ # Placeholder. Revision history of this document.
77
76
  class Document
78
77
  include ::Google::Protobuf::MessageExts
79
78
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -190,6 +189,12 @@ module Google
190
189
  # @!attribute [rw] form_fields
191
190
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::FormField>]
192
191
  # A list of visually detected form fields on the page.
192
+ # @!attribute [rw] symbols
193
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol>]
194
+ # A list of visually detected symbols on the page.
195
+ # @!attribute [rw] detected_barcodes
196
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode>]
197
+ # A list of detected barcodes.
193
198
  # @!attribute [rw] provenance
194
199
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
195
200
  # The history of this page.
@@ -382,6 +387,18 @@ module Google
382
387
  end
383
388
  end
384
389
 
390
+ # A detected symbol.
391
+ # @!attribute [rw] layout
392
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
393
+ # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Symbol Symbol}.
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 Symbol
398
+ include ::Google::Protobuf::MessageExts
399
+ extend ::Google::Protobuf::MessageExts::ClassMethods
400
+ end
401
+
385
402
  # Detected non-text visual elements e.g. checkbox, signature etc. on the
386
403
  # page.
387
404
  # @!attribute [rw] layout
@@ -464,6 +481,16 @@ module Google
464
481
  # - blank (this indicates the field_value is normal text)
465
482
  # - "unfilled_checkbox"
466
483
  # - "filled_checkbox"
484
+ # @!attribute [rw] corrected_key_text
485
+ # @return [::String]
486
+ # Created for Labeling UI to export key text.
487
+ # If corrections were made to the text identified by the
488
+ # `field_name.text_anchor`, this field will contain the correction.
489
+ # @!attribute [rw] corrected_value_text
490
+ # @return [::String]
491
+ # Created for Labeling UI to export value text.
492
+ # If corrections were made to the text identified by the
493
+ # `field_value.text_anchor`, this field will contain the correction.
467
494
  # @!attribute [rw] provenance
468
495
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
469
496
  # The history of this annotation.
@@ -472,12 +499,24 @@ module Google
472
499
  extend ::Google::Protobuf::MessageExts::ClassMethods
473
500
  end
474
501
 
502
+ # A detected barcode.
503
+ # @!attribute [rw] layout
504
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout]
505
+ # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout Layout} for {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}.
506
+ # @!attribute [rw] barcode
507
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Barcode]
508
+ # Detailed barcode information of the {::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedBarcode DetectedBarcode}.
509
+ class DetectedBarcode
510
+ include ::Google::Protobuf::MessageExts
511
+ extend ::Google::Protobuf::MessageExts::ClassMethods
512
+ end
513
+
475
514
  # Detected language for a structural component.
476
515
  # @!attribute [rw] language_code
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,20 @@ 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::V1beta3::Document::TextAnchor]
494
534
  # Optional. Provenance of the entity.
495
535
  # Text anchor indexing into the {::Google::Cloud::DocumentAI::V1beta3::Document#text Document.text}.
496
536
  # @!attribute [rw] type
497
537
  # @return [::String]
498
- # Entity type from a schema e.g. `Address`.
538
+ # Required. Entity type from a schema e.g. `Address`.
499
539
  # @!attribute [rw] mention_text
500
540
  # @return [::String]
501
- # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
541
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity
542
+ # is not present in the document, this field will be empty.
502
543
  # @!attribute [rw] mention_id
503
544
  # @return [::String]
504
545
  # Optional. Deprecated. Use `id` field instead.
@@ -554,12 +595,21 @@ module Google
554
595
  # @return [::Boolean]
555
596
  # Boolean value. Can be used for entities with binary values, or for
556
597
  # checkboxes.
598
+ # @!attribute [rw] integer_value
599
+ # @return [::Integer]
600
+ # Integer value.
601
+ # @!attribute [rw] float_value
602
+ # @return [::Float]
603
+ # Float value.
557
604
  # @!attribute [rw] text
558
605
  # @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.
606
+ # Optional. An optional field to store a normalized string.
607
+ # For some entity types, one of respective `structured_value` fields may
608
+ # also be populated. Also not all the types of `structured_value` will be
609
+ # normalized. For example, some processors may not generate float
610
+ # or int normalized text by default.
562
611
  #
612
+ # Below are sample formats mapped to structured values.
563
613
  # - Money/Currency type (`money_value`) is in the ISO 4217 text format.
564
614
  # - Date type (`date_value`) is in the ISO 8601 text format.
565
615
  # - Datetime type (`datetime_value`) is in the ISO 8601 text format.
@@ -591,7 +641,8 @@ module Google
591
641
  # @!attribute [rw] content
592
642
  # @return [::String]
593
643
  # Contains the content of the text span so that users do
594
- # not have to look it up in the text_segments.
644
+ # not have to look it up in the text_segments. It is always
645
+ # populated for formFields.
595
646
  class TextAnchor
596
647
  include ::Google::Protobuf::MessageExts
597
648
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -693,16 +744,15 @@ module Google
693
744
  include ::Google::Protobuf::MessageExts
694
745
  extend ::Google::Protobuf::MessageExts::ClassMethods
695
746
 
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.
747
+ # The parent element the current element is based on. Used for
748
+ # referencing/aligning, removal and replacement operations.
699
749
  # @!attribute [rw] revision
700
750
  # @return [::Integer]
701
- # The index of the [Document.revisions] identifying the parent revision.
751
+ # The index of the index into current revision's parent_ids list.
702
752
  # @!attribute [rw] index
703
753
  # @return [::Integer]
704
- # The index of the parent revisions corresponding collection of items
705
- # (eg. list of entities, properties within entities, etc.)
754
+ # The index of the parent item in the corresponding item list (eg. list
755
+ # of entities, properties within entities, etc.) in the parent revision.
706
756
  # @!attribute [rw] id
707
757
  # @return [::Integer]
708
758
  # The id of the parent provenance.
@@ -713,19 +763,20 @@ module Google
713
763
 
714
764
  # If a processor or agent does an explicit operation on existing elements.
715
765
  module OperationType
716
- # Operation type unspecified.
766
+ # Operation type unspecified. If no operation is specified a provenance
767
+ # entry is simply used to match against a `parent`.
717
768
  OPERATION_TYPE_UNSPECIFIED = 0
718
769
 
719
- # Add an element. Implicit if no `parents` are set for the provenance.
770
+ # Add an element.
720
771
  ADD = 1
721
772
 
722
- # The element is removed. No `parents` should be set.
773
+ # Remove an element identified by `parent`.
723
774
  REMOVE = 2
724
775
 
725
- # Explicitly replaces the element(s) identified by `parents`.
776
+ # Replace an element identified by `parent`.
726
777
  REPLACE = 3
727
778
 
728
- # Element is requested for human review.
779
+ # Request human review for the element identified by `parent`.
729
780
  EVAL_REQUESTED = 4
730
781
 
731
782
  # Element is reviewed and approved at human review, confidence will be
@@ -754,6 +805,11 @@ module Google
754
805
  # The revisions that this revision is based on. This can include one or
755
806
  # more parent (when documents are merged.) This field represents the
756
807
  # index into the `revisions` field.
808
+ # @!attribute [rw] parent_ids
809
+ # @return [::Array<::String>]
810
+ # The revisions that this revision is based on. Must include all the ids
811
+ # that have anything to do with this revision - eg. there are
812
+ # `provenance.parent.revision` fields that index into this field.
757
813
  # @!attribute [rw] create_time
758
814
  # @return [::Google::Protobuf::Timestamp]
759
815
  # The time that the revision was created.
@@ -30,7 +30,12 @@ module Google
30
30
  # A raw document content (bytes).
31
31
  # @!attribute [rw] name
32
32
  # @return [::String]
33
- # Required. The processor resource name.
33
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
34
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}
35
+ # to use for processing. If a {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} is specified, the server will use
36
+ # its {::Google::Cloud::DocumentAI::V1beta3::Processor#default_processor_version default version}. Format:
37
+ # `projects/{project}/locations/{location}/processors/{processor}`, or
38
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
34
39
  # @!attribute [rw] document
35
40
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
36
41
  # The document payload, the [content] and [mime_type] fields must be set.
@@ -38,6 +43,9 @@ module Google
38
43
  # @return [::Boolean]
39
44
  # Whether Human Review feature should be skipped for this request. Default to
40
45
  # false.
46
+ # @!attribute [rw] field_mask
47
+ # @return [::Google::Protobuf::FieldMask]
48
+ # Specifies which fields to include in ProcessResponse's document.
41
49
  class ProcessRequest
42
50
  include ::Google::Protobuf::MessageExts
43
51
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -104,7 +112,11 @@ module Google
104
112
  # Request message for batch process document method.
105
113
  # @!attribute [rw] name
106
114
  # @return [::String]
107
- # Required. The processor resource name.
115
+ # Required. The resource name of {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
116
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
117
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`,
118
+ # or
119
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
108
120
  # @!attribute [rw] input_configs
109
121
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchInputConfig>]
110
122
  # The input config for each single document in the batch process.
@@ -185,10 +197,10 @@ module Google
185
197
  # document during the process.
186
198
  # @!attribute [rw] status
187
199
  # @return [::Google::Rpc::Status]
188
- # The status of the processing of the document.
200
+ # The status processing the document.
189
201
  # @!attribute [rw] output_gcs_destination
190
202
  # @return [::String]
191
- # The output_gcs_destination (in the request as 'output_gcs_destination')
203
+ # The output_gcs_destination (in the request as `output_gcs_destination`)
192
204
  # of the processed document if it was successful, otherwise empty.
193
205
  # @!attribute [rw] human_review_operation
194
206
  # @return [::String]
@@ -233,7 +245,8 @@ module Google
233
245
  # @!attribute [rw] parent
234
246
  # @return [::String]
235
247
  # Required. The project of processor type to list.
236
- # Format: projects/\\{project}/locations/\\{location}
248
+ # The available processor types may depend on the allow-listing on projects.
249
+ # Format: `projects/{project}/locations/{location}`
237
250
  class FetchProcessorTypesRequest
238
251
  include ::Google::Protobuf::MessageExts
239
252
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -248,11 +261,42 @@ module Google
248
261
  extend ::Google::Protobuf::MessageExts::ClassMethods
249
262
  end
250
263
 
264
+ # Request message for list processor types.
265
+ # @!attribute [rw] parent
266
+ # @return [::String]
267
+ # Required. The location of processor type to list.
268
+ # The available processor types may depend on the allow-listing on projects.
269
+ # Format: `projects/{project}/locations/{location}`
270
+ # @!attribute [rw] page_size
271
+ # @return [::Integer]
272
+ # The maximum number of processor types to return.
273
+ # If unspecified, at most 100 processor types will be returned.
274
+ # The maximum value is 500; values above 500 will be coerced to 500.
275
+ # @!attribute [rw] page_token
276
+ # @return [::String]
277
+ # Used to retrieve the next page of results, empty if at the end of the list.
278
+ class ListProcessorTypesRequest
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
+ end
282
+
283
+ # Response message for list processor types.
284
+ # @!attribute [rw] processor_types
285
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
286
+ # The processor types.
287
+ # @!attribute [rw] next_page_token
288
+ # @return [::String]
289
+ # Points to the next page, otherwise empty.
290
+ class ListProcessorTypesResponse
291
+ include ::Google::Protobuf::MessageExts
292
+ extend ::Google::Protobuf::MessageExts::ClassMethods
293
+ end
294
+
251
295
  # Request message for list all processors belongs to a project.
252
296
  # @!attribute [rw] parent
253
297
  # @return [::String]
254
298
  # Required. The parent (project and location) which owns this collection of Processors.
255
- # Format: projects/\\{project}/locations/\\{location}
299
+ # Format: `projects/{project}/locations/{location}`
256
300
  # @!attribute [rw] page_size
257
301
  # @return [::Integer]
258
302
  # The maximum number of processors to return.
@@ -279,13 +323,129 @@ module Google
279
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
280
324
  end
281
325
 
326
+ # Request message for get processor.
327
+ # @!attribute [rw] name
328
+ # @return [::String]
329
+ # Required. The processor resource name.
330
+ class GetProcessorRequest
331
+ include ::Google::Protobuf::MessageExts
332
+ extend ::Google::Protobuf::MessageExts::ClassMethods
333
+ end
334
+
335
+ # Request message for get processor version.
336
+ # @!attribute [rw] name
337
+ # @return [::String]
338
+ # Required. The processor resource name.
339
+ class GetProcessorVersionRequest
340
+ include ::Google::Protobuf::MessageExts
341
+ extend ::Google::Protobuf::MessageExts::ClassMethods
342
+ end
343
+
344
+ # Request message for list all processor versions belongs to a processor.
345
+ # @!attribute [rw] parent
346
+ # @return [::String]
347
+ # Required. The parent (project, location and processor) to list all versions.
348
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`
349
+ # @!attribute [rw] page_size
350
+ # @return [::Integer]
351
+ # The maximum number of processor versions to return.
352
+ # If unspecified, at most 10 processor versions will be returned.
353
+ # The maximum value is 20; values above 20 will be coerced to 20.
354
+ # @!attribute [rw] page_token
355
+ # @return [::String]
356
+ # We will return the processor versions sorted by creation time. The page
357
+ # token will point to the next processor version.
358
+ class ListProcessorVersionsRequest
359
+ include ::Google::Protobuf::MessageExts
360
+ extend ::Google::Protobuf::MessageExts::ClassMethods
361
+ end
362
+
363
+ # Response message for list processors.
364
+ # @!attribute [rw] processor_versions
365
+ # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>]
366
+ # The list of processors.
367
+ # @!attribute [rw] next_page_token
368
+ # @return [::String]
369
+ # Points to the next processor, otherwise empty.
370
+ class ListProcessorVersionsResponse
371
+ include ::Google::Protobuf::MessageExts
372
+ extend ::Google::Protobuf::MessageExts::ClassMethods
373
+ end
374
+
375
+ # Request message for the delete processor version method.
376
+ # @!attribute [rw] name
377
+ # @return [::String]
378
+ # Required. The processor version resource name to be deleted.
379
+ class DeleteProcessorVersionRequest
380
+ include ::Google::Protobuf::MessageExts
381
+ extend ::Google::Protobuf::MessageExts::ClassMethods
382
+ end
383
+
384
+ # The long running operation metadata for delete processor version method.
385
+ # @!attribute [rw] common_metadata
386
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
387
+ # The basic metadata of the long running operation.
388
+ class DeleteProcessorVersionMetadata
389
+ include ::Google::Protobuf::MessageExts
390
+ extend ::Google::Protobuf::MessageExts::ClassMethods
391
+ end
392
+
393
+ # Request message for the deploy processor version method.
394
+ # @!attribute [rw] name
395
+ # @return [::String]
396
+ # Required. The processor version resource name to be deployed.
397
+ class DeployProcessorVersionRequest
398
+ include ::Google::Protobuf::MessageExts
399
+ extend ::Google::Protobuf::MessageExts::ClassMethods
400
+ end
401
+
402
+ # Response message for the deploy processor version method.
403
+ class DeployProcessorVersionResponse
404
+ include ::Google::Protobuf::MessageExts
405
+ extend ::Google::Protobuf::MessageExts::ClassMethods
406
+ end
407
+
408
+ # The long running operation metadata for deploy processor version method.
409
+ # @!attribute [rw] common_metadata
410
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
411
+ # The basic metadata of the long running operation.
412
+ class DeployProcessorVersionMetadata
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
417
+ # Request message for the undeploy processor version method.
418
+ # @!attribute [rw] name
419
+ # @return [::String]
420
+ # Required. The processor version resource name to be undeployed.
421
+ class UndeployProcessorVersionRequest
422
+ include ::Google::Protobuf::MessageExts
423
+ extend ::Google::Protobuf::MessageExts::ClassMethods
424
+ end
425
+
426
+ # Response message for the undeploy processor version method.
427
+ class UndeployProcessorVersionResponse
428
+ include ::Google::Protobuf::MessageExts
429
+ extend ::Google::Protobuf::MessageExts::ClassMethods
430
+ end
431
+
432
+ # The long running operation metadata for the undeploy processor version
433
+ # method.
434
+ # @!attribute [rw] common_metadata
435
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
436
+ # The basic metadata of the long running operation.
437
+ class UndeployProcessorVersionMetadata
438
+ include ::Google::Protobuf::MessageExts
439
+ extend ::Google::Protobuf::MessageExts::ClassMethods
440
+ end
441
+
282
442
  # Request message for create a processor. Notice this request is sent to
283
443
  # a regionalized backend service, and if the processor type is not available
284
444
  # on that region, the creation will fail.
285
445
  # @!attribute [rw] parent
286
446
  # @return [::String]
287
447
  # Required. The parent (project and location) under which to create the processor.
288
- # Format: projects/\\{project}/locations/\\{location}
448
+ # Format: `projects/{project}/locations/{location}`
289
449
  # @!attribute [rw] processor
290
450
  # @return [::Google::Cloud::DocumentAI::V1beta3::Processor]
291
451
  # Required. The processor to be created, requires [processor_type] and [display_name]
@@ -323,6 +483,7 @@ module Google
323
483
  end
324
484
 
325
485
  # Response message for the enable processor method.
486
+ # Intentionally empty proto for adding fields in future.
326
487
  class EnableProcessorResponse
327
488
  include ::Google::Protobuf::MessageExts
328
489
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -347,6 +508,7 @@ module Google
347
508
  end
348
509
 
349
510
  # Response message for the disable processor method.
511
+ # Intentionally empty proto for adding fields in future.
350
512
  class DisableProcessorResponse
351
513
  include ::Google::Protobuf::MessageExts
352
514
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -361,8 +523,37 @@ module Google
361
523
  extend ::Google::Protobuf::MessageExts::ClassMethods
362
524
  end
363
525
 
526
+ # Request message for the set default processor version method.
527
+ # @!attribute [rw] processor
528
+ # @return [::String]
529
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} to change default version.
530
+ # @!attribute [rw] default_processor_version
531
+ # @return [::String]
532
+ # Required. The resource name of child {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to use as default.
533
+ # Format:
534
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
535
+ class SetDefaultProcessorVersionRequest
536
+ include ::Google::Protobuf::MessageExts
537
+ extend ::Google::Protobuf::MessageExts::ClassMethods
538
+ end
539
+
540
+ # Response message for set default processor version method.
541
+ class SetDefaultProcessorVersionResponse
542
+ include ::Google::Protobuf::MessageExts
543
+ extend ::Google::Protobuf::MessageExts::ClassMethods
544
+ end
545
+
546
+ # The long running operation metadata for set default processor version
547
+ # method.
548
+ # @!attribute [rw] common_metadata
549
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
550
+ # The basic metadata of the long running operation.
551
+ class SetDefaultProcessorVersionMetadata
552
+ include ::Google::Protobuf::MessageExts
553
+ extend ::Google::Protobuf::MessageExts::ClassMethods
554
+ end
555
+
364
556
  # Request message for review document method.
365
- # Next Id: 6.
366
557
  # @!attribute [rw] inline_document
367
558
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
368
559
  # An inline document proto.
@@ -379,6 +570,9 @@ module Google
379
570
  # @!attribute [rw] priority
380
571
  # @return [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest::Priority]
381
572
  # The priority of the human review task.
573
+ # @!attribute [rw] document_schema
574
+ # @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema]
575
+ # The document schema of the human review task.
382
576
  class ReviewDocumentRequest
383
577
  include ::Google::Protobuf::MessageExts
384
578
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -397,10 +591,29 @@ module Google
397
591
  # Response message for review document method.
398
592
  # @!attribute [rw] gcs_destination
399
593
  # @return [::String]
400
- # The Cloud Storage uri for the human reviewed document.
594
+ # The Cloud Storage uri for the human reviewed document if the review is
595
+ # succeeded.
596
+ # @!attribute [rw] state
597
+ # @return [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentResponse::State]
598
+ # The state of the review operation.
599
+ # @!attribute [rw] rejection_reason
600
+ # @return [::String]
601
+ # The reason why the review is rejected by reviewer.
401
602
  class ReviewDocumentResponse
402
603
  include ::Google::Protobuf::MessageExts
403
604
  extend ::Google::Protobuf::MessageExts::ClassMethods
605
+
606
+ # Possible states of the review operation.
607
+ module State
608
+ # The default value. This value is used if the state is omitted.
609
+ STATE_UNSPECIFIED = 0
610
+
611
+ # The review operation is rejected by the reviewer.
612
+ REJECTED = 1
613
+
614
+ # The review operation is succeeded.
615
+ SUCCEEDED = 2
616
+ end
404
617
  end
405
618
 
406
619
  # The long running operation metadata for review document method.
@@ -422,7 +635,7 @@ module Google
422
635
  # The basic metadata of the long running operation.
423
636
  # @!attribute [rw] question_id
424
637
  # @return [::String]
425
- # The question ID.
638
+ # The Crowd Compute question ID.
426
639
  class ReviewDocumentOperationMetadata
427
640
  include ::Google::Protobuf::MessageExts
428
641
  extend ::Google::Protobuf::MessageExts::ClassMethods