google-cloud-document_ai-v1 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +106 -56
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +13 -5
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +106 -56
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +11 -4
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/document_pb.rb +15 -1
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +9 -5
- data/lib/google/cloud/documentai/v1/processor_pb.rb +1 -1
- data/proto_docs/google/cloud/documentai/v1/document.rb +336 -76
- data/proto_docs/google/cloud/documentai/v1/document_io.rb +3 -1
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +127 -76
- data/proto_docs/google/cloud/documentai/v1/processor.rb +17 -4
- metadata +2 -2
@@ -36,6 +36,9 @@ module Google
|
|
36
36
|
# structured information from unstructured or semi-structured documents.
|
37
37
|
#
|
38
38
|
class Client
|
39
|
+
# @private
|
40
|
+
API_VERSION = ""
|
41
|
+
|
39
42
|
# @private
|
40
43
|
DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$"
|
41
44
|
|
@@ -226,17 +229,22 @@ module Google
|
|
226
229
|
# @param gcs_document [::Google::Cloud::DocumentAI::V1::GcsDocument, ::Hash]
|
227
230
|
# A raw document on Google Cloud Storage.
|
228
231
|
# @param name [::String]
|
229
|
-
# Required. The resource name of the
|
232
|
+
# Required. The resource name of the
|
233
|
+
# {::Google::Cloud::DocumentAI::V1::Processor Processor} or
|
230
234
|
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}
|
231
|
-
# to use for processing. If a
|
232
|
-
#
|
233
|
-
#
|
235
|
+
# to use for processing. If a
|
236
|
+
# {::Google::Cloud::DocumentAI::V1::Processor Processor} is specified, the server
|
237
|
+
# will use its [default
|
238
|
+
# version][google.cloud.documentai.v1.Processor.default_processor_version].
|
239
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
240
|
+
# or
|
234
241
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
235
242
|
# @param skip_human_review [::Boolean]
|
236
243
|
# Whether human review should be skipped for this request. Default to
|
237
244
|
# `false`.
|
238
245
|
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
239
|
-
# Specifies which fields to include in the
|
246
|
+
# Specifies which fields to include in the
|
247
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
|
240
248
|
# output. Only supports top-level document and pages field, so it must be in
|
241
249
|
# the form of `{document_field_name}` or `pages.{page_field_name}`.
|
242
250
|
# @param process_options [::Google::Cloud::DocumentAI::V1::ProcessOptions, ::Hash]
|
@@ -282,12 +290,13 @@ module Google
|
|
282
290
|
# Customize the options with defaults
|
283
291
|
call_metadata = @config.rpcs.process_document.metadata.to_h
|
284
292
|
|
285
|
-
# Set x-goog-api-client
|
293
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
286
294
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
287
295
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
288
296
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
289
297
|
transports_version_send: [:rest]
|
290
298
|
|
299
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
291
300
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
292
301
|
|
293
302
|
options.apply_defaults timeout: @config.rpcs.process_document.timeout,
|
@@ -326,7 +335,8 @@ module Google
|
|
326
335
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
327
336
|
#
|
328
337
|
# @param name [::String]
|
329
|
-
# Required. The resource name of
|
338
|
+
# Required. The resource name of
|
339
|
+
# {::Google::Cloud::DocumentAI::V1::Processor Processor} or
|
330
340
|
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
|
331
341
|
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
332
342
|
# or
|
@@ -392,12 +402,13 @@ module Google
|
|
392
402
|
# Customize the options with defaults
|
393
403
|
call_metadata = @config.rpcs.batch_process_documents.metadata.to_h
|
394
404
|
|
395
|
-
# Set x-goog-api-client
|
405
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
396
406
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
397
407
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
398
408
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
399
409
|
transports_version_send: [:rest]
|
400
410
|
|
411
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
401
412
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
402
413
|
|
403
414
|
options.apply_defaults timeout: @config.rpcs.batch_process_documents.timeout,
|
@@ -418,7 +429,8 @@ module Google
|
|
418
429
|
end
|
419
430
|
|
420
431
|
##
|
421
|
-
# Fetches processor types. Note that we don't use
|
432
|
+
# Fetches processor types. Note that we don't use
|
433
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client#list_processor_types ListProcessorTypes}
|
422
434
|
# here, because it isn't paginated.
|
423
435
|
#
|
424
436
|
# @overload fetch_processor_types(request, options = nil)
|
@@ -473,12 +485,13 @@ module Google
|
|
473
485
|
# Customize the options with defaults
|
474
486
|
call_metadata = @config.rpcs.fetch_processor_types.metadata.to_h
|
475
487
|
|
476
|
-
# Set x-goog-api-client
|
488
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
477
489
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
478
490
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
479
491
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
480
492
|
transports_version_send: [:rest]
|
481
493
|
|
494
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
482
495
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
483
496
|
|
484
497
|
options.apply_defaults timeout: @config.rpcs.fetch_processor_types.timeout,
|
@@ -562,12 +575,13 @@ module Google
|
|
562
575
|
# Customize the options with defaults
|
563
576
|
call_metadata = @config.rpcs.list_processor_types.metadata.to_h
|
564
577
|
|
565
|
-
# Set x-goog-api-client
|
578
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
566
579
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
567
580
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
568
581
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
569
582
|
transports_version_send: [:rest]
|
570
583
|
|
584
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
571
585
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
572
586
|
|
573
587
|
options.apply_defaults timeout: @config.rpcs.list_processor_types.timeout,
|
@@ -641,12 +655,13 @@ module Google
|
|
641
655
|
# Customize the options with defaults
|
642
656
|
call_metadata = @config.rpcs.get_processor_type.metadata.to_h
|
643
657
|
|
644
|
-
# Set x-goog-api-client
|
658
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
645
659
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
646
660
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
647
661
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
648
662
|
transports_version_send: [:rest]
|
649
663
|
|
664
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
650
665
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
651
666
|
|
652
667
|
options.apply_defaults timeout: @config.rpcs.get_processor_type.timeout,
|
@@ -684,8 +699,8 @@ module Google
|
|
684
699
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
685
700
|
#
|
686
701
|
# @param parent [::String]
|
687
|
-
# Required. The parent (project and location) which owns this collection of
|
688
|
-
# Format: `projects/{project}/locations/{location}`
|
702
|
+
# Required. The parent (project and location) which owns this collection of
|
703
|
+
# Processors. Format: `projects/{project}/locations/{location}`
|
689
704
|
# @param page_size [::Integer]
|
690
705
|
# The maximum number of processors to return.
|
691
706
|
# If unspecified, at most `50` processors will be returned.
|
@@ -731,12 +746,13 @@ module Google
|
|
731
746
|
# Customize the options with defaults
|
732
747
|
call_metadata = @config.rpcs.list_processors.metadata.to_h
|
733
748
|
|
734
|
-
# Set x-goog-api-client
|
749
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
735
750
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
736
751
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
737
752
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
738
753
|
transports_version_send: [:rest]
|
739
754
|
|
755
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
740
756
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
741
757
|
|
742
758
|
options.apply_defaults timeout: @config.rpcs.list_processors.timeout,
|
@@ -810,12 +826,13 @@ module Google
|
|
810
826
|
# Customize the options with defaults
|
811
827
|
call_metadata = @config.rpcs.get_processor.metadata.to_h
|
812
828
|
|
813
|
-
# Set x-goog-api-client
|
829
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
814
830
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
815
831
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
816
832
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
817
833
|
transports_version_send: [:rest]
|
818
834
|
|
835
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
819
836
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
820
837
|
|
821
838
|
options.apply_defaults timeout: @config.rpcs.get_processor.timeout,
|
@@ -859,17 +876,19 @@ module Google
|
|
859
876
|
# @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash]
|
860
877
|
# Options to control foundation model tuning of a processor.
|
861
878
|
# @param parent [::String]
|
862
|
-
# Required. The parent (project, location and processor) to create the new
|
863
|
-
# Format:
|
879
|
+
# Required. The parent (project, location and processor) to create the new
|
880
|
+
# version for. Format:
|
881
|
+
# `projects/{project}/locations/{location}/processors/{processor}`.
|
864
882
|
# @param processor_version [::Google::Cloud::DocumentAI::V1::ProcessorVersion, ::Hash]
|
865
883
|
# Required. The processor version to be created.
|
866
884
|
# @param document_schema [::Google::Cloud::DocumentAI::V1::DocumentSchema, ::Hash]
|
867
885
|
# Optional. The schema the processor version will be trained with.
|
868
886
|
# @param input_data [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::InputData, ::Hash]
|
869
|
-
# Optional. The input data used to train the
|
887
|
+
# Optional. The input data used to train the
|
888
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
|
870
889
|
# @param base_processor_version [::String]
|
871
|
-
# Optional. The processor version to use as a base for training. This
|
872
|
-
# must be a child of `parent`. Format:
|
890
|
+
# Optional. The processor version to use as a base for training. This
|
891
|
+
# processor version must be a child of `parent`. Format:
|
873
892
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
|
874
893
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
875
894
|
# @yieldparam result [::Gapic::Operation]
|
@@ -912,12 +931,13 @@ module Google
|
|
912
931
|
# Customize the options with defaults
|
913
932
|
call_metadata = @config.rpcs.train_processor_version.metadata.to_h
|
914
933
|
|
915
|
-
# Set x-goog-api-client
|
934
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
916
935
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
917
936
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
918
937
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
919
938
|
transports_version_send: [:rest]
|
920
939
|
|
940
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
921
941
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
922
942
|
|
923
943
|
options.apply_defaults timeout: @config.rpcs.train_processor_version.timeout,
|
@@ -991,12 +1011,13 @@ module Google
|
|
991
1011
|
# Customize the options with defaults
|
992
1012
|
call_metadata = @config.rpcs.get_processor_version.metadata.to_h
|
993
1013
|
|
994
|
-
# Set x-goog-api-client
|
1014
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
995
1015
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
996
1016
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
997
1017
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
998
1018
|
transports_version_send: [:rest]
|
999
1019
|
|
1020
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1000
1021
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1001
1022
|
|
1002
1023
|
options.apply_defaults timeout: @config.rpcs.get_processor_version.timeout,
|
@@ -1034,8 +1055,9 @@ module Google
|
|
1034
1055
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1035
1056
|
#
|
1036
1057
|
# @param parent [::String]
|
1037
|
-
# Required. The parent (project, location and processor) to list all
|
1038
|
-
# Format:
|
1058
|
+
# Required. The parent (project, location and processor) to list all
|
1059
|
+
# versions. Format:
|
1060
|
+
# `projects/{project}/locations/{location}/processors/{processor}`
|
1039
1061
|
# @param page_size [::Integer]
|
1040
1062
|
# The maximum number of processor versions to return.
|
1041
1063
|
# If unspecified, at most `10` processor versions will be returned.
|
@@ -1081,12 +1103,13 @@ module Google
|
|
1081
1103
|
# Customize the options with defaults
|
1082
1104
|
call_metadata = @config.rpcs.list_processor_versions.metadata.to_h
|
1083
1105
|
|
1084
|
-
# Set x-goog-api-client
|
1106
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1085
1107
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1086
1108
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1087
1109
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1088
1110
|
transports_version_send: [:rest]
|
1089
1111
|
|
1112
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1090
1113
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1091
1114
|
|
1092
1115
|
options.apply_defaults timeout: @config.rpcs.list_processor_versions.timeout,
|
@@ -1168,12 +1191,13 @@ module Google
|
|
1168
1191
|
# Customize the options with defaults
|
1169
1192
|
call_metadata = @config.rpcs.delete_processor_version.metadata.to_h
|
1170
1193
|
|
1171
|
-
# Set x-goog-api-client
|
1194
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1172
1195
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1173
1196
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1174
1197
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1175
1198
|
transports_version_send: [:rest]
|
1176
1199
|
|
1200
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1177
1201
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1178
1202
|
|
1179
1203
|
options.apply_defaults timeout: @config.rpcs.delete_processor_version.timeout,
|
@@ -1254,12 +1278,13 @@ module Google
|
|
1254
1278
|
# Customize the options with defaults
|
1255
1279
|
call_metadata = @config.rpcs.deploy_processor_version.metadata.to_h
|
1256
1280
|
|
1257
|
-
# Set x-goog-api-client
|
1281
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1258
1282
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1259
1283
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1260
1284
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1261
1285
|
transports_version_send: [:rest]
|
1262
1286
|
|
1287
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1263
1288
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1264
1289
|
|
1265
1290
|
options.apply_defaults timeout: @config.rpcs.deploy_processor_version.timeout,
|
@@ -1340,12 +1365,13 @@ module Google
|
|
1340
1365
|
# Customize the options with defaults
|
1341
1366
|
call_metadata = @config.rpcs.undeploy_processor_version.metadata.to_h
|
1342
1367
|
|
1343
|
-
# Set x-goog-api-client
|
1368
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1344
1369
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1345
1370
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1346
1371
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1347
1372
|
transports_version_send: [:rest]
|
1348
1373
|
|
1374
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1349
1375
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1350
1376
|
|
1351
1377
|
options.apply_defaults timeout: @config.rpcs.undeploy_processor_version.timeout,
|
@@ -1366,8 +1392,9 @@ module Google
|
|
1366
1392
|
end
|
1367
1393
|
|
1368
1394
|
##
|
1369
|
-
# Creates a processor from the
|
1370
|
-
#
|
1395
|
+
# Creates a processor from the
|
1396
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorType ProcessorType} provided. The
|
1397
|
+
# processor will be at `ENABLED` state by default after its creation.
|
1371
1398
|
#
|
1372
1399
|
# @overload create_processor(request, options = nil)
|
1373
1400
|
# Pass arguments to `create_processor` via a request object, either of type
|
@@ -1385,11 +1412,14 @@ module Google
|
|
1385
1412
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1386
1413
|
#
|
1387
1414
|
# @param parent [::String]
|
1388
|
-
# Required. The parent (project and location) under which to create the
|
1389
|
-
# Format: `projects/{project}/locations/{location}`
|
1415
|
+
# Required. The parent (project and location) under which to create the
|
1416
|
+
# processor. Format: `projects/{project}/locations/{location}`
|
1390
1417
|
# @param processor [::Google::Cloud::DocumentAI::V1::Processor, ::Hash]
|
1391
|
-
# Required. The processor to be created, requires
|
1392
|
-
# {::Google::Cloud::DocumentAI::V1::Processor#
|
1418
|
+
# Required. The processor to be created, requires
|
1419
|
+
# {::Google::Cloud::DocumentAI::V1::Processor#type Processor.type} and
|
1420
|
+
# {::Google::Cloud::DocumentAI::V1::Processor#display_name Processor.display_name}
|
1421
|
+
# to be set. Also, the
|
1422
|
+
# {::Google::Cloud::DocumentAI::V1::Processor#kms_key_name Processor.kms_key_name}
|
1393
1423
|
# field must be set if the processor is under CMEK.
|
1394
1424
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1395
1425
|
# @yieldparam result [::Google::Cloud::DocumentAI::V1::Processor]
|
@@ -1425,12 +1455,13 @@ module Google
|
|
1425
1455
|
# Customize the options with defaults
|
1426
1456
|
call_metadata = @config.rpcs.create_processor.metadata.to_h
|
1427
1457
|
|
1428
|
-
# Set x-goog-api-client
|
1458
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1429
1459
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1430
1460
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1431
1461
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1432
1462
|
transports_version_send: [:rest]
|
1433
1463
|
|
1464
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1434
1465
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1435
1466
|
|
1436
1467
|
options.apply_defaults timeout: @config.rpcs.create_processor.timeout,
|
@@ -1511,12 +1542,13 @@ module Google
|
|
1511
1542
|
# Customize the options with defaults
|
1512
1543
|
call_metadata = @config.rpcs.delete_processor.metadata.to_h
|
1513
1544
|
|
1514
|
-
# Set x-goog-api-client
|
1545
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1515
1546
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1516
1547
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1517
1548
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1518
1549
|
transports_version_send: [:rest]
|
1519
1550
|
|
1551
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1520
1552
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1521
1553
|
|
1522
1554
|
options.apply_defaults timeout: @config.rpcs.delete_processor.timeout,
|
@@ -1597,12 +1629,13 @@ module Google
|
|
1597
1629
|
# Customize the options with defaults
|
1598
1630
|
call_metadata = @config.rpcs.enable_processor.metadata.to_h
|
1599
1631
|
|
1600
|
-
# Set x-goog-api-client
|
1632
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1601
1633
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1602
1634
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1603
1635
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1604
1636
|
transports_version_send: [:rest]
|
1605
1637
|
|
1638
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1606
1639
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1607
1640
|
|
1608
1641
|
options.apply_defaults timeout: @config.rpcs.enable_processor.timeout,
|
@@ -1683,12 +1716,13 @@ module Google
|
|
1683
1716
|
# Customize the options with defaults
|
1684
1717
|
call_metadata = @config.rpcs.disable_processor.metadata.to_h
|
1685
1718
|
|
1686
|
-
# Set x-goog-api-client
|
1719
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1687
1720
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1688
1721
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1689
1722
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1690
1723
|
transports_version_send: [:rest]
|
1691
1724
|
|
1725
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1692
1726
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1693
1727
|
|
1694
1728
|
options.apply_defaults timeout: @config.rpcs.disable_processor.timeout,
|
@@ -1709,8 +1743,10 @@ module Google
|
|
1709
1743
|
end
|
1710
1744
|
|
1711
1745
|
##
|
1712
|
-
# Set the default (active) version of a
|
1713
|
-
# {::Google::Cloud::DocumentAI::V1::
|
1746
|
+
# Set the default (active) version of a
|
1747
|
+
# {::Google::Cloud::DocumentAI::V1::Processor Processor} that will be used in
|
1748
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client#process_document ProcessDocument}
|
1749
|
+
# and
|
1714
1750
|
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client#batch_process_documents BatchProcessDocuments}.
|
1715
1751
|
#
|
1716
1752
|
# @overload set_default_processor_version(request, options = nil)
|
@@ -1729,10 +1765,13 @@ module Google
|
|
1729
1765
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1730
1766
|
#
|
1731
1767
|
# @param processor [::String]
|
1732
|
-
# Required. The resource name of the
|
1768
|
+
# Required. The resource name of the
|
1769
|
+
# {::Google::Cloud::DocumentAI::V1::Processor Processor} to change default
|
1770
|
+
# version.
|
1733
1771
|
# @param default_processor_version [::String]
|
1734
|
-
# Required. The resource name of child
|
1735
|
-
#
|
1772
|
+
# Required. The resource name of child
|
1773
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to use as
|
1774
|
+
# default. Format:
|
1736
1775
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
|
1737
1776
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1738
1777
|
# @yieldparam result [::Gapic::Operation]
|
@@ -1775,12 +1814,13 @@ module Google
|
|
1775
1814
|
# Customize the options with defaults
|
1776
1815
|
call_metadata = @config.rpcs.set_default_processor_version.metadata.to_h
|
1777
1816
|
|
1778
|
-
# Set x-goog-api-client
|
1817
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1779
1818
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1780
1819
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1781
1820
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1782
1821
|
transports_version_send: [:rest]
|
1783
1822
|
|
1823
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1784
1824
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1785
1825
|
|
1786
1826
|
options.apply_defaults timeout: @config.rpcs.set_default_processor_version.timeout,
|
@@ -1822,8 +1862,9 @@ module Google
|
|
1822
1862
|
# @param inline_document [::Google::Cloud::DocumentAI::V1::Document, ::Hash]
|
1823
1863
|
# An inline document proto.
|
1824
1864
|
# @param human_review_config [::String]
|
1825
|
-
# Required. The resource name of the
|
1826
|
-
#
|
1865
|
+
# Required. The resource name of the
|
1866
|
+
# [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
|
1867
|
+
# document will be reviewed with.
|
1827
1868
|
# @param enable_schema_validation [::Boolean]
|
1828
1869
|
# Whether the validation should be performed on the ad-hoc review request.
|
1829
1870
|
# @param priority [::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest::Priority]
|
@@ -1871,12 +1912,13 @@ module Google
|
|
1871
1912
|
# Customize the options with defaults
|
1872
1913
|
call_metadata = @config.rpcs.review_document.metadata.to_h
|
1873
1914
|
|
1874
|
-
# Set x-goog-api-client
|
1915
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1875
1916
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1876
1917
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1877
1918
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1878
1919
|
transports_version_send: [:rest]
|
1879
1920
|
|
1921
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1880
1922
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1881
1923
|
|
1882
1924
|
options.apply_defaults timeout: @config.rpcs.review_document.timeout,
|
@@ -1916,11 +1958,13 @@ module Google
|
|
1916
1958
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1917
1959
|
#
|
1918
1960
|
# @param processor_version [::String]
|
1919
|
-
# Required. The resource name of the
|
1961
|
+
# Required. The resource name of the
|
1962
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to
|
1963
|
+
# evaluate.
|
1920
1964
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
1921
1965
|
# @param evaluation_documents [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig, ::Hash]
|
1922
|
-
# Optional. The documents used in the evaluation. If unspecified, use the
|
1923
|
-
# dataset as evaluation input.
|
1966
|
+
# Optional. The documents used in the evaluation. If unspecified, use the
|
1967
|
+
# processor's dataset as evaluation input.
|
1924
1968
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1925
1969
|
# @yieldparam result [::Gapic::Operation]
|
1926
1970
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1962,12 +2006,13 @@ module Google
|
|
1962
2006
|
# Customize the options with defaults
|
1963
2007
|
call_metadata = @config.rpcs.evaluate_processor_version.metadata.to_h
|
1964
2008
|
|
1965
|
-
# Set x-goog-api-client
|
2009
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1966
2010
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1967
2011
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1968
2012
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
1969
2013
|
transports_version_send: [:rest]
|
1970
2014
|
|
2015
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1971
2016
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1972
2017
|
|
1973
2018
|
options.apply_defaults timeout: @config.rpcs.evaluate_processor_version.timeout,
|
@@ -2006,7 +2051,8 @@ module Google
|
|
2006
2051
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2007
2052
|
#
|
2008
2053
|
# @param name [::String]
|
2009
|
-
# Required. The resource name of the
|
2054
|
+
# Required. The resource name of the
|
2055
|
+
# {::Google::Cloud::DocumentAI::V1::Evaluation Evaluation} to get.
|
2010
2056
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
|
2011
2057
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2012
2058
|
# @yieldparam result [::Google::Cloud::DocumentAI::V1::Evaluation]
|
@@ -2042,12 +2088,13 @@ module Google
|
|
2042
2088
|
# Customize the options with defaults
|
2043
2089
|
call_metadata = @config.rpcs.get_evaluation.metadata.to_h
|
2044
2090
|
|
2045
|
-
# Set x-goog-api-client
|
2091
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2046
2092
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2047
2093
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2048
2094
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
2049
2095
|
transports_version_send: [:rest]
|
2050
2096
|
|
2097
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2051
2098
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2052
2099
|
|
2053
2100
|
options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout,
|
@@ -2085,7 +2132,9 @@ module Google
|
|
2085
2132
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2086
2133
|
#
|
2087
2134
|
# @param parent [::String]
|
2088
|
-
# Required. The resource name of the
|
2135
|
+
# Required. The resource name of the
|
2136
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to list
|
2137
|
+
# evaluations for.
|
2089
2138
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
2090
2139
|
# @param page_size [::Integer]
|
2091
2140
|
# The standard list page size.
|
@@ -2132,12 +2181,13 @@ module Google
|
|
2132
2181
|
# Customize the options with defaults
|
2133
2182
|
call_metadata = @config.rpcs.list_evaluations.metadata.to_h
|
2134
2183
|
|
2135
|
-
# Set x-goog-api-client
|
2184
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2136
2185
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2137
2186
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2138
2187
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
2139
2188
|
transports_version_send: [:rest]
|
2140
2189
|
|
2190
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2141
2191
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2142
2192
|
|
2143
2193
|
options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout,
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -181,12 +184,13 @@ module Google
|
|
181
184
|
# Customize the options with defaults
|
182
185
|
call_metadata = @config.rpcs.list_operations.metadata.to_h
|
183
186
|
|
184
|
-
# Set x-goog-api-client
|
187
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
185
188
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
186
189
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
187
190
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
188
191
|
transports_version_send: [:rest]
|
189
192
|
|
193
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
190
194
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
191
195
|
|
192
196
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
@@ -269,12 +273,13 @@ module Google
|
|
269
273
|
# Customize the options with defaults
|
270
274
|
call_metadata = @config.rpcs.get_operation.metadata.to_h
|
271
275
|
|
272
|
-
# Set x-goog-api-client
|
276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
273
277
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
279
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
276
280
|
transports_version_send: [:rest]
|
277
281
|
|
282
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
278
283
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
284
|
|
280
285
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
@@ -351,12 +356,13 @@ module Google
|
|
351
356
|
# Customize the options with defaults
|
352
357
|
call_metadata = @config.rpcs.delete_operation.metadata.to_h
|
353
358
|
|
354
|
-
# Set x-goog-api-client
|
359
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
355
360
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
356
361
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
357
362
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
358
363
|
transports_version_send: [:rest]
|
359
364
|
|
365
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
360
366
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
367
|
|
362
368
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
@@ -438,12 +444,13 @@ module Google
|
|
438
444
|
# Customize the options with defaults
|
439
445
|
call_metadata = @config.rpcs.cancel_operation.metadata.to_h
|
440
446
|
|
441
|
-
# Set x-goog-api-client
|
447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
442
448
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
450
|
gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION,
|
445
451
|
transports_version_send: [:rest]
|
446
452
|
|
453
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
454
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
455
|
|
449
456
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|