google-cloud-document_ai-v1beta3 0.19.0 → 0.21.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/document_ai/v1beta3/bindings_override.rb +118 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +60 -68
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +12 -14
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +1996 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb +813 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/service_stub.rb +1373 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb +57 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +6 -0
- data/lib/google/cloud/document_ai/v1beta3/rest.rb +38 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3.rb +5 -0
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +7 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +25 -0
- metadata +17 -9
| @@ -0,0 +1,57 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Copyright 2023 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 | 
            +
            require "gapic/rest"
         | 
| 20 | 
            +
            require "gapic/config"
         | 
| 21 | 
            +
            require "gapic/config/method"
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            require "google/cloud/document_ai/v1beta3/version"
         | 
| 24 | 
            +
            require "google/cloud/document_ai/v1beta3/bindings_override"
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/credentials"
         | 
| 27 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/paths"
         | 
| 28 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/rest/operations"
         | 
| 29 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/rest/client"
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            module Google
         | 
| 32 | 
            +
              module Cloud
         | 
| 33 | 
            +
                module DocumentAI
         | 
| 34 | 
            +
                  module V1beta3
         | 
| 35 | 
            +
                    ##
         | 
| 36 | 
            +
                    # Service to call Cloud DocumentAI to process documents according to the
         | 
| 37 | 
            +
                    # processor's definition. Processors are built using state-of-the-art Google
         | 
| 38 | 
            +
                    # AI such as natural language, computer vision, and translation to extract
         | 
| 39 | 
            +
                    # structured information from unstructured or semi-structured documents.
         | 
| 40 | 
            +
                    #
         | 
| 41 | 
            +
                    # To load this service and instantiate a REST client:
         | 
| 42 | 
            +
                    #
         | 
| 43 | 
            +
                    #     require "google/cloud/document_ai/v1beta3/document_processor_service/rest"
         | 
| 44 | 
            +
                    #     client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.new
         | 
| 45 | 
            +
                    #
         | 
| 46 | 
            +
                    module DocumentProcessorService
         | 
| 47 | 
            +
                      # Client for the REST transport
         | 
| 48 | 
            +
                      module Rest
         | 
| 49 | 
            +
                      end
         | 
| 50 | 
            +
                    end
         | 
| 51 | 
            +
                  end
         | 
| 52 | 
            +
                end
         | 
| 53 | 
            +
              end
         | 
| 54 | 
            +
            end
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            helper_path = ::File.join __dir__, "rest", "helpers.rb"
         | 
| 57 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/rest/helpers" if ::File.file? helper_path
         | 
| @@ -26,6 +26,7 @@ require "google/cloud/document_ai/v1beta3/document_processor_service/credentials | |
| 26 26 | 
             
            require "google/cloud/document_ai/v1beta3/document_processor_service/paths"
         | 
| 27 27 | 
             
            require "google/cloud/document_ai/v1beta3/document_processor_service/operations"
         | 
| 28 28 | 
             
            require "google/cloud/document_ai/v1beta3/document_processor_service/client"
         | 
| 29 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/rest"
         | 
| 29 30 |  | 
| 30 31 | 
             
            module Google
         | 
| 31 32 | 
             
              module Cloud
         | 
| @@ -42,6 +43,11 @@ module Google | |
| 42 43 | 
             
                    #     require "google/cloud/document_ai/v1beta3/document_processor_service"
         | 
| 43 44 | 
             
                    #     client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
         | 
| 44 45 | 
             
                    #
         | 
| 46 | 
            +
                    # @example Load this service and instantiate a REST client
         | 
| 47 | 
            +
                    #
         | 
| 48 | 
            +
                    #     require "google/cloud/document_ai/v1beta3/document_processor_service/rest"
         | 
| 49 | 
            +
                    #     client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.new
         | 
| 50 | 
            +
                    #
         | 
| 45 51 | 
             
                    module DocumentProcessorService
         | 
| 46 52 | 
             
                    end
         | 
| 47 53 | 
             
                  end
         | 
| @@ -0,0 +1,38 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Copyright 2023 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 | 
            +
            require "google/cloud/document_ai/v1beta3/document_processor_service/rest"
         | 
| 20 | 
            +
            require "google/cloud/document_ai/v1beta3/bindings_override"
         | 
| 21 | 
            +
            require "google/cloud/document_ai/v1beta3/version"
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            module Google
         | 
| 24 | 
            +
              module Cloud
         | 
| 25 | 
            +
                module DocumentAI
         | 
| 26 | 
            +
                  ##
         | 
| 27 | 
            +
                  # To load just the REST part of this package, including all its services, and instantiate a REST client:
         | 
| 28 | 
            +
                  #
         | 
| 29 | 
            +
                  # @example
         | 
| 30 | 
            +
                  #
         | 
| 31 | 
            +
                  #     require "google/cloud/document_ai/v1beta3/rest"
         | 
| 32 | 
            +
                  #     client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.new
         | 
| 33 | 
            +
                  #
         | 
| 34 | 
            +
                  module V1beta3
         | 
| 35 | 
            +
                  end
         | 
| 36 | 
            +
                end
         | 
| 37 | 
            +
              end
         | 
| 38 | 
            +
            end
         | 
| @@ -30,6 +30,11 @@ module Google | |
| 30 30 | 
             
                  #     require "google/cloud/document_ai/v1beta3"
         | 
| 31 31 | 
             
                  #     client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
         | 
| 32 32 | 
             
                  #
         | 
| 33 | 
            +
                  # @example Load this package, including all its services, and instantiate a REST client
         | 
| 34 | 
            +
                  #
         | 
| 35 | 
            +
                  #     require "google/cloud/document_ai/v1beta3"
         | 
| 36 | 
            +
                  #     client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.new
         | 
| 37 | 
            +
                  #
         | 
| 33 38 | 
             
                  module V1beta3
         | 
| 34 39 | 
             
                  end
         | 
| 35 40 | 
             
                end
         | 
| @@ -42,8 +42,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do | |
| 42 42 | 
             
                  optional :pages_overlap, :int32, 2
         | 
| 43 43 | 
             
                end
         | 
| 44 44 | 
             
                add_message "google.cloud.documentai.v1beta3.OcrConfig" do
         | 
| 45 | 
            +
                  optional :hints, :message, 2, "google.cloud.documentai.v1beta3.OcrConfig.Hints"
         | 
| 45 46 | 
             
                  optional :enable_native_pdf_parsing, :bool, 3
         | 
| 47 | 
            +
                  optional :enable_image_quality_scores, :bool, 4
         | 
| 46 48 | 
             
                  repeated :advanced_ocr_options, :string, 5
         | 
| 49 | 
            +
                  optional :enable_symbol, :bool, 6
         | 
| 50 | 
            +
                end
         | 
| 51 | 
            +
                add_message "google.cloud.documentai.v1beta3.OcrConfig.Hints" do
         | 
| 52 | 
            +
                  repeated :language_hints, :string, 1
         | 
| 47 53 | 
             
                end
         | 
| 48 54 | 
             
              end
         | 
| 49 55 | 
             
            end
         | 
| @@ -61,6 +67,7 @@ module Google | |
| 61 67 | 
             
                    DocumentOutputConfig::GcsOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig").msgclass
         | 
| 62 68 | 
             
                    DocumentOutputConfig::GcsOutputConfig::ShardingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig").msgclass
         | 
| 63 69 | 
             
                    OcrConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.OcrConfig").msgclass
         | 
| 70 | 
            +
                    OcrConfig::Hints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.OcrConfig.Hints").msgclass
         | 
| 64 71 | 
             
                  end
         | 
| 65 72 | 
             
                end
         | 
| 66 73 | 
             
              end
         | 
| @@ -116,16 +116,41 @@ module Google | |
| 116 116 | 
             
                    end
         | 
| 117 117 |  | 
| 118 118 | 
             
                    # Config for Document OCR.
         | 
| 119 | 
            +
                    # @!attribute [rw] hints
         | 
| 120 | 
            +
                    #   @return [::Google::Cloud::DocumentAI::V1beta3::OcrConfig::Hints]
         | 
| 121 | 
            +
                    #     Hints for the OCR model.
         | 
| 119 122 | 
             
                    # @!attribute [rw] enable_native_pdf_parsing
         | 
| 120 123 | 
             
                    #   @return [::Boolean]
         | 
| 121 124 | 
             
                    #     Enables special handling for PDFs with existing text information. Results
         | 
| 122 125 | 
             
                    #     in better text extraction quality in such PDF inputs.
         | 
| 126 | 
            +
                    # @!attribute [rw] enable_image_quality_scores
         | 
| 127 | 
            +
                    #   @return [::Boolean]
         | 
| 128 | 
            +
                    #     Enables intelligent document quality scores after OCR. Can help with
         | 
| 129 | 
            +
                    #     diagnosing why OCR responses are of poor quality for a given input.
         | 
| 130 | 
            +
                    #     Adds additional latency comparable to regular OCR to the process call.
         | 
| 123 131 | 
             
                    # @!attribute [rw] advanced_ocr_options
         | 
| 124 132 | 
             
                    #   @return [::Array<::String>]
         | 
| 125 133 | 
             
                    #     A list of advanced OCR options to further fine-tune OCR behavior.
         | 
| 134 | 
            +
                    # @!attribute [rw] enable_symbol
         | 
| 135 | 
            +
                    #   @return [::Boolean]
         | 
| 136 | 
            +
                    #     Includes symbol level OCR information if set to true.
         | 
| 126 137 | 
             
                    class OcrConfig
         | 
| 127 138 | 
             
                      include ::Google::Protobuf::MessageExts
         | 
| 128 139 | 
             
                      extend ::Google::Protobuf::MessageExts::ClassMethods
         | 
| 140 | 
            +
             | 
| 141 | 
            +
                      # Hints for OCR Engine
         | 
| 142 | 
            +
                      # @!attribute [rw] language_hints
         | 
| 143 | 
            +
                      #   @return [::Array<::String>]
         | 
| 144 | 
            +
                      #     List of BCP-47 language codes to use for OCR. In most cases, not
         | 
| 145 | 
            +
                      #     specifying it yields the best results since it enables automatic language
         | 
| 146 | 
            +
                      #     detection. For languages based on the Latin alphabet, setting hints is
         | 
| 147 | 
            +
                      #     not needed. In rare cases, when the language of the text in the
         | 
| 148 | 
            +
                      #     image is known, setting a hint will help get better results (although it
         | 
| 149 | 
            +
                      #     will be a significant hindrance if the hint is wrong).
         | 
| 150 | 
            +
                      class Hints
         | 
| 151 | 
            +
                        include ::Google::Protobuf::MessageExts
         | 
| 152 | 
            +
                        extend ::Google::Protobuf::MessageExts::ClassMethods
         | 
| 153 | 
            +
                      end
         | 
| 129 154 | 
             
                    end
         | 
| 130 155 | 
             
                  end
         | 
| 131 156 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: google-cloud-document_ai-v1beta3
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.21.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: 2023- | 
| 11 | 
            +
            date: 2023-03-09 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. | 
| 19 | 
            +
                    version: 0.18.0
         | 
| 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. | 
| 29 | 
            +
                    version: 0.18.0
         | 
| 30 30 | 
             
                - - "<"
         | 
| 31 31 | 
             
                  - !ruby/object:Gem::Version
         | 
| 32 32 | 
             
                    version: 2.a
         | 
| @@ -50,7 +50,7 @@ dependencies: | |
| 50 50 | 
             
                requirements:
         | 
| 51 51 | 
             
                - - ">="
         | 
| 52 52 | 
             
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            -
                    version: '0. | 
| 53 | 
            +
                    version: '0.4'
         | 
| 54 54 | 
             
                - - "<"
         | 
| 55 55 | 
             
                  - !ruby/object:Gem::Version
         | 
| 56 56 | 
             
                    version: 2.a
         | 
| @@ -60,7 +60,7 @@ dependencies: | |
| 60 60 | 
             
                requirements:
         | 
| 61 61 | 
             
                - - ">="
         | 
| 62 62 | 
             
                  - !ruby/object:Gem::Version
         | 
| 63 | 
            -
                    version: '0. | 
| 63 | 
            +
                    version: '0.4'
         | 
| 64 64 | 
             
                - - "<"
         | 
| 65 65 | 
             
                  - !ruby/object:Gem::Version
         | 
| 66 66 | 
             
                    version: 2.a
         | 
| @@ -70,14 +70,14 @@ dependencies: | |
| 70 70 | 
             
                requirements:
         | 
| 71 71 | 
             
                - - "~>"
         | 
| 72 72 | 
             
                  - !ruby/object:Gem::Version
         | 
| 73 | 
            -
                    version: 1.26. | 
| 73 | 
            +
                    version: 1.26.3
         | 
| 74 74 | 
             
              type: :development
         | 
| 75 75 | 
             
              prerelease: false
         | 
| 76 76 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 77 77 | 
             
                requirements:
         | 
| 78 78 | 
             
                - - "~>"
         | 
| 79 79 | 
             
                  - !ruby/object:Gem::Version
         | 
| 80 | 
            -
                    version: 1.26. | 
| 80 | 
            +
                    version: 1.26.3
         | 
| 81 81 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 82 82 | 
             
              name: minitest
         | 
| 83 83 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -192,11 +192,17 @@ files: | |
| 192 192 | 
             
            - README.md
         | 
| 193 193 | 
             
            - lib/google-cloud-document_ai-v1beta3.rb
         | 
| 194 194 | 
             
            - lib/google/cloud/document_ai/v1beta3.rb
         | 
| 195 | 
            +
            - lib/google/cloud/document_ai/v1beta3/bindings_override.rb
         | 
| 195 196 | 
             
            - lib/google/cloud/document_ai/v1beta3/document_processor_service.rb
         | 
| 196 197 | 
             
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb
         | 
| 197 198 | 
             
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/credentials.rb
         | 
| 198 199 | 
             
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb
         | 
| 199 200 | 
             
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb
         | 
| 201 | 
            +
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb
         | 
| 202 | 
            +
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb
         | 
| 203 | 
            +
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb
         | 
| 204 | 
            +
            - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/service_stub.rb
         | 
| 205 | 
            +
            - lib/google/cloud/document_ai/v1beta3/rest.rb
         | 
| 200 206 | 
             
            - lib/google/cloud/document_ai/v1beta3/version.rb
         | 
| 201 207 | 
             
            - lib/google/cloud/documentai/v1beta3/barcode_pb.rb
         | 
| 202 208 | 
             
            - lib/google/cloud/documentai/v1beta3/document_io_pb.rb
         | 
| @@ -259,5 +265,7 @@ requirements: [] | |
| 259 265 | 
             
            rubygems_version: 3.4.2
         | 
| 260 266 | 
             
            signing_key: 
         | 
| 261 267 | 
             
            specification_version: 4
         | 
| 262 | 
            -
            summary:  | 
| 268 | 
            +
            summary: Service to parse structured information from unstructured or semi-structured
         | 
| 269 | 
            +
              documents using state-of-the-art Google AI such as natural language, computer vision,
         | 
| 270 | 
            +
              translation, and AutoML.
         | 
| 263 271 | 
             
            test_files: []
         |