google-cloud-speech-v1p1beta1 0.11.0 → 0.11.1

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: 3d2d936a6d4c70c9577e5c3071cded47b5310578326e2b099c29a817e47f963f
4
- data.tar.gz: c3164937074233e529d5ec464ef7c98a5bfd2f3243f3f29fd836d74c20dee3d7
3
+ metadata.gz: c6c494ab22862d39805ed177dc3f2bbcbb3673768d7b56b00b0b752b393e40cc
4
+ data.tar.gz: 5774cafe56f7a7a64941030510ca4f529ff07d75107c41d2fc4b2bad1f011ce2
5
5
  SHA512:
6
- metadata.gz: 56a8778e17b5951a7ef6c91902ba2a9a190790e8cb45d46741ca712a4eacc5ea8954522dcbecf0772eeb7878fae5b10b7c34333ad5ec7ce6d7e984d852b3d930
7
- data.tar.gz: 6037bf2e2e1d281df5a6274ca5febbd755b8d4fd8b7d4ec1f62c6664865a1494e48d552b413c8b2541d2518151685170e446ea89f10028bb91359fe9243cbc03
6
+ metadata.gz: 8ad87b5a2ee943e592caa93aa39275c64b66a9d6952bc3a5dc5db8a8fe2f5fdc14843d30e766982f2a7f2be450980db7f2523eae77a3f1045dee5d9841c44977
7
+ data.tar.gz: 663ecfdf1bae5c988c74d33789af3fa577b6fa266ed0e8d1e32cfd7118d2bc7ef8080c38f77a559fdf78e9fd33d9c67741d712038ae70c4e1fec35f352bef3d5
@@ -185,6 +185,21 @@ module Google
185
185
  #
186
186
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
187
187
  #
188
+ # @example Basic example
189
+ # require "google/cloud/speech/v1p1beta1"
190
+ #
191
+ # # Create a client object. The client can be reused for multiple calls.
192
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
193
+ #
194
+ # # Create a request. To set request fields, pass in keyword arguments.
195
+ # request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new
196
+ #
197
+ # # Call the create_phrase_set method.
198
+ # result = client.create_phrase_set request
199
+ #
200
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet.
201
+ # p result
202
+ #
188
203
  def create_phrase_set request, options = nil
189
204
  raise ::ArgumentError, "request must be provided" if request.nil?
190
205
 
@@ -202,9 +217,11 @@ module Google
202
217
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
203
218
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
204
219
 
205
- header_params = {
206
- "parent" => request.parent
207
- }
220
+ header_params = {}
221
+ if request.parent
222
+ header_params["parent"] = request.parent
223
+ end
224
+
208
225
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
209
226
  metadata[:"x-goog-request-params"] ||= request_params_header
210
227
 
@@ -255,6 +272,21 @@ module Google
255
272
  #
256
273
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
257
274
  #
275
+ # @example Basic example
276
+ # require "google/cloud/speech/v1p1beta1"
277
+ #
278
+ # # Create a client object. The client can be reused for multiple calls.
279
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
280
+ #
281
+ # # Create a request. To set request fields, pass in keyword arguments.
282
+ # request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new
283
+ #
284
+ # # Call the get_phrase_set method.
285
+ # result = client.get_phrase_set request
286
+ #
287
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet.
288
+ # p result
289
+ #
258
290
  def get_phrase_set request, options = nil
259
291
  raise ::ArgumentError, "request must be provided" if request.nil?
260
292
 
@@ -272,9 +304,11 @@ module Google
272
304
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
273
305
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
306
 
275
- header_params = {
276
- "name" => request.name
277
- }
307
+ header_params = {}
308
+ if request.name
309
+ header_params["name"] = request.name
310
+ end
311
+
278
312
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
279
313
  metadata[:"x-goog-request-params"] ||= request_params_header
280
314
 
@@ -336,6 +370,27 @@ module Google
336
370
  #
337
371
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
338
372
  #
373
+ # @example Basic example
374
+ # require "google/cloud/speech/v1p1beta1"
375
+ #
376
+ # # Create a client object. The client can be reused for multiple calls.
377
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
378
+ #
379
+ # # Create a request. To set request fields, pass in keyword arguments.
380
+ # request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new
381
+ #
382
+ # # Call the list_phrase_set method.
383
+ # result = client.list_phrase_set request
384
+ #
385
+ # # The returned object is of type Gapic::PagedEnumerable. You can
386
+ # # iterate over all elements by calling #each, and the enumerable
387
+ # # will lazily make API calls to fetch subsequent pages. Other
388
+ # # methods are also available for managing paging directly.
389
+ # result.each do |response|
390
+ # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet.
391
+ # p response
392
+ # end
393
+ #
339
394
  def list_phrase_set request, options = nil
340
395
  raise ::ArgumentError, "request must be provided" if request.nil?
341
396
 
@@ -353,9 +408,11 @@ module Google
353
408
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
354
409
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
355
410
 
356
- header_params = {
357
- "parent" => request.parent
358
- }
411
+ header_params = {}
412
+ if request.parent
413
+ header_params["parent"] = request.parent
414
+ end
415
+
359
416
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
360
417
  metadata[:"x-goog-request-params"] ||= request_params_header
361
418
 
@@ -411,6 +468,21 @@ module Google
411
468
  #
412
469
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
413
470
  #
471
+ # @example Basic example
472
+ # require "google/cloud/speech/v1p1beta1"
473
+ #
474
+ # # Create a client object. The client can be reused for multiple calls.
475
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
476
+ #
477
+ # # Create a request. To set request fields, pass in keyword arguments.
478
+ # request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new
479
+ #
480
+ # # Call the update_phrase_set method.
481
+ # result = client.update_phrase_set request
482
+ #
483
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet.
484
+ # p result
485
+ #
414
486
  def update_phrase_set request, options = nil
415
487
  raise ::ArgumentError, "request must be provided" if request.nil?
416
488
 
@@ -428,9 +500,11 @@ module Google
428
500
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
429
501
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
430
502
 
431
- header_params = {
432
- "phrase_set.name" => request.phrase_set.name
433
- }
503
+ header_params = {}
504
+ if request.phrase_set&.name
505
+ header_params["phrase_set.name"] = request.phrase_set.name
506
+ end
507
+
434
508
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
435
509
  metadata[:"x-goog-request-params"] ||= request_params_header
436
510
 
@@ -481,6 +555,21 @@ module Google
481
555
  #
482
556
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
483
557
  #
558
+ # @example Basic example
559
+ # require "google/cloud/speech/v1p1beta1"
560
+ #
561
+ # # Create a client object. The client can be reused for multiple calls.
562
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
563
+ #
564
+ # # Create a request. To set request fields, pass in keyword arguments.
565
+ # request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new
566
+ #
567
+ # # Call the delete_phrase_set method.
568
+ # result = client.delete_phrase_set request
569
+ #
570
+ # # The returned object is of type Google::Protobuf::Empty.
571
+ # p result
572
+ #
484
573
  def delete_phrase_set request, options = nil
485
574
  raise ::ArgumentError, "request must be provided" if request.nil?
486
575
 
@@ -498,9 +587,11 @@ module Google
498
587
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
499
588
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
500
589
 
501
- header_params = {
502
- "name" => request.name
503
- }
590
+ header_params = {}
591
+ if request.name
592
+ header_params["name"] = request.name
593
+ end
594
+
504
595
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
505
596
  metadata[:"x-goog-request-params"] ||= request_params_header
506
597
 
@@ -559,6 +650,21 @@ module Google
559
650
  #
560
651
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
561
652
  #
653
+ # @example Basic example
654
+ # require "google/cloud/speech/v1p1beta1"
655
+ #
656
+ # # Create a client object. The client can be reused for multiple calls.
657
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
658
+ #
659
+ # # Create a request. To set request fields, pass in keyword arguments.
660
+ # request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new
661
+ #
662
+ # # Call the create_custom_class method.
663
+ # result = client.create_custom_class request
664
+ #
665
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass.
666
+ # p result
667
+ #
562
668
  def create_custom_class request, options = nil
563
669
  raise ::ArgumentError, "request must be provided" if request.nil?
564
670
 
@@ -576,9 +682,11 @@ module Google
576
682
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
577
683
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
578
684
 
579
- header_params = {
580
- "parent" => request.parent
581
- }
685
+ header_params = {}
686
+ if request.parent
687
+ header_params["parent"] = request.parent
688
+ end
689
+
582
690
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
583
691
  metadata[:"x-goog-request-params"] ||= request_params_header
584
692
 
@@ -629,6 +737,21 @@ module Google
629
737
  #
630
738
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
631
739
  #
740
+ # @example Basic example
741
+ # require "google/cloud/speech/v1p1beta1"
742
+ #
743
+ # # Create a client object. The client can be reused for multiple calls.
744
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
745
+ #
746
+ # # Create a request. To set request fields, pass in keyword arguments.
747
+ # request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new
748
+ #
749
+ # # Call the get_custom_class method.
750
+ # result = client.get_custom_class request
751
+ #
752
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass.
753
+ # p result
754
+ #
632
755
  def get_custom_class request, options = nil
633
756
  raise ::ArgumentError, "request must be provided" if request.nil?
634
757
 
@@ -646,9 +769,11 @@ module Google
646
769
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
647
770
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
648
771
 
649
- header_params = {
650
- "name" => request.name
651
- }
772
+ header_params = {}
773
+ if request.name
774
+ header_params["name"] = request.name
775
+ end
776
+
652
777
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
653
778
  metadata[:"x-goog-request-params"] ||= request_params_header
654
779
 
@@ -710,6 +835,27 @@ module Google
710
835
  #
711
836
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
712
837
  #
838
+ # @example Basic example
839
+ # require "google/cloud/speech/v1p1beta1"
840
+ #
841
+ # # Create a client object. The client can be reused for multiple calls.
842
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
843
+ #
844
+ # # Create a request. To set request fields, pass in keyword arguments.
845
+ # request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new
846
+ #
847
+ # # Call the list_custom_classes method.
848
+ # result = client.list_custom_classes request
849
+ #
850
+ # # The returned object is of type Gapic::PagedEnumerable. You can
851
+ # # iterate over all elements by calling #each, and the enumerable
852
+ # # will lazily make API calls to fetch subsequent pages. Other
853
+ # # methods are also available for managing paging directly.
854
+ # result.each do |response|
855
+ # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass.
856
+ # p response
857
+ # end
858
+ #
713
859
  def list_custom_classes request, options = nil
714
860
  raise ::ArgumentError, "request must be provided" if request.nil?
715
861
 
@@ -727,9 +873,11 @@ module Google
727
873
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
728
874
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
729
875
 
730
- header_params = {
731
- "parent" => request.parent
732
- }
876
+ header_params = {}
877
+ if request.parent
878
+ header_params["parent"] = request.parent
879
+ end
880
+
733
881
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
734
882
  metadata[:"x-goog-request-params"] ||= request_params_header
735
883
 
@@ -785,6 +933,21 @@ module Google
785
933
  #
786
934
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
787
935
  #
936
+ # @example Basic example
937
+ # require "google/cloud/speech/v1p1beta1"
938
+ #
939
+ # # Create a client object. The client can be reused for multiple calls.
940
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
941
+ #
942
+ # # Create a request. To set request fields, pass in keyword arguments.
943
+ # request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new
944
+ #
945
+ # # Call the update_custom_class method.
946
+ # result = client.update_custom_class request
947
+ #
948
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass.
949
+ # p result
950
+ #
788
951
  def update_custom_class request, options = nil
789
952
  raise ::ArgumentError, "request must be provided" if request.nil?
790
953
 
@@ -802,9 +965,11 @@ module Google
802
965
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
803
966
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
804
967
 
805
- header_params = {
806
- "custom_class.name" => request.custom_class.name
807
- }
968
+ header_params = {}
969
+ if request.custom_class&.name
970
+ header_params["custom_class.name"] = request.custom_class.name
971
+ end
972
+
808
973
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
809
974
  metadata[:"x-goog-request-params"] ||= request_params_header
810
975
 
@@ -855,6 +1020,21 @@ module Google
855
1020
  #
856
1021
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
857
1022
  #
1023
+ # @example Basic example
1024
+ # require "google/cloud/speech/v1p1beta1"
1025
+ #
1026
+ # # Create a client object. The client can be reused for multiple calls.
1027
+ # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new
1028
+ #
1029
+ # # Create a request. To set request fields, pass in keyword arguments.
1030
+ # request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new
1031
+ #
1032
+ # # Call the delete_custom_class method.
1033
+ # result = client.delete_custom_class request
1034
+ #
1035
+ # # The returned object is of type Google::Protobuf::Empty.
1036
+ # p result
1037
+ #
858
1038
  def delete_custom_class request, options = nil
859
1039
  raise ::ArgumentError, "request must be provided" if request.nil?
860
1040
 
@@ -872,9 +1052,11 @@ module Google
872
1052
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
873
1053
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
874
1054
 
875
- header_params = {
876
- "name" => request.name
877
- }
1055
+ header_params = {}
1056
+ if request.name
1057
+ header_params["name"] = request.name
1058
+ end
1059
+
878
1060
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
879
1061
  metadata[:"x-goog-request-params"] ||= request_params_header
880
1062
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/cloud/speech/v1p1beta1/resource_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.speech.v1p1beta1.CreatePhraseSetRequest" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service that implements Google Cloud Speech Adaptation API.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/speech/v1p1beta1/cloud_speech.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -13,6 +11,8 @@ require 'google/protobuf/duration_pb'
13
11
  require 'google/protobuf/timestamp_pb'
14
12
  require 'google/protobuf/wrappers_pb'
15
13
  require 'google/rpc/status_pb'
14
+ require 'google/protobuf'
15
+
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/cloud/speech/v1p1beta1/cloud_speech.proto", :syntax => :proto3) do
18
18
  add_message "google.cloud.speech.v1p1beta1.RecognizeRequest" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service that implements Google Cloud Speech API.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/speech/v1p1beta1/resource.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/speech/v1p1beta1/resource.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.speech.v1p1beta1.CustomClass" do
@@ -201,6 +201,21 @@ module Google
201
201
  #
202
202
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
203
203
  #
204
+ # @example Basic example
205
+ # require "google/cloud/speech/v1p1beta1"
206
+ #
207
+ # # Create a client object. The client can be reused for multiple calls.
208
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new
209
+ #
210
+ # # Create a request. To set request fields, pass in keyword arguments.
211
+ # request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new
212
+ #
213
+ # # Call the recognize method.
214
+ # result = client.recognize request
215
+ #
216
+ # # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse.
217
+ # p result
218
+ #
204
219
  def recognize request, options = nil
205
220
  raise ::ArgumentError, "request must be provided" if request.nil?
206
221
 
@@ -273,6 +288,28 @@ module Google
273
288
  #
274
289
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
275
290
  #
291
+ # @example Basic example
292
+ # require "google/cloud/speech/v1p1beta1"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new
299
+ #
300
+ # # Call the long_running_recognize method.
301
+ # result = client.long_running_recognize request
302
+ #
303
+ # # The returned object is of type Gapic::Operation. You can use this
304
+ # # object to check the status of an operation, cancel it, or wait
305
+ # # for results. Here is how to block until completion:
306
+ # result.wait_until_done! timeout: 60
307
+ # if result.response?
308
+ # p result.response
309
+ # else
310
+ # puts "Error!"
311
+ # end
312
+ #
276
313
  def long_running_recognize request, options = nil
277
314
  raise ::ArgumentError, "request must be provided" if request.nil?
278
315
 
@@ -324,6 +361,30 @@ module Google
324
361
  #
325
362
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
326
363
  #
364
+ # @example Basic example
365
+ # require "google/cloud/speech/v1p1beta1"
366
+ #
367
+ # # Create a client object. The client can be reused for multiple calls.
368
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new
369
+ #
370
+ # # Create an input stream
371
+ # input = Gapic::StreamInput.new
372
+ #
373
+ # # Call the streaming_recognize method to start streaming.
374
+ # output = client.streaming_recognize input
375
+ #
376
+ # # Send requests on the stream. For each request, pass in keyword
377
+ # # arguments to set fields. Be sure to close the stream when done.
378
+ # input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new
379
+ # input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new
380
+ # input.close
381
+ #
382
+ # # Handle streamed responses. These may be interleaved with inputs.
383
+ # # Each response is of type ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse.
384
+ # output.each do |response|
385
+ # p response
386
+ # end
387
+ #
327
388
  def streaming_recognize request, options = nil
328
389
  unless request.is_a? ::Enumerable
329
390
  raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1p1beta1
24
- VERSION = "0.11.0"
24
+ VERSION = "0.11.1"
25
25
  end
26
26
  end
27
27
  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.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-23 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common