google-cloud-video-live_stream-v1 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,27 @@ module Google
84
84
  "projects/#{project}/locations/#{location}/channels/#{channel}/clips/#{clip}"
85
85
  end
86
86
 
87
+ ##
88
+ # Create a fully-qualified DvrSession resource string.
89
+ #
90
+ # The resource will be in the following format:
91
+ #
92
+ # `projects/{project}/locations/{location}/channels/{channel}/dvrSessions/{dvr_session}`
93
+ #
94
+ # @param project [String]
95
+ # @param location [String]
96
+ # @param channel [String]
97
+ # @param dvr_session [String]
98
+ #
99
+ # @return [::String]
100
+ def dvr_session_path project:, location:, channel:, dvr_session:
101
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
102
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
103
+ raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/"
104
+
105
+ "projects/#{project}/locations/#{location}/channels/#{channel}/dvrSessions/#{dvr_session}"
106
+ end
107
+
87
108
  ##
88
109
  # Create a fully-qualified Event resource string.
89
110
  #
@@ -128,6 +128,31 @@ module Google
128
128
 
129
129
  default_config.rpcs.delete_event.timeout = 60.0
130
130
 
131
+ default_config.rpcs.list_clips.timeout = 60.0
132
+ default_config.rpcs.list_clips.retry_policy = {
133
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
134
+ }
135
+
136
+ default_config.rpcs.get_clip.timeout = 60.0
137
+ default_config.rpcs.get_clip.retry_policy = {
138
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
139
+ }
140
+
141
+ default_config.rpcs.get_asset.timeout = 60.0
142
+ default_config.rpcs.get_asset.retry_policy = {
143
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
144
+ }
145
+
146
+ default_config.rpcs.list_assets.timeout = 60.0
147
+ default_config.rpcs.list_assets.retry_policy = {
148
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
149
+ }
150
+
151
+ default_config.rpcs.get_pool.timeout = 60.0
152
+ default_config.rpcs.get_pool.retry_policy = {
153
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
154
+ }
155
+
131
156
  default_config
132
157
  end
133
158
  yield @configure if block_given?
@@ -1392,6 +1417,7 @@ module Google
1392
1417
  # Field mask is used to specify the fields to be overwritten in the Input
1393
1418
  # resource by the update. You can only update the following fields:
1394
1419
  #
1420
+ # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier)
1395
1421
  # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
1396
1422
  # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
1397
1423
  #
@@ -2136,7 +2162,7 @@ module Google
2136
2162
 
2137
2163
  ##
2138
2164
  # Deletes the specified clip job resource. This method only deletes the clip
2139
- # job and does not delete the VOD clip stored in the GCS.
2165
+ # job and does not delete the VOD clip stored in Cloud Storage.
2140
2166
  #
2141
2167
  # @overload delete_clip(request, options = nil)
2142
2168
  # Pass arguments to `delete_clip` via a request object, either of type
@@ -2237,6 +2263,499 @@ module Google
2237
2263
  raise ::Google::Cloud::Error.from_error(e)
2238
2264
  end
2239
2265
 
2266
+ ##
2267
+ # Creates a DVR session with the provided unique ID in the specified channel.
2268
+ #
2269
+ # @overload create_dvr_session(request, options = nil)
2270
+ # Pass arguments to `create_dvr_session` via a request object, either of type
2271
+ # {::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest} or an equivalent Hash.
2272
+ #
2273
+ # @param request [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Hash]
2274
+ # A request object representing the call parameters. Required. To specify no
2275
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2276
+ # @param options [::Gapic::CallOptions, ::Hash]
2277
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2278
+ #
2279
+ # @overload create_dvr_session(parent: nil, dvr_session_id: nil, dvr_session: nil, request_id: nil)
2280
+ # Pass arguments to `create_dvr_session` via keyword arguments. Note that at
2281
+ # least one keyword argument is required. To specify no parameters, or to keep all
2282
+ # the default parameter values, pass an empty Hash as a request object (see above).
2283
+ #
2284
+ # @param parent [::String]
2285
+ # Required. The parent resource name, in the following form:
2286
+ # `projects/{project}/locations/{location}/channels/{channelId}`.
2287
+ # @param dvr_session_id [::String]
2288
+ # Required. Id of the requesting object in the following form:
2289
+ #
2290
+ # 1. 1 character minimum, 63 characters maximum
2291
+ # 2. Only contains letters, digits, underscores, and hyphens
2292
+ # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash]
2293
+ # Required. The resource being created
2294
+ # @param request_id [::String]
2295
+ # Optional. An optional request ID to identify requests. Specify a unique
2296
+ # request ID so that if you must retry your request, the server will know to
2297
+ # ignore the request if it has already been completed. The server will
2298
+ # guarantee that for at least 60 minutes since the first request.
2299
+ #
2300
+ # For example, consider a situation where you make an initial request and
2301
+ # the request times out. If you make the request again with the same request
2302
+ # ID, the server can check if original operation with the same request ID
2303
+ # was received, and if so, will ignore the second request. This prevents
2304
+ # clients from accidentally creating duplicate commitments.
2305
+ #
2306
+ # The request ID must be a valid UUID with the exception that zero UUID is
2307
+ # not supported (00000000-0000-0000-0000-000000000000).
2308
+ # @yield [result, operation] Access the result along with the TransportOperation object
2309
+ # @yieldparam result [::Gapic::Operation]
2310
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2311
+ #
2312
+ # @return [::Gapic::Operation]
2313
+ #
2314
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2315
+ #
2316
+ # @example Basic example
2317
+ # require "google/cloud/video/live_stream/v1"
2318
+ #
2319
+ # # Create a client object. The client can be reused for multiple calls.
2320
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
2321
+ #
2322
+ # # Create a request. To set request fields, pass in keyword arguments.
2323
+ # request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new
2324
+ #
2325
+ # # Call the create_dvr_session method.
2326
+ # result = client.create_dvr_session request
2327
+ #
2328
+ # # The returned object is of type Gapic::Operation. You can use it to
2329
+ # # check the status of an operation, cancel it, or wait for results.
2330
+ # # Here is how to wait for a response.
2331
+ # result.wait_until_done! timeout: 60
2332
+ # if result.response?
2333
+ # p result.response
2334
+ # else
2335
+ # puts "No response received."
2336
+ # end
2337
+ #
2338
+ def create_dvr_session request, options = nil
2339
+ raise ::ArgumentError, "request must be provided" if request.nil?
2340
+
2341
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest
2342
+
2343
+ # Converts hash and nil to an options object
2344
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2345
+
2346
+ # Customize the options with defaults
2347
+ call_metadata = @config.rpcs.create_dvr_session.metadata.to_h
2348
+
2349
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2350
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2351
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2352
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
2353
+ transports_version_send: [:rest]
2354
+
2355
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2356
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2357
+
2358
+ options.apply_defaults timeout: @config.rpcs.create_dvr_session.timeout,
2359
+ metadata: call_metadata,
2360
+ retry_policy: @config.rpcs.create_dvr_session.retry_policy
2361
+
2362
+ options.apply_defaults timeout: @config.timeout,
2363
+ metadata: @config.metadata,
2364
+ retry_policy: @config.retry_policy
2365
+
2366
+ @livestream_service_stub.create_dvr_session request, options do |result, operation|
2367
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2368
+ yield result, operation if block_given?
2369
+ throw :response, result
2370
+ end
2371
+ rescue ::Gapic::Rest::Error => e
2372
+ raise ::Google::Cloud::Error.from_error(e)
2373
+ end
2374
+
2375
+ ##
2376
+ # Returns a list of all DVR sessions in the specified channel.
2377
+ #
2378
+ # @overload list_dvr_sessions(request, options = nil)
2379
+ # Pass arguments to `list_dvr_sessions` via a request object, either of type
2380
+ # {::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest} or an equivalent Hash.
2381
+ #
2382
+ # @param request [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Hash]
2383
+ # A request object representing the call parameters. Required. To specify no
2384
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2385
+ # @param options [::Gapic::CallOptions, ::Hash]
2386
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2387
+ #
2388
+ # @overload list_dvr_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2389
+ # Pass arguments to `list_dvr_sessions` via keyword arguments. Note that at
2390
+ # least one keyword argument is required. To specify no parameters, or to keep all
2391
+ # the default parameter values, pass an empty Hash as a request object (see above).
2392
+ #
2393
+ # @param parent [::String]
2394
+ # Required. Parent value for ListDvrSessionsRequest
2395
+ # @param page_size [::Integer]
2396
+ # Optional. Requested page size. Server may return fewer items than
2397
+ # requested. If unspecified, server will pick an appropriate default.
2398
+ # @param page_token [::String]
2399
+ # Optional. A token identifying a page of results the server should return.
2400
+ # @param filter [::String]
2401
+ # Optional. Filtering results
2402
+ # @param order_by [::String]
2403
+ # Optional. Hint for how to order the results
2404
+ # @yield [result, operation] Access the result along with the TransportOperation object
2405
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>]
2406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2407
+ #
2408
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>]
2409
+ #
2410
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2411
+ #
2412
+ # @example Basic example
2413
+ # require "google/cloud/video/live_stream/v1"
2414
+ #
2415
+ # # Create a client object. The client can be reused for multiple calls.
2416
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
2417
+ #
2418
+ # # Create a request. To set request fields, pass in keyword arguments.
2419
+ # request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new
2420
+ #
2421
+ # # Call the list_dvr_sessions method.
2422
+ # result = client.list_dvr_sessions request
2423
+ #
2424
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2425
+ # # over elements, and API calls will be issued to fetch pages as needed.
2426
+ # result.each do |item|
2427
+ # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession.
2428
+ # p item
2429
+ # end
2430
+ #
2431
+ def list_dvr_sessions request, options = nil
2432
+ raise ::ArgumentError, "request must be provided" if request.nil?
2433
+
2434
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest
2435
+
2436
+ # Converts hash and nil to an options object
2437
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2438
+
2439
+ # Customize the options with defaults
2440
+ call_metadata = @config.rpcs.list_dvr_sessions.metadata.to_h
2441
+
2442
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2443
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2444
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2445
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
2446
+ transports_version_send: [:rest]
2447
+
2448
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2449
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2450
+
2451
+ options.apply_defaults timeout: @config.rpcs.list_dvr_sessions.timeout,
2452
+ metadata: call_metadata,
2453
+ retry_policy: @config.rpcs.list_dvr_sessions.retry_policy
2454
+
2455
+ options.apply_defaults timeout: @config.timeout,
2456
+ metadata: @config.metadata,
2457
+ retry_policy: @config.retry_policy
2458
+
2459
+ @livestream_service_stub.list_dvr_sessions request, options do |result, operation|
2460
+ result = ::Gapic::Rest::PagedEnumerable.new @livestream_service_stub, :list_dvr_sessions, "dvr_sessions", request, result, options
2461
+ yield result, operation if block_given?
2462
+ throw :response, result
2463
+ end
2464
+ rescue ::Gapic::Rest::Error => e
2465
+ raise ::Google::Cloud::Error.from_error(e)
2466
+ end
2467
+
2468
+ ##
2469
+ # Returns the specified DVR session.
2470
+ #
2471
+ # @overload get_dvr_session(request, options = nil)
2472
+ # Pass arguments to `get_dvr_session` via a request object, either of type
2473
+ # {::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest} or an equivalent Hash.
2474
+ #
2475
+ # @param request [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Hash]
2476
+ # A request object representing the call parameters. Required. To specify no
2477
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2478
+ # @param options [::Gapic::CallOptions, ::Hash]
2479
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2480
+ #
2481
+ # @overload get_dvr_session(name: nil)
2482
+ # Pass arguments to `get_dvr_session` via keyword arguments. Note that at
2483
+ # least one keyword argument is required. To specify no parameters, or to keep all
2484
+ # the default parameter values, pass an empty Hash as a request object (see above).
2485
+ #
2486
+ # @param name [::String]
2487
+ # Required. Name of the resource, in the following form:
2488
+ # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
2489
+ # @yield [result, operation] Access the result along with the TransportOperation object
2490
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::DvrSession]
2491
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2492
+ #
2493
+ # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession]
2494
+ #
2495
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2496
+ #
2497
+ # @example Basic example
2498
+ # require "google/cloud/video/live_stream/v1"
2499
+ #
2500
+ # # Create a client object. The client can be reused for multiple calls.
2501
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
2502
+ #
2503
+ # # Create a request. To set request fields, pass in keyword arguments.
2504
+ # request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new
2505
+ #
2506
+ # # Call the get_dvr_session method.
2507
+ # result = client.get_dvr_session request
2508
+ #
2509
+ # # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession.
2510
+ # p result
2511
+ #
2512
+ def get_dvr_session request, options = nil
2513
+ raise ::ArgumentError, "request must be provided" if request.nil?
2514
+
2515
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest
2516
+
2517
+ # Converts hash and nil to an options object
2518
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2519
+
2520
+ # Customize the options with defaults
2521
+ call_metadata = @config.rpcs.get_dvr_session.metadata.to_h
2522
+
2523
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2524
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2525
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2526
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
2527
+ transports_version_send: [:rest]
2528
+
2529
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2530
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2531
+
2532
+ options.apply_defaults timeout: @config.rpcs.get_dvr_session.timeout,
2533
+ metadata: call_metadata,
2534
+ retry_policy: @config.rpcs.get_dvr_session.retry_policy
2535
+
2536
+ options.apply_defaults timeout: @config.timeout,
2537
+ metadata: @config.metadata,
2538
+ retry_policy: @config.retry_policy
2539
+
2540
+ @livestream_service_stub.get_dvr_session request, options do |result, operation|
2541
+ yield result, operation if block_given?
2542
+ end
2543
+ rescue ::Gapic::Rest::Error => e
2544
+ raise ::Google::Cloud::Error.from_error(e)
2545
+ end
2546
+
2547
+ ##
2548
+ # Deletes the specified DVR session.
2549
+ #
2550
+ # @overload delete_dvr_session(request, options = nil)
2551
+ # Pass arguments to `delete_dvr_session` via a request object, either of type
2552
+ # {::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest} or an equivalent Hash.
2553
+ #
2554
+ # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Hash]
2555
+ # A request object representing the call parameters. Required. To specify no
2556
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2557
+ # @param options [::Gapic::CallOptions, ::Hash]
2558
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2559
+ #
2560
+ # @overload delete_dvr_session(name: nil, request_id: nil)
2561
+ # Pass arguments to `delete_dvr_session` via keyword arguments. Note that at
2562
+ # least one keyword argument is required. To specify no parameters, or to keep all
2563
+ # the default parameter values, pass an empty Hash as a request object (see above).
2564
+ #
2565
+ # @param name [::String]
2566
+ # Required. The name of the event resource, in the form of:
2567
+ # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
2568
+ # @param request_id [::String]
2569
+ # Optional. A request ID to identify requests. Specify a unique request ID
2570
+ # so that if you must retry your request, the server will know to ignore
2571
+ # the request if it has already been completed. The server will guarantee
2572
+ # that for at least 60 minutes since the first request.
2573
+ #
2574
+ # For example, consider a situation where you make an initial request and the
2575
+ # request times out. If you make the request again with the same request ID,
2576
+ # the server can check if original operation with the same request ID was
2577
+ # received, and if so, will ignore the second request. This prevents clients
2578
+ # from accidentally creating duplicate commitments.
2579
+ #
2580
+ # The request ID must be a valid UUID with the exception that zero UUID is
2581
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2582
+ # @yield [result, operation] Access the result along with the TransportOperation object
2583
+ # @yieldparam result [::Gapic::Operation]
2584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2585
+ #
2586
+ # @return [::Gapic::Operation]
2587
+ #
2588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2589
+ #
2590
+ # @example Basic example
2591
+ # require "google/cloud/video/live_stream/v1"
2592
+ #
2593
+ # # Create a client object. The client can be reused for multiple calls.
2594
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
2595
+ #
2596
+ # # Create a request. To set request fields, pass in keyword arguments.
2597
+ # request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new
2598
+ #
2599
+ # # Call the delete_dvr_session method.
2600
+ # result = client.delete_dvr_session request
2601
+ #
2602
+ # # The returned object is of type Gapic::Operation. You can use it to
2603
+ # # check the status of an operation, cancel it, or wait for results.
2604
+ # # Here is how to wait for a response.
2605
+ # result.wait_until_done! timeout: 60
2606
+ # if result.response?
2607
+ # p result.response
2608
+ # else
2609
+ # puts "No response received."
2610
+ # end
2611
+ #
2612
+ def delete_dvr_session request, options = nil
2613
+ raise ::ArgumentError, "request must be provided" if request.nil?
2614
+
2615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest
2616
+
2617
+ # Converts hash and nil to an options object
2618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2619
+
2620
+ # Customize the options with defaults
2621
+ call_metadata = @config.rpcs.delete_dvr_session.metadata.to_h
2622
+
2623
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2624
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2626
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
2627
+ transports_version_send: [:rest]
2628
+
2629
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2630
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2631
+
2632
+ options.apply_defaults timeout: @config.rpcs.delete_dvr_session.timeout,
2633
+ metadata: call_metadata,
2634
+ retry_policy: @config.rpcs.delete_dvr_session.retry_policy
2635
+
2636
+ options.apply_defaults timeout: @config.timeout,
2637
+ metadata: @config.metadata,
2638
+ retry_policy: @config.retry_policy
2639
+
2640
+ @livestream_service_stub.delete_dvr_session request, options do |result, operation|
2641
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2642
+ yield result, operation if block_given?
2643
+ throw :response, result
2644
+ end
2645
+ rescue ::Gapic::Rest::Error => e
2646
+ raise ::Google::Cloud::Error.from_error(e)
2647
+ end
2648
+
2649
+ ##
2650
+ # Updates the specified DVR session.
2651
+ #
2652
+ # @overload update_dvr_session(request, options = nil)
2653
+ # Pass arguments to `update_dvr_session` via a request object, either of type
2654
+ # {::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest} or an equivalent Hash.
2655
+ #
2656
+ # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Hash]
2657
+ # A request object representing the call parameters. Required. To specify no
2658
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2659
+ # @param options [::Gapic::CallOptions, ::Hash]
2660
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2661
+ #
2662
+ # @overload update_dvr_session(update_mask: nil, dvr_session: nil, request_id: nil)
2663
+ # Pass arguments to `update_dvr_session` via keyword arguments. Note that at
2664
+ # least one keyword argument is required. To specify no parameters, or to keep all
2665
+ # the default parameter values, pass an empty Hash as a request object (see above).
2666
+ #
2667
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2668
+ # Required. Field mask is used to specify the fields to be overwritten in the
2669
+ # DvrSession resource by the update. You can only update the following
2670
+ # fields:
2671
+ #
2672
+ # * `dvrWindows`
2673
+ #
2674
+ # The fields specified in the update_mask are relative to the resource, not
2675
+ # the full request. A field will be overwritten if it is in the mask.
2676
+ # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash]
2677
+ # Required. The DVR session resource to be updated.
2678
+ # @param request_id [::String]
2679
+ # Optional. A request ID to identify requests. Specify a unique request ID
2680
+ # so that if you must retry your request, the server will know to ignore
2681
+ # the request if it has already been completed. The server will guarantee
2682
+ # that for at least 60 minutes since the first request.
2683
+ #
2684
+ # For example, consider a situation where you make an initial request and the
2685
+ # request times out. If you make the request again with the same request ID,
2686
+ # the server can check if original operation with the same request ID was
2687
+ # received, and if so, will ignore the second request. This prevents clients
2688
+ # from accidentally creating duplicate commitments.
2689
+ #
2690
+ # The request ID must be a valid UUID with the exception that zero UUID is
2691
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2692
+ # @yield [result, operation] Access the result along with the TransportOperation object
2693
+ # @yieldparam result [::Gapic::Operation]
2694
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2695
+ #
2696
+ # @return [::Gapic::Operation]
2697
+ #
2698
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2699
+ #
2700
+ # @example Basic example
2701
+ # require "google/cloud/video/live_stream/v1"
2702
+ #
2703
+ # # Create a client object. The client can be reused for multiple calls.
2704
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Rest::Client.new
2705
+ #
2706
+ # # Create a request. To set request fields, pass in keyword arguments.
2707
+ # request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new
2708
+ #
2709
+ # # Call the update_dvr_session method.
2710
+ # result = client.update_dvr_session request
2711
+ #
2712
+ # # The returned object is of type Gapic::Operation. You can use it to
2713
+ # # check the status of an operation, cancel it, or wait for results.
2714
+ # # Here is how to wait for a response.
2715
+ # result.wait_until_done! timeout: 60
2716
+ # if result.response?
2717
+ # p result.response
2718
+ # else
2719
+ # puts "No response received."
2720
+ # end
2721
+ #
2722
+ def update_dvr_session request, options = nil
2723
+ raise ::ArgumentError, "request must be provided" if request.nil?
2724
+
2725
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest
2726
+
2727
+ # Converts hash and nil to an options object
2728
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2729
+
2730
+ # Customize the options with defaults
2731
+ call_metadata = @config.rpcs.update_dvr_session.metadata.to_h
2732
+
2733
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2734
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2735
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2736
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION,
2737
+ transports_version_send: [:rest]
2738
+
2739
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2740
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2741
+
2742
+ options.apply_defaults timeout: @config.rpcs.update_dvr_session.timeout,
2743
+ metadata: call_metadata,
2744
+ retry_policy: @config.rpcs.update_dvr_session.retry_policy
2745
+
2746
+ options.apply_defaults timeout: @config.timeout,
2747
+ metadata: @config.metadata,
2748
+ retry_policy: @config.retry_policy
2749
+
2750
+ @livestream_service_stub.update_dvr_session request, options do |result, operation|
2751
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2752
+ yield result, operation if block_given?
2753
+ throw :response, result
2754
+ end
2755
+ rescue ::Gapic::Rest::Error => e
2756
+ raise ::Google::Cloud::Error.from_error(e)
2757
+ end
2758
+
2240
2759
  ##
2241
2760
  # Creates a Asset with the provided unique ID in the specified
2242
2761
  # region.
@@ -3063,6 +3582,31 @@ module Google
3063
3582
  #
3064
3583
  attr_reader :delete_clip
3065
3584
  ##
3585
+ # RPC-specific configuration for `create_dvr_session`
3586
+ # @return [::Gapic::Config::Method]
3587
+ #
3588
+ attr_reader :create_dvr_session
3589
+ ##
3590
+ # RPC-specific configuration for `list_dvr_sessions`
3591
+ # @return [::Gapic::Config::Method]
3592
+ #
3593
+ attr_reader :list_dvr_sessions
3594
+ ##
3595
+ # RPC-specific configuration for `get_dvr_session`
3596
+ # @return [::Gapic::Config::Method]
3597
+ #
3598
+ attr_reader :get_dvr_session
3599
+ ##
3600
+ # RPC-specific configuration for `delete_dvr_session`
3601
+ # @return [::Gapic::Config::Method]
3602
+ #
3603
+ attr_reader :delete_dvr_session
3604
+ ##
3605
+ # RPC-specific configuration for `update_dvr_session`
3606
+ # @return [::Gapic::Config::Method]
3607
+ #
3608
+ attr_reader :update_dvr_session
3609
+ ##
3066
3610
  # RPC-specific configuration for `create_asset`
3067
3611
  # @return [::Gapic::Config::Method]
3068
3612
  #
@@ -3135,6 +3679,16 @@ module Google
3135
3679
  @create_clip = ::Gapic::Config::Method.new create_clip_config
3136
3680
  delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip
3137
3681
  @delete_clip = ::Gapic::Config::Method.new delete_clip_config
3682
+ create_dvr_session_config = parent_rpcs.create_dvr_session if parent_rpcs.respond_to? :create_dvr_session
3683
+ @create_dvr_session = ::Gapic::Config::Method.new create_dvr_session_config
3684
+ list_dvr_sessions_config = parent_rpcs.list_dvr_sessions if parent_rpcs.respond_to? :list_dvr_sessions
3685
+ @list_dvr_sessions = ::Gapic::Config::Method.new list_dvr_sessions_config
3686
+ get_dvr_session_config = parent_rpcs.get_dvr_session if parent_rpcs.respond_to? :get_dvr_session
3687
+ @get_dvr_session = ::Gapic::Config::Method.new get_dvr_session_config
3688
+ delete_dvr_session_config = parent_rpcs.delete_dvr_session if parent_rpcs.respond_to? :delete_dvr_session
3689
+ @delete_dvr_session = ::Gapic::Config::Method.new delete_dvr_session_config
3690
+ update_dvr_session_config = parent_rpcs.update_dvr_session if parent_rpcs.respond_to? :update_dvr_session
3691
+ @update_dvr_session = ::Gapic::Config::Method.new update_dvr_session_config
3138
3692
  create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
3139
3693
  @create_asset = ::Gapic::Config::Method.new create_asset_config
3140
3694
  delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset