google-cloud-video-live_stream-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/live_stream/v1/livestream_service/client.rb +2162 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/credentials.rb +49 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb +769 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb +111 -0
- data/lib/google/cloud/video/live_stream/v1/livestream_service.rb +56 -0
- data/lib/google/cloud/video/live_stream/v1/version.rb +30 -0
- data/lib/google/cloud/video/live_stream/v1.rb +40 -0
- data/lib/google/cloud/video/livestream/v1/outputs_pb.rb +134 -0
- data/lib/google/cloud/video/livestream/v1/resources_pb.rb +168 -0
- data/lib/google/cloud/video/livestream/v1/service_pb.rb +154 -0
- data/lib/google/cloud/video/livestream/v1/service_services_pb.rb +84 -0
- data/lib/google-cloud-video-live_stream-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/livestream/v1/outputs.rb +427 -0
- data/proto_docs/google/cloud/video/livestream/v1/resources.rb +450 -0
- data/proto_docs/google/cloud/video/livestream/v1/service.rb +523 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -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/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +222 -0
@@ -0,0 +1,2162 @@
|
|
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/livestream/v1/service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Video
|
25
|
+
module LiveStream
|
26
|
+
module V1
|
27
|
+
module LivestreamService
|
28
|
+
##
|
29
|
+
# Client for the LivestreamService service.
|
30
|
+
#
|
31
|
+
# Using Live Stream API, you can generate live streams in the various
|
32
|
+
# renditions and streaming formats. The streaming format include HTTP Live
|
33
|
+
# Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send
|
34
|
+
# a source stream in the various ways, including Real-Time Messaging
|
35
|
+
# Protocol (RTMP) and Secure Reliable Transport (SRT).
|
36
|
+
#
|
37
|
+
class Client
|
38
|
+
include Paths
|
39
|
+
|
40
|
+
# @private
|
41
|
+
attr_reader :livestream_service_stub
|
42
|
+
|
43
|
+
##
|
44
|
+
# Configure the LivestreamService Client class.
|
45
|
+
#
|
46
|
+
# See {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client::Configuration}
|
47
|
+
# for a description of the configuration fields.
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
#
|
51
|
+
# # Modify the configuration for all LivestreamService clients
|
52
|
+
# ::Google::Cloud::Video::LiveStream::V1::LivestreamService::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", "LiveStream", "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.rpcs.create_channel.timeout = 60.0
|
73
|
+
|
74
|
+
default_config.rpcs.list_channels.timeout = 60.0
|
75
|
+
default_config.rpcs.list_channels.retry_policy = {
|
76
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
77
|
+
}
|
78
|
+
|
79
|
+
default_config.rpcs.get_channel.timeout = 60.0
|
80
|
+
default_config.rpcs.get_channel.retry_policy = {
|
81
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
82
|
+
}
|
83
|
+
|
84
|
+
default_config.rpcs.delete_channel.timeout = 60.0
|
85
|
+
|
86
|
+
default_config.rpcs.update_channel.timeout = 60.0
|
87
|
+
|
88
|
+
default_config.rpcs.start_channel.timeout = 60.0
|
89
|
+
|
90
|
+
default_config.rpcs.stop_channel.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.create_input.timeout = 60.0
|
93
|
+
|
94
|
+
default_config.rpcs.list_inputs.timeout = 60.0
|
95
|
+
default_config.rpcs.list_inputs.retry_policy = {
|
96
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
97
|
+
}
|
98
|
+
|
99
|
+
default_config.rpcs.get_input.timeout = 60.0
|
100
|
+
default_config.rpcs.get_input.retry_policy = {
|
101
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
102
|
+
}
|
103
|
+
|
104
|
+
default_config.rpcs.delete_input.timeout = 60.0
|
105
|
+
|
106
|
+
default_config.rpcs.update_input.timeout = 60.0
|
107
|
+
|
108
|
+
default_config.rpcs.create_event.timeout = 60.0
|
109
|
+
|
110
|
+
default_config.rpcs.list_events.timeout = 60.0
|
111
|
+
default_config.rpcs.list_events.retry_policy = {
|
112
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
113
|
+
}
|
114
|
+
|
115
|
+
default_config.rpcs.get_event.timeout = 60.0
|
116
|
+
default_config.rpcs.get_event.retry_policy = {
|
117
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
118
|
+
}
|
119
|
+
|
120
|
+
default_config.rpcs.delete_event.timeout = 60.0
|
121
|
+
|
122
|
+
default_config
|
123
|
+
end
|
124
|
+
yield @configure if block_given?
|
125
|
+
@configure
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# Configure the LivestreamService Client instance.
|
130
|
+
#
|
131
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
132
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
133
|
+
# should be made on {Client.configure}.
|
134
|
+
#
|
135
|
+
# See {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client::Configuration}
|
136
|
+
# for a description of the configuration fields.
|
137
|
+
#
|
138
|
+
# @yield [config] Configure the Client client.
|
139
|
+
# @yieldparam config [Client::Configuration]
|
140
|
+
#
|
141
|
+
# @return [Client::Configuration]
|
142
|
+
#
|
143
|
+
def configure
|
144
|
+
yield @config if block_given?
|
145
|
+
@config
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# Create a new LivestreamService client object.
|
150
|
+
#
|
151
|
+
# @example
|
152
|
+
#
|
153
|
+
# # Create a client using the default configuration
|
154
|
+
# client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
155
|
+
#
|
156
|
+
# # Create a client using a custom configuration
|
157
|
+
# client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config|
|
158
|
+
# config.timeout = 10.0
|
159
|
+
# end
|
160
|
+
#
|
161
|
+
# @yield [config] Configure the LivestreamService client.
|
162
|
+
# @yieldparam config [Client::Configuration]
|
163
|
+
#
|
164
|
+
def initialize
|
165
|
+
# These require statements are intentionally placed here to initialize
|
166
|
+
# the gRPC module only when it's required.
|
167
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
168
|
+
require "gapic/grpc"
|
169
|
+
require "google/cloud/video/livestream/v1/service_services_pb"
|
170
|
+
|
171
|
+
# Create the configuration object
|
172
|
+
@config = Configuration.new Client.configure
|
173
|
+
|
174
|
+
# Yield the configuration if needed
|
175
|
+
yield @config if block_given?
|
176
|
+
|
177
|
+
# Create credentials
|
178
|
+
credentials = @config.credentials
|
179
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
180
|
+
# but only if the default endpoint does not have a region prefix.
|
181
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
182
|
+
!@config.endpoint.split(".").first.include?("-")
|
183
|
+
credentials ||= Credentials.default scope: @config.scope,
|
184
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
185
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
186
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
187
|
+
end
|
188
|
+
@quota_project_id = @config.quota_project
|
189
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
190
|
+
|
191
|
+
@operations_client = Operations.new do |config|
|
192
|
+
config.credentials = credentials
|
193
|
+
config.quota_project = @quota_project_id
|
194
|
+
config.endpoint = @config.endpoint
|
195
|
+
end
|
196
|
+
|
197
|
+
@livestream_service_stub = ::Gapic::ServiceStub.new(
|
198
|
+
::Google::Cloud::Video::LiveStream::V1::LivestreamService::Stub,
|
199
|
+
credentials: credentials,
|
200
|
+
endpoint: @config.endpoint,
|
201
|
+
channel_args: @config.channel_args,
|
202
|
+
interceptors: @config.interceptors
|
203
|
+
)
|
204
|
+
end
|
205
|
+
|
206
|
+
##
|
207
|
+
# Get the associated client for long-running operations.
|
208
|
+
#
|
209
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::LivestreamService::Operations]
|
210
|
+
#
|
211
|
+
attr_reader :operations_client
|
212
|
+
|
213
|
+
# Service calls
|
214
|
+
|
215
|
+
##
|
216
|
+
# Creates a channel with the provided unique ID in the specified
|
217
|
+
# region.
|
218
|
+
#
|
219
|
+
# @overload create_channel(request, options = nil)
|
220
|
+
# Pass arguments to `create_channel` via a request object, either of type
|
221
|
+
# {::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest} or an equivalent Hash.
|
222
|
+
#
|
223
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest, ::Hash]
|
224
|
+
# A request object representing the call parameters. Required. To specify no
|
225
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
226
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
227
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
228
|
+
#
|
229
|
+
# @overload create_channel(parent: nil, channel: nil, channel_id: nil, request_id: nil)
|
230
|
+
# Pass arguments to `create_channel` via keyword arguments. Note that at
|
231
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
232
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
233
|
+
#
|
234
|
+
# @param parent [::String]
|
235
|
+
# Required. The parent location for the resource, in the form of:
|
236
|
+
# `projects/{project}/locations/{location}`.
|
237
|
+
# @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash]
|
238
|
+
# Required. The channel resource to be created.
|
239
|
+
# @param channel_id [::String]
|
240
|
+
# Required. The ID of the channel resource to be created.
|
241
|
+
# This value must be 1-63 characters, begin and end with `[a-z0-9]`,
|
242
|
+
# could contain dashes (-) in between.
|
243
|
+
# @param request_id [::String]
|
244
|
+
# A request ID to identify requests. Specify a unique request ID
|
245
|
+
# so that if you must retry your request, the server will know to ignore
|
246
|
+
# the request if it has already been completed. The server will guarantee
|
247
|
+
# that for at least 60 minutes since the first request.
|
248
|
+
#
|
249
|
+
# For example, consider a situation where you make an initial request and the
|
250
|
+
# request times out. If you make the request again with the same request ID,
|
251
|
+
# the server can check if original operation with the same request ID was
|
252
|
+
# received, and if so, will ignore the second request. This prevents clients
|
253
|
+
# from accidentally creating duplicate commitments.
|
254
|
+
#
|
255
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
256
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
257
|
+
#
|
258
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
259
|
+
# @yieldparam response [::Gapic::Operation]
|
260
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
261
|
+
#
|
262
|
+
# @return [::Gapic::Operation]
|
263
|
+
#
|
264
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
265
|
+
#
|
266
|
+
# @example Basic example
|
267
|
+
# require "google/cloud/video/live_stream/v1"
|
268
|
+
#
|
269
|
+
# # Create a client object. The client can be reused for multiple calls.
|
270
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
271
|
+
#
|
272
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
273
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new
|
274
|
+
#
|
275
|
+
# # Call the create_channel method.
|
276
|
+
# result = client.create_channel request
|
277
|
+
#
|
278
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
279
|
+
# # object to check the status of an operation, cancel it, or wait
|
280
|
+
# # for results. Here is how to block until completion:
|
281
|
+
# result.wait_until_done! timeout: 60
|
282
|
+
# if result.response?
|
283
|
+
# p result.response
|
284
|
+
# else
|
285
|
+
# puts "Error!"
|
286
|
+
# end
|
287
|
+
#
|
288
|
+
def create_channel request, options = nil
|
289
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
290
|
+
|
291
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest
|
292
|
+
|
293
|
+
# Converts hash and nil to an options object
|
294
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
295
|
+
|
296
|
+
# Customize the options with defaults
|
297
|
+
metadata = @config.rpcs.create_channel.metadata.to_h
|
298
|
+
|
299
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
300
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
301
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
302
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
303
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
304
|
+
|
305
|
+
header_params = {}
|
306
|
+
if request.parent
|
307
|
+
header_params["parent"] = request.parent
|
308
|
+
end
|
309
|
+
|
310
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
|
+
|
313
|
+
options.apply_defaults timeout: @config.rpcs.create_channel.timeout,
|
314
|
+
metadata: metadata,
|
315
|
+
retry_policy: @config.rpcs.create_channel.retry_policy
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
319
|
+
retry_policy: @config.retry_policy
|
320
|
+
|
321
|
+
@livestream_service_stub.call_rpc :create_channel, request, options: options do |response, operation|
|
322
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
323
|
+
yield response, operation if block_given?
|
324
|
+
return response
|
325
|
+
end
|
326
|
+
rescue ::GRPC::BadStatus => e
|
327
|
+
raise ::Google::Cloud::Error.from_error(e)
|
328
|
+
end
|
329
|
+
|
330
|
+
##
|
331
|
+
# Returns a list of all channels in the specified region.
|
332
|
+
#
|
333
|
+
# @overload list_channels(request, options = nil)
|
334
|
+
# Pass arguments to `list_channels` via a request object, either of type
|
335
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest} or an equivalent Hash.
|
336
|
+
#
|
337
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest, ::Hash]
|
338
|
+
# A request object representing the call parameters. Required. To specify no
|
339
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
340
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
341
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
342
|
+
#
|
343
|
+
# @overload list_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
344
|
+
# Pass arguments to `list_channels` via keyword arguments. Note that at
|
345
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
346
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
347
|
+
#
|
348
|
+
# @param parent [::String]
|
349
|
+
# Required. The parent location for the resource, in the form of:
|
350
|
+
# `projects/{project}/locations/{location}`.
|
351
|
+
# @param page_size [::Integer]
|
352
|
+
# The maximum number of items to return. If unspecified, server
|
353
|
+
# will pick an appropriate default. Server may return fewer items than
|
354
|
+
# requested. A caller should only rely on response's
|
355
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse#next_page_token next_page_token} to
|
356
|
+
# determine if there are more items left to be queried.
|
357
|
+
# @param page_token [::String]
|
358
|
+
# The next_page_token value returned from a previous List request, if any.
|
359
|
+
# @param filter [::String]
|
360
|
+
# The filter to apply to list results.
|
361
|
+
# @param order_by [::String]
|
362
|
+
# Specifies the ordering of results following syntax at
|
363
|
+
# https://cloud.google.com/apis/design/design_patterns#sorting_order.
|
364
|
+
#
|
365
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
366
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>]
|
367
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
368
|
+
#
|
369
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>]
|
370
|
+
#
|
371
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
372
|
+
#
|
373
|
+
# @example Basic example
|
374
|
+
# require "google/cloud/video/live_stream/v1"
|
375
|
+
#
|
376
|
+
# # Create a client object. The client can be reused for multiple calls.
|
377
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
378
|
+
#
|
379
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
380
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.new
|
381
|
+
#
|
382
|
+
# # Call the list_channels method.
|
383
|
+
# result = client.list_channels request
|
384
|
+
#
|
385
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
386
|
+
# # iterate over all elements by calling #each, and the enumerable
|
387
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
388
|
+
# # methods are also available for managing paging directly.
|
389
|
+
# result.each do |response|
|
390
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Channel.
|
391
|
+
# p response
|
392
|
+
# end
|
393
|
+
#
|
394
|
+
def list_channels request, options = nil
|
395
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
396
|
+
|
397
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest
|
398
|
+
|
399
|
+
# Converts hash and nil to an options object
|
400
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
401
|
+
|
402
|
+
# Customize the options with defaults
|
403
|
+
metadata = @config.rpcs.list_channels.metadata.to_h
|
404
|
+
|
405
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
406
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
407
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
408
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
409
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
410
|
+
|
411
|
+
header_params = {}
|
412
|
+
if request.parent
|
413
|
+
header_params["parent"] = request.parent
|
414
|
+
end
|
415
|
+
|
416
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
417
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
418
|
+
|
419
|
+
options.apply_defaults timeout: @config.rpcs.list_channels.timeout,
|
420
|
+
metadata: metadata,
|
421
|
+
retry_policy: @config.rpcs.list_channels.retry_policy
|
422
|
+
|
423
|
+
options.apply_defaults timeout: @config.timeout,
|
424
|
+
metadata: @config.metadata,
|
425
|
+
retry_policy: @config.retry_policy
|
426
|
+
|
427
|
+
@livestream_service_stub.call_rpc :list_channels, request, options: options do |response, operation|
|
428
|
+
response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_channels, request, response, operation, options
|
429
|
+
yield response, operation if block_given?
|
430
|
+
return response
|
431
|
+
end
|
432
|
+
rescue ::GRPC::BadStatus => e
|
433
|
+
raise ::Google::Cloud::Error.from_error(e)
|
434
|
+
end
|
435
|
+
|
436
|
+
##
|
437
|
+
# Returns the specified channel.
|
438
|
+
#
|
439
|
+
# @overload get_channel(request, options = nil)
|
440
|
+
# Pass arguments to `get_channel` via a request object, either of type
|
441
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetChannelRequest} or an equivalent Hash.
|
442
|
+
#
|
443
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetChannelRequest, ::Hash]
|
444
|
+
# A request object representing the call parameters. Required. To specify no
|
445
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
446
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
447
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
448
|
+
#
|
449
|
+
# @overload get_channel(name: nil)
|
450
|
+
# Pass arguments to `get_channel` via keyword arguments. Note that at
|
451
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
452
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
453
|
+
#
|
454
|
+
# @param name [::String]
|
455
|
+
# Required. The name of the channel resource, in the form of:
|
456
|
+
# `projects/{project}/locations/{location}/channels/{channelId}`.
|
457
|
+
#
|
458
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
459
|
+
# @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Channel]
|
460
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
461
|
+
#
|
462
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Channel]
|
463
|
+
#
|
464
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
465
|
+
#
|
466
|
+
# @example Basic example
|
467
|
+
# require "google/cloud/video/live_stream/v1"
|
468
|
+
#
|
469
|
+
# # Create a client object. The client can be reused for multiple calls.
|
470
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
471
|
+
#
|
472
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
473
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new
|
474
|
+
#
|
475
|
+
# # Call the get_channel method.
|
476
|
+
# result = client.get_channel request
|
477
|
+
#
|
478
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Channel.
|
479
|
+
# p result
|
480
|
+
#
|
481
|
+
def get_channel request, options = nil
|
482
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
483
|
+
|
484
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetChannelRequest
|
485
|
+
|
486
|
+
# Converts hash and nil to an options object
|
487
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
488
|
+
|
489
|
+
# Customize the options with defaults
|
490
|
+
metadata = @config.rpcs.get_channel.metadata.to_h
|
491
|
+
|
492
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
493
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
494
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
495
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
496
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
497
|
+
|
498
|
+
header_params = {}
|
499
|
+
if request.name
|
500
|
+
header_params["name"] = request.name
|
501
|
+
end
|
502
|
+
|
503
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
504
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
505
|
+
|
506
|
+
options.apply_defaults timeout: @config.rpcs.get_channel.timeout,
|
507
|
+
metadata: metadata,
|
508
|
+
retry_policy: @config.rpcs.get_channel.retry_policy
|
509
|
+
|
510
|
+
options.apply_defaults timeout: @config.timeout,
|
511
|
+
metadata: @config.metadata,
|
512
|
+
retry_policy: @config.retry_policy
|
513
|
+
|
514
|
+
@livestream_service_stub.call_rpc :get_channel, request, options: options do |response, operation|
|
515
|
+
yield response, operation if block_given?
|
516
|
+
return response
|
517
|
+
end
|
518
|
+
rescue ::GRPC::BadStatus => e
|
519
|
+
raise ::Google::Cloud::Error.from_error(e)
|
520
|
+
end
|
521
|
+
|
522
|
+
##
|
523
|
+
# Deletes the specified channel.
|
524
|
+
#
|
525
|
+
# @overload delete_channel(request, options = nil)
|
526
|
+
# Pass arguments to `delete_channel` via a request object, either of type
|
527
|
+
# {::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest} or an equivalent Hash.
|
528
|
+
#
|
529
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest, ::Hash]
|
530
|
+
# A request object representing the call parameters. Required. To specify no
|
531
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
532
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
533
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
534
|
+
#
|
535
|
+
# @overload delete_channel(name: nil, request_id: nil, force: nil)
|
536
|
+
# Pass arguments to `delete_channel` via keyword arguments. Note that at
|
537
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
538
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
539
|
+
#
|
540
|
+
# @param name [::String]
|
541
|
+
# Required. The name of the channel resource, in the form of:
|
542
|
+
# `projects/{project}/locations/{location}/channels/{channelId}`.
|
543
|
+
# @param request_id [::String]
|
544
|
+
# A request ID to identify requests. Specify a unique request ID
|
545
|
+
# so that if you must retry your request, the server will know to ignore
|
546
|
+
# the request if it has already been completed. The server will guarantee
|
547
|
+
# that for at least 60 minutes after the first request.
|
548
|
+
#
|
549
|
+
# For example, consider a situation where you make an initial request and the
|
550
|
+
# request times out. If you make the request again with the same request ID,
|
551
|
+
# the server can check if original operation with the same request ID was
|
552
|
+
# received, and if so, will ignore the second request. This prevents clients
|
553
|
+
# from accidentally creating duplicate commitments.
|
554
|
+
#
|
555
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
556
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
557
|
+
# @param force [::Boolean]
|
558
|
+
# If the `force` field is set to the default value of `false`, you must
|
559
|
+
# delete all of a channel's events before you can delete the channel itself.
|
560
|
+
# If the field is set to `true`, requests to delete a channel also delete
|
561
|
+
# associated channel events.
|
562
|
+
#
|
563
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
564
|
+
# @yieldparam response [::Gapic::Operation]
|
565
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
566
|
+
#
|
567
|
+
# @return [::Gapic::Operation]
|
568
|
+
#
|
569
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
570
|
+
#
|
571
|
+
# @example Basic example
|
572
|
+
# require "google/cloud/video/live_stream/v1"
|
573
|
+
#
|
574
|
+
# # Create a client object. The client can be reused for multiple calls.
|
575
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
576
|
+
#
|
577
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
578
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.new
|
579
|
+
#
|
580
|
+
# # Call the delete_channel method.
|
581
|
+
# result = client.delete_channel request
|
582
|
+
#
|
583
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
584
|
+
# # object to check the status of an operation, cancel it, or wait
|
585
|
+
# # for results. Here is how to block until completion:
|
586
|
+
# result.wait_until_done! timeout: 60
|
587
|
+
# if result.response?
|
588
|
+
# p result.response
|
589
|
+
# else
|
590
|
+
# puts "Error!"
|
591
|
+
# end
|
592
|
+
#
|
593
|
+
def delete_channel request, options = nil
|
594
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
595
|
+
|
596
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest
|
597
|
+
|
598
|
+
# Converts hash and nil to an options object
|
599
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
600
|
+
|
601
|
+
# Customize the options with defaults
|
602
|
+
metadata = @config.rpcs.delete_channel.metadata.to_h
|
603
|
+
|
604
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
605
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
606
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
607
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
608
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
609
|
+
|
610
|
+
header_params = {}
|
611
|
+
if request.name
|
612
|
+
header_params["name"] = request.name
|
613
|
+
end
|
614
|
+
|
615
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
616
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
617
|
+
|
618
|
+
options.apply_defaults timeout: @config.rpcs.delete_channel.timeout,
|
619
|
+
metadata: metadata,
|
620
|
+
retry_policy: @config.rpcs.delete_channel.retry_policy
|
621
|
+
|
622
|
+
options.apply_defaults timeout: @config.timeout,
|
623
|
+
metadata: @config.metadata,
|
624
|
+
retry_policy: @config.retry_policy
|
625
|
+
|
626
|
+
@livestream_service_stub.call_rpc :delete_channel, request, options: options do |response, operation|
|
627
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
628
|
+
yield response, operation if block_given?
|
629
|
+
return response
|
630
|
+
end
|
631
|
+
rescue ::GRPC::BadStatus => e
|
632
|
+
raise ::Google::Cloud::Error.from_error(e)
|
633
|
+
end
|
634
|
+
|
635
|
+
##
|
636
|
+
# Updates the specified channel.
|
637
|
+
#
|
638
|
+
# @overload update_channel(request, options = nil)
|
639
|
+
# Pass arguments to `update_channel` via a request object, either of type
|
640
|
+
# {::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest} or an equivalent Hash.
|
641
|
+
#
|
642
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest, ::Hash]
|
643
|
+
# A request object representing the call parameters. Required. To specify no
|
644
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
645
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
646
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
647
|
+
#
|
648
|
+
# @overload update_channel(update_mask: nil, channel: nil, request_id: nil)
|
649
|
+
# Pass arguments to `update_channel` via keyword arguments. Note that at
|
650
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
651
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
652
|
+
#
|
653
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
654
|
+
# Field mask is used to specify the fields to be overwritten in the Channel
|
655
|
+
# resource by the update. You can only update the following fields:
|
656
|
+
#
|
657
|
+
# * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
|
658
|
+
# * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
|
659
|
+
# * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#ElementaryStream)
|
660
|
+
# * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
|
661
|
+
# * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#Manifest)
|
662
|
+
# * [`spritesheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
|
663
|
+
#
|
664
|
+
# The fields specified in the update_mask are relative to the resource, not
|
665
|
+
# the full request. A field will be overwritten if it is in the mask.
|
666
|
+
# @param channel [::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash]
|
667
|
+
# Required. The channel resource to be updated.
|
668
|
+
# @param request_id [::String]
|
669
|
+
# A request ID to identify requests. Specify a unique request ID
|
670
|
+
# so that if you must retry your request, the server will know to ignore
|
671
|
+
# the request if it has already been completed. The server will guarantee
|
672
|
+
# that for at least 60 minutes since the first request.
|
673
|
+
#
|
674
|
+
# For example, consider a situation where you make an initial request and the
|
675
|
+
# request times out. If you make the request again with the same request ID,
|
676
|
+
# the server can check if original operation with the same request ID was
|
677
|
+
# received, and if so, will ignore the second request. This prevents clients
|
678
|
+
# from accidentally creating duplicate commitments.
|
679
|
+
#
|
680
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
681
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
682
|
+
#
|
683
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
684
|
+
# @yieldparam response [::Gapic::Operation]
|
685
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
686
|
+
#
|
687
|
+
# @return [::Gapic::Operation]
|
688
|
+
#
|
689
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
690
|
+
#
|
691
|
+
# @example Basic example
|
692
|
+
# require "google/cloud/video/live_stream/v1"
|
693
|
+
#
|
694
|
+
# # Create a client object. The client can be reused for multiple calls.
|
695
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
696
|
+
#
|
697
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
698
|
+
# request = Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new
|
699
|
+
#
|
700
|
+
# # Call the update_channel method.
|
701
|
+
# result = client.update_channel request
|
702
|
+
#
|
703
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
704
|
+
# # object to check the status of an operation, cancel it, or wait
|
705
|
+
# # for results. Here is how to block until completion:
|
706
|
+
# result.wait_until_done! timeout: 60
|
707
|
+
# if result.response?
|
708
|
+
# p result.response
|
709
|
+
# else
|
710
|
+
# puts "Error!"
|
711
|
+
# end
|
712
|
+
#
|
713
|
+
def update_channel request, options = nil
|
714
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
715
|
+
|
716
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest
|
717
|
+
|
718
|
+
# Converts hash and nil to an options object
|
719
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
720
|
+
|
721
|
+
# Customize the options with defaults
|
722
|
+
metadata = @config.rpcs.update_channel.metadata.to_h
|
723
|
+
|
724
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
725
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
726
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
727
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
728
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
729
|
+
|
730
|
+
header_params = {}
|
731
|
+
if request.channel&.name
|
732
|
+
header_params["channel.name"] = request.channel.name
|
733
|
+
end
|
734
|
+
|
735
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
736
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
737
|
+
|
738
|
+
options.apply_defaults timeout: @config.rpcs.update_channel.timeout,
|
739
|
+
metadata: metadata,
|
740
|
+
retry_policy: @config.rpcs.update_channel.retry_policy
|
741
|
+
|
742
|
+
options.apply_defaults timeout: @config.timeout,
|
743
|
+
metadata: @config.metadata,
|
744
|
+
retry_policy: @config.retry_policy
|
745
|
+
|
746
|
+
@livestream_service_stub.call_rpc :update_channel, request, options: options do |response, operation|
|
747
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
748
|
+
yield response, operation if block_given?
|
749
|
+
return response
|
750
|
+
end
|
751
|
+
rescue ::GRPC::BadStatus => e
|
752
|
+
raise ::Google::Cloud::Error.from_error(e)
|
753
|
+
end
|
754
|
+
|
755
|
+
##
|
756
|
+
# Starts the specified channel. Part of the video pipeline will be created
|
757
|
+
# only when the StartChannel request is received by the server.
|
758
|
+
#
|
759
|
+
# @overload start_channel(request, options = nil)
|
760
|
+
# Pass arguments to `start_channel` via a request object, either of type
|
761
|
+
# {::Google::Cloud::Video::LiveStream::V1::StartChannelRequest} or an equivalent Hash.
|
762
|
+
#
|
763
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Hash]
|
764
|
+
# A request object representing the call parameters. Required. To specify no
|
765
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
766
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
767
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
768
|
+
#
|
769
|
+
# @overload start_channel(name: nil, request_id: nil)
|
770
|
+
# Pass arguments to `start_channel` via keyword arguments. Note that at
|
771
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
772
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
773
|
+
#
|
774
|
+
# @param name [::String]
|
775
|
+
# Required. The name of the channel resource, in the form of:
|
776
|
+
# `projects/{project}/locations/{location}/channels/{channelId}`.
|
777
|
+
# @param request_id [::String]
|
778
|
+
# A request ID to identify requests. Specify a unique request ID
|
779
|
+
# so that if you must retry your request, the server will know to ignore
|
780
|
+
# the request if it has already been completed. The server will guarantee
|
781
|
+
# that for at least 60 minutes since the first request.
|
782
|
+
#
|
783
|
+
# For example, consider a situation where you make an initial request and the
|
784
|
+
# request times out. If you make the request again with the same request ID,
|
785
|
+
# the server can check if original operation with the same request ID was
|
786
|
+
# received, and if so, will ignore the second request. This prevents clients
|
787
|
+
# from accidentally creating duplicate commitments.
|
788
|
+
#
|
789
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
790
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
791
|
+
#
|
792
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
793
|
+
# @yieldparam response [::Gapic::Operation]
|
794
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
795
|
+
#
|
796
|
+
# @return [::Gapic::Operation]
|
797
|
+
#
|
798
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
799
|
+
#
|
800
|
+
# @example Basic example
|
801
|
+
# require "google/cloud/video/live_stream/v1"
|
802
|
+
#
|
803
|
+
# # Create a client object. The client can be reused for multiple calls.
|
804
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
805
|
+
#
|
806
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
807
|
+
# request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new
|
808
|
+
#
|
809
|
+
# # Call the start_channel method.
|
810
|
+
# result = client.start_channel request
|
811
|
+
#
|
812
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
813
|
+
# # object to check the status of an operation, cancel it, or wait
|
814
|
+
# # for results. Here is how to block until completion:
|
815
|
+
# result.wait_until_done! timeout: 60
|
816
|
+
# if result.response?
|
817
|
+
# p result.response
|
818
|
+
# else
|
819
|
+
# puts "Error!"
|
820
|
+
# end
|
821
|
+
#
|
822
|
+
def start_channel request, options = nil
|
823
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
824
|
+
|
825
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest
|
826
|
+
|
827
|
+
# Converts hash and nil to an options object
|
828
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
829
|
+
|
830
|
+
# Customize the options with defaults
|
831
|
+
metadata = @config.rpcs.start_channel.metadata.to_h
|
832
|
+
|
833
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
834
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
835
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
836
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
837
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
838
|
+
|
839
|
+
header_params = {}
|
840
|
+
if request.name
|
841
|
+
header_params["name"] = request.name
|
842
|
+
end
|
843
|
+
|
844
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
845
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
846
|
+
|
847
|
+
options.apply_defaults timeout: @config.rpcs.start_channel.timeout,
|
848
|
+
metadata: metadata,
|
849
|
+
retry_policy: @config.rpcs.start_channel.retry_policy
|
850
|
+
|
851
|
+
options.apply_defaults timeout: @config.timeout,
|
852
|
+
metadata: @config.metadata,
|
853
|
+
retry_policy: @config.retry_policy
|
854
|
+
|
855
|
+
@livestream_service_stub.call_rpc :start_channel, request, options: options do |response, operation|
|
856
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
857
|
+
yield response, operation if block_given?
|
858
|
+
return response
|
859
|
+
end
|
860
|
+
rescue ::GRPC::BadStatus => e
|
861
|
+
raise ::Google::Cloud::Error.from_error(e)
|
862
|
+
end
|
863
|
+
|
864
|
+
##
|
865
|
+
# Stops the specified channel. Part of the video pipeline will be released
|
866
|
+
# when the StopChannel request is received by the server.
|
867
|
+
#
|
868
|
+
# @overload stop_channel(request, options = nil)
|
869
|
+
# Pass arguments to `stop_channel` via a request object, either of type
|
870
|
+
# {::Google::Cloud::Video::LiveStream::V1::StopChannelRequest} or an equivalent Hash.
|
871
|
+
#
|
872
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Hash]
|
873
|
+
# A request object representing the call parameters. Required. To specify no
|
874
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
875
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
876
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
877
|
+
#
|
878
|
+
# @overload stop_channel(name: nil, request_id: nil)
|
879
|
+
# Pass arguments to `stop_channel` via keyword arguments. Note that at
|
880
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
881
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
882
|
+
#
|
883
|
+
# @param name [::String]
|
884
|
+
# Required. The name of the channel resource, in the form of:
|
885
|
+
# `projects/{project}/locations/{location}/channels/{channelId}`.
|
886
|
+
# @param request_id [::String]
|
887
|
+
# A request ID to identify requests. Specify a unique request ID
|
888
|
+
# so that if you must retry your request, the server will know to ignore
|
889
|
+
# the request if it has already been completed. The server will guarantee
|
890
|
+
# that for at least 60 minutes since the first request.
|
891
|
+
#
|
892
|
+
# For example, consider a situation where you make an initial request and the
|
893
|
+
# request times out. If you make the request again with the same request ID,
|
894
|
+
# the server can check if original operation with the same request ID was
|
895
|
+
# received, and if so, will ignore the second request. This prevents clients
|
896
|
+
# from accidentally creating duplicate commitments.
|
897
|
+
#
|
898
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
899
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
900
|
+
#
|
901
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
902
|
+
# @yieldparam response [::Gapic::Operation]
|
903
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
904
|
+
#
|
905
|
+
# @return [::Gapic::Operation]
|
906
|
+
#
|
907
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
908
|
+
#
|
909
|
+
# @example Basic example
|
910
|
+
# require "google/cloud/video/live_stream/v1"
|
911
|
+
#
|
912
|
+
# # Create a client object. The client can be reused for multiple calls.
|
913
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
914
|
+
#
|
915
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
916
|
+
# request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new
|
917
|
+
#
|
918
|
+
# # Call the stop_channel method.
|
919
|
+
# result = client.stop_channel request
|
920
|
+
#
|
921
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
922
|
+
# # object to check the status of an operation, cancel it, or wait
|
923
|
+
# # for results. Here is how to block until completion:
|
924
|
+
# result.wait_until_done! timeout: 60
|
925
|
+
# if result.response?
|
926
|
+
# p result.response
|
927
|
+
# else
|
928
|
+
# puts "Error!"
|
929
|
+
# end
|
930
|
+
#
|
931
|
+
def stop_channel request, options = nil
|
932
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
933
|
+
|
934
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest
|
935
|
+
|
936
|
+
# Converts hash and nil to an options object
|
937
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
938
|
+
|
939
|
+
# Customize the options with defaults
|
940
|
+
metadata = @config.rpcs.stop_channel.metadata.to_h
|
941
|
+
|
942
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
943
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
944
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
945
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
946
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
947
|
+
|
948
|
+
header_params = {}
|
949
|
+
if request.name
|
950
|
+
header_params["name"] = request.name
|
951
|
+
end
|
952
|
+
|
953
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
954
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
955
|
+
|
956
|
+
options.apply_defaults timeout: @config.rpcs.stop_channel.timeout,
|
957
|
+
metadata: metadata,
|
958
|
+
retry_policy: @config.rpcs.stop_channel.retry_policy
|
959
|
+
|
960
|
+
options.apply_defaults timeout: @config.timeout,
|
961
|
+
metadata: @config.metadata,
|
962
|
+
retry_policy: @config.retry_policy
|
963
|
+
|
964
|
+
@livestream_service_stub.call_rpc :stop_channel, request, options: options do |response, operation|
|
965
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
966
|
+
yield response, operation if block_given?
|
967
|
+
return response
|
968
|
+
end
|
969
|
+
rescue ::GRPC::BadStatus => e
|
970
|
+
raise ::Google::Cloud::Error.from_error(e)
|
971
|
+
end
|
972
|
+
|
973
|
+
##
|
974
|
+
# Creates an input with the provided unique ID in the specified region.
|
975
|
+
#
|
976
|
+
# @overload create_input(request, options = nil)
|
977
|
+
# Pass arguments to `create_input` via a request object, either of type
|
978
|
+
# {::Google::Cloud::Video::LiveStream::V1::CreateInputRequest} or an equivalent Hash.
|
979
|
+
#
|
980
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Hash]
|
981
|
+
# A request object representing the call parameters. Required. To specify no
|
982
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
983
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
984
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
985
|
+
#
|
986
|
+
# @overload create_input(parent: nil, input: nil, input_id: nil, request_id: nil)
|
987
|
+
# Pass arguments to `create_input` via keyword arguments. Note that at
|
988
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
989
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
990
|
+
#
|
991
|
+
# @param parent [::String]
|
992
|
+
# Required. The parent location for the resource, in the form of:
|
993
|
+
# `projects/{project}/locations/{location}`.
|
994
|
+
# @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash]
|
995
|
+
# Required. The input resource to be created.
|
996
|
+
# @param input_id [::String]
|
997
|
+
# Required. The ID of the input resource to be created.
|
998
|
+
# This value must be 1-63 characters, begin and end with `[a-z0-9]`,
|
999
|
+
# could contain dashes (-) in between.
|
1000
|
+
# @param request_id [::String]
|
1001
|
+
# A request ID to identify requests. Specify a unique request ID
|
1002
|
+
# so that if you must retry your request, the server will know to ignore
|
1003
|
+
# the request if it has already been completed. The server will guarantee
|
1004
|
+
# that for at least 60 minutes since the first request.
|
1005
|
+
#
|
1006
|
+
# For example, consider a situation where you make an initial request and the
|
1007
|
+
# request times out. If you make the request again with the same request ID,
|
1008
|
+
# the server can check if original operation with the same request ID was
|
1009
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1010
|
+
# from accidentally creating duplicate commitments.
|
1011
|
+
#
|
1012
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1013
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1014
|
+
#
|
1015
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1016
|
+
# @yieldparam response [::Gapic::Operation]
|
1017
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1018
|
+
#
|
1019
|
+
# @return [::Gapic::Operation]
|
1020
|
+
#
|
1021
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1022
|
+
#
|
1023
|
+
# @example Basic example
|
1024
|
+
# require "google/cloud/video/live_stream/v1"
|
1025
|
+
#
|
1026
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1027
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1028
|
+
#
|
1029
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1030
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new
|
1031
|
+
#
|
1032
|
+
# # Call the create_input method.
|
1033
|
+
# result = client.create_input request
|
1034
|
+
#
|
1035
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1036
|
+
# # object to check the status of an operation, cancel it, or wait
|
1037
|
+
# # for results. Here is how to block until completion:
|
1038
|
+
# result.wait_until_done! timeout: 60
|
1039
|
+
# if result.response?
|
1040
|
+
# p result.response
|
1041
|
+
# else
|
1042
|
+
# puts "Error!"
|
1043
|
+
# end
|
1044
|
+
#
|
1045
|
+
def create_input request, options = nil
|
1046
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1047
|
+
|
1048
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest
|
1049
|
+
|
1050
|
+
# Converts hash and nil to an options object
|
1051
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1052
|
+
|
1053
|
+
# Customize the options with defaults
|
1054
|
+
metadata = @config.rpcs.create_input.metadata.to_h
|
1055
|
+
|
1056
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1057
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1058
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1059
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1060
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1061
|
+
|
1062
|
+
header_params = {}
|
1063
|
+
if request.parent
|
1064
|
+
header_params["parent"] = request.parent
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1068
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1069
|
+
|
1070
|
+
options.apply_defaults timeout: @config.rpcs.create_input.timeout,
|
1071
|
+
metadata: metadata,
|
1072
|
+
retry_policy: @config.rpcs.create_input.retry_policy
|
1073
|
+
|
1074
|
+
options.apply_defaults timeout: @config.timeout,
|
1075
|
+
metadata: @config.metadata,
|
1076
|
+
retry_policy: @config.retry_policy
|
1077
|
+
|
1078
|
+
@livestream_service_stub.call_rpc :create_input, request, options: options do |response, operation|
|
1079
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1080
|
+
yield response, operation if block_given?
|
1081
|
+
return response
|
1082
|
+
end
|
1083
|
+
rescue ::GRPC::BadStatus => e
|
1084
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
##
|
1088
|
+
# Returns a list of all inputs in the specified region.
|
1089
|
+
#
|
1090
|
+
# @overload list_inputs(request, options = nil)
|
1091
|
+
# Pass arguments to `list_inputs` via a request object, either of type
|
1092
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListInputsRequest} or an equivalent Hash.
|
1093
|
+
#
|
1094
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Hash]
|
1095
|
+
# A request object representing the call parameters. Required. To specify no
|
1096
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1097
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1098
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1099
|
+
#
|
1100
|
+
# @overload list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1101
|
+
# Pass arguments to `list_inputs` via keyword arguments. Note that at
|
1102
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1103
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1104
|
+
#
|
1105
|
+
# @param parent [::String]
|
1106
|
+
# Required. The parent location for the resource, in the form of:
|
1107
|
+
# `projects/{project}/locations/{location}`.
|
1108
|
+
# @param page_size [::Integer]
|
1109
|
+
# The maximum number of items to return. If unspecified, server
|
1110
|
+
# will pick an appropriate default. Server may return fewer items than
|
1111
|
+
# requested. A caller should only rely on response's
|
1112
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListInputsResponse#next_page_token next_page_token} to
|
1113
|
+
# determine if there are more items left to be queried.
|
1114
|
+
# @param page_token [::String]
|
1115
|
+
# The next_page_token value returned from a previous List request, if any.
|
1116
|
+
# @param filter [::String]
|
1117
|
+
# The filter to apply to list results.
|
1118
|
+
# @param order_by [::String]
|
1119
|
+
# Specifies the ordering of results following syntax at [Sorting
|
1120
|
+
# Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
|
1121
|
+
#
|
1122
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1123
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>]
|
1124
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1125
|
+
#
|
1126
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>]
|
1127
|
+
#
|
1128
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1129
|
+
#
|
1130
|
+
# @example Basic example
|
1131
|
+
# require "google/cloud/video/live_stream/v1"
|
1132
|
+
#
|
1133
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1134
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1135
|
+
#
|
1136
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1137
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new
|
1138
|
+
#
|
1139
|
+
# # Call the list_inputs method.
|
1140
|
+
# result = client.list_inputs request
|
1141
|
+
#
|
1142
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1143
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1144
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1145
|
+
# # methods are also available for managing paging directly.
|
1146
|
+
# result.each do |response|
|
1147
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input.
|
1148
|
+
# p response
|
1149
|
+
# end
|
1150
|
+
#
|
1151
|
+
def list_inputs request, options = nil
|
1152
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1153
|
+
|
1154
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest
|
1155
|
+
|
1156
|
+
# Converts hash and nil to an options object
|
1157
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1158
|
+
|
1159
|
+
# Customize the options with defaults
|
1160
|
+
metadata = @config.rpcs.list_inputs.metadata.to_h
|
1161
|
+
|
1162
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1163
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1164
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1165
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1166
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1167
|
+
|
1168
|
+
header_params = {}
|
1169
|
+
if request.parent
|
1170
|
+
header_params["parent"] = request.parent
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1174
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1175
|
+
|
1176
|
+
options.apply_defaults timeout: @config.rpcs.list_inputs.timeout,
|
1177
|
+
metadata: metadata,
|
1178
|
+
retry_policy: @config.rpcs.list_inputs.retry_policy
|
1179
|
+
|
1180
|
+
options.apply_defaults timeout: @config.timeout,
|
1181
|
+
metadata: @config.metadata,
|
1182
|
+
retry_policy: @config.retry_policy
|
1183
|
+
|
1184
|
+
@livestream_service_stub.call_rpc :list_inputs, request, options: options do |response, operation|
|
1185
|
+
response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_inputs, request, response, operation, options
|
1186
|
+
yield response, operation if block_given?
|
1187
|
+
return response
|
1188
|
+
end
|
1189
|
+
rescue ::GRPC::BadStatus => e
|
1190
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
##
|
1194
|
+
# Returns the specified input.
|
1195
|
+
#
|
1196
|
+
# @overload get_input(request, options = nil)
|
1197
|
+
# Pass arguments to `get_input` via a request object, either of type
|
1198
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetInputRequest} or an equivalent Hash.
|
1199
|
+
#
|
1200
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Hash]
|
1201
|
+
# A request object representing the call parameters. Required. To specify no
|
1202
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1203
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1204
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1205
|
+
#
|
1206
|
+
# @overload get_input(name: nil)
|
1207
|
+
# Pass arguments to `get_input` via keyword arguments. Note that at
|
1208
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1209
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1210
|
+
#
|
1211
|
+
# @param name [::String]
|
1212
|
+
# Required. The name of the input resource, in the form of:
|
1213
|
+
# `projects/{project}/locations/{location}/inputs/{inputId}`.
|
1214
|
+
#
|
1215
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1216
|
+
# @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Input]
|
1217
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1218
|
+
#
|
1219
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Input]
|
1220
|
+
#
|
1221
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1222
|
+
#
|
1223
|
+
# @example Basic example
|
1224
|
+
# require "google/cloud/video/live_stream/v1"
|
1225
|
+
#
|
1226
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1227
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1228
|
+
#
|
1229
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1230
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new
|
1231
|
+
#
|
1232
|
+
# # Call the get_input method.
|
1233
|
+
# result = client.get_input request
|
1234
|
+
#
|
1235
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Input.
|
1236
|
+
# p result
|
1237
|
+
#
|
1238
|
+
def get_input request, options = nil
|
1239
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1240
|
+
|
1241
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetInputRequest
|
1242
|
+
|
1243
|
+
# Converts hash and nil to an options object
|
1244
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1245
|
+
|
1246
|
+
# Customize the options with defaults
|
1247
|
+
metadata = @config.rpcs.get_input.metadata.to_h
|
1248
|
+
|
1249
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1250
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1251
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1252
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1253
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1254
|
+
|
1255
|
+
header_params = {}
|
1256
|
+
if request.name
|
1257
|
+
header_params["name"] = request.name
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1261
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1262
|
+
|
1263
|
+
options.apply_defaults timeout: @config.rpcs.get_input.timeout,
|
1264
|
+
metadata: metadata,
|
1265
|
+
retry_policy: @config.rpcs.get_input.retry_policy
|
1266
|
+
|
1267
|
+
options.apply_defaults timeout: @config.timeout,
|
1268
|
+
metadata: @config.metadata,
|
1269
|
+
retry_policy: @config.retry_policy
|
1270
|
+
|
1271
|
+
@livestream_service_stub.call_rpc :get_input, request, options: options do |response, operation|
|
1272
|
+
yield response, operation if block_given?
|
1273
|
+
return response
|
1274
|
+
end
|
1275
|
+
rescue ::GRPC::BadStatus => e
|
1276
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1277
|
+
end
|
1278
|
+
|
1279
|
+
##
|
1280
|
+
# Deletes the specified input.
|
1281
|
+
#
|
1282
|
+
# @overload delete_input(request, options = nil)
|
1283
|
+
# Pass arguments to `delete_input` via a request object, either of type
|
1284
|
+
# {::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest} or an equivalent Hash.
|
1285
|
+
#
|
1286
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Hash]
|
1287
|
+
# A request object representing the call parameters. Required. To specify no
|
1288
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1289
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1290
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1291
|
+
#
|
1292
|
+
# @overload delete_input(name: nil, request_id: nil)
|
1293
|
+
# Pass arguments to `delete_input` via keyword arguments. Note that at
|
1294
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1295
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1296
|
+
#
|
1297
|
+
# @param name [::String]
|
1298
|
+
# Required. The name of the input resource, in the form of:
|
1299
|
+
# `projects/{project}/locations/{location}/inputs/{inputId}`.
|
1300
|
+
# @param request_id [::String]
|
1301
|
+
# A request ID to identify requests. Specify a unique request ID
|
1302
|
+
# so that if you must retry your request, the server will know to ignore
|
1303
|
+
# the request if it has already been completed. The server will guarantee
|
1304
|
+
# that for at least 60 minutes since the first request.
|
1305
|
+
#
|
1306
|
+
# For example, consider a situation where you make an initial request and the
|
1307
|
+
# request times out. If you make the request again with the same request ID,
|
1308
|
+
# the server can check if original operation with the same request ID was
|
1309
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1310
|
+
# from accidentally creating duplicate commitments.
|
1311
|
+
#
|
1312
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1313
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1314
|
+
#
|
1315
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1316
|
+
# @yieldparam response [::Gapic::Operation]
|
1317
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1318
|
+
#
|
1319
|
+
# @return [::Gapic::Operation]
|
1320
|
+
#
|
1321
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1322
|
+
#
|
1323
|
+
# @example Basic example
|
1324
|
+
# require "google/cloud/video/live_stream/v1"
|
1325
|
+
#
|
1326
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1327
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1328
|
+
#
|
1329
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1330
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new
|
1331
|
+
#
|
1332
|
+
# # Call the delete_input method.
|
1333
|
+
# result = client.delete_input request
|
1334
|
+
#
|
1335
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1336
|
+
# # object to check the status of an operation, cancel it, or wait
|
1337
|
+
# # for results. Here is how to block until completion:
|
1338
|
+
# result.wait_until_done! timeout: 60
|
1339
|
+
# if result.response?
|
1340
|
+
# p result.response
|
1341
|
+
# else
|
1342
|
+
# puts "Error!"
|
1343
|
+
# end
|
1344
|
+
#
|
1345
|
+
def delete_input request, options = nil
|
1346
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1347
|
+
|
1348
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest
|
1349
|
+
|
1350
|
+
# Converts hash and nil to an options object
|
1351
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1352
|
+
|
1353
|
+
# Customize the options with defaults
|
1354
|
+
metadata = @config.rpcs.delete_input.metadata.to_h
|
1355
|
+
|
1356
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1357
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1358
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1359
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1360
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1361
|
+
|
1362
|
+
header_params = {}
|
1363
|
+
if request.name
|
1364
|
+
header_params["name"] = request.name
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1368
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1369
|
+
|
1370
|
+
options.apply_defaults timeout: @config.rpcs.delete_input.timeout,
|
1371
|
+
metadata: metadata,
|
1372
|
+
retry_policy: @config.rpcs.delete_input.retry_policy
|
1373
|
+
|
1374
|
+
options.apply_defaults timeout: @config.timeout,
|
1375
|
+
metadata: @config.metadata,
|
1376
|
+
retry_policy: @config.retry_policy
|
1377
|
+
|
1378
|
+
@livestream_service_stub.call_rpc :delete_input, request, options: options do |response, operation|
|
1379
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1380
|
+
yield response, operation if block_given?
|
1381
|
+
return response
|
1382
|
+
end
|
1383
|
+
rescue ::GRPC::BadStatus => e
|
1384
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1385
|
+
end
|
1386
|
+
|
1387
|
+
##
|
1388
|
+
# Updates the specified input.
|
1389
|
+
#
|
1390
|
+
# @overload update_input(request, options = nil)
|
1391
|
+
# Pass arguments to `update_input` via a request object, either of type
|
1392
|
+
# {::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest} or an equivalent Hash.
|
1393
|
+
#
|
1394
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Hash]
|
1395
|
+
# A request object representing the call parameters. Required. To specify no
|
1396
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1397
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1398
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1399
|
+
#
|
1400
|
+
# @overload update_input(update_mask: nil, input: nil, request_id: nil)
|
1401
|
+
# Pass arguments to `update_input` via keyword arguments. Note that at
|
1402
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1403
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1404
|
+
#
|
1405
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1406
|
+
# Field mask is used to specify the fields to be overwritten in the Input
|
1407
|
+
# resource by the update. You can only update the following fields:
|
1408
|
+
#
|
1409
|
+
# * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
|
1410
|
+
# * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
|
1411
|
+
#
|
1412
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1413
|
+
# the full request. A field will be overwritten if it is in the mask.
|
1414
|
+
# @param input [::Google::Cloud::Video::LiveStream::V1::Input, ::Hash]
|
1415
|
+
# Required. The input resource to be updated.
|
1416
|
+
# @param request_id [::String]
|
1417
|
+
# A request ID to identify requests. Specify a unique request ID
|
1418
|
+
# so that if you must retry your request, the server will know to ignore
|
1419
|
+
# the request if it has already been completed. The server will guarantee
|
1420
|
+
# that for at least 60 minutes since the first request.
|
1421
|
+
#
|
1422
|
+
# For example, consider a situation where you make an initial request and the
|
1423
|
+
# request times out. If you make the request again with the same request ID,
|
1424
|
+
# the server can check if original operation with the same request ID was
|
1425
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1426
|
+
# from accidentally creating duplicate commitments.
|
1427
|
+
#
|
1428
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1429
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1430
|
+
#
|
1431
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1432
|
+
# @yieldparam response [::Gapic::Operation]
|
1433
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1434
|
+
#
|
1435
|
+
# @return [::Gapic::Operation]
|
1436
|
+
#
|
1437
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1438
|
+
#
|
1439
|
+
# @example Basic example
|
1440
|
+
# require "google/cloud/video/live_stream/v1"
|
1441
|
+
#
|
1442
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1443
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1444
|
+
#
|
1445
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1446
|
+
# request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new
|
1447
|
+
#
|
1448
|
+
# # Call the update_input method.
|
1449
|
+
# result = client.update_input request
|
1450
|
+
#
|
1451
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1452
|
+
# # object to check the status of an operation, cancel it, or wait
|
1453
|
+
# # for results. Here is how to block until completion:
|
1454
|
+
# result.wait_until_done! timeout: 60
|
1455
|
+
# if result.response?
|
1456
|
+
# p result.response
|
1457
|
+
# else
|
1458
|
+
# puts "Error!"
|
1459
|
+
# end
|
1460
|
+
#
|
1461
|
+
def update_input request, options = nil
|
1462
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1463
|
+
|
1464
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest
|
1465
|
+
|
1466
|
+
# Converts hash and nil to an options object
|
1467
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1468
|
+
|
1469
|
+
# Customize the options with defaults
|
1470
|
+
metadata = @config.rpcs.update_input.metadata.to_h
|
1471
|
+
|
1472
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1473
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1474
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1475
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1476
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1477
|
+
|
1478
|
+
header_params = {}
|
1479
|
+
if request.input&.name
|
1480
|
+
header_params["input.name"] = request.input.name
|
1481
|
+
end
|
1482
|
+
|
1483
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1484
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1485
|
+
|
1486
|
+
options.apply_defaults timeout: @config.rpcs.update_input.timeout,
|
1487
|
+
metadata: metadata,
|
1488
|
+
retry_policy: @config.rpcs.update_input.retry_policy
|
1489
|
+
|
1490
|
+
options.apply_defaults timeout: @config.timeout,
|
1491
|
+
metadata: @config.metadata,
|
1492
|
+
retry_policy: @config.retry_policy
|
1493
|
+
|
1494
|
+
@livestream_service_stub.call_rpc :update_input, request, options: options do |response, operation|
|
1495
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1496
|
+
yield response, operation if block_given?
|
1497
|
+
return response
|
1498
|
+
end
|
1499
|
+
rescue ::GRPC::BadStatus => e
|
1500
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1501
|
+
end
|
1502
|
+
|
1503
|
+
##
|
1504
|
+
# Creates an event with the provided unique ID in the specified channel.
|
1505
|
+
#
|
1506
|
+
# @overload create_event(request, options = nil)
|
1507
|
+
# Pass arguments to `create_event` via a request object, either of type
|
1508
|
+
# {::Google::Cloud::Video::LiveStream::V1::CreateEventRequest} or an equivalent Hash.
|
1509
|
+
#
|
1510
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Hash]
|
1511
|
+
# A request object representing the call parameters. Required. To specify no
|
1512
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1513
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1514
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1515
|
+
#
|
1516
|
+
# @overload create_event(parent: nil, event: nil, event_id: nil, request_id: nil)
|
1517
|
+
# Pass arguments to `create_event` via keyword arguments. Note that at
|
1518
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1519
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1520
|
+
#
|
1521
|
+
# @param parent [::String]
|
1522
|
+
# Required. The parent channel for the resource, in the form of:
|
1523
|
+
# `projects/{project}/locations/{location}/channels/{channelId}`.
|
1524
|
+
# @param event [::Google::Cloud::Video::LiveStream::V1::Event, ::Hash]
|
1525
|
+
# Required. The event resource to be created.
|
1526
|
+
# @param event_id [::String]
|
1527
|
+
# Required. The ID of the event resource to be created.
|
1528
|
+
# This value must be 1-63 characters, begin and end with `[a-z0-9]`,
|
1529
|
+
# could contain dashes (-) in between.
|
1530
|
+
# @param request_id [::String]
|
1531
|
+
# A request ID to identify requests. Specify a unique request ID
|
1532
|
+
# so that if you must retry your request, the server will know to ignore
|
1533
|
+
# the request if it has already been completed. The server will guarantee
|
1534
|
+
# that for at least 60 minutes since the first request.
|
1535
|
+
#
|
1536
|
+
# For example, consider a situation where you make an initial request and the
|
1537
|
+
# request times out. If you make the request again with the same request ID,
|
1538
|
+
# the server can check if original operation with the same request ID was
|
1539
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1540
|
+
# from accidentally creating duplicate commitments.
|
1541
|
+
#
|
1542
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1543
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1544
|
+
#
|
1545
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1546
|
+
# @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Event]
|
1547
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1548
|
+
#
|
1549
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Event]
|
1550
|
+
#
|
1551
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1552
|
+
#
|
1553
|
+
# @example Basic example
|
1554
|
+
# require "google/cloud/video/live_stream/v1"
|
1555
|
+
#
|
1556
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1557
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1558
|
+
#
|
1559
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1560
|
+
# request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new
|
1561
|
+
#
|
1562
|
+
# # Call the create_event method.
|
1563
|
+
# result = client.create_event request
|
1564
|
+
#
|
1565
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event.
|
1566
|
+
# p result
|
1567
|
+
#
|
1568
|
+
def create_event request, options = nil
|
1569
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1570
|
+
|
1571
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest
|
1572
|
+
|
1573
|
+
# Converts hash and nil to an options object
|
1574
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1575
|
+
|
1576
|
+
# Customize the options with defaults
|
1577
|
+
metadata = @config.rpcs.create_event.metadata.to_h
|
1578
|
+
|
1579
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1580
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1581
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1582
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1583
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1584
|
+
|
1585
|
+
header_params = {}
|
1586
|
+
if request.parent
|
1587
|
+
header_params["parent"] = request.parent
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1591
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1592
|
+
|
1593
|
+
options.apply_defaults timeout: @config.rpcs.create_event.timeout,
|
1594
|
+
metadata: metadata,
|
1595
|
+
retry_policy: @config.rpcs.create_event.retry_policy
|
1596
|
+
|
1597
|
+
options.apply_defaults timeout: @config.timeout,
|
1598
|
+
metadata: @config.metadata,
|
1599
|
+
retry_policy: @config.retry_policy
|
1600
|
+
|
1601
|
+
@livestream_service_stub.call_rpc :create_event, request, options: options do |response, operation|
|
1602
|
+
yield response, operation if block_given?
|
1603
|
+
return response
|
1604
|
+
end
|
1605
|
+
rescue ::GRPC::BadStatus => e
|
1606
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
##
|
1610
|
+
# Returns a list of all events in the specified channel.
|
1611
|
+
#
|
1612
|
+
# @overload list_events(request, options = nil)
|
1613
|
+
# Pass arguments to `list_events` via a request object, either of type
|
1614
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListEventsRequest} or an equivalent Hash.
|
1615
|
+
#
|
1616
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Hash]
|
1617
|
+
# A request object representing the call parameters. Required. To specify no
|
1618
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1619
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1620
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1621
|
+
#
|
1622
|
+
# @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1623
|
+
# Pass arguments to `list_events` via keyword arguments. Note that at
|
1624
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1625
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1626
|
+
#
|
1627
|
+
# @param parent [::String]
|
1628
|
+
# Required. The parent channel for the resource, in the form of:
|
1629
|
+
# `projects/{project}/locations/{location}/channels/{channelId}`.
|
1630
|
+
# @param page_size [::Integer]
|
1631
|
+
# The maximum number of items to return. If unspecified, server
|
1632
|
+
# will pick an appropriate default. Server may return fewer items than
|
1633
|
+
# requested. A caller should only rely on response's
|
1634
|
+
# {::Google::Cloud::Video::LiveStream::V1::ListEventsResponse#next_page_token next_page_token} to
|
1635
|
+
# determine if there are more items left to be queried.
|
1636
|
+
# @param page_token [::String]
|
1637
|
+
# The next_page_token value returned from a previous List request, if any.
|
1638
|
+
# @param filter [::String]
|
1639
|
+
# The filter to apply to list results.
|
1640
|
+
# @param order_by [::String]
|
1641
|
+
# Specifies the ordering of results following syntax at
|
1642
|
+
# https://cloud.google.com/apis/design/design_patterns#sorting_order.
|
1643
|
+
#
|
1644
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1645
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>]
|
1646
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1647
|
+
#
|
1648
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>]
|
1649
|
+
#
|
1650
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1651
|
+
#
|
1652
|
+
# @example Basic example
|
1653
|
+
# require "google/cloud/video/live_stream/v1"
|
1654
|
+
#
|
1655
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1656
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1657
|
+
#
|
1658
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1659
|
+
# request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new
|
1660
|
+
#
|
1661
|
+
# # Call the list_events method.
|
1662
|
+
# result = client.list_events request
|
1663
|
+
#
|
1664
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1665
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1666
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1667
|
+
# # methods are also available for managing paging directly.
|
1668
|
+
# result.each do |response|
|
1669
|
+
# # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event.
|
1670
|
+
# p response
|
1671
|
+
# end
|
1672
|
+
#
|
1673
|
+
def list_events request, options = nil
|
1674
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1675
|
+
|
1676
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest
|
1677
|
+
|
1678
|
+
# Converts hash and nil to an options object
|
1679
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1680
|
+
|
1681
|
+
# Customize the options with defaults
|
1682
|
+
metadata = @config.rpcs.list_events.metadata.to_h
|
1683
|
+
|
1684
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1685
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1686
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1687
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1688
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1689
|
+
|
1690
|
+
header_params = {}
|
1691
|
+
if request.parent
|
1692
|
+
header_params["parent"] = request.parent
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1696
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1697
|
+
|
1698
|
+
options.apply_defaults timeout: @config.rpcs.list_events.timeout,
|
1699
|
+
metadata: metadata,
|
1700
|
+
retry_policy: @config.rpcs.list_events.retry_policy
|
1701
|
+
|
1702
|
+
options.apply_defaults timeout: @config.timeout,
|
1703
|
+
metadata: @config.metadata,
|
1704
|
+
retry_policy: @config.retry_policy
|
1705
|
+
|
1706
|
+
@livestream_service_stub.call_rpc :list_events, request, options: options do |response, operation|
|
1707
|
+
response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_events, request, response, operation, options
|
1708
|
+
yield response, operation if block_given?
|
1709
|
+
return response
|
1710
|
+
end
|
1711
|
+
rescue ::GRPC::BadStatus => e
|
1712
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
##
|
1716
|
+
# Returns the specified event.
|
1717
|
+
#
|
1718
|
+
# @overload get_event(request, options = nil)
|
1719
|
+
# Pass arguments to `get_event` via a request object, either of type
|
1720
|
+
# {::Google::Cloud::Video::LiveStream::V1::GetEventRequest} or an equivalent Hash.
|
1721
|
+
#
|
1722
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Hash]
|
1723
|
+
# A request object representing the call parameters. Required. To specify no
|
1724
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1725
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1726
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1727
|
+
#
|
1728
|
+
# @overload get_event(name: nil)
|
1729
|
+
# Pass arguments to `get_event` via keyword arguments. Note that at
|
1730
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1731
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1732
|
+
#
|
1733
|
+
# @param name [::String]
|
1734
|
+
# Required. The name of the event resource, in the form of:
|
1735
|
+
# `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
|
1736
|
+
#
|
1737
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1738
|
+
# @yieldparam response [::Google::Cloud::Video::LiveStream::V1::Event]
|
1739
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1740
|
+
#
|
1741
|
+
# @return [::Google::Cloud::Video::LiveStream::V1::Event]
|
1742
|
+
#
|
1743
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1744
|
+
#
|
1745
|
+
# @example Basic example
|
1746
|
+
# require "google/cloud/video/live_stream/v1"
|
1747
|
+
#
|
1748
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1749
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1750
|
+
#
|
1751
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1752
|
+
# request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new
|
1753
|
+
#
|
1754
|
+
# # Call the get_event method.
|
1755
|
+
# result = client.get_event request
|
1756
|
+
#
|
1757
|
+
# # The returned object is of type Google::Cloud::Video::LiveStream::V1::Event.
|
1758
|
+
# p result
|
1759
|
+
#
|
1760
|
+
def get_event request, options = nil
|
1761
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1762
|
+
|
1763
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetEventRequest
|
1764
|
+
|
1765
|
+
# Converts hash and nil to an options object
|
1766
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1767
|
+
|
1768
|
+
# Customize the options with defaults
|
1769
|
+
metadata = @config.rpcs.get_event.metadata.to_h
|
1770
|
+
|
1771
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1772
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1773
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1774
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1775
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1776
|
+
|
1777
|
+
header_params = {}
|
1778
|
+
if request.name
|
1779
|
+
header_params["name"] = request.name
|
1780
|
+
end
|
1781
|
+
|
1782
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1783
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1784
|
+
|
1785
|
+
options.apply_defaults timeout: @config.rpcs.get_event.timeout,
|
1786
|
+
metadata: metadata,
|
1787
|
+
retry_policy: @config.rpcs.get_event.retry_policy
|
1788
|
+
|
1789
|
+
options.apply_defaults timeout: @config.timeout,
|
1790
|
+
metadata: @config.metadata,
|
1791
|
+
retry_policy: @config.retry_policy
|
1792
|
+
|
1793
|
+
@livestream_service_stub.call_rpc :get_event, request, options: options do |response, operation|
|
1794
|
+
yield response, operation if block_given?
|
1795
|
+
return response
|
1796
|
+
end
|
1797
|
+
rescue ::GRPC::BadStatus => e
|
1798
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1799
|
+
end
|
1800
|
+
|
1801
|
+
##
|
1802
|
+
# Deletes the specified event.
|
1803
|
+
#
|
1804
|
+
# @overload delete_event(request, options = nil)
|
1805
|
+
# Pass arguments to `delete_event` via a request object, either of type
|
1806
|
+
# {::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest} or an equivalent Hash.
|
1807
|
+
#
|
1808
|
+
# @param request [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Hash]
|
1809
|
+
# A request object representing the call parameters. Required. To specify no
|
1810
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1811
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1812
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1813
|
+
#
|
1814
|
+
# @overload delete_event(name: nil, request_id: nil)
|
1815
|
+
# Pass arguments to `delete_event` via keyword arguments. Note that at
|
1816
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1817
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1818
|
+
#
|
1819
|
+
# @param name [::String]
|
1820
|
+
# Required. The name of the event resource, in the form of:
|
1821
|
+
# `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
|
1822
|
+
# @param request_id [::String]
|
1823
|
+
# A request ID to identify requests. Specify a unique request ID
|
1824
|
+
# so that if you must retry your request, the server will know to ignore
|
1825
|
+
# the request if it has already been completed. The server will guarantee
|
1826
|
+
# that for at least 60 minutes since the first request.
|
1827
|
+
#
|
1828
|
+
# For example, consider a situation where you make an initial request and the
|
1829
|
+
# request times out. If you make the request again with the same request ID,
|
1830
|
+
# the server can check if original operation with the same request ID was
|
1831
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1832
|
+
# from accidentally creating duplicate commitments.
|
1833
|
+
#
|
1834
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1835
|
+
# not supported `(00000000-0000-0000-0000-000000000000)`.
|
1836
|
+
#
|
1837
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1838
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1839
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1840
|
+
#
|
1841
|
+
# @return [::Google::Protobuf::Empty]
|
1842
|
+
#
|
1843
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1844
|
+
#
|
1845
|
+
# @example Basic example
|
1846
|
+
# require "google/cloud/video/live_stream/v1"
|
1847
|
+
#
|
1848
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1849
|
+
# client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new
|
1850
|
+
#
|
1851
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1852
|
+
# request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new
|
1853
|
+
#
|
1854
|
+
# # Call the delete_event method.
|
1855
|
+
# result = client.delete_event request
|
1856
|
+
#
|
1857
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1858
|
+
# p result
|
1859
|
+
#
|
1860
|
+
def delete_event request, options = nil
|
1861
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1862
|
+
|
1863
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest
|
1864
|
+
|
1865
|
+
# Converts hash and nil to an options object
|
1866
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1867
|
+
|
1868
|
+
# Customize the options with defaults
|
1869
|
+
metadata = @config.rpcs.delete_event.metadata.to_h
|
1870
|
+
|
1871
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1872
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1873
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1874
|
+
gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
|
1875
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1876
|
+
|
1877
|
+
header_params = {}
|
1878
|
+
if request.name
|
1879
|
+
header_params["name"] = request.name
|
1880
|
+
end
|
1881
|
+
|
1882
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1883
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1884
|
+
|
1885
|
+
options.apply_defaults timeout: @config.rpcs.delete_event.timeout,
|
1886
|
+
metadata: metadata,
|
1887
|
+
retry_policy: @config.rpcs.delete_event.retry_policy
|
1888
|
+
|
1889
|
+
options.apply_defaults timeout: @config.timeout,
|
1890
|
+
metadata: @config.metadata,
|
1891
|
+
retry_policy: @config.retry_policy
|
1892
|
+
|
1893
|
+
@livestream_service_stub.call_rpc :delete_event, request, options: options do |response, operation|
|
1894
|
+
yield response, operation if block_given?
|
1895
|
+
return response
|
1896
|
+
end
|
1897
|
+
rescue ::GRPC::BadStatus => e
|
1898
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1899
|
+
end
|
1900
|
+
|
1901
|
+
##
|
1902
|
+
# Configuration class for the LivestreamService API.
|
1903
|
+
#
|
1904
|
+
# This class represents the configuration for LivestreamService,
|
1905
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1906
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1907
|
+
# applied individually to specific RPCs. See
|
1908
|
+
# {::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client::Configuration::Rpcs}
|
1909
|
+
# for a list of RPCs that can be configured independently.
|
1910
|
+
#
|
1911
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1912
|
+
# on construction.
|
1913
|
+
#
|
1914
|
+
# @example
|
1915
|
+
#
|
1916
|
+
# # Modify the global config, setting the timeout for
|
1917
|
+
# # create_channel to 20 seconds,
|
1918
|
+
# # and all remaining timeouts to 10 seconds.
|
1919
|
+
# ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.configure do |config|
|
1920
|
+
# config.timeout = 10.0
|
1921
|
+
# config.rpcs.create_channel.timeout = 20.0
|
1922
|
+
# end
|
1923
|
+
#
|
1924
|
+
# # Apply the above configuration only to a new client.
|
1925
|
+
# client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config|
|
1926
|
+
# config.timeout = 10.0
|
1927
|
+
# config.rpcs.create_channel.timeout = 20.0
|
1928
|
+
# end
|
1929
|
+
#
|
1930
|
+
# @!attribute [rw] endpoint
|
1931
|
+
# The hostname or hostname:port of the service endpoint.
|
1932
|
+
# Defaults to `"livestream.googleapis.com"`.
|
1933
|
+
# @return [::String]
|
1934
|
+
# @!attribute [rw] credentials
|
1935
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1936
|
+
# * (`String`) The path to a service account key file in JSON format
|
1937
|
+
# * (`Hash`) A service account key as a Hash
|
1938
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1939
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1940
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1941
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1942
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1943
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1944
|
+
# * (`nil`) indicating no credentials
|
1945
|
+
# @return [::Object]
|
1946
|
+
# @!attribute [rw] scope
|
1947
|
+
# The OAuth scopes
|
1948
|
+
# @return [::Array<::String>]
|
1949
|
+
# @!attribute [rw] lib_name
|
1950
|
+
# The library name as recorded in instrumentation and logging
|
1951
|
+
# @return [::String]
|
1952
|
+
# @!attribute [rw] lib_version
|
1953
|
+
# The library version as recorded in instrumentation and logging
|
1954
|
+
# @return [::String]
|
1955
|
+
# @!attribute [rw] channel_args
|
1956
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1957
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1958
|
+
# @return [::Hash]
|
1959
|
+
# @!attribute [rw] interceptors
|
1960
|
+
# An array of interceptors that are run before calls are executed.
|
1961
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1962
|
+
# @!attribute [rw] timeout
|
1963
|
+
# The call timeout in seconds.
|
1964
|
+
# @return [::Numeric]
|
1965
|
+
# @!attribute [rw] metadata
|
1966
|
+
# Additional gRPC headers to be sent with the call.
|
1967
|
+
# @return [::Hash{::Symbol=>::String}]
|
1968
|
+
# @!attribute [rw] retry_policy
|
1969
|
+
# The retry policy. The value is a hash with the following keys:
|
1970
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1971
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1972
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1973
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1974
|
+
# trigger a retry.
|
1975
|
+
# @return [::Hash]
|
1976
|
+
# @!attribute [rw] quota_project
|
1977
|
+
# A separate project against which to charge quota.
|
1978
|
+
# @return [::String]
|
1979
|
+
#
|
1980
|
+
class Configuration
|
1981
|
+
extend ::Gapic::Config
|
1982
|
+
|
1983
|
+
config_attr :endpoint, "livestream.googleapis.com", ::String
|
1984
|
+
config_attr :credentials, nil do |value|
|
1985
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1986
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1987
|
+
allowed.any? { |klass| klass === value }
|
1988
|
+
end
|
1989
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1990
|
+
config_attr :lib_name, nil, ::String, nil
|
1991
|
+
config_attr :lib_version, nil, ::String, nil
|
1992
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1993
|
+
config_attr :interceptors, nil, ::Array, nil
|
1994
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1995
|
+
config_attr :metadata, nil, ::Hash, nil
|
1996
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1997
|
+
config_attr :quota_project, nil, ::String, nil
|
1998
|
+
|
1999
|
+
# @private
|
2000
|
+
def initialize parent_config = nil
|
2001
|
+
@parent_config = parent_config unless parent_config.nil?
|
2002
|
+
|
2003
|
+
yield self if block_given?
|
2004
|
+
end
|
2005
|
+
|
2006
|
+
##
|
2007
|
+
# Configurations for individual RPCs
|
2008
|
+
# @return [Rpcs]
|
2009
|
+
#
|
2010
|
+
def rpcs
|
2011
|
+
@rpcs ||= begin
|
2012
|
+
parent_rpcs = nil
|
2013
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2014
|
+
Rpcs.new parent_rpcs
|
2015
|
+
end
|
2016
|
+
end
|
2017
|
+
|
2018
|
+
##
|
2019
|
+
# Configuration RPC class for the LivestreamService API.
|
2020
|
+
#
|
2021
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2022
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2023
|
+
# the following configuration fields:
|
2024
|
+
#
|
2025
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2026
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
2027
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2028
|
+
# include the following keys:
|
2029
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2030
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2031
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2032
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2033
|
+
# trigger a retry.
|
2034
|
+
#
|
2035
|
+
class Rpcs
|
2036
|
+
##
|
2037
|
+
# RPC-specific configuration for `create_channel`
|
2038
|
+
# @return [::Gapic::Config::Method]
|
2039
|
+
#
|
2040
|
+
attr_reader :create_channel
|
2041
|
+
##
|
2042
|
+
# RPC-specific configuration for `list_channels`
|
2043
|
+
# @return [::Gapic::Config::Method]
|
2044
|
+
#
|
2045
|
+
attr_reader :list_channels
|
2046
|
+
##
|
2047
|
+
# RPC-specific configuration for `get_channel`
|
2048
|
+
# @return [::Gapic::Config::Method]
|
2049
|
+
#
|
2050
|
+
attr_reader :get_channel
|
2051
|
+
##
|
2052
|
+
# RPC-specific configuration for `delete_channel`
|
2053
|
+
# @return [::Gapic::Config::Method]
|
2054
|
+
#
|
2055
|
+
attr_reader :delete_channel
|
2056
|
+
##
|
2057
|
+
# RPC-specific configuration for `update_channel`
|
2058
|
+
# @return [::Gapic::Config::Method]
|
2059
|
+
#
|
2060
|
+
attr_reader :update_channel
|
2061
|
+
##
|
2062
|
+
# RPC-specific configuration for `start_channel`
|
2063
|
+
# @return [::Gapic::Config::Method]
|
2064
|
+
#
|
2065
|
+
attr_reader :start_channel
|
2066
|
+
##
|
2067
|
+
# RPC-specific configuration for `stop_channel`
|
2068
|
+
# @return [::Gapic::Config::Method]
|
2069
|
+
#
|
2070
|
+
attr_reader :stop_channel
|
2071
|
+
##
|
2072
|
+
# RPC-specific configuration for `create_input`
|
2073
|
+
# @return [::Gapic::Config::Method]
|
2074
|
+
#
|
2075
|
+
attr_reader :create_input
|
2076
|
+
##
|
2077
|
+
# RPC-specific configuration for `list_inputs`
|
2078
|
+
# @return [::Gapic::Config::Method]
|
2079
|
+
#
|
2080
|
+
attr_reader :list_inputs
|
2081
|
+
##
|
2082
|
+
# RPC-specific configuration for `get_input`
|
2083
|
+
# @return [::Gapic::Config::Method]
|
2084
|
+
#
|
2085
|
+
attr_reader :get_input
|
2086
|
+
##
|
2087
|
+
# RPC-specific configuration for `delete_input`
|
2088
|
+
# @return [::Gapic::Config::Method]
|
2089
|
+
#
|
2090
|
+
attr_reader :delete_input
|
2091
|
+
##
|
2092
|
+
# RPC-specific configuration for `update_input`
|
2093
|
+
# @return [::Gapic::Config::Method]
|
2094
|
+
#
|
2095
|
+
attr_reader :update_input
|
2096
|
+
##
|
2097
|
+
# RPC-specific configuration for `create_event`
|
2098
|
+
# @return [::Gapic::Config::Method]
|
2099
|
+
#
|
2100
|
+
attr_reader :create_event
|
2101
|
+
##
|
2102
|
+
# RPC-specific configuration for `list_events`
|
2103
|
+
# @return [::Gapic::Config::Method]
|
2104
|
+
#
|
2105
|
+
attr_reader :list_events
|
2106
|
+
##
|
2107
|
+
# RPC-specific configuration for `get_event`
|
2108
|
+
# @return [::Gapic::Config::Method]
|
2109
|
+
#
|
2110
|
+
attr_reader :get_event
|
2111
|
+
##
|
2112
|
+
# RPC-specific configuration for `delete_event`
|
2113
|
+
# @return [::Gapic::Config::Method]
|
2114
|
+
#
|
2115
|
+
attr_reader :delete_event
|
2116
|
+
|
2117
|
+
# @private
|
2118
|
+
def initialize parent_rpcs = nil
|
2119
|
+
create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel
|
2120
|
+
@create_channel = ::Gapic::Config::Method.new create_channel_config
|
2121
|
+
list_channels_config = parent_rpcs.list_channels if parent_rpcs.respond_to? :list_channels
|
2122
|
+
@list_channels = ::Gapic::Config::Method.new list_channels_config
|
2123
|
+
get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel
|
2124
|
+
@get_channel = ::Gapic::Config::Method.new get_channel_config
|
2125
|
+
delete_channel_config = parent_rpcs.delete_channel if parent_rpcs.respond_to? :delete_channel
|
2126
|
+
@delete_channel = ::Gapic::Config::Method.new delete_channel_config
|
2127
|
+
update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel
|
2128
|
+
@update_channel = ::Gapic::Config::Method.new update_channel_config
|
2129
|
+
start_channel_config = parent_rpcs.start_channel if parent_rpcs.respond_to? :start_channel
|
2130
|
+
@start_channel = ::Gapic::Config::Method.new start_channel_config
|
2131
|
+
stop_channel_config = parent_rpcs.stop_channel if parent_rpcs.respond_to? :stop_channel
|
2132
|
+
@stop_channel = ::Gapic::Config::Method.new stop_channel_config
|
2133
|
+
create_input_config = parent_rpcs.create_input if parent_rpcs.respond_to? :create_input
|
2134
|
+
@create_input = ::Gapic::Config::Method.new create_input_config
|
2135
|
+
list_inputs_config = parent_rpcs.list_inputs if parent_rpcs.respond_to? :list_inputs
|
2136
|
+
@list_inputs = ::Gapic::Config::Method.new list_inputs_config
|
2137
|
+
get_input_config = parent_rpcs.get_input if parent_rpcs.respond_to? :get_input
|
2138
|
+
@get_input = ::Gapic::Config::Method.new get_input_config
|
2139
|
+
delete_input_config = parent_rpcs.delete_input if parent_rpcs.respond_to? :delete_input
|
2140
|
+
@delete_input = ::Gapic::Config::Method.new delete_input_config
|
2141
|
+
update_input_config = parent_rpcs.update_input if parent_rpcs.respond_to? :update_input
|
2142
|
+
@update_input = ::Gapic::Config::Method.new update_input_config
|
2143
|
+
create_event_config = parent_rpcs.create_event if parent_rpcs.respond_to? :create_event
|
2144
|
+
@create_event = ::Gapic::Config::Method.new create_event_config
|
2145
|
+
list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events
|
2146
|
+
@list_events = ::Gapic::Config::Method.new list_events_config
|
2147
|
+
get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event
|
2148
|
+
@get_event = ::Gapic::Config::Method.new get_event_config
|
2149
|
+
delete_event_config = parent_rpcs.delete_event if parent_rpcs.respond_to? :delete_event
|
2150
|
+
@delete_event = ::Gapic::Config::Method.new delete_event_config
|
2151
|
+
|
2152
|
+
yield self if block_given?
|
2153
|
+
end
|
2154
|
+
end
|
2155
|
+
end
|
2156
|
+
end
|
2157
|
+
end
|
2158
|
+
end
|
2159
|
+
end
|
2160
|
+
end
|
2161
|
+
end
|
2162
|
+
end
|