google-cloud-document_ai-v1beta3 0.16.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +92 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +19 -0
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3.rb +2 -2
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +1 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +4 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +2 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +3 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +9 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcfc57a7ccafe29e077fc24b7bda5f649eca0816673cb7b5bc58298b2a3dda85
|
4
|
+
data.tar.gz: 8cdb98225c5d9648bf8e5aefce32c7e6579225b1193b11bb76d58b21243fca2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed9190ce5a5e089cac8676ac585c6d150e0b761c13fc94fa0b4b3eca0f728a7d933b6f7e73b8e56d4f303c9076589aec7fcdd4af302a748939ab5c9351a4f5d1
|
7
|
+
data.tar.gz: 793a0abea6968ace9fb988220eebc60dada1096423552e27554a866f8005a893363ce210b422c7683695a200813ccb7abe51ac0f7fc31d13116d15ef2fdc5f5f
|
@@ -598,6 +598,91 @@ module Google
|
|
598
598
|
raise ::Google::Cloud::Error.from_error(e)
|
599
599
|
end
|
600
600
|
|
601
|
+
##
|
602
|
+
# Gets a processor type detail.
|
603
|
+
#
|
604
|
+
# @overload get_processor_type(request, options = nil)
|
605
|
+
# Pass arguments to `get_processor_type` via a request object, either of type
|
606
|
+
# {::Google::Cloud::DocumentAI::V1beta3::GetProcessorTypeRequest} or an equivalent Hash.
|
607
|
+
#
|
608
|
+
# @param request [::Google::Cloud::DocumentAI::V1beta3::GetProcessorTypeRequest, ::Hash]
|
609
|
+
# A request object representing the call parameters. Required. To specify no
|
610
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
611
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
612
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
613
|
+
#
|
614
|
+
# @overload get_processor_type(name: nil)
|
615
|
+
# Pass arguments to `get_processor_type` via keyword arguments. Note that at
|
616
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
617
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
618
|
+
#
|
619
|
+
# @param name [::String]
|
620
|
+
# Required. The processor type resource name.
|
621
|
+
#
|
622
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
623
|
+
# @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::ProcessorType]
|
624
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
625
|
+
#
|
626
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorType]
|
627
|
+
#
|
628
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
629
|
+
#
|
630
|
+
# @example Basic example
|
631
|
+
# require "google/cloud/document_ai/v1beta3"
|
632
|
+
#
|
633
|
+
# # Create a client object. The client can be reused for multiple calls.
|
634
|
+
# client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
|
635
|
+
#
|
636
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
637
|
+
# request = Google::Cloud::DocumentAI::V1beta3::GetProcessorTypeRequest.new
|
638
|
+
#
|
639
|
+
# # Call the get_processor_type method.
|
640
|
+
# result = client.get_processor_type request
|
641
|
+
#
|
642
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1beta3::ProcessorType.
|
643
|
+
# p result
|
644
|
+
#
|
645
|
+
def get_processor_type request, options = nil
|
646
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
647
|
+
|
648
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::GetProcessorTypeRequest
|
649
|
+
|
650
|
+
# Converts hash and nil to an options object
|
651
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
652
|
+
|
653
|
+
# Customize the options with defaults
|
654
|
+
metadata = @config.rpcs.get_processor_type.metadata.to_h
|
655
|
+
|
656
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
657
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
658
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
659
|
+
gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
|
660
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
661
|
+
|
662
|
+
header_params = {}
|
663
|
+
if request.name
|
664
|
+
header_params["name"] = request.name
|
665
|
+
end
|
666
|
+
|
667
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
668
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
669
|
+
|
670
|
+
options.apply_defaults timeout: @config.rpcs.get_processor_type.timeout,
|
671
|
+
metadata: metadata,
|
672
|
+
retry_policy: @config.rpcs.get_processor_type.retry_policy
|
673
|
+
|
674
|
+
options.apply_defaults timeout: @config.timeout,
|
675
|
+
metadata: @config.metadata,
|
676
|
+
retry_policy: @config.retry_policy
|
677
|
+
|
678
|
+
@document_processor_service_stub.call_rpc :get_processor_type, request, options: options do |response, operation|
|
679
|
+
yield response, operation if block_given?
|
680
|
+
return response
|
681
|
+
end
|
682
|
+
rescue ::GRPC::BadStatus => e
|
683
|
+
raise ::Google::Cloud::Error.from_error(e)
|
684
|
+
end
|
685
|
+
|
601
686
|
##
|
602
687
|
# Lists all processors which belong to this project.
|
603
688
|
#
|
@@ -2381,6 +2466,11 @@ module Google
|
|
2381
2466
|
#
|
2382
2467
|
attr_reader :list_processor_types
|
2383
2468
|
##
|
2469
|
+
# RPC-specific configuration for `get_processor_type`
|
2470
|
+
# @return [::Gapic::Config::Method]
|
2471
|
+
#
|
2472
|
+
attr_reader :get_processor_type
|
2473
|
+
##
|
2384
2474
|
# RPC-specific configuration for `list_processors`
|
2385
2475
|
# @return [::Gapic::Config::Method]
|
2386
2476
|
#
|
@@ -2476,6 +2566,8 @@ module Google
|
|
2476
2566
|
@fetch_processor_types = ::Gapic::Config::Method.new fetch_processor_types_config
|
2477
2567
|
list_processor_types_config = parent_rpcs.list_processor_types if parent_rpcs.respond_to? :list_processor_types
|
2478
2568
|
@list_processor_types = ::Gapic::Config::Method.new list_processor_types_config
|
2569
|
+
get_processor_type_config = parent_rpcs.get_processor_type if parent_rpcs.respond_to? :get_processor_type
|
2570
|
+
@get_processor_type = ::Gapic::Config::Method.new get_processor_type_config
|
2479
2571
|
list_processors_config = parent_rpcs.list_processors if parent_rpcs.respond_to? :list_processors
|
2480
2572
|
@list_processors = ::Gapic::Config::Method.new list_processors_config
|
2481
2573
|
get_processor_config = parent_rpcs.get_processor if parent_rpcs.respond_to? :get_processor
|
@@ -102,6 +102,25 @@ module Google
|
|
102
102
|
"projects/#{project}/locations/#{location}/processors/#{processor}"
|
103
103
|
end
|
104
104
|
|
105
|
+
##
|
106
|
+
# Create a fully-qualified ProcessorType resource string.
|
107
|
+
#
|
108
|
+
# The resource will be in the following format:
|
109
|
+
#
|
110
|
+
# `projects/{project}/locations/{location}/processorTypes/{processor_type}`
|
111
|
+
#
|
112
|
+
# @param project [String]
|
113
|
+
# @param location [String]
|
114
|
+
# @param processor_type [String]
|
115
|
+
#
|
116
|
+
# @return [::String]
|
117
|
+
def processor_type_path project:, location:, processor_type:
|
118
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
119
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
120
|
+
|
121
|
+
"projects/#{project}/locations/#{location}/processorTypes/#{processor_type}"
|
122
|
+
end
|
123
|
+
|
105
124
|
##
|
106
125
|
# Create a fully-qualified ProcessorVersion resource string.
|
107
126
|
#
|
@@ -37,7 +37,7 @@ module Google
|
|
37
37
|
# AI such as natural language, computer vision, and translation to extract
|
38
38
|
# structured information from unstructured or semi-structured documents.
|
39
39
|
#
|
40
|
-
#
|
40
|
+
# @example Load this service and instantiate a gRPC client
|
41
41
|
#
|
42
42
|
# require "google/cloud/document_ai/v1beta3/document_processor_service"
|
43
43
|
# client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
|
@@ -23,9 +23,9 @@ module Google
|
|
23
23
|
module Cloud
|
24
24
|
module DocumentAI
|
25
25
|
##
|
26
|
-
#
|
26
|
+
# API client module.
|
27
27
|
#
|
28
|
-
# @example
|
28
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
29
29
|
#
|
30
30
|
# require "google/cloud/document_ai/v1beta3"
|
31
31
|
# client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
|
@@ -117,6 +117,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
117
117
|
repeated :processors, :message, 1, "google.cloud.documentai.v1beta3.Processor"
|
118
118
|
optional :next_page_token, :string, 2
|
119
119
|
end
|
120
|
+
add_message "google.cloud.documentai.v1beta3.GetProcessorTypeRequest" do
|
121
|
+
optional :name, :string, 1
|
122
|
+
end
|
120
123
|
add_message "google.cloud.documentai.v1beta3.GetProcessorRequest" do
|
121
124
|
optional :name, :string, 1
|
122
125
|
end
|
@@ -301,6 +304,7 @@ module Google
|
|
301
304
|
ListProcessorTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ListProcessorTypesResponse").msgclass
|
302
305
|
ListProcessorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ListProcessorsRequest").msgclass
|
303
306
|
ListProcessorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ListProcessorsResponse").msgclass
|
307
|
+
GetProcessorTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.GetProcessorTypeRequest").msgclass
|
304
308
|
GetProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.GetProcessorRequest").msgclass
|
305
309
|
GetProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.GetProcessorVersionRequest").msgclass
|
306
310
|
ListProcessorVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.ListProcessorVersionsRequest").msgclass
|
@@ -46,6 +46,8 @@ module Google
|
|
46
46
|
rpc :FetchProcessorTypes, ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse
|
47
47
|
# Lists the processor types that exist.
|
48
48
|
rpc :ListProcessorTypes, ::Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesResponse
|
49
|
+
# Gets a processor type detail.
|
50
|
+
rpc :GetProcessorType, ::Google::Cloud::DocumentAI::V1beta3::GetProcessorTypeRequest, ::Google::Cloud::DocumentAI::V1beta3::ProcessorType
|
49
51
|
# Lists all processors which belong to this project.
|
50
52
|
rpc :ListProcessors, ::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest, ::Google::Cloud::DocumentAI::V1beta3::ListProcessorsResponse
|
51
53
|
# Gets a processor detail.
|
@@ -120,6 +120,9 @@ module Google
|
|
120
120
|
# @return [::Boolean]
|
121
121
|
# Enables special handling for PDFs with existing text information. Results
|
122
122
|
# in better text extraction quality in such PDF inputs.
|
123
|
+
# @!attribute [rw] advanced_ocr_options
|
124
|
+
# @return [::Array<::String>]
|
125
|
+
# A list of advanced OCR options to further fine-tune OCR behavior.
|
123
126
|
class OcrConfig
|
124
127
|
include ::Google::Protobuf::MessageExts
|
125
128
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -346,6 +346,15 @@ module Google
|
|
346
346
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
347
347
|
end
|
348
348
|
|
349
|
+
# Request message for get processor.
|
350
|
+
# @!attribute [rw] name
|
351
|
+
# @return [::String]
|
352
|
+
# Required. The processor type resource name.
|
353
|
+
class GetProcessorTypeRequest
|
354
|
+
include ::Google::Protobuf::MessageExts
|
355
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
356
|
+
end
|
357
|
+
|
349
358
|
# Request message for get processor.
|
350
359
|
# @!attribute [rw] name
|
351
360
|
# @return [::String]
|
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.18.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:
|
11
|
+
date: 2023-01-30 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:
|
19
|
+
version: 0.16.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:
|
29
|
+
version: 0.16.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.3'
|
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.3'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 2.a
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
- !ruby/object:Gem::Version
|
257
257
|
version: '0'
|
258
258
|
requirements: []
|
259
|
-
rubygems_version: 3.
|
259
|
+
rubygems_version: 3.4.2
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: API Client library for the Document AI V1beta3 API
|