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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b55078e4baca648fb02d6c1653f82579a24d3d26294b32e83592ffa6db548f4
4
- data.tar.gz: 190e52396016c3ddec6b11eda73e3440bec41a572031c0695ce58d8db819623d
3
+ metadata.gz: 065b4a83d124e88d9af543c4619e27e8395399d31ea9fa8126192bf2ae311762
4
+ data.tar.gz: 073c19f56074fd87bdc4f3fe916705735737d36250321778c4a9031e326bfd5c
5
5
  SHA512:
6
- metadata.gz: b6aca0f04644a26689cde7bfccb9bda7261073c0e2b14355358e753e98286662030b3643992e92127264302a30d0062a6fd49f9091c7ca315fb18cd6f44f1540
7
- data.tar.gz: 695363aa48c5c42ef8a7e983f0244c47d0468b44fc256937457337576722591587ea5aaea9bece174bcec14934cd9fba4d98d513aaa31f76f9690a6a724e6241
6
+ metadata.gz: 21d8ea8af55fac02c162bb86f73fedb00a0060e0d353aa2d22b069b1df542bfc2cd5f2253d770cabea9907d6f6faac0dddc1554b0c94c9d00e337a3988304305
7
+ data.tar.gz: dd07d94b568790cbfdabcaf8ff4349ad33023cf148ba9df6b26c28fc05c36010cdc4c1494941ce976b3ee3644504910e91d9dec59b9094b97d4a7b48da16915b
@@ -126,6 +126,31 @@ module Google
126
126
 
127
127
  default_config.rpcs.delete_event.timeout = 60.0
128
128
 
129
+ default_config.rpcs.list_clips.timeout = 60.0
130
+ default_config.rpcs.list_clips.retry_policy = {
131
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
132
+ }
133
+
134
+ default_config.rpcs.get_clip.timeout = 60.0
135
+ default_config.rpcs.get_clip.retry_policy = {
136
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
137
+ }
138
+
139
+ default_config.rpcs.get_asset.timeout = 60.0
140
+ default_config.rpcs.get_asset.retry_policy = {
141
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
142
+ }
143
+
144
+ default_config.rpcs.list_assets.timeout = 60.0
145
+ default_config.rpcs.list_assets.retry_policy = {
146
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
147
+ }
148
+
149
+ default_config.rpcs.get_pool.timeout = 60.0
150
+ default_config.rpcs.get_pool.retry_policy = {
151
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
152
+ }
153
+
129
154
  default_config
130
155
  end
131
156
  yield @configure if block_given?
@@ -1475,6 +1500,7 @@ module Google
1475
1500
  # Field mask is used to specify the fields to be overwritten in the Input
1476
1501
  # resource by the update. You can only update the following fields:
1477
1502
  #
1503
+ # * [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier)
1478
1504
  # * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
1479
1505
  # * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
1480
1506
  #
@@ -2275,7 +2301,7 @@ module Google
2275
2301
 
2276
2302
  ##
2277
2303
  # Deletes the specified clip job resource. This method only deletes the clip
2278
- # job and does not delete the VOD clip stored in the GCS.
2304
+ # job and does not delete the VOD clip stored in Cloud Storage.
2279
2305
  #
2280
2306
  # @overload delete_clip(request, options = nil)
2281
2307
  # Pass arguments to `delete_clip` via a request object, either of type
@@ -2383,6 +2409,534 @@ module Google
2383
2409
  raise ::Google::Cloud::Error.from_error(e)
2384
2410
  end
2385
2411
 
2412
+ ##
2413
+ # Creates a DVR session with the provided unique ID in the specified channel.
2414
+ #
2415
+ # @overload create_dvr_session(request, options = nil)
2416
+ # Pass arguments to `create_dvr_session` via a request object, either of type
2417
+ # {::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest} or an equivalent Hash.
2418
+ #
2419
+ # @param request [::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest, ::Hash]
2420
+ # A request object representing the call parameters. Required. To specify no
2421
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2422
+ # @param options [::Gapic::CallOptions, ::Hash]
2423
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2424
+ #
2425
+ # @overload create_dvr_session(parent: nil, dvr_session_id: nil, dvr_session: nil, request_id: nil)
2426
+ # Pass arguments to `create_dvr_session` via keyword arguments. Note that at
2427
+ # least one keyword argument is required. To specify no parameters, or to keep all
2428
+ # the default parameter values, pass an empty Hash as a request object (see above).
2429
+ #
2430
+ # @param parent [::String]
2431
+ # Required. The parent resource name, in the following form:
2432
+ # `projects/{project}/locations/{location}/channels/{channelId}`.
2433
+ # @param dvr_session_id [::String]
2434
+ # Required. Id of the requesting object in the following form:
2435
+ #
2436
+ # 1. 1 character minimum, 63 characters maximum
2437
+ # 2. Only contains letters, digits, underscores, and hyphens
2438
+ # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash]
2439
+ # Required. The resource being created
2440
+ # @param request_id [::String]
2441
+ # Optional. An optional request ID to identify requests. Specify a unique
2442
+ # request ID so that if you must retry your request, the server will know to
2443
+ # ignore the request if it has already been completed. The server will
2444
+ # guarantee that for at least 60 minutes since the first request.
2445
+ #
2446
+ # For example, consider a situation where you make an initial request and
2447
+ # the request times out. If you make the request again with the same request
2448
+ # ID, the server can check if original operation with the same request ID
2449
+ # was received, and if so, will ignore the second request. This prevents
2450
+ # clients from accidentally creating duplicate commitments.
2451
+ #
2452
+ # The request ID must be a valid UUID with the exception that zero UUID is
2453
+ # not supported (00000000-0000-0000-0000-000000000000).
2454
+ #
2455
+ # @yield [response, operation] Access the result along with the RPC operation
2456
+ # @yieldparam response [::Gapic::Operation]
2457
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2458
+ #
2459
+ # @return [::Gapic::Operation]
2460
+ #
2461
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2462
+ #
2463
+ # @example Basic example
2464
+ # require "google/cloud/video/live_stream/v1"
2465
+ #
2466
+ # # Create a client object. The client can be reused for multiple calls.
2467
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2468
+ #
2469
+ # # Create a request. To set request fields, pass in keyword arguments.
2470
+ # request = Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest.new
2471
+ #
2472
+ # # Call the create_dvr_session method.
2473
+ # result = client.create_dvr_session request
2474
+ #
2475
+ # # The returned object is of type Gapic::Operation. You can use it to
2476
+ # # check the status of an operation, cancel it, or wait for results.
2477
+ # # Here is how to wait for a response.
2478
+ # result.wait_until_done! timeout: 60
2479
+ # if result.response?
2480
+ # p result.response
2481
+ # else
2482
+ # puts "No response received."
2483
+ # end
2484
+ #
2485
+ def create_dvr_session request, options = nil
2486
+ raise ::ArgumentError, "request must be provided" if request.nil?
2487
+
2488
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateDvrSessionRequest
2489
+
2490
+ # Converts hash and nil to an options object
2491
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2492
+
2493
+ # Customize the options with defaults
2494
+ metadata = @config.rpcs.create_dvr_session.metadata.to_h
2495
+
2496
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2497
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2498
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2499
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2500
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2501
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2502
+
2503
+ header_params = {}
2504
+ if request.parent
2505
+ header_params["parent"] = request.parent
2506
+ end
2507
+
2508
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2509
+ metadata[:"x-goog-request-params"] ||= request_params_header
2510
+
2511
+ options.apply_defaults timeout: @config.rpcs.create_dvr_session.timeout,
2512
+ metadata: metadata,
2513
+ retry_policy: @config.rpcs.create_dvr_session.retry_policy
2514
+
2515
+ options.apply_defaults timeout: @config.timeout,
2516
+ metadata: @config.metadata,
2517
+ retry_policy: @config.retry_policy
2518
+
2519
+ @livestream_service_stub.call_rpc :create_dvr_session, request, options: options do |response, operation|
2520
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2521
+ yield response, operation if block_given?
2522
+ throw :response, response
2523
+ end
2524
+ rescue ::GRPC::BadStatus => e
2525
+ raise ::Google::Cloud::Error.from_error(e)
2526
+ end
2527
+
2528
+ ##
2529
+ # Returns a list of all DVR sessions in the specified channel.
2530
+ #
2531
+ # @overload list_dvr_sessions(request, options = nil)
2532
+ # Pass arguments to `list_dvr_sessions` via a request object, either of type
2533
+ # {::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest} or an equivalent Hash.
2534
+ #
2535
+ # @param request [::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest, ::Hash]
2536
+ # A request object representing the call parameters. Required. To specify no
2537
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2538
+ # @param options [::Gapic::CallOptions, ::Hash]
2539
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2540
+ #
2541
+ # @overload list_dvr_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2542
+ # Pass arguments to `list_dvr_sessions` via keyword arguments. Note that at
2543
+ # least one keyword argument is required. To specify no parameters, or to keep all
2544
+ # the default parameter values, pass an empty Hash as a request object (see above).
2545
+ #
2546
+ # @param parent [::String]
2547
+ # Required. Parent value for ListDvrSessionsRequest
2548
+ # @param page_size [::Integer]
2549
+ # Optional. Requested page size. Server may return fewer items than
2550
+ # requested. If unspecified, server will pick an appropriate default.
2551
+ # @param page_token [::String]
2552
+ # Optional. A token identifying a page of results the server should return.
2553
+ # @param filter [::String]
2554
+ # Optional. Filtering results
2555
+ # @param order_by [::String]
2556
+ # Optional. Hint for how to order the results
2557
+ #
2558
+ # @yield [response, operation] Access the result along with the RPC operation
2559
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>]
2560
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2561
+ #
2562
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::DvrSession>]
2563
+ #
2564
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2565
+ #
2566
+ # @example Basic example
2567
+ # require "google/cloud/video/live_stream/v1"
2568
+ #
2569
+ # # Create a client object. The client can be reused for multiple calls.
2570
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2571
+ #
2572
+ # # Create a request. To set request fields, pass in keyword arguments.
2573
+ # request = Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest.new
2574
+ #
2575
+ # # Call the list_dvr_sessions method.
2576
+ # result = client.list_dvr_sessions request
2577
+ #
2578
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2579
+ # # over elements, and API calls will be issued to fetch pages as needed.
2580
+ # result.each do |item|
2581
+ # # Each element is of type ::Google::Cloud::Video::LiveStream::V1::DvrSession.
2582
+ # p item
2583
+ # end
2584
+ #
2585
+ def list_dvr_sessions request, options = nil
2586
+ raise ::ArgumentError, "request must be provided" if request.nil?
2587
+
2588
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListDvrSessionsRequest
2589
+
2590
+ # Converts hash and nil to an options object
2591
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2592
+
2593
+ # Customize the options with defaults
2594
+ metadata = @config.rpcs.list_dvr_sessions.metadata.to_h
2595
+
2596
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2597
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2598
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2599
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2600
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2601
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2602
+
2603
+ header_params = {}
2604
+ if request.parent
2605
+ header_params["parent"] = request.parent
2606
+ end
2607
+
2608
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2609
+ metadata[:"x-goog-request-params"] ||= request_params_header
2610
+
2611
+ options.apply_defaults timeout: @config.rpcs.list_dvr_sessions.timeout,
2612
+ metadata: metadata,
2613
+ retry_policy: @config.rpcs.list_dvr_sessions.retry_policy
2614
+
2615
+ options.apply_defaults timeout: @config.timeout,
2616
+ metadata: @config.metadata,
2617
+ retry_policy: @config.retry_policy
2618
+
2619
+ @livestream_service_stub.call_rpc :list_dvr_sessions, request, options: options do |response, operation|
2620
+ response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_dvr_sessions, request, response, operation, options
2621
+ yield response, operation if block_given?
2622
+ throw :response, response
2623
+ end
2624
+ rescue ::GRPC::BadStatus => e
2625
+ raise ::Google::Cloud::Error.from_error(e)
2626
+ end
2627
+
2628
+ ##
2629
+ # Returns the specified DVR session.
2630
+ #
2631
+ # @overload get_dvr_session(request, options = nil)
2632
+ # Pass arguments to `get_dvr_session` via a request object, either of type
2633
+ # {::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest} or an equivalent Hash.
2634
+ #
2635
+ # @param request [::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest, ::Hash]
2636
+ # A request object representing the call parameters. Required. To specify no
2637
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2638
+ # @param options [::Gapic::CallOptions, ::Hash]
2639
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2640
+ #
2641
+ # @overload get_dvr_session(name: nil)
2642
+ # Pass arguments to `get_dvr_session` via keyword arguments. Note that at
2643
+ # least one keyword argument is required. To specify no parameters, or to keep all
2644
+ # the default parameter values, pass an empty Hash as a request object (see above).
2645
+ #
2646
+ # @param name [::String]
2647
+ # Required. Name of the resource, in the following form:
2648
+ # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
2649
+ #
2650
+ # @yield [response, operation] Access the result along with the RPC operation
2651
+ # @yieldparam response [::Google::Cloud::Video::LiveStream::V1::DvrSession]
2652
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2653
+ #
2654
+ # @return [::Google::Cloud::Video::LiveStream::V1::DvrSession]
2655
+ #
2656
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2657
+ #
2658
+ # @example Basic example
2659
+ # require "google/cloud/video/live_stream/v1"
2660
+ #
2661
+ # # Create a client object. The client can be reused for multiple calls.
2662
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2663
+ #
2664
+ # # Create a request. To set request fields, pass in keyword arguments.
2665
+ # request = Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest.new
2666
+ #
2667
+ # # Call the get_dvr_session method.
2668
+ # result = client.get_dvr_session request
2669
+ #
2670
+ # # The returned object is of type Google::Cloud::Video::LiveStream::V1::DvrSession.
2671
+ # p result
2672
+ #
2673
+ def get_dvr_session request, options = nil
2674
+ raise ::ArgumentError, "request must be provided" if request.nil?
2675
+
2676
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetDvrSessionRequest
2677
+
2678
+ # Converts hash and nil to an options object
2679
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2680
+
2681
+ # Customize the options with defaults
2682
+ metadata = @config.rpcs.get_dvr_session.metadata.to_h
2683
+
2684
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2685
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2686
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2687
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2688
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2689
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2690
+
2691
+ header_params = {}
2692
+ if request.name
2693
+ header_params["name"] = request.name
2694
+ end
2695
+
2696
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2697
+ metadata[:"x-goog-request-params"] ||= request_params_header
2698
+
2699
+ options.apply_defaults timeout: @config.rpcs.get_dvr_session.timeout,
2700
+ metadata: metadata,
2701
+ retry_policy: @config.rpcs.get_dvr_session.retry_policy
2702
+
2703
+ options.apply_defaults timeout: @config.timeout,
2704
+ metadata: @config.metadata,
2705
+ retry_policy: @config.retry_policy
2706
+
2707
+ @livestream_service_stub.call_rpc :get_dvr_session, request, options: options do |response, operation|
2708
+ yield response, operation if block_given?
2709
+ end
2710
+ rescue ::GRPC::BadStatus => e
2711
+ raise ::Google::Cloud::Error.from_error(e)
2712
+ end
2713
+
2714
+ ##
2715
+ # Deletes the specified DVR session.
2716
+ #
2717
+ # @overload delete_dvr_session(request, options = nil)
2718
+ # Pass arguments to `delete_dvr_session` via a request object, either of type
2719
+ # {::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest} or an equivalent Hash.
2720
+ #
2721
+ # @param request [::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest, ::Hash]
2722
+ # A request object representing the call parameters. Required. To specify no
2723
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2724
+ # @param options [::Gapic::CallOptions, ::Hash]
2725
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2726
+ #
2727
+ # @overload delete_dvr_session(name: nil, request_id: nil)
2728
+ # Pass arguments to `delete_dvr_session` via keyword arguments. Note that at
2729
+ # least one keyword argument is required. To specify no parameters, or to keep all
2730
+ # the default parameter values, pass an empty Hash as a request object (see above).
2731
+ #
2732
+ # @param name [::String]
2733
+ # Required. The name of the event resource, in the form of:
2734
+ # `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
2735
+ # @param request_id [::String]
2736
+ # Optional. A request ID to identify requests. Specify a unique request ID
2737
+ # so that if you must retry your request, the server will know to ignore
2738
+ # the request if it has already been completed. The server will guarantee
2739
+ # that for at least 60 minutes since the first request.
2740
+ #
2741
+ # For example, consider a situation where you make an initial request and the
2742
+ # request times out. If you make the request again with the same request ID,
2743
+ # the server can check if original operation with the same request ID was
2744
+ # received, and if so, will ignore the second request. This prevents clients
2745
+ # from accidentally creating duplicate commitments.
2746
+ #
2747
+ # The request ID must be a valid UUID with the exception that zero UUID is
2748
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2749
+ #
2750
+ # @yield [response, operation] Access the result along with the RPC operation
2751
+ # @yieldparam response [::Gapic::Operation]
2752
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2753
+ #
2754
+ # @return [::Gapic::Operation]
2755
+ #
2756
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2757
+ #
2758
+ # @example Basic example
2759
+ # require "google/cloud/video/live_stream/v1"
2760
+ #
2761
+ # # Create a client object. The client can be reused for multiple calls.
2762
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2763
+ #
2764
+ # # Create a request. To set request fields, pass in keyword arguments.
2765
+ # request = Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest.new
2766
+ #
2767
+ # # Call the delete_dvr_session method.
2768
+ # result = client.delete_dvr_session request
2769
+ #
2770
+ # # The returned object is of type Gapic::Operation. You can use it to
2771
+ # # check the status of an operation, cancel it, or wait for results.
2772
+ # # Here is how to wait for a response.
2773
+ # result.wait_until_done! timeout: 60
2774
+ # if result.response?
2775
+ # p result.response
2776
+ # else
2777
+ # puts "No response received."
2778
+ # end
2779
+ #
2780
+ def delete_dvr_session request, options = nil
2781
+ raise ::ArgumentError, "request must be provided" if request.nil?
2782
+
2783
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteDvrSessionRequest
2784
+
2785
+ # Converts hash and nil to an options object
2786
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2787
+
2788
+ # Customize the options with defaults
2789
+ metadata = @config.rpcs.delete_dvr_session.metadata.to_h
2790
+
2791
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2792
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2793
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2794
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2795
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2796
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2797
+
2798
+ header_params = {}
2799
+ if request.name
2800
+ header_params["name"] = request.name
2801
+ end
2802
+
2803
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2804
+ metadata[:"x-goog-request-params"] ||= request_params_header
2805
+
2806
+ options.apply_defaults timeout: @config.rpcs.delete_dvr_session.timeout,
2807
+ metadata: metadata,
2808
+ retry_policy: @config.rpcs.delete_dvr_session.retry_policy
2809
+
2810
+ options.apply_defaults timeout: @config.timeout,
2811
+ metadata: @config.metadata,
2812
+ retry_policy: @config.retry_policy
2813
+
2814
+ @livestream_service_stub.call_rpc :delete_dvr_session, request, options: options do |response, operation|
2815
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2816
+ yield response, operation if block_given?
2817
+ throw :response, response
2818
+ end
2819
+ rescue ::GRPC::BadStatus => e
2820
+ raise ::Google::Cloud::Error.from_error(e)
2821
+ end
2822
+
2823
+ ##
2824
+ # Updates the specified DVR session.
2825
+ #
2826
+ # @overload update_dvr_session(request, options = nil)
2827
+ # Pass arguments to `update_dvr_session` via a request object, either of type
2828
+ # {::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest} or an equivalent Hash.
2829
+ #
2830
+ # @param request [::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest, ::Hash]
2831
+ # A request object representing the call parameters. Required. To specify no
2832
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2833
+ # @param options [::Gapic::CallOptions, ::Hash]
2834
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2835
+ #
2836
+ # @overload update_dvr_session(update_mask: nil, dvr_session: nil, request_id: nil)
2837
+ # Pass arguments to `update_dvr_session` via keyword arguments. Note that at
2838
+ # least one keyword argument is required. To specify no parameters, or to keep all
2839
+ # the default parameter values, pass an empty Hash as a request object (see above).
2840
+ #
2841
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2842
+ # Required. Field mask is used to specify the fields to be overwritten in the
2843
+ # DvrSession resource by the update. You can only update the following
2844
+ # fields:
2845
+ #
2846
+ # * `dvrWindows`
2847
+ #
2848
+ # The fields specified in the update_mask are relative to the resource, not
2849
+ # the full request. A field will be overwritten if it is in the mask.
2850
+ # @param dvr_session [::Google::Cloud::Video::LiveStream::V1::DvrSession, ::Hash]
2851
+ # Required. The DVR session resource to be updated.
2852
+ # @param request_id [::String]
2853
+ # Optional. A request ID to identify requests. Specify a unique request ID
2854
+ # so that if you must retry your request, the server will know to ignore
2855
+ # the request if it has already been completed. The server will guarantee
2856
+ # that for at least 60 minutes since the first request.
2857
+ #
2858
+ # For example, consider a situation where you make an initial request and the
2859
+ # request times out. If you make the request again with the same request ID,
2860
+ # the server can check if original operation with the same request ID was
2861
+ # received, and if so, will ignore the second request. This prevents clients
2862
+ # from accidentally creating duplicate commitments.
2863
+ #
2864
+ # The request ID must be a valid UUID with the exception that zero UUID is
2865
+ # not supported `(00000000-0000-0000-0000-000000000000)`.
2866
+ #
2867
+ # @yield [response, operation] Access the result along with the RPC operation
2868
+ # @yieldparam response [::Gapic::Operation]
2869
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2870
+ #
2871
+ # @return [::Gapic::Operation]
2872
+ #
2873
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2874
+ #
2875
+ # @example Basic example
2876
+ # require "google/cloud/video/live_stream/v1"
2877
+ #
2878
+ # # Create a client object. The client can be reused for multiple calls.
2879
+ # client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
2880
+ #
2881
+ # # Create a request. To set request fields, pass in keyword arguments.
2882
+ # request = Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest.new
2883
+ #
2884
+ # # Call the update_dvr_session method.
2885
+ # result = client.update_dvr_session request
2886
+ #
2887
+ # # The returned object is of type Gapic::Operation. You can use it to
2888
+ # # check the status of an operation, cancel it, or wait for results.
2889
+ # # Here is how to wait for a response.
2890
+ # result.wait_until_done! timeout: 60
2891
+ # if result.response?
2892
+ # p result.response
2893
+ # else
2894
+ # puts "No response received."
2895
+ # end
2896
+ #
2897
+ def update_dvr_session request, options = nil
2898
+ raise ::ArgumentError, "request must be provided" if request.nil?
2899
+
2900
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateDvrSessionRequest
2901
+
2902
+ # Converts hash and nil to an options object
2903
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2904
+
2905
+ # Customize the options with defaults
2906
+ metadata = @config.rpcs.update_dvr_session.metadata.to_h
2907
+
2908
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2909
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2910
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2911
+ gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
2912
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2913
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2914
+
2915
+ header_params = {}
2916
+ if request.dvr_session&.name
2917
+ header_params["dvr_session.name"] = request.dvr_session.name
2918
+ end
2919
+
2920
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2921
+ metadata[:"x-goog-request-params"] ||= request_params_header
2922
+
2923
+ options.apply_defaults timeout: @config.rpcs.update_dvr_session.timeout,
2924
+ metadata: metadata,
2925
+ retry_policy: @config.rpcs.update_dvr_session.retry_policy
2926
+
2927
+ options.apply_defaults timeout: @config.timeout,
2928
+ metadata: @config.metadata,
2929
+ retry_policy: @config.retry_policy
2930
+
2931
+ @livestream_service_stub.call_rpc :update_dvr_session, request, options: options do |response, operation|
2932
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2933
+ yield response, operation if block_given?
2934
+ throw :response, response
2935
+ end
2936
+ rescue ::GRPC::BadStatus => e
2937
+ raise ::Google::Cloud::Error.from_error(e)
2938
+ end
2939
+
2386
2940
  ##
2387
2941
  # Creates a Asset with the provided unique ID in the specified
2388
2942
  # region.
@@ -3264,6 +3818,31 @@ module Google
3264
3818
  #
3265
3819
  attr_reader :delete_clip
3266
3820
  ##
3821
+ # RPC-specific configuration for `create_dvr_session`
3822
+ # @return [::Gapic::Config::Method]
3823
+ #
3824
+ attr_reader :create_dvr_session
3825
+ ##
3826
+ # RPC-specific configuration for `list_dvr_sessions`
3827
+ # @return [::Gapic::Config::Method]
3828
+ #
3829
+ attr_reader :list_dvr_sessions
3830
+ ##
3831
+ # RPC-specific configuration for `get_dvr_session`
3832
+ # @return [::Gapic::Config::Method]
3833
+ #
3834
+ attr_reader :get_dvr_session
3835
+ ##
3836
+ # RPC-specific configuration for `delete_dvr_session`
3837
+ # @return [::Gapic::Config::Method]
3838
+ #
3839
+ attr_reader :delete_dvr_session
3840
+ ##
3841
+ # RPC-specific configuration for `update_dvr_session`
3842
+ # @return [::Gapic::Config::Method]
3843
+ #
3844
+ attr_reader :update_dvr_session
3845
+ ##
3267
3846
  # RPC-specific configuration for `create_asset`
3268
3847
  # @return [::Gapic::Config::Method]
3269
3848
  #
@@ -3336,6 +3915,16 @@ module Google
3336
3915
  @create_clip = ::Gapic::Config::Method.new create_clip_config
3337
3916
  delete_clip_config = parent_rpcs.delete_clip if parent_rpcs.respond_to? :delete_clip
3338
3917
  @delete_clip = ::Gapic::Config::Method.new delete_clip_config
3918
+ create_dvr_session_config = parent_rpcs.create_dvr_session if parent_rpcs.respond_to? :create_dvr_session
3919
+ @create_dvr_session = ::Gapic::Config::Method.new create_dvr_session_config
3920
+ list_dvr_sessions_config = parent_rpcs.list_dvr_sessions if parent_rpcs.respond_to? :list_dvr_sessions
3921
+ @list_dvr_sessions = ::Gapic::Config::Method.new list_dvr_sessions_config
3922
+ get_dvr_session_config = parent_rpcs.get_dvr_session if parent_rpcs.respond_to? :get_dvr_session
3923
+ @get_dvr_session = ::Gapic::Config::Method.new get_dvr_session_config
3924
+ delete_dvr_session_config = parent_rpcs.delete_dvr_session if parent_rpcs.respond_to? :delete_dvr_session
3925
+ @delete_dvr_session = ::Gapic::Config::Method.new delete_dvr_session_config
3926
+ update_dvr_session_config = parent_rpcs.update_dvr_session if parent_rpcs.respond_to? :update_dvr_session
3927
+ @update_dvr_session = ::Gapic::Config::Method.new update_dvr_session_config
3339
3928
  create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
3340
3929
  @create_asset = ::Gapic::Config::Method.new create_asset_config
3341
3930
  delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset