google-cloud-document_ai-v1 0.21.0 → 0.21.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f9e899b9f7e7956bedbd128a09dd04c0f209cae415f12ab1d343ed2aa4fd7ce
4
- data.tar.gz: f01dabca3b8863bdd422161d82f7862be2c94fe073182f8622d4b2b4d0ca332c
3
+ metadata.gz: fe5b4b89f9de99c9eb7b5c4ee673613ea24b7b3e17212197fca9794754c2c899
4
+ data.tar.gz: 03e31159dd60913b995a2a8d5a7be5ee4737ef389140a6d63a5c5f43a48e74db
5
5
  SHA512:
6
- metadata.gz: f4413f20a94b710fed4053d565fcf8b6e4108fecc1c823e8c85f3b65ad98f2a585e393c9a747fc5d929eb17bc3ec7a682b5742295235cf1cef06ece965cf47a4
7
- data.tar.gz: 947a7128b4cd5dd9cd55bf1719069b70b58ba200dfa4160d02321babfdabc267d3878b86dd0b17a0e78d50356174a8e81b7bc819527a0b3adc0429a2213965cb
6
+ metadata.gz: 675d27ea9b5924cc4e41e31278b852f7956df1c2b80c2c0b0acdbb5a399ac7401fd0d72f71bfa15190a9d6a08038bbec0df7203430baefc20bccf709c6f3261c
7
+ data.tar.gz: '08b9f3c0751e5ce5fc1928640e36cb10ddba8eb5f44d91894d25a0f6a4237255bbc67599be18f0d94612212e0e749ef71c20a838d9bd97aaa4c8ec3868440145'
@@ -34,6 +34,9 @@ module Google
34
34
  # structured information from unstructured or semi-structured documents.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$"
39
42
 
@@ -232,17 +235,22 @@ module Google
232
235
  # @param gcs_document [::Google::Cloud::DocumentAI::V1::GcsDocument, ::Hash]
233
236
  # A raw document on Google Cloud Storage.
234
237
  # @param name [::String]
235
- # Required. The resource name of the {::Google::Cloud::DocumentAI::V1::Processor Processor} or
238
+ # Required. The resource name of the
239
+ # {::Google::Cloud::DocumentAI::V1::Processor Processor} or
236
240
  # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}
237
- # to use for processing. If a {::Google::Cloud::DocumentAI::V1::Processor Processor} is specified, the server will use
238
- # its {::Google::Cloud::DocumentAI::V1::Processor#default_processor_version default version}. Format:
239
- # `projects/{project}/locations/{location}/processors/{processor}`, or
241
+ # to use for processing. If a
242
+ # {::Google::Cloud::DocumentAI::V1::Processor Processor} is specified, the server
243
+ # will use its [default
244
+ # version][google.cloud.documentai.v1.Processor.default_processor_version].
245
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`,
246
+ # or
240
247
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
241
248
  # @param skip_human_review [::Boolean]
242
249
  # Whether human review should be skipped for this request. Default to
243
250
  # `false`.
244
251
  # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
245
- # Specifies which fields to include in the {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
252
+ # Specifies which fields to include in the
253
+ # {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
246
254
  # output. Only supports top-level document and pages field, so it must be in
247
255
  # the form of `{document_field_name}` or `pages.{page_field_name}`.
248
256
  # @param process_options [::Google::Cloud::DocumentAI::V1::ProcessOptions, ::Hash]
@@ -289,10 +297,11 @@ module Google
289
297
  # Customize the options with defaults
290
298
  metadata = @config.rpcs.process_document.metadata.to_h
291
299
 
292
- # Set x-goog-api-client and x-goog-user-project headers
300
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
293
301
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
294
302
  lib_name: @config.lib_name, lib_version: @config.lib_version,
295
303
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
304
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
296
305
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
297
306
 
298
307
  header_params = {}
@@ -339,7 +348,8 @@ module Google
339
348
  # the default parameter values, pass an empty Hash as a request object (see above).
340
349
  #
341
350
  # @param name [::String]
342
- # Required. The resource name of {::Google::Cloud::DocumentAI::V1::Processor Processor} or
351
+ # Required. The resource name of
352
+ # {::Google::Cloud::DocumentAI::V1::Processor Processor} or
343
353
  # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
344
354
  # Format: `projects/{project}/locations/{location}/processors/{processor}`,
345
355
  # or
@@ -406,10 +416,11 @@ module Google
406
416
  # Customize the options with defaults
407
417
  metadata = @config.rpcs.batch_process_documents.metadata.to_h
408
418
 
409
- # Set x-goog-api-client and x-goog-user-project headers
419
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
410
420
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
411
421
  lib_name: @config.lib_name, lib_version: @config.lib_version,
412
422
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
423
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
413
424
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
414
425
 
415
426
  header_params = {}
@@ -438,7 +449,8 @@ module Google
438
449
  end
439
450
 
440
451
  ##
441
- # Fetches processor types. Note that we don't use {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
452
+ # Fetches processor types. Note that we don't use
453
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
442
454
  # here, because it isn't paginated.
443
455
  #
444
456
  # @overload fetch_processor_types(request, options = nil)
@@ -494,10 +506,11 @@ module Google
494
506
  # Customize the options with defaults
495
507
  metadata = @config.rpcs.fetch_processor_types.metadata.to_h
496
508
 
497
- # Set x-goog-api-client and x-goog-user-project headers
509
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
498
510
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
499
511
  lib_name: @config.lib_name, lib_version: @config.lib_version,
500
512
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
513
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
501
514
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
502
515
 
503
516
  header_params = {}
@@ -590,10 +603,11 @@ module Google
590
603
  # Customize the options with defaults
591
604
  metadata = @config.rpcs.list_processor_types.metadata.to_h
592
605
 
593
- # Set x-goog-api-client and x-goog-user-project headers
606
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
594
607
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
595
608
  lib_name: @config.lib_name, lib_version: @config.lib_version,
596
609
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
610
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
597
611
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
598
612
 
599
613
  header_params = {}
@@ -676,10 +690,11 @@ module Google
676
690
  # Customize the options with defaults
677
691
  metadata = @config.rpcs.get_processor_type.metadata.to_h
678
692
 
679
- # Set x-goog-api-client and x-goog-user-project headers
693
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
680
694
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
681
695
  lib_name: @config.lib_name, lib_version: @config.lib_version,
682
696
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
697
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
683
698
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
684
699
 
685
700
  header_params = {}
@@ -725,8 +740,8 @@ module Google
725
740
  # the default parameter values, pass an empty Hash as a request object (see above).
726
741
  #
727
742
  # @param parent [::String]
728
- # Required. The parent (project and location) which owns this collection of Processors.
729
- # Format: `projects/{project}/locations/{location}`
743
+ # Required. The parent (project and location) which owns this collection of
744
+ # Processors. Format: `projects/{project}/locations/{location}`
730
745
  # @param page_size [::Integer]
731
746
  # The maximum number of processors to return.
732
747
  # If unspecified, at most `50` processors will be returned.
@@ -773,10 +788,11 @@ module Google
773
788
  # Customize the options with defaults
774
789
  metadata = @config.rpcs.list_processors.metadata.to_h
775
790
 
776
- # Set x-goog-api-client and x-goog-user-project headers
791
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
777
792
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
778
793
  lib_name: @config.lib_name, lib_version: @config.lib_version,
779
794
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
795
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
780
796
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
781
797
 
782
798
  header_params = {}
@@ -859,10 +875,11 @@ module Google
859
875
  # Customize the options with defaults
860
876
  metadata = @config.rpcs.get_processor.metadata.to_h
861
877
 
862
- # Set x-goog-api-client and x-goog-user-project headers
878
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
863
879
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
864
880
  lib_name: @config.lib_name, lib_version: @config.lib_version,
865
881
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
882
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
866
883
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
867
884
 
868
885
  header_params = {}
@@ -914,17 +931,19 @@ module Google
914
931
  # @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash]
915
932
  # Options to control foundation model tuning of a processor.
916
933
  # @param parent [::String]
917
- # Required. The parent (project, location and processor) to create the new version for.
918
- # Format: `projects/{project}/locations/{location}/processors/{processor}`.
934
+ # Required. The parent (project, location and processor) to create the new
935
+ # version for. Format:
936
+ # `projects/{project}/locations/{location}/processors/{processor}`.
919
937
  # @param processor_version [::Google::Cloud::DocumentAI::V1::ProcessorVersion, ::Hash]
920
938
  # Required. The processor version to be created.
921
939
  # @param document_schema [::Google::Cloud::DocumentAI::V1::DocumentSchema, ::Hash]
922
940
  # Optional. The schema the processor version will be trained with.
923
941
  # @param input_data [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::InputData, ::Hash]
924
- # Optional. The input data used to train the {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
942
+ # Optional. The input data used to train the
943
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
925
944
  # @param base_processor_version [::String]
926
- # Optional. The processor version to use as a base for training. This processor version
927
- # must be a child of `parent`. Format:
945
+ # Optional. The processor version to use as a base for training. This
946
+ # processor version must be a child of `parent`. Format:
928
947
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
929
948
  #
930
949
  # @yield [response, operation] Access the result along with the RPC operation
@@ -968,10 +987,11 @@ module Google
968
987
  # Customize the options with defaults
969
988
  metadata = @config.rpcs.train_processor_version.metadata.to_h
970
989
 
971
- # Set x-goog-api-client and x-goog-user-project headers
990
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
972
991
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
973
992
  lib_name: @config.lib_name, lib_version: @config.lib_version,
974
993
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
994
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
975
995
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
976
996
 
977
997
  header_params = {}
@@ -1054,10 +1074,11 @@ module Google
1054
1074
  # Customize the options with defaults
1055
1075
  metadata = @config.rpcs.get_processor_version.metadata.to_h
1056
1076
 
1057
- # Set x-goog-api-client and x-goog-user-project headers
1077
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1058
1078
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1059
1079
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1060
1080
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1081
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1061
1082
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1062
1083
 
1063
1084
  header_params = {}
@@ -1103,8 +1124,9 @@ module Google
1103
1124
  # the default parameter values, pass an empty Hash as a request object (see above).
1104
1125
  #
1105
1126
  # @param parent [::String]
1106
- # Required. The parent (project, location and processor) to list all versions.
1107
- # Format: `projects/{project}/locations/{location}/processors/{processor}`
1127
+ # Required. The parent (project, location and processor) to list all
1128
+ # versions. Format:
1129
+ # `projects/{project}/locations/{location}/processors/{processor}`
1108
1130
  # @param page_size [::Integer]
1109
1131
  # The maximum number of processor versions to return.
1110
1132
  # If unspecified, at most `10` processor versions will be returned.
@@ -1151,10 +1173,11 @@ module Google
1151
1173
  # Customize the options with defaults
1152
1174
  metadata = @config.rpcs.list_processor_versions.metadata.to_h
1153
1175
 
1154
- # Set x-goog-api-client and x-goog-user-project headers
1176
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1155
1177
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1156
1178
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1157
1179
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1180
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1158
1181
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1159
1182
 
1160
1183
  header_params = {}
@@ -1245,10 +1268,11 @@ module Google
1245
1268
  # Customize the options with defaults
1246
1269
  metadata = @config.rpcs.delete_processor_version.metadata.to_h
1247
1270
 
1248
- # Set x-goog-api-client and x-goog-user-project headers
1271
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1249
1272
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1250
1273
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1251
1274
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1275
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1252
1276
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1253
1277
 
1254
1278
  header_params = {}
@@ -1338,10 +1362,11 @@ module Google
1338
1362
  # Customize the options with defaults
1339
1363
  metadata = @config.rpcs.deploy_processor_version.metadata.to_h
1340
1364
 
1341
- # Set x-goog-api-client and x-goog-user-project headers
1365
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1342
1366
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1343
1367
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1344
1368
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1369
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1345
1370
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1346
1371
 
1347
1372
  header_params = {}
@@ -1431,10 +1456,11 @@ module Google
1431
1456
  # Customize the options with defaults
1432
1457
  metadata = @config.rpcs.undeploy_processor_version.metadata.to_h
1433
1458
 
1434
- # Set x-goog-api-client and x-goog-user-project headers
1459
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1435
1460
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1436
1461
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1437
1462
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1463
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1438
1464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1439
1465
 
1440
1466
  header_params = {}
@@ -1463,8 +1489,9 @@ module Google
1463
1489
  end
1464
1490
 
1465
1491
  ##
1466
- # Creates a processor from the {::Google::Cloud::DocumentAI::V1::ProcessorType ProcessorType} provided.
1467
- # The processor will be at `ENABLED` state by default after its creation.
1492
+ # Creates a processor from the
1493
+ # {::Google::Cloud::DocumentAI::V1::ProcessorType ProcessorType} provided. The
1494
+ # processor will be at `ENABLED` state by default after its creation.
1468
1495
  #
1469
1496
  # @overload create_processor(request, options = nil)
1470
1497
  # Pass arguments to `create_processor` via a request object, either of type
@@ -1482,11 +1509,14 @@ module Google
1482
1509
  # the default parameter values, pass an empty Hash as a request object (see above).
1483
1510
  #
1484
1511
  # @param parent [::String]
1485
- # Required. The parent (project and location) under which to create the processor.
1486
- # Format: `projects/{project}/locations/{location}`
1512
+ # Required. The parent (project and location) under which to create the
1513
+ # processor. Format: `projects/{project}/locations/{location}`
1487
1514
  # @param processor [::Google::Cloud::DocumentAI::V1::Processor, ::Hash]
1488
- # Required. The processor to be created, requires {::Google::Cloud::DocumentAI::V1::Processor#type Processor.type} and
1489
- # {::Google::Cloud::DocumentAI::V1::Processor#display_name Processor.display_name} to be set. Also, the {::Google::Cloud::DocumentAI::V1::Processor#kms_key_name Processor.kms_key_name}
1515
+ # Required. The processor to be created, requires
1516
+ # {::Google::Cloud::DocumentAI::V1::Processor#type Processor.type} and
1517
+ # {::Google::Cloud::DocumentAI::V1::Processor#display_name Processor.display_name}
1518
+ # to be set. Also, the
1519
+ # {::Google::Cloud::DocumentAI::V1::Processor#kms_key_name Processor.kms_key_name}
1490
1520
  # field must be set if the processor is under CMEK.
1491
1521
  #
1492
1522
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1523,10 +1553,11 @@ module Google
1523
1553
  # Customize the options with defaults
1524
1554
  metadata = @config.rpcs.create_processor.metadata.to_h
1525
1555
 
1526
- # Set x-goog-api-client and x-goog-user-project headers
1556
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1527
1557
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1528
1558
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1529
1559
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1560
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1530
1561
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1531
1562
 
1532
1563
  header_params = {}
@@ -1616,10 +1647,11 @@ module Google
1616
1647
  # Customize the options with defaults
1617
1648
  metadata = @config.rpcs.delete_processor.metadata.to_h
1618
1649
 
1619
- # Set x-goog-api-client and x-goog-user-project headers
1650
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1620
1651
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1621
1652
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1622
1653
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1654
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1623
1655
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1624
1656
 
1625
1657
  header_params = {}
@@ -1709,10 +1741,11 @@ module Google
1709
1741
  # Customize the options with defaults
1710
1742
  metadata = @config.rpcs.enable_processor.metadata.to_h
1711
1743
 
1712
- # Set x-goog-api-client and x-goog-user-project headers
1744
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1713
1745
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1714
1746
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1715
1747
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1748
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1716
1749
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1717
1750
 
1718
1751
  header_params = {}
@@ -1802,10 +1835,11 @@ module Google
1802
1835
  # Customize the options with defaults
1803
1836
  metadata = @config.rpcs.disable_processor.metadata.to_h
1804
1837
 
1805
- # Set x-goog-api-client and x-goog-user-project headers
1838
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1806
1839
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1807
1840
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1808
1841
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1842
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1809
1843
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1810
1844
 
1811
1845
  header_params = {}
@@ -1834,8 +1868,10 @@ module Google
1834
1868
  end
1835
1869
 
1836
1870
  ##
1837
- # Set the default (active) version of a {::Google::Cloud::DocumentAI::V1::Processor Processor} that will be used in
1838
- # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#process_document ProcessDocument} and
1871
+ # Set the default (active) version of a
1872
+ # {::Google::Cloud::DocumentAI::V1::Processor Processor} that will be used in
1873
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#process_document ProcessDocument}
1874
+ # and
1839
1875
  # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
1840
1876
  #
1841
1877
  # @overload set_default_processor_version(request, options = nil)
@@ -1854,10 +1890,13 @@ module Google
1854
1890
  # the default parameter values, pass an empty Hash as a request object (see above).
1855
1891
  #
1856
1892
  # @param processor [::String]
1857
- # Required. The resource name of the {::Google::Cloud::DocumentAI::V1::Processor Processor} to change default version.
1893
+ # Required. The resource name of the
1894
+ # {::Google::Cloud::DocumentAI::V1::Processor Processor} to change default
1895
+ # version.
1858
1896
  # @param default_processor_version [::String]
1859
- # Required. The resource name of child {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to use as default.
1860
- # Format:
1897
+ # Required. The resource name of child
1898
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to use as
1899
+ # default. Format:
1861
1900
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
1862
1901
  #
1863
1902
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1901,10 +1940,11 @@ module Google
1901
1940
  # Customize the options with defaults
1902
1941
  metadata = @config.rpcs.set_default_processor_version.metadata.to_h
1903
1942
 
1904
- # Set x-goog-api-client and x-goog-user-project headers
1943
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1905
1944
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1906
1945
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1907
1946
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
1947
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1908
1948
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1909
1949
 
1910
1950
  header_params = {}
@@ -1954,8 +1994,9 @@ module Google
1954
1994
  # @param inline_document [::Google::Cloud::DocumentAI::V1::Document, ::Hash]
1955
1995
  # An inline document proto.
1956
1996
  # @param human_review_config [::String]
1957
- # Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be
1958
- # reviewed with.
1997
+ # Required. The resource name of the
1998
+ # [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
1999
+ # document will be reviewed with.
1959
2000
  # @param enable_schema_validation [::Boolean]
1960
2001
  # Whether the validation should be performed on the ad-hoc review request.
1961
2002
  # @param priority [::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest::Priority]
@@ -2004,10 +2045,11 @@ module Google
2004
2045
  # Customize the options with defaults
2005
2046
  metadata = @config.rpcs.review_document.metadata.to_h
2006
2047
 
2007
- # Set x-goog-api-client and x-goog-user-project headers
2048
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2008
2049
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2009
2050
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2010
2051
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
2052
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2011
2053
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2012
2054
 
2013
2055
  header_params = {}
@@ -2055,11 +2097,13 @@ module Google
2055
2097
  # the default parameter values, pass an empty Hash as a request object (see above).
2056
2098
  #
2057
2099
  # @param processor_version [::String]
2058
- # Required. The resource name of the {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to evaluate.
2100
+ # Required. The resource name of the
2101
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to
2102
+ # evaluate.
2059
2103
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
2060
2104
  # @param evaluation_documents [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig, ::Hash]
2061
- # Optional. The documents used in the evaluation. If unspecified, use the processor's
2062
- # dataset as evaluation input.
2105
+ # Optional. The documents used in the evaluation. If unspecified, use the
2106
+ # processor's dataset as evaluation input.
2063
2107
  #
2064
2108
  # @yield [response, operation] Access the result along with the RPC operation
2065
2109
  # @yieldparam response [::Gapic::Operation]
@@ -2102,10 +2146,11 @@ module Google
2102
2146
  # Customize the options with defaults
2103
2147
  metadata = @config.rpcs.evaluate_processor_version.metadata.to_h
2104
2148
 
2105
- # Set x-goog-api-client and x-goog-user-project headers
2149
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2106
2150
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2107
2151
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2108
2152
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
2153
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2109
2154
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2110
2155
 
2111
2156
  header_params = {}
@@ -2152,7 +2197,8 @@ module Google
2152
2197
  # the default parameter values, pass an empty Hash as a request object (see above).
2153
2198
  #
2154
2199
  # @param name [::String]
2155
- # Required. The resource name of the {::Google::Cloud::DocumentAI::V1::Evaluation Evaluation} to get.
2200
+ # Required. The resource name of the
2201
+ # {::Google::Cloud::DocumentAI::V1::Evaluation Evaluation} to get.
2156
2202
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
2157
2203
  #
2158
2204
  # @yield [response, operation] Access the result along with the RPC operation
@@ -2189,10 +2235,11 @@ module Google
2189
2235
  # Customize the options with defaults
2190
2236
  metadata = @config.rpcs.get_evaluation.metadata.to_h
2191
2237
 
2192
- # Set x-goog-api-client and x-goog-user-project headers
2238
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2193
2239
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2194
2240
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2195
2241
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
2242
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2196
2243
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2197
2244
 
2198
2245
  header_params = {}
@@ -2238,7 +2285,9 @@ module Google
2238
2285
  # the default parameter values, pass an empty Hash as a request object (see above).
2239
2286
  #
2240
2287
  # @param parent [::String]
2241
- # Required. The resource name of the {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to list evaluations for.
2288
+ # Required. The resource name of the
2289
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to list
2290
+ # evaluations for.
2242
2291
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
2243
2292
  # @param page_size [::Integer]
2244
2293
  # The standard list page size.
@@ -2286,10 +2335,11 @@ module Google
2286
2335
  # Customize the options with defaults
2287
2336
  metadata = @config.rpcs.list_evaluations.metadata.to_h
2288
2337
 
2289
- # Set x-goog-api-client and x-goog-user-project headers
2338
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2290
2339
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2291
2340
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2292
2341
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
2342
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2293
2343
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2294
2344
 
2295
2345
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module DocumentProcessorService
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
 
@@ -191,10 +194,11 @@ module Google
191
194
  # Customize the options with defaults
192
195
  metadata = @config.rpcs.list_operations.metadata.to_h
193
196
 
194
- # Set x-goog-api-client and x-goog-user-project headers
197
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
195
198
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
199
  lib_name: @config.lib_name, lib_version: @config.lib_version,
197
200
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
201
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
198
202
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
203
 
200
204
  header_params = {}
@@ -287,10 +291,11 @@ module Google
287
291
  # Customize the options with defaults
288
292
  metadata = @config.rpcs.get_operation.metadata.to_h
289
293
 
290
- # Set x-goog-api-client and x-goog-user-project headers
294
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
291
295
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
296
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
297
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
298
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
294
299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
295
300
 
296
301
  header_params = {}
@@ -376,10 +381,11 @@ module Google
376
381
  # Customize the options with defaults
377
382
  metadata = @config.rpcs.delete_operation.metadata.to_h
378
383
 
379
- # Set x-goog-api-client and x-goog-user-project headers
384
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
380
385
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
386
  lib_name: @config.lib_name, lib_version: @config.lib_version,
382
387
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
388
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
383
389
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
390
 
385
391
  header_params = {}
@@ -470,10 +476,11 @@ module Google
470
476
  # Customize the options with defaults
471
477
  metadata = @config.rpcs.cancel_operation.metadata.to_h
472
478
 
473
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
474
480
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
482
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
483
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
485
 
479
486
  header_params = {}
@@ -574,10 +581,11 @@ module Google
574
581
  # Customize the options with defaults
575
582
  metadata = @config.rpcs.wait_operation.metadata.to_h
576
583
 
577
- # Set x-goog-api-client and x-goog-user-project headers
584
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
578
585
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
579
586
  lib_name: @config.lib_name, lib_version: @config.lib_version,
580
587
  gapic_version: ::Google::Cloud::DocumentAI::V1::VERSION
588
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
590
 
583
591
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,