google-cloud-speech-v1p1beta1 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c526543ee0c047d698c4326867d2782e57f43d8ab7305f38efb0934f159d94a8
4
- data.tar.gz: ffd7f07c5b00d3f8d785aeb24d1f3eee570c0fa48dd63ac88428910360d7fc15
3
+ metadata.gz: ec2b958f9d54ff0bdda5f4573a525eb00428e3da9d85979cfcf7ed2344eb6784
4
+ data.tar.gz: 894fb9c68b3f0ee9cbf2a5ca119943dfc433d9a24067ba56c662c4d1fe093481
5
5
  SHA512:
6
- metadata.gz: b2a12d1c8d8e107db491405062bc92bb49a4df4fd55761a8c64b73e58ea17489436489b657849d1724a6d4885341932b4b64c13adc89661ec93a56dc1e842abf
7
- data.tar.gz: 1f6c6fc7675753fc90fcf35e81a943d64d940f028362b95acdf73b981e8248484f8b5eb3ddd4f607635b1137568fe9d89de3358ac879fae4bbe4f06d0b87e593
6
+ metadata.gz: 44043d180200363d6d224350ea930f7189dffb3635cd252073375e5ac896b3f3d0283c5fcdab3977514007d345165b8ade35fabac3da1f27e19290ddaa84f812
7
+ data.tar.gz: 4dafc2ea75e5313b4a5dda3f9fd0ed17badf1d56f2df421569cb5110c76c5db5e7ec62af88a43b19ec75a8e5583474213880f8d2e49e3c9eb2cf53b776f13343
@@ -123,7 +123,7 @@ module Google
123
123
  credentials = @config.credentials
124
124
  # Use self-signed JWT if the endpoint is unchanged from default,
125
125
  # but only if the default endpoint does not have a region prefix.
126
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
126
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
127
127
  !@config.endpoint.split(".").first.include?("-")
128
128
  credentials ||= Credentials.default scope: @config.scope,
129
129
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -138,7 +138,8 @@ module Google
138
138
  credentials: credentials,
139
139
  endpoint: @config.endpoint,
140
140
  channel_args: @config.channel_args,
141
- interceptors: @config.interceptors
141
+ interceptors: @config.interceptors,
142
+ channel_pool_config: @config.channel_pool
142
143
  )
143
144
  end
144
145
 
@@ -1206,7 +1207,9 @@ module Google
1206
1207
  class Configuration
1207
1208
  extend ::Gapic::Config
1208
1209
 
1209
- config_attr :endpoint, "speech.googleapis.com", ::String
1210
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
1211
+
1212
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1210
1213
  config_attr :credentials, nil do |value|
1211
1214
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1212
1215
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1241,6 +1244,14 @@ module Google
1241
1244
  end
1242
1245
  end
1243
1246
 
1247
+ ##
1248
+ # Configuration for the channel pool
1249
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1250
+ #
1251
+ def channel_pool
1252
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1253
+ end
1254
+
1244
1255
  ##
1245
1256
  # Configuration RPC class for the Adaptation API.
1246
1257
  #
@@ -119,7 +119,7 @@ module Google
119
119
  credentials = @config.credentials
120
120
  # Use self-signed JWT if the endpoint is unchanged from default,
121
121
  # but only if the default endpoint does not have a region prefix.
122
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
122
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
123
123
  !@config.endpoint.split(".").first.include?("-")
124
124
  credentials ||= Credentials.default scope: @config.scope,
125
125
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -181,6 +181,22 @@ module Google
181
181
  # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet]
182
182
  #
183
183
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
184
+ #
185
+ # @example Basic example
186
+ # require "google/cloud/speech/v1p1beta1"
187
+ #
188
+ # # Create a client object. The client can be reused for multiple calls.
189
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
190
+ #
191
+ # # Create a request. To set request fields, pass in keyword arguments.
192
+ # request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new
193
+ #
194
+ # # Call the create_phrase_set method.
195
+ # result = client.create_phrase_set request
196
+ #
197
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet.
198
+ # p result
199
+ #
184
200
  def create_phrase_set request, options = nil
185
201
  raise ::ArgumentError, "request must be provided" if request.nil?
186
202
 
@@ -251,6 +267,22 @@ module Google
251
267
  # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet]
252
268
  #
253
269
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
270
+ #
271
+ # @example Basic example
272
+ # require "google/cloud/speech/v1p1beta1"
273
+ #
274
+ # # Create a client object. The client can be reused for multiple calls.
275
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
276
+ #
277
+ # # Create a request. To set request fields, pass in keyword arguments.
278
+ # request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new
279
+ #
280
+ # # Call the get_phrase_set method.
281
+ # result = client.get_phrase_set request
282
+ #
283
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet.
284
+ # p result
285
+ #
254
286
  def get_phrase_set request, options = nil
255
287
  raise ::ArgumentError, "request must be provided" if request.nil?
256
288
 
@@ -332,6 +364,26 @@ module Google
332
364
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>]
333
365
  #
334
366
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
367
+ #
368
+ # @example Basic example
369
+ # require "google/cloud/speech/v1p1beta1"
370
+ #
371
+ # # Create a client object. The client can be reused for multiple calls.
372
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
373
+ #
374
+ # # Create a request. To set request fields, pass in keyword arguments.
375
+ # request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new
376
+ #
377
+ # # Call the list_phrase_set method.
378
+ # result = client.list_phrase_set request
379
+ #
380
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
381
+ # # over elements, and API calls will be issued to fetch pages as needed.
382
+ # result.each do |item|
383
+ # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet.
384
+ # p item
385
+ # end
386
+ #
335
387
  def list_phrase_set request, options = nil
336
388
  raise ::ArgumentError, "request must be provided" if request.nil?
337
389
 
@@ -408,6 +460,22 @@ module Google
408
460
  # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet]
409
461
  #
410
462
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
463
+ #
464
+ # @example Basic example
465
+ # require "google/cloud/speech/v1p1beta1"
466
+ #
467
+ # # Create a client object. The client can be reused for multiple calls.
468
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
469
+ #
470
+ # # Create a request. To set request fields, pass in keyword arguments.
471
+ # request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new
472
+ #
473
+ # # Call the update_phrase_set method.
474
+ # result = client.update_phrase_set request
475
+ #
476
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet.
477
+ # p result
478
+ #
411
479
  def update_phrase_set request, options = nil
412
480
  raise ::ArgumentError, "request must be provided" if request.nil?
413
481
 
@@ -472,6 +540,22 @@ module Google
472
540
  # @return [::Google::Protobuf::Empty]
473
541
  #
474
542
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
543
+ #
544
+ # @example Basic example
545
+ # require "google/cloud/speech/v1p1beta1"
546
+ #
547
+ # # Create a client object. The client can be reused for multiple calls.
548
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
549
+ #
550
+ # # Create a request. To set request fields, pass in keyword arguments.
551
+ # request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new
552
+ #
553
+ # # Call the delete_phrase_set method.
554
+ # result = client.delete_phrase_set request
555
+ #
556
+ # # The returned object is of type Google::Protobuf::Empty.
557
+ # p result
558
+ #
475
559
  def delete_phrase_set request, options = nil
476
560
  raise ::ArgumentError, "request must be provided" if request.nil?
477
561
 
@@ -551,6 +635,22 @@ module Google
551
635
  # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass]
552
636
  #
553
637
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
638
+ #
639
+ # @example Basic example
640
+ # require "google/cloud/speech/v1p1beta1"
641
+ #
642
+ # # Create a client object. The client can be reused for multiple calls.
643
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
644
+ #
645
+ # # Create a request. To set request fields, pass in keyword arguments.
646
+ # request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new
647
+ #
648
+ # # Call the create_custom_class method.
649
+ # result = client.create_custom_class request
650
+ #
651
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass.
652
+ # p result
653
+ #
554
654
  def create_custom_class request, options = nil
555
655
  raise ::ArgumentError, "request must be provided" if request.nil?
556
656
 
@@ -615,6 +715,22 @@ module Google
615
715
  # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass]
616
716
  #
617
717
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
718
+ #
719
+ # @example Basic example
720
+ # require "google/cloud/speech/v1p1beta1"
721
+ #
722
+ # # Create a client object. The client can be reused for multiple calls.
723
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
724
+ #
725
+ # # Create a request. To set request fields, pass in keyword arguments.
726
+ # request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new
727
+ #
728
+ # # Call the get_custom_class method.
729
+ # result = client.get_custom_class request
730
+ #
731
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass.
732
+ # p result
733
+ #
618
734
  def get_custom_class request, options = nil
619
735
  raise ::ArgumentError, "request must be provided" if request.nil?
620
736
 
@@ -696,6 +812,26 @@ module Google
696
812
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>]
697
813
  #
698
814
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
815
+ #
816
+ # @example Basic example
817
+ # require "google/cloud/speech/v1p1beta1"
818
+ #
819
+ # # Create a client object. The client can be reused for multiple calls.
820
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
821
+ #
822
+ # # Create a request. To set request fields, pass in keyword arguments.
823
+ # request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new
824
+ #
825
+ # # Call the list_custom_classes method.
826
+ # result = client.list_custom_classes request
827
+ #
828
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
829
+ # # over elements, and API calls will be issued to fetch pages as needed.
830
+ # result.each do |item|
831
+ # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass.
832
+ # p item
833
+ # end
834
+ #
699
835
  def list_custom_classes request, options = nil
700
836
  raise ::ArgumentError, "request must be provided" if request.nil?
701
837
 
@@ -772,6 +908,22 @@ module Google
772
908
  # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass]
773
909
  #
774
910
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
911
+ #
912
+ # @example Basic example
913
+ # require "google/cloud/speech/v1p1beta1"
914
+ #
915
+ # # Create a client object. The client can be reused for multiple calls.
916
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
917
+ #
918
+ # # Create a request. To set request fields, pass in keyword arguments.
919
+ # request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new
920
+ #
921
+ # # Call the update_custom_class method.
922
+ # result = client.update_custom_class request
923
+ #
924
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass.
925
+ # p result
926
+ #
775
927
  def update_custom_class request, options = nil
776
928
  raise ::ArgumentError, "request must be provided" if request.nil?
777
929
 
@@ -842,6 +994,22 @@ module Google
842
994
  # @return [::Google::Protobuf::Empty]
843
995
  #
844
996
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
997
+ #
998
+ # @example Basic example
999
+ # require "google/cloud/speech/v1p1beta1"
1000
+ #
1001
+ # # Create a client object. The client can be reused for multiple calls.
1002
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new
1003
+ #
1004
+ # # Create a request. To set request fields, pass in keyword arguments.
1005
+ # request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new
1006
+ #
1007
+ # # Call the delete_custom_class method.
1008
+ # result = client.delete_custom_class request
1009
+ #
1010
+ # # The returned object is of type Google::Protobuf::Empty.
1011
+ # p result
1012
+ #
845
1013
  def delete_custom_class request, options = nil
846
1014
  raise ::ArgumentError, "request must be provided" if request.nil?
847
1015
 
@@ -950,7 +1118,9 @@ module Google
950
1118
  class Configuration
951
1119
  extend ::Gapic::Config
952
1120
 
953
- config_attr :endpoint, "speech.googleapis.com", ::String
1121
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
1122
+
1123
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
954
1124
  config_attr :credentials, nil do |value|
955
1125
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
956
1126
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_set_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_set_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_set_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_set_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_set_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_class_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -287,7 +287,7 @@ module Google
287
287
 
288
288
  verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_class_request request_pb
289
289
  query_string_params = if query_string_params.any?
290
- query_string_params.to_h { |p| p.split("=", 2) }
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
291
  else
292
292
  {}
293
293
  end
@@ -325,7 +325,7 @@ module Google
325
325
 
326
326
  verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_classes_request request_pb
327
327
  query_string_params = if query_string_params.any?
328
- query_string_params.to_h { |p| p.split("=", 2) }
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
329
  else
330
330
  {}
331
331
  end
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_class_request request_pb
365
365
  query_string_params = if query_string_params.any?
366
- query_string_params.to_h { |p| p.split("=", 2) }
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
367
  else
368
368
  {}
369
369
  end
@@ -401,7 +401,7 @@ module Google
401
401
 
402
402
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_class_request request_pb
403
403
  query_string_params = if query_string_params.any?
404
- query_string_params.to_h { |p| p.split("=", 2) }
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
405
  else
406
406
  {}
407
407
  end
@@ -135,7 +135,7 @@ module Google
135
135
  credentials = @config.credentials
136
136
  # Use self-signed JWT if the endpoint is unchanged from default,
137
137
  # but only if the default endpoint does not have a region prefix.
138
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
139
139
  !@config.endpoint.split(".").first.include?("-")
140
140
  credentials ||= Credentials.default scope: @config.scope,
141
141
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -156,7 +156,8 @@ module Google
156
156
  credentials: credentials,
157
157
  endpoint: @config.endpoint,
158
158
  channel_args: @config.channel_args,
159
- interceptors: @config.interceptors
159
+ interceptors: @config.interceptors,
160
+ channel_pool_config: @config.channel_pool
160
161
  )
161
162
  end
162
163
 
@@ -506,7 +507,9 @@ module Google
506
507
  class Configuration
507
508
  extend ::Gapic::Config
508
509
 
509
- config_attr :endpoint, "speech.googleapis.com", ::String
510
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
511
+
512
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
510
513
  config_attr :credentials, nil do |value|
511
514
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
512
515
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -541,6 +544,14 @@ module Google
541
544
  end
542
545
  end
543
546
 
547
+ ##
548
+ # Configuration for the channel pool
549
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
550
+ #
551
+ def channel_pool
552
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
553
+ end
554
+
544
555
  ##
545
556
  # Configuration RPC class for the Speech API.
546
557
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -656,7 +657,9 @@ module Google
656
657
  class Configuration
657
658
  extend ::Gapic::Config
658
659
 
659
- config_attr :endpoint, "speech.googleapis.com", ::String
660
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
661
+
662
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
660
663
  config_attr :credentials, nil do |value|
661
664
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
662
665
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -691,6 +694,14 @@ module Google
691
694
  end
692
695
  end
693
696
 
697
+ ##
698
+ # Configuration for the channel pool
699
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
700
+ #
701
+ def channel_pool
702
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
703
+ end
704
+
694
705
  ##
695
706
  # Configuration RPC class for the Operations API.
696
707
  #
@@ -126,7 +126,7 @@ module Google
126
126
  credentials = @config.credentials
127
127
  # Use self-signed JWT if the endpoint is unchanged from default,
128
128
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
129
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
130
130
  !@config.endpoint.split(".").first.include?("-")
131
131
  credentials ||= Credentials.default scope: @config.scope,
132
132
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -186,6 +186,22 @@ module Google
186
186
  # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse]
187
187
  #
188
188
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
189
+ #
190
+ # @example Basic example
191
+ # require "google/cloud/speech/v1p1beta1"
192
+ #
193
+ # # Create a client object. The client can be reused for multiple calls.
194
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new
195
+ #
196
+ # # Create a request. To set request fields, pass in keyword arguments.
197
+ # request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new
198
+ #
199
+ # # Call the recognize method.
200
+ # result = client.recognize request
201
+ #
202
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse.
203
+ # p result
204
+ #
189
205
  def recognize request, options = nil
190
206
  raise ::ArgumentError, "request must be provided" if request.nil?
191
207
 
@@ -258,6 +274,29 @@ module Google
258
274
  # @return [::Gapic::Operation]
259
275
  #
260
276
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
277
+ #
278
+ # @example Basic example
279
+ # require "google/cloud/speech/v1p1beta1"
280
+ #
281
+ # # Create a client object. The client can be reused for multiple calls.
282
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new
283
+ #
284
+ # # Create a request. To set request fields, pass in keyword arguments.
285
+ # request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new
286
+ #
287
+ # # Call the long_running_recognize method.
288
+ # result = client.long_running_recognize request
289
+ #
290
+ # # The returned object is of type Gapic::Operation. You can use it to
291
+ # # check the status of an operation, cancel it, or wait for results.
292
+ # # Here is how to wait for a response.
293
+ # result.wait_until_done! timeout: 60
294
+ # if result.response?
295
+ # p result.response
296
+ # else
297
+ # puts "No response received."
298
+ # end
299
+ #
261
300
  def long_running_recognize request, options = nil
262
301
  raise ::ArgumentError, "request must be provided" if request.nil?
263
302
 
@@ -367,7 +406,9 @@ module Google
367
406
  class Configuration
368
407
  extend ::Gapic::Config
369
408
 
370
- config_attr :endpoint, "speech.googleapis.com", ::String
409
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
410
+
411
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
371
412
  config_attr :credentials, nil do |value|
372
413
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
373
414
  allowed.any? { |klass| klass === value }
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -446,7 +521,9 @@ module Google
446
521
  class Configuration
447
522
  extend ::Gapic::Config
448
523
 
449
- config_attr :endpoint, "speech.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
527
  config_attr :credentials, nil do |value|
451
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
529
  allowed.any? { |klass| klass === value }
@@ -567,7 +644,7 @@ module Google
567
644
 
568
645
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
646
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
647
+ query_string_params.to_h { |p| p.split "=", 2 }
571
648
  else
572
649
  {}
573
650
  end
@@ -605,7 +682,7 @@ module Google
605
682
 
606
683
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
684
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
685
+ query_string_params.to_h { |p| p.split "=", 2 }
609
686
  else
610
687
  {}
611
688
  end
@@ -643,7 +720,7 @@ module Google
643
720
 
644
721
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
722
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
723
+ query_string_params.to_h { |p| p.split "=", 2 }
647
724
  else
648
725
  {}
649
726
  end
@@ -681,7 +758,7 @@ module Google
681
758
 
682
759
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
760
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
761
+ query_string_params.to_h { |p| p.split "=", 2 }
685
762
  else
686
763
  {}
687
764
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_recognize_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_long_running_recognize_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1p1beta1
24
- VERSION = "0.18.0"
24
+ VERSION = "0.19.0"
25
25
  end
26
26
  end
27
27
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-speech-v1p1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.0
19
+ version: 0.20.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubygems_version: 3.4.2
236
+ rubygems_version: 3.4.19
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: Converts audio to text by applying powerful neural network models.