google-cloud-document_ai-v1 0.8.0 → 0.9.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/v1/document_processor_service/client.rb +92 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/paths.rb +19 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service.rb +1 -1
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/document_ai/v1.rb +2 -2
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +4 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +2 -0
- data/proto_docs/google/cloud/documentai/v1/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: 23ef9a502430698a1c55dbf3135c46b16db83bcea692d4d59486f2a412d5c8b8
|
4
|
+
data.tar.gz: fedc9cd1b4119b2a40e918c7d856ae6e6e9599d35fc62492a78577c93e05baf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3031d11fe9d45645810110bf58e728f7bf75cae916a4708b9d78a03a55df71408e35116934aa417975d5506001d0dff8ead57455636ba270c4922fd3bddae967
|
7
|
+
data.tar.gz: 154267b2196cefe2385f5a8f15ca6be64c721e484fe4d65e8fda516eead880b4bc9ffbf0166e67642dafe3c8f94734b1cb620eab390872e7c580b28f23f47ebb
|
@@ -588,6 +588,91 @@ module Google
|
|
588
588
|
raise ::Google::Cloud::Error.from_error(e)
|
589
589
|
end
|
590
590
|
|
591
|
+
##
|
592
|
+
# Gets a processor type detail.
|
593
|
+
#
|
594
|
+
# @overload get_processor_type(request, options = nil)
|
595
|
+
# Pass arguments to `get_processor_type` via a request object, either of type
|
596
|
+
# {::Google::Cloud::DocumentAI::V1::GetProcessorTypeRequest} or an equivalent Hash.
|
597
|
+
#
|
598
|
+
# @param request [::Google::Cloud::DocumentAI::V1::GetProcessorTypeRequest, ::Hash]
|
599
|
+
# A request object representing the call parameters. Required. To specify no
|
600
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
601
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
602
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
603
|
+
#
|
604
|
+
# @overload get_processor_type(name: nil)
|
605
|
+
# Pass arguments to `get_processor_type` via keyword arguments. Note that at
|
606
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
607
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
608
|
+
#
|
609
|
+
# @param name [::String]
|
610
|
+
# Required. The processor type resource name.
|
611
|
+
#
|
612
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
613
|
+
# @yieldparam response [::Google::Cloud::DocumentAI::V1::ProcessorType]
|
614
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
615
|
+
#
|
616
|
+
# @return [::Google::Cloud::DocumentAI::V1::ProcessorType]
|
617
|
+
#
|
618
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
619
|
+
#
|
620
|
+
# @example Basic example
|
621
|
+
# require "google/cloud/document_ai/v1"
|
622
|
+
#
|
623
|
+
# # Create a client object. The client can be reused for multiple calls.
|
624
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client.new
|
625
|
+
#
|
626
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
627
|
+
# request = Google::Cloud::DocumentAI::V1::GetProcessorTypeRequest.new
|
628
|
+
#
|
629
|
+
# # Call the get_processor_type method.
|
630
|
+
# result = client.get_processor_type request
|
631
|
+
#
|
632
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::ProcessorType.
|
633
|
+
# p result
|
634
|
+
#
|
635
|
+
def get_processor_type request, options = nil
|
636
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
637
|
+
|
638
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1::GetProcessorTypeRequest
|
639
|
+
|
640
|
+
# Converts hash and nil to an options object
|
641
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
642
|
+
|
643
|
+
# Customize the options with defaults
|
644
|
+
metadata = @config.rpcs.get_processor_type.metadata.to_h
|
645
|
+
|
646
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
647
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
648
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
649
|
+
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
|
650
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
651
|
+
|
652
|
+
header_params = {}
|
653
|
+
if request.name
|
654
|
+
header_params["name"] = request.name
|
655
|
+
end
|
656
|
+
|
657
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
658
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
659
|
+
|
660
|
+
options.apply_defaults timeout: @config.rpcs.get_processor_type.timeout,
|
661
|
+
metadata: metadata,
|
662
|
+
retry_policy: @config.rpcs.get_processor_type.retry_policy
|
663
|
+
|
664
|
+
options.apply_defaults timeout: @config.timeout,
|
665
|
+
metadata: @config.metadata,
|
666
|
+
retry_policy: @config.retry_policy
|
667
|
+
|
668
|
+
@document_processor_service_stub.call_rpc :get_processor_type, request, options: options do |response, operation|
|
669
|
+
yield response, operation if block_given?
|
670
|
+
return response
|
671
|
+
end
|
672
|
+
rescue ::GRPC::BadStatus => e
|
673
|
+
raise ::Google::Cloud::Error.from_error(e)
|
674
|
+
end
|
675
|
+
|
591
676
|
##
|
592
677
|
# Lists all processors which belong to this project.
|
593
678
|
#
|
@@ -1973,6 +2058,11 @@ module Google
|
|
1973
2058
|
#
|
1974
2059
|
attr_reader :list_processor_types
|
1975
2060
|
##
|
2061
|
+
# RPC-specific configuration for `get_processor_type`
|
2062
|
+
# @return [::Gapic::Config::Method]
|
2063
|
+
#
|
2064
|
+
attr_reader :get_processor_type
|
2065
|
+
##
|
1976
2066
|
# RPC-specific configuration for `list_processors`
|
1977
2067
|
# @return [::Gapic::Config::Method]
|
1978
2068
|
#
|
@@ -2048,6 +2138,8 @@ module Google
|
|
2048
2138
|
@fetch_processor_types = ::Gapic::Config::Method.new fetch_processor_types_config
|
2049
2139
|
list_processor_types_config = parent_rpcs.list_processor_types if parent_rpcs.respond_to? :list_processor_types
|
2050
2140
|
@list_processor_types = ::Gapic::Config::Method.new list_processor_types_config
|
2141
|
+
get_processor_type_config = parent_rpcs.get_processor_type if parent_rpcs.respond_to? :get_processor_type
|
2142
|
+
@get_processor_type = ::Gapic::Config::Method.new get_processor_type_config
|
2051
2143
|
list_processors_config = parent_rpcs.list_processors if parent_rpcs.respond_to? :list_processors
|
2052
2144
|
@list_processors = ::Gapic::Config::Method.new list_processors_config
|
2053
2145
|
get_processor_config = parent_rpcs.get_processor if parent_rpcs.respond_to? :get_processor
|
@@ -79,6 +79,25 @@ module Google
|
|
79
79
|
"projects/#{project}/locations/#{location}/processors/#{processor}"
|
80
80
|
end
|
81
81
|
|
82
|
+
##
|
83
|
+
# Create a fully-qualified ProcessorType resource string.
|
84
|
+
#
|
85
|
+
# The resource will be in the following format:
|
86
|
+
#
|
87
|
+
# `projects/{project}/locations/{location}/processorTypes/{processor_type}`
|
88
|
+
#
|
89
|
+
# @param project [String]
|
90
|
+
# @param location [String]
|
91
|
+
# @param processor_type [String]
|
92
|
+
#
|
93
|
+
# @return [::String]
|
94
|
+
def processor_type_path project:, location:, processor_type:
|
95
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
96
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
97
|
+
|
98
|
+
"projects/#{project}/locations/#{location}/processorTypes/#{processor_type}"
|
99
|
+
end
|
100
|
+
|
82
101
|
##
|
83
102
|
# Create a fully-qualified ProcessorVersion resource string.
|
84
103
|
#
|
@@ -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/v1/document_processor_service"
|
43
43
|
# client = ::Google::Cloud::DocumentAI::V1::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/v1"
|
31
31
|
# client = ::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client.new
|
@@ -99,6 +99,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
99
99
|
repeated :processors, :message, 1, "google.cloud.documentai.v1.Processor"
|
100
100
|
optional :next_page_token, :string, 2
|
101
101
|
end
|
102
|
+
add_message "google.cloud.documentai.v1.GetProcessorTypeRequest" do
|
103
|
+
optional :name, :string, 1
|
104
|
+
end
|
102
105
|
add_message "google.cloud.documentai.v1.GetProcessorRequest" do
|
103
106
|
optional :name, :string, 1
|
104
107
|
end
|
@@ -220,6 +223,7 @@ module Google
|
|
220
223
|
ListProcessorTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorTypesResponse").msgclass
|
221
224
|
ListProcessorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorsRequest").msgclass
|
222
225
|
ListProcessorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorsResponse").msgclass
|
226
|
+
GetProcessorTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.GetProcessorTypeRequest").msgclass
|
223
227
|
GetProcessorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.GetProcessorRequest").msgclass
|
224
228
|
GetProcessorVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.GetProcessorVersionRequest").msgclass
|
225
229
|
ListProcessorVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1.ListProcessorVersionsRequest").msgclass
|
@@ -46,6 +46,8 @@ module Google
|
|
46
46
|
rpc :FetchProcessorTypes, ::Google::Cloud::DocumentAI::V1::FetchProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse
|
47
47
|
# Lists the processor types that exist.
|
48
48
|
rpc :ListProcessorTypes, ::Google::Cloud::DocumentAI::V1::ListProcessorTypesRequest, ::Google::Cloud::DocumentAI::V1::ListProcessorTypesResponse
|
49
|
+
# Gets a processor type detail.
|
50
|
+
rpc :GetProcessorType, ::Google::Cloud::DocumentAI::V1::GetProcessorTypeRequest, ::Google::Cloud::DocumentAI::V1::ProcessorType
|
49
51
|
# Lists all processors which belong to this project.
|
50
52
|
rpc :ListProcessors, ::Google::Cloud::DocumentAI::V1::ListProcessorsRequest, ::Google::Cloud::DocumentAI::V1::ListProcessorsResponse
|
51
53
|
# Gets a processor detail.
|
@@ -286,6 +286,15 @@ module Google
|
|
286
286
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
287
287
|
end
|
288
288
|
|
289
|
+
# Request message for get processor.
|
290
|
+
# @!attribute [rw] name
|
291
|
+
# @return [::String]
|
292
|
+
# Required. The processor type resource name.
|
293
|
+
class GetProcessorTypeRequest
|
294
|
+
include ::Google::Protobuf::MessageExts
|
295
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
296
|
+
end
|
297
|
+
|
289
298
|
# Request message for get processor.
|
290
299
|
# @!attribute [rw] name
|
291
300
|
# @return [::String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-document_ai-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.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
|
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
- !ruby/object:Gem::Version
|
255
255
|
version: '0'
|
256
256
|
requirements: []
|
257
|
-
rubygems_version: 3.
|
257
|
+
rubygems_version: 3.4.2
|
258
258
|
signing_key:
|
259
259
|
specification_version: 4
|
260
260
|
summary: API Client library for the Document AI V1 API
|