google-cloud-video-live_stream-v1 0.5.1 → 0.6.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 +652 -0
- 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 +488 -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/cloud/video/livestream/v1/resources.rb +163 -5
- data/proto_docs/google/cloud/video/livestream/v1/service.rb +149 -0
- metadata +2 -2
@@ -25,6 +25,25 @@ module Google
|
|
25
25
|
module LivestreamService
|
26
26
|
# Path helper methods for the LivestreamService API.
|
27
27
|
module Paths
|
28
|
+
##
|
29
|
+
# Create a fully-qualified Asset resource string.
|
30
|
+
#
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/locations/{location}/assets/{asset}`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
# @param location [String]
|
37
|
+
# @param asset [String]
|
38
|
+
#
|
39
|
+
# @return [::String]
|
40
|
+
def asset_path project:, location:, asset:
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
43
|
+
|
44
|
+
"projects/#{project}/locations/#{location}/assets/#{asset}"
|
45
|
+
end
|
46
|
+
|
28
47
|
##
|
29
48
|
# Create a fully-qualified Channel resource string.
|
30
49
|
#
|
@@ -101,6 +120,42 @@ module Google
|
|
101
120
|
"projects/#{project}/locations/#{location}"
|
102
121
|
end
|
103
122
|
|
123
|
+
##
|
124
|
+
# Create a fully-qualified Network resource string.
|
125
|
+
#
|
126
|
+
# The resource will be in the following format:
|
127
|
+
#
|
128
|
+
# `projects/{project}/global/networks/{network}`
|
129
|
+
#
|
130
|
+
# @param project [String]
|
131
|
+
# @param network [String]
|
132
|
+
#
|
133
|
+
# @return [::String]
|
134
|
+
def network_path project:, network:
|
135
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
136
|
+
|
137
|
+
"projects/#{project}/global/networks/#{network}"
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Create a fully-qualified Pool resource string.
|
142
|
+
#
|
143
|
+
# The resource will be in the following format:
|
144
|
+
#
|
145
|
+
# `projects/{project}/locations/{location}/pools/{pool}`
|
146
|
+
#
|
147
|
+
# @param project [String]
|
148
|
+
# @param location [String]
|
149
|
+
# @param pool [String]
|
150
|
+
#
|
151
|
+
# @return [::String]
|
152
|
+
def pool_path project:, location:, pool:
|
153
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
154
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
155
|
+
|
156
|
+
"projects/#{project}/locations/#{location}/pools/#{pool}"
|
157
|
+
end
|
158
|
+
|
104
159
|
##
|
105
160
|
# Create a fully-qualified SecretVersion resource string.
|
106
161
|
#
|
@@ -1471,6 +1471,452 @@ module Google
|
|
1471
1471
|
raise ::Google::Cloud::Error.from_error(e)
|
1472
1472
|
end
|
1473
1473
|
|
1474
|
+
##
|
1475
|
+
# Creates a Asset with the provided unique ID in the specified
|
1476
|
+
# region.
|
1477
|
+
#
|
1478
|
+
# @overload create_asset(request, options = nil)
|
1479
|
+
# Pass arguments to `create_asset` via a request object, either of type
|
1480
|
+
# {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash.
|
1481
|
+
#
|
1482
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash]
|
1483
|
+
# A request object representing the call parameters. Required. To specify no
|
1484
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1485
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1486
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1487
|
+
#
|
1488
|
+
# @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil)
|
1489
|
+
# Pass arguments to `create_asset` via keyword arguments. Note that at
|
1490
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1491
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1492
|
+
#
|
1493
|
+
# @param parent [::String]
|
1494
|
+
# Required. The parent location for the resource, in the form of:
|
1495
|
+
# `projects/{project}/locations/{location}`.
|
1496
|
+
# @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash]
|
1497
|
+
# Required. The asset resource to be created.
|
1498
|
+
# @param asset_id [::String]
|
1499
|
+
# Required. The ID of the asset resource to be created.
|
1500
|
+
# This value must be 1-63 characters, begin and end with `[a-z0-9]`,
|
1501
|
+
# could contain dashes (-) in between.
|
1502
|
+
# @param request_id [::String]
|
1503
|
+
# A request ID to identify requests. Specify a unique request ID
|
1504
|
+
# so that if you must retry your request, the server will know to ignore
|
1505
|
+
# the request if it has already been completed. The server will guarantee
|
1506
|
+
# that for at least 60 minutes since the first request.
|
1507
|
+
#
|
1508
|
+
# For example, consider a situation where you make an initial request and the
|
1509
|
+
# request times out. If you make the request again with the same request ID,
|
1510
|
+
# the server can check if original operation with the same request ID was
|
1511
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1512
|
+
# from accidentally creating duplicate commitments.
|
1513
|
+
#
|
1514
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1515
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1516
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1517
|
+
# @yieldparam result [::Gapic::Operation]
|
1518
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1519
|
+
#
|
1520
|
+
# @return [::Gapic::Operation]
|
1521
|
+
#
|
1522
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1523
|
+
def create_asset request, options = nil
|
1524
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1525
|
+
|
1526
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest
|
1527
|
+
|
1528
|
+
# Converts hash and nil to an options object
|
1529
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1530
|
+
|
1531
|
+
# Customize the options with defaults
|
1532
|
+
call_metadata = @config.rpcs.create_asset.metadata.to_h
|
1533
|
+
|
1534
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1535
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1536
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1537
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1538
|
+
transports_version_send: [:rest]
|
1539
|
+
|
1540
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1541
|
+
|
1542
|
+
options.apply_defaults timeout: @config.rpcs.create_asset.timeout,
|
1543
|
+
metadata: call_metadata,
|
1544
|
+
retry_policy: @config.rpcs.create_asset.retry_policy
|
1545
|
+
|
1546
|
+
options.apply_defaults timeout: @config.timeout,
|
1547
|
+
metadata: @config.metadata,
|
1548
|
+
retry_policy: @config.retry_policy
|
1549
|
+
|
1550
|
+
@livestream_service_stub.create_asset request, options do |result, operation|
|
1551
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1552
|
+
yield result, operation if block_given?
|
1553
|
+
return result
|
1554
|
+
end
|
1555
|
+
rescue ::Gapic::Rest::Error => e
|
1556
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1557
|
+
end
|
1558
|
+
|
1559
|
+
##
|
1560
|
+
# Deletes the specified asset if it is not used.
|
1561
|
+
#
|
1562
|
+
# @overload delete_asset(request, options = nil)
|
1563
|
+
# Pass arguments to `delete_asset` via a request object, either of type
|
1564
|
+
# {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash.
|
1565
|
+
#
|
1566
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash]
|
1567
|
+
# A request object representing the call parameters. Required. To specify no
|
1568
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1569
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1570
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1571
|
+
#
|
1572
|
+
# @overload delete_asset(name: nil, request_id: nil)
|
1573
|
+
# Pass arguments to `delete_asset` via keyword arguments. Note that at
|
1574
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1575
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1576
|
+
#
|
1577
|
+
# @param name [::String]
|
1578
|
+
# Required. The name of the asset resource, in the form of:
|
1579
|
+
# `projects/{project}/locations/{location}/assets/{assetId}`.
|
1580
|
+
# @param request_id [::String]
|
1581
|
+
# A request ID to identify requests. Specify a unique request ID
|
1582
|
+
# so that if you must retry your request, the server will know to ignore
|
1583
|
+
# the request if it has already been completed. The server will guarantee
|
1584
|
+
# that for at least 60 minutes after the first request.
|
1585
|
+
#
|
1586
|
+
# For example, consider a situation where you make an initial request and the
|
1587
|
+
# request times out. If you make the request again with the same request ID,
|
1588
|
+
# the server can check if original operation with the same request ID was
|
1589
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1590
|
+
# from accidentally creating duplicate commitments.
|
1591
|
+
#
|
1592
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1593
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1594
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1595
|
+
# @yieldparam result [::Gapic::Operation]
|
1596
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1597
|
+
#
|
1598
|
+
# @return [::Gapic::Operation]
|
1599
|
+
#
|
1600
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1601
|
+
def delete_asset request, options = nil
|
1602
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1603
|
+
|
1604
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest
|
1605
|
+
|
1606
|
+
# Converts hash and nil to an options object
|
1607
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1608
|
+
|
1609
|
+
# Customize the options with defaults
|
1610
|
+
call_metadata = @config.rpcs.delete_asset.metadata.to_h
|
1611
|
+
|
1612
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1613
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1614
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1615
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1616
|
+
transports_version_send: [:rest]
|
1617
|
+
|
1618
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1619
|
+
|
1620
|
+
options.apply_defaults timeout: @config.rpcs.delete_asset.timeout,
|
1621
|
+
metadata: call_metadata,
|
1622
|
+
retry_policy: @config.rpcs.delete_asset.retry_policy
|
1623
|
+
|
1624
|
+
options.apply_defaults timeout: @config.timeout,
|
1625
|
+
metadata: @config.metadata,
|
1626
|
+
retry_policy: @config.retry_policy
|
1627
|
+
|
1628
|
+
@livestream_service_stub.delete_asset request, options do |result, operation|
|
1629
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1630
|
+
yield result, operation if block_given?
|
1631
|
+
return result
|
1632
|
+
end
|
1633
|
+
rescue ::Gapic::Rest::Error => e
|
1634
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1635
|
+
end
|
1636
|
+
|
1637
|
+
##
|
1638
|
+
# Returns the specified asset.
|
1639
|
+
#
|
1640
|
+
# @overload get_asset(request, options = nil)
|
1641
|
+
# Pass arguments to `get_asset` via a request object, either of type
|
1642
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash.
|
1643
|
+
#
|
1644
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash]
|
1645
|
+
# A request object representing the call parameters. Required. To specify no
|
1646
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1647
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1648
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1649
|
+
#
|
1650
|
+
# @overload get_asset(name: nil)
|
1651
|
+
# Pass arguments to `get_asset` via keyword arguments. Note that at
|
1652
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1653
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1654
|
+
#
|
1655
|
+
# @param name [::String]
|
1656
|
+
# Required. Name of the resource, in the following form:
|
1657
|
+
# `projects/{project}/locations/{location}/assets/{asset}`.
|
1658
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1659
|
+
# @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Asset]
|
1660
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1661
|
+
#
|
1662
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Asset]
|
1663
|
+
#
|
1664
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1665
|
+
def get_asset request, options = nil
|
1666
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1667
|
+
|
1668
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest
|
1669
|
+
|
1670
|
+
# Converts hash and nil to an options object
|
1671
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1672
|
+
|
1673
|
+
# Customize the options with defaults
|
1674
|
+
call_metadata = @config.rpcs.get_asset.metadata.to_h
|
1675
|
+
|
1676
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1677
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1678
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1679
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1680
|
+
transports_version_send: [:rest]
|
1681
|
+
|
1682
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1683
|
+
|
1684
|
+
options.apply_defaults timeout: @config.rpcs.get_asset.timeout,
|
1685
|
+
metadata: call_metadata,
|
1686
|
+
retry_policy: @config.rpcs.get_asset.retry_policy
|
1687
|
+
|
1688
|
+
options.apply_defaults timeout: @config.timeout,
|
1689
|
+
metadata: @config.metadata,
|
1690
|
+
retry_policy: @config.retry_policy
|
1691
|
+
|
1692
|
+
@livestream_service_stub.get_asset request, options do |result, operation|
|
1693
|
+
yield result, operation if block_given?
|
1694
|
+
return result
|
1695
|
+
end
|
1696
|
+
rescue ::Gapic::Rest::Error => e
|
1697
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
##
|
1701
|
+
# Returns a list of all assets in the specified region.
|
1702
|
+
#
|
1703
|
+
# @overload list_assets(request, options = nil)
|
1704
|
+
# Pass arguments to `list_assets` via a request object, either of type
|
1705
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash.
|
1706
|
+
#
|
1707
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash]
|
1708
|
+
# A request object representing the call parameters. Required. To specify no
|
1709
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1710
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1711
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1712
|
+
#
|
1713
|
+
# @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1714
|
+
# Pass arguments to `list_assets` via keyword arguments. Note that at
|
1715
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1716
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1717
|
+
#
|
1718
|
+
# @param parent [::String]
|
1719
|
+
# Required. The parent location for the resource, in the form of:
|
1720
|
+
# `projects/{project}/locations/{location}`.
|
1721
|
+
# @param page_size [::Integer]
|
1722
|
+
# Requested page size. Server may return fewer items than requested.
|
1723
|
+
# If unspecified, server will pick an appropriate default.
|
1724
|
+
# @param page_token [::String]
|
1725
|
+
# A token identifying a page of results the server should return.
|
1726
|
+
# @param filter [::String]
|
1727
|
+
# Filtering results
|
1728
|
+
# @param order_by [::String]
|
1729
|
+
# Hint for how to order the results
|
1730
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1731
|
+
# @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse]
|
1732
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1733
|
+
#
|
1734
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::ListAssetsResponse]
|
1735
|
+
#
|
1736
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1737
|
+
def list_assets request, options = nil
|
1738
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1739
|
+
|
1740
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest
|
1741
|
+
|
1742
|
+
# Converts hash and nil to an options object
|
1743
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1744
|
+
|
1745
|
+
# Customize the options with defaults
|
1746
|
+
call_metadata = @config.rpcs.list_assets.metadata.to_h
|
1747
|
+
|
1748
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1749
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1750
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1751
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1752
|
+
transports_version_send: [:rest]
|
1753
|
+
|
1754
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1755
|
+
|
1756
|
+
options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
|
1757
|
+
metadata: call_metadata,
|
1758
|
+
retry_policy: @config.rpcs.list_assets.retry_policy
|
1759
|
+
|
1760
|
+
options.apply_defaults timeout: @config.timeout,
|
1761
|
+
metadata: @config.metadata,
|
1762
|
+
retry_policy: @config.retry_policy
|
1763
|
+
|
1764
|
+
@livestream_service_stub.list_assets request, options do |result, operation|
|
1765
|
+
yield result, operation if block_given?
|
1766
|
+
return result
|
1767
|
+
end
|
1768
|
+
rescue ::Gapic::Rest::Error => e
|
1769
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1770
|
+
end
|
1771
|
+
|
1772
|
+
##
|
1773
|
+
# Returns the specified pool.
|
1774
|
+
#
|
1775
|
+
# @overload get_pool(request, options = nil)
|
1776
|
+
# Pass arguments to `get_pool` via a request object, either of type
|
1777
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash.
|
1778
|
+
#
|
1779
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash]
|
1780
|
+
# A request object representing the call parameters. Required. To specify no
|
1781
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1782
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1783
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1784
|
+
#
|
1785
|
+
# @overload get_pool(name: nil)
|
1786
|
+
# Pass arguments to `get_pool` via keyword arguments. Note that at
|
1787
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1788
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1789
|
+
#
|
1790
|
+
# @param name [::String]
|
1791
|
+
# Required. The name of the pool resource, in the form of:
|
1792
|
+
# `projects/{project}/locations/{location}/pools/{poolId}`.
|
1793
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1794
|
+
# @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Pool]
|
1795
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1796
|
+
#
|
1797
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Pool]
|
1798
|
+
#
|
1799
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1800
|
+
def get_pool request, options = nil
|
1801
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1802
|
+
|
1803
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest
|
1804
|
+
|
1805
|
+
# Converts hash and nil to an options object
|
1806
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1807
|
+
|
1808
|
+
# Customize the options with defaults
|
1809
|
+
call_metadata = @config.rpcs.get_pool.metadata.to_h
|
1810
|
+
|
1811
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1812
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1813
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1814
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1815
|
+
transports_version_send: [:rest]
|
1816
|
+
|
1817
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1818
|
+
|
1819
|
+
options.apply_defaults timeout: @config.rpcs.get_pool.timeout,
|
1820
|
+
metadata: call_metadata,
|
1821
|
+
retry_policy: @config.rpcs.get_pool.retry_policy
|
1822
|
+
|
1823
|
+
options.apply_defaults timeout: @config.timeout,
|
1824
|
+
metadata: @config.metadata,
|
1825
|
+
retry_policy: @config.retry_policy
|
1826
|
+
|
1827
|
+
@livestream_service_stub.get_pool request, options do |result, operation|
|
1828
|
+
yield result, operation if block_given?
|
1829
|
+
return result
|
1830
|
+
end
|
1831
|
+
rescue ::Gapic::Rest::Error => e
|
1832
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1833
|
+
end
|
1834
|
+
|
1835
|
+
##
|
1836
|
+
# Updates the specified pool.
|
1837
|
+
#
|
1838
|
+
# @overload update_pool(request, options = nil)
|
1839
|
+
# Pass arguments to `update_pool` via a request object, either of type
|
1840
|
+
# {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash.
|
1841
|
+
#
|
1842
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash]
|
1843
|
+
# A request object representing the call parameters. Required. To specify no
|
1844
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1845
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1846
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1847
|
+
#
|
1848
|
+
# @overload update_pool(update_mask: nil, pool: nil, request_id: nil)
|
1849
|
+
# Pass arguments to `update_pool` via keyword arguments. Note that at
|
1850
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1851
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1852
|
+
#
|
1853
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1854
|
+
# Field mask is used to specify the fields to be overwritten in the Pool
|
1855
|
+
# resource by the update. You can only update the following fields:
|
1856
|
+
#
|
1857
|
+
# * `networkConfig`
|
1858
|
+
#
|
1859
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1860
|
+
# the full request. A field will be overwritten if it is in the mask.
|
1861
|
+
# @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash]
|
1862
|
+
# Required. The pool resource to be updated.
|
1863
|
+
# @param request_id [::String]
|
1864
|
+
# A request ID to identify requests. Specify a unique request ID
|
1865
|
+
# so that if you must retry your request, the server will know to ignore
|
1866
|
+
# the request if it has already been completed. The server will guarantee
|
1867
|
+
# that for at least 60 minutes since the first request.
|
1868
|
+
#
|
1869
|
+
# For example, consider a situation where you make an initial request and the
|
1870
|
+
# request times out. If you make the request again with the same request ID,
|
1871
|
+
# the server can check if original operation with the same request ID was
|
1872
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1873
|
+
# from accidentally creating duplicate commitments.
|
1874
|
+
#
|
1875
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1876
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1877
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1878
|
+
# @yieldparam result [::Gapic::Operation]
|
1879
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1880
|
+
#
|
1881
|
+
# @return [::Gapic::Operation]
|
1882
|
+
#
|
1883
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1884
|
+
def update_pool request, options = nil
|
1885
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1886
|
+
|
1887
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest
|
1888
|
+
|
1889
|
+
# Converts hash and nil to an options object
|
1890
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1891
|
+
|
1892
|
+
# Customize the options with defaults
|
1893
|
+
call_metadata = @config.rpcs.update_pool.metadata.to_h
|
1894
|
+
|
1895
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1896
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1897
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1898
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
|
1899
|
+
transports_version_send: [:rest]
|
1900
|
+
|
1901
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1902
|
+
|
1903
|
+
options.apply_defaults timeout: @config.rpcs.update_pool.timeout,
|
1904
|
+
metadata: call_metadata,
|
1905
|
+
retry_policy: @config.rpcs.update_pool.retry_policy
|
1906
|
+
|
1907
|
+
options.apply_defaults timeout: @config.timeout,
|
1908
|
+
metadata: @config.metadata,
|
1909
|
+
retry_policy: @config.retry_policy
|
1910
|
+
|
1911
|
+
@livestream_service_stub.update_pool request, options do |result, operation|
|
1912
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1913
|
+
yield result, operation if block_given?
|
1914
|
+
return result
|
1915
|
+
end
|
1916
|
+
rescue ::Gapic::Rest::Error => e
|
1917
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1918
|
+
end
|
1919
|
+
|
1474
1920
|
##
|
1475
1921
|
# Configuration class for the LivestreamService REST API.
|
1476
1922
|
#
|
@@ -1683,6 +2129,36 @@ module Google
|
|
1683
2129
|
# @return [::Gapic::Config::Method]
|
1684
2130
|
#
|
1685
2131
|
attr_reader :delete_event
|
2132
|
+
##
|
2133
|
+
# RPC-specific configuration for `create_asset`
|
2134
|
+
# @return [::Gapic::Config::Method]
|
2135
|
+
#
|
2136
|
+
attr_reader :create_asset
|
2137
|
+
##
|
2138
|
+
# RPC-specific configuration for `delete_asset`
|
2139
|
+
# @return [::Gapic::Config::Method]
|
2140
|
+
#
|
2141
|
+
attr_reader :delete_asset
|
2142
|
+
##
|
2143
|
+
# RPC-specific configuration for `get_asset`
|
2144
|
+
# @return [::Gapic::Config::Method]
|
2145
|
+
#
|
2146
|
+
attr_reader :get_asset
|
2147
|
+
##
|
2148
|
+
# RPC-specific configuration for `list_assets`
|
2149
|
+
# @return [::Gapic::Config::Method]
|
2150
|
+
#
|
2151
|
+
attr_reader :list_assets
|
2152
|
+
##
|
2153
|
+
# RPC-specific configuration for `get_pool`
|
2154
|
+
# @return [::Gapic::Config::Method]
|
2155
|
+
#
|
2156
|
+
attr_reader :get_pool
|
2157
|
+
##
|
2158
|
+
# RPC-specific configuration for `update_pool`
|
2159
|
+
# @return [::Gapic::Config::Method]
|
2160
|
+
#
|
2161
|
+
attr_reader :update_pool
|
1686
2162
|
|
1687
2163
|
# @private
|
1688
2164
|
def initialize parent_rpcs = nil
|
@@ -1718,6 +2194,18 @@ module Google
|
|
1718
2194
|
@get_event = ::Gapic::Config::Method.new get_event_config
|
1719
2195
|
delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event
|
1720
2196
|
@delete_event = ::Gapic::Config::Method.new delete_event_config
|
2197
|
+
create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
|
2198
|
+
@create_asset = ::Gapic::Config::Method.new create_asset_config
|
2199
|
+
delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset
|
2200
|
+
@delete_asset = ::Gapic::Config::Method.new delete_asset_config
|
2201
|
+
get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset
|
2202
|
+
@get_asset = ::Gapic::Config::Method.new get_asset_config
|
2203
|
+
list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
|
2204
|
+
@list_assets = ::Gapic::Config::Method.new list_assets_config
|
2205
|
+
get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool
|
2206
|
+
@get_pool = ::Gapic::Config::Method.new get_pool_config
|
2207
|
+
update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool
|
2208
|
+
@update_pool = ::Gapic::Config::Method.new update_pool_config
|
1721
2209
|
|
1722
2210
|
yield self if block_given?
|
1723
2211
|
end
|