google-cloud-document_ai-v1beta3 0.34.0 → 0.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) 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_pb.rb +3 -1
  14. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +1 -1
  15. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +4 -0
  16. data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +5 -0
  17. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +5 -1
  18. data/proto_docs/google/api/client.rb +14 -10
  19. data/proto_docs/google/api/resource.rb +7 -2
  20. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +6 -0
  21. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +35 -6
  22. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +3 -0
  23. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +67 -0
  24. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44682722a5b9f6f74fb2034c626ea008a66369cdc256523482db23d78b3d1248
4
- data.tar.gz: c72bc0cc86cd9c34dbffa9811fece6007812aff17cbb647e2cd14e7a3c2bc0d3
3
+ metadata.gz: d5eeee9072e16a1e4a9359d0c7b5e8630ba20840a1926bbe30da3c4761555715
4
+ data.tar.gz: f52fa95b3aa4bbe2dcb2e714ccfff79ef89e7cdf8a8e9640f5071955772c12bc
5
5
  SHA512:
6
- metadata.gz: 0ff453b6f4d259e612370b34fcc25e3d1fd1596af290029e29878cc1e48c11027d755b4f1d5060582210ec41186804ced37a20e4eba30b1c446ab636228adf4a
7
- data.tar.gz: 69c379eaabbbb4f411395dcacfae6e393a0da5bcc0252aab311bf66b162c410af73bf04e588306c5a07df921ec1aa5d167ab1c5eb1df33257b89a9ed3ced1021
6
+ metadata.gz: ba539351d82848526755b29d915733c9add283aafb95adf19849ab35f51e3d6e57867bb4aa822ed9e43ce3332d9c57426ccd8de02637932d9397cc8e3b8ac1fd
7
+ data.tar.gz: 3c7fc9b9d98a3a2783ec36983e7c5c92d5cd7b422deee8f76ac36e3cdb5261868ea7f18b1a1736c0cd416bcf909446e8a3edfd3c65750db096c2a6e31c355154
data/README.md CHANGED
@@ -24,7 +24,7 @@ In order to use this library, you first need to go through the following steps:
24
24
 
25
25
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
26
26
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
27
- 1. [Enable the API.](https://console.cloud.google.com/apis/library/us-documentai.googleapis.com)
27
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/documentai.googleapis.com)
28
28
  1. {file:AUTHENTICATION.md Set up authentication.}
29
29
 
30
30
  ## Quick Start
@@ -40,7 +40,7 @@ response = client.process_document request
40
40
  View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1beta3/latest)
41
41
  for class and method documentation.
42
42
 
43
- See also the [Product Documentation](https://cloud.google.com/document-ai/)
43
+ See also the [Product Documentation](https://cloud.google.com/document-ai/docs)
44
44
  for general usage information.
45
45
 
46
46
  ## Enabling Logging
@@ -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
 
@@ -220,7 +223,7 @@ module Google
220
223
  # @param options [::Gapic::CallOptions, ::Hash]
221
224
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
222
225
  #
223
- # @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)
226
+ # @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)
224
227
  # Pass arguments to `process_document` via keyword arguments. Note that at
225
228
  # least one keyword argument is required. To specify no parameters, or to keep all
226
229
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -264,6 +267,8 @@ module Google
264
267
  # (Unicode codepoints) and can only contain lowercase letters, numeric
265
268
  # characters, underscores, and dashes. International characters are allowed.
266
269
  # Label values are optional. Label keys must start with a letter.
270
+ # @param imageless_mode [::Boolean]
271
+ # Optional. Option to remove images from the document.
267
272
  #
268
273
  # @yield [response, operation] Access the result along with the RPC operation
269
274
  # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
@@ -299,10 +304,11 @@ module Google
299
304
  # Customize the options with defaults
300
305
  metadata = @config.rpcs.process_document.metadata.to_h
301
306
 
302
- # Set x-goog-api-client and x-goog-user-project headers
307
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
303
308
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
304
309
  lib_name: @config.lib_name, lib_version: @config.lib_version,
305
310
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
311
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
306
312
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
313
 
308
314
  header_params = {}
@@ -421,10 +427,11 @@ module Google
421
427
  # Customize the options with defaults
422
428
  metadata = @config.rpcs.batch_process_documents.metadata.to_h
423
429
 
424
- # Set x-goog-api-client and x-goog-user-project headers
430
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
425
431
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
426
432
  lib_name: @config.lib_name, lib_version: @config.lib_version,
427
433
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
434
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
428
435
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
429
436
 
430
437
  header_params = {}
@@ -510,10 +517,11 @@ module Google
510
517
  # Customize the options with defaults
511
518
  metadata = @config.rpcs.fetch_processor_types.metadata.to_h
512
519
 
513
- # Set x-goog-api-client and x-goog-user-project headers
520
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
514
521
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
515
522
  lib_name: @config.lib_name, lib_version: @config.lib_version,
516
523
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
524
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
517
525
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
518
526
 
519
527
  header_params = {}
@@ -606,10 +614,11 @@ module Google
606
614
  # Customize the options with defaults
607
615
  metadata = @config.rpcs.list_processor_types.metadata.to_h
608
616
 
609
- # Set x-goog-api-client and x-goog-user-project headers
617
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
610
618
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
611
619
  lib_name: @config.lib_name, lib_version: @config.lib_version,
612
620
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
621
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
613
622
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
614
623
 
615
624
  header_params = {}
@@ -692,10 +701,11 @@ module Google
692
701
  # Customize the options with defaults
693
702
  metadata = @config.rpcs.get_processor_type.metadata.to_h
694
703
 
695
- # Set x-goog-api-client and x-goog-user-project headers
704
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
696
705
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
697
706
  lib_name: @config.lib_name, lib_version: @config.lib_version,
698
707
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
708
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
699
709
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
700
710
 
701
711
  header_params = {}
@@ -789,10 +799,11 @@ module Google
789
799
  # Customize the options with defaults
790
800
  metadata = @config.rpcs.list_processors.metadata.to_h
791
801
 
792
- # Set x-goog-api-client and x-goog-user-project headers
802
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
793
803
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
794
804
  lib_name: @config.lib_name, lib_version: @config.lib_version,
795
805
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
806
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
796
807
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
797
808
 
798
809
  header_params = {}
@@ -875,10 +886,11 @@ module Google
875
886
  # Customize the options with defaults
876
887
  metadata = @config.rpcs.get_processor.metadata.to_h
877
888
 
878
- # Set x-goog-api-client and x-goog-user-project headers
889
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
879
890
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
880
891
  lib_name: @config.lib_name, lib_version: @config.lib_version,
881
892
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
893
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
882
894
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
883
895
 
884
896
  header_params = {}
@@ -986,10 +998,11 @@ module Google
986
998
  # Customize the options with defaults
987
999
  metadata = @config.rpcs.train_processor_version.metadata.to_h
988
1000
 
989
- # Set x-goog-api-client and x-goog-user-project headers
1001
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
990
1002
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
991
1003
  lib_name: @config.lib_name, lib_version: @config.lib_version,
992
1004
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1005
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
993
1006
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
994
1007
 
995
1008
  header_params = {}
@@ -1072,10 +1085,11 @@ module Google
1072
1085
  # Customize the options with defaults
1073
1086
  metadata = @config.rpcs.get_processor_version.metadata.to_h
1074
1087
 
1075
- # Set x-goog-api-client and x-goog-user-project headers
1088
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1076
1089
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1077
1090
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1078
1091
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1092
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1079
1093
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1080
1094
 
1081
1095
  header_params = {}
@@ -1170,10 +1184,11 @@ module Google
1170
1184
  # Customize the options with defaults
1171
1185
  metadata = @config.rpcs.list_processor_versions.metadata.to_h
1172
1186
 
1173
- # Set x-goog-api-client and x-goog-user-project headers
1187
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1174
1188
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1175
1189
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1176
1190
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1191
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1177
1192
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1178
1193
 
1179
1194
  header_params = {}
@@ -1264,10 +1279,11 @@ module Google
1264
1279
  # Customize the options with defaults
1265
1280
  metadata = @config.rpcs.delete_processor_version.metadata.to_h
1266
1281
 
1267
- # Set x-goog-api-client and x-goog-user-project headers
1282
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1268
1283
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1269
1284
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1270
1285
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1286
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1271
1287
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1272
1288
 
1273
1289
  header_params = {}
@@ -1357,10 +1373,11 @@ module Google
1357
1373
  # Customize the options with defaults
1358
1374
  metadata = @config.rpcs.deploy_processor_version.metadata.to_h
1359
1375
 
1360
- # Set x-goog-api-client and x-goog-user-project headers
1376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1361
1377
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1362
1378
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1363
1379
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1380
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1364
1381
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1365
1382
 
1366
1383
  header_params = {}
@@ -1450,10 +1467,11 @@ module Google
1450
1467
  # Customize the options with defaults
1451
1468
  metadata = @config.rpcs.undeploy_processor_version.metadata.to_h
1452
1469
 
1453
- # Set x-goog-api-client and x-goog-user-project headers
1470
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1454
1471
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1455
1472
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1456
1473
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1474
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1457
1475
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1458
1476
 
1459
1477
  header_params = {}
@@ -1485,6 +1503,10 @@ module Google
1485
1503
  # Creates a processor from the
1486
1504
  # {::Google::Cloud::DocumentAI::V1beta3::ProcessorType ProcessorType} provided.
1487
1505
  # The processor will be at `ENABLED` state by default after its creation.
1506
+ # Note that this method requires the `documentai.processors.create`
1507
+ # permission on the project, which is highly privileged. A user or service
1508
+ # account with this permission can create new processors that can interact
1509
+ # with any gcs bucket in your project.
1488
1510
  #
1489
1511
  # @overload create_processor(request, options = nil)
1490
1512
  # Pass arguments to `create_processor` via a request object, either of type
@@ -1546,10 +1568,11 @@ module Google
1546
1568
  # Customize the options with defaults
1547
1569
  metadata = @config.rpcs.create_processor.metadata.to_h
1548
1570
 
1549
- # Set x-goog-api-client and x-goog-user-project headers
1571
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1550
1572
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1551
1573
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1552
1574
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1575
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1553
1576
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1554
1577
 
1555
1578
  header_params = {}
@@ -1639,10 +1662,11 @@ module Google
1639
1662
  # Customize the options with defaults
1640
1663
  metadata = @config.rpcs.delete_processor.metadata.to_h
1641
1664
 
1642
- # Set x-goog-api-client and x-goog-user-project headers
1665
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1643
1666
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1644
1667
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1645
1668
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1669
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1646
1670
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1647
1671
 
1648
1672
  header_params = {}
@@ -1732,10 +1756,11 @@ module Google
1732
1756
  # Customize the options with defaults
1733
1757
  metadata = @config.rpcs.enable_processor.metadata.to_h
1734
1758
 
1735
- # Set x-goog-api-client and x-goog-user-project headers
1759
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1736
1760
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1737
1761
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1738
1762
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1763
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1739
1764
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1740
1765
 
1741
1766
  header_params = {}
@@ -1825,10 +1850,11 @@ module Google
1825
1850
  # Customize the options with defaults
1826
1851
  metadata = @config.rpcs.disable_processor.metadata.to_h
1827
1852
 
1828
- # Set x-goog-api-client and x-goog-user-project headers
1853
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1829
1854
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1830
1855
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1831
1856
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1857
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1832
1858
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1833
1859
 
1834
1860
  header_params = {}
@@ -1929,10 +1955,11 @@ module Google
1929
1955
  # Customize the options with defaults
1930
1956
  metadata = @config.rpcs.set_default_processor_version.metadata.to_h
1931
1957
 
1932
- # Set x-goog-api-client and x-goog-user-project headers
1958
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1933
1959
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1934
1960
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1935
1961
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1962
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1936
1963
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1937
1964
 
1938
1965
  header_params = {}
@@ -2035,10 +2062,11 @@ module Google
2035
2062
  # Customize the options with defaults
2036
2063
  metadata = @config.rpcs.review_document.metadata.to_h
2037
2064
 
2038
- # Set x-goog-api-client and x-goog-user-project headers
2065
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2039
2066
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2040
2067
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2041
2068
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
2069
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2042
2070
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2043
2071
 
2044
2072
  header_params = {}
@@ -2135,10 +2163,11 @@ module Google
2135
2163
  # Customize the options with defaults
2136
2164
  metadata = @config.rpcs.evaluate_processor_version.metadata.to_h
2137
2165
 
2138
- # Set x-goog-api-client and x-goog-user-project headers
2166
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2139
2167
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2140
2168
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2141
2169
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
2170
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2142
2171
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2143
2172
 
2144
2173
  header_params = {}
@@ -2223,10 +2252,11 @@ module Google
2223
2252
  # Customize the options with defaults
2224
2253
  metadata = @config.rpcs.get_evaluation.metadata.to_h
2225
2254
 
2226
- # Set x-goog-api-client and x-goog-user-project headers
2255
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2227
2256
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2228
2257
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2229
2258
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
2259
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2230
2260
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2231
2261
 
2232
2262
  header_params = {}
@@ -2322,10 +2352,11 @@ module Google
2322
2352
  # Customize the options with defaults
2323
2353
  metadata = @config.rpcs.list_evaluations.metadata.to_h
2324
2354
 
2325
- # Set x-goog-api-client and x-goog-user-project headers
2355
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2326
2356
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2327
2357
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2328
2358
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
2359
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2329
2360
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2330
2361
 
2331
2362
  header_params = {}
@@ -2425,10 +2456,11 @@ module Google
2425
2456
  # Customize the options with defaults
2426
2457
  metadata = @config.rpcs.import_processor_version.metadata.to_h
2427
2458
 
2428
- # Set x-goog-api-client and x-goog-user-project headers
2459
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2429
2460
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2430
2461
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2431
2462
  gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
2463
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2432
2464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2433
2465
 
2434
2466
  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::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,