google-cloud-speech-v2 0.12.0 → 0.13.0

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.
@@ -33,6 +33,9 @@ module Google
33
33
  # Enables speech transcription and resource management.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$"
38
41
 
@@ -261,12 +264,13 @@ module Google
261
264
  # Customize the options with defaults
262
265
  call_metadata = @config.rpcs.create_recognizer.metadata.to_h
263
266
 
264
- # Set x-goog-api-client and x-goog-user-project headers
267
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
265
268
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
266
269
  lib_name: @config.lib_name, lib_version: @config.lib_version,
267
270
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
268
271
  transports_version_send: [:rest]
269
272
 
273
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
270
274
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
271
275
 
272
276
  options.apply_defaults timeout: @config.rpcs.create_recognizer.timeout,
@@ -359,12 +363,13 @@ module Google
359
363
  # Customize the options with defaults
360
364
  call_metadata = @config.rpcs.list_recognizers.metadata.to_h
361
365
 
362
- # Set x-goog-api-client and x-goog-user-project headers
366
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
363
367
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
364
368
  lib_name: @config.lib_name, lib_version: @config.lib_version,
365
369
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
366
370
  transports_version_send: [:rest]
367
371
 
372
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
368
373
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
369
374
 
370
375
  options.apply_defaults timeout: @config.rpcs.list_recognizers.timeout,
@@ -442,12 +447,13 @@ module Google
442
447
  # Customize the options with defaults
443
448
  call_metadata = @config.rpcs.get_recognizer.metadata.to_h
444
449
 
445
- # Set x-goog-api-client and x-goog-user-project headers
450
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
446
451
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
447
452
  lib_name: @config.lib_name, lib_version: @config.lib_version,
448
453
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
449
454
  transports_version_send: [:rest]
450
455
 
456
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
451
457
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
452
458
 
453
459
  options.apply_defaults timeout: @config.rpcs.get_recognizer.timeout,
@@ -536,12 +542,13 @@ module Google
536
542
  # Customize the options with defaults
537
543
  call_metadata = @config.rpcs.update_recognizer.metadata.to_h
538
544
 
539
- # Set x-goog-api-client and x-goog-user-project headers
545
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
540
546
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
541
547
  lib_name: @config.lib_name, lib_version: @config.lib_version,
542
548
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
543
549
  transports_version_send: [:rest]
544
550
 
551
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
545
552
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
546
553
 
547
554
  options.apply_defaults timeout: @config.rpcs.update_recognizer.timeout,
@@ -633,12 +640,13 @@ module Google
633
640
  # Customize the options with defaults
634
641
  call_metadata = @config.rpcs.delete_recognizer.metadata.to_h
635
642
 
636
- # Set x-goog-api-client and x-goog-user-project headers
643
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
637
644
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
638
645
  lib_name: @config.lib_name, lib_version: @config.lib_version,
639
646
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
640
647
  transports_version_send: [:rest]
641
648
 
649
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
642
650
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
643
651
 
644
652
  options.apply_defaults timeout: @config.rpcs.delete_recognizer.timeout,
@@ -727,12 +735,13 @@ module Google
727
735
  # Customize the options with defaults
728
736
  call_metadata = @config.rpcs.undelete_recognizer.metadata.to_h
729
737
 
730
- # Set x-goog-api-client and x-goog-user-project headers
738
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
731
739
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
732
740
  lib_name: @config.lib_name, lib_version: @config.lib_version,
733
741
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
734
742
  transports_version_send: [:rest]
735
743
 
744
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
736
745
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
737
746
 
738
747
  options.apply_defaults timeout: @config.rpcs.undelete_recognizer.timeout,
@@ -845,12 +854,13 @@ module Google
845
854
  # Customize the options with defaults
846
855
  call_metadata = @config.rpcs.recognize.metadata.to_h
847
856
 
848
- # Set x-goog-api-client and x-goog-user-project headers
857
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
849
858
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
850
859
  lib_name: @config.lib_name, lib_version: @config.lib_version,
851
860
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
852
861
  transports_version_send: [:rest]
853
862
 
863
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
854
864
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
855
865
 
856
866
  options.apply_defaults timeout: @config.rpcs.recognize.timeout,
@@ -917,7 +927,7 @@ module Google
917
927
  # request.
918
928
  # @param files [::Array<::Google::Cloud::Speech::V2::BatchRecognizeFileMetadata, ::Hash>]
919
929
  # Audio files with file metadata for ASR.
920
- # The maximum number of files allowed to be specified is 5.
930
+ # The maximum number of files allowed to be specified is 15.
921
931
  # @param recognition_output_config [::Google::Cloud::Speech::V2::RecognitionOutputConfig, ::Hash]
922
932
  # Configuration options for where to output the transcripts of each file.
923
933
  # @param processing_strategy [::Google::Cloud::Speech::V2::BatchRecognizeRequest::ProcessingStrategy]
@@ -963,12 +973,13 @@ module Google
963
973
  # Customize the options with defaults
964
974
  call_metadata = @config.rpcs.batch_recognize.metadata.to_h
965
975
 
966
- # Set x-goog-api-client and x-goog-user-project headers
976
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
967
977
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
968
978
  lib_name: @config.lib_name, lib_version: @config.lib_version,
969
979
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
970
980
  transports_version_send: [:rest]
971
981
 
982
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
972
983
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
973
984
 
974
985
  options.apply_defaults timeout: @config.rpcs.batch_recognize.timeout,
@@ -1044,12 +1055,13 @@ module Google
1044
1055
  # Customize the options with defaults
1045
1056
  call_metadata = @config.rpcs.get_config.metadata.to_h
1046
1057
 
1047
- # Set x-goog-api-client and x-goog-user-project headers
1058
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1048
1059
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1049
1060
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1050
1061
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1051
1062
  transports_version_send: [:rest]
1052
1063
 
1064
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1053
1065
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1054
1066
 
1055
1067
  options.apply_defaults timeout: @config.rpcs.get_config.timeout,
@@ -1127,12 +1139,13 @@ module Google
1127
1139
  # Customize the options with defaults
1128
1140
  call_metadata = @config.rpcs.update_config.metadata.to_h
1129
1141
 
1130
- # Set x-goog-api-client and x-goog-user-project headers
1142
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1131
1143
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1132
1144
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1133
1145
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1134
1146
  transports_version_send: [:rest]
1135
1147
 
1148
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1136
1149
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1137
1150
 
1138
1151
  options.apply_defaults timeout: @config.rpcs.update_config.timeout,
@@ -1224,12 +1237,13 @@ module Google
1224
1237
  # Customize the options with defaults
1225
1238
  call_metadata = @config.rpcs.create_custom_class.metadata.to_h
1226
1239
 
1227
- # Set x-goog-api-client and x-goog-user-project headers
1240
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1228
1241
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1229
1242
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1230
1243
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1231
1244
  transports_version_send: [:rest]
1232
1245
 
1246
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1233
1247
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1234
1248
 
1235
1249
  options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout,
@@ -1323,12 +1337,13 @@ module Google
1323
1337
  # Customize the options with defaults
1324
1338
  call_metadata = @config.rpcs.list_custom_classes.metadata.to_h
1325
1339
 
1326
- # Set x-goog-api-client and x-goog-user-project headers
1340
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1327
1341
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1328
1342
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1329
1343
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1330
1344
  transports_version_send: [:rest]
1331
1345
 
1346
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1332
1347
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1333
1348
 
1334
1349
  options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout,
@@ -1404,12 +1419,13 @@ module Google
1404
1419
  # Customize the options with defaults
1405
1420
  call_metadata = @config.rpcs.get_custom_class.metadata.to_h
1406
1421
 
1407
- # Set x-goog-api-client and x-goog-user-project headers
1422
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1408
1423
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1409
1424
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1410
1425
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1411
1426
  transports_version_send: [:rest]
1412
1427
 
1428
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1413
1429
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1414
1430
 
1415
1431
  options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout,
@@ -1499,12 +1515,13 @@ module Google
1499
1515
  # Customize the options with defaults
1500
1516
  call_metadata = @config.rpcs.update_custom_class.metadata.to_h
1501
1517
 
1502
- # Set x-goog-api-client and x-goog-user-project headers
1518
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1503
1519
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1504
1520
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1505
1521
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1506
1522
  transports_version_send: [:rest]
1507
1523
 
1524
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1508
1525
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1509
1526
 
1510
1527
  options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout,
@@ -1597,12 +1614,13 @@ module Google
1597
1614
  # Customize the options with defaults
1598
1615
  call_metadata = @config.rpcs.delete_custom_class.metadata.to_h
1599
1616
 
1600
- # Set x-goog-api-client and x-goog-user-project headers
1617
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1601
1618
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1602
1619
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1603
1620
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1604
1621
  transports_version_send: [:rest]
1605
1622
 
1623
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1606
1624
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1607
1625
 
1608
1626
  options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout,
@@ -1692,12 +1710,13 @@ module Google
1692
1710
  # Customize the options with defaults
1693
1711
  call_metadata = @config.rpcs.undelete_custom_class.metadata.to_h
1694
1712
 
1695
- # Set x-goog-api-client and x-goog-user-project headers
1713
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1696
1714
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1697
1715
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1698
1716
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1699
1717
  transports_version_send: [:rest]
1700
1718
 
1719
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1701
1720
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1702
1721
 
1703
1722
  options.apply_defaults timeout: @config.rpcs.undelete_custom_class.timeout,
@@ -1790,12 +1809,13 @@ module Google
1790
1809
  # Customize the options with defaults
1791
1810
  call_metadata = @config.rpcs.create_phrase_set.metadata.to_h
1792
1811
 
1793
- # Set x-goog-api-client and x-goog-user-project headers
1812
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1794
1813
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1795
1814
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1796
1815
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1797
1816
  transports_version_send: [:rest]
1798
1817
 
1818
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1799
1819
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1800
1820
 
1801
1821
  options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout,
@@ -1888,12 +1908,13 @@ module Google
1888
1908
  # Customize the options with defaults
1889
1909
  call_metadata = @config.rpcs.list_phrase_sets.metadata.to_h
1890
1910
 
1891
- # Set x-goog-api-client and x-goog-user-project headers
1911
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1892
1912
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1893
1913
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1894
1914
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1895
1915
  transports_version_send: [:rest]
1896
1916
 
1917
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1897
1918
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1898
1919
 
1899
1920
  options.apply_defaults timeout: @config.rpcs.list_phrase_sets.timeout,
@@ -1969,12 +1990,13 @@ module Google
1969
1990
  # Customize the options with defaults
1970
1991
  call_metadata = @config.rpcs.get_phrase_set.metadata.to_h
1971
1992
 
1972
- # Set x-goog-api-client and x-goog-user-project headers
1993
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1973
1994
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1974
1995
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1975
1996
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
1976
1997
  transports_version_send: [:rest]
1977
1998
 
1999
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1978
2000
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1979
2001
 
1980
2002
  options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout,
@@ -2063,12 +2085,13 @@ module Google
2063
2085
  # Customize the options with defaults
2064
2086
  call_metadata = @config.rpcs.update_phrase_set.metadata.to_h
2065
2087
 
2066
- # Set x-goog-api-client and x-goog-user-project headers
2088
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2067
2089
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2068
2090
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2069
2091
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
2070
2092
  transports_version_send: [:rest]
2071
2093
 
2094
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2072
2095
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2073
2096
 
2074
2097
  options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout,
@@ -2160,12 +2183,13 @@ module Google
2160
2183
  # Customize the options with defaults
2161
2184
  call_metadata = @config.rpcs.delete_phrase_set.metadata.to_h
2162
2185
 
2163
- # Set x-goog-api-client and x-goog-user-project headers
2186
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2164
2187
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2165
2188
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2166
2189
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
2167
2190
  transports_version_send: [:rest]
2168
2191
 
2192
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2169
2193
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2170
2194
 
2171
2195
  options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout,
@@ -2254,12 +2278,13 @@ module Google
2254
2278
  # Customize the options with defaults
2255
2279
  call_metadata = @config.rpcs.undelete_phrase_set.metadata.to_h
2256
2280
 
2257
- # Set x-goog-api-client and x-goog-user-project headers
2281
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2258
2282
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2259
2283
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2260
2284
  gapic_version: ::Google::Cloud::Speech::V2::VERSION,
2261
2285
  transports_version_send: [:rest]
2262
2286
 
2287
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2263
2288
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2264
2289
 
2265
2290
  options.apply_defaults timeout: @config.rpcs.undelete_phrase_set.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 = "speech.$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::Speech::V2::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::Speech::V2::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::Speech::V2::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::Speech::V2::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,
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V2
24
- VERSION = "0.12.0"
24
+ VERSION = "0.13.0"
25
25
  end
26
26
  end
27
27
  end
@@ -290,6 +290,13 @@ module Google
290
290
  # @return [::String]
291
291
  # The fully qualified name of the method, for which the options below apply.
292
292
  # This is used to find the method to apply the options.
293
+ #
294
+ # Example:
295
+ #
296
+ # publishing:
297
+ # method_settings:
298
+ # - selector: google.storage.control.v2.StorageControl.CreateFolder
299
+ # # method settings for CreateFolder...
293
300
  # @!attribute [rw] long_running
294
301
  # @return [::Google::Api::MethodSettings::LongRunning]
295
302
  # Describes settings to use for long-running operations when generating
@@ -298,17 +305,14 @@ module Google
298
305
  #
299
306
  # Example of a YAML configuration::
300
307
  #
301
- # publishing:
302
- # method_settings:
308
+ # publishing:
309
+ # method_settings:
303
310
  # - selector: google.cloud.speech.v2.Speech.BatchRecognize
304
311
  # long_running:
305
- # initial_poll_delay:
306
- # seconds: 60 # 1 minute
312
+ # initial_poll_delay: 60s # 1 minute
307
313
  # poll_delay_multiplier: 1.5
308
- # max_poll_delay:
309
- # seconds: 360 # 6 minutes
310
- # total_poll_timeout:
311
- # seconds: 54000 # 90 minutes
314
+ # max_poll_delay: 360s # 6 minutes
315
+ # total_poll_timeout: 54000s # 90 minutes
312
316
  # @!attribute [rw] auto_populated_fields
313
317
  # @return [::Array<::String>]
314
318
  # List of top-level fields of the request message, that should be
@@ -317,8 +321,8 @@ module Google
317
321
  #
318
322
  # Example of a YAML configuration:
319
323
  #
320
- # publishing:
321
- # method_settings:
324
+ # publishing:
325
+ # method_settings:
322
326
  # - selector: google.example.v1.ExampleService.CreateExample
323
327
  # auto_populated_fields:
324
328
  # - request_id
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Rich semantic information of an API field beyond basic typing.
23
+ # @!attribute [rw] format
24
+ # @return [::Google::Api::FieldInfo::Format]
25
+ # The standard format of a field value. This does not explicitly configure
26
+ # any API consumer, just documents the API's format for the field it is
27
+ # applied to.
28
+ # @!attribute [rw] referenced_types
29
+ # @return [::Array<::Google::Api::TypeReference>]
30
+ # The type(s) that the annotated, generic field may represent.
31
+ #
32
+ # Currently, this must only be used on fields of type `google.protobuf.Any`.
33
+ # Supporting other generic types may be considered in the future.
34
+ class FieldInfo
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+
38
+ # The standard format of a field value. The supported formats are all backed
39
+ # by either an RFC defined by the IETF or a Google-defined AIP.
40
+ module Format
41
+ # Default, unspecified value.
42
+ FORMAT_UNSPECIFIED = 0
43
+
44
+ # Universally Unique Identifier, version 4, value as defined by
45
+ # https://datatracker.ietf.org/doc/html/rfc4122. The value may be
46
+ # normalized to entirely lowercase letters. For example, the value
47
+ # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
48
+ # `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
49
+ UUID4 = 1
50
+
51
+ # Internet Protocol v4 value as defined by [RFC
52
+ # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
53
+ # condensed, with leading zeros in each octet stripped. For example,
54
+ # `001.022.233.040` would be condensed to `1.22.233.40`.
55
+ IPV4 = 2
56
+
57
+ # Internet Protocol v6 value as defined by [RFC
58
+ # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
59
+ # normalized to entirely lowercase letters with zeros compressed, following
60
+ # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,
61
+ # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
62
+ IPV6 = 3
63
+
64
+ # An IP address in either v4 or v6 format as described by the individual
65
+ # values defined herein. See the comments on the IPV4 and IPV6 types for
66
+ # allowed normalizations of each.
67
+ IPV4_OR_IPV6 = 4
68
+ end
69
+ end
70
+
71
+ # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}.
72
+ # @!attribute [rw] type_name
73
+ # @return [::String]
74
+ # The name of the type that the annotated, generic field may represent.
75
+ # If the type is in the same protobuf package, the value can be the simple
76
+ # message name e.g., `"MyMessage"`. Otherwise, the value must be the
77
+ # fully-qualified message name e.g., `"google.library.v1.Book"`.
78
+ #
79
+ # If the type(s) are unknown to the service (e.g. the field accepts generic
80
+ # user input), use the wildcard `"*"` to denote this behavior.
81
+ #
82
+ # See [AIP-202](https://google.aip.dev/202#type-references) for more details.
83
+ class TypeReference
84
+ include ::Google::Protobuf::MessageExts
85
+ extend ::Google::Protobuf::MessageExts::ClassMethods
86
+ end
87
+ end
88
+ end
@@ -124,8 +124,13 @@ module Google
124
124
  # @return [::String]
125
125
  # The plural name used in the resource name and permission names, such as
126
126
  # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
- # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
- # concept of the `plural` field in k8s CRD spec
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
128
+ # to this is for Nested Collections that have stuttering names, as defined
129
+ # in [AIP-122](https://google.aip.dev/122#nested-collections), where the
130
+ # collection ID in the resource name pattern does not necessarily directly
131
+ # match the `plural` value.
132
+ #
133
+ # It is the same concept of the `plural` field in k8s CRD spec
129
134
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
135
  #
131
136
  # Note: The plural form is required even for singleton resources. See
@@ -389,7 +389,11 @@ module Google
389
389
  #
390
390
  # * WEBM_OPUS: Opus audio frames in a WebM container.
391
391
  #
392
- # * M4A: M4A audio format.
392
+ # * MP4_AAC: AAC audio frames in an MP4 container.
393
+ #
394
+ # * M4A_AAC: AAC audio frames in an M4A container.
395
+ #
396
+ # * MOV_AAC: AAC audio frames in an MOV container.
393
397
  class AutoDetectDecodingConfig
394
398
  include ::Google::Protobuf::MessageExts
395
399
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -717,6 +721,9 @@ module Google
717
721
  end
718
722
 
719
723
  # Metadata about the recognition request and response.
724
+ # @!attribute [rw] request_id
725
+ # @return [::String]
726
+ # Global request identifier auto-generated by the API.
720
727
  # @!attribute [rw] total_billed_duration
721
728
  # @return [::Google::Protobuf::Duration]
722
729
  # When available, billed audio seconds for the corresponding request.
@@ -976,7 +983,7 @@ module Google
976
983
  # @!attribute [rw] files
977
984
  # @return [::Array<::Google::Cloud::Speech::V2::BatchRecognizeFileMetadata>]
978
985
  # Audio files with file metadata for ASR.
979
- # The maximum number of files allowed to be specified is 5.
986
+ # The maximum number of files allowed to be specified is 15.
980
987
  # @!attribute [rw] recognition_output_config
981
988
  # @return [::Google::Cloud::Speech::V2::RecognitionOutputConfig]
982
989
  # Configuration options for where to output the transcripts of each file.