@@ -238,9 +238,9 @@ async def create_channel(
238
238
239
239
from google.cloud.video import live_stream_v1
240
240
241
- def sample_create_channel():
241
+ async def sample_create_channel():
242
242
# Create a client
243
- client = live_stream_v1.LivestreamServiceClient ()
243
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
244
244
245
245
# Initialize request argument(s)
246
246
request = live_stream_v1.CreateChannelRequest(
@@ -253,7 +253,7 @@ def sample_create_channel():
253
253
254
254
print("Waiting for operation to complete...")
255
255
256
- response = operation.result()
256
+ response = await operation.result()
257
257
258
258
# Handle the response
259
259
print(response)
@@ -372,9 +372,9 @@ async def list_channels(
372
372
373
373
from google.cloud.video import live_stream_v1
374
374
375
- def sample_list_channels():
375
+ async def sample_list_channels():
376
376
# Create a client
377
- client = live_stream_v1.LivestreamServiceClient ()
377
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
378
378
379
379
# Initialize request argument(s)
380
380
request = live_stream_v1.ListChannelsRequest(
@@ -385,7 +385,7 @@ def sample_list_channels():
385
385
page_result = client.list_channels(request=request)
386
386
387
387
# Handle the response
388
- for response in page_result:
388
+ async for response in page_result:
389
389
print(response)
390
390
391
391
Args:
@@ -489,17 +489,17 @@ async def get_channel(
489
489
490
490
from google.cloud.video import live_stream_v1
491
491
492
- def sample_get_channel():
492
+ async def sample_get_channel():
493
493
# Create a client
494
- client = live_stream_v1.LivestreamServiceClient ()
494
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
495
495
496
496
# Initialize request argument(s)
497
497
request = live_stream_v1.GetChannelRequest(
498
498
name="name_value",
499
499
)
500
500
501
501
# Make the request
502
- response = client.get_channel(request=request)
502
+ response = await client.get_channel(request=request)
503
503
504
504
# Handle the response
505
505
print(response)
@@ -600,9 +600,9 @@ async def delete_channel(
600
600
601
601
from google.cloud.video import live_stream_v1
602
602
603
- def sample_delete_channel():
603
+ async def sample_delete_channel():
604
604
# Create a client
605
- client = live_stream_v1.LivestreamServiceClient ()
605
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
606
606
607
607
# Initialize request argument(s)
608
608
request = live_stream_v1.DeleteChannelRequest(
@@ -614,7 +614,7 @@ def sample_delete_channel():
614
614
615
615
print("Waiting for operation to complete...")
616
616
617
- response = operation.result()
617
+ response = await operation.result()
618
618
619
619
# Handle the response
620
620
print(response)
@@ -722,9 +722,9 @@ async def update_channel(
722
722
723
723
from google.cloud.video import live_stream_v1
724
724
725
- def sample_update_channel():
725
+ async def sample_update_channel():
726
726
# Create a client
727
- client = live_stream_v1.LivestreamServiceClient ()
727
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
728
728
729
729
# Initialize request argument(s)
730
730
request = live_stream_v1.UpdateChannelRequest(
@@ -735,7 +735,7 @@ def sample_update_channel():
735
735
736
736
print("Waiting for operation to complete...")
737
737
738
- response = operation.result()
738
+ response = await operation.result()
739
739
740
740
# Handle the response
741
741
print(response)
@@ -859,9 +859,9 @@ async def start_channel(
859
859
860
860
from google.cloud.video import live_stream_v1
861
861
862
- def sample_start_channel():
862
+ async def sample_start_channel():
863
863
# Create a client
864
- client = live_stream_v1.LivestreamServiceClient ()
864
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
865
865
866
866
# Initialize request argument(s)
867
867
request = live_stream_v1.StartChannelRequest(
@@ -873,7 +873,7 @@ def sample_start_channel():
873
873
874
874
print("Waiting for operation to complete...")
875
875
876
- response = operation.result()
876
+ response = await operation.result()
877
877
878
878
# Handle the response
879
879
print(response)
@@ -973,9 +973,9 @@ async def stop_channel(
973
973
974
974
from google.cloud.video import live_stream_v1
975
975
976
- def sample_stop_channel():
976
+ async def sample_stop_channel():
977
977
# Create a client
978
- client = live_stream_v1.LivestreamServiceClient ()
978
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
979
979
980
980
# Initialize request argument(s)
981
981
request = live_stream_v1.StopChannelRequest(
@@ -987,7 +987,7 @@ def sample_stop_channel():
987
987
988
988
print("Waiting for operation to complete...")
989
989
990
- response = operation.result()
990
+ response = await operation.result()
991
991
992
992
# Handle the response
993
993
print(response)
@@ -1088,9 +1088,9 @@ async def create_input(
1088
1088
1089
1089
from google.cloud.video import live_stream_v1
1090
1090
1091
- def sample_create_input():
1091
+ async def sample_create_input():
1092
1092
# Create a client
1093
- client = live_stream_v1.LivestreamServiceClient ()
1093
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1094
1094
1095
1095
# Initialize request argument(s)
1096
1096
request = live_stream_v1.CreateInputRequest(
@@ -1103,7 +1103,7 @@ def sample_create_input():
1103
1103
1104
1104
print("Waiting for operation to complete...")
1105
1105
1106
- response = operation.result()
1106
+ response = await operation.result()
1107
1107
1108
1108
# Handle the response
1109
1109
print(response)
@@ -1217,9 +1217,9 @@ async def list_inputs(
1217
1217
1218
1218
from google.cloud.video import live_stream_v1
1219
1219
1220
- def sample_list_inputs():
1220
+ async def sample_list_inputs():
1221
1221
# Create a client
1222
- client = live_stream_v1.LivestreamServiceClient ()
1222
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1223
1223
1224
1224
# Initialize request argument(s)
1225
1225
request = live_stream_v1.ListInputsRequest(
@@ -1230,7 +1230,7 @@ def sample_list_inputs():
1230
1230
page_result = client.list_inputs(request=request)
1231
1231
1232
1232
# Handle the response
1233
- for response in page_result:
1233
+ async for response in page_result:
1234
1234
print(response)
1235
1235
1236
1236
Args:
@@ -1334,17 +1334,17 @@ async def get_input(
1334
1334
1335
1335
from google.cloud.video import live_stream_v1
1336
1336
1337
- def sample_get_input():
1337
+ async def sample_get_input():
1338
1338
# Create a client
1339
- client = live_stream_v1.LivestreamServiceClient ()
1339
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1340
1340
1341
1341
# Initialize request argument(s)
1342
1342
request = live_stream_v1.GetInputRequest(
1343
1343
name="name_value",
1344
1344
)
1345
1345
1346
1346
# Make the request
1347
- response = client.get_input(request=request)
1347
+ response = await client.get_input(request=request)
1348
1348
1349
1349
# Handle the response
1350
1350
print(response)
@@ -1440,9 +1440,9 @@ async def delete_input(
1440
1440
1441
1441
from google.cloud.video import live_stream_v1
1442
1442
1443
- def sample_delete_input():
1443
+ async def sample_delete_input():
1444
1444
# Create a client
1445
- client = live_stream_v1.LivestreamServiceClient ()
1445
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1446
1446
1447
1447
# Initialize request argument(s)
1448
1448
request = live_stream_v1.DeleteInputRequest(
@@ -1454,7 +1454,7 @@ def sample_delete_input():
1454
1454
1455
1455
print("Waiting for operation to complete...")
1456
1456
1457
- response = operation.result()
1457
+ response = await operation.result()
1458
1458
1459
1459
# Handle the response
1460
1460
print(response)
@@ -1562,9 +1562,9 @@ async def update_input(
1562
1562
1563
1563
from google.cloud.video import live_stream_v1
1564
1564
1565
- def sample_update_input():
1565
+ async def sample_update_input():
1566
1566
# Create a client
1567
- client = live_stream_v1.LivestreamServiceClient ()
1567
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1568
1568
1569
1569
# Initialize request argument(s)
1570
1570
request = live_stream_v1.UpdateInputRequest(
@@ -1575,7 +1575,7 @@ def sample_update_input():
1575
1575
1576
1576
print("Waiting for operation to complete...")
1577
1577
1578
- response = operation.result()
1578
+ response = await operation.result()
1579
1579
1580
1580
# Handle the response
1581
1581
print(response)
@@ -1692,9 +1692,9 @@ async def create_event(
1692
1692
1693
1693
from google.cloud.video import live_stream_v1
1694
1694
1695
- def sample_create_event():
1695
+ async def sample_create_event():
1696
1696
# Create a client
1697
- client = live_stream_v1.LivestreamServiceClient ()
1697
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1698
1698
1699
1699
# Initialize request argument(s)
1700
1700
request = live_stream_v1.CreateEventRequest(
@@ -1703,7 +1703,7 @@ def sample_create_event():
1703
1703
)
1704
1704
1705
1705
# Make the request
1706
- response = client.create_event(request=request)
1706
+ response = await client.create_event(request=request)
1707
1707
1708
1708
# Handle the response
1709
1709
print(response)
@@ -1811,9 +1811,9 @@ async def list_events(
1811
1811
1812
1812
from google.cloud.video import live_stream_v1
1813
1813
1814
- def sample_list_events():
1814
+ async def sample_list_events():
1815
1815
# Create a client
1816
- client = live_stream_v1.LivestreamServiceClient ()
1816
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1817
1817
1818
1818
# Initialize request argument(s)
1819
1819
request = live_stream_v1.ListEventsRequest(
@@ -1824,7 +1824,7 @@ def sample_list_events():
1824
1824
page_result = client.list_events(request=request)
1825
1825
1826
1826
# Handle the response
1827
- for response in page_result:
1827
+ async for response in page_result:
1828
1828
print(response)
1829
1829
1830
1830
Args:
@@ -1929,17 +1929,17 @@ async def get_event(
1929
1929
1930
1930
from google.cloud.video import live_stream_v1
1931
1931
1932
- def sample_get_event():
1932
+ async def sample_get_event():
1933
1933
# Create a client
1934
- client = live_stream_v1.LivestreamServiceClient ()
1934
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
1935
1935
1936
1936
# Initialize request argument(s)
1937
1937
request = live_stream_v1.GetEventRequest(
1938
1938
name="name_value",
1939
1939
)
1940
1940
1941
1941
# Make the request
1942
- response = client.get_event(request=request)
1942
+ response = await client.get_event(request=request)
1943
1943
1944
1944
# Handle the response
1945
1945
print(response)
@@ -2036,17 +2036,17 @@ async def delete_event(
2036
2036
2037
2037
from google.cloud.video import live_stream_v1
2038
2038
2039
- def sample_delete_event():
2039
+ async def sample_delete_event():
2040
2040
# Create a client
2041
- client = live_stream_v1.LivestreamServiceClient ()
2041
+ client = live_stream_v1.LivestreamServiceAsyncClient ()
2042
2042
2043
2043
# Initialize request argument(s)
2044
2044
request = live_stream_v1.DeleteEventRequest(
2045
2045
name="name_value",
2046
2046
)
2047
2047
2048
2048
# Make the request
2049
- client.delete_event(request=request)
2049
+ await client.delete_event(request=request)
2050
2050
2051
2051
Args:
2052
2052
request (Union[google.cloud.video.live_stream_v1.types.DeleteEventRequest, dict]):
0 commit comments