google-cloud-video-stitcher-v1 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -183,6 +183,12 @@ module Google
183
183
  @quota_project_id = @config.quota_project
184
184
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
185
185
 
186
+ @operations_client = Operations.new do |config|
187
+ config.credentials = credentials
188
+ config.quota_project = @quota_project_id
189
+ config.endpoint = @config.endpoint
190
+ end
191
+
186
192
  @video_stitcher_service_stub = ::Gapic::ServiceStub.new(
187
193
  ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Stub,
188
194
  credentials: credentials,
@@ -192,6 +198,13 @@ module Google
192
198
  )
193
199
  end
194
200
 
201
+ ##
202
+ # Get the associated client for long-running operations.
203
+ #
204
+ # @return [::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Operations]
205
+ #
206
+ attr_reader :operations_client
207
+
195
208
  # Service calls
196
209
 
197
210
  ##
@@ -213,23 +226,23 @@ module Google
213
226
  # the default parameter values, pass an empty Hash as a request object (see above).
214
227
  #
215
228
  # @param parent [::String]
216
- # Required. The project in which the CDN key should be created, in the form of
217
- # `projects/{project_number}/locations/{location}`.
229
+ # Required. The project in which the CDN key should be created, in the form
230
+ # of `projects/{project_number}/locations/{location}`.
218
231
  # @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash]
219
232
  # Required. The CDN key resource to create.
220
233
  # @param cdn_key_id [::String]
221
- # Required. The ID to use for the CDN key, which will become the final component of
222
- # the CDN key's resource name.
234
+ # Required. The ID to use for the CDN key, which will become the final
235
+ # component of the CDN key's resource name.
223
236
  #
224
237
  # This value should conform to RFC-1034, which restricts to
225
238
  # lower-case letters, numbers, and hyphen, with the first character a
226
239
  # letter, the last a letter or a number, and a 63 character maximum.
227
240
  #
228
241
  # @yield [response, operation] Access the result along with the RPC operation
229
- # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey]
242
+ # @yieldparam response [::Gapic::Operation]
230
243
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
231
244
  #
232
- # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
245
+ # @return [::Gapic::Operation]
233
246
  #
234
247
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
235
248
  #
@@ -245,8 +258,15 @@ module Google
245
258
  # # Call the create_cdn_key method.
246
259
  # result = client.create_cdn_key request
247
260
  #
248
- # # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey.
249
- # p result
261
+ # # The returned object is of type Gapic::Operation. You can use it to
262
+ # # check the status of an operation, cancel it, or wait for results.
263
+ # # Here is how to wait for a response.
264
+ # result.wait_until_done! timeout: 60
265
+ # if result.response?
266
+ # p result.response
267
+ # else
268
+ # puts "No response received."
269
+ # end
250
270
  #
251
271
  def create_cdn_key request, options = nil
252
272
  raise ::ArgumentError, "request must be provided" if request.nil?
@@ -282,6 +302,7 @@ module Google
282
302
  retry_policy: @config.retry_policy
283
303
 
284
304
  @video_stitcher_service_stub.call_rpc :create_cdn_key, request, options: options do |response, operation|
305
+ response = ::Gapic::Operation.new response, @operations_client, options: options
285
306
  yield response, operation if block_given?
286
307
  return response
287
308
  end
@@ -340,13 +361,11 @@ module Google
340
361
  # # Call the list_cdn_keys method.
341
362
  # result = client.list_cdn_keys request
342
363
  #
343
- # # The returned object is of type Gapic::PagedEnumerable. You can
344
- # # iterate over all elements by calling #each, and the enumerable
345
- # # will lazily make API calls to fetch subsequent pages. Other
346
- # # methods are also available for managing paging directly.
347
- # result.each do |response|
364
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
365
+ # # over elements, and API calls will be issued to fetch pages as needed.
366
+ # result.each do |item|
348
367
  # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::CdnKey.
349
- # p response
368
+ # p item
350
369
  # end
351
370
  #
352
371
  def list_cdn_keys request, options = nil
@@ -500,10 +519,10 @@ module Google
500
519
  # `projects/{project_number}/locations/{location}/cdnKeys/{id}`.
501
520
  #
502
521
  # @yield [response, operation] Access the result along with the RPC operation
503
- # @yieldparam response [::Google::Protobuf::Empty]
522
+ # @yieldparam response [::Gapic::Operation]
504
523
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
505
524
  #
506
- # @return [::Google::Protobuf::Empty]
525
+ # @return [::Gapic::Operation]
507
526
  #
508
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
509
528
  #
@@ -519,8 +538,15 @@ module Google
519
538
  # # Call the delete_cdn_key method.
520
539
  # result = client.delete_cdn_key request
521
540
  #
522
- # # The returned object is of type Google::Protobuf::Empty.
523
- # p result
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "No response received."
549
+ # end
524
550
  #
525
551
  def delete_cdn_key request, options = nil
526
552
  raise ::ArgumentError, "request must be provided" if request.nil?
@@ -556,6 +582,7 @@ module Google
556
582
  retry_policy: @config.retry_policy
557
583
 
558
584
  @video_stitcher_service_stub.call_rpc :delete_cdn_key, request, options: options do |response, operation|
585
+ response = ::Gapic::Operation.new response, @operations_client, options: options
559
586
  yield response, operation if block_given?
560
587
  return response
561
588
  end
@@ -590,10 +617,10 @@ module Google
590
617
  # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
591
618
  #
592
619
  # @yield [response, operation] Access the result along with the RPC operation
593
- # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey]
620
+ # @yieldparam response [::Gapic::Operation]
594
621
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
595
622
  #
596
- # @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
623
+ # @return [::Gapic::Operation]
597
624
  #
598
625
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
599
626
  #
@@ -609,8 +636,15 @@ module Google
609
636
  # # Call the update_cdn_key method.
610
637
  # result = client.update_cdn_key request
611
638
  #
612
- # # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey.
613
- # p result
639
+ # # The returned object is of type Gapic::Operation. You can use it to
640
+ # # check the status of an operation, cancel it, or wait for results.
641
+ # # Here is how to wait for a response.
642
+ # result.wait_until_done! timeout: 60
643
+ # if result.response?
644
+ # p result.response
645
+ # else
646
+ # puts "No response received."
647
+ # end
614
648
  #
615
649
  def update_cdn_key request, options = nil
616
650
  raise ::ArgumentError, "request must be provided" if request.nil?
@@ -646,6 +680,7 @@ module Google
646
680
  retry_policy: @config.retry_policy
647
681
 
648
682
  @video_stitcher_service_stub.call_rpc :update_cdn_key, request, options: options do |response, operation|
683
+ response = ::Gapic::Operation.new response, @operations_client, options: options
649
684
  yield response, operation if block_given?
650
685
  return response
651
686
  end
@@ -673,8 +708,8 @@ module Google
673
708
  # the default parameter values, pass an empty Hash as a request object (see above).
674
709
  #
675
710
  # @param parent [::String]
676
- # Required. The project and location in which the VOD session should be created, in the
677
- # form of `projects/{project_number}/locations/{location}`.
711
+ # Required. The project and location in which the VOD session should be
712
+ # created, in the form of `projects/{project_number}/locations/{location}`.
678
713
  # @param vod_session [::Google::Cloud::Video::Stitcher::V1::VodSession, ::Hash]
679
714
  # Required. Parameters for creating a session.
680
715
  #
@@ -849,8 +884,8 @@ module Google
849
884
  # the default parameter values, pass an empty Hash as a request object (see above).
850
885
  #
851
886
  # @param parent [::String]
852
- # Required. The VOD session where the stitch details belong to, in the form of
853
- # `projects/{project}/locations/{location}/vodSessions/{id}`.
887
+ # Required. The VOD session where the stitch details belong to, in the form
888
+ # of `projects/{project}/locations/{location}/vodSessions/{id}`.
854
889
  # @param page_size [::Integer]
855
890
  # The maximum number of items to return.
856
891
  # @param page_token [::String]
@@ -876,13 +911,11 @@ module Google
876
911
  # # Call the list_vod_stitch_details method.
877
912
  # result = client.list_vod_stitch_details request
878
913
  #
879
- # # The returned object is of type Gapic::PagedEnumerable. You can
880
- # # iterate over all elements by calling #each, and the enumerable
881
- # # will lazily make API calls to fetch subsequent pages. Other
882
- # # methods are also available for managing paging directly.
883
- # result.each do |response|
914
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
915
+ # # over elements, and API calls will be issued to fetch pages as needed.
916
+ # result.each do |item|
884
917
  # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail.
885
- # p response
918
+ # p item
886
919
  # end
887
920
  #
888
921
  def list_vod_stitch_details request, options = nil
@@ -946,7 +979,8 @@ module Google
946
979
  # the default parameter values, pass an empty Hash as a request object (see above).
947
980
  #
948
981
  # @param name [::String]
949
- # Required. The name of the stitch detail in the specified VOD session, in the form of
982
+ # Required. The name of the stitch detail in the specified VOD session, in
983
+ # the form of
950
984
  # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`.
951
985
  #
952
986
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1032,8 +1066,8 @@ module Google
1032
1066
  # the default parameter values, pass an empty Hash as a request object (see above).
1033
1067
  #
1034
1068
  # @param parent [::String]
1035
- # Required. The VOD session which the ad tag details belong to, in the form of
1036
- # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`.
1069
+ # Required. The VOD session which the ad tag details belong to, in the form
1070
+ # of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`.
1037
1071
  # @param page_size [::Integer]
1038
1072
  # The maximum number of items to return.
1039
1073
  # @param page_token [::String]
@@ -1059,13 +1093,11 @@ module Google
1059
1093
  # # Call the list_vod_ad_tag_details method.
1060
1094
  # result = client.list_vod_ad_tag_details request
1061
1095
  #
1062
- # # The returned object is of type Gapic::PagedEnumerable. You can
1063
- # # iterate over all elements by calling #each, and the enumerable
1064
- # # will lazily make API calls to fetch subsequent pages. Other
1065
- # # methods are also available for managing paging directly.
1066
- # result.each do |response|
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|
1067
1099
  # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail.
1068
- # p response
1100
+ # p item
1069
1101
  # end
1070
1102
  #
1071
1103
  def list_vod_ad_tag_details request, options = nil
@@ -1129,7 +1161,8 @@ module Google
1129
1161
  # the default parameter values, pass an empty Hash as a request object (see above).
1130
1162
  #
1131
1163
  # @param name [::String]
1132
- # Required. The name of the ad tag detail for the specified VOD session, in the form of
1164
+ # Required. The name of the ad tag detail for the specified VOD session, in
1165
+ # the form of
1133
1166
  # `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`.
1134
1167
  #
1135
1168
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1242,13 +1275,11 @@ module Google
1242
1275
  # # Call the list_live_ad_tag_details method.
1243
1276
  # result = client.list_live_ad_tag_details request
1244
1277
  #
1245
- # # The returned object is of type Gapic::PagedEnumerable. You can
1246
- # # iterate over all elements by calling #each, and the enumerable
1247
- # # will lazily make API calls to fetch subsequent pages. Other
1248
- # # methods are also available for managing paging directly.
1249
- # result.each do |response|
1278
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1279
+ # # over elements, and API calls will be issued to fetch pages as needed.
1280
+ # result.each do |item|
1250
1281
  # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail.
1251
- # p response
1282
+ # p item
1252
1283
  # end
1253
1284
  #
1254
1285
  def list_live_ad_tag_details request, options = nil
@@ -1392,14 +1423,14 @@ module Google
1392
1423
  # @param options [::Gapic::CallOptions, ::Hash]
1393
1424
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1394
1425
  #
1395
- # @overload create_slate(parent: nil, slate_id: nil, slate: nil)
1426
+ # @overload create_slate(parent: nil, slate_id: nil, slate: nil, request_id: nil)
1396
1427
  # Pass arguments to `create_slate` via keyword arguments. Note that at
1397
1428
  # least one keyword argument is required. To specify no parameters, or to keep all
1398
1429
  # the default parameter values, pass an empty Hash as a request object (see above).
1399
1430
  #
1400
1431
  # @param parent [::String]
1401
1432
  # Required. The project in which the slate should be created, in the form of
1402
- # `projects/{project_number}`.
1433
+ # `projects/{project_number}/locations/{location}`.
1403
1434
  # @param slate_id [::String]
1404
1435
  # Required. The unique identifier for the slate.
1405
1436
  # This value should conform to RFC-1034, which restricts to
@@ -1407,12 +1438,26 @@ module Google
1407
1438
  # letter, the last a letter or a number, and a 63 character maximum.
1408
1439
  # @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash]
1409
1440
  # Required. The slate to create.
1441
+ # @param request_id [::String]
1442
+ # A request ID to identify requests. Specify a unique request ID
1443
+ # so that if you must retry your request, the server will know to ignore
1444
+ # the request if it has already been completed. The server will guarantee
1445
+ # that for at least 60 minutes since the first request.
1446
+ #
1447
+ # For example, consider a situation where you make an initial request and the
1448
+ # request times out. If you make the request again with the same request ID,
1449
+ # the server can check if original operation with the same request ID was
1450
+ # received, and if so, will ignore the second request. This prevents clients
1451
+ # from accidentally creating duplicate commitments.
1452
+ #
1453
+ # The request ID must be a valid UUID with the exception that zero UUID is
1454
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
1410
1455
  #
1411
1456
  # @yield [response, operation] Access the result along with the RPC operation
1412
- # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate]
1457
+ # @yieldparam response [::Gapic::Operation]
1413
1458
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1414
1459
  #
1415
- # @return [::Google::Cloud::Video::Stitcher::V1::Slate]
1460
+ # @return [::Gapic::Operation]
1416
1461
  #
1417
1462
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1418
1463
  #
@@ -1428,8 +1473,15 @@ module Google
1428
1473
  # # Call the create_slate method.
1429
1474
  # result = client.create_slate request
1430
1475
  #
1431
- # # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate.
1432
- # p result
1476
+ # # The returned object is of type Gapic::Operation. You can use it to
1477
+ # # check the status of an operation, cancel it, or wait for results.
1478
+ # # Here is how to wait for a response.
1479
+ # result.wait_until_done! timeout: 60
1480
+ # if result.response?
1481
+ # p result.response
1482
+ # else
1483
+ # puts "No response received."
1484
+ # end
1433
1485
  #
1434
1486
  def create_slate request, options = nil
1435
1487
  raise ::ArgumentError, "request must be provided" if request.nil?
@@ -1465,6 +1517,7 @@ module Google
1465
1517
  retry_policy: @config.retry_policy
1466
1518
 
1467
1519
  @video_stitcher_service_stub.call_rpc :create_slate, request, options: options do |response, operation|
1520
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1468
1521
  yield response, operation if block_given?
1469
1522
  return response
1470
1523
  end
@@ -1491,7 +1544,8 @@ module Google
1491
1544
  # the default parameter values, pass an empty Hash as a request object (see above).
1492
1545
  #
1493
1546
  # @param parent [::String]
1494
- # Required. The project to list slates, in the form of `projects/{project_number}`.
1547
+ # Required. The project to list slates, in the form of
1548
+ # `projects/{project_number}/locations/{location}`.
1495
1549
  # @param page_size [::Integer]
1496
1550
  # Requested page size. Server may return fewer items than requested.
1497
1551
  # If unspecified, server will pick an appropriate default.
@@ -1522,13 +1576,11 @@ module Google
1522
1576
  # # Call the list_slates method.
1523
1577
  # result = client.list_slates request
1524
1578
  #
1525
- # # The returned object is of type Gapic::PagedEnumerable. You can
1526
- # # iterate over all elements by calling #each, and the enumerable
1527
- # # will lazily make API calls to fetch subsequent pages. Other
1528
- # # methods are also available for managing paging directly.
1529
- # result.each do |response|
1579
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1580
+ # # over elements, and API calls will be issued to fetch pages as needed.
1581
+ # result.each do |item|
1530
1582
  # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::Slate.
1531
- # p response
1583
+ # p item
1532
1584
  # end
1533
1585
  #
1534
1586
  def list_slates request, options = nil
@@ -1592,8 +1644,8 @@ module Google
1592
1644
  # the default parameter values, pass an empty Hash as a request object (see above).
1593
1645
  #
1594
1646
  # @param name [::String]
1595
- # Required. The name of the slate to be retrieved, of the slate, in the form of
1596
- # `projects/{project_number}/locations/{location}/slates/{id}`.
1647
+ # Required. The name of the slate to be retrieved, of the slate, in the form
1648
+ # of `projects/{project_number}/locations/{location}/slates/{id}`.
1597
1649
  #
1598
1650
  # @yield [response, operation] Access the result along with the RPC operation
1599
1651
  # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate]
@@ -1683,10 +1735,10 @@ module Google
1683
1735
  # Required. The update mask which specifies fields which should be updated.
1684
1736
  #
1685
1737
  # @yield [response, operation] Access the result along with the RPC operation
1686
- # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate]
1738
+ # @yieldparam response [::Gapic::Operation]
1687
1739
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1688
1740
  #
1689
- # @return [::Google::Cloud::Video::Stitcher::V1::Slate]
1741
+ # @return [::Gapic::Operation]
1690
1742
  #
1691
1743
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1692
1744
  #
@@ -1702,8 +1754,15 @@ module Google
1702
1754
  # # Call the update_slate method.
1703
1755
  # result = client.update_slate request
1704
1756
  #
1705
- # # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate.
1706
- # p result
1757
+ # # The returned object is of type Gapic::Operation. You can use it to
1758
+ # # check the status of an operation, cancel it, or wait for results.
1759
+ # # Here is how to wait for a response.
1760
+ # result.wait_until_done! timeout: 60
1761
+ # if result.response?
1762
+ # p result.response
1763
+ # else
1764
+ # puts "No response received."
1765
+ # end
1707
1766
  #
1708
1767
  def update_slate request, options = nil
1709
1768
  raise ::ArgumentError, "request must be provided" if request.nil?
@@ -1739,6 +1798,7 @@ module Google
1739
1798
  retry_policy: @config.retry_policy
1740
1799
 
1741
1800
  @video_stitcher_service_stub.call_rpc :update_slate, request, options: options do |response, operation|
1801
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1742
1802
  yield response, operation if block_given?
1743
1803
  return response
1744
1804
  end
@@ -1769,10 +1829,10 @@ module Google
1769
1829
  # `projects/{project_number}/locations/{location}/slates/{id}`.
1770
1830
  #
1771
1831
  # @yield [response, operation] Access the result along with the RPC operation
1772
- # @yieldparam response [::Google::Protobuf::Empty]
1832
+ # @yieldparam response [::Gapic::Operation]
1773
1833
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1774
1834
  #
1775
- # @return [::Google::Protobuf::Empty]
1835
+ # @return [::Gapic::Operation]
1776
1836
  #
1777
1837
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1778
1838
  #
@@ -1788,8 +1848,15 @@ module Google
1788
1848
  # # Call the delete_slate method.
1789
1849
  # result = client.delete_slate request
1790
1850
  #
1791
- # # The returned object is of type Google::Protobuf::Empty.
1792
- # p result
1851
+ # # The returned object is of type Gapic::Operation. You can use it to
1852
+ # # check the status of an operation, cancel it, or wait for results.
1853
+ # # Here is how to wait for a response.
1854
+ # result.wait_until_done! timeout: 60
1855
+ # if result.response?
1856
+ # p result.response
1857
+ # else
1858
+ # puts "No response received."
1859
+ # end
1793
1860
  #
1794
1861
  def delete_slate request, options = nil
1795
1862
  raise ::ArgumentError, "request must be provided" if request.nil?
@@ -1825,6 +1892,7 @@ module Google
1825
1892
  retry_policy: @config.retry_policy
1826
1893
 
1827
1894
  @video_stitcher_service_stub.call_rpc :delete_slate, request, options: options do |response, operation|
1895
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1828
1896
  yield response, operation if block_given?
1829
1897
  return response
1830
1898
  end
@@ -1851,8 +1919,8 @@ module Google
1851
1919
  # the default parameter values, pass an empty Hash as a request object (see above).
1852
1920
  #
1853
1921
  # @param parent [::String]
1854
- # Required. The project and location in which the live session should be created,
1855
- # in the form of `projects/{project_number}/locations/{location}`.
1922
+ # Required. The project and location in which the live session should be
1923
+ # created, in the form of `projects/{project_number}/locations/{location}`.
1856
1924
  # @param live_session [::Google::Cloud::Video::Stitcher::V1::LiveSession, ::Hash]
1857
1925
  # Required. Parameters for creating a live session.
1858
1926
  #
@@ -2006,6 +2074,404 @@ module Google
2006
2074
  raise ::Google::Cloud::Error.from_error(e)
2007
2075
  end
2008
2076
 
2077
+ ##
2078
+ # Registers the live config with the provided unique ID in
2079
+ # the specified region.
2080
+ #
2081
+ # @overload create_live_config(request, options = nil)
2082
+ # Pass arguments to `create_live_config` via a request object, either of type
2083
+ # {::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest} or an equivalent Hash.
2084
+ #
2085
+ # @param request [::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest, ::Hash]
2086
+ # A request object representing the call parameters. Required. To specify no
2087
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2088
+ # @param options [::Gapic::CallOptions, ::Hash]
2089
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2090
+ #
2091
+ # @overload create_live_config(parent: nil, live_config_id: nil, live_config: nil, request_id: nil)
2092
+ # Pass arguments to `create_live_config` via keyword arguments. Note that at
2093
+ # least one keyword argument is required. To specify no parameters, or to keep all
2094
+ # the default parameter values, pass an empty Hash as a request object (see above).
2095
+ #
2096
+ # @param parent [::String]
2097
+ # Required. The project in which the live config should be created, in
2098
+ # the form of `projects/{project_number}/locations/{location}`.
2099
+ # @param live_config_id [::String]
2100
+ # Required. The unique identifier ID to use for the live config.
2101
+ # @param live_config [::Google::Cloud::Video::Stitcher::V1::LiveConfig, ::Hash]
2102
+ # Required. The live config resource to create.
2103
+ # @param request_id [::String]
2104
+ # A request ID to identify requests. Specify a unique request ID
2105
+ # so that if you must retry your request, the server will know to ignore
2106
+ # the request if it has already been completed. The server will guarantee
2107
+ # that for at least 60 minutes since the first request.
2108
+ #
2109
+ # For example, consider a situation where you make an initial request and the
2110
+ # request times out. If you make the request again with the same request ID,
2111
+ # the server can check if original operation with the same request ID was
2112
+ # received, and if so, will ignore the second request. This prevents clients
2113
+ # from accidentally creating duplicate commitments.
2114
+ #
2115
+ # The request ID must be a valid UUID with the exception that zero UUID is
2116
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2117
+ #
2118
+ # @yield [response, operation] Access the result along with the RPC operation
2119
+ # @yieldparam response [::Gapic::Operation]
2120
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2121
+ #
2122
+ # @return [::Gapic::Operation]
2123
+ #
2124
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2125
+ #
2126
+ # @example Basic example
2127
+ # require "google/cloud/video/stitcher/v1"
2128
+ #
2129
+ # # Create a client object. The client can be reused for multiple calls.
2130
+ # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
2131
+ #
2132
+ # # Create a request. To set request fields, pass in keyword arguments.
2133
+ # request = Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest.new
2134
+ #
2135
+ # # Call the create_live_config method.
2136
+ # result = client.create_live_config request
2137
+ #
2138
+ # # The returned object is of type Gapic::Operation. You can use it to
2139
+ # # check the status of an operation, cancel it, or wait for results.
2140
+ # # Here is how to wait for a response.
2141
+ # result.wait_until_done! timeout: 60
2142
+ # if result.response?
2143
+ # p result.response
2144
+ # else
2145
+ # puts "No response received."
2146
+ # end
2147
+ #
2148
+ def create_live_config request, options = nil
2149
+ raise ::ArgumentError, "request must be provided" if request.nil?
2150
+
2151
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateLiveConfigRequest
2152
+
2153
+ # Converts hash and nil to an options object
2154
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2155
+
2156
+ # Customize the options with defaults
2157
+ metadata = @config.rpcs.create_live_config.metadata.to_h
2158
+
2159
+ # Set x-goog-api-client and x-goog-user-project headers
2160
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2161
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2162
+ gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
2163
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2164
+
2165
+ header_params = {}
2166
+ if request.parent
2167
+ header_params["parent"] = request.parent
2168
+ end
2169
+
2170
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2171
+ metadata[:"x-goog-request-params"] ||= request_params_header
2172
+
2173
+ options.apply_defaults timeout: @config.rpcs.create_live_config.timeout,
2174
+ metadata: metadata,
2175
+ retry_policy: @config.rpcs.create_live_config.retry_policy
2176
+
2177
+ options.apply_defaults timeout: @config.timeout,
2178
+ metadata: @config.metadata,
2179
+ retry_policy: @config.retry_policy
2180
+
2181
+ @video_stitcher_service_stub.call_rpc :create_live_config, request, options: options do |response, operation|
2182
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2183
+ yield response, operation if block_given?
2184
+ return response
2185
+ end
2186
+ rescue ::GRPC::BadStatus => e
2187
+ raise ::Google::Cloud::Error.from_error(e)
2188
+ end
2189
+
2190
+ ##
2191
+ # Lists all live configs managed by the Video Stitcher that
2192
+ # belong to the specified project and region.
2193
+ #
2194
+ # @overload list_live_configs(request, options = nil)
2195
+ # Pass arguments to `list_live_configs` via a request object, either of type
2196
+ # {::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest} or an equivalent Hash.
2197
+ #
2198
+ # @param request [::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest, ::Hash]
2199
+ # A request object representing the call parameters. Required. To specify no
2200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2201
+ # @param options [::Gapic::CallOptions, ::Hash]
2202
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2203
+ #
2204
+ # @overload list_live_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2205
+ # Pass arguments to `list_live_configs` via keyword arguments. Note that at
2206
+ # least one keyword argument is required. To specify no parameters, or to keep all
2207
+ # the default parameter values, pass an empty Hash as a request object (see above).
2208
+ #
2209
+ # @param parent [::String]
2210
+ # Required. The project that contains the list of live configs, in the
2211
+ # form of `projects/{project_number}/locations/{location}`.
2212
+ # @param page_size [::Integer]
2213
+ # The maximum number of items to return.
2214
+ # @param page_token [::String]
2215
+ # The next_page_token value returned from a previous List request, if any.
2216
+ # @param filter [::String]
2217
+ # Optional. The filter to apply to list results (see
2218
+ # [Filtering](https://google.aip.dev/160)).
2219
+ # @param order_by [::String]
2220
+ # Optional. Specifies the ordering of results following
2221
+ # [Cloud API
2222
+ # syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).
2223
+ #
2224
+ # @yield [response, operation] Access the result along with the RPC operation
2225
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveConfig>]
2226
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2227
+ #
2228
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveConfig>]
2229
+ #
2230
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2231
+ #
2232
+ # @example Basic example
2233
+ # require "google/cloud/video/stitcher/v1"
2234
+ #
2235
+ # # Create a client object. The client can be reused for multiple calls.
2236
+ # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
2237
+ #
2238
+ # # Create a request. To set request fields, pass in keyword arguments.
2239
+ # request = Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest.new
2240
+ #
2241
+ # # Call the list_live_configs method.
2242
+ # result = client.list_live_configs request
2243
+ #
2244
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2245
+ # # over elements, and API calls will be issued to fetch pages as needed.
2246
+ # result.each do |item|
2247
+ # # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveConfig.
2248
+ # p item
2249
+ # end
2250
+ #
2251
+ def list_live_configs request, options = nil
2252
+ raise ::ArgumentError, "request must be provided" if request.nil?
2253
+
2254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListLiveConfigsRequest
2255
+
2256
+ # Converts hash and nil to an options object
2257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2258
+
2259
+ # Customize the options with defaults
2260
+ metadata = @config.rpcs.list_live_configs.metadata.to_h
2261
+
2262
+ # Set x-goog-api-client and x-goog-user-project headers
2263
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2265
+ gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
2266
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2267
+
2268
+ header_params = {}
2269
+ if request.parent
2270
+ header_params["parent"] = request.parent
2271
+ end
2272
+
2273
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2274
+ metadata[:"x-goog-request-params"] ||= request_params_header
2275
+
2276
+ options.apply_defaults timeout: @config.rpcs.list_live_configs.timeout,
2277
+ metadata: metadata,
2278
+ retry_policy: @config.rpcs.list_live_configs.retry_policy
2279
+
2280
+ options.apply_defaults timeout: @config.timeout,
2281
+ metadata: @config.metadata,
2282
+ retry_policy: @config.retry_policy
2283
+
2284
+ @video_stitcher_service_stub.call_rpc :list_live_configs, request, options: options do |response, operation|
2285
+ response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_live_configs, request, response, operation, options
2286
+ yield response, operation if block_given?
2287
+ return response
2288
+ end
2289
+ rescue ::GRPC::BadStatus => e
2290
+ raise ::Google::Cloud::Error.from_error(e)
2291
+ end
2292
+
2293
+ ##
2294
+ # Returns the specified live config managed by the Video
2295
+ # Stitcher service.
2296
+ #
2297
+ # @overload get_live_config(request, options = nil)
2298
+ # Pass arguments to `get_live_config` via a request object, either of type
2299
+ # {::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest} or an equivalent Hash.
2300
+ #
2301
+ # @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest, ::Hash]
2302
+ # A request object representing the call parameters. Required. To specify no
2303
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2304
+ # @param options [::Gapic::CallOptions, ::Hash]
2305
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2306
+ #
2307
+ # @overload get_live_config(name: nil)
2308
+ # Pass arguments to `get_live_config` via keyword arguments. Note that at
2309
+ # least one keyword argument is required. To specify no parameters, or to keep all
2310
+ # the default parameter values, pass an empty Hash as a request object (see above).
2311
+ #
2312
+ # @param name [::String]
2313
+ # Required. The name of the live config to be retrieved, in the form
2314
+ # of
2315
+ # `projects/{project_number}/locations/{location}/liveConfigs/{id}`.
2316
+ #
2317
+ # @yield [response, operation] Access the result along with the RPC operation
2318
+ # @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveConfig]
2319
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2320
+ #
2321
+ # @return [::Google::Cloud::Video::Stitcher::V1::LiveConfig]
2322
+ #
2323
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2324
+ #
2325
+ # @example Basic example
2326
+ # require "google/cloud/video/stitcher/v1"
2327
+ #
2328
+ # # Create a client object. The client can be reused for multiple calls.
2329
+ # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
2330
+ #
2331
+ # # Create a request. To set request fields, pass in keyword arguments.
2332
+ # request = Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest.new
2333
+ #
2334
+ # # Call the get_live_config method.
2335
+ # result = client.get_live_config request
2336
+ #
2337
+ # # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveConfig.
2338
+ # p result
2339
+ #
2340
+ def get_live_config request, options = nil
2341
+ raise ::ArgumentError, "request must be provided" if request.nil?
2342
+
2343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveConfigRequest
2344
+
2345
+ # Converts hash and nil to an options object
2346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2347
+
2348
+ # Customize the options with defaults
2349
+ metadata = @config.rpcs.get_live_config.metadata.to_h
2350
+
2351
+ # Set x-goog-api-client and x-goog-user-project headers
2352
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2354
+ gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
2355
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2356
+
2357
+ header_params = {}
2358
+ if request.name
2359
+ header_params["name"] = request.name
2360
+ end
2361
+
2362
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2363
+ metadata[:"x-goog-request-params"] ||= request_params_header
2364
+
2365
+ options.apply_defaults timeout: @config.rpcs.get_live_config.timeout,
2366
+ metadata: metadata,
2367
+ retry_policy: @config.rpcs.get_live_config.retry_policy
2368
+
2369
+ options.apply_defaults timeout: @config.timeout,
2370
+ metadata: @config.metadata,
2371
+ retry_policy: @config.retry_policy
2372
+
2373
+ @video_stitcher_service_stub.call_rpc :get_live_config, request, options: options do |response, operation|
2374
+ yield response, operation if block_given?
2375
+ return response
2376
+ end
2377
+ rescue ::GRPC::BadStatus => e
2378
+ raise ::Google::Cloud::Error.from_error(e)
2379
+ end
2380
+
2381
+ ##
2382
+ # Deletes the specified live config.
2383
+ #
2384
+ # @overload delete_live_config(request, options = nil)
2385
+ # Pass arguments to `delete_live_config` via a request object, either of type
2386
+ # {::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest} or an equivalent Hash.
2387
+ #
2388
+ # @param request [::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest, ::Hash]
2389
+ # A request object representing the call parameters. Required. To specify no
2390
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2391
+ # @param options [::Gapic::CallOptions, ::Hash]
2392
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2393
+ #
2394
+ # @overload delete_live_config(name: nil)
2395
+ # Pass arguments to `delete_live_config` via keyword arguments. Note that at
2396
+ # least one keyword argument is required. To specify no parameters, or to keep all
2397
+ # the default parameter values, pass an empty Hash as a request object (see above).
2398
+ #
2399
+ # @param name [::String]
2400
+ # Required. The name of the live config to be deleted, in the form of
2401
+ # `projects/{project_number}/locations/{location}/liveConfigs/{id}`.
2402
+ #
2403
+ # @yield [response, operation] Access the result along with the RPC operation
2404
+ # @yieldparam response [::Gapic::Operation]
2405
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2406
+ #
2407
+ # @return [::Gapic::Operation]
2408
+ #
2409
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2410
+ #
2411
+ # @example Basic example
2412
+ # require "google/cloud/video/stitcher/v1"
2413
+ #
2414
+ # # Create a client object. The client can be reused for multiple calls.
2415
+ # client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
2416
+ #
2417
+ # # Create a request. To set request fields, pass in keyword arguments.
2418
+ # request = Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest.new
2419
+ #
2420
+ # # Call the delete_live_config method.
2421
+ # result = client.delete_live_config request
2422
+ #
2423
+ # # The returned object is of type Gapic::Operation. You can use it to
2424
+ # # check the status of an operation, cancel it, or wait for results.
2425
+ # # Here is how to wait for a response.
2426
+ # result.wait_until_done! timeout: 60
2427
+ # if result.response?
2428
+ # p result.response
2429
+ # else
2430
+ # puts "No response received."
2431
+ # end
2432
+ #
2433
+ def delete_live_config request, options = nil
2434
+ raise ::ArgumentError, "request must be provided" if request.nil?
2435
+
2436
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteLiveConfigRequest
2437
+
2438
+ # Converts hash and nil to an options object
2439
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2440
+
2441
+ # Customize the options with defaults
2442
+ metadata = @config.rpcs.delete_live_config.metadata.to_h
2443
+
2444
+ # Set x-goog-api-client and x-goog-user-project headers
2445
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2446
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2447
+ gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
2448
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2449
+
2450
+ header_params = {}
2451
+ if request.name
2452
+ header_params["name"] = request.name
2453
+ end
2454
+
2455
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2456
+ metadata[:"x-goog-request-params"] ||= request_params_header
2457
+
2458
+ options.apply_defaults timeout: @config.rpcs.delete_live_config.timeout,
2459
+ metadata: metadata,
2460
+ retry_policy: @config.rpcs.delete_live_config.retry_policy
2461
+
2462
+ options.apply_defaults timeout: @config.timeout,
2463
+ metadata: @config.metadata,
2464
+ retry_policy: @config.retry_policy
2465
+
2466
+ @video_stitcher_service_stub.call_rpc :delete_live_config, request, options: options do |response, operation|
2467
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2468
+ yield response, operation if block_given?
2469
+ return response
2470
+ end
2471
+ rescue ::GRPC::BadStatus => e
2472
+ raise ::Google::Cloud::Error.from_error(e)
2473
+ end
2474
+
2009
2475
  ##
2010
2476
  # Configuration class for the VideoStitcherService API.
2011
2477
  #
@@ -2044,9 +2510,9 @@ module Google
2044
2510
  # * (`String`) The path to a service account key file in JSON format
2045
2511
  # * (`Hash`) A service account key as a Hash
2046
2512
  # * (`Google::Auth::Credentials`) A googleauth credentials object
2047
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2513
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2048
2514
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2049
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2515
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2050
2516
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2051
2517
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2052
2518
  # * (`nil`) indicating no credentials
@@ -2241,6 +2707,26 @@ module Google
2241
2707
  # @return [::Gapic::Config::Method]
2242
2708
  #
2243
2709
  attr_reader :get_live_session
2710
+ ##
2711
+ # RPC-specific configuration for `create_live_config`
2712
+ # @return [::Gapic::Config::Method]
2713
+ #
2714
+ attr_reader :create_live_config
2715
+ ##
2716
+ # RPC-specific configuration for `list_live_configs`
2717
+ # @return [::Gapic::Config::Method]
2718
+ #
2719
+ attr_reader :list_live_configs
2720
+ ##
2721
+ # RPC-specific configuration for `get_live_config`
2722
+ # @return [::Gapic::Config::Method]
2723
+ #
2724
+ attr_reader :get_live_config
2725
+ ##
2726
+ # RPC-specific configuration for `delete_live_config`
2727
+ # @return [::Gapic::Config::Method]
2728
+ #
2729
+ attr_reader :delete_live_config
2244
2730
 
2245
2731
  # @private
2246
2732
  def initialize parent_rpcs = nil
@@ -2284,6 +2770,14 @@ module Google
2284
2770
  @create_live_session = ::Gapic::Config::Method.new create_live_session_config
2285
2771
  get_live_session_config = parent_rpcs.get_live_session if parent_rpcs.respond_to? :get_live_session
2286
2772
  @get_live_session = ::Gapic::Config::Method.new get_live_session_config
2773
+ create_live_config_config = parent_rpcs.create_live_config if parent_rpcs.respond_to? :create_live_config
2774
+ @create_live_config = ::Gapic::Config::Method.new create_live_config_config
2775
+ list_live_configs_config = parent_rpcs.list_live_configs if parent_rpcs.respond_to? :list_live_configs
2776
+ @list_live_configs = ::Gapic::Config::Method.new list_live_configs_config
2777
+ get_live_config_config = parent_rpcs.get_live_config if parent_rpcs.respond_to? :get_live_config
2778
+ @get_live_config = ::Gapic::Config::Method.new get_live_config_config
2779
+ delete_live_config_config = parent_rpcs.delete_live_config if parent_rpcs.respond_to? :delete_live_config
2780
+ @delete_live_config = ::Gapic::Config::Method.new delete_live_config_config
2287
2781
 
2288
2782
  yield self if block_given?
2289
2783
  end