google-cloud-video-live_stream-v1 0.5.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb +662 -1
- data/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb +10 -1
- data/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb +55 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb +933 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb +75 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb +356 -0
- data/lib/google/cloud/video/live_stream/v1/version.rb +1 -1
- data/lib/google/cloud/video/livestream/v1/resources_pb.rb +8 -1
- data/lib/google/cloud/video/livestream/v1/service_pb.rb +9 -2
- data/lib/google/cloud/video/livestream/v1/service_services_pb.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/video/livestream/v1/resources.rb +163 -5
- data/proto_docs/google/cloud/video/livestream/v1/service.rb +149 -0
- metadata +5 -5
@@ -267,6 +267,29 @@ module Google
|
|
267
267
|
# @return [::Gapic::Operation]
|
268
268
|
#
|
269
269
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
270
|
+
#
|
271
|
+
# @example Basic example
|
272
|
+
# require "google/cloud/video/live_stream/v1"
|
273
|
+
#
|
274
|
+
# # Create a client object. The client can be reused for multiple calls.
|
275
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
276
|
+
#
|
277
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
278
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new
|
279
|
+
#
|
280
|
+
# # Call the create_channel method.
|
281
|
+
# result = client.create_channel request
|
282
|
+
#
|
283
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
284
|
+
# # check the status of an operation, cancel it, or wait for results.
|
285
|
+
# # Here is how to wait for a response.
|
286
|
+
# result.wait_until_done! timeout: 60
|
287
|
+
# if result.response?
|
288
|
+
# p result.response
|
289
|
+
# else
|
290
|
+
# puts "No response received."
|
291
|
+
# end
|
292
|
+
#
|
270
293
|
def create_channel request, options = nil
|
271
294
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
295
|
|
@@ -344,6 +367,26 @@ module Google
|
|
344
367
|
# @return [::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse]
|
345
368
|
#
|
346
369
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
370
|
+
#
|
371
|
+
# @example Basic example
|
372
|
+
# require "google/cloud/video/live_stream/v1"
|
373
|
+
#
|
374
|
+
# # Create a client object. The client can be reused for multiple calls.
|
375
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
376
|
+
#
|
377
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
378
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.new
|
379
|
+
#
|
380
|
+
# # Call the list_channels method.
|
381
|
+
# result = client.list_channels request
|
382
|
+
#
|
383
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
384
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
385
|
+
# result.each do |item|
|
386
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Channel.
|
387
|
+
# p item
|
388
|
+
# end
|
389
|
+
#
|
347
390
|
def list_channels request, options = nil
|
348
391
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
349
392
|
|
@@ -407,6 +450,22 @@ module Google
|
|
407
450
|
# @return [::Google::Cloud::Video::LiveStream::V1::Channel]
|
408
451
|
#
|
409
452
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
453
|
+
#
|
454
|
+
# @example Basic example
|
455
|
+
# require "google/cloud/video/live_stream/v1"
|
456
|
+
#
|
457
|
+
# # Create a client object. The client can be reused for multiple calls.
|
458
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
459
|
+
#
|
460
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
461
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new
|
462
|
+
#
|
463
|
+
# # Call the get_channel method.
|
464
|
+
# result = client.get_channel request
|
465
|
+
#
|
466
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Channel.
|
467
|
+
# p result
|
468
|
+
#
|
410
469
|
def get_channel request, options = nil
|
411
470
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
412
471
|
|
@@ -489,6 +548,29 @@ module Google
|
|
489
548
|
# @return [::Gapic::Operation]
|
490
549
|
#
|
491
550
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
551
|
+
#
|
552
|
+
# @example Basic example
|
553
|
+
# require "google/cloud/video/live_stream/v1"
|
554
|
+
#
|
555
|
+
# # Create a client object. The client can be reused for multiple calls.
|
556
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
557
|
+
#
|
558
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
559
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.new
|
560
|
+
#
|
561
|
+
# # Call the delete_channel method.
|
562
|
+
# result = client.delete_channel request
|
563
|
+
#
|
564
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
565
|
+
# # check the status of an operation, cancel it, or wait for results.
|
566
|
+
# # Here is how to wait for a response.
|
567
|
+
# result.wait_until_done! timeout: 60
|
568
|
+
# if result.response?
|
569
|
+
# p result.response
|
570
|
+
# else
|
571
|
+
# puts "No response received."
|
572
|
+
# end
|
573
|
+
#
|
492
574
|
def delete_channel request, options = nil
|
493
575
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
494
576
|
|
@@ -587,6 +669,29 @@ module Google
|
|
587
669
|
# @return [::Gapic::Operation]
|
588
670
|
#
|
589
671
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
672
|
+
#
|
673
|
+
# @example Basic example
|
674
|
+
# require "google/cloud/video/live_stream/v1"
|
675
|
+
#
|
676
|
+
# # Create a client object. The client can be reused for multiple calls.
|
677
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
678
|
+
#
|
679
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
680
|
+
# request = Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new
|
681
|
+
#
|
682
|
+
# # Call the update_channel method.
|
683
|
+
# result = client.update_channel request
|
684
|
+
#
|
685
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
686
|
+
# # check the status of an operation, cancel it, or wait for results.
|
687
|
+
# # Here is how to wait for a response.
|
688
|
+
# result.wait_until_done! timeout: 60
|
689
|
+
# if result.response?
|
690
|
+
# p result.response
|
691
|
+
# else
|
692
|
+
# puts "No response received."
|
693
|
+
# end
|
694
|
+
#
|
590
695
|
def update_channel request, options = nil
|
591
696
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
592
697
|
|
@@ -666,6 +771,29 @@ module Google
|
|
666
771
|
# @return [::Gapic::Operation]
|
667
772
|
#
|
668
773
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
774
|
+
#
|
775
|
+
# @example Basic example
|
776
|
+
# require "google/cloud/video/live_stream/v1"
|
777
|
+
#
|
778
|
+
# # Create a client object. The client can be reused for multiple calls.
|
779
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
780
|
+
#
|
781
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
782
|
+
# request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new
|
783
|
+
#
|
784
|
+
# # Call the start_channel method.
|
785
|
+
# result = client.start_channel request
|
786
|
+
#
|
787
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
788
|
+
# # check the status of an operation, cancel it, or wait for results.
|
789
|
+
# # Here is how to wait for a response.
|
790
|
+
# result.wait_until_done! timeout: 60
|
791
|
+
# if result.response?
|
792
|
+
# p result.response
|
793
|
+
# else
|
794
|
+
# puts "No response received."
|
795
|
+
# end
|
796
|
+
#
|
669
797
|
def start_channel request, options = nil
|
670
798
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
671
799
|
|
@@ -745,6 +873,29 @@ module Google
|
|
745
873
|
# @return [::Gapic::Operation]
|
746
874
|
#
|
747
875
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
876
|
+
#
|
877
|
+
# @example Basic example
|
878
|
+
# require "google/cloud/video/live_stream/v1"
|
879
|
+
#
|
880
|
+
# # Create a client object. The client can be reused for multiple calls.
|
881
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
882
|
+
#
|
883
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
884
|
+
# request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new
|
885
|
+
#
|
886
|
+
# # Call the stop_channel method.
|
887
|
+
# result = client.stop_channel request
|
888
|
+
#
|
889
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
890
|
+
# # check the status of an operation, cancel it, or wait for results.
|
891
|
+
# # Here is how to wait for a response.
|
892
|
+
# result.wait_until_done! timeout: 60
|
893
|
+
# if result.response?
|
894
|
+
# p result.response
|
895
|
+
# else
|
896
|
+
# puts "No response received."
|
897
|
+
# end
|
898
|
+
#
|
748
899
|
def stop_channel request, options = nil
|
749
900
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
750
901
|
|
@@ -829,6 +980,29 @@ module Google
|
|
829
980
|
# @return [::Gapic::Operation]
|
830
981
|
#
|
831
982
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
983
|
+
#
|
984
|
+
# @example Basic example
|
985
|
+
# require "google/cloud/video/live_stream/v1"
|
986
|
+
#
|
987
|
+
# # Create a client object. The client can be reused for multiple calls.
|
988
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
989
|
+
#
|
990
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
991
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new
|
992
|
+
#
|
993
|
+
# # Call the create_input method.
|
994
|
+
# result = client.create_input request
|
995
|
+
#
|
996
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
997
|
+
# # check the status of an operation, cancel it, or wait for results.
|
998
|
+
# # Here is how to wait for a response.
|
999
|
+
# result.wait_until_done! timeout: 60
|
1000
|
+
# if result.response?
|
1001
|
+
# p result.response
|
1002
|
+
# else
|
1003
|
+
# puts "No response received."
|
1004
|
+
# end
|
1005
|
+
#
|
832
1006
|
def create_input request, options = nil
|
833
1007
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
834
1008
|
|
@@ -906,6 +1080,26 @@ module Google
|
|
906
1080
|
# @return [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse]
|
907
1081
|
#
|
908
1082
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1083
|
+
#
|
1084
|
+
# @example Basic example
|
1085
|
+
# require "google/cloud/video/live_stream/v1"
|
1086
|
+
#
|
1087
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1088
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1089
|
+
#
|
1090
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1091
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new
|
1092
|
+
#
|
1093
|
+
# # Call the list_inputs method.
|
1094
|
+
# result = client.list_inputs request
|
1095
|
+
#
|
1096
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1097
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1098
|
+
# result.each do |item|
|
1099
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input.
|
1100
|
+
# p item
|
1101
|
+
# end
|
1102
|
+
#
|
909
1103
|
def list_inputs request, options = nil
|
910
1104
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
911
1105
|
|
@@ -969,6 +1163,22 @@ module Google
|
|
969
1163
|
# @return [::Google::Cloud::Video::LiveStream::V1::Input]
|
970
1164
|
#
|
971
1165
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1166
|
+
#
|
1167
|
+
# @example Basic example
|
1168
|
+
# require "google/cloud/video/live_stream/v1"
|
1169
|
+
#
|
1170
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1171
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1172
|
+
#
|
1173
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1174
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new
|
1175
|
+
#
|
1176
|
+
# # Call the get_input method.
|
1177
|
+
# result = client.get_input request
|
1178
|
+
#
|
1179
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input.
|
1180
|
+
# p result
|
1181
|
+
#
|
972
1182
|
def get_input request, options = nil
|
973
1183
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
974
1184
|
|
@@ -1046,6 +1256,29 @@ module Google
|
|
1046
1256
|
# @return [::Gapic::Operation]
|
1047
1257
|
#
|
1048
1258
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1259
|
+
#
|
1260
|
+
# @example Basic example
|
1261
|
+
# require "google/cloud/video/live_stream/v1"
|
1262
|
+
#
|
1263
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1264
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1265
|
+
#
|
1266
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1267
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new
|
1268
|
+
#
|
1269
|
+
# # Call the delete_input method.
|
1270
|
+
# result = client.delete_input request
|
1271
|
+
#
|
1272
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1273
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1274
|
+
# # Here is how to wait for a response.
|
1275
|
+
# result.wait_until_done! timeout: 60
|
1276
|
+
# if result.response?
|
1277
|
+
# p result.response
|
1278
|
+
# else
|
1279
|
+
# puts "No response received."
|
1280
|
+
# end
|
1281
|
+
#
|
1049
1282
|
def delete_input request, options = nil
|
1050
1283
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1051
1284
|
|
@@ -1136,6 +1369,29 @@ module Google
|
|
1136
1369
|
# @return [::Gapic::Operation]
|
1137
1370
|
#
|
1138
1371
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1372
|
+
#
|
1373
|
+
# @example Basic example
|
1374
|
+
# require "google/cloud/video/live_stream/v1"
|
1375
|
+
#
|
1376
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1377
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1378
|
+
#
|
1379
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1380
|
+
# request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new
|
1381
|
+
#
|
1382
|
+
# # Call the update_input method.
|
1383
|
+
# result = client.update_input request
|
1384
|
+
#
|
1385
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1386
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1387
|
+
# # Here is how to wait for a response.
|
1388
|
+
# result.wait_until_done! timeout: 60
|
1389
|
+
# if result.response?
|
1390
|
+
# p result.response
|
1391
|
+
# else
|
1392
|
+
# puts "No response received."
|
1393
|
+
# end
|
1394
|
+
#
|
1139
1395
|
def update_input request, options = nil
|
1140
1396
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1141
1397
|
|
@@ -1220,6 +1476,22 @@ module Google
|
|
1220
1476
|
# @return [::Google::Cloud::Video::LiveStream::V1::Event]
|
1221
1477
|
#
|
1222
1478
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1479
|
+
#
|
1480
|
+
# @example Basic example
|
1481
|
+
# require "google/cloud/video/live_stream/v1"
|
1482
|
+
#
|
1483
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1484
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1485
|
+
#
|
1486
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1487
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new
|
1488
|
+
#
|
1489
|
+
# # Call the create_event method.
|
1490
|
+
# result = client.create_event request
|
1491
|
+
#
|
1492
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event.
|
1493
|
+
# p result
|
1494
|
+
#
|
1223
1495
|
def create_event request, options = nil
|
1224
1496
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1225
1497
|
|
@@ -1296,6 +1568,26 @@ module Google
|
|
1296
1568
|
# @return [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse]
|
1297
1569
|
#
|
1298
1570
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1571
|
+
#
|
1572
|
+
# @example Basic example
|
1573
|
+
# require "google/cloud/video/live_stream/v1"
|
1574
|
+
#
|
1575
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1576
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1577
|
+
#
|
1578
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1579
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new
|
1580
|
+
#
|
1581
|
+
# # Call the list_events method.
|
1582
|
+
# result = client.list_events request
|
1583
|
+
#
|
1584
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1585
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1586
|
+
# result.each do |item|
|
1587
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event.
|
1588
|
+
# p item
|
1589
|
+
# end
|
1590
|
+
#
|
1299
1591
|
def list_events request, options = nil
|
1300
1592
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1301
1593
|
|
@@ -1359,6 +1651,22 @@ module Google
|
|
1359
1651
|
# @return [::Google::Cloud::Video::LiveStream::V1::Event]
|
1360
1652
|
#
|
1361
1653
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1654
|
+
#
|
1655
|
+
# @example Basic example
|
1656
|
+
# require "google/cloud/video/live_stream/v1"
|
1657
|
+
#
|
1658
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1659
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1660
|
+
#
|
1661
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1662
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new
|
1663
|
+
#
|
1664
|
+
# # Call the get_event method.
|
1665
|
+
# result = client.get_event request
|
1666
|
+
#
|
1667
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event.
|
1668
|
+
# p result
|
1669
|
+
#
|
1362
1670
|
def get_event request, options = nil
|
1363
1671
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1364
1672
|
|
@@ -1436,6 +1744,22 @@ module Google
|
|
1436
1744
|
# @return [::Google::Protobuf::Empty]
|
1437
1745
|
#
|
1438
1746
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1747
|
+
#
|
1748
|
+
# @example Basic example
|
1749
|
+
# require "google/cloud/video/live_stream/v1"
|
1750
|
+
#
|
1751
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1752
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1753
|
+
#
|
1754
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1755
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new
|
1756
|
+
#
|
1757
|
+
# # Call the delete_event method.
|
1758
|
+
# result = client.delete_event request
|
1759
|
+
#
|
1760
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1761
|
+
# p result
|
1762
|
+
#
|
1439
1763
|
def delete_event request, options = nil
|
1440
1764
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1441
1765
|
|
@@ -1471,6 +1795,573 @@ module Google
|
|
1471
1795
|
raise ::Google::Cloud::Error.from_error(e)
|
1472
1796
|
end
|
1473
1797
|
|
1798
|
+
##
|
1799
|
+
# Creates a Asset with the provided unique ID in the specified
|
1800
|
+
# region.
|
1801
|
+
#
|
1802
|
+
# @overload create_asset(request, options = nil)
|
1803
|
+
# Pass arguments to `create_asset` via a request object, either of type
|
1804
|
+
# {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash.
|
1805
|
+
#
|
1806
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash]
|
1807
|
+
# A request object representing the call parameters. Required. To specify no
|
1808
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1809
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1810
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1811
|
+
#
|
1812
|
+
# @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil)
|
1813
|
+
# Pass arguments to `create_asset` via keyword arguments. Note that at
|
1814
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1815
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1816
|
+
#
|
1817
|
+
# @param parent [::String]
|
1818
|
+
# Required. The parent location for the resource, in the form of:
|
1819
|
+
# `projects/{project}/locations/{location}`.
|
1820
|
+
# @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash]
|
1821
|
+
# Required. The asset resource to be created.
|
1822
|
+
# @param asset_id [::String]
|
1823
|
+
# Required. The ID of the asset resource to be created.
|
1824
|
+
# This value must be 1-63 characters, begin and end with `[a-z0-9]`,
|
1825
|
+
# could contain dashes (-) in between.
|
1826
|
+
# @param request_id [::String]
|
1827
|
+
# A request ID to identify requests. Specify a unique request ID
|
1828
|
+
# so that if you must retry your request, the server will know to ignore
|
1829
|
+
# the request if it has already been completed. The server will guarantee
|
1830
|
+
# that for at least 60 minutes since the first request.
|
1831
|
+
#
|
1832
|
+
# For example, consider a situation where you make an initial request and the
|
1833
|
+
# request times out. If you make the request again with the same request ID,
|
1834
|
+
# the server can check if original operation with the same request ID was
|
1835
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1836
|
+
# from accidentally creating duplicate commitments.
|
1837
|
+
#
|
1838
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1839
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1840
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1841
|
+
# @yieldparam result [::Gapic::Operation]
|
1842
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1843
|
+
#
|
1844
|
+
# @return [::Gapic::Operation]
|
1845
|
+
#
|
1846
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1847
|
+
#
|
1848
|
+
# @example Basic example
|
1849
|
+
# require "google/cloud/video/live_stream/v1"
|
1850
|
+
#
|
1851
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1852
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1853
|
+
#
|
1854
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1855
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new
|
1856
|
+
#
|
1857
|
+
# # Call the create_asset method.
|
1858
|
+
# result = client.create_asset request
|
1859
|
+
#
|
1860
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1861
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1862
|
+
# # Here is how to wait for a response.
|
1863
|
+
# result.wait_until_done! timeout: 60
|
1864
|
+
# if result.response?
|
1865
|
+
# p result.response
|
1866
|
+
# else
|
1867
|
+
# puts "No response received."
|
1868
|
+
# end
|
1869
|
+
#
|
1870
|
+
def create_asset request, options = nil
|
1871
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1872
|
+
|
1873
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest
|
1874
|
+
|
1875
|
+
# Converts hash and nil to an options object
|
1876
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1877
|
+
|
1878
|
+
# Customize the options with defaults
|
1879
|
+
call_metadata = @config.rpcs.create_asset.metadata.to_h
|
1880
|
+
|
1881
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1882
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1883
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1884
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1885
|
+
transports_version_send: [:rest]
|
1886
|
+
|
1887
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1888
|
+
|
1889
|
+
options.apply_defaults timeout: @config.rpcs.create_asset.timeout,
|
1890
|
+
metadata: call_metadata,
|
1891
|
+
retry_policy: @config.rpcs.create_asset.retry_policy
|
1892
|
+
|
1893
|
+
options.apply_defaults timeout: @config.timeout,
|
1894
|
+
metadata: @config.metadata,
|
1895
|
+
retry_policy: @config.retry_policy
|
1896
|
+
|
1897
|
+
@livestream_service_stub.create_asset request, options do |result, operation|
|
1898
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1899
|
+
yield result, operation if block_given?
|
1900
|
+
return result
|
1901
|
+
end
|
1902
|
+
rescue ::Gapic::Rest::Error => e
|
1903
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1904
|
+
end
|
1905
|
+
|
1906
|
+
##
|
1907
|
+
# Deletes the specified asset if it is not used.
|
1908
|
+
#
|
1909
|
+
# @overload delete_asset(request, options = nil)
|
1910
|
+
# Pass arguments to `delete_asset` via a request object, either of type
|
1911
|
+
# {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash.
|
1912
|
+
#
|
1913
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash]
|
1914
|
+
# A request object representing the call parameters. Required. To specify no
|
1915
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1916
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1917
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1918
|
+
#
|
1919
|
+
# @overload delete_asset(name: nil, request_id: nil)
|
1920
|
+
# Pass arguments to `delete_asset` via keyword arguments. Note that at
|
1921
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1922
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1923
|
+
#
|
1924
|
+
# @param name [::String]
|
1925
|
+
# Required. The name of the asset resource, in the form of:
|
1926
|
+
# `projects/{project}/locations/{location}/assets/{assetId}`.
|
1927
|
+
# @param request_id [::String]
|
1928
|
+
# A request ID to identify requests. Specify a unique request ID
|
1929
|
+
# so that if you must retry your request, the server will know to ignore
|
1930
|
+
# the request if it has already been completed. The server will guarantee
|
1931
|
+
# that for at least 60 minutes after the first request.
|
1932
|
+
#
|
1933
|
+
# For example, consider a situation where you make an initial request and the
|
1934
|
+
# request times out. If you make the request again with the same request ID,
|
1935
|
+
# the server can check if original operation with the same request ID was
|
1936
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1937
|
+
# from accidentally creating duplicate commitments.
|
1938
|
+
#
|
1939
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1940
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1941
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1942
|
+
# @yieldparam result [::Gapic::Operation]
|
1943
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1944
|
+
#
|
1945
|
+
# @return [::Gapic::Operation]
|
1946
|
+
#
|
1947
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1948
|
+
#
|
1949
|
+
# @example Basic example
|
1950
|
+
# require "google/cloud/video/live_stream/v1"
|
1951
|
+
#
|
1952
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1953
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
1954
|
+
#
|
1955
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1956
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new
|
1957
|
+
#
|
1958
|
+
# # Call the delete_asset method.
|
1959
|
+
# result = client.delete_asset request
|
1960
|
+
#
|
1961
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1962
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1963
|
+
# # Here is how to wait for a response.
|
1964
|
+
# result.wait_until_done! timeout: 60
|
1965
|
+
# if result.response?
|
1966
|
+
# p result.response
|
1967
|
+
# else
|
1968
|
+
# puts "No response received."
|
1969
|
+
# end
|
1970
|
+
#
|
1971
|
+
def delete_asset request, options = nil
|
1972
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1973
|
+
|
1974
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest
|
1975
|
+
|
1976
|
+
# Converts hash and nil to an options object
|
1977
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1978
|
+
|
1979
|
+
# Customize the options with defaults
|
1980
|
+
call_metadata = @config.rpcs.delete_asset.metadata.to_h
|
1981
|
+
|
1982
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1983
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1984
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1985
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1986
|
+
transports_version_send: [:rest]
|
1987
|
+
|
1988
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1989
|
+
|
1990
|
+
options.apply_defaults timeout: @config.rpcs.delete_asset.timeout,
|
1991
|
+
metadata: call_metadata,
|
1992
|
+
retry_policy: @config.rpcs.delete_asset.retry_policy
|
1993
|
+
|
1994
|
+
options.apply_defaults timeout: @config.timeout,
|
1995
|
+
metadata: @config.metadata,
|
1996
|
+
retry_policy: @config.retry_policy
|
1997
|
+
|
1998
|
+
@livestream_service_stub.delete_asset request, options do |result, operation|
|
1999
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2000
|
+
yield result, operation if block_given?
|
2001
|
+
return result
|
2002
|
+
end
|
2003
|
+
rescue ::Gapic::Rest::Error => e
|
2004
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2005
|
+
end
|
2006
|
+
|
2007
|
+
##
|
2008
|
+
# Returns the specified asset.
|
2009
|
+
#
|
2010
|
+
# @overload get_asset(request, options = nil)
|
2011
|
+
# Pass arguments to `get_asset` via a request object, either of type
|
2012
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash.
|
2013
|
+
#
|
2014
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash]
|
2015
|
+
# A request object representing the call parameters. Required. To specify no
|
2016
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2017
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2018
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2019
|
+
#
|
2020
|
+
# @overload get_asset(name: nil)
|
2021
|
+
# Pass arguments to `get_asset` via keyword arguments. Note that at
|
2022
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2023
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2024
|
+
#
|
2025
|
+
# @param name [::String]
|
2026
|
+
# Required. Name of the resource, in the following form:
|
2027
|
+
# `projects/{project}/locations/{location}/assets/{asset}`.
|
2028
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2029
|
+
# @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Asset]
|
2030
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2031
|
+
#
|
2032
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Asset]
|
2033
|
+
#
|
2034
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2035
|
+
#
|
2036
|
+
# @example Basic example
|
2037
|
+
# require "google/cloud/video/live_stream/v1"
|
2038
|
+
#
|
2039
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2040
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
2041
|
+
#
|
2042
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2043
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new
|
2044
|
+
#
|
2045
|
+
# # Call the get_asset method.
|
2046
|
+
# result = client.get_asset request
|
2047
|
+
#
|
2048
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset.
|
2049
|
+
# p result
|
2050
|
+
#
|
2051
|
+
def get_asset request, options = nil
|
2052
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2053
|
+
|
2054
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest
|
2055
|
+
|
2056
|
+
# Converts hash and nil to an options object
|
2057
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2058
|
+
|
2059
|
+
# Customize the options with defaults
|
2060
|
+
call_metadata = @config.rpcs.get_asset.metadata.to_h
|
2061
|
+
|
2062
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2063
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2064
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2065
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
2066
|
+
transports_version_send: [:rest]
|
2067
|
+
|
2068
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2069
|
+
|
2070
|
+
options.apply_defaults timeout: @config.rpcs.get_asset.timeout,
|
2071
|
+
metadata: call_metadata,
|
2072
|
+
retry_policy: @config.rpcs.get_asset.retry_policy
|
2073
|
+
|
2074
|
+
options.apply_defaults timeout: @config.timeout,
|
2075
|
+
metadata: @config.metadata,
|
2076
|
+
retry_policy: @config.retry_policy
|
2077
|
+
|
2078
|
+
@livestream_service_stub.get_asset request, options do |result, operation|
|
2079
|
+
yield result, operation if block_given?
|
2080
|
+
return result
|
2081
|
+
end
|
2082
|
+
rescue ::Gapic::Rest::Error => e
|
2083
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2084
|
+
end
|
2085
|
+
|
2086
|
+
##
|
2087
|
+
# Returns a list of all assets in the specified region.
|
2088
|
+
#
|
2089
|
+
# @overload list_assets(request, options = nil)
|
2090
|
+
# Pass arguments to `list_assets` via a request object, either of type
|
2091
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash.
|
2092
|
+
#
|
2093
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash]
|
2094
|
+
# A request object representing the call parameters. Required. To specify no
|
2095
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2096
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2097
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2098
|
+
#
|
2099
|
+
# @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2100
|
+
# Pass arguments to `list_assets` via keyword arguments. Note that at
|
2101
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2102
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2103
|
+
#
|
2104
|
+
# @param parent [::String]
|
2105
|
+
# Required. The parent location for the resource, in the form of:
|
2106
|
+
# `projects/{project}/locations/{location}`.
|
2107
|
+
# @param page_size [::Integer]
|
2108
|
+
# Requested page size. Server may return fewer items than requested.
|
2109
|
+
# If unspecified, server will pick an appropriate default.
|
2110
|
+
# @param page_token [::String]
|
2111
|
+
# A token identifying a page of results the server should return.
|
2112
|
+
# @param filter [::String]
|
2113
|
+
# Filtering results
|
2114
|
+
# @param order_by [::String]
|
2115
|
+
# Hint for how to order the results
|
2116
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2117
|
+
# @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse]
|
2118
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2119
|
+
#
|
2120
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse]
|
2121
|
+
#
|
2122
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2123
|
+
#
|
2124
|
+
# @example Basic example
|
2125
|
+
# require "google/cloud/video/live_stream/v1"
|
2126
|
+
#
|
2127
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2128
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
2129
|
+
#
|
2130
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2131
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new
|
2132
|
+
#
|
2133
|
+
# # Call the list_assets method.
|
2134
|
+
# result = client.list_assets request
|
2135
|
+
#
|
2136
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2137
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2138
|
+
# result.each do |item|
|
2139
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset.
|
2140
|
+
# p item
|
2141
|
+
# end
|
2142
|
+
#
|
2143
|
+
def list_assets request, options = nil
|
2144
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2145
|
+
|
2146
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest
|
2147
|
+
|
2148
|
+
# Converts hash and nil to an options object
|
2149
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2150
|
+
|
2151
|
+
# Customize the options with defaults
|
2152
|
+
call_metadata = @config.rpcs.list_assets.metadata.to_h
|
2153
|
+
|
2154
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2155
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2156
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2157
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
2158
|
+
transports_version_send: [:rest]
|
2159
|
+
|
2160
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2161
|
+
|
2162
|
+
options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
|
2163
|
+
metadata: call_metadata,
|
2164
|
+
retry_policy: @config.rpcs.list_assets.retry_policy
|
2165
|
+
|
2166
|
+
options.apply_defaults timeout: @config.timeout,
|
2167
|
+
metadata: @config.metadata,
|
2168
|
+
retry_policy: @config.retry_policy
|
2169
|
+
|
2170
|
+
@livestream_service_stub.list_assets request, options do |result, operation|
|
2171
|
+
yield result, operation if block_given?
|
2172
|
+
return result
|
2173
|
+
end
|
2174
|
+
rescue ::Gapic::Rest::Error => e
|
2175
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2176
|
+
end
|
2177
|
+
|
2178
|
+
##
|
2179
|
+
# Returns the specified pool.
|
2180
|
+
#
|
2181
|
+
# @overload get_pool(request, options = nil)
|
2182
|
+
# Pass arguments to `get_pool` via a request object, either of type
|
2183
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash.
|
2184
|
+
#
|
2185
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash]
|
2186
|
+
# A request object representing the call parameters. Required. To specify no
|
2187
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2188
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2189
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2190
|
+
#
|
2191
|
+
# @overload get_pool(name: nil)
|
2192
|
+
# Pass arguments to `get_pool` via keyword arguments. Note that at
|
2193
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2194
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2195
|
+
#
|
2196
|
+
# @param name [::String]
|
2197
|
+
# Required. The name of the pool resource, in the form of:
|
2198
|
+
# `projects/{project}/locations/{location}/pools/{poolId}`.
|
2199
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2200
|
+
# @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Pool]
|
2201
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2202
|
+
#
|
2203
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Pool]
|
2204
|
+
#
|
2205
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2206
|
+
#
|
2207
|
+
# @example Basic example
|
2208
|
+
# require "google/cloud/video/live_stream/v1"
|
2209
|
+
#
|
2210
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2211
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
2212
|
+
#
|
2213
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2214
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new
|
2215
|
+
#
|
2216
|
+
# # Call the get_pool method.
|
2217
|
+
# result = client.get_pool request
|
2218
|
+
#
|
2219
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool.
|
2220
|
+
# p result
|
2221
|
+
#
|
2222
|
+
def get_pool request, options = nil
|
2223
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2224
|
+
|
2225
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest
|
2226
|
+
|
2227
|
+
# Converts hash and nil to an options object
|
2228
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2229
|
+
|
2230
|
+
# Customize the options with defaults
|
2231
|
+
call_metadata = @config.rpcs.get_pool.metadata.to_h
|
2232
|
+
|
2233
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2234
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2235
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2236
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
2237
|
+
transports_version_send: [:rest]
|
2238
|
+
|
2239
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2240
|
+
|
2241
|
+
options.apply_defaults timeout: @config.rpcs.get_pool.timeout,
|
2242
|
+
metadata: call_metadata,
|
2243
|
+
retry_policy: @config.rpcs.get_pool.retry_policy
|
2244
|
+
|
2245
|
+
options.apply_defaults timeout: @config.timeout,
|
2246
|
+
metadata: @config.metadata,
|
2247
|
+
retry_policy: @config.retry_policy
|
2248
|
+
|
2249
|
+
@livestream_service_stub.get_pool request, options do |result, operation|
|
2250
|
+
yield result, operation if block_given?
|
2251
|
+
return result
|
2252
|
+
end
|
2253
|
+
rescue ::Gapic::Rest::Error => e
|
2254
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2255
|
+
end
|
2256
|
+
|
2257
|
+
##
|
2258
|
+
# Updates the specified pool.
|
2259
|
+
#
|
2260
|
+
# @overload update_pool(request, options = nil)
|
2261
|
+
# Pass arguments to `update_pool` via a request object, either of type
|
2262
|
+
# {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash.
|
2263
|
+
#
|
2264
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash]
|
2265
|
+
# A request object representing the call parameters. Required. To specify no
|
2266
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2267
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2268
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2269
|
+
#
|
2270
|
+
# @overload update_pool(update_mask: nil, pool: nil, request_id: nil)
|
2271
|
+
# Pass arguments to `update_pool` via keyword arguments. Note that at
|
2272
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2273
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2274
|
+
#
|
2275
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2276
|
+
# Field mask is used to specify the fields to be overwritten in the Pool
|
2277
|
+
# resource by the update. You can only update the following fields:
|
2278
|
+
#
|
2279
|
+
# * `networkConfig`
|
2280
|
+
#
|
2281
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2282
|
+
# the full request. A field will be overwritten if it is in the mask.
|
2283
|
+
# @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash]
|
2284
|
+
# Required. The pool resource to be updated.
|
2285
|
+
# @param request_id [::String]
|
2286
|
+
# A request ID to identify requests. Specify a unique request ID
|
2287
|
+
# so that if you must retry your request, the server will know to ignore
|
2288
|
+
# the request if it has already been completed. The server will guarantee
|
2289
|
+
# that for at least 60 minutes since the first request.
|
2290
|
+
#
|
2291
|
+
# For example, consider a situation where you make an initial request and the
|
2292
|
+
# request times out. If you make the request again with the same request ID,
|
2293
|
+
# the server can check if original operation with the same request ID was
|
2294
|
+
# received, and if so, will ignore the second request. This prevents clients
|
2295
|
+
# from accidentally creating duplicate commitments.
|
2296
|
+
#
|
2297
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2298
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
2299
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2300
|
+
# @yieldparam result [::Gapic::Operation]
|
2301
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2302
|
+
#
|
2303
|
+
# @return [::Gapic::Operation]
|
2304
|
+
#
|
2305
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2306
|
+
#
|
2307
|
+
# @example Basic example
|
2308
|
+
# require "google/cloud/video/live_stream/v1"
|
2309
|
+
#
|
2310
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2311
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
|
2312
|
+
#
|
2313
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2314
|
+
# request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new
|
2315
|
+
#
|
2316
|
+
# # Call the update_pool method.
|
2317
|
+
# result = client.update_pool request
|
2318
|
+
#
|
2319
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2320
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2321
|
+
# # Here is how to wait for a response.
|
2322
|
+
# result.wait_until_done! timeout: 60
|
2323
|
+
# if result.response?
|
2324
|
+
# p result.response
|
2325
|
+
# else
|
2326
|
+
# puts "No response received."
|
2327
|
+
# end
|
2328
|
+
#
|
2329
|
+
def update_pool request, options = nil
|
2330
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2331
|
+
|
2332
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest
|
2333
|
+
|
2334
|
+
# Converts hash and nil to an options object
|
2335
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2336
|
+
|
2337
|
+
# Customize the options with defaults
|
2338
|
+
call_metadata = @config.rpcs.update_pool.metadata.to_h
|
2339
|
+
|
2340
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2341
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2342
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2343
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
2344
|
+
transports_version_send: [:rest]
|
2345
|
+
|
2346
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2347
|
+
|
2348
|
+
options.apply_defaults timeout: @config.rpcs.update_pool.timeout,
|
2349
|
+
metadata: call_metadata,
|
2350
|
+
retry_policy: @config.rpcs.update_pool.retry_policy
|
2351
|
+
|
2352
|
+
options.apply_defaults timeout: @config.timeout,
|
2353
|
+
metadata: @config.metadata,
|
2354
|
+
retry_policy: @config.retry_policy
|
2355
|
+
|
2356
|
+
@livestream_service_stub.update_pool request, options do |result, operation|
|
2357
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2358
|
+
yield result, operation if block_given?
|
2359
|
+
return result
|
2360
|
+
end
|
2361
|
+
rescue ::Gapic::Rest::Error => e
|
2362
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2363
|
+
end
|
2364
|
+
|
1474
2365
|
##
|
1475
2366
|
# Configuration class for the LivestreamService REST API.
|
1476
2367
|
#
|
@@ -1683,6 +2574,36 @@ module Google
|
|
1683
2574
|
# @return [::Gapic::Config::Method]
|
1684
2575
|
#
|
1685
2576
|
attr_reader :delete_event
|
2577
|
+
##
|
2578
|
+
# RPC-specific configuration for `create_asset`
|
2579
|
+
# @return [::Gapic::Config::Method]
|
2580
|
+
#
|
2581
|
+
attr_reader :create_asset
|
2582
|
+
##
|
2583
|
+
# RPC-specific configuration for `delete_asset`
|
2584
|
+
# @return [::Gapic::Config::Method]
|
2585
|
+
#
|
2586
|
+
attr_reader :delete_asset
|
2587
|
+
##
|
2588
|
+
# RPC-specific configuration for `get_asset`
|
2589
|
+
# @return [::Gapic::Config::Method]
|
2590
|
+
#
|
2591
|
+
attr_reader :get_asset
|
2592
|
+
##
|
2593
|
+
# RPC-specific configuration for `list_assets`
|
2594
|
+
# @return [::Gapic::Config::Method]
|
2595
|
+
#
|
2596
|
+
attr_reader :list_assets
|
2597
|
+
##
|
2598
|
+
# RPC-specific configuration for `get_pool`
|
2599
|
+
# @return [::Gapic::Config::Method]
|
2600
|
+
#
|
2601
|
+
attr_reader :get_pool
|
2602
|
+
##
|
2603
|
+
# RPC-specific configuration for `update_pool`
|
2604
|
+
# @return [::Gapic::Config::Method]
|
2605
|
+
#
|
2606
|
+
attr_reader :update_pool
|
1686
2607
|
|
1687
2608
|
# @private
|
1688
2609
|
def initialize parent_rpcs = nil
|
@@ -1718,6 +2639,18 @@ module Google
|
|
1718
2639
|
@get_event = ::Gapic::Config::Method.new get_event_config
|
1719
2640
|
delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event
|
1720
2641
|
@delete_event = ::Gapic::Config::Method.new delete_event_config
|
2642
|
+
create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
|
2643
|
+
@create_asset = ::Gapic::Config::Method.new create_asset_config
|
2644
|
+
delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset
|
2645
|
+
@delete_asset = ::Gapic::Config::Method.new delete_asset_config
|
2646
|
+
get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset
|
2647
|
+
@get_asset = ::Gapic::Config::Method.new get_asset_config
|
2648
|
+
list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
|
2649
|
+
@list_assets = ::Gapic::Config::Method.new list_assets_config
|
2650
|
+
get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool
|
2651
|
+
@get_pool = ::Gapic::Config::Method.new get_pool_config
|
2652
|
+
update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool
|
2653
|
+
@update_pool = ::Gapic::Config::Method.new update_pool_config
|
1721
2654
|
|
1722
2655
|
yield self if block_given?
|
1723
2656
|
end
|