google-cloud-video-stitcher-v1 0.1.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 +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google/cloud/video/stitcher/v1/ad_tag_details_pb.rb +52 -0
- data/lib/google/cloud/video/stitcher/v1/cdn_keys_pb.rb +40 -0
- data/lib/google/cloud/video/stitcher/v1/companions_pb.rb +63 -0
- data/lib/google/cloud/video/stitcher/v1/events_pb.rb +61 -0
- data/lib/google/cloud/video/stitcher/v1/sessions_pb.rb +98 -0
- data/lib/google/cloud/video/stitcher/v1/slates_pb.rb +27 -0
- data/lib/google/cloud/video/stitcher/v1/stitch_details_pb.rb +37 -0
- data/lib/google/cloud/video/stitcher/v1/version.rb +30 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service/client.rb +2307 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service/credentials.rb +49 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service/paths.rb +191 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service.rb +55 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service_pb.rb +162 -0
- data/lib/google/cloud/video/stitcher/v1/video_stitcher_service_services_pb.rb +93 -0
- data/lib/google/cloud/video/stitcher/v1.rb +40 -0
- data/lib/google-cloud-video-stitcher-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/video/stitcher/v1/ad_tag_details.rb +102 -0
- data/proto_docs/google/cloud/video/stitcher/v1/cdn_keys.rb +71 -0
- data/proto_docs/google/cloud/video/stitcher/v1/companions.rb +129 -0
- data/proto_docs/google/cloud/video/stitcher/v1/events.rb +141 -0
- data/proto_docs/google/cloud/video/stitcher/v1/sessions.rb +287 -0
- data/proto_docs/google/cloud/video/stitcher/v1/slates.rb +42 -0
- data/proto_docs/google/cloud/video/stitcher/v1/stitch_details.rb +71 -0
- data/proto_docs/google/cloud/video/stitcher/v1/video_stitcher_service.rb +378 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- metadata +230 -0
@@ -0,0 +1,2307 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/video/stitcher/v1/video_stitcher_service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Video
|
25
|
+
module Stitcher
|
26
|
+
module V1
|
27
|
+
module VideoStitcherService
|
28
|
+
##
|
29
|
+
# Client for the VideoStitcherService service.
|
30
|
+
#
|
31
|
+
# Video-On-Demand content stitching API allows you to insert ads
|
32
|
+
# into (VoD) video on demand files. You will be able to render custom
|
33
|
+
# scrubber bars with highlighted ads, enforce ad policies, allow
|
34
|
+
# seamless playback and tracking on native players and monetize
|
35
|
+
# content with any standard VMAP compliant ad server.
|
36
|
+
#
|
37
|
+
class Client
|
38
|
+
include Paths
|
39
|
+
|
40
|
+
# @private
|
41
|
+
attr_reader :video_stitcher_service_stub
|
42
|
+
|
43
|
+
##
|
44
|
+
# Configure the VideoStitcherService Client class.
|
45
|
+
#
|
46
|
+
# See {::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client::Configuration}
|
47
|
+
# for a description of the configuration fields.
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
#
|
51
|
+
# # Modify the configuration for all VideoStitcherService clients
|
52
|
+
# ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.configure do |config|
|
53
|
+
# config.timeout = 10.0
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# @yield [config] Configure the Client client.
|
57
|
+
# @yieldparam config [Client::Configuration]
|
58
|
+
#
|
59
|
+
# @return [Client::Configuration]
|
60
|
+
#
|
61
|
+
def self.configure
|
62
|
+
@configure ||= begin
|
63
|
+
namespace = ["Google", "Cloud", "Video", "Stitcher", "V1"]
|
64
|
+
parent_config = while namespace.any?
|
65
|
+
parent_name = namespace.join "::"
|
66
|
+
parent_const = const_get parent_name
|
67
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
68
|
+
namespace.pop
|
69
|
+
end
|
70
|
+
default_config = Client::Configuration.new parent_config
|
71
|
+
|
72
|
+
default_config.timeout = 60.0
|
73
|
+
default_config.retry_policy = {
|
74
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
75
|
+
}
|
76
|
+
|
77
|
+
default_config.rpcs.create_cdn_key.timeout = 60.0
|
78
|
+
|
79
|
+
default_config.rpcs.list_cdn_keys.timeout = 60.0
|
80
|
+
|
81
|
+
default_config.rpcs.get_cdn_key.timeout = 60.0
|
82
|
+
|
83
|
+
default_config.rpcs.delete_cdn_key.timeout = 60.0
|
84
|
+
|
85
|
+
default_config.rpcs.update_cdn_key.timeout = 60.0
|
86
|
+
|
87
|
+
default_config.rpcs.create_vod_session.timeout = 60.0
|
88
|
+
|
89
|
+
default_config.rpcs.get_vod_session.timeout = 60.0
|
90
|
+
|
91
|
+
default_config.rpcs.list_vod_stitch_details.timeout = 60.0
|
92
|
+
|
93
|
+
default_config.rpcs.get_vod_stitch_detail.timeout = 60.0
|
94
|
+
|
95
|
+
default_config.rpcs.list_vod_ad_tag_details.timeout = 60.0
|
96
|
+
|
97
|
+
default_config.rpcs.get_vod_ad_tag_detail.timeout = 60.0
|
98
|
+
|
99
|
+
default_config.rpcs.list_live_ad_tag_details.timeout = 60.0
|
100
|
+
|
101
|
+
default_config.rpcs.get_live_ad_tag_detail.timeout = 60.0
|
102
|
+
|
103
|
+
default_config.rpcs.create_slate.timeout = 60.0
|
104
|
+
|
105
|
+
default_config.rpcs.list_slates.timeout = 60.0
|
106
|
+
|
107
|
+
default_config.rpcs.get_slate.timeout = 60.0
|
108
|
+
|
109
|
+
default_config.rpcs.update_slate.timeout = 60.0
|
110
|
+
|
111
|
+
default_config.rpcs.delete_slate.timeout = 60.0
|
112
|
+
|
113
|
+
default_config.rpcs.create_live_session.timeout = 60.0
|
114
|
+
|
115
|
+
default_config.rpcs.get_live_session.timeout = 60.0
|
116
|
+
|
117
|
+
default_config
|
118
|
+
end
|
119
|
+
yield @configure if block_given?
|
120
|
+
@configure
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Configure the VideoStitcherService Client instance.
|
125
|
+
#
|
126
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
127
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
128
|
+
# should be made on {Client.configure}.
|
129
|
+
#
|
130
|
+
# See {::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client::Configuration}
|
131
|
+
# for a description of the configuration fields.
|
132
|
+
#
|
133
|
+
# @yield [config] Configure the Client client.
|
134
|
+
# @yieldparam config [Client::Configuration]
|
135
|
+
#
|
136
|
+
# @return [Client::Configuration]
|
137
|
+
#
|
138
|
+
def configure
|
139
|
+
yield @config if block_given?
|
140
|
+
@config
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# Create a new VideoStitcherService client object.
|
145
|
+
#
|
146
|
+
# @example
|
147
|
+
#
|
148
|
+
# # Create a client using the default configuration
|
149
|
+
# client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
150
|
+
#
|
151
|
+
# # Create a client using a custom configuration
|
152
|
+
# client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config|
|
153
|
+
# config.timeout = 10.0
|
154
|
+
# end
|
155
|
+
#
|
156
|
+
# @yield [config] Configure the VideoStitcherService client.
|
157
|
+
# @yieldparam config [Client::Configuration]
|
158
|
+
#
|
159
|
+
def initialize
|
160
|
+
# These require statements are intentionally placed here to initialize
|
161
|
+
# the gRPC module only when it's required.
|
162
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
163
|
+
require "gapic/grpc"
|
164
|
+
require "google/cloud/video/stitcher/v1/video_stitcher_service_services_pb"
|
165
|
+
|
166
|
+
# Create the configuration object
|
167
|
+
@config = Configuration.new Client.configure
|
168
|
+
|
169
|
+
# Yield the configuration if needed
|
170
|
+
yield @config if block_given?
|
171
|
+
|
172
|
+
# Create credentials
|
173
|
+
credentials = @config.credentials
|
174
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
175
|
+
# but only if the default endpoint does not have a region prefix.
|
176
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
177
|
+
!@config.endpoint.split(".").first.include?("-")
|
178
|
+
credentials ||= Credentials.default scope: @config.scope,
|
179
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
180
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
181
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
182
|
+
end
|
183
|
+
@quota_project_id = @config.quota_project
|
184
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
185
|
+
|
186
|
+
@video_stitcher_service_stub = ::Gapic::ServiceStub.new(
|
187
|
+
::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Stub,
|
188
|
+
credentials: credentials,
|
189
|
+
endpoint: @config.endpoint,
|
190
|
+
channel_args: @config.channel_args,
|
191
|
+
interceptors: @config.interceptors
|
192
|
+
)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Service calls
|
196
|
+
|
197
|
+
##
|
198
|
+
# Creates a new CDN key.
|
199
|
+
#
|
200
|
+
# @overload create_cdn_key(request, options = nil)
|
201
|
+
# Pass arguments to `create_cdn_key` via a request object, either of type
|
202
|
+
# {::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest} or an equivalent Hash.
|
203
|
+
#
|
204
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest, ::Hash]
|
205
|
+
# A request object representing the call parameters. Required. To specify no
|
206
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
207
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
208
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
209
|
+
#
|
210
|
+
# @overload create_cdn_key(parent: nil, cdn_key: nil, cdn_key_id: nil)
|
211
|
+
# Pass arguments to `create_cdn_key` via keyword arguments. Note that at
|
212
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
213
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
214
|
+
#
|
215
|
+
# @param parent [::String]
|
216
|
+
# Required. The project in which the CDN key should be created, in the form of
|
217
|
+
# `projects/{project_number}/locations/{location}`.
|
218
|
+
# @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash]
|
219
|
+
# Required. The CDN key resource to create.
|
220
|
+
# @param cdn_key_id [::String]
|
221
|
+
# Required. The ID to use for the CDN key, which will become the final component of
|
222
|
+
# the CDN key's resource name.
|
223
|
+
#
|
224
|
+
# This value should conform to RFC-1034, which restricts to
|
225
|
+
# lower-case letters, numbers, and hyphen, with the first character a
|
226
|
+
# letter, the last a letter or a number, and a 63 character maximum.
|
227
|
+
#
|
228
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
229
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
230
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
231
|
+
#
|
232
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
233
|
+
#
|
234
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
235
|
+
#
|
236
|
+
# @example Basic example
|
237
|
+
# require "google/cloud/video/stitcher/v1"
|
238
|
+
#
|
239
|
+
# # Create a client object. The client can be reused for multiple calls.
|
240
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
241
|
+
#
|
242
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
243
|
+
# request = Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest.new
|
244
|
+
#
|
245
|
+
# # Call the create_cdn_key method.
|
246
|
+
# result = client.create_cdn_key request
|
247
|
+
#
|
248
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey.
|
249
|
+
# p result
|
250
|
+
#
|
251
|
+
def create_cdn_key request, options = nil
|
252
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
253
|
+
|
254
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateCdnKeyRequest
|
255
|
+
|
256
|
+
# Converts hash and nil to an options object
|
257
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
258
|
+
|
259
|
+
# Customize the options with defaults
|
260
|
+
metadata = @config.rpcs.create_cdn_key.metadata.to_h
|
261
|
+
|
262
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
263
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
264
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
265
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
266
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
267
|
+
|
268
|
+
header_params = {}
|
269
|
+
if request.parent
|
270
|
+
header_params["parent"] = request.parent
|
271
|
+
end
|
272
|
+
|
273
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
274
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
275
|
+
|
276
|
+
options.apply_defaults timeout: @config.rpcs.create_cdn_key.timeout,
|
277
|
+
metadata: metadata,
|
278
|
+
retry_policy: @config.rpcs.create_cdn_key.retry_policy
|
279
|
+
|
280
|
+
options.apply_defaults timeout: @config.timeout,
|
281
|
+
metadata: @config.metadata,
|
282
|
+
retry_policy: @config.retry_policy
|
283
|
+
|
284
|
+
@video_stitcher_service_stub.call_rpc :create_cdn_key, request, options: options do |response, operation|
|
285
|
+
yield response, operation if block_given?
|
286
|
+
return response
|
287
|
+
end
|
288
|
+
rescue ::GRPC::BadStatus => e
|
289
|
+
raise ::Google::Cloud::Error.from_error(e)
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# Lists all CDN keys in the specified project and location.
|
294
|
+
#
|
295
|
+
# @overload list_cdn_keys(request, options = nil)
|
296
|
+
# Pass arguments to `list_cdn_keys` via a request object, either of type
|
297
|
+
# {::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest} or an equivalent Hash.
|
298
|
+
#
|
299
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest, ::Hash]
|
300
|
+
# A request object representing the call parameters. Required. To specify no
|
301
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
302
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
303
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
304
|
+
#
|
305
|
+
# @overload list_cdn_keys(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
306
|
+
# Pass arguments to `list_cdn_keys` via keyword arguments. Note that at
|
307
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
308
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
309
|
+
#
|
310
|
+
# @param parent [::String]
|
311
|
+
# Required. The project that contains the list of CDN keys, in the form of
|
312
|
+
# `projects/{project_number}/locations/{location}`.
|
313
|
+
# @param page_size [::Integer]
|
314
|
+
# Requested page size. Server may return fewer items than requested.
|
315
|
+
# If unspecified, server will pick an appropriate default.
|
316
|
+
# @param page_token [::String]
|
317
|
+
# A token identifying a page of results the server should return.
|
318
|
+
# @param filter [::String]
|
319
|
+
# Filtering results
|
320
|
+
# @param order_by [::String]
|
321
|
+
# Hint for how to order the results
|
322
|
+
#
|
323
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
324
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::CdnKey>]
|
325
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
326
|
+
#
|
327
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::CdnKey>]
|
328
|
+
#
|
329
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
330
|
+
#
|
331
|
+
# @example Basic example
|
332
|
+
# require "google/cloud/video/stitcher/v1"
|
333
|
+
#
|
334
|
+
# # Create a client object. The client can be reused for multiple calls.
|
335
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
336
|
+
#
|
337
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
338
|
+
# request = Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest.new
|
339
|
+
#
|
340
|
+
# # Call the list_cdn_keys method.
|
341
|
+
# result = client.list_cdn_keys request
|
342
|
+
#
|
343
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
344
|
+
# # iterate over all elements by calling #each, and the enumerable
|
345
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
346
|
+
# # methods are also available for managing paging directly.
|
347
|
+
# result.each do |response|
|
348
|
+
# # Each element is of type ::Google::Cloud::Video::Stitcher::V1::CdnKey.
|
349
|
+
# p response
|
350
|
+
# end
|
351
|
+
#
|
352
|
+
def list_cdn_keys request, options = nil
|
353
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
354
|
+
|
355
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListCdnKeysRequest
|
356
|
+
|
357
|
+
# Converts hash and nil to an options object
|
358
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
359
|
+
|
360
|
+
# Customize the options with defaults
|
361
|
+
metadata = @config.rpcs.list_cdn_keys.metadata.to_h
|
362
|
+
|
363
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
364
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
365
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
366
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
367
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
368
|
+
|
369
|
+
header_params = {}
|
370
|
+
if request.parent
|
371
|
+
header_params["parent"] = request.parent
|
372
|
+
end
|
373
|
+
|
374
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
375
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
376
|
+
|
377
|
+
options.apply_defaults timeout: @config.rpcs.list_cdn_keys.timeout,
|
378
|
+
metadata: metadata,
|
379
|
+
retry_policy: @config.rpcs.list_cdn_keys.retry_policy
|
380
|
+
|
381
|
+
options.apply_defaults timeout: @config.timeout,
|
382
|
+
metadata: @config.metadata,
|
383
|
+
retry_policy: @config.retry_policy
|
384
|
+
|
385
|
+
@video_stitcher_service_stub.call_rpc :list_cdn_keys, request, options: options do |response, operation|
|
386
|
+
response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_cdn_keys, request, response, operation, options
|
387
|
+
yield response, operation if block_given?
|
388
|
+
return response
|
389
|
+
end
|
390
|
+
rescue ::GRPC::BadStatus => e
|
391
|
+
raise ::Google::Cloud::Error.from_error(e)
|
392
|
+
end
|
393
|
+
|
394
|
+
##
|
395
|
+
# Returns the specified CDN key.
|
396
|
+
#
|
397
|
+
# @overload get_cdn_key(request, options = nil)
|
398
|
+
# Pass arguments to `get_cdn_key` via a request object, either of type
|
399
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest} or an equivalent Hash.
|
400
|
+
#
|
401
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest, ::Hash]
|
402
|
+
# A request object representing the call parameters. Required. To specify no
|
403
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
404
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
405
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
406
|
+
#
|
407
|
+
# @overload get_cdn_key(name: nil)
|
408
|
+
# Pass arguments to `get_cdn_key` via keyword arguments. Note that at
|
409
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
410
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
411
|
+
#
|
412
|
+
# @param name [::String]
|
413
|
+
# Required. The name of the CDN key to be retrieved, in the form of
|
414
|
+
# `projects/{project}/locations/{location}/cdnKeys/{id}`.
|
415
|
+
#
|
416
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
417
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
418
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
419
|
+
#
|
420
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
421
|
+
#
|
422
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
423
|
+
#
|
424
|
+
# @example Basic example
|
425
|
+
# require "google/cloud/video/stitcher/v1"
|
426
|
+
#
|
427
|
+
# # Create a client object. The client can be reused for multiple calls.
|
428
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
429
|
+
#
|
430
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
431
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest.new
|
432
|
+
#
|
433
|
+
# # Call the get_cdn_key method.
|
434
|
+
# result = client.get_cdn_key request
|
435
|
+
#
|
436
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey.
|
437
|
+
# p result
|
438
|
+
#
|
439
|
+
def get_cdn_key request, options = nil
|
440
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
441
|
+
|
442
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetCdnKeyRequest
|
443
|
+
|
444
|
+
# Converts hash and nil to an options object
|
445
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
446
|
+
|
447
|
+
# Customize the options with defaults
|
448
|
+
metadata = @config.rpcs.get_cdn_key.metadata.to_h
|
449
|
+
|
450
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
451
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
452
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
453
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
454
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
455
|
+
|
456
|
+
header_params = {}
|
457
|
+
if request.name
|
458
|
+
header_params["name"] = request.name
|
459
|
+
end
|
460
|
+
|
461
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
462
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
463
|
+
|
464
|
+
options.apply_defaults timeout: @config.rpcs.get_cdn_key.timeout,
|
465
|
+
metadata: metadata,
|
466
|
+
retry_policy: @config.rpcs.get_cdn_key.retry_policy
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
470
|
+
retry_policy: @config.retry_policy
|
471
|
+
|
472
|
+
@video_stitcher_service_stub.call_rpc :get_cdn_key, request, options: options do |response, operation|
|
473
|
+
yield response, operation if block_given?
|
474
|
+
return response
|
475
|
+
end
|
476
|
+
rescue ::GRPC::BadStatus => e
|
477
|
+
raise ::Google::Cloud::Error.from_error(e)
|
478
|
+
end
|
479
|
+
|
480
|
+
##
|
481
|
+
# Deletes the specified CDN key.
|
482
|
+
#
|
483
|
+
# @overload delete_cdn_key(request, options = nil)
|
484
|
+
# Pass arguments to `delete_cdn_key` via a request object, either of type
|
485
|
+
# {::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest} or an equivalent Hash.
|
486
|
+
#
|
487
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest, ::Hash]
|
488
|
+
# A request object representing the call parameters. Required. To specify no
|
489
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
490
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
491
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
492
|
+
#
|
493
|
+
# @overload delete_cdn_key(name: nil)
|
494
|
+
# Pass arguments to `delete_cdn_key` via keyword arguments. Note that at
|
495
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
496
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
497
|
+
#
|
498
|
+
# @param name [::String]
|
499
|
+
# Required. The name of the CDN key to be deleted, in the form of
|
500
|
+
# `projects/{project_number}/locations/{location}/cdnKeys/{id}`.
|
501
|
+
#
|
502
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
503
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
504
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
505
|
+
#
|
506
|
+
# @return [::Google::Protobuf::Empty]
|
507
|
+
#
|
508
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
509
|
+
#
|
510
|
+
# @example Basic example
|
511
|
+
# require "google/cloud/video/stitcher/v1"
|
512
|
+
#
|
513
|
+
# # Create a client object. The client can be reused for multiple calls.
|
514
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
515
|
+
#
|
516
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
517
|
+
# request = Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest.new
|
518
|
+
#
|
519
|
+
# # Call the delete_cdn_key method.
|
520
|
+
# result = client.delete_cdn_key request
|
521
|
+
#
|
522
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
523
|
+
# p result
|
524
|
+
#
|
525
|
+
def delete_cdn_key request, options = nil
|
526
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
527
|
+
|
528
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteCdnKeyRequest
|
529
|
+
|
530
|
+
# Converts hash and nil to an options object
|
531
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
532
|
+
|
533
|
+
# Customize the options with defaults
|
534
|
+
metadata = @config.rpcs.delete_cdn_key.metadata.to_h
|
535
|
+
|
536
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
537
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
538
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
539
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
540
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
541
|
+
|
542
|
+
header_params = {}
|
543
|
+
if request.name
|
544
|
+
header_params["name"] = request.name
|
545
|
+
end
|
546
|
+
|
547
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
548
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
549
|
+
|
550
|
+
options.apply_defaults timeout: @config.rpcs.delete_cdn_key.timeout,
|
551
|
+
metadata: metadata,
|
552
|
+
retry_policy: @config.rpcs.delete_cdn_key.retry_policy
|
553
|
+
|
554
|
+
options.apply_defaults timeout: @config.timeout,
|
555
|
+
metadata: @config.metadata,
|
556
|
+
retry_policy: @config.retry_policy
|
557
|
+
|
558
|
+
@video_stitcher_service_stub.call_rpc :delete_cdn_key, request, options: options do |response, operation|
|
559
|
+
yield response, operation if block_given?
|
560
|
+
return response
|
561
|
+
end
|
562
|
+
rescue ::GRPC::BadStatus => e
|
563
|
+
raise ::Google::Cloud::Error.from_error(e)
|
564
|
+
end
|
565
|
+
|
566
|
+
##
|
567
|
+
# Updates the specified CDN key. Only update fields specified
|
568
|
+
# in the call method body.
|
569
|
+
#
|
570
|
+
# @overload update_cdn_key(request, options = nil)
|
571
|
+
# Pass arguments to `update_cdn_key` via a request object, either of type
|
572
|
+
# {::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest} or an equivalent Hash.
|
573
|
+
#
|
574
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest, ::Hash]
|
575
|
+
# A request object representing the call parameters. Required. To specify no
|
576
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
577
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
578
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
579
|
+
#
|
580
|
+
# @overload update_cdn_key(cdn_key: nil, update_mask: nil)
|
581
|
+
# Pass arguments to `update_cdn_key` via keyword arguments. Note that at
|
582
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
583
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
584
|
+
#
|
585
|
+
# @param cdn_key [::Google::Cloud::Video::Stitcher::V1::CdnKey, ::Hash]
|
586
|
+
# Required. The CDN key resource which replaces the resource on the server.
|
587
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
588
|
+
# Required. The update mask applies to the resource.
|
589
|
+
# For the `FieldMask` definition, see
|
590
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
591
|
+
#
|
592
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
593
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
594
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
595
|
+
#
|
596
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::CdnKey]
|
597
|
+
#
|
598
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
599
|
+
#
|
600
|
+
# @example Basic example
|
601
|
+
# require "google/cloud/video/stitcher/v1"
|
602
|
+
#
|
603
|
+
# # Create a client object. The client can be reused for multiple calls.
|
604
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
605
|
+
#
|
606
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
607
|
+
# request = Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest.new
|
608
|
+
#
|
609
|
+
# # Call the update_cdn_key method.
|
610
|
+
# result = client.update_cdn_key request
|
611
|
+
#
|
612
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::CdnKey.
|
613
|
+
# p result
|
614
|
+
#
|
615
|
+
def update_cdn_key request, options = nil
|
616
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
617
|
+
|
618
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateCdnKeyRequest
|
619
|
+
|
620
|
+
# Converts hash and nil to an options object
|
621
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
622
|
+
|
623
|
+
# Customize the options with defaults
|
624
|
+
metadata = @config.rpcs.update_cdn_key.metadata.to_h
|
625
|
+
|
626
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
627
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
628
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
629
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
630
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
631
|
+
|
632
|
+
header_params = {}
|
633
|
+
if request.cdn_key&.name
|
634
|
+
header_params["cdn_key.name"] = request.cdn_key.name
|
635
|
+
end
|
636
|
+
|
637
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
638
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
639
|
+
|
640
|
+
options.apply_defaults timeout: @config.rpcs.update_cdn_key.timeout,
|
641
|
+
metadata: metadata,
|
642
|
+
retry_policy: @config.rpcs.update_cdn_key.retry_policy
|
643
|
+
|
644
|
+
options.apply_defaults timeout: @config.timeout,
|
645
|
+
metadata: @config.metadata,
|
646
|
+
retry_policy: @config.retry_policy
|
647
|
+
|
648
|
+
@video_stitcher_service_stub.call_rpc :update_cdn_key, request, options: options do |response, operation|
|
649
|
+
yield response, operation if block_given?
|
650
|
+
return response
|
651
|
+
end
|
652
|
+
rescue ::GRPC::BadStatus => e
|
653
|
+
raise ::Google::Cloud::Error.from_error(e)
|
654
|
+
end
|
655
|
+
|
656
|
+
##
|
657
|
+
# Creates a client side playback VOD session and returns the full
|
658
|
+
# tracking and playback metadata of the session.
|
659
|
+
#
|
660
|
+
# @overload create_vod_session(request, options = nil)
|
661
|
+
# Pass arguments to `create_vod_session` via a request object, either of type
|
662
|
+
# {::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest} or an equivalent Hash.
|
663
|
+
#
|
664
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest, ::Hash]
|
665
|
+
# A request object representing the call parameters. Required. To specify no
|
666
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
667
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
668
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
669
|
+
#
|
670
|
+
# @overload create_vod_session(parent: nil, vod_session: nil)
|
671
|
+
# Pass arguments to `create_vod_session` via keyword arguments. Note that at
|
672
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
673
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
674
|
+
#
|
675
|
+
# @param parent [::String]
|
676
|
+
# Required. The project and location in which the VOD session should be created, in the
|
677
|
+
# form of `projects/{project_number}/locations/{location}`.
|
678
|
+
# @param vod_session [::Google::Cloud::Video::Stitcher::V1::VodSession, ::Hash]
|
679
|
+
# Required. Parameters for creating a session.
|
680
|
+
#
|
681
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
682
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodSession]
|
683
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
684
|
+
#
|
685
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::VodSession]
|
686
|
+
#
|
687
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
688
|
+
#
|
689
|
+
# @example Basic example
|
690
|
+
# require "google/cloud/video/stitcher/v1"
|
691
|
+
#
|
692
|
+
# # Create a client object. The client can be reused for multiple calls.
|
693
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
694
|
+
#
|
695
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
696
|
+
# request = Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest.new
|
697
|
+
#
|
698
|
+
# # Call the create_vod_session method.
|
699
|
+
# result = client.create_vod_session request
|
700
|
+
#
|
701
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession.
|
702
|
+
# p result
|
703
|
+
#
|
704
|
+
def create_vod_session request, options = nil
|
705
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
706
|
+
|
707
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateVodSessionRequest
|
708
|
+
|
709
|
+
# Converts hash and nil to an options object
|
710
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
711
|
+
|
712
|
+
# Customize the options with defaults
|
713
|
+
metadata = @config.rpcs.create_vod_session.metadata.to_h
|
714
|
+
|
715
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
716
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
717
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
718
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
719
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
720
|
+
|
721
|
+
header_params = {}
|
722
|
+
if request.parent
|
723
|
+
header_params["parent"] = request.parent
|
724
|
+
end
|
725
|
+
|
726
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
727
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
728
|
+
|
729
|
+
options.apply_defaults timeout: @config.rpcs.create_vod_session.timeout,
|
730
|
+
metadata: metadata,
|
731
|
+
retry_policy: @config.rpcs.create_vod_session.retry_policy
|
732
|
+
|
733
|
+
options.apply_defaults timeout: @config.timeout,
|
734
|
+
metadata: @config.metadata,
|
735
|
+
retry_policy: @config.retry_policy
|
736
|
+
|
737
|
+
@video_stitcher_service_stub.call_rpc :create_vod_session, request, options: options do |response, operation|
|
738
|
+
yield response, operation if block_given?
|
739
|
+
return response
|
740
|
+
end
|
741
|
+
rescue ::GRPC::BadStatus => e
|
742
|
+
raise ::Google::Cloud::Error.from_error(e)
|
743
|
+
end
|
744
|
+
|
745
|
+
##
|
746
|
+
# Returns the full tracking, playback metadata, and relevant ad-ops
|
747
|
+
# logs for the specified VOD session.
|
748
|
+
#
|
749
|
+
# @overload get_vod_session(request, options = nil)
|
750
|
+
# Pass arguments to `get_vod_session` via a request object, either of type
|
751
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest} or an equivalent Hash.
|
752
|
+
#
|
753
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest, ::Hash]
|
754
|
+
# A request object representing the call parameters. Required. To specify no
|
755
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
756
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
757
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
758
|
+
#
|
759
|
+
# @overload get_vod_session(name: nil)
|
760
|
+
# Pass arguments to `get_vod_session` via keyword arguments. Note that at
|
761
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
762
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
763
|
+
#
|
764
|
+
# @param name [::String]
|
765
|
+
# Required. The name of the VOD session to be retrieved, in the form of
|
766
|
+
# `projects/{project_number}/locations/{location}/vodSessions/{id}`.
|
767
|
+
#
|
768
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
769
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodSession]
|
770
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
771
|
+
#
|
772
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::VodSession]
|
773
|
+
#
|
774
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
775
|
+
#
|
776
|
+
# @example Basic example
|
777
|
+
# require "google/cloud/video/stitcher/v1"
|
778
|
+
#
|
779
|
+
# # Create a client object. The client can be reused for multiple calls.
|
780
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
781
|
+
#
|
782
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
783
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest.new
|
784
|
+
#
|
785
|
+
# # Call the get_vod_session method.
|
786
|
+
# result = client.get_vod_session request
|
787
|
+
#
|
788
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodSession.
|
789
|
+
# p result
|
790
|
+
#
|
791
|
+
def get_vod_session request, options = nil
|
792
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
793
|
+
|
794
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodSessionRequest
|
795
|
+
|
796
|
+
# Converts hash and nil to an options object
|
797
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
798
|
+
|
799
|
+
# Customize the options with defaults
|
800
|
+
metadata = @config.rpcs.get_vod_session.metadata.to_h
|
801
|
+
|
802
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
803
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
804
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
805
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
806
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
807
|
+
|
808
|
+
header_params = {}
|
809
|
+
if request.name
|
810
|
+
header_params["name"] = request.name
|
811
|
+
end
|
812
|
+
|
813
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
814
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
815
|
+
|
816
|
+
options.apply_defaults timeout: @config.rpcs.get_vod_session.timeout,
|
817
|
+
metadata: metadata,
|
818
|
+
retry_policy: @config.rpcs.get_vod_session.retry_policy
|
819
|
+
|
820
|
+
options.apply_defaults timeout: @config.timeout,
|
821
|
+
metadata: @config.metadata,
|
822
|
+
retry_policy: @config.retry_policy
|
823
|
+
|
824
|
+
@video_stitcher_service_stub.call_rpc :get_vod_session, request, options: options do |response, operation|
|
825
|
+
yield response, operation if block_given?
|
826
|
+
return response
|
827
|
+
end
|
828
|
+
rescue ::GRPC::BadStatus => e
|
829
|
+
raise ::Google::Cloud::Error.from_error(e)
|
830
|
+
end
|
831
|
+
|
832
|
+
##
|
833
|
+
# Returns a list of detailed stitching information of the specified VOD
|
834
|
+
# session.
|
835
|
+
#
|
836
|
+
# @overload list_vod_stitch_details(request, options = nil)
|
837
|
+
# Pass arguments to `list_vod_stitch_details` via a request object, either of type
|
838
|
+
# {::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest} or an equivalent Hash.
|
839
|
+
#
|
840
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest, ::Hash]
|
841
|
+
# A request object representing the call parameters. Required. To specify no
|
842
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
843
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
844
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
845
|
+
#
|
846
|
+
# @overload list_vod_stitch_details(parent: nil, page_size: nil, page_token: nil)
|
847
|
+
# Pass arguments to `list_vod_stitch_details` via keyword arguments. Note that at
|
848
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
849
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
850
|
+
#
|
851
|
+
# @param parent [::String]
|
852
|
+
# Required. The VOD session where the stitch details belong to, in the form of
|
853
|
+
# `projects/{project}/locations/{location}/vodSessions/{id}`.
|
854
|
+
# @param page_size [::Integer]
|
855
|
+
# The maximum number of items to return.
|
856
|
+
# @param page_token [::String]
|
857
|
+
# The next_page_token value returned from a previous List request, if any.
|
858
|
+
#
|
859
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
860
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>]
|
861
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
862
|
+
#
|
863
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodStitchDetail>]
|
864
|
+
#
|
865
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
866
|
+
#
|
867
|
+
# @example Basic example
|
868
|
+
# require "google/cloud/video/stitcher/v1"
|
869
|
+
#
|
870
|
+
# # Create a client object. The client can be reused for multiple calls.
|
871
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
872
|
+
#
|
873
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
874
|
+
# request = Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest.new
|
875
|
+
#
|
876
|
+
# # Call the list_vod_stitch_details method.
|
877
|
+
# result = client.list_vod_stitch_details request
|
878
|
+
#
|
879
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
880
|
+
# # iterate over all elements by calling #each, and the enumerable
|
881
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
882
|
+
# # methods are also available for managing paging directly.
|
883
|
+
# result.each do |response|
|
884
|
+
# # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodStitchDetail.
|
885
|
+
# p response
|
886
|
+
# end
|
887
|
+
#
|
888
|
+
def list_vod_stitch_details request, options = nil
|
889
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
890
|
+
|
891
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodStitchDetailsRequest
|
892
|
+
|
893
|
+
# Converts hash and nil to an options object
|
894
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
895
|
+
|
896
|
+
# Customize the options with defaults
|
897
|
+
metadata = @config.rpcs.list_vod_stitch_details.metadata.to_h
|
898
|
+
|
899
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
900
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
901
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
902
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
903
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
904
|
+
|
905
|
+
header_params = {}
|
906
|
+
if request.parent
|
907
|
+
header_params["parent"] = request.parent
|
908
|
+
end
|
909
|
+
|
910
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
911
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
912
|
+
|
913
|
+
options.apply_defaults timeout: @config.rpcs.list_vod_stitch_details.timeout,
|
914
|
+
metadata: metadata,
|
915
|
+
retry_policy: @config.rpcs.list_vod_stitch_details.retry_policy
|
916
|
+
|
917
|
+
options.apply_defaults timeout: @config.timeout,
|
918
|
+
metadata: @config.metadata,
|
919
|
+
retry_policy: @config.retry_policy
|
920
|
+
|
921
|
+
@video_stitcher_service_stub.call_rpc :list_vod_stitch_details, request, options: options do |response, operation|
|
922
|
+
response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_stitch_details, request, response, operation, options
|
923
|
+
yield response, operation if block_given?
|
924
|
+
return response
|
925
|
+
end
|
926
|
+
rescue ::GRPC::BadStatus => e
|
927
|
+
raise ::Google::Cloud::Error.from_error(e)
|
928
|
+
end
|
929
|
+
|
930
|
+
##
|
931
|
+
# Returns the specified stitching information for the specified VOD session.
|
932
|
+
#
|
933
|
+
# @overload get_vod_stitch_detail(request, options = nil)
|
934
|
+
# Pass arguments to `get_vod_stitch_detail` via a request object, either of type
|
935
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest} or an equivalent Hash.
|
936
|
+
#
|
937
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest, ::Hash]
|
938
|
+
# A request object representing the call parameters. Required. To specify no
|
939
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
940
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
941
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
942
|
+
#
|
943
|
+
# @overload get_vod_stitch_detail(name: nil)
|
944
|
+
# Pass arguments to `get_vod_stitch_detail` via keyword arguments. Note that at
|
945
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
946
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
947
|
+
#
|
948
|
+
# @param name [::String]
|
949
|
+
# Required. The name of the stitch detail in the specified VOD session, in the form of
|
950
|
+
# `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`.
|
951
|
+
#
|
952
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
953
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodStitchDetail]
|
954
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
955
|
+
#
|
956
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::VodStitchDetail]
|
957
|
+
#
|
958
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
959
|
+
#
|
960
|
+
# @example Basic example
|
961
|
+
# require "google/cloud/video/stitcher/v1"
|
962
|
+
#
|
963
|
+
# # Create a client object. The client can be reused for multiple calls.
|
964
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
965
|
+
#
|
966
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
967
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest.new
|
968
|
+
#
|
969
|
+
# # Call the get_vod_stitch_detail method.
|
970
|
+
# result = client.get_vod_stitch_detail request
|
971
|
+
#
|
972
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodStitchDetail.
|
973
|
+
# p result
|
974
|
+
#
|
975
|
+
def get_vod_stitch_detail request, options = nil
|
976
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
977
|
+
|
978
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodStitchDetailRequest
|
979
|
+
|
980
|
+
# Converts hash and nil to an options object
|
981
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
982
|
+
|
983
|
+
# Customize the options with defaults
|
984
|
+
metadata = @config.rpcs.get_vod_stitch_detail.metadata.to_h
|
985
|
+
|
986
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
987
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
988
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
989
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
990
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
991
|
+
|
992
|
+
header_params = {}
|
993
|
+
if request.name
|
994
|
+
header_params["name"] = request.name
|
995
|
+
end
|
996
|
+
|
997
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
998
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
999
|
+
|
1000
|
+
options.apply_defaults timeout: @config.rpcs.get_vod_stitch_detail.timeout,
|
1001
|
+
metadata: metadata,
|
1002
|
+
retry_policy: @config.rpcs.get_vod_stitch_detail.retry_policy
|
1003
|
+
|
1004
|
+
options.apply_defaults timeout: @config.timeout,
|
1005
|
+
metadata: @config.metadata,
|
1006
|
+
retry_policy: @config.retry_policy
|
1007
|
+
|
1008
|
+
@video_stitcher_service_stub.call_rpc :get_vod_stitch_detail, request, options: options do |response, operation|
|
1009
|
+
yield response, operation if block_given?
|
1010
|
+
return response
|
1011
|
+
end
|
1012
|
+
rescue ::GRPC::BadStatus => e
|
1013
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
##
|
1017
|
+
# Return the list of ad tag details for the specified VOD session.
|
1018
|
+
#
|
1019
|
+
# @overload list_vod_ad_tag_details(request, options = nil)
|
1020
|
+
# Pass arguments to `list_vod_ad_tag_details` via a request object, either of type
|
1021
|
+
# {::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest} or an equivalent Hash.
|
1022
|
+
#
|
1023
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest, ::Hash]
|
1024
|
+
# A request object representing the call parameters. Required. To specify no
|
1025
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1026
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1027
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1028
|
+
#
|
1029
|
+
# @overload list_vod_ad_tag_details(parent: nil, page_size: nil, page_token: nil)
|
1030
|
+
# Pass arguments to `list_vod_ad_tag_details` via keyword arguments. Note that at
|
1031
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1032
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1033
|
+
#
|
1034
|
+
# @param parent [::String]
|
1035
|
+
# Required. The VOD session which the ad tag details belong to, in the form of
|
1036
|
+
# `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`.
|
1037
|
+
# @param page_size [::Integer]
|
1038
|
+
# The maximum number of items to return.
|
1039
|
+
# @param page_token [::String]
|
1040
|
+
# The next_page_token value returned from a previous List request, if any.
|
1041
|
+
#
|
1042
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1043
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>]
|
1044
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1045
|
+
#
|
1046
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail>]
|
1047
|
+
#
|
1048
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1049
|
+
#
|
1050
|
+
# @example Basic example
|
1051
|
+
# require "google/cloud/video/stitcher/v1"
|
1052
|
+
#
|
1053
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1054
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1055
|
+
#
|
1056
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1057
|
+
# request = Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest.new
|
1058
|
+
#
|
1059
|
+
# # Call the list_vod_ad_tag_details method.
|
1060
|
+
# result = client.list_vod_ad_tag_details request
|
1061
|
+
#
|
1062
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1063
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1064
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1065
|
+
# # methods are also available for managing paging directly.
|
1066
|
+
# result.each do |response|
|
1067
|
+
# # Each element is of type ::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail.
|
1068
|
+
# p response
|
1069
|
+
# end
|
1070
|
+
#
|
1071
|
+
def list_vod_ad_tag_details request, options = nil
|
1072
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1073
|
+
|
1074
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListVodAdTagDetailsRequest
|
1075
|
+
|
1076
|
+
# Converts hash and nil to an options object
|
1077
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1078
|
+
|
1079
|
+
# Customize the options with defaults
|
1080
|
+
metadata = @config.rpcs.list_vod_ad_tag_details.metadata.to_h
|
1081
|
+
|
1082
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1083
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1084
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1085
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1086
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1087
|
+
|
1088
|
+
header_params = {}
|
1089
|
+
if request.parent
|
1090
|
+
header_params["parent"] = request.parent
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1094
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1095
|
+
|
1096
|
+
options.apply_defaults timeout: @config.rpcs.list_vod_ad_tag_details.timeout,
|
1097
|
+
metadata: metadata,
|
1098
|
+
retry_policy: @config.rpcs.list_vod_ad_tag_details.retry_policy
|
1099
|
+
|
1100
|
+
options.apply_defaults timeout: @config.timeout,
|
1101
|
+
metadata: @config.metadata,
|
1102
|
+
retry_policy: @config.retry_policy
|
1103
|
+
|
1104
|
+
@video_stitcher_service_stub.call_rpc :list_vod_ad_tag_details, request, options: options do |response, operation|
|
1105
|
+
response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_vod_ad_tag_details, request, response, operation, options
|
1106
|
+
yield response, operation if block_given?
|
1107
|
+
return response
|
1108
|
+
end
|
1109
|
+
rescue ::GRPC::BadStatus => e
|
1110
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
##
|
1114
|
+
# Returns the specified ad tag detail for the specified VOD session.
|
1115
|
+
#
|
1116
|
+
# @overload get_vod_ad_tag_detail(request, options = nil)
|
1117
|
+
# Pass arguments to `get_vod_ad_tag_detail` via a request object, either of type
|
1118
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest} or an equivalent Hash.
|
1119
|
+
#
|
1120
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest, ::Hash]
|
1121
|
+
# A request object representing the call parameters. Required. To specify no
|
1122
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1123
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1124
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1125
|
+
#
|
1126
|
+
# @overload get_vod_ad_tag_detail(name: nil)
|
1127
|
+
# Pass arguments to `get_vod_ad_tag_detail` via keyword arguments. Note that at
|
1128
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1129
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1130
|
+
#
|
1131
|
+
# @param name [::String]
|
1132
|
+
# Required. The name of the ad tag detail for the specified VOD session, in the form of
|
1133
|
+
# `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`.
|
1134
|
+
#
|
1135
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1136
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail]
|
1137
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1138
|
+
#
|
1139
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::VodAdTagDetail]
|
1140
|
+
#
|
1141
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1142
|
+
#
|
1143
|
+
# @example Basic example
|
1144
|
+
# require "google/cloud/video/stitcher/v1"
|
1145
|
+
#
|
1146
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1147
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1148
|
+
#
|
1149
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1150
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest.new
|
1151
|
+
#
|
1152
|
+
# # Call the get_vod_ad_tag_detail method.
|
1153
|
+
# result = client.get_vod_ad_tag_detail request
|
1154
|
+
#
|
1155
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::VodAdTagDetail.
|
1156
|
+
# p result
|
1157
|
+
#
|
1158
|
+
def get_vod_ad_tag_detail request, options = nil
|
1159
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1160
|
+
|
1161
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetVodAdTagDetailRequest
|
1162
|
+
|
1163
|
+
# Converts hash and nil to an options object
|
1164
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1165
|
+
|
1166
|
+
# Customize the options with defaults
|
1167
|
+
metadata = @config.rpcs.get_vod_ad_tag_detail.metadata.to_h
|
1168
|
+
|
1169
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1170
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1171
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1172
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1173
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1174
|
+
|
1175
|
+
header_params = {}
|
1176
|
+
if request.name
|
1177
|
+
header_params["name"] = request.name
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1181
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1182
|
+
|
1183
|
+
options.apply_defaults timeout: @config.rpcs.get_vod_ad_tag_detail.timeout,
|
1184
|
+
metadata: metadata,
|
1185
|
+
retry_policy: @config.rpcs.get_vod_ad_tag_detail.retry_policy
|
1186
|
+
|
1187
|
+
options.apply_defaults timeout: @config.timeout,
|
1188
|
+
metadata: @config.metadata,
|
1189
|
+
retry_policy: @config.retry_policy
|
1190
|
+
|
1191
|
+
@video_stitcher_service_stub.call_rpc :get_vod_ad_tag_detail, request, options: options do |response, operation|
|
1192
|
+
yield response, operation if block_given?
|
1193
|
+
return response
|
1194
|
+
end
|
1195
|
+
rescue ::GRPC::BadStatus => e
|
1196
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
##
|
1200
|
+
# Return the list of ad tag details for the specified live session.
|
1201
|
+
#
|
1202
|
+
# @overload list_live_ad_tag_details(request, options = nil)
|
1203
|
+
# Pass arguments to `list_live_ad_tag_details` via a request object, either of type
|
1204
|
+
# {::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest} or an equivalent Hash.
|
1205
|
+
#
|
1206
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest, ::Hash]
|
1207
|
+
# A request object representing the call parameters. Required. To specify no
|
1208
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1209
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1210
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1211
|
+
#
|
1212
|
+
# @overload list_live_ad_tag_details(parent: nil, page_size: nil, page_token: nil)
|
1213
|
+
# Pass arguments to `list_live_ad_tag_details` via keyword arguments. Note that at
|
1214
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1215
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1216
|
+
#
|
1217
|
+
# @param parent [::String]
|
1218
|
+
# Required. The resource parent in the form of
|
1219
|
+
# `projects/{project}/locations/{location}/liveSessions/{live_session}`.
|
1220
|
+
# @param page_size [::Integer]
|
1221
|
+
# The maximum number of items to return.
|
1222
|
+
# @param page_token [::String]
|
1223
|
+
# The pagination token returned from a previous List request.
|
1224
|
+
#
|
1225
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1226
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>]
|
1227
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1228
|
+
#
|
1229
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail>]
|
1230
|
+
#
|
1231
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1232
|
+
#
|
1233
|
+
# @example Basic example
|
1234
|
+
# require "google/cloud/video/stitcher/v1"
|
1235
|
+
#
|
1236
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1237
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1238
|
+
#
|
1239
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1240
|
+
# request = Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest.new
|
1241
|
+
#
|
1242
|
+
# # Call the list_live_ad_tag_details method.
|
1243
|
+
# result = client.list_live_ad_tag_details request
|
1244
|
+
#
|
1245
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1246
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1247
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1248
|
+
# # methods are also available for managing paging directly.
|
1249
|
+
# result.each do |response|
|
1250
|
+
# # Each element is of type ::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail.
|
1251
|
+
# p response
|
1252
|
+
# end
|
1253
|
+
#
|
1254
|
+
def list_live_ad_tag_details request, options = nil
|
1255
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1256
|
+
|
1257
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListLiveAdTagDetailsRequest
|
1258
|
+
|
1259
|
+
# Converts hash and nil to an options object
|
1260
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1261
|
+
|
1262
|
+
# Customize the options with defaults
|
1263
|
+
metadata = @config.rpcs.list_live_ad_tag_details.metadata.to_h
|
1264
|
+
|
1265
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1266
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1267
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1268
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1269
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1270
|
+
|
1271
|
+
header_params = {}
|
1272
|
+
if request.parent
|
1273
|
+
header_params["parent"] = request.parent
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1277
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1278
|
+
|
1279
|
+
options.apply_defaults timeout: @config.rpcs.list_live_ad_tag_details.timeout,
|
1280
|
+
metadata: metadata,
|
1281
|
+
retry_policy: @config.rpcs.list_live_ad_tag_details.retry_policy
|
1282
|
+
|
1283
|
+
options.apply_defaults timeout: @config.timeout,
|
1284
|
+
metadata: @config.metadata,
|
1285
|
+
retry_policy: @config.retry_policy
|
1286
|
+
|
1287
|
+
@video_stitcher_service_stub.call_rpc :list_live_ad_tag_details, request, options: options do |response, operation|
|
1288
|
+
response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_live_ad_tag_details, request, response, operation, options
|
1289
|
+
yield response, operation if block_given?
|
1290
|
+
return response
|
1291
|
+
end
|
1292
|
+
rescue ::GRPC::BadStatus => e
|
1293
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1294
|
+
end
|
1295
|
+
|
1296
|
+
##
|
1297
|
+
# Returns the specified ad tag detail for the specified live session.
|
1298
|
+
#
|
1299
|
+
# @overload get_live_ad_tag_detail(request, options = nil)
|
1300
|
+
# Pass arguments to `get_live_ad_tag_detail` via a request object, either of type
|
1301
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest} or an equivalent Hash.
|
1302
|
+
#
|
1303
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest, ::Hash]
|
1304
|
+
# A request object representing the call parameters. Required. To specify no
|
1305
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1306
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1307
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1308
|
+
#
|
1309
|
+
# @overload get_live_ad_tag_detail(name: nil)
|
1310
|
+
# Pass arguments to `get_live_ad_tag_detail` via keyword arguments. Note that at
|
1311
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1312
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1313
|
+
#
|
1314
|
+
# @param name [::String]
|
1315
|
+
# Required. The resource name in the form of
|
1316
|
+
# `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`.
|
1317
|
+
#
|
1318
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1319
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail]
|
1320
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1321
|
+
#
|
1322
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail]
|
1323
|
+
#
|
1324
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1325
|
+
#
|
1326
|
+
# @example Basic example
|
1327
|
+
# require "google/cloud/video/stitcher/v1"
|
1328
|
+
#
|
1329
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1330
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1331
|
+
#
|
1332
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1333
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest.new
|
1334
|
+
#
|
1335
|
+
# # Call the get_live_ad_tag_detail method.
|
1336
|
+
# result = client.get_live_ad_tag_detail request
|
1337
|
+
#
|
1338
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveAdTagDetail.
|
1339
|
+
# p result
|
1340
|
+
#
|
1341
|
+
def get_live_ad_tag_detail request, options = nil
|
1342
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1343
|
+
|
1344
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveAdTagDetailRequest
|
1345
|
+
|
1346
|
+
# Converts hash and nil to an options object
|
1347
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1348
|
+
|
1349
|
+
# Customize the options with defaults
|
1350
|
+
metadata = @config.rpcs.get_live_ad_tag_detail.metadata.to_h
|
1351
|
+
|
1352
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1353
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1354
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1355
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1356
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1357
|
+
|
1358
|
+
header_params = {}
|
1359
|
+
if request.name
|
1360
|
+
header_params["name"] = request.name
|
1361
|
+
end
|
1362
|
+
|
1363
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1364
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1365
|
+
|
1366
|
+
options.apply_defaults timeout: @config.rpcs.get_live_ad_tag_detail.timeout,
|
1367
|
+
metadata: metadata,
|
1368
|
+
retry_policy: @config.rpcs.get_live_ad_tag_detail.retry_policy
|
1369
|
+
|
1370
|
+
options.apply_defaults timeout: @config.timeout,
|
1371
|
+
metadata: @config.metadata,
|
1372
|
+
retry_policy: @config.retry_policy
|
1373
|
+
|
1374
|
+
@video_stitcher_service_stub.call_rpc :get_live_ad_tag_detail, request, options: options do |response, operation|
|
1375
|
+
yield response, operation if block_given?
|
1376
|
+
return response
|
1377
|
+
end
|
1378
|
+
rescue ::GRPC::BadStatus => e
|
1379
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1380
|
+
end
|
1381
|
+
|
1382
|
+
##
|
1383
|
+
# Creates a slate.
|
1384
|
+
#
|
1385
|
+
# @overload create_slate(request, options = nil)
|
1386
|
+
# Pass arguments to `create_slate` via a request object, either of type
|
1387
|
+
# {::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest} or an equivalent Hash.
|
1388
|
+
#
|
1389
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest, ::Hash]
|
1390
|
+
# A request object representing the call parameters. Required. To specify no
|
1391
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1392
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1393
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1394
|
+
#
|
1395
|
+
# @overload create_slate(parent: nil, slate_id: nil, slate: nil)
|
1396
|
+
# Pass arguments to `create_slate` via keyword arguments. Note that at
|
1397
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1398
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1399
|
+
#
|
1400
|
+
# @param parent [::String]
|
1401
|
+
# Required. The project in which the slate should be created, in the form of
|
1402
|
+
# `projects/{project_number}`.
|
1403
|
+
# @param slate_id [::String]
|
1404
|
+
# Required. The unique identifier for the slate.
|
1405
|
+
# This value should conform to RFC-1034, which restricts to
|
1406
|
+
# lower-case letters, numbers, and hyphen, with the first character a
|
1407
|
+
# letter, the last a letter or a number, and a 63 character maximum.
|
1408
|
+
# @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash]
|
1409
|
+
# Required. The slate to create.
|
1410
|
+
#
|
1411
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1412
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate]
|
1413
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1414
|
+
#
|
1415
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::Slate]
|
1416
|
+
#
|
1417
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1418
|
+
#
|
1419
|
+
# @example Basic example
|
1420
|
+
# require "google/cloud/video/stitcher/v1"
|
1421
|
+
#
|
1422
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1423
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1424
|
+
#
|
1425
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1426
|
+
# request = Google::Cloud::Video::Stitcher::V1::CreateSlateRequest.new
|
1427
|
+
#
|
1428
|
+
# # Call the create_slate method.
|
1429
|
+
# result = client.create_slate request
|
1430
|
+
#
|
1431
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate.
|
1432
|
+
# p result
|
1433
|
+
#
|
1434
|
+
def create_slate request, options = nil
|
1435
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1436
|
+
|
1437
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateSlateRequest
|
1438
|
+
|
1439
|
+
# Converts hash and nil to an options object
|
1440
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1441
|
+
|
1442
|
+
# Customize the options with defaults
|
1443
|
+
metadata = @config.rpcs.create_slate.metadata.to_h
|
1444
|
+
|
1445
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1446
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1447
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1448
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1449
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1450
|
+
|
1451
|
+
header_params = {}
|
1452
|
+
if request.parent
|
1453
|
+
header_params["parent"] = request.parent
|
1454
|
+
end
|
1455
|
+
|
1456
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1457
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1458
|
+
|
1459
|
+
options.apply_defaults timeout: @config.rpcs.create_slate.timeout,
|
1460
|
+
metadata: metadata,
|
1461
|
+
retry_policy: @config.rpcs.create_slate.retry_policy
|
1462
|
+
|
1463
|
+
options.apply_defaults timeout: @config.timeout,
|
1464
|
+
metadata: @config.metadata,
|
1465
|
+
retry_policy: @config.retry_policy
|
1466
|
+
|
1467
|
+
@video_stitcher_service_stub.call_rpc :create_slate, request, options: options do |response, operation|
|
1468
|
+
yield response, operation if block_given?
|
1469
|
+
return response
|
1470
|
+
end
|
1471
|
+
rescue ::GRPC::BadStatus => e
|
1472
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
##
|
1476
|
+
# Lists all slates in the specified project and location.
|
1477
|
+
#
|
1478
|
+
# @overload list_slates(request, options = nil)
|
1479
|
+
# Pass arguments to `list_slates` via a request object, either of type
|
1480
|
+
# {::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest} or an equivalent Hash.
|
1481
|
+
#
|
1482
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest, ::Hash]
|
1483
|
+
# A request object representing the call parameters. Required. To specify no
|
1484
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1485
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1486
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1487
|
+
#
|
1488
|
+
# @overload list_slates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1489
|
+
# Pass arguments to `list_slates` via keyword arguments. Note that at
|
1490
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1491
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1492
|
+
#
|
1493
|
+
# @param parent [::String]
|
1494
|
+
# Required. The project to list slates, in the form of `projects/{project_number}`.
|
1495
|
+
# @param page_size [::Integer]
|
1496
|
+
# Requested page size. Server may return fewer items than requested.
|
1497
|
+
# If unspecified, server will pick an appropriate default.
|
1498
|
+
# @param page_token [::String]
|
1499
|
+
# A token identifying a page of results the server should return.
|
1500
|
+
# @param filter [::String]
|
1501
|
+
# Filtering results
|
1502
|
+
# @param order_by [::String]
|
1503
|
+
# Hint for how to order the results
|
1504
|
+
#
|
1505
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1506
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::Slate>]
|
1507
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1508
|
+
#
|
1509
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::Stitcher::V1::Slate>]
|
1510
|
+
#
|
1511
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1512
|
+
#
|
1513
|
+
# @example Basic example
|
1514
|
+
# require "google/cloud/video/stitcher/v1"
|
1515
|
+
#
|
1516
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1517
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1518
|
+
#
|
1519
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1520
|
+
# request = Google::Cloud::Video::Stitcher::V1::ListSlatesRequest.new
|
1521
|
+
#
|
1522
|
+
# # Call the list_slates method.
|
1523
|
+
# result = client.list_slates request
|
1524
|
+
#
|
1525
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1526
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1527
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1528
|
+
# # methods are also available for managing paging directly.
|
1529
|
+
# result.each do |response|
|
1530
|
+
# # Each element is of type ::Google::Cloud::Video::Stitcher::V1::Slate.
|
1531
|
+
# p response
|
1532
|
+
# end
|
1533
|
+
#
|
1534
|
+
def list_slates request, options = nil
|
1535
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1536
|
+
|
1537
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::ListSlatesRequest
|
1538
|
+
|
1539
|
+
# Converts hash and nil to an options object
|
1540
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1541
|
+
|
1542
|
+
# Customize the options with defaults
|
1543
|
+
metadata = @config.rpcs.list_slates.metadata.to_h
|
1544
|
+
|
1545
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1546
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1547
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1548
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1549
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1550
|
+
|
1551
|
+
header_params = {}
|
1552
|
+
if request.parent
|
1553
|
+
header_params["parent"] = request.parent
|
1554
|
+
end
|
1555
|
+
|
1556
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1557
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1558
|
+
|
1559
|
+
options.apply_defaults timeout: @config.rpcs.list_slates.timeout,
|
1560
|
+
metadata: metadata,
|
1561
|
+
retry_policy: @config.rpcs.list_slates.retry_policy
|
1562
|
+
|
1563
|
+
options.apply_defaults timeout: @config.timeout,
|
1564
|
+
metadata: @config.metadata,
|
1565
|
+
retry_policy: @config.retry_policy
|
1566
|
+
|
1567
|
+
@video_stitcher_service_stub.call_rpc :list_slates, request, options: options do |response, operation|
|
1568
|
+
response = ::Gapic::PagedEnumerable.new @video_stitcher_service_stub, :list_slates, request, response, operation, options
|
1569
|
+
yield response, operation if block_given?
|
1570
|
+
return response
|
1571
|
+
end
|
1572
|
+
rescue ::GRPC::BadStatus => e
|
1573
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1574
|
+
end
|
1575
|
+
|
1576
|
+
##
|
1577
|
+
# Returns the specified slate.
|
1578
|
+
#
|
1579
|
+
# @overload get_slate(request, options = nil)
|
1580
|
+
# Pass arguments to `get_slate` via a request object, either of type
|
1581
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetSlateRequest} or an equivalent Hash.
|
1582
|
+
#
|
1583
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetSlateRequest, ::Hash]
|
1584
|
+
# A request object representing the call parameters. Required. To specify no
|
1585
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1586
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1587
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1588
|
+
#
|
1589
|
+
# @overload get_slate(name: nil)
|
1590
|
+
# Pass arguments to `get_slate` via keyword arguments. Note that at
|
1591
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1592
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1593
|
+
#
|
1594
|
+
# @param name [::String]
|
1595
|
+
# Required. The name of the slate to be retrieved, of the slate, in the form of
|
1596
|
+
# `projects/{project_number}/locations/{location}/slates/{id}`.
|
1597
|
+
#
|
1598
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1599
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate]
|
1600
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1601
|
+
#
|
1602
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::Slate]
|
1603
|
+
#
|
1604
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1605
|
+
#
|
1606
|
+
# @example Basic example
|
1607
|
+
# require "google/cloud/video/stitcher/v1"
|
1608
|
+
#
|
1609
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1610
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1611
|
+
#
|
1612
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1613
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetSlateRequest.new
|
1614
|
+
#
|
1615
|
+
# # Call the get_slate method.
|
1616
|
+
# result = client.get_slate request
|
1617
|
+
#
|
1618
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate.
|
1619
|
+
# p result
|
1620
|
+
#
|
1621
|
+
def get_slate request, options = nil
|
1622
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1623
|
+
|
1624
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetSlateRequest
|
1625
|
+
|
1626
|
+
# Converts hash and nil to an options object
|
1627
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1628
|
+
|
1629
|
+
# Customize the options with defaults
|
1630
|
+
metadata = @config.rpcs.get_slate.metadata.to_h
|
1631
|
+
|
1632
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1633
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1634
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1635
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1636
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1637
|
+
|
1638
|
+
header_params = {}
|
1639
|
+
if request.name
|
1640
|
+
header_params["name"] = request.name
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1644
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1645
|
+
|
1646
|
+
options.apply_defaults timeout: @config.rpcs.get_slate.timeout,
|
1647
|
+
metadata: metadata,
|
1648
|
+
retry_policy: @config.rpcs.get_slate.retry_policy
|
1649
|
+
|
1650
|
+
options.apply_defaults timeout: @config.timeout,
|
1651
|
+
metadata: @config.metadata,
|
1652
|
+
retry_policy: @config.retry_policy
|
1653
|
+
|
1654
|
+
@video_stitcher_service_stub.call_rpc :get_slate, request, options: options do |response, operation|
|
1655
|
+
yield response, operation if block_given?
|
1656
|
+
return response
|
1657
|
+
end
|
1658
|
+
rescue ::GRPC::BadStatus => e
|
1659
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1660
|
+
end
|
1661
|
+
|
1662
|
+
##
|
1663
|
+
# Updates the specified slate.
|
1664
|
+
#
|
1665
|
+
# @overload update_slate(request, options = nil)
|
1666
|
+
# Pass arguments to `update_slate` via a request object, either of type
|
1667
|
+
# {::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest} or an equivalent Hash.
|
1668
|
+
#
|
1669
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest, ::Hash]
|
1670
|
+
# A request object representing the call parameters. Required. To specify no
|
1671
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1672
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1673
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1674
|
+
#
|
1675
|
+
# @overload update_slate(slate: nil, update_mask: nil)
|
1676
|
+
# Pass arguments to `update_slate` via keyword arguments. Note that at
|
1677
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1678
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1679
|
+
#
|
1680
|
+
# @param slate [::Google::Cloud::Video::Stitcher::V1::Slate, ::Hash]
|
1681
|
+
# Required. The resource with updated fields.
|
1682
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1683
|
+
# Required. The update mask which specifies fields which should be updated.
|
1684
|
+
#
|
1685
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1686
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::Slate]
|
1687
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1688
|
+
#
|
1689
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::Slate]
|
1690
|
+
#
|
1691
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1692
|
+
#
|
1693
|
+
# @example Basic example
|
1694
|
+
# require "google/cloud/video/stitcher/v1"
|
1695
|
+
#
|
1696
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1697
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1698
|
+
#
|
1699
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1700
|
+
# request = Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest.new
|
1701
|
+
#
|
1702
|
+
# # Call the update_slate method.
|
1703
|
+
# result = client.update_slate request
|
1704
|
+
#
|
1705
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::Slate.
|
1706
|
+
# p result
|
1707
|
+
#
|
1708
|
+
def update_slate request, options = nil
|
1709
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1710
|
+
|
1711
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::UpdateSlateRequest
|
1712
|
+
|
1713
|
+
# Converts hash and nil to an options object
|
1714
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1715
|
+
|
1716
|
+
# Customize the options with defaults
|
1717
|
+
metadata = @config.rpcs.update_slate.metadata.to_h
|
1718
|
+
|
1719
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1720
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1721
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1722
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1723
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1724
|
+
|
1725
|
+
header_params = {}
|
1726
|
+
if request.slate&.name
|
1727
|
+
header_params["slate.name"] = request.slate.name
|
1728
|
+
end
|
1729
|
+
|
1730
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1731
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1732
|
+
|
1733
|
+
options.apply_defaults timeout: @config.rpcs.update_slate.timeout,
|
1734
|
+
metadata: metadata,
|
1735
|
+
retry_policy: @config.rpcs.update_slate.retry_policy
|
1736
|
+
|
1737
|
+
options.apply_defaults timeout: @config.timeout,
|
1738
|
+
metadata: @config.metadata,
|
1739
|
+
retry_policy: @config.retry_policy
|
1740
|
+
|
1741
|
+
@video_stitcher_service_stub.call_rpc :update_slate, request, options: options do |response, operation|
|
1742
|
+
yield response, operation if block_given?
|
1743
|
+
return response
|
1744
|
+
end
|
1745
|
+
rescue ::GRPC::BadStatus => e
|
1746
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1747
|
+
end
|
1748
|
+
|
1749
|
+
##
|
1750
|
+
# Deletes the specified slate.
|
1751
|
+
#
|
1752
|
+
# @overload delete_slate(request, options = nil)
|
1753
|
+
# Pass arguments to `delete_slate` via a request object, either of type
|
1754
|
+
# {::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest} or an equivalent Hash.
|
1755
|
+
#
|
1756
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest, ::Hash]
|
1757
|
+
# A request object representing the call parameters. Required. To specify no
|
1758
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1759
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1760
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1761
|
+
#
|
1762
|
+
# @overload delete_slate(name: nil)
|
1763
|
+
# Pass arguments to `delete_slate` via keyword arguments. Note that at
|
1764
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1765
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1766
|
+
#
|
1767
|
+
# @param name [::String]
|
1768
|
+
# Required. The name of the slate to be deleted, in the form of
|
1769
|
+
# `projects/{project_number}/locations/{location}/slates/{id}`.
|
1770
|
+
#
|
1771
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1772
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1773
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1774
|
+
#
|
1775
|
+
# @return [::Google::Protobuf::Empty]
|
1776
|
+
#
|
1777
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1778
|
+
#
|
1779
|
+
# @example Basic example
|
1780
|
+
# require "google/cloud/video/stitcher/v1"
|
1781
|
+
#
|
1782
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1783
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1784
|
+
#
|
1785
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1786
|
+
# request = Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest.new
|
1787
|
+
#
|
1788
|
+
# # Call the delete_slate method.
|
1789
|
+
# result = client.delete_slate request
|
1790
|
+
#
|
1791
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1792
|
+
# p result
|
1793
|
+
#
|
1794
|
+
def delete_slate request, options = nil
|
1795
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1796
|
+
|
1797
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::DeleteSlateRequest
|
1798
|
+
|
1799
|
+
# Converts hash and nil to an options object
|
1800
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1801
|
+
|
1802
|
+
# Customize the options with defaults
|
1803
|
+
metadata = @config.rpcs.delete_slate.metadata.to_h
|
1804
|
+
|
1805
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1806
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1807
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1808
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1809
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1810
|
+
|
1811
|
+
header_params = {}
|
1812
|
+
if request.name
|
1813
|
+
header_params["name"] = request.name
|
1814
|
+
end
|
1815
|
+
|
1816
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1817
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1818
|
+
|
1819
|
+
options.apply_defaults timeout: @config.rpcs.delete_slate.timeout,
|
1820
|
+
metadata: metadata,
|
1821
|
+
retry_policy: @config.rpcs.delete_slate.retry_policy
|
1822
|
+
|
1823
|
+
options.apply_defaults timeout: @config.timeout,
|
1824
|
+
metadata: @config.metadata,
|
1825
|
+
retry_policy: @config.retry_policy
|
1826
|
+
|
1827
|
+
@video_stitcher_service_stub.call_rpc :delete_slate, request, options: options do |response, operation|
|
1828
|
+
yield response, operation if block_given?
|
1829
|
+
return response
|
1830
|
+
end
|
1831
|
+
rescue ::GRPC::BadStatus => e
|
1832
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1833
|
+
end
|
1834
|
+
|
1835
|
+
##
|
1836
|
+
# Creates a new live session.
|
1837
|
+
#
|
1838
|
+
# @overload create_live_session(request, options = nil)
|
1839
|
+
# Pass arguments to `create_live_session` via a request object, either of type
|
1840
|
+
# {::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest} or an equivalent Hash.
|
1841
|
+
#
|
1842
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest, ::Hash]
|
1843
|
+
# A request object representing the call parameters. Required. To specify no
|
1844
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1845
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1846
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1847
|
+
#
|
1848
|
+
# @overload create_live_session(parent: nil, live_session: nil)
|
1849
|
+
# Pass arguments to `create_live_session` via keyword arguments. Note that at
|
1850
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1851
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1852
|
+
#
|
1853
|
+
# @param parent [::String]
|
1854
|
+
# Required. The project and location in which the live session should be created,
|
1855
|
+
# in the form of `projects/{project_number}/locations/{location}`.
|
1856
|
+
#
|
1857
|
+
# Valid locations:
|
1858
|
+
#
|
1859
|
+
# * `-` (Video Stitcher API will pick a location that is closest to the
|
1860
|
+
# caller.)
|
1861
|
+
# * `us-east1`
|
1862
|
+
# * `us-west1`
|
1863
|
+
# * `us-central1`
|
1864
|
+
# * `europe-west1`
|
1865
|
+
# @param live_session [::Google::Cloud::Video::Stitcher::V1::LiveSession, ::Hash]
|
1866
|
+
# Required. Parameters for creating a live session.
|
1867
|
+
#
|
1868
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1869
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveSession]
|
1870
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1871
|
+
#
|
1872
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::LiveSession]
|
1873
|
+
#
|
1874
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1875
|
+
#
|
1876
|
+
# @example Basic example
|
1877
|
+
# require "google/cloud/video/stitcher/v1"
|
1878
|
+
#
|
1879
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1880
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1881
|
+
#
|
1882
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1883
|
+
# request = Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest.new
|
1884
|
+
#
|
1885
|
+
# # Call the create_live_session method.
|
1886
|
+
# result = client.create_live_session request
|
1887
|
+
#
|
1888
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession.
|
1889
|
+
# p result
|
1890
|
+
#
|
1891
|
+
def create_live_session request, options = nil
|
1892
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1893
|
+
|
1894
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::CreateLiveSessionRequest
|
1895
|
+
|
1896
|
+
# Converts hash and nil to an options object
|
1897
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1898
|
+
|
1899
|
+
# Customize the options with defaults
|
1900
|
+
metadata = @config.rpcs.create_live_session.metadata.to_h
|
1901
|
+
|
1902
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1903
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1904
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1905
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1906
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1907
|
+
|
1908
|
+
header_params = {}
|
1909
|
+
if request.parent
|
1910
|
+
header_params["parent"] = request.parent
|
1911
|
+
end
|
1912
|
+
|
1913
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1914
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1915
|
+
|
1916
|
+
options.apply_defaults timeout: @config.rpcs.create_live_session.timeout,
|
1917
|
+
metadata: metadata,
|
1918
|
+
retry_policy: @config.rpcs.create_live_session.retry_policy
|
1919
|
+
|
1920
|
+
options.apply_defaults timeout: @config.timeout,
|
1921
|
+
metadata: @config.metadata,
|
1922
|
+
retry_policy: @config.retry_policy
|
1923
|
+
|
1924
|
+
@video_stitcher_service_stub.call_rpc :create_live_session, request, options: options do |response, operation|
|
1925
|
+
yield response, operation if block_given?
|
1926
|
+
return response
|
1927
|
+
end
|
1928
|
+
rescue ::GRPC::BadStatus => e
|
1929
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1930
|
+
end
|
1931
|
+
|
1932
|
+
##
|
1933
|
+
# Returns the details for the specified live session.
|
1934
|
+
#
|
1935
|
+
# @overload get_live_session(request, options = nil)
|
1936
|
+
# Pass arguments to `get_live_session` via a request object, either of type
|
1937
|
+
# {::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest} or an equivalent Hash.
|
1938
|
+
#
|
1939
|
+
# @param request [::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest, ::Hash]
|
1940
|
+
# A request object representing the call parameters. Required. To specify no
|
1941
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1942
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1943
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1944
|
+
#
|
1945
|
+
# @overload get_live_session(name: nil)
|
1946
|
+
# Pass arguments to `get_live_session` via keyword arguments. Note that at
|
1947
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1948
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1949
|
+
#
|
1950
|
+
# @param name [::String]
|
1951
|
+
# Required. The name of the live session, in the form of
|
1952
|
+
# `projects/{project_number}/locations/{location}/liveSessions/{id}`.
|
1953
|
+
#
|
1954
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1955
|
+
# @yieldparam response [::Google::Cloud::Video::Stitcher::V1::LiveSession]
|
1956
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1957
|
+
#
|
1958
|
+
# @return [::Google::Cloud::Video::Stitcher::V1::LiveSession]
|
1959
|
+
#
|
1960
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1961
|
+
#
|
1962
|
+
# @example Basic example
|
1963
|
+
# require "google/cloud/video/stitcher/v1"
|
1964
|
+
#
|
1965
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1966
|
+
# client = Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new
|
1967
|
+
#
|
1968
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1969
|
+
# request = Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest.new
|
1970
|
+
#
|
1971
|
+
# # Call the get_live_session method.
|
1972
|
+
# result = client.get_live_session request
|
1973
|
+
#
|
1974
|
+
# # The returned object is of type Google::Cloud::Video::Stitcher::V1::LiveSession.
|
1975
|
+
# p result
|
1976
|
+
#
|
1977
|
+
def get_live_session request, options = nil
|
1978
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1979
|
+
|
1980
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::Stitcher::V1::GetLiveSessionRequest
|
1981
|
+
|
1982
|
+
# Converts hash and nil to an options object
|
1983
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1984
|
+
|
1985
|
+
# Customize the options with defaults
|
1986
|
+
metadata = @config.rpcs.get_live_session.metadata.to_h
|
1987
|
+
|
1988
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1989
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1990
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1991
|
+
gapic_version: ::Google::Cloud::Video::Stitcher::V1::VERSION
|
1992
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1993
|
+
|
1994
|
+
header_params = {}
|
1995
|
+
if request.name
|
1996
|
+
header_params["name"] = request.name
|
1997
|
+
end
|
1998
|
+
|
1999
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2000
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2001
|
+
|
2002
|
+
options.apply_defaults timeout: @config.rpcs.get_live_session.timeout,
|
2003
|
+
metadata: metadata,
|
2004
|
+
retry_policy: @config.rpcs.get_live_session.retry_policy
|
2005
|
+
|
2006
|
+
options.apply_defaults timeout: @config.timeout,
|
2007
|
+
metadata: @config.metadata,
|
2008
|
+
retry_policy: @config.retry_policy
|
2009
|
+
|
2010
|
+
@video_stitcher_service_stub.call_rpc :get_live_session, request, options: options do |response, operation|
|
2011
|
+
yield response, operation if block_given?
|
2012
|
+
return response
|
2013
|
+
end
|
2014
|
+
rescue ::GRPC::BadStatus => e
|
2015
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2016
|
+
end
|
2017
|
+
|
2018
|
+
##
|
2019
|
+
# Configuration class for the VideoStitcherService API.
|
2020
|
+
#
|
2021
|
+
# This class represents the configuration for VideoStitcherService,
|
2022
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2023
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2024
|
+
# applied individually to specific RPCs. See
|
2025
|
+
# {::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client::Configuration::Rpcs}
|
2026
|
+
# for a list of RPCs that can be configured independently.
|
2027
|
+
#
|
2028
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2029
|
+
# on construction.
|
2030
|
+
#
|
2031
|
+
# @example
|
2032
|
+
#
|
2033
|
+
# # Modify the global config, setting the timeout for
|
2034
|
+
# # create_cdn_key to 20 seconds,
|
2035
|
+
# # and all remaining timeouts to 10 seconds.
|
2036
|
+
# ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.configure do |config|
|
2037
|
+
# config.timeout = 10.0
|
2038
|
+
# config.rpcs.create_cdn_key.timeout = 20.0
|
2039
|
+
# end
|
2040
|
+
#
|
2041
|
+
# # Apply the above configuration only to a new client.
|
2042
|
+
# client = ::Google::Cloud::Video::Stitcher::V1::VideoStitcherService::Client.new do |config|
|
2043
|
+
# config.timeout = 10.0
|
2044
|
+
# config.rpcs.create_cdn_key.timeout = 20.0
|
2045
|
+
# end
|
2046
|
+
#
|
2047
|
+
# @!attribute [rw] endpoint
|
2048
|
+
# The hostname or hostname:port of the service endpoint.
|
2049
|
+
# Defaults to `"videostitcher.googleapis.com"`.
|
2050
|
+
# @return [::String]
|
2051
|
+
# @!attribute [rw] credentials
|
2052
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2053
|
+
# * (`String`) The path to a service account key file in JSON format
|
2054
|
+
# * (`Hash`) A service account key as a Hash
|
2055
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2056
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
2057
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2058
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
2059
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2060
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2061
|
+
# * (`nil`) indicating no credentials
|
2062
|
+
# @return [::Object]
|
2063
|
+
# @!attribute [rw] scope
|
2064
|
+
# The OAuth scopes
|
2065
|
+
# @return [::Array<::String>]
|
2066
|
+
# @!attribute [rw] lib_name
|
2067
|
+
# The library name as recorded in instrumentation and logging
|
2068
|
+
# @return [::String]
|
2069
|
+
# @!attribute [rw] lib_version
|
2070
|
+
# The library version as recorded in instrumentation and logging
|
2071
|
+
# @return [::String]
|
2072
|
+
# @!attribute [rw] channel_args
|
2073
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
2074
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
2075
|
+
# @return [::Hash]
|
2076
|
+
# @!attribute [rw] interceptors
|
2077
|
+
# An array of interceptors that are run before calls are executed.
|
2078
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
2079
|
+
# @!attribute [rw] timeout
|
2080
|
+
# The call timeout in seconds.
|
2081
|
+
# @return [::Numeric]
|
2082
|
+
# @!attribute [rw] metadata
|
2083
|
+
# Additional gRPC headers to be sent with the call.
|
2084
|
+
# @return [::Hash{::Symbol=>::String}]
|
2085
|
+
# @!attribute [rw] retry_policy
|
2086
|
+
# The retry policy. The value is a hash with the following keys:
|
2087
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2088
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2089
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2090
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2091
|
+
# trigger a retry.
|
2092
|
+
# @return [::Hash]
|
2093
|
+
# @!attribute [rw] quota_project
|
2094
|
+
# A separate project against which to charge quota.
|
2095
|
+
# @return [::String]
|
2096
|
+
#
|
2097
|
+
class Configuration
|
2098
|
+
extend ::Gapic::Config
|
2099
|
+
|
2100
|
+
config_attr :endpoint, "videostitcher.googleapis.com", ::String
|
2101
|
+
config_attr :credentials, nil do |value|
|
2102
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2103
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
2104
|
+
allowed.any? { |klass| klass === value }
|
2105
|
+
end
|
2106
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2107
|
+
config_attr :lib_name, nil, ::String, nil
|
2108
|
+
config_attr :lib_version, nil, ::String, nil
|
2109
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2110
|
+
config_attr :interceptors, nil, ::Array, nil
|
2111
|
+
config_attr :timeout, nil, ::Numeric, nil
|
2112
|
+
config_attr :metadata, nil, ::Hash, nil
|
2113
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2114
|
+
config_attr :quota_project, nil, ::String, nil
|
2115
|
+
|
2116
|
+
# @private
|
2117
|
+
def initialize parent_config = nil
|
2118
|
+
@parent_config = parent_config unless parent_config.nil?
|
2119
|
+
|
2120
|
+
yield self if block_given?
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
##
|
2124
|
+
# Configurations for individual RPCs
|
2125
|
+
# @return [Rpcs]
|
2126
|
+
#
|
2127
|
+
def rpcs
|
2128
|
+
@rpcs ||= begin
|
2129
|
+
parent_rpcs = nil
|
2130
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2131
|
+
Rpcs.new parent_rpcs
|
2132
|
+
end
|
2133
|
+
end
|
2134
|
+
|
2135
|
+
##
|
2136
|
+
# Configuration RPC class for the VideoStitcherService API.
|
2137
|
+
#
|
2138
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2139
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2140
|
+
# the following configuration fields:
|
2141
|
+
#
|
2142
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2143
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
2144
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2145
|
+
# include the following keys:
|
2146
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2147
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2148
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2149
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2150
|
+
# trigger a retry.
|
2151
|
+
#
|
2152
|
+
class Rpcs
|
2153
|
+
##
|
2154
|
+
# RPC-specific configuration for `create_cdn_key`
|
2155
|
+
# @return [::Gapic::Config::Method]
|
2156
|
+
#
|
2157
|
+
attr_reader :create_cdn_key
|
2158
|
+
##
|
2159
|
+
# RPC-specific configuration for `list_cdn_keys`
|
2160
|
+
# @return [::Gapic::Config::Method]
|
2161
|
+
#
|
2162
|
+
attr_reader :list_cdn_keys
|
2163
|
+
##
|
2164
|
+
# RPC-specific configuration for `get_cdn_key`
|
2165
|
+
# @return [::Gapic::Config::Method]
|
2166
|
+
#
|
2167
|
+
attr_reader :get_cdn_key
|
2168
|
+
##
|
2169
|
+
# RPC-specific configuration for `delete_cdn_key`
|
2170
|
+
# @return [::Gapic::Config::Method]
|
2171
|
+
#
|
2172
|
+
attr_reader :delete_cdn_key
|
2173
|
+
##
|
2174
|
+
# RPC-specific configuration for `update_cdn_key`
|
2175
|
+
# @return [::Gapic::Config::Method]
|
2176
|
+
#
|
2177
|
+
attr_reader :update_cdn_key
|
2178
|
+
##
|
2179
|
+
# RPC-specific configuration for `create_vod_session`
|
2180
|
+
# @return [::Gapic::Config::Method]
|
2181
|
+
#
|
2182
|
+
attr_reader :create_vod_session
|
2183
|
+
##
|
2184
|
+
# RPC-specific configuration for `get_vod_session`
|
2185
|
+
# @return [::Gapic::Config::Method]
|
2186
|
+
#
|
2187
|
+
attr_reader :get_vod_session
|
2188
|
+
##
|
2189
|
+
# RPC-specific configuration for `list_vod_stitch_details`
|
2190
|
+
# @return [::Gapic::Config::Method]
|
2191
|
+
#
|
2192
|
+
attr_reader :list_vod_stitch_details
|
2193
|
+
##
|
2194
|
+
# RPC-specific configuration for `get_vod_stitch_detail`
|
2195
|
+
# @return [::Gapic::Config::Method]
|
2196
|
+
#
|
2197
|
+
attr_reader :get_vod_stitch_detail
|
2198
|
+
##
|
2199
|
+
# RPC-specific configuration for `list_vod_ad_tag_details`
|
2200
|
+
# @return [::Gapic::Config::Method]
|
2201
|
+
#
|
2202
|
+
attr_reader :list_vod_ad_tag_details
|
2203
|
+
##
|
2204
|
+
# RPC-specific configuration for `get_vod_ad_tag_detail`
|
2205
|
+
# @return [::Gapic::Config::Method]
|
2206
|
+
#
|
2207
|
+
attr_reader :get_vod_ad_tag_detail
|
2208
|
+
##
|
2209
|
+
# RPC-specific configuration for `list_live_ad_tag_details`
|
2210
|
+
# @return [::Gapic::Config::Method]
|
2211
|
+
#
|
2212
|
+
attr_reader :list_live_ad_tag_details
|
2213
|
+
##
|
2214
|
+
# RPC-specific configuration for `get_live_ad_tag_detail`
|
2215
|
+
# @return [::Gapic::Config::Method]
|
2216
|
+
#
|
2217
|
+
attr_reader :get_live_ad_tag_detail
|
2218
|
+
##
|
2219
|
+
# RPC-specific configuration for `create_slate`
|
2220
|
+
# @return [::Gapic::Config::Method]
|
2221
|
+
#
|
2222
|
+
attr_reader :create_slate
|
2223
|
+
##
|
2224
|
+
# RPC-specific configuration for `list_slates`
|
2225
|
+
# @return [::Gapic::Config::Method]
|
2226
|
+
#
|
2227
|
+
attr_reader :list_slates
|
2228
|
+
##
|
2229
|
+
# RPC-specific configuration for `get_slate`
|
2230
|
+
# @return [::Gapic::Config::Method]
|
2231
|
+
#
|
2232
|
+
attr_reader :get_slate
|
2233
|
+
##
|
2234
|
+
# RPC-specific configuration for `update_slate`
|
2235
|
+
# @return [::Gapic::Config::Method]
|
2236
|
+
#
|
2237
|
+
attr_reader :update_slate
|
2238
|
+
##
|
2239
|
+
# RPC-specific configuration for `delete_slate`
|
2240
|
+
# @return [::Gapic::Config::Method]
|
2241
|
+
#
|
2242
|
+
attr_reader :delete_slate
|
2243
|
+
##
|
2244
|
+
# RPC-specific configuration for `create_live_session`
|
2245
|
+
# @return [::Gapic::Config::Method]
|
2246
|
+
#
|
2247
|
+
attr_reader :create_live_session
|
2248
|
+
##
|
2249
|
+
# RPC-specific configuration for `get_live_session`
|
2250
|
+
# @return [::Gapic::Config::Method]
|
2251
|
+
#
|
2252
|
+
attr_reader :get_live_session
|
2253
|
+
|
2254
|
+
# @private
|
2255
|
+
def initialize parent_rpcs = nil
|
2256
|
+
create_cdn_key_config = parent_rpcs.create_cdn_key if parent_rpcs.respond_to? :create_cdn_key
|
2257
|
+
@create_cdn_key = ::Gapic::Config::Method.new create_cdn_key_config
|
2258
|
+
list_cdn_keys_config = parent_rpcs.list_cdn_keys if parent_rpcs.respond_to? :list_cdn_keys
|
2259
|
+
@list_cdn_keys = ::Gapic::Config::Method.new list_cdn_keys_config
|
2260
|
+
get_cdn_key_config = parent_rpcs.get_cdn_key if parent_rpcs.respond_to? :get_cdn_key
|
2261
|
+
@get_cdn_key = ::Gapic::Config::Method.new get_cdn_key_config
|
2262
|
+
delete_cdn_key_config = parent_rpcs.delete_cdn_key if parent_rpcs.respond_to? :delete_cdn_key
|
2263
|
+
@delete_cdn_key = ::Gapic::Config::Method.new delete_cdn_key_config
|
2264
|
+
update_cdn_key_config = parent_rpcs.update_cdn_key if parent_rpcs.respond_to? :update_cdn_key
|
2265
|
+
@update_cdn_key = ::Gapic::Config::Method.new update_cdn_key_config
|
2266
|
+
create_vod_session_config = parent_rpcs.create_vod_session if parent_rpcs.respond_to? :create_vod_session
|
2267
|
+
@create_vod_session = ::Gapic::Config::Method.new create_vod_session_config
|
2268
|
+
get_vod_session_config = parent_rpcs.get_vod_session if parent_rpcs.respond_to? :get_vod_session
|
2269
|
+
@get_vod_session = ::Gapic::Config::Method.new get_vod_session_config
|
2270
|
+
list_vod_stitch_details_config = parent_rpcs.list_vod_stitch_details if parent_rpcs.respond_to? :list_vod_stitch_details
|
2271
|
+
@list_vod_stitch_details = ::Gapic::Config::Method.new list_vod_stitch_details_config
|
2272
|
+
get_vod_stitch_detail_config = parent_rpcs.get_vod_stitch_detail if parent_rpcs.respond_to? :get_vod_stitch_detail
|
2273
|
+
@get_vod_stitch_detail = ::Gapic::Config::Method.new get_vod_stitch_detail_config
|
2274
|
+
list_vod_ad_tag_details_config = parent_rpcs.list_vod_ad_tag_details if parent_rpcs.respond_to? :list_vod_ad_tag_details
|
2275
|
+
@list_vod_ad_tag_details = ::Gapic::Config::Method.new list_vod_ad_tag_details_config
|
2276
|
+
get_vod_ad_tag_detail_config = parent_rpcs.get_vod_ad_tag_detail if parent_rpcs.respond_to? :get_vod_ad_tag_detail
|
2277
|
+
@get_vod_ad_tag_detail = ::Gapic::Config::Method.new get_vod_ad_tag_detail_config
|
2278
|
+
list_live_ad_tag_details_config = parent_rpcs.list_live_ad_tag_details if parent_rpcs.respond_to? :list_live_ad_tag_details
|
2279
|
+
@list_live_ad_tag_details = ::Gapic::Config::Method.new list_live_ad_tag_details_config
|
2280
|
+
get_live_ad_tag_detail_config = parent_rpcs.get_live_ad_tag_detail if parent_rpcs.respond_to? :get_live_ad_tag_detail
|
2281
|
+
@get_live_ad_tag_detail = ::Gapic::Config::Method.new get_live_ad_tag_detail_config
|
2282
|
+
create_slate_config = parent_rpcs.create_slate if parent_rpcs.respond_to? :create_slate
|
2283
|
+
@create_slate = ::Gapic::Config::Method.new create_slate_config
|
2284
|
+
list_slates_config = parent_rpcs.list_slates if parent_rpcs.respond_to? :list_slates
|
2285
|
+
@list_slates = ::Gapic::Config::Method.new list_slates_config
|
2286
|
+
get_slate_config = parent_rpcs.get_slate if parent_rpcs.respond_to? :get_slate
|
2287
|
+
@get_slate = ::Gapic::Config::Method.new get_slate_config
|
2288
|
+
update_slate_config = parent_rpcs.update_slate if parent_rpcs.respond_to? :update_slate
|
2289
|
+
@update_slate = ::Gapic::Config::Method.new update_slate_config
|
2290
|
+
delete_slate_config = parent_rpcs.delete_slate if parent_rpcs.respond_to? :delete_slate
|
2291
|
+
@delete_slate = ::Gapic::Config::Method.new delete_slate_config
|
2292
|
+
create_live_session_config = parent_rpcs.create_live_session if parent_rpcs.respond_to? :create_live_session
|
2293
|
+
@create_live_session = ::Gapic::Config::Method.new create_live_session_config
|
2294
|
+
get_live_session_config = parent_rpcs.get_live_session if parent_rpcs.respond_to? :get_live_session
|
2295
|
+
@get_live_session = ::Gapic::Config::Method.new get_live_session_config
|
2296
|
+
|
2297
|
+
yield self if block_given?
|
2298
|
+
end
|
2299
|
+
end
|
2300
|
+
end
|
2301
|
+
end
|
2302
|
+
end
|
2303
|
+
end
|
2304
|
+
end
|
2305
|
+
end
|
2306
|
+
end
|
2307
|
+
end
|