google-cloud-video-live_stream-v1 1.0.0 → 1.1.1
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 +441 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb +21 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb +412 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb +237 -0
- data/lib/google/cloud/video/live_stream/v1/version.rb +1 -1
- data/lib/google/cloud/video/livestream/v1/outputs_pb.rb +1 -1
- data/lib/google/cloud/video/livestream/v1/resources_pb.rb +10 -1
- data/lib/google/cloud/video/livestream/v1/service_pb.rb +7 -1
- data/lib/google/cloud/video/livestream/v1/service_services_pb.rb +9 -0
- data/proto_docs/google/api/client.rb +31 -10
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/video/livestream/v1/outputs.rb +15 -2
- data/proto_docs/google/cloud/video/livestream/v1/resources.rb +224 -9
- data/proto_docs/google/cloud/video/livestream/v1/service.rb +106 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89bc73f351e39c1a7821d0cb4397973cea232da67409f929ee9bde5ec22b23a1
|
4
|
+
data.tar.gz: ad0cd4e16ff9d939d409056bfba96b13da843ccd6bef3f6f615dc27a1e9a51cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef02ddeddca8abe38ce4006c094a7bf6979a4984bceeb39c09ffe7fb64f325d50c8fc545c2ee3d7759ad3cab876d2154631d246072d6cf62b59f5d8ab1e9ad5b
|
7
|
+
data.tar.gz: a083bda8d1490b069b5120716fa7b761af8fcb5713656ccad37bda864adab563b8eb5a33b761ecbbeb7a29486db44dec7f0cafee994b046d7ec95659ce2d5789
|
@@ -1955,6 +1955,419 @@ module Google
|
|
1955
1955
|
raise ::Google::Cloud::Error.from_error(e)
|
1956
1956
|
end
|
1957
1957
|
|
1958
|
+
##
|
1959
|
+
# Returns a list of all clips in the specified channel.
|
1960
|
+
#
|
1961
|
+
# @overload list_clips(request, options = nil)
|
1962
|
+
# Pass arguments to `list_clips` via a request object, either of type
|
1963
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListClipsRequest} or an equivalent Hash.
|
1964
|
+
#
|
1965
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Hash]
|
1966
|
+
# A request object representing the call parameters. Required. To specify no
|
1967
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1968
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1969
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1970
|
+
#
|
1971
|
+
# @overload list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1972
|
+
# Pass arguments to `list_clips` via keyword arguments. Note that at
|
1973
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1974
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1975
|
+
#
|
1976
|
+
# @param parent [::String]
|
1977
|
+
# Required. Parent value for ListClipsRequest
|
1978
|
+
# @param page_size [::Integer]
|
1979
|
+
# Requested page size. Server may return fewer items than requested.
|
1980
|
+
# If unspecified, server will pick an appropriate default.
|
1981
|
+
# @param page_token [::String]
|
1982
|
+
# A token identifying a page of results the server should return.
|
1983
|
+
# @param filter [::String]
|
1984
|
+
# Filtering results
|
1985
|
+
# @param order_by [::String]
|
1986
|
+
# Hint for how to order the results
|
1987
|
+
#
|
1988
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1989
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>]
|
1990
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1991
|
+
#
|
1992
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>]
|
1993
|
+
#
|
1994
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1995
|
+
#
|
1996
|
+
# @example Basic example
|
1997
|
+
# require "google/cloud/video/live_stream/v1"
|
1998
|
+
#
|
1999
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2000
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
2001
|
+
#
|
2002
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2003
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new
|
2004
|
+
#
|
2005
|
+
# # Call the list_clips method.
|
2006
|
+
# result = client.list_clips request
|
2007
|
+
#
|
2008
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2009
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2010
|
+
# result.each do |item|
|
2011
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip.
|
2012
|
+
# p item
|
2013
|
+
# end
|
2014
|
+
#
|
2015
|
+
def list_clips request, options = nil
|
2016
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2017
|
+
|
2018
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest
|
2019
|
+
|
2020
|
+
# Converts hash and nil to an options object
|
2021
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2022
|
+
|
2023
|
+
# Customize the options with defaults
|
2024
|
+
metadata = @config.rpcs.list_clips.metadata.to_h
|
2025
|
+
|
2026
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2027
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2028
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2029
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
2030
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2031
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2032
|
+
|
2033
|
+
header_params = {}
|
2034
|
+
if request.parent
|
2035
|
+
header_params["parent"] = request.parent
|
2036
|
+
end
|
2037
|
+
|
2038
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2039
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2040
|
+
|
2041
|
+
options.apply_defaults timeout: @config.rpcs.list_clips.timeout,
|
2042
|
+
metadata: metadata,
|
2043
|
+
retry_policy: @config.rpcs.list_clips.retry_policy
|
2044
|
+
|
2045
|
+
options.apply_defaults timeout: @config.timeout,
|
2046
|
+
metadata: @config.metadata,
|
2047
|
+
retry_policy: @config.retry_policy
|
2048
|
+
|
2049
|
+
@livestream_service_stub.call_rpc :list_clips, request, options: options do |response, operation|
|
2050
|
+
response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_clips, request, response, operation, options
|
2051
|
+
yield response, operation if block_given?
|
2052
|
+
return response
|
2053
|
+
end
|
2054
|
+
rescue ::GRPC::BadStatus => e
|
2055
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2056
|
+
end
|
2057
|
+
|
2058
|
+
##
|
2059
|
+
# Returns the specified clip.
|
2060
|
+
#
|
2061
|
+
# @overload get_clip(request, options = nil)
|
2062
|
+
# Pass arguments to `get_clip` via a request object, either of type
|
2063
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetClipRequest} or an equivalent Hash.
|
2064
|
+
#
|
2065
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Hash]
|
2066
|
+
# A request object representing the call parameters. Required. To specify no
|
2067
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2068
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2069
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2070
|
+
#
|
2071
|
+
# @overload get_clip(name: nil)
|
2072
|
+
# Pass arguments to `get_clip` via keyword arguments. Note that at
|
2073
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2074
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2075
|
+
#
|
2076
|
+
# @param name [::String]
|
2077
|
+
# Required. Name of the resource, in the following form:
|
2078
|
+
# `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`.
|
2079
|
+
#
|
2080
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2081
|
+
# @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Clip]
|
2082
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2083
|
+
#
|
2084
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Clip]
|
2085
|
+
#
|
2086
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2087
|
+
#
|
2088
|
+
# @example Basic example
|
2089
|
+
# require "google/cloud/video/live_stream/v1"
|
2090
|
+
#
|
2091
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2092
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
2093
|
+
#
|
2094
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2095
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new
|
2096
|
+
#
|
2097
|
+
# # Call the get_clip method.
|
2098
|
+
# result = client.get_clip request
|
2099
|
+
#
|
2100
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip.
|
2101
|
+
# p result
|
2102
|
+
#
|
2103
|
+
def get_clip request, options = nil
|
2104
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2105
|
+
|
2106
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetClipRequest
|
2107
|
+
|
2108
|
+
# Converts hash and nil to an options object
|
2109
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2110
|
+
|
2111
|
+
# Customize the options with defaults
|
2112
|
+
metadata = @config.rpcs.get_clip.metadata.to_h
|
2113
|
+
|
2114
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2115
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2116
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2117
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
2118
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2119
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2120
|
+
|
2121
|
+
header_params = {}
|
2122
|
+
if request.name
|
2123
|
+
header_params["name"] = request.name
|
2124
|
+
end
|
2125
|
+
|
2126
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2127
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2128
|
+
|
2129
|
+
options.apply_defaults timeout: @config.rpcs.get_clip.timeout,
|
2130
|
+
metadata: metadata,
|
2131
|
+
retry_policy: @config.rpcs.get_clip.retry_policy
|
2132
|
+
|
2133
|
+
options.apply_defaults timeout: @config.timeout,
|
2134
|
+
metadata: @config.metadata,
|
2135
|
+
retry_policy: @config.retry_policy
|
2136
|
+
|
2137
|
+
@livestream_service_stub.call_rpc :get_clip, request, options: options do |response, operation|
|
2138
|
+
yield response, operation if block_given?
|
2139
|
+
return response
|
2140
|
+
end
|
2141
|
+
rescue ::GRPC::BadStatus => e
|
2142
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2143
|
+
end
|
2144
|
+
|
2145
|
+
##
|
2146
|
+
# Creates a clip with the provided clip ID in the specified channel.
|
2147
|
+
#
|
2148
|
+
# @overload create_clip(request, options = nil)
|
2149
|
+
# Pass arguments to `create_clip` via a request object, either of type
|
2150
|
+
# {::Google::Cloud::Video::LiveStream::V1::CreateClipRequest} or an equivalent Hash.
|
2151
|
+
#
|
2152
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Hash]
|
2153
|
+
# A request object representing the call parameters. Required. To specify no
|
2154
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2155
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2156
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2157
|
+
#
|
2158
|
+
# @overload create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil)
|
2159
|
+
# Pass arguments to `create_clip` via keyword arguments. Note that at
|
2160
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2161
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2162
|
+
#
|
2163
|
+
# @param parent [::String]
|
2164
|
+
# Required. The parent resource name, in the following form:
|
2165
|
+
# `projects/{project}/locations/{location}/channels/{channel}`.
|
2166
|
+
# @param clip_id [::String]
|
2167
|
+
# Required. Id of the requesting object in the following form:
|
2168
|
+
#
|
2169
|
+
# 1. 1 character minimum, 63 characters maximum
|
2170
|
+
# 2. Only contains letters, digits, underscores, and hyphens
|
2171
|
+
# @param clip [::Google::Cloud::Video::LiveStream::V1::Clip, ::Hash]
|
2172
|
+
# Required. The resource being created
|
2173
|
+
# @param request_id [::String]
|
2174
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2175
|
+
# request ID so that if you must retry your request, the server will know to
|
2176
|
+
# ignore the request if it has already been completed. The server will
|
2177
|
+
# guarantee that for at least 60 minutes since the first request.
|
2178
|
+
#
|
2179
|
+
# For example, consider a situation where you make an initial request and
|
2180
|
+
# the request times out. If you make the request again with the same request
|
2181
|
+
# ID, the server can check if original operation with the same request ID
|
2182
|
+
# was received, and if so, will ignore the second request. This prevents
|
2183
|
+
# clients from accidentally creating duplicate commitments.
|
2184
|
+
#
|
2185
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2186
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2187
|
+
#
|
2188
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2189
|
+
# @yieldparam response [::Gapic::Operation]
|
2190
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2191
|
+
#
|
2192
|
+
# @return [::Gapic::Operation]
|
2193
|
+
#
|
2194
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2195
|
+
#
|
2196
|
+
# @example Basic example
|
2197
|
+
# require "google/cloud/video/live_stream/v1"
|
2198
|
+
#
|
2199
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2200
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
2201
|
+
#
|
2202
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2203
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new
|
2204
|
+
#
|
2205
|
+
# # Call the create_clip method.
|
2206
|
+
# result = client.create_clip request
|
2207
|
+
#
|
2208
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2209
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2210
|
+
# # Here is how to wait for a response.
|
2211
|
+
# result.wait_until_done! timeout: 60
|
2212
|
+
# if result.response?
|
2213
|
+
# p result.response
|
2214
|
+
# else
|
2215
|
+
# puts "No response received."
|
2216
|
+
# end
|
2217
|
+
#
|
2218
|
+
def create_clip request, options = nil
|
2219
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2220
|
+
|
2221
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest
|
2222
|
+
|
2223
|
+
# Converts hash and nil to an options object
|
2224
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2225
|
+
|
2226
|
+
# Customize the options with defaults
|
2227
|
+
metadata = @config.rpcs.create_clip.metadata.to_h
|
2228
|
+
|
2229
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2230
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2231
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2232
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
2233
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2234
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2235
|
+
|
2236
|
+
header_params = {}
|
2237
|
+
if request.parent
|
2238
|
+
header_params["parent"] = request.parent
|
2239
|
+
end
|
2240
|
+
|
2241
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2242
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2243
|
+
|
2244
|
+
options.apply_defaults timeout: @config.rpcs.create_clip.timeout,
|
2245
|
+
metadata: metadata,
|
2246
|
+
retry_policy: @config.rpcs.create_clip.retry_policy
|
2247
|
+
|
2248
|
+
options.apply_defaults timeout: @config.timeout,
|
2249
|
+
metadata: @config.metadata,
|
2250
|
+
retry_policy: @config.retry_policy
|
2251
|
+
|
2252
|
+
@livestream_service_stub.call_rpc :create_clip, request, options: options do |response, operation|
|
2253
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2254
|
+
yield response, operation if block_given?
|
2255
|
+
return response
|
2256
|
+
end
|
2257
|
+
rescue ::GRPC::BadStatus => e
|
2258
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2259
|
+
end
|
2260
|
+
|
2261
|
+
##
|
2262
|
+
# Deletes the specified clip job resource. This method only deletes the clip
|
2263
|
+
# job and does not delete the VOD clip stored in the GCS.
|
2264
|
+
#
|
2265
|
+
# @overload delete_clip(request, options = nil)
|
2266
|
+
# Pass arguments to `delete_clip` via a request object, either of type
|
2267
|
+
# {::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest} or an equivalent Hash.
|
2268
|
+
#
|
2269
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Hash]
|
2270
|
+
# A request object representing the call parameters. Required. To specify no
|
2271
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2272
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2273
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2274
|
+
#
|
2275
|
+
# @overload delete_clip(name: nil, request_id: nil)
|
2276
|
+
# Pass arguments to `delete_clip` via keyword arguments. Note that at
|
2277
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2278
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2279
|
+
#
|
2280
|
+
# @param name [::String]
|
2281
|
+
# Required. The name of the clip resource, in the form of:
|
2282
|
+
# `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.
|
2283
|
+
# @param request_id [::String]
|
2284
|
+
# Optional. A request ID to identify requests. Specify a unique request ID
|
2285
|
+
# so that if you must retry your request, the server will know to ignore
|
2286
|
+
# the request if it has already been completed. The server will guarantee
|
2287
|
+
# that for at least 60 minutes since the first request.
|
2288
|
+
#
|
2289
|
+
# For example, consider a situation where you make an initial request and the
|
2290
|
+
# request times out. If you make the request again with the same request ID,
|
2291
|
+
# the server can check if original operation with the same request ID was
|
2292
|
+
# received, and if so, will ignore the second request. This prevents clients
|
2293
|
+
# from accidentally creating duplicate commitments.
|
2294
|
+
#
|
2295
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2296
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
2297
|
+
#
|
2298
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2299
|
+
# @yieldparam response [::Gapic::Operation]
|
2300
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2301
|
+
#
|
2302
|
+
# @return [::Gapic::Operation]
|
2303
|
+
#
|
2304
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2305
|
+
#
|
2306
|
+
# @example Basic example
|
2307
|
+
# require "google/cloud/video/live_stream/v1"
|
2308
|
+
#
|
2309
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2310
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
2311
|
+
#
|
2312
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2313
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new
|
2314
|
+
#
|
2315
|
+
# # Call the delete_clip method.
|
2316
|
+
# result = client.delete_clip request
|
2317
|
+
#
|
2318
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2319
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2320
|
+
# # Here is how to wait for a response.
|
2321
|
+
# result.wait_until_done! timeout: 60
|
2322
|
+
# if result.response?
|
2323
|
+
# p result.response
|
2324
|
+
# else
|
2325
|
+
# puts "No response received."
|
2326
|
+
# end
|
2327
|
+
#
|
2328
|
+
def delete_clip request, options = nil
|
2329
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2330
|
+
|
2331
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest
|
2332
|
+
|
2333
|
+
# Converts hash and nil to an options object
|
2334
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2335
|
+
|
2336
|
+
# Customize the options with defaults
|
2337
|
+
metadata = @config.rpcs.delete_clip.metadata.to_h
|
2338
|
+
|
2339
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2340
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2341
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2342
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
2343
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2344
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2345
|
+
|
2346
|
+
header_params = {}
|
2347
|
+
if request.name
|
2348
|
+
header_params["name"] = request.name
|
2349
|
+
end
|
2350
|
+
|
2351
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2352
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2353
|
+
|
2354
|
+
options.apply_defaults timeout: @config.rpcs.delete_clip.timeout,
|
2355
|
+
metadata: metadata,
|
2356
|
+
retry_policy: @config.rpcs.delete_clip.retry_policy
|
2357
|
+
|
2358
|
+
options.apply_defaults timeout: @config.timeout,
|
2359
|
+
metadata: @config.metadata,
|
2360
|
+
retry_policy: @config.retry_policy
|
2361
|
+
|
2362
|
+
@livestream_service_stub.call_rpc :delete_clip, request, options: options do |response, operation|
|
2363
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2364
|
+
yield response, operation if block_given?
|
2365
|
+
return response
|
2366
|
+
end
|
2367
|
+
rescue ::GRPC::BadStatus => e
|
2368
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2369
|
+
end
|
2370
|
+
|
1958
2371
|
##
|
1959
2372
|
# Creates a Asset with the provided unique ID in the specified
|
1960
2373
|
# region.
|
@@ -2805,6 +3218,26 @@ module Google
|
|
2805
3218
|
#
|
2806
3219
|
attr_reader :delete_event
|
2807
3220
|
##
|
3221
|
+
# RPC-specific configuration for `list_clips`
|
3222
|
+
# @return [::Gapic::Config::Method]
|
3223
|
+
#
|
3224
|
+
attr_reader :list_clips
|
3225
|
+
##
|
3226
|
+
# RPC-specific configuration for `get_clip`
|
3227
|
+
# @return [::Gapic::Config::Method]
|
3228
|
+
#
|
3229
|
+
attr_reader :get_clip
|
3230
|
+
##
|
3231
|
+
# RPC-specific configuration for `create_clip`
|
3232
|
+
# @return [::Gapic::Config::Method]
|
3233
|
+
#
|
3234
|
+
attr_reader :create_clip
|
3235
|
+
##
|
3236
|
+
# RPC-specific configuration for `delete_clip`
|
3237
|
+
# @return [::Gapic::Config::Method]
|
3238
|
+
#
|
3239
|
+
attr_reader :delete_clip
|
3240
|
+
##
|
2808
3241
|
# RPC-specific configuration for `create_asset`
|
2809
3242
|
# @return [::Gapic::Config::Method]
|
2810
3243
|
#
|
@@ -2869,6 +3302,14 @@ module Google
|
|
2869
3302
|
@get_event = ::Gapic::Config::Method.new get_event_config
|
2870
3303
|
delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event
|
2871
3304
|
@delete_event = ::Gapic::Config::Method.new delete_event_config
|
3305
|
+
list_clips_config = parent_rpcs.list_clips if parent_rpcs.respond_to? :list_clips
|
3306
|
+
@list_clips = ::Gapic::Config::Method.new list_clips_config
|
3307
|
+
get_clip_config = parent_rpcs.get_clip if parent_rpcs.respond_to? :get_clip
|
3308
|
+
@get_clip = ::Gapic::Config::Method.new get_clip_config
|
3309
|
+
create_clip_config = parent_rpcs.create_clip if parent_rpcs.respond_to? :create_clip
|
3310
|
+
@create_clip = ::Gapic::Config::Method.new create_clip_config
|
3311
|
+
delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip
|
3312
|
+
@delete_clip = ::Gapic::Config::Method.new delete_clip_config
|
2872
3313
|
create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
|
2873
3314
|
@create_asset = ::Gapic::Config::Method.new create_asset_config
|
2874
3315
|
delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset
|
@@ -63,6 +63,27 @@ module Google
|
|
63
63
|
"projects/#{project}/locations/#{location}/channels/#{channel}"
|
64
64
|
end
|
65
65
|
|
66
|
+
##
|
67
|
+
# Create a fully-qualified Clip resource string.
|
68
|
+
#
|
69
|
+
# The resource will be in the following format:
|
70
|
+
#
|
71
|
+
# `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`
|
72
|
+
#
|
73
|
+
# @param project [String]
|
74
|
+
# @param location [String]
|
75
|
+
# @param channel [String]
|
76
|
+
# @param clip [String]
|
77
|
+
#
|
78
|
+
# @return [::String]
|
79
|
+
def clip_path project:, location:, channel:, clip:
|
80
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
81
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
82
|
+
raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/"
|
83
|
+
|
84
|
+
"projects/#{project}/locations/#{location}/channels/#{channel}/clips/#{clip}"
|
85
|
+
end
|
86
|
+
|
66
87
|
##
|
67
88
|
# Create a fully-qualified Event resource string.
|
68
89
|
#
|