google-cloud-video-live_stream-v1 0.5.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -206,7 +206,8 @@ module Google
206
206
  credentials: credentials,
207
207
  endpoint: @config.endpoint,
208
208
  channel_args: @config.channel_args,
209
- interceptors: @config.interceptors
209
+ interceptors: @config.interceptors,
210
+ channel_pool_config: @config.channel_pool
210
211
  )
211
212
  end
212
213
 
@@ -1918,6 +1919,616 @@ module Google
1918
1919
  raise ::Google::Cloud::Error.from_error(e)
1919
1920
  end
1920
1921
 
1922
+ ##
1923
+ # Creates a Asset with the provided unique ID in the specified
1924
+ # region.
1925
+ #
1926
+ # @overload create_asset(request, options = nil)
1927
+ # Pass arguments to `create_asset` via a request object, either of type
1928
+ # {::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest} or an equivalent Hash.
1929
+ #
1930
+ # @param request [::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash]
1931
+ # A request object representing the call parameters. Required. To specify no
1932
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1933
+ # @param options [::Gapic::CallOptions, ::Hash]
1934
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1935
+ #
1936
+ # @overload create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil)
1937
+ # Pass arguments to `create_asset` via keyword arguments. Note that at
1938
+ # least one keyword argument is required. To specify no parameters, or to keep all
1939
+ # the default parameter values, pass an empty Hash as a request object (see above).
1940
+ #
1941
+ # @param parent [::String]
1942
+ # Required. The parent location for the resource, in the form of:
1943
+ # `projects/{project}/locations/{location}`.
1944
+ # @param asset [::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash]
1945
+ # Required. The asset resource to be created.
1946
+ # @param asset_id [::String]
1947
+ # Required. The ID of the asset resource to be created.
1948
+ # This value must be 1-63 characters, begin and end with `[a-z0-9]`,
1949
+ # could contain dashes (-) in between.
1950
+ # @param request_id [::String]
1951
+ # A request ID to identify requests. Specify a unique request ID
1952
+ # so that if you must retry your request, the server will know to ignore
1953
+ # the request if it has already been completed. The server will guarantee
1954
+ # that for at least 60 minutes since the first request.
1955
+ #
1956
+ # For example, consider a situation where you make an initial request and the
1957
+ # request times out. If you make the request again with the same request ID,
1958
+ # the server can check if original operation with the same request ID was
1959
+ # received, and if so, will ignore the second request. This prevents clients
1960
+ # from accidentally creating duplicate commitments.
1961
+ #
1962
+ # The request ID must be a valid UUID with the exception that zero UUID is
1963
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
1964
+ #
1965
+ # @yield [response, operation] Access the result along with the RPC operation
1966
+ # @yieldparam response [::Gapic::Operation]
1967
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1968
+ #
1969
+ # @return [::Gapic::Operation]
1970
+ #
1971
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1972
+ #
1973
+ # @example Basic example
1974
+ # require "google/cloud/video/live_stream/v1"
1975
+ #
1976
+ # # Create a client object. The client can be reused for multiple calls.
1977
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
1978
+ #
1979
+ # # Create a request. To set request fields, pass in keyword arguments.
1980
+ # request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new
1981
+ #
1982
+ # # Call the create_asset method.
1983
+ # result = client.create_asset request
1984
+ #
1985
+ # # The returned object is of type Gapic::Operation. You can use it to
1986
+ # # check the status of an operation, cancel it, or wait for results.
1987
+ # # Here is how to wait for a response.
1988
+ # result.wait_until_done! timeout: 60
1989
+ # if result.response?
1990
+ # p result.response
1991
+ # else
1992
+ # puts "No response received."
1993
+ # end
1994
+ #
1995
+ def create_asset request, options = nil
1996
+ raise ::ArgumentError, "request must be provided" if request.nil?
1997
+
1998
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest
1999
+
2000
+ # Converts hash and nil to an options object
2001
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2002
+
2003
+ # Customize the options with defaults
2004
+ metadata = @config.rpcs.create_asset.metadata.to_h
2005
+
2006
+ # Set x-goog-api-client and x-goog-user-project headers
2007
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2008
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2009
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2010
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2011
+
2012
+ header_params = {}
2013
+ if request.parent
2014
+ header_params["parent"] = request.parent
2015
+ end
2016
+
2017
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2018
+ metadata[:"x-goog-request-params"] ||= request_params_header
2019
+
2020
+ options.apply_defaults timeout: @config.rpcs.create_asset.timeout,
2021
+ metadata: metadata,
2022
+ retry_policy: @config.rpcs.create_asset.retry_policy
2023
+
2024
+ options.apply_defaults timeout: @config.timeout,
2025
+ metadata: @config.metadata,
2026
+ retry_policy: @config.retry_policy
2027
+
2028
+ @livestream_service_stub.call_rpc :create_asset, request, options: options do |response, operation|
2029
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2030
+ yield response, operation if block_given?
2031
+ return response
2032
+ end
2033
+ rescue ::GRPC::BadStatus => e
2034
+ raise ::Google::Cloud::Error.from_error(e)
2035
+ end
2036
+
2037
+ ##
2038
+ # Deletes the specified asset if it is not used.
2039
+ #
2040
+ # @overload delete_asset(request, options = nil)
2041
+ # Pass arguments to `delete_asset` via a request object, either of type
2042
+ # {::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest} or an equivalent Hash.
2043
+ #
2044
+ # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash]
2045
+ # A request object representing the call parameters. Required. To specify no
2046
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2047
+ # @param options [::Gapic::CallOptions, ::Hash]
2048
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2049
+ #
2050
+ # @overload delete_asset(name: nil, request_id: nil)
2051
+ # Pass arguments to `delete_asset` via keyword arguments. Note that at
2052
+ # least one keyword argument is required. To specify no parameters, or to keep all
2053
+ # the default parameter values, pass an empty Hash as a request object (see above).
2054
+ #
2055
+ # @param name [::String]
2056
+ # Required. The name of the asset resource, in the form of:
2057
+ # `projects/{project}/locations/{location}/assets/{assetId}`.
2058
+ # @param request_id [::String]
2059
+ # A request ID to identify requests. Specify a unique request ID
2060
+ # so that if you must retry your request, the server will know to ignore
2061
+ # the request if it has already been completed. The server will guarantee
2062
+ # that for at least 60 minutes after the first request.
2063
+ #
2064
+ # For example, consider a situation where you make an initial request and the
2065
+ # request times out. If you make the request again with the same request ID,
2066
+ # the server can check if original operation with the same request ID was
2067
+ # received, and if so, will ignore the second request. This prevents clients
2068
+ # from accidentally creating duplicate commitments.
2069
+ #
2070
+ # The request ID must be a valid UUID with the exception that zero UUID is
2071
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2072
+ #
2073
+ # @yield [response, operation] Access the result along with the RPC operation
2074
+ # @yieldparam response [::Gapic::Operation]
2075
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2076
+ #
2077
+ # @return [::Gapic::Operation]
2078
+ #
2079
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2080
+ #
2081
+ # @example Basic example
2082
+ # require "google/cloud/video/live_stream/v1"
2083
+ #
2084
+ # # Create a client object. The client can be reused for multiple calls.
2085
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2086
+ #
2087
+ # # Create a request. To set request fields, pass in keyword arguments.
2088
+ # request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new
2089
+ #
2090
+ # # Call the delete_asset method.
2091
+ # result = client.delete_asset request
2092
+ #
2093
+ # # The returned object is of type Gapic::Operation. You can use it to
2094
+ # # check the status of an operation, cancel it, or wait for results.
2095
+ # # Here is how to wait for a response.
2096
+ # result.wait_until_done! timeout: 60
2097
+ # if result.response?
2098
+ # p result.response
2099
+ # else
2100
+ # puts "No response received."
2101
+ # end
2102
+ #
2103
+ def delete_asset 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::DeleteAssetRequest
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.delete_asset.metadata.to_h
2113
+
2114
+ # Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id
2119
+
2120
+ header_params = {}
2121
+ if request.name
2122
+ header_params["name"] = request.name
2123
+ end
2124
+
2125
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2126
+ metadata[:"x-goog-request-params"] ||= request_params_header
2127
+
2128
+ options.apply_defaults timeout: @config.rpcs.delete_asset.timeout,
2129
+ metadata: metadata,
2130
+ retry_policy: @config.rpcs.delete_asset.retry_policy
2131
+
2132
+ options.apply_defaults timeout: @config.timeout,
2133
+ metadata: @config.metadata,
2134
+ retry_policy: @config.retry_policy
2135
+
2136
+ @livestream_service_stub.call_rpc :delete_asset, request, options: options do |response, operation|
2137
+ response = ::Gapic::Operation.new response, @operations_client, options: options
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
+ # Returns the specified asset.
2147
+ #
2148
+ # @overload get_asset(request, options = nil)
2149
+ # Pass arguments to `get_asset` via a request object, either of type
2150
+ # {::Google::Cloud::Video::LiveStream::V1::GetAssetRequest} or an equivalent Hash.
2151
+ #
2152
+ # @param request [::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::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 get_asset(name: nil)
2159
+ # Pass arguments to `get_asset` 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 name [::String]
2164
+ # Required. Name of the resource, in the following form:
2165
+ # `projects/{project}/locations/{location}/assets/{asset}`.
2166
+ #
2167
+ # @yield [response, operation] Access the result along with the RPC operation
2168
+ # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Asset]
2169
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2170
+ #
2171
+ # @return [::Google::Cloud::Video::LiveStream::V1::Asset]
2172
+ #
2173
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2174
+ #
2175
+ # @example Basic example
2176
+ # require "google/cloud/video/live_stream/v1"
2177
+ #
2178
+ # # Create a client object. The client can be reused for multiple calls.
2179
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2180
+ #
2181
+ # # Create a request. To set request fields, pass in keyword arguments.
2182
+ # request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new
2183
+ #
2184
+ # # Call the get_asset method.
2185
+ # result = client.get_asset request
2186
+ #
2187
+ # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset.
2188
+ # p result
2189
+ #
2190
+ def get_asset request, options = nil
2191
+ raise ::ArgumentError, "request must be provided" if request.nil?
2192
+
2193
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest
2194
+
2195
+ # Converts hash and nil to an options object
2196
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2197
+
2198
+ # Customize the options with defaults
2199
+ metadata = @config.rpcs.get_asset.metadata.to_h
2200
+
2201
+ # Set x-goog-api-client and x-goog-user-project headers
2202
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2203
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2204
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2205
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2206
+
2207
+ header_params = {}
2208
+ if request.name
2209
+ header_params["name"] = request.name
2210
+ end
2211
+
2212
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2213
+ metadata[:"x-goog-request-params"] ||= request_params_header
2214
+
2215
+ options.apply_defaults timeout: @config.rpcs.get_asset.timeout,
2216
+ metadata: metadata,
2217
+ retry_policy: @config.rpcs.get_asset.retry_policy
2218
+
2219
+ options.apply_defaults timeout: @config.timeout,
2220
+ metadata: @config.metadata,
2221
+ retry_policy: @config.retry_policy
2222
+
2223
+ @livestream_service_stub.call_rpc :get_asset, request, options: options do |response, operation|
2224
+ yield response, operation if block_given?
2225
+ return response
2226
+ end
2227
+ rescue ::GRPC::BadStatus => e
2228
+ raise ::Google::Cloud::Error.from_error(e)
2229
+ end
2230
+
2231
+ ##
2232
+ # Returns a list of all assets in the specified region.
2233
+ #
2234
+ # @overload list_assets(request, options = nil)
2235
+ # Pass arguments to `list_assets` via a request object, either of type
2236
+ # {::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest} or an equivalent Hash.
2237
+ #
2238
+ # @param request [::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash]
2239
+ # A request object representing the call parameters. Required. To specify no
2240
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2241
+ # @param options [::Gapic::CallOptions, ::Hash]
2242
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2243
+ #
2244
+ # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2245
+ # Pass arguments to `list_assets` via keyword arguments. Note that at
2246
+ # least one keyword argument is required. To specify no parameters, or to keep all
2247
+ # the default parameter values, pass an empty Hash as a request object (see above).
2248
+ #
2249
+ # @param parent [::String]
2250
+ # Required. The parent location for the resource, in the form of:
2251
+ # `projects/{project}/locations/{location}`.
2252
+ # @param page_size [::Integer]
2253
+ # Requested page size. Server may return fewer items than requested.
2254
+ # If unspecified, server will pick an appropriate default.
2255
+ # @param page_token [::String]
2256
+ # A token identifying a page of results the server should return.
2257
+ # @param filter [::String]
2258
+ # Filtering results
2259
+ # @param order_by [::String]
2260
+ # Hint for how to order the results
2261
+ #
2262
+ # @yield [response, operation] Access the result along with the RPC operation
2263
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>]
2264
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2265
+ #
2266
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>]
2267
+ #
2268
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2269
+ #
2270
+ # @example Basic example
2271
+ # require "google/cloud/video/live_stream/v1"
2272
+ #
2273
+ # # Create a client object. The client can be reused for multiple calls.
2274
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2275
+ #
2276
+ # # Create a request. To set request fields, pass in keyword arguments.
2277
+ # request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new
2278
+ #
2279
+ # # Call the list_assets method.
2280
+ # result = client.list_assets request
2281
+ #
2282
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2283
+ # # over elements, and API calls will be issued to fetch pages as needed.
2284
+ # result.each do |item|
2285
+ # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset.
2286
+ # p item
2287
+ # end
2288
+ #
2289
+ def list_assets request, options = nil
2290
+ raise ::ArgumentError, "request must be provided" if request.nil?
2291
+
2292
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest
2293
+
2294
+ # Converts hash and nil to an options object
2295
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2296
+
2297
+ # Customize the options with defaults
2298
+ metadata = @config.rpcs.list_assets.metadata.to_h
2299
+
2300
+ # Set x-goog-api-client and x-goog-user-project headers
2301
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2302
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2303
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2304
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2305
+
2306
+ header_params = {}
2307
+ if request.parent
2308
+ header_params["parent"] = request.parent
2309
+ end
2310
+
2311
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2312
+ metadata[:"x-goog-request-params"] ||= request_params_header
2313
+
2314
+ options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
2315
+ metadata: metadata,
2316
+ retry_policy: @config.rpcs.list_assets.retry_policy
2317
+
2318
+ options.apply_defaults timeout: @config.timeout,
2319
+ metadata: @config.metadata,
2320
+ retry_policy: @config.retry_policy
2321
+
2322
+ @livestream_service_stub.call_rpc :list_assets, request, options: options do |response, operation|
2323
+ response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_assets, request, response, operation, options
2324
+ yield response, operation if block_given?
2325
+ return response
2326
+ end
2327
+ rescue ::GRPC::BadStatus => e
2328
+ raise ::Google::Cloud::Error.from_error(e)
2329
+ end
2330
+
2331
+ ##
2332
+ # Returns the specified pool.
2333
+ #
2334
+ # @overload get_pool(request, options = nil)
2335
+ # Pass arguments to `get_pool` via a request object, either of type
2336
+ # {::Google::Cloud::Video::LiveStream::V1::GetPoolRequest} or an equivalent Hash.
2337
+ #
2338
+ # @param request [::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash]
2339
+ # A request object representing the call parameters. Required. To specify no
2340
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2341
+ # @param options [::Gapic::CallOptions, ::Hash]
2342
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2343
+ #
2344
+ # @overload get_pool(name: nil)
2345
+ # Pass arguments to `get_pool` via keyword arguments. Note that at
2346
+ # least one keyword argument is required. To specify no parameters, or to keep all
2347
+ # the default parameter values, pass an empty Hash as a request object (see above).
2348
+ #
2349
+ # @param name [::String]
2350
+ # Required. The name of the pool resource, in the form of:
2351
+ # `projects/{project}/locations/{location}/pools/{poolId}`.
2352
+ #
2353
+ # @yield [response, operation] Access the result along with the RPC operation
2354
+ # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Pool]
2355
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2356
+ #
2357
+ # @return [::Google::Cloud::Video::LiveStream::V1::Pool]
2358
+ #
2359
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2360
+ #
2361
+ # @example Basic example
2362
+ # require "google/cloud/video/live_stream/v1"
2363
+ #
2364
+ # # Create a client object. The client can be reused for multiple calls.
2365
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2366
+ #
2367
+ # # Create a request. To set request fields, pass in keyword arguments.
2368
+ # request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new
2369
+ #
2370
+ # # Call the get_pool method.
2371
+ # result = client.get_pool request
2372
+ #
2373
+ # # The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool.
2374
+ # p result
2375
+ #
2376
+ def get_pool request, options = nil
2377
+ raise ::ArgumentError, "request must be provided" if request.nil?
2378
+
2379
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest
2380
+
2381
+ # Converts hash and nil to an options object
2382
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2383
+
2384
+ # Customize the options with defaults
2385
+ metadata = @config.rpcs.get_pool.metadata.to_h
2386
+
2387
+ # Set x-goog-api-client and x-goog-user-project headers
2388
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2389
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2390
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2391
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2392
+
2393
+ header_params = {}
2394
+ if request.name
2395
+ header_params["name"] = request.name
2396
+ end
2397
+
2398
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2399
+ metadata[:"x-goog-request-params"] ||= request_params_header
2400
+
2401
+ options.apply_defaults timeout: @config.rpcs.get_pool.timeout,
2402
+ metadata: metadata,
2403
+ retry_policy: @config.rpcs.get_pool.retry_policy
2404
+
2405
+ options.apply_defaults timeout: @config.timeout,
2406
+ metadata: @config.metadata,
2407
+ retry_policy: @config.retry_policy
2408
+
2409
+ @livestream_service_stub.call_rpc :get_pool, request, options: options do |response, operation|
2410
+ yield response, operation if block_given?
2411
+ return response
2412
+ end
2413
+ rescue ::GRPC::BadStatus => e
2414
+ raise ::Google::Cloud::Error.from_error(e)
2415
+ end
2416
+
2417
+ ##
2418
+ # Updates the specified pool.
2419
+ #
2420
+ # @overload update_pool(request, options = nil)
2421
+ # Pass arguments to `update_pool` via a request object, either of type
2422
+ # {::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest} or an equivalent Hash.
2423
+ #
2424
+ # @param request [::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash]
2425
+ # A request object representing the call parameters. Required. To specify no
2426
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2427
+ # @param options [::Gapic::CallOptions, ::Hash]
2428
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2429
+ #
2430
+ # @overload update_pool(update_mask: nil, pool: nil, request_id: nil)
2431
+ # Pass arguments to `update_pool` via keyword arguments. Note that at
2432
+ # least one keyword argument is required. To specify no parameters, or to keep all
2433
+ # the default parameter values, pass an empty Hash as a request object (see above).
2434
+ #
2435
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2436
+ # Field mask is used to specify the fields to be overwritten in the Pool
2437
+ # resource by the update. You can only update the following fields:
2438
+ #
2439
+ # * `networkConfig`
2440
+ #
2441
+ # The fields specified in the update_mask are relative to the resource, not
2442
+ # the full request. A field will be overwritten if it is in the mask.
2443
+ # @param pool [::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash]
2444
+ # Required. The pool resource to be updated.
2445
+ # @param request_id [::String]
2446
+ # A request ID to identify requests. Specify a unique request ID
2447
+ # so that if you must retry your request, the server will know to ignore
2448
+ # the request if it has already been completed. The server will guarantee
2449
+ # that for at least 60 minutes since the first request.
2450
+ #
2451
+ # For example, consider a situation where you make an initial request and the
2452
+ # request times out. If you make the request again with the same request ID,
2453
+ # the server can check if original operation with the same request ID was
2454
+ # received, and if so, will ignore the second request. This prevents clients
2455
+ # from accidentally creating duplicate commitments.
2456
+ #
2457
+ # The request ID must be a valid UUID with the exception that zero UUID is
2458
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2459
+ #
2460
+ # @yield [response, operation] Access the result along with the RPC operation
2461
+ # @yieldparam response [::Gapic::Operation]
2462
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2463
+ #
2464
+ # @return [::Gapic::Operation]
2465
+ #
2466
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2467
+ #
2468
+ # @example Basic example
2469
+ # require "google/cloud/video/live_stream/v1"
2470
+ #
2471
+ # # Create a client object. The client can be reused for multiple calls.
2472
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2473
+ #
2474
+ # # Create a request. To set request fields, pass in keyword arguments.
2475
+ # request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new
2476
+ #
2477
+ # # Call the update_pool method.
2478
+ # result = client.update_pool request
2479
+ #
2480
+ # # The returned object is of type Gapic::Operation. You can use it to
2481
+ # # check the status of an operation, cancel it, or wait for results.
2482
+ # # Here is how to wait for a response.
2483
+ # result.wait_until_done! timeout: 60
2484
+ # if result.response?
2485
+ # p result.response
2486
+ # else
2487
+ # puts "No response received."
2488
+ # end
2489
+ #
2490
+ def update_pool request, options = nil
2491
+ raise ::ArgumentError, "request must be provided" if request.nil?
2492
+
2493
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest
2494
+
2495
+ # Converts hash and nil to an options object
2496
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2497
+
2498
+ # Customize the options with defaults
2499
+ metadata = @config.rpcs.update_pool.metadata.to_h
2500
+
2501
+ # Set x-goog-api-client and x-goog-user-project headers
2502
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2503
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2504
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2505
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2506
+
2507
+ header_params = {}
2508
+ if request.pool&.name
2509
+ header_params["pool.name"] = request.pool.name
2510
+ end
2511
+
2512
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2513
+ metadata[:"x-goog-request-params"] ||= request_params_header
2514
+
2515
+ options.apply_defaults timeout: @config.rpcs.update_pool.timeout,
2516
+ metadata: metadata,
2517
+ retry_policy: @config.rpcs.update_pool.retry_policy
2518
+
2519
+ options.apply_defaults timeout: @config.timeout,
2520
+ metadata: @config.metadata,
2521
+ retry_policy: @config.retry_policy
2522
+
2523
+ @livestream_service_stub.call_rpc :update_pool, request, options: options do |response, operation|
2524
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2525
+ yield response, operation if block_given?
2526
+ return response
2527
+ end
2528
+ rescue ::GRPC::BadStatus => e
2529
+ raise ::Google::Cloud::Error.from_error(e)
2530
+ end
2531
+
1921
2532
  ##
1922
2533
  # Configuration class for the LivestreamService API.
1923
2534
  #
@@ -2037,6 +2648,14 @@ module Google
2037
2648
  end
2038
2649
  end
2039
2650
 
2651
+ ##
2652
+ # Configuration for the channel pool
2653
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2654
+ #
2655
+ def channel_pool
2656
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2657
+ end
2658
+
2040
2659
  ##
2041
2660
  # Configuration RPC class for the LivestreamService API.
2042
2661
  #
@@ -2135,6 +2754,36 @@ module Google
2135
2754
  # @return [::Gapic::Config::Method]
2136
2755
  #
2137
2756
  attr_reader :delete_event
2757
+ ##
2758
+ # RPC-specific configuration for `create_asset`
2759
+ # @return [::Gapic::Config::Method]
2760
+ #
2761
+ attr_reader :create_asset
2762
+ ##
2763
+ # RPC-specific configuration for `delete_asset`
2764
+ # @return [::Gapic::Config::Method]
2765
+ #
2766
+ attr_reader :delete_asset
2767
+ ##
2768
+ # RPC-specific configuration for `get_asset`
2769
+ # @return [::Gapic::Config::Method]
2770
+ #
2771
+ attr_reader :get_asset
2772
+ ##
2773
+ # RPC-specific configuration for `list_assets`
2774
+ # @return [::Gapic::Config::Method]
2775
+ #
2776
+ attr_reader :list_assets
2777
+ ##
2778
+ # RPC-specific configuration for `get_pool`
2779
+ # @return [::Gapic::Config::Method]
2780
+ #
2781
+ attr_reader :get_pool
2782
+ ##
2783
+ # RPC-specific configuration for `update_pool`
2784
+ # @return [::Gapic::Config::Method]
2785
+ #
2786
+ attr_reader :update_pool
2138
2787
 
2139
2788
  # @private
2140
2789
  def initialize parent_rpcs = nil
@@ -2170,6 +2819,18 @@ module Google
2170
2819
  @get_event = ::Gapic::Config::Method.new get_event_config
2171
2820
  delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event
2172
2821
  @delete_event = ::Gapic::Config::Method.new delete_event_config
2822
+ create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
2823
+ @create_asset = ::Gapic::Config::Method.new create_asset_config
2824
+ delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset
2825
+ @delete_asset = ::Gapic::Config::Method.new delete_asset_config
2826
+ get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset
2827
+ @get_asset = ::Gapic::Config::Method.new get_asset_config
2828
+ list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
2829
+ @list_assets = ::Gapic::Config::Method.new list_assets_config
2830
+ get_pool_config = parent_rpcs.get_pool if parent_rpcs.respond_to? :get_pool
2831
+ @get_pool = ::Gapic::Config::Method.new get_pool_config
2832
+ update_pool_config = parent_rpcs.update_pool if parent_rpcs.respond_to? :update_pool
2833
+ @update_pool = ::Gapic::Config::Method.new update_pool_config
2173
2834
 
2174
2835
  yield self if block_given?
2175
2836
  end