google-cloud-document_ai-v1beta3 0.35.0 → 0.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +56 -24
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +13 -5
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +56 -24
  6. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb +11 -4
  7. data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +22 -7
  8. data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +13 -5
  9. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +22 -7
  10. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +11 -4
  11. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  12. data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +1 -1
  13. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +1 -1
  14. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +4 -0
  15. data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +5 -0
  16. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +5 -1
  17. data/proto_docs/google/api/client.rb +14 -10
  18. data/proto_docs/google/api/resource.rb +7 -2
  19. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +6 -0
  20. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +1 -3
  21. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +3 -0
  22. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +67 -0
  23. 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
 
@@ -214,7 +217,7 @@ module Google
214
217
  # @param options [::Gapic::CallOptions, ::Hash]
215
218
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
216
219
  #
217
- # @overload process_document(inline_document: nil, raw_document: nil, gcs_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil, process_options: nil, labels: nil)
220
+ # @overload process_document(inline_document: nil, raw_document: nil, gcs_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil, process_options: nil, labels: nil, imageless_mode: nil)
218
221
  # Pass arguments to `process_document` via keyword arguments. Note that at
219
222
  # least one keyword argument is required. To specify no parameters, or to keep all
220
223
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -258,6 +261,8 @@ module Google
258
261
  # (Unicode codepoints) and can only contain lowercase letters, numeric
259
262
  # characters, underscores, and dashes. International characters are allowed.
260
263
  # Label values are optional. Label keys must start with a letter.
264
+ # @param imageless_mode [::Boolean]
265
+ # Optional. Option to remove images from the document.
261
266
  # @yield [result, operation] Access the result along with the TransportOperation object
262
267
  # @yieldparam result [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
263
268
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -292,12 +297,13 @@ module Google
292
297
  # Customize the options with defaults
293
298
  call_metadata = @config.rpcs.process_document.metadata.to_h
294
299
 
295
- # 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
296
301
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
297
302
  lib_name: @config.lib_name, lib_version: @config.lib_version,
298
303
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
299
304
  transports_version_send: [:rest]
300
305
 
306
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
301
307
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
302
308
 
303
309
  options.apply_defaults timeout: @config.rpcs.process_document.timeout,
@@ -407,12 +413,13 @@ module Google
407
413
  # Customize the options with defaults
408
414
  call_metadata = @config.rpcs.batch_process_documents.metadata.to_h
409
415
 
410
- # Set x-goog-api-client and x-goog-user-project headers
416
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
411
417
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
412
418
  lib_name: @config.lib_name, lib_version: @config.lib_version,
413
419
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
414
420
  transports_version_send: [:rest]
415
421
 
422
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
416
423
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
417
424
 
418
425
  options.apply_defaults timeout: @config.rpcs.batch_process_documents.timeout,
@@ -489,12 +496,13 @@ module Google
489
496
  # Customize the options with defaults
490
497
  call_metadata = @config.rpcs.fetch_processor_types.metadata.to_h
491
498
 
492
- # Set x-goog-api-client and x-goog-user-project headers
499
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
493
500
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
494
501
  lib_name: @config.lib_name, lib_version: @config.lib_version,
495
502
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
496
503
  transports_version_send: [:rest]
497
504
 
505
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
498
506
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
499
507
 
500
508
  options.apply_defaults timeout: @config.rpcs.fetch_processor_types.timeout,
@@ -578,12 +586,13 @@ module Google
578
586
  # Customize the options with defaults
579
587
  call_metadata = @config.rpcs.list_processor_types.metadata.to_h
580
588
 
581
- # Set x-goog-api-client and x-goog-user-project headers
589
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
582
590
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
583
591
  lib_name: @config.lib_name, lib_version: @config.lib_version,
584
592
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
585
593
  transports_version_send: [:rest]
586
594
 
595
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
587
596
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
588
597
 
589
598
  options.apply_defaults timeout: @config.rpcs.list_processor_types.timeout,
@@ -657,12 +666,13 @@ module Google
657
666
  # Customize the options with defaults
658
667
  call_metadata = @config.rpcs.get_processor_type.metadata.to_h
659
668
 
660
- # Set x-goog-api-client and x-goog-user-project headers
669
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
661
670
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
662
671
  lib_name: @config.lib_name, lib_version: @config.lib_version,
663
672
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
664
673
  transports_version_send: [:rest]
665
674
 
675
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
666
676
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
667
677
 
668
678
  options.apply_defaults timeout: @config.rpcs.get_processor_type.timeout,
@@ -747,12 +757,13 @@ module Google
747
757
  # Customize the options with defaults
748
758
  call_metadata = @config.rpcs.list_processors.metadata.to_h
749
759
 
750
- # Set x-goog-api-client and x-goog-user-project headers
760
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
751
761
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
762
  lib_name: @config.lib_name, lib_version: @config.lib_version,
753
763
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
754
764
  transports_version_send: [:rest]
755
765
 
766
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
756
767
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
757
768
 
758
769
  options.apply_defaults timeout: @config.rpcs.list_processors.timeout,
@@ -826,12 +837,13 @@ module Google
826
837
  # Customize the options with defaults
827
838
  call_metadata = @config.rpcs.get_processor.metadata.to_h
828
839
 
829
- # Set x-goog-api-client and x-goog-user-project headers
840
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
830
841
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
831
842
  lib_name: @config.lib_name, lib_version: @config.lib_version,
832
843
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
833
844
  transports_version_send: [:rest]
834
845
 
846
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
835
847
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
836
848
 
837
849
  options.apply_defaults timeout: @config.rpcs.get_processor.timeout,
@@ -930,12 +942,13 @@ module Google
930
942
  # Customize the options with defaults
931
943
  call_metadata = @config.rpcs.train_processor_version.metadata.to_h
932
944
 
933
- # Set x-goog-api-client and x-goog-user-project headers
945
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
934
946
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
935
947
  lib_name: @config.lib_name, lib_version: @config.lib_version,
936
948
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
937
949
  transports_version_send: [:rest]
938
950
 
951
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
939
952
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
940
953
 
941
954
  options.apply_defaults timeout: @config.rpcs.train_processor_version.timeout,
@@ -1009,12 +1022,13 @@ module Google
1009
1022
  # Customize the options with defaults
1010
1023
  call_metadata = @config.rpcs.get_processor_version.metadata.to_h
1011
1024
 
1012
- # Set x-goog-api-client and x-goog-user-project headers
1025
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1013
1026
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1014
1027
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1015
1028
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1016
1029
  transports_version_send: [:rest]
1017
1030
 
1031
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1018
1032
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1019
1033
 
1020
1034
  options.apply_defaults timeout: @config.rpcs.get_processor_version.timeout,
@@ -1100,12 +1114,13 @@ module Google
1100
1114
  # Customize the options with defaults
1101
1115
  call_metadata = @config.rpcs.list_processor_versions.metadata.to_h
1102
1116
 
1103
- # Set x-goog-api-client and x-goog-user-project headers
1117
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1104
1118
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1105
1119
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1106
1120
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1107
1121
  transports_version_send: [:rest]
1108
1122
 
1123
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1109
1124
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1110
1125
 
1111
1126
  options.apply_defaults timeout: @config.rpcs.list_processor_versions.timeout,
@@ -1187,12 +1202,13 @@ module Google
1187
1202
  # Customize the options with defaults
1188
1203
  call_metadata = @config.rpcs.delete_processor_version.metadata.to_h
1189
1204
 
1190
- # Set x-goog-api-client and x-goog-user-project headers
1205
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1191
1206
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1192
1207
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1193
1208
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1194
1209
  transports_version_send: [:rest]
1195
1210
 
1211
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1196
1212
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1197
1213
 
1198
1214
  options.apply_defaults timeout: @config.rpcs.delete_processor_version.timeout,
@@ -1273,12 +1289,13 @@ module Google
1273
1289
  # Customize the options with defaults
1274
1290
  call_metadata = @config.rpcs.deploy_processor_version.metadata.to_h
1275
1291
 
1276
- # Set x-goog-api-client and x-goog-user-project headers
1292
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1277
1293
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1278
1294
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1279
1295
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1280
1296
  transports_version_send: [:rest]
1281
1297
 
1298
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1282
1299
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1283
1300
 
1284
1301
  options.apply_defaults timeout: @config.rpcs.deploy_processor_version.timeout,
@@ -1359,12 +1376,13 @@ module Google
1359
1376
  # Customize the options with defaults
1360
1377
  call_metadata = @config.rpcs.undeploy_processor_version.metadata.to_h
1361
1378
 
1362
- # Set x-goog-api-client and x-goog-user-project headers
1379
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1363
1380
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1364
1381
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1365
1382
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1366
1383
  transports_version_send: [:rest]
1367
1384
 
1385
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1368
1386
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1369
1387
 
1370
1388
  options.apply_defaults timeout: @config.rpcs.undeploy_processor_version.timeout,
@@ -1388,6 +1406,10 @@ module Google
1388
1406
  # Creates a processor from the
1389
1407
  # {::Google::Cloud::DocumentAI::V1beta3::ProcessorType ProcessorType} provided.
1390
1408
  # The processor will be at `ENABLED` state by default after its creation.
1409
+ # Note that this method requires the `documentai.processors.create`
1410
+ # permission on the project, which is highly privileged. A user or service
1411
+ # account with this permission can create new processors that can interact
1412
+ # with any gcs bucket in your project.
1391
1413
  #
1392
1414
  # @overload create_processor(request, options = nil)
1393
1415
  # Pass arguments to `create_processor` via a request object, either of type
@@ -1448,12 +1470,13 @@ module Google
1448
1470
  # Customize the options with defaults
1449
1471
  call_metadata = @config.rpcs.create_processor.metadata.to_h
1450
1472
 
1451
- # Set x-goog-api-client and x-goog-user-project headers
1473
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1452
1474
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1453
1475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1454
1476
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1455
1477
  transports_version_send: [:rest]
1456
1478
 
1479
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1457
1480
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1458
1481
 
1459
1482
  options.apply_defaults timeout: @config.rpcs.create_processor.timeout,
@@ -1534,12 +1557,13 @@ module Google
1534
1557
  # Customize the options with defaults
1535
1558
  call_metadata = @config.rpcs.delete_processor.metadata.to_h
1536
1559
 
1537
- # Set x-goog-api-client and x-goog-user-project headers
1560
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1538
1561
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1539
1562
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1540
1563
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1541
1564
  transports_version_send: [:rest]
1542
1565
 
1566
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1543
1567
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1544
1568
 
1545
1569
  options.apply_defaults timeout: @config.rpcs.delete_processor.timeout,
@@ -1620,12 +1644,13 @@ module Google
1620
1644
  # Customize the options with defaults
1621
1645
  call_metadata = @config.rpcs.enable_processor.metadata.to_h
1622
1646
 
1623
- # Set x-goog-api-client and x-goog-user-project headers
1647
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1624
1648
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1625
1649
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1626
1650
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1627
1651
  transports_version_send: [:rest]
1628
1652
 
1653
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1629
1654
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1630
1655
 
1631
1656
  options.apply_defaults timeout: @config.rpcs.enable_processor.timeout,
@@ -1706,12 +1731,13 @@ module Google
1706
1731
  # Customize the options with defaults
1707
1732
  call_metadata = @config.rpcs.disable_processor.metadata.to_h
1708
1733
 
1709
- # Set x-goog-api-client and x-goog-user-project headers
1734
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1710
1735
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1711
1736
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1712
1737
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1713
1738
  transports_version_send: [:rest]
1714
1739
 
1740
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1715
1741
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1716
1742
 
1717
1743
  options.apply_defaults timeout: @config.rpcs.disable_processor.timeout,
@@ -1803,12 +1829,13 @@ module Google
1803
1829
  # Customize the options with defaults
1804
1830
  call_metadata = @config.rpcs.set_default_processor_version.metadata.to_h
1805
1831
 
1806
- # Set x-goog-api-client and x-goog-user-project headers
1832
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1807
1833
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1808
1834
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1809
1835
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1810
1836
  transports_version_send: [:rest]
1811
1837
 
1838
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1812
1839
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1813
1840
 
1814
1841
  options.apply_defaults timeout: @config.rpcs.set_default_processor_version.timeout,
@@ -1902,12 +1929,13 @@ module Google
1902
1929
  # Customize the options with defaults
1903
1930
  call_metadata = @config.rpcs.review_document.metadata.to_h
1904
1931
 
1905
- # Set x-goog-api-client and x-goog-user-project headers
1932
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1906
1933
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1907
1934
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1908
1935
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
1909
1936
  transports_version_send: [:rest]
1910
1937
 
1938
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1911
1939
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1912
1940
 
1913
1941
  options.apply_defaults timeout: @config.rpcs.review_document.timeout,
@@ -1995,12 +2023,13 @@ module Google
1995
2023
  # Customize the options with defaults
1996
2024
  call_metadata = @config.rpcs.evaluate_processor_version.metadata.to_h
1997
2025
 
1998
- # Set x-goog-api-client and x-goog-user-project headers
2026
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1999
2027
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2000
2028
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2001
2029
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
2002
2030
  transports_version_send: [:rest]
2003
2031
 
2032
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2004
2033
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2005
2034
 
2006
2035
  options.apply_defaults timeout: @config.rpcs.evaluate_processor_version.timeout,
@@ -2076,12 +2105,13 @@ module Google
2076
2105
  # Customize the options with defaults
2077
2106
  call_metadata = @config.rpcs.get_evaluation.metadata.to_h
2078
2107
 
2079
- # Set x-goog-api-client and x-goog-user-project headers
2108
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2080
2109
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2081
2110
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2082
2111
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
2083
2112
  transports_version_send: [:rest]
2084
2113
 
2114
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2085
2115
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2086
2116
 
2087
2117
  options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout,
@@ -2168,12 +2198,13 @@ module Google
2168
2198
  # Customize the options with defaults
2169
2199
  call_metadata = @config.rpcs.list_evaluations.metadata.to_h
2170
2200
 
2171
- # Set x-goog-api-client and x-goog-user-project headers
2201
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2172
2202
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2173
2203
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2174
2204
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
2175
2205
  transports_version_send: [:rest]
2176
2206
 
2207
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2177
2208
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2178
2209
 
2179
2210
  options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout,
@@ -2264,12 +2295,13 @@ module Google
2264
2295
  # Customize the options with defaults
2265
2296
  call_metadata = @config.rpcs.import_processor_version.metadata.to_h
2266
2297
 
2267
- # Set x-goog-api-client and x-goog-user-project headers
2298
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2268
2299
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2269
2300
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2270
2301
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION,
2271
2302
  transports_version_send: [:rest]
2272
2303
 
2304
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2273
2305
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2274
2306
 
2275
2307
  options.apply_defaults timeout: @config.rpcs.import_processor_version.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 and x-goog-user-project headers
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::V1beta3::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 and x-goog-user-project headers
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::V1beta3::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 and x-goog-user-project headers
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::V1beta3::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 and x-goog-user-project headers
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::V1beta3::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,
@@ -31,6 +31,9 @@ module Google
31
31
  # Service to call Cloud DocumentAI to manage document collection (dataset).
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "documentai.$UNIVERSE_DOMAIN$"
36
39
 
@@ -191,6 +194,11 @@ module Google
191
194
 
192
195
  ##
193
196
  # Updates metadata associated with a dataset.
197
+ # Note that this method requires the
198
+ # `documentai.googleapis.com/datasets.update` permission on the project,
199
+ # which is highly privileged. A user or service account with this permission
200
+ # can create new processors that can interact with any gcs bucket in your
201
+ # project.
194
202
  #
195
203
  # @overload update_dataset(request, options = nil)
196
204
  # Pass arguments to `update_dataset` via a request object, either of type
@@ -254,10 +262,11 @@ module Google
254
262
  # Customize the options with defaults
255
263
  metadata = @config.rpcs.update_dataset.metadata.to_h
256
264
 
257
- # Set x-goog-api-client and x-goog-user-project headers
265
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
258
266
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
259
267
  lib_name: @config.lib_name, lib_version: @config.lib_version,
260
268
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
269
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
261
270
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
271
 
263
272
  header_params = {}
@@ -352,10 +361,11 @@ module Google
352
361
  # Customize the options with defaults
353
362
  metadata = @config.rpcs.import_documents.metadata.to_h
354
363
 
355
- # Set x-goog-api-client and x-goog-user-project headers
364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
356
365
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
357
366
  lib_name: @config.lib_name, lib_version: @config.lib_version,
358
367
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
368
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
359
369
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
370
 
361
371
  header_params = {}
@@ -448,10 +458,11 @@ module Google
448
458
  # Customize the options with defaults
449
459
  metadata = @config.rpcs.get_document.metadata.to_h
450
460
 
451
- # Set x-goog-api-client and x-goog-user-project headers
461
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
452
462
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
453
463
  lib_name: @config.lib_name, lib_version: @config.lib_version,
454
464
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
465
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
455
466
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
456
467
 
457
468
  header_params = {}
@@ -586,10 +597,11 @@ module Google
586
597
  # Customize the options with defaults
587
598
  metadata = @config.rpcs.list_documents.metadata.to_h
588
599
 
589
- # Set x-goog-api-client and x-goog-user-project headers
600
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
590
601
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
591
602
  lib_name: @config.lib_name, lib_version: @config.lib_version,
592
603
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
604
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
593
605
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
594
606
 
595
607
  header_params = {}
@@ -686,10 +698,11 @@ module Google
686
698
  # Customize the options with defaults
687
699
  metadata = @config.rpcs.batch_delete_documents.metadata.to_h
688
700
 
689
- # Set x-goog-api-client and x-goog-user-project headers
701
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
690
702
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
691
703
  lib_name: @config.lib_name, lib_version: @config.lib_version,
692
704
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
705
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
693
706
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
694
707
 
695
708
  header_params = {}
@@ -776,10 +789,11 @@ module Google
776
789
  # Customize the options with defaults
777
790
  metadata = @config.rpcs.get_dataset_schema.metadata.to_h
778
791
 
779
- # Set x-goog-api-client and x-goog-user-project headers
792
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
780
793
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
781
794
  lib_name: @config.lib_name, lib_version: @config.lib_version,
782
795
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
796
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
783
797
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
784
798
 
785
799
  header_params = {}
@@ -864,10 +878,11 @@ module Google
864
878
  # Customize the options with defaults
865
879
  metadata = @config.rpcs.update_dataset_schema.metadata.to_h
866
880
 
867
- # Set x-goog-api-client and x-goog-user-project headers
881
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
868
882
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
869
883
  lib_name: @config.lib_name, lib_version: @config.lib_version,
870
884
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
885
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
871
886
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
872
887
 
873
888
  header_params = {}
@@ -26,6 +26,9 @@ module Google
26
26
  module DocumentService
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::V1beta3::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::V1beta3::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::V1beta3::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::V1beta3::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::V1beta3::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,