google-cloud-document_ai-v1 0.13.0 → 0.15.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 +21 -4
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +10 -1
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +456 -3
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +75 -0
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/document_io_pb.rb +3 -1
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +5 -2
- data/lib/google/cloud/documentai/v1/processor_pb.rb +2 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/documentai/v1/document_io.rb +55 -0
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +42 -0
- data/proto_docs/google/cloud/documentai/v1/processor.rb +17 -2
- metadata +5 -5
@@ -194,7 +194,7 @@ module Google
|
|
194
194
|
# @param options [::Gapic::CallOptions, ::Hash]
|
195
195
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
196
196
|
#
|
197
|
-
# @overload process_document(inline_document: nil, raw_document: nil, name: nil, skip_human_review: nil, field_mask: nil)
|
197
|
+
# @overload process_document(inline_document: nil, raw_document: nil, gcs_document: nil, name: nil, skip_human_review: nil, field_mask: nil, process_options: nil)
|
198
198
|
# Pass arguments to `process_document` via keyword arguments. Note that at
|
199
199
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
200
200
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -203,6 +203,8 @@ module Google
|
|
203
203
|
# An inline document proto.
|
204
204
|
# @param raw_document [::Google::Cloud::DocumentAI::V1::RawDocument, ::Hash]
|
205
205
|
# A raw document content (bytes).
|
206
|
+
# @param gcs_document [::Google::Cloud::DocumentAI::V1::GcsDocument, ::Hash]
|
207
|
+
# A raw document on Google Cloud Storage.
|
206
208
|
# @param name [::String]
|
207
209
|
# Required. The resource name of the
|
208
210
|
# {::Google::Cloud::DocumentAI::V1::Processor Processor} or
|
@@ -222,6 +224,8 @@ module Google
|
|
222
224
|
# {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
|
223
225
|
# output. Only supports top-level document and pages field, so it must be in
|
224
226
|
# the form of `{document_field_name}` or `pages.{page_field_name}`.
|
227
|
+
# @param process_options [::Google::Cloud::DocumentAI::V1::ProcessOptions, ::Hash]
|
228
|
+
# Inference-time options for the process API
|
225
229
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
226
230
|
# @yieldparam result [::Google::Cloud::DocumentAI::V1::ProcessResponse]
|
227
231
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -229,6 +233,22 @@ module Google
|
|
229
233
|
# @return [::Google::Cloud::DocumentAI::V1::ProcessResponse]
|
230
234
|
#
|
231
235
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
236
|
+
#
|
237
|
+
# @example Basic example
|
238
|
+
# require "google/cloud/document_ai/v1"
|
239
|
+
#
|
240
|
+
# # Create a client object. The client can be reused for multiple calls.
|
241
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
242
|
+
#
|
243
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
244
|
+
# request = Google::Cloud::DocumentAI::V1::ProcessRequest.new
|
245
|
+
#
|
246
|
+
# # Call the process_document method.
|
247
|
+
# result = client.process_document request
|
248
|
+
#
|
249
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::ProcessResponse.
|
250
|
+
# p result
|
251
|
+
#
|
232
252
|
def process_document request, options = nil
|
233
253
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
234
254
|
|
@@ -278,7 +298,7 @@ module Google
|
|
278
298
|
# @param options [::Gapic::CallOptions, ::Hash]
|
279
299
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
280
300
|
#
|
281
|
-
# @overload batch_process_documents(name: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil)
|
301
|
+
# @overload batch_process_documents(name: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil, process_options: nil)
|
282
302
|
# Pass arguments to `batch_process_documents` via keyword arguments. Note that at
|
283
303
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
284
304
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -301,6 +321,8 @@ module Google
|
|
301
321
|
# @param skip_human_review [::Boolean]
|
302
322
|
# Whether human review should be skipped for this request. Default to
|
303
323
|
# `false`.
|
324
|
+
# @param process_options [::Google::Cloud::DocumentAI::V1::ProcessOptions, ::Hash]
|
325
|
+
# Inference-time options for the process API
|
304
326
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
305
327
|
# @yieldparam result [::Gapic::Operation]
|
306
328
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -308,6 +330,29 @@ module Google
|
|
308
330
|
# @return [::Gapic::Operation]
|
309
331
|
#
|
310
332
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
333
|
+
#
|
334
|
+
# @example Basic example
|
335
|
+
# require "google/cloud/document_ai/v1"
|
336
|
+
#
|
337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
338
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
339
|
+
#
|
340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
341
|
+
# request = Google::Cloud::DocumentAI::V1::BatchProcessRequest.new
|
342
|
+
#
|
343
|
+
# # Call the batch_process_documents method.
|
344
|
+
# result = client.batch_process_documents request
|
345
|
+
#
|
346
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
347
|
+
# # check the status of an operation, cancel it, or wait for results.
|
348
|
+
# # Here is how to wait for a response.
|
349
|
+
# result.wait_until_done! timeout: 60
|
350
|
+
# if result.response?
|
351
|
+
# p result.response
|
352
|
+
# else
|
353
|
+
# puts "No response received."
|
354
|
+
# end
|
355
|
+
#
|
311
356
|
def batch_process_documents request, options = nil
|
312
357
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
313
358
|
|
@@ -374,6 +419,22 @@ module Google
|
|
374
419
|
# @return [::Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse]
|
375
420
|
#
|
376
421
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
422
|
+
#
|
423
|
+
# @example Basic example
|
424
|
+
# require "google/cloud/document_ai/v1"
|
425
|
+
#
|
426
|
+
# # Create a client object. The client can be reused for multiple calls.
|
427
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
428
|
+
#
|
429
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
430
|
+
# request = Google::Cloud::DocumentAI::V1::FetchProcessorTypesRequest.new
|
431
|
+
#
|
432
|
+
# # Call the fetch_processor_types method.
|
433
|
+
# result = client.fetch_processor_types request
|
434
|
+
#
|
435
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse.
|
436
|
+
# p result
|
437
|
+
#
|
377
438
|
def fetch_processor_types request, options = nil
|
378
439
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
379
440
|
|
@@ -443,6 +504,26 @@ module Google
|
|
443
504
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1::ProcessorType>]
|
444
505
|
#
|
445
506
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
507
|
+
#
|
508
|
+
# @example Basic example
|
509
|
+
# require "google/cloud/document_ai/v1"
|
510
|
+
#
|
511
|
+
# # Create a client object. The client can be reused for multiple calls.
|
512
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
513
|
+
#
|
514
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
515
|
+
# request = Google::Cloud::DocumentAI::V1::ListProcessorTypesRequest.new
|
516
|
+
#
|
517
|
+
# # Call the list_processor_types method.
|
518
|
+
# result = client.list_processor_types request
|
519
|
+
#
|
520
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
521
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
522
|
+
# result.each do |item|
|
523
|
+
# # Each element is of type ::Google::Cloud::DocumentAI::V1::ProcessorType.
|
524
|
+
# p item
|
525
|
+
# end
|
526
|
+
#
|
446
527
|
def list_processor_types request, options = nil
|
447
528
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
448
529
|
|
@@ -506,6 +587,22 @@ module Google
|
|
506
587
|
# @return [::Google::Cloud::DocumentAI::V1::ProcessorType]
|
507
588
|
#
|
508
589
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
590
|
+
#
|
591
|
+
# @example Basic example
|
592
|
+
# require "google/cloud/document_ai/v1"
|
593
|
+
#
|
594
|
+
# # Create a client object. The client can be reused for multiple calls.
|
595
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
596
|
+
#
|
597
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
598
|
+
# request = Google::Cloud::DocumentAI::V1::GetProcessorTypeRequest.new
|
599
|
+
#
|
600
|
+
# # Call the get_processor_type method.
|
601
|
+
# result = client.get_processor_type request
|
602
|
+
#
|
603
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::ProcessorType.
|
604
|
+
# p result
|
605
|
+
#
|
509
606
|
def get_processor_type request, options = nil
|
510
607
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
511
608
|
|
@@ -576,6 +673,26 @@ module Google
|
|
576
673
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1::Processor>]
|
577
674
|
#
|
578
675
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
676
|
+
#
|
677
|
+
# @example Basic example
|
678
|
+
# require "google/cloud/document_ai/v1"
|
679
|
+
#
|
680
|
+
# # Create a client object. The client can be reused for multiple calls.
|
681
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
682
|
+
#
|
683
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
684
|
+
# request = Google::Cloud::DocumentAI::V1::ListProcessorsRequest.new
|
685
|
+
#
|
686
|
+
# # Call the list_processors method.
|
687
|
+
# result = client.list_processors request
|
688
|
+
#
|
689
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
690
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
691
|
+
# result.each do |item|
|
692
|
+
# # Each element is of type ::Google::Cloud::DocumentAI::V1::Processor.
|
693
|
+
# p item
|
694
|
+
# end
|
695
|
+
#
|
579
696
|
def list_processors request, options = nil
|
580
697
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
581
698
|
|
@@ -639,6 +756,22 @@ module Google
|
|
639
756
|
# @return [::Google::Cloud::DocumentAI::V1::Processor]
|
640
757
|
#
|
641
758
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
759
|
+
#
|
760
|
+
# @example Basic example
|
761
|
+
# require "google/cloud/document_ai/v1"
|
762
|
+
#
|
763
|
+
# # Create a client object. The client can be reused for multiple calls.
|
764
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
765
|
+
#
|
766
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
767
|
+
# request = Google::Cloud::DocumentAI::V1::GetProcessorRequest.new
|
768
|
+
#
|
769
|
+
# # Call the get_processor method.
|
770
|
+
# result = client.get_processor request
|
771
|
+
#
|
772
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::Processor.
|
773
|
+
# p result
|
774
|
+
#
|
642
775
|
def get_processor request, options = nil
|
643
776
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
644
777
|
|
@@ -689,11 +822,13 @@ module Google
|
|
689
822
|
# @param options [::Gapic::CallOptions, ::Hash]
|
690
823
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
691
824
|
#
|
692
|
-
# @overload train_processor_version(parent: nil, processor_version: nil, document_schema: nil, input_data: nil, base_processor_version: nil)
|
825
|
+
# @overload train_processor_version(custom_document_extraction_options: nil, parent: nil, processor_version: nil, document_schema: nil, input_data: nil, base_processor_version: nil)
|
693
826
|
# Pass arguments to `train_processor_version` via keyword arguments. Note that at
|
694
827
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
695
828
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
696
829
|
#
|
830
|
+
# @param custom_document_extraction_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::CustomDocumentExtractionOptions, ::Hash]
|
831
|
+
# Options to control Custom Document Extraction (CDE) Processor.
|
697
832
|
# @param parent [::String]
|
698
833
|
# Required. The parent (project, location and processor) to create the new
|
699
834
|
# version for. Format:
|
@@ -716,6 +851,29 @@ module Google
|
|
716
851
|
# @return [::Gapic::Operation]
|
717
852
|
#
|
718
853
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
854
|
+
#
|
855
|
+
# @example Basic example
|
856
|
+
# require "google/cloud/document_ai/v1"
|
857
|
+
#
|
858
|
+
# # Create a client object. The client can be reused for multiple calls.
|
859
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
860
|
+
#
|
861
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
862
|
+
# request = Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest.new
|
863
|
+
#
|
864
|
+
# # Call the train_processor_version method.
|
865
|
+
# result = client.train_processor_version request
|
866
|
+
#
|
867
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
868
|
+
# # check the status of an operation, cancel it, or wait for results.
|
869
|
+
# # Here is how to wait for a response.
|
870
|
+
# result.wait_until_done! timeout: 60
|
871
|
+
# if result.response?
|
872
|
+
# p result.response
|
873
|
+
# else
|
874
|
+
# puts "No response received."
|
875
|
+
# end
|
876
|
+
#
|
719
877
|
def train_processor_version request, options = nil
|
720
878
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
721
879
|
|
@@ -779,6 +937,22 @@ module Google
|
|
779
937
|
# @return [::Google::Cloud::DocumentAI::V1::ProcessorVersion]
|
780
938
|
#
|
781
939
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
940
|
+
#
|
941
|
+
# @example Basic example
|
942
|
+
# require "google/cloud/document_ai/v1"
|
943
|
+
#
|
944
|
+
# # Create a client object. The client can be reused for multiple calls.
|
945
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
946
|
+
#
|
947
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
948
|
+
# request = Google::Cloud::DocumentAI::V1::GetProcessorVersionRequest.new
|
949
|
+
#
|
950
|
+
# # Call the get_processor_version method.
|
951
|
+
# result = client.get_processor_version request
|
952
|
+
#
|
953
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::ProcessorVersion.
|
954
|
+
# p result
|
955
|
+
#
|
782
956
|
def get_processor_version request, options = nil
|
783
957
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
784
958
|
|
@@ -850,6 +1024,26 @@ module Google
|
|
850
1024
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1::ProcessorVersion>]
|
851
1025
|
#
|
852
1026
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1027
|
+
#
|
1028
|
+
# @example Basic example
|
1029
|
+
# require "google/cloud/document_ai/v1"
|
1030
|
+
#
|
1031
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1032
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1033
|
+
#
|
1034
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1035
|
+
# request = Google::Cloud::DocumentAI::V1::ListProcessorVersionsRequest.new
|
1036
|
+
#
|
1037
|
+
# # Call the list_processor_versions method.
|
1038
|
+
# result = client.list_processor_versions request
|
1039
|
+
#
|
1040
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1041
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1042
|
+
# result.each do |item|
|
1043
|
+
# # Each element is of type ::Google::Cloud::DocumentAI::V1::ProcessorVersion.
|
1044
|
+
# p item
|
1045
|
+
# end
|
1046
|
+
#
|
853
1047
|
def list_processor_versions request, options = nil
|
854
1048
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
855
1049
|
|
@@ -914,6 +1108,29 @@ module Google
|
|
914
1108
|
# @return [::Gapic::Operation]
|
915
1109
|
#
|
916
1110
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1111
|
+
#
|
1112
|
+
# @example Basic example
|
1113
|
+
# require "google/cloud/document_ai/v1"
|
1114
|
+
#
|
1115
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1116
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1117
|
+
#
|
1118
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1119
|
+
# request = Google::Cloud::DocumentAI::V1::DeleteProcessorVersionRequest.new
|
1120
|
+
#
|
1121
|
+
# # Call the delete_processor_version method.
|
1122
|
+
# result = client.delete_processor_version request
|
1123
|
+
#
|
1124
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1125
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1126
|
+
# # Here is how to wait for a response.
|
1127
|
+
# result.wait_until_done! timeout: 60
|
1128
|
+
# if result.response?
|
1129
|
+
# p result.response
|
1130
|
+
# else
|
1131
|
+
# puts "No response received."
|
1132
|
+
# end
|
1133
|
+
#
|
917
1134
|
def delete_processor_version request, options = nil
|
918
1135
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
919
1136
|
|
@@ -977,6 +1194,29 @@ module Google
|
|
977
1194
|
# @return [::Gapic::Operation]
|
978
1195
|
#
|
979
1196
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1197
|
+
#
|
1198
|
+
# @example Basic example
|
1199
|
+
# require "google/cloud/document_ai/v1"
|
1200
|
+
#
|
1201
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1202
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1203
|
+
#
|
1204
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1205
|
+
# request = Google::Cloud::DocumentAI::V1::DeployProcessorVersionRequest.new
|
1206
|
+
#
|
1207
|
+
# # Call the deploy_processor_version method.
|
1208
|
+
# result = client.deploy_processor_version request
|
1209
|
+
#
|
1210
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1211
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1212
|
+
# # Here is how to wait for a response.
|
1213
|
+
# result.wait_until_done! timeout: 60
|
1214
|
+
# if result.response?
|
1215
|
+
# p result.response
|
1216
|
+
# else
|
1217
|
+
# puts "No response received."
|
1218
|
+
# end
|
1219
|
+
#
|
980
1220
|
def deploy_processor_version request, options = nil
|
981
1221
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
982
1222
|
|
@@ -1040,6 +1280,29 @@ module Google
|
|
1040
1280
|
# @return [::Gapic::Operation]
|
1041
1281
|
#
|
1042
1282
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1283
|
+
#
|
1284
|
+
# @example Basic example
|
1285
|
+
# require "google/cloud/document_ai/v1"
|
1286
|
+
#
|
1287
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1288
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1289
|
+
#
|
1290
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1291
|
+
# request = Google::Cloud::DocumentAI::V1::UndeployProcessorVersionRequest.new
|
1292
|
+
#
|
1293
|
+
# # Call the undeploy_processor_version method.
|
1294
|
+
# result = client.undeploy_processor_version request
|
1295
|
+
#
|
1296
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1297
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1298
|
+
# # Here is how to wait for a response.
|
1299
|
+
# result.wait_until_done! timeout: 60
|
1300
|
+
# if result.response?
|
1301
|
+
# p result.response
|
1302
|
+
# else
|
1303
|
+
# puts "No response received."
|
1304
|
+
# end
|
1305
|
+
#
|
1043
1306
|
def undeploy_processor_version request, options = nil
|
1044
1307
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1045
1308
|
|
@@ -1112,6 +1375,22 @@ module Google
|
|
1112
1375
|
# @return [::Google::Cloud::DocumentAI::V1::Processor]
|
1113
1376
|
#
|
1114
1377
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1378
|
+
#
|
1379
|
+
# @example Basic example
|
1380
|
+
# require "google/cloud/document_ai/v1"
|
1381
|
+
#
|
1382
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1383
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1384
|
+
#
|
1385
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1386
|
+
# request = Google::Cloud::DocumentAI::V1::CreateProcessorRequest.new
|
1387
|
+
#
|
1388
|
+
# # Call the create_processor method.
|
1389
|
+
# result = client.create_processor request
|
1390
|
+
#
|
1391
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::Processor.
|
1392
|
+
# p result
|
1393
|
+
#
|
1115
1394
|
def create_processor request, options = nil
|
1116
1395
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1117
1396
|
|
@@ -1175,6 +1454,29 @@ module Google
|
|
1175
1454
|
# @return [::Gapic::Operation]
|
1176
1455
|
#
|
1177
1456
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1457
|
+
#
|
1458
|
+
# @example Basic example
|
1459
|
+
# require "google/cloud/document_ai/v1"
|
1460
|
+
#
|
1461
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1462
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1463
|
+
#
|
1464
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1465
|
+
# request = Google::Cloud::DocumentAI::V1::DeleteProcessorRequest.new
|
1466
|
+
#
|
1467
|
+
# # Call the delete_processor method.
|
1468
|
+
# result = client.delete_processor request
|
1469
|
+
#
|
1470
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1471
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1472
|
+
# # Here is how to wait for a response.
|
1473
|
+
# result.wait_until_done! timeout: 60
|
1474
|
+
# if result.response?
|
1475
|
+
# p result.response
|
1476
|
+
# else
|
1477
|
+
# puts "No response received."
|
1478
|
+
# end
|
1479
|
+
#
|
1178
1480
|
def delete_processor request, options = nil
|
1179
1481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1180
1482
|
|
@@ -1238,6 +1540,29 @@ module Google
|
|
1238
1540
|
# @return [::Gapic::Operation]
|
1239
1541
|
#
|
1240
1542
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1543
|
+
#
|
1544
|
+
# @example Basic example
|
1545
|
+
# require "google/cloud/document_ai/v1"
|
1546
|
+
#
|
1547
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1548
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1549
|
+
#
|
1550
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1551
|
+
# request = Google::Cloud::DocumentAI::V1::EnableProcessorRequest.new
|
1552
|
+
#
|
1553
|
+
# # Call the enable_processor method.
|
1554
|
+
# result = client.enable_processor request
|
1555
|
+
#
|
1556
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1557
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1558
|
+
# # Here is how to wait for a response.
|
1559
|
+
# result.wait_until_done! timeout: 60
|
1560
|
+
# if result.response?
|
1561
|
+
# p result.response
|
1562
|
+
# else
|
1563
|
+
# puts "No response received."
|
1564
|
+
# end
|
1565
|
+
#
|
1241
1566
|
def enable_processor request, options = nil
|
1242
1567
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1243
1568
|
|
@@ -1301,6 +1626,29 @@ module Google
|
|
1301
1626
|
# @return [::Gapic::Operation]
|
1302
1627
|
#
|
1303
1628
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1629
|
+
#
|
1630
|
+
# @example Basic example
|
1631
|
+
# require "google/cloud/document_ai/v1"
|
1632
|
+
#
|
1633
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1634
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1635
|
+
#
|
1636
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1637
|
+
# request = Google::Cloud::DocumentAI::V1::DisableProcessorRequest.new
|
1638
|
+
#
|
1639
|
+
# # Call the disable_processor method.
|
1640
|
+
# result = client.disable_processor request
|
1641
|
+
#
|
1642
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1643
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1644
|
+
# # Here is how to wait for a response.
|
1645
|
+
# result.wait_until_done! timeout: 60
|
1646
|
+
# if result.response?
|
1647
|
+
# p result.response
|
1648
|
+
# else
|
1649
|
+
# puts "No response received."
|
1650
|
+
# end
|
1651
|
+
#
|
1304
1652
|
def disable_processor request, options = nil
|
1305
1653
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1306
1654
|
|
@@ -1375,6 +1723,29 @@ module Google
|
|
1375
1723
|
# @return [::Gapic::Operation]
|
1376
1724
|
#
|
1377
1725
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1726
|
+
#
|
1727
|
+
# @example Basic example
|
1728
|
+
# require "google/cloud/document_ai/v1"
|
1729
|
+
#
|
1730
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1731
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1732
|
+
#
|
1733
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1734
|
+
# request = Google::Cloud::DocumentAI::V1::SetDefaultProcessorVersionRequest.new
|
1735
|
+
#
|
1736
|
+
# # Call the set_default_processor_version method.
|
1737
|
+
# result = client.set_default_processor_version request
|
1738
|
+
#
|
1739
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1740
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1741
|
+
# # Here is how to wait for a response.
|
1742
|
+
# result.wait_until_done! timeout: 60
|
1743
|
+
# if result.response?
|
1744
|
+
# p result.response
|
1745
|
+
# else
|
1746
|
+
# puts "No response received."
|
1747
|
+
# end
|
1748
|
+
#
|
1378
1749
|
def set_default_processor_version request, options = nil
|
1379
1750
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1380
1751
|
|
@@ -1449,6 +1820,29 @@ module Google
|
|
1449
1820
|
# @return [::Gapic::Operation]
|
1450
1821
|
#
|
1451
1822
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1823
|
+
#
|
1824
|
+
# @example Basic example
|
1825
|
+
# require "google/cloud/document_ai/v1"
|
1826
|
+
#
|
1827
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1828
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1829
|
+
#
|
1830
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1831
|
+
# request = Google::Cloud::DocumentAI::V1::ReviewDocumentRequest.new
|
1832
|
+
#
|
1833
|
+
# # Call the review_document method.
|
1834
|
+
# result = client.review_document request
|
1835
|
+
#
|
1836
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1837
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1838
|
+
# # Here is how to wait for a response.
|
1839
|
+
# result.wait_until_done! timeout: 60
|
1840
|
+
# if result.response?
|
1841
|
+
# p result.response
|
1842
|
+
# else
|
1843
|
+
# puts "No response received."
|
1844
|
+
# end
|
1845
|
+
#
|
1452
1846
|
def review_document request, options = nil
|
1453
1847
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1454
1848
|
|
@@ -1519,6 +1913,29 @@ module Google
|
|
1519
1913
|
# @return [::Gapic::Operation]
|
1520
1914
|
#
|
1521
1915
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1916
|
+
#
|
1917
|
+
# @example Basic example
|
1918
|
+
# require "google/cloud/document_ai/v1"
|
1919
|
+
#
|
1920
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1921
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
1922
|
+
#
|
1923
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1924
|
+
# request = Google::Cloud::DocumentAI::V1::EvaluateProcessorVersionRequest.new
|
1925
|
+
#
|
1926
|
+
# # Call the evaluate_processor_version method.
|
1927
|
+
# result = client.evaluate_processor_version request
|
1928
|
+
#
|
1929
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1930
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1931
|
+
# # Here is how to wait for a response.
|
1932
|
+
# result.wait_until_done! timeout: 60
|
1933
|
+
# if result.response?
|
1934
|
+
# p result.response
|
1935
|
+
# else
|
1936
|
+
# puts "No response received."
|
1937
|
+
# end
|
1938
|
+
#
|
1522
1939
|
def evaluate_processor_version request, options = nil
|
1523
1940
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1524
1941
|
|
@@ -1584,6 +2001,22 @@ module Google
|
|
1584
2001
|
# @return [::Google::Cloud::DocumentAI::V1::Evaluation]
|
1585
2002
|
#
|
1586
2003
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2004
|
+
#
|
2005
|
+
# @example Basic example
|
2006
|
+
# require "google/cloud/document_ai/v1"
|
2007
|
+
#
|
2008
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2009
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
2010
|
+
#
|
2011
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2012
|
+
# request = Google::Cloud::DocumentAI::V1::GetEvaluationRequest.new
|
2013
|
+
#
|
2014
|
+
# # Call the get_evaluation method.
|
2015
|
+
# result = client.get_evaluation request
|
2016
|
+
#
|
2017
|
+
# # The returned object is of type Google::Cloud::DocumentAI::V1::Evaluation.
|
2018
|
+
# p result
|
2019
|
+
#
|
1587
2020
|
def get_evaluation request, options = nil
|
1588
2021
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1589
2022
|
|
@@ -1656,6 +2089,26 @@ module Google
|
|
1656
2089
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1::Evaluation>]
|
1657
2090
|
#
|
1658
2091
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2092
|
+
#
|
2093
|
+
# @example Basic example
|
2094
|
+
# require "google/cloud/document_ai/v1"
|
2095
|
+
#
|
2096
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2097
|
+
# client = Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client.new
|
2098
|
+
#
|
2099
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2100
|
+
# request = Google::Cloud::DocumentAI::V1::ListEvaluationsRequest.new
|
2101
|
+
#
|
2102
|
+
# # Call the list_evaluations method.
|
2103
|
+
# result = client.list_evaluations request
|
2104
|
+
#
|
2105
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2106
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2107
|
+
# result.each do |item|
|
2108
|
+
# # Each element is of type ::Google::Cloud::DocumentAI::V1::Evaluation.
|
2109
|
+
# p item
|
2110
|
+
# end
|
2111
|
+
#
|
1659
2112
|
def list_evaluations request, options = nil
|
1660
2113
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1661
2114
|
|