google-cloud-document_ai-v1beta3 0.23.0 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +54 -39
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +54 -39
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb +1 -1
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +1 -1
  6. data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +618 -0
  7. data/lib/google/cloud/document_ai/v1beta3/document_service/credentials.rb +51 -0
  8. data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +770 -0
  9. data/lib/google/cloud/document_ai/v1beta3/document_service/paths.rb +90 -0
  10. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +530 -0
  11. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +815 -0
  12. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb +227 -0
  13. data/lib/google/cloud/document_ai/v1beta3/document_service/rest.rb +54 -0
  14. data/lib/google/cloud/document_ai/v1beta3/document_service.rb +56 -0
  15. data/lib/google/cloud/document_ai/v1beta3/rest.rb +1 -0
  16. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  17. data/lib/google/cloud/document_ai/v1beta3.rb +1 -0
  18. data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +55 -0
  19. data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +1 -1
  20. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +2 -1
  21. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +4 -1
  22. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +8 -6
  23. data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +3 -1
  24. data/lib/google/cloud/documentai/v1beta3/document_service_pb.rb +57 -0
  25. data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +49 -0
  26. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +1 -1
  27. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +125 -0
  28. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +88 -27
  29. data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +10 -1
  30. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +258 -123
  31. data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +44 -13
  32. data/proto_docs/google/cloud/documentai/v1beta3/document_service.rb +73 -0
  33. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +11 -9
  34. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -2
  35. metadata +16 -2
@@ -28,10 +28,9 @@ module Google
28
28
  # @!attribute [rw] uri
29
29
  # @return [::String]
30
30
  # Optional. Currently supports Google Cloud Storage URI of the form
31
- # `gs://bucket_name/object_name`. Object versioning is not supported.
32
- # See [Google Cloud Storage Request
33
- # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
34
- # info.
31
+ # `gs://bucket_name/object_name`. Object versioning is not supported.
32
+ # For more information, refer to [Google Cloud Storage Request
33
+ # URIs](https://cloud.google.com/storage/docs/reference-uris).
35
34
  # @!attribute [rw] content
36
35
  # @return [::String]
37
36
  # Optional. Inline document content, represented as a stream of bytes.
@@ -39,9 +38,8 @@ module Google
39
38
  # representation, whereas JSON representations use base64.
40
39
  # @!attribute [rw] mime_type
41
40
  # @return [::String]
42
- # An IANA published MIME type (also referred to as media type). For more
43
- # information, see
44
- # https://www.iana.org/assignments/media-types/media-types.xhtml.
41
+ # An IANA published [media type (MIME
42
+ # type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
45
43
  # @!attribute [rw] text
46
44
  # @return [::String]
47
45
  # Optional. UTF-8 encoded text in reading order from the document.
@@ -115,17 +113,18 @@ module Google
115
113
  # Text background color.
116
114
  # @!attribute [rw] font_weight
117
115
  # @return [::String]
118
- # Font weight. Possible values are normal, bold, bolder, and lighter.
119
- # https://www.w3schools.com/cssref/pr_font_weight.asp
116
+ # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp).
117
+ # Possible values are `normal`, `bold`, `bolder`, and `lighter`.
120
118
  # @!attribute [rw] text_style
121
119
  # @return [::String]
122
- # Text style. Possible values are normal, italic, and oblique.
123
- # https://www.w3schools.com/cssref/pr_font_font-style.asp
120
+ # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
121
+ # Possible values are `normal`, `italic`, and `oblique`.
124
122
  # @!attribute [rw] text_decoration
125
123
  # @return [::String]
126
- # Text decoration. Follows CSS standard.
127
- # <text-decoration-line> <text-decoration-color> <text-decoration-style>
128
- # https://www.w3schools.com/cssref/pr_text_text-decoration.asp
124
+ # [Text
125
+ # decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp).
126
+ # Follows CSS standard. <text-decoration-line> <text-decoration-color>
127
+ # <text-decoration-style>
129
128
  # @!attribute [rw] font_size
130
129
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Style::FontSize]
131
130
  # Font size.
@@ -143,7 +142,8 @@ module Google
143
142
  # Font size for the text.
144
143
  # @!attribute [rw] unit
145
144
  # @return [::String]
146
- # Unit for the font size. Follows CSS naming (in, px, pt, etc.).
145
+ # Unit for the font size. Follows CSS naming (such as `in`, `px`, and
146
+ # `pt`).
147
147
  class FontSize
148
148
  include ::Google::Protobuf::MessageExts
149
149
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -212,7 +212,7 @@ module Google
212
212
  # A list of detected barcodes.
213
213
  # @!attribute [rw] image_quality_scores
214
214
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores]
215
- # Image Quality Scores.
215
+ # Image quality scores.
216
216
  # @!attribute [rw] provenance
217
217
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
218
218
  # The history of this page.
@@ -241,7 +241,9 @@ module Google
241
241
  # Raw byte content of the image.
242
242
  # @!attribute [rw] mime_type
243
243
  # @return [::String]
244
- # Encoding mime type for the image.
244
+ # Encoding [media type (MIME
245
+ # type)](https://www.iana.org/assignments/media-types/media-types.xhtml)
246
+ # for the image.
245
247
  # @!attribute [rw] width
246
248
  # @return [::Integer]
247
249
  # Width of the image in pixels.
@@ -386,6 +388,9 @@ module Google
386
388
  # @!attribute [rw] provenance
387
389
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Provenance]
388
390
  # The history of this annotation.
391
+ # @!attribute [rw] style_info
392
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo]
393
+ # Text style attributes.
389
394
  class Token
390
395
  include ::Google::Protobuf::MessageExts
391
396
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -414,6 +419,62 @@ module Google
414
419
  HYPHEN = 3
415
420
  end
416
421
  end
422
+
423
+ # Font and other text style attributes.
424
+ # @!attribute [rw] font_size
425
+ # @return [::Integer]
426
+ # Font size in points (`1` point is `¹⁄₇₂` inches).
427
+ # @!attribute [rw] pixel_font_size
428
+ # @return [::Float]
429
+ # Font size in pixels, equal to _unrounded
430
+ # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
431
+ # * _resolution_ ÷ `72.0`.
432
+ # @!attribute [rw] letter_spacing
433
+ # @return [::Float]
434
+ # Letter spacing in points.
435
+ # @!attribute [rw] font_type
436
+ # @return [::String]
437
+ # Name or style of the font.
438
+ # @!attribute [rw] bold
439
+ # @return [::Boolean]
440
+ # Whether the text is bold (equivalent to
441
+ # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
442
+ # is at least `700`).
443
+ # @!attribute [rw] italic
444
+ # @return [::Boolean]
445
+ # Whether the text is italic.
446
+ # @!attribute [rw] underlined
447
+ # @return [::Boolean]
448
+ # Whether the text is underlined.
449
+ # @!attribute [rw] strikeout
450
+ # @return [::Boolean]
451
+ # Whether the text is strikethrough.
452
+ # @!attribute [rw] subscript
453
+ # @return [::Boolean]
454
+ # Whether the text is a subscript.
455
+ # @!attribute [rw] superscript
456
+ # @return [::Boolean]
457
+ # Whether the text is a superscript.
458
+ # @!attribute [rw] smallcaps
459
+ # @return [::Boolean]
460
+ # Whether the text is in small caps.
461
+ # @!attribute [rw] font_weight
462
+ # @return [::Integer]
463
+ # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
464
+ # Normal is `400`, bold is `700`.
465
+ # @!attribute [rw] handwritten
466
+ # @return [::Boolean]
467
+ # Whether the text is handwritten.
468
+ # @!attribute [rw] text_color
469
+ # @return [::Google::Type::Color]
470
+ # Color of the text.
471
+ # @!attribute [rw] background_color
472
+ # @return [::Google::Type::Color]
473
+ # Color of the background.
474
+ class StyleInfo
475
+ include ::Google::Protobuf::MessageExts
476
+ extend ::Google::Protobuf::MessageExts::ClassMethods
477
+ end
417
478
  end
418
479
 
419
480
  # A detected symbol.
@@ -557,9 +618,9 @@ module Google
557
618
  # Detected language for a structural component.
558
619
  # @!attribute [rw] language_code
559
620
  # @return [::String]
560
- # The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
561
- # information, see
562
- # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
621
+ # The [BCP-47 language
622
+ # code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier),
623
+ # such as `en-US` or `sr-Latn`.
563
624
  # @!attribute [rw] confidence
564
625
  # @return [::Float]
565
626
  # Confidence of detected language. Range `[0, 1]`.
@@ -568,10 +629,10 @@ module Google
568
629
  extend ::Google::Protobuf::MessageExts::ClassMethods
569
630
  end
570
631
 
571
- # Image Quality Scores for the page image
632
+ # Image quality scores for the page image.
572
633
  # @!attribute [rw] quality_score
573
634
  # @return [::Float]
574
- # The overall quality score. Range `[0, 1]` where 1 is perfect quality.
635
+ # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
575
636
  # @!attribute [rw] detected_defects
576
637
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::ImageQualityScores::DetectedDefect>]
577
638
  # A list of detected defects.
@@ -594,8 +655,8 @@ module Google
594
655
  # - `quality/defect_glare`
595
656
  # @!attribute [rw] confidence
596
657
  # @return [::Float]
597
- # Confidence of detected defect. Range `[0, 1]` where 1 indicates
598
- # strong confidence of that the defect exists.
658
+ # Confidence of detected defect. Range `[0, 1]` where `1` indicates
659
+ # strong confidence that the defect exists.
599
660
  class DetectedDefect
600
661
  include ::Google::Protobuf::MessageExts
601
662
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -883,9 +944,9 @@ module Google
883
944
  REMOVE = 2
884
945
 
885
946
  # Updates any fields within the given provenance scope of the message. It
886
- # 'overwrites' the fields rather than replacing them. This is
887
- # especially relevant when we just want to update a field value of an
888
- # entity without also affecting all the child properties.
947
+ # overwrites the fields rather than replacing them. Use this when you
948
+ # want to update a field value of an entity without also updating all the
949
+ # child properties.
889
950
  UPDATE = 7
890
951
 
891
952
  # Currently unused. Replace an element identified by `parent`.
@@ -130,10 +130,19 @@ module Google
130
130
  # Adds additional latency comparable to regular OCR to the process call.
131
131
  # @!attribute [rw] advanced_ocr_options
132
132
  # @return [::Array<::String>]
133
- # A list of advanced OCR options to further fine-tune OCR behavior.
133
+ # A list of advanced OCR options to further fine-tune OCR behavior. Current
134
+ # valid values are:
135
+ #
136
+ # - `legacy_layout`: a heuristics layout detection algorithm, which serves as
137
+ # an alternative to the current ML-based layout detection algorithm.
138
+ # Customers can choose the best suitable layout algorithm based on their
139
+ # situation.
134
140
  # @!attribute [rw] enable_symbol
135
141
  # @return [::Boolean]
136
142
  # Includes symbol level OCR information if set to true.
143
+ # @!attribute [rw] compute_style_info
144
+ # @return [::Boolean]
145
+ # Turn on font id model and returns font style information.
137
146
  class OcrConfig
138
147
  include ::Google::Protobuf::MessageExts
139
148
  extend ::Google::Protobuf::MessageExts::ClassMethods