google-cloud-document_ai-v1beta3 0.20.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +106 -2
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +2 -2
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +76 -2
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb +2 -2
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/service_stub.rb +60 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +7 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +15 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +2 -0
- data/proto_docs/google/api/client.rb +9 -3
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +25 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +42 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61b38d6025f3e3a453d20848afb477210cd59d1d03f8d407c0dc63e49fb6f34b
|
4
|
+
data.tar.gz: 2343d5166995d371d04589743d170dd379c77c148ad6647f6217884241cdcd7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fba7c5ebeba89027384b807fcbf430bb32f92e2f4b81ec00ac1abb635b1fa572ba606b1f4711f6b73e8e4787c6b36816a9702299227e1f2a00e12482f767bb0f
|
7
|
+
data.tar.gz: b3f8078f1c98bfaa6c3134382f5e95523b5616a50d668c9d4c90ba4a795450ccfd4f336695ab6458480ddd7225f30c3fd6f62fb336deed1f26b220267467abc5
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ for general usage information.
|
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
49
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -2302,6 +2302,103 @@ module Google
|
|
2302
2302
|
raise ::Google::Cloud::Error.from_error(e)
|
2303
2303
|
end
|
2304
2304
|
|
2305
|
+
##
|
2306
|
+
# Imports a processor version from source processor version.
|
2307
|
+
#
|
2308
|
+
# @overload import_processor_version(request, options = nil)
|
2309
|
+
# Pass arguments to `import_processor_version` via a request object, either of type
|
2310
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest} or an equivalent Hash.
|
2311
|
+
#
|
2312
|
+
# @param request [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest, ::Hash]
|
2313
|
+
# A request object representing the call parameters. Required. To specify no
|
2314
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2315
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2316
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2317
|
+
#
|
2318
|
+
# @overload import_processor_version(processor_version_source: nil, parent: nil)
|
2319
|
+
# Pass arguments to `import_processor_version` via keyword arguments. Note that at
|
2320
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2321
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2322
|
+
#
|
2323
|
+
# @param processor_version_source [::String]
|
2324
|
+
# The source processor version to import from.
|
2325
|
+
# @param parent [::String]
|
2326
|
+
# Required. The destination processor name to create the processor version
|
2327
|
+
# in. Format:
|
2328
|
+
# `projects/{project}/locations/{location}/processors/{processor}`
|
2329
|
+
#
|
2330
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2331
|
+
# @yieldparam response [::Gapic::Operation]
|
2332
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2333
|
+
#
|
2334
|
+
# @return [::Gapic::Operation]
|
2335
|
+
#
|
2336
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2337
|
+
#
|
2338
|
+
# @example Basic example
|
2339
|
+
# require "google/cloud/document_ai/v1beta3"
|
2340
|
+
#
|
2341
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2342
|
+
# client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
|
2343
|
+
#
|
2344
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2345
|
+
# request = Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest.new
|
2346
|
+
#
|
2347
|
+
# # Call the import_processor_version method.
|
2348
|
+
# result = client.import_processor_version request
|
2349
|
+
#
|
2350
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2351
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2352
|
+
# # Here is how to wait for a response.
|
2353
|
+
# result.wait_until_done! timeout: 60
|
2354
|
+
# if result.response?
|
2355
|
+
# p result.response
|
2356
|
+
# else
|
2357
|
+
# puts "No response received."
|
2358
|
+
# end
|
2359
|
+
#
|
2360
|
+
def import_processor_version request, options = nil
|
2361
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2362
|
+
|
2363
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest
|
2364
|
+
|
2365
|
+
# Converts hash and nil to an options object
|
2366
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2367
|
+
|
2368
|
+
# Customize the options with defaults
|
2369
|
+
metadata = @config.rpcs.import_processor_version.metadata.to_h
|
2370
|
+
|
2371
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2372
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2373
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2374
|
+
gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
|
2375
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2376
|
+
|
2377
|
+
header_params = {}
|
2378
|
+
if request.parent
|
2379
|
+
header_params["parent"] = request.parent
|
2380
|
+
end
|
2381
|
+
|
2382
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2383
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2384
|
+
|
2385
|
+
options.apply_defaults timeout: @config.rpcs.import_processor_version.timeout,
|
2386
|
+
metadata: metadata,
|
2387
|
+
retry_policy: @config.rpcs.import_processor_version.retry_policy
|
2388
|
+
|
2389
|
+
options.apply_defaults timeout: @config.timeout,
|
2390
|
+
metadata: @config.metadata,
|
2391
|
+
retry_policy: @config.retry_policy
|
2392
|
+
|
2393
|
+
@document_processor_service_stub.call_rpc :import_processor_version, request, options: options do |response, operation|
|
2394
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2395
|
+
yield response, operation if block_given?
|
2396
|
+
return response
|
2397
|
+
end
|
2398
|
+
rescue ::GRPC::BadStatus => e
|
2399
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2400
|
+
end
|
2401
|
+
|
2305
2402
|
##
|
2306
2403
|
# Configuration class for the DocumentProcessorService API.
|
2307
2404
|
#
|
@@ -2340,9 +2437,9 @@ module Google
|
|
2340
2437
|
# * (`String`) The path to a service account key file in JSON format
|
2341
2438
|
# * (`Hash`) A service account key as a Hash
|
2342
2439
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2343
|
-
# (see the [googleauth docs](https://
|
2440
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
2344
2441
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2345
|
-
# (see the [signet docs](https://
|
2442
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2346
2443
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2347
2444
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2348
2445
|
# * (`nil`) indicating no credentials
|
@@ -2547,6 +2644,11 @@ module Google
|
|
2547
2644
|
# @return [::Gapic::Config::Method]
|
2548
2645
|
#
|
2549
2646
|
attr_reader :list_evaluations
|
2647
|
+
##
|
2648
|
+
# RPC-specific configuration for `import_processor_version`
|
2649
|
+
# @return [::Gapic::Config::Method]
|
2650
|
+
#
|
2651
|
+
attr_reader :import_processor_version
|
2550
2652
|
|
2551
2653
|
# @private
|
2552
2654
|
def initialize parent_rpcs = nil
|
@@ -2594,6 +2696,8 @@ module Google
|
|
2594
2696
|
@get_evaluation = ::Gapic::Config::Method.new get_evaluation_config
|
2595
2697
|
list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations
|
2596
2698
|
@list_evaluations = ::Gapic::Config::Method.new list_evaluations_config
|
2699
|
+
import_processor_version_config = parent_rpcs.import_processor_version if parent_rpcs.respond_to? :import_processor_version
|
2700
|
+
@import_processor_version = ::Gapic::Config::Method.new import_processor_version_config
|
2597
2701
|
|
2598
2702
|
yield self if block_given?
|
2599
2703
|
end
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -1695,6 +1695,73 @@ module Google
|
|
1695
1695
|
raise ::Google::Cloud::Error.from_error(e)
|
1696
1696
|
end
|
1697
1697
|
|
1698
|
+
##
|
1699
|
+
# Imports a processor version from source processor version.
|
1700
|
+
#
|
1701
|
+
# @overload import_processor_version(request, options = nil)
|
1702
|
+
# Pass arguments to `import_processor_version` via a request object, either of type
|
1703
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest} or an equivalent Hash.
|
1704
|
+
#
|
1705
|
+
# @param request [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest, ::Hash]
|
1706
|
+
# A request object representing the call parameters. Required. To specify no
|
1707
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1708
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1709
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1710
|
+
#
|
1711
|
+
# @overload import_processor_version(processor_version_source: nil, parent: nil)
|
1712
|
+
# Pass arguments to `import_processor_version` via keyword arguments. Note that at
|
1713
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1714
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1715
|
+
#
|
1716
|
+
# @param processor_version_source [::String]
|
1717
|
+
# The source processor version to import from.
|
1718
|
+
# @param parent [::String]
|
1719
|
+
# Required. The destination processor name to create the processor version
|
1720
|
+
# in. Format:
|
1721
|
+
# `projects/{project}/locations/{location}/processors/{processor}`
|
1722
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1723
|
+
# @yieldparam result [::Gapic::Operation]
|
1724
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1725
|
+
#
|
1726
|
+
# @return [::Gapic::Operation]
|
1727
|
+
#
|
1728
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1729
|
+
def import_processor_version request, options = nil
|
1730
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1731
|
+
|
1732
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest
|
1733
|
+
|
1734
|
+
# Converts hash and nil to an options object
|
1735
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1736
|
+
|
1737
|
+
# Customize the options with defaults
|
1738
|
+
call_metadata = @config.rpcs.import_processor_version.metadata.to_h
|
1739
|
+
|
1740
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1741
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1742
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1743
|
+
gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
|
1744
|
+
transports_version_send: [:rest]
|
1745
|
+
|
1746
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1747
|
+
|
1748
|
+
options.apply_defaults timeout: @config.rpcs.import_processor_version.timeout,
|
1749
|
+
metadata: call_metadata,
|
1750
|
+
retry_policy: @config.rpcs.import_processor_version.retry_policy
|
1751
|
+
|
1752
|
+
options.apply_defaults timeout: @config.timeout,
|
1753
|
+
metadata: @config.metadata,
|
1754
|
+
retry_policy: @config.retry_policy
|
1755
|
+
|
1756
|
+
@document_processor_service_stub.import_processor_version request, options do |result, operation|
|
1757
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1758
|
+
yield result, operation if block_given?
|
1759
|
+
return result
|
1760
|
+
end
|
1761
|
+
rescue ::Gapic::Rest::Error => e
|
1762
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1763
|
+
end
|
1764
|
+
|
1698
1765
|
##
|
1699
1766
|
# Configuration class for the DocumentProcessorService REST API.
|
1700
1767
|
#
|
@@ -1733,9 +1800,9 @@ module Google
|
|
1733
1800
|
# * (`String`) The path to a service account key file in JSON format
|
1734
1801
|
# * (`Hash`) A service account key as a Hash
|
1735
1802
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1736
|
-
# (see the [googleauth docs](https://
|
1803
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1737
1804
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1738
|
-
# (see the [signet docs](https://
|
1805
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1739
1806
|
# * (`nil`) indicating no credentials
|
1740
1807
|
# @return [::Object]
|
1741
1808
|
# @!attribute [rw] scope
|
@@ -1935,6 +2002,11 @@ module Google
|
|
1935
2002
|
# @return [::Gapic::Config::Method]
|
1936
2003
|
#
|
1937
2004
|
attr_reader :list_evaluations
|
2005
|
+
##
|
2006
|
+
# RPC-specific configuration for `import_processor_version`
|
2007
|
+
# @return [::Gapic::Config::Method]
|
2008
|
+
#
|
2009
|
+
attr_reader :import_processor_version
|
1938
2010
|
|
1939
2011
|
# @private
|
1940
2012
|
def initialize parent_rpcs = nil
|
@@ -1982,6 +2054,8 @@ module Google
|
|
1982
2054
|
@get_evaluation = ::Gapic::Config::Method.new get_evaluation_config
|
1983
2055
|
list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations
|
1984
2056
|
@list_evaluations = ::Gapic::Config::Method.new list_evaluations_config
|
2057
|
+
import_processor_version_config = parent_rpcs.import_processor_version if parent_rpcs.respond_to? :import_processor_version
|
2058
|
+
@import_processor_version = ::Gapic::Config::Method.new import_processor_version_config
|
1985
2059
|
|
1986
2060
|
yield self if block_given?
|
1987
2061
|
end
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -876,6 +876,44 @@ module Google
|
|
876
876
|
result
|
877
877
|
end
|
878
878
|
|
879
|
+
##
|
880
|
+
# Baseline implementation for the import_processor_version REST call
|
881
|
+
#
|
882
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest]
|
883
|
+
# A request object representing the call parameters. Required.
|
884
|
+
# @param options [::Gapic::CallOptions]
|
885
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
886
|
+
#
|
887
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
888
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
889
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
890
|
+
#
|
891
|
+
# @return [::Google::Longrunning::Operation]
|
892
|
+
# A result object deserialized from the server's reply
|
893
|
+
def import_processor_version request_pb, options = nil
|
894
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
895
|
+
|
896
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_import_processor_version_request request_pb
|
897
|
+
query_string_params = if query_string_params.any?
|
898
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
899
|
+
else
|
900
|
+
{}
|
901
|
+
end
|
902
|
+
|
903
|
+
response = @client_stub.make_http_request(
|
904
|
+
verb,
|
905
|
+
uri: uri,
|
906
|
+
body: body || "",
|
907
|
+
params: query_string_params,
|
908
|
+
options: options
|
909
|
+
)
|
910
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
911
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
912
|
+
|
913
|
+
yield result, operation if block_given?
|
914
|
+
result
|
915
|
+
end
|
916
|
+
|
879
917
|
##
|
880
918
|
# @private
|
881
919
|
#
|
@@ -1364,6 +1402,28 @@ module Google
|
|
1364
1402
|
)
|
1365
1403
|
transcoder.transcode request_pb
|
1366
1404
|
end
|
1405
|
+
|
1406
|
+
##
|
1407
|
+
# @private
|
1408
|
+
#
|
1409
|
+
# GRPC transcoding helper method for the import_processor_version REST call
|
1410
|
+
#
|
1411
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest]
|
1412
|
+
# A request object representing the call parameters. Required.
|
1413
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1414
|
+
# Uri, Body, Query string parameters
|
1415
|
+
def self.transcode_import_processor_version_request request_pb
|
1416
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1417
|
+
.with_bindings(
|
1418
|
+
uri_method: :post,
|
1419
|
+
uri_template: "/v1beta3/{parent}/processorVersions:importProcessorVersion",
|
1420
|
+
body: "*",
|
1421
|
+
matches: [
|
1422
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/?$}, false]
|
1423
|
+
]
|
1424
|
+
)
|
1425
|
+
transcoder.transcode request_pb
|
1426
|
+
end
|
1367
1427
|
end
|
1368
1428
|
end
|
1369
1429
|
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
|
@@ -279,6 +279,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
279
279
|
repeated :evaluations, :message, 1, "google.cloud.documentai.v1beta3.Evaluation"
|
280
280
|
optional :next_page_token, :string, 2
|
281
281
|
end
|
282
|
+
add_message "google.cloud.documentai.v1beta3.ImportProcessorVersionRequest" do
|
283
|
+
optional :parent, :string, 1
|
284
|
+
oneof :source do
|
285
|
+
optional :processor_version_source, :string, 2
|
286
|
+
end
|
287
|
+
end
|
288
|
+
add_message "google.cloud.documentai.v1beta3.ImportProcessorVersionResponse" do
|
289
|
+
optional :processor_version, :string, 1
|
290
|
+
end
|
291
|
+
add_message "google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata" do
|
292
|
+
optional :common_metadata, :message, 1, "google.cloud.documentai.v1beta3.CommonOperationMetadata"
|
293
|
+
end
|
282
294
|
end
|
283
295
|
end
|
284
296
|
|
@@ -346,6 +358,9 @@ module Google
|
|
346
358
|
GetEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.GetEvaluationRequest").msgclass
|
347
359
|
ListEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ListEvaluationsRequest").msgclass
|
348
360
|
ListEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ListEvaluationsResponse").msgclass
|
361
|
+
ImportProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ImportProcessorVersionRequest").msgclass
|
362
|
+
ImportProcessorVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ImportProcessorVersionResponse").msgclass
|
363
|
+
ImportProcessorVersionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ImportProcessorVersionMetadata").msgclass
|
349
364
|
end
|
350
365
|
end
|
351
366
|
end
|
@@ -93,6 +93,8 @@ module Google
|
|
93
93
|
rpc :GetEvaluation, ::Google::Cloud::DocumentAI::V1beta3::GetEvaluationRequest, ::Google::Cloud::DocumentAI::V1beta3::Evaluation
|
94
94
|
# Retrieves a set of evaluations for a given processor version.
|
95
95
|
rpc :ListEvaluations, ::Google::Cloud::DocumentAI::V1beta3::ListEvaluationsRequest, ::Google::Cloud::DocumentAI::V1beta3::ListEvaluationsResponse
|
96
|
+
# Imports a processor version from source processor version.
|
97
|
+
rpc :ImportProcessorVersion, ::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest, ::Google::Longrunning::Operation
|
96
98
|
end
|
97
99
|
|
98
100
|
Stub = Service.rpc_stub_class
|
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# Details about how and where to publish client libraries.
|
36
36
|
# @!attribute [rw] version
|
37
37
|
# @return [::String]
|
38
|
-
# Version of the API to apply these settings to.
|
38
|
+
# Version of the API to apply these settings to. This is the full protobuf
|
39
|
+
# package for the API, ending in the version element.
|
40
|
+
# Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
|
39
41
|
# @!attribute [rw] launch_stage
|
40
42
|
# @return [::Google::Api::LaunchStage]
|
41
43
|
# Launch stage of this version of the API.
|
@@ -111,6 +113,10 @@ module Google
|
|
111
113
|
# Client library settings. If the same version string appears multiple
|
112
114
|
# times in this list, then the last one wins. Settings from earlier
|
113
115
|
# settings with the same version string are discarded.
|
116
|
+
# @!attribute [rw] proto_reference_documentation_uri
|
117
|
+
# @return [::String]
|
118
|
+
# Optional link to proto reference documentation. Example:
|
119
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
114
120
|
class Publishing
|
115
121
|
include ::Google::Protobuf::MessageExts
|
116
122
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -240,8 +246,8 @@ module Google
|
|
240
246
|
# Example of a YAML configuration::
|
241
247
|
#
|
242
248
|
# publishing:
|
243
|
-
#
|
244
|
-
# - selector:
|
249
|
+
# method_settings:
|
250
|
+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
245
251
|
# long_running:
|
246
252
|
# initial_poll_delay:
|
247
253
|
# seconds: 60 # 1 minute
|
@@ -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
|
@@ -861,6 +861,48 @@ module Google
|
|
861
861
|
include ::Google::Protobuf::MessageExts
|
862
862
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
863
863
|
end
|
864
|
+
|
865
|
+
# The request message for the ImportProcessorVersion method.
|
866
|
+
# This method requires Document AI Service Agent of the destination project in
|
867
|
+
# the source project's IAM with [Document AI Editor
|
868
|
+
# role](https://cloud.google.com/document-ai/docs/access-control/iam-roles).
|
869
|
+
#
|
870
|
+
# The destination project is specified as part of the `parent` field.
|
871
|
+
# The source project is specified as part of `source` field.
|
872
|
+
#
|
873
|
+
# The Service Agent for Document AI can be found in
|
874
|
+
# https://cloud.google.com/iam/docs/service-agents.
|
875
|
+
# @!attribute [rw] processor_version_source
|
876
|
+
# @return [::String]
|
877
|
+
# The source processor version to import from.
|
878
|
+
# @!attribute [rw] parent
|
879
|
+
# @return [::String]
|
880
|
+
# Required. The destination processor name to create the processor version
|
881
|
+
# in. Format:
|
882
|
+
# `projects/{project}/locations/{location}/processors/{processor}`
|
883
|
+
class ImportProcessorVersionRequest
|
884
|
+
include ::Google::Protobuf::MessageExts
|
885
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
886
|
+
end
|
887
|
+
|
888
|
+
# The response message for the ImportProcessorVersion method.
|
889
|
+
# @!attribute [rw] processor_version
|
890
|
+
# @return [::String]
|
891
|
+
# The destination processor version name.
|
892
|
+
class ImportProcessorVersionResponse
|
893
|
+
include ::Google::Protobuf::MessageExts
|
894
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
895
|
+
end
|
896
|
+
|
897
|
+
# The long running operation metadata for the ImportProcessorVersion
|
898
|
+
# method.
|
899
|
+
# @!attribute [rw] common_metadata
|
900
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
|
901
|
+
# The basic metadata for the long running operation.
|
902
|
+
class ImportProcessorVersionMetadata
|
903
|
+
include ::Google::Protobuf::MessageExts
|
904
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
905
|
+
end
|
864
906
|
end
|
865
907
|
end
|
866
908
|
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.22.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-03-
|
11
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|