google-cloud-document_ai-v1 0.9.0 → 0.11.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/v1/bindings_override.rb +118 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +470 -54
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +12 -14
- data/lib/google/cloud/document_ai/v1/document_processor_service/paths.rb +23 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +1984 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +820 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/service_stub.rb +1373 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest.rb +57 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service.rb +6 -0
- data/lib/google/cloud/document_ai/v1/rest.rb +38 -0
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/document_ai/v1.rb +5 -0
- data/lib/google/cloud/documentai/v1/document_pb.rb +1 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +60 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +11 -0
- data/lib/google/cloud/documentai/v1/evaluation_pb.rb +79 -0
- data/lib/google/cloud/documentai/v1/processor_pb.rb +2 -0
- data/proto_docs/google/cloud/documentai/v1/document.rb +16 -7
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +163 -0
- data/proto_docs/google/cloud/documentai/v1/document_schema.rb +14 -6
- data/proto_docs/google/cloud/documentai/v1/evaluation.rb +199 -0
- data/proto_docs/google/cloud/documentai/v1/processor.rb +3 -0
- metadata +19 -9
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -24,6 +24,29 @@ module Google
|
|
24
24
|
module DocumentProcessorService
|
25
25
|
# Path helper methods for the DocumentProcessorService API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Evaluation resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param processor [String]
|
37
|
+
# @param processor_version [String]
|
38
|
+
# @param evaluation [String]
|
39
|
+
#
|
40
|
+
# @return [::String]
|
41
|
+
def evaluation_path project:, location:, processor:, processor_version:, evaluation:
|
42
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
43
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
44
|
+
raise ::ArgumentError, "processor cannot contain /" if processor.to_s.include? "/"
|
45
|
+
raise ::ArgumentError, "processor_version cannot contain /" if processor_version.to_s.include? "/"
|
46
|
+
|
47
|
+
"projects/#{project}/locations/#{location}/processors/#{processor}/processorVersions/#{processor_version}/evaluations/#{evaluation}"
|
48
|
+
end
|
49
|
+
|
27
50
|
##
|
28
51
|
# Create a fully-qualified HumanReviewConfig resource string.
|
29
52
|
#
|