google-cloud-document_ai-v1beta3 0.16.0 → 0.17.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_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_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: bfa52d5924549d5d80c5599d2b07b9126b03c7e371aacc0a96c20970c0a328a8
|
4
|
+
data.tar.gz: e386aadb70609fccaa37882632c0809743b36b0e42e0b3399f00eaf90e77f318
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faf4467fea5af59eccfaaf5db65798d0c54bcdaf8f764d50db300432e762d3d947730e59e02bc8233a5b7feaa55e166c70d1a451109514494779185076b1da6a
|
7
|
+
data.tar.gz: cc6090b810b843e2eb2e31ae58314cd6bd037db6992a5ece0fa66f5281431891a427aa7abbbc4f1333694c4786556c625ef2e8077328cbe2f8fa124a39e1a988
|
@@ -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.
|
@@ -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.17.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-20 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
|