google-cloud-video-live_stream-v1 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/video/live_stream/v1/bindings_override.rb +104 -0
  5. data/lib/google/cloud/video/live_stream/v1/livestream_service/client.rb +81 -61
  6. data/lib/google/cloud/video/live_stream/v1/livestream_service/operations.rb +14 -16
  7. data/lib/google/cloud/video/live_stream/v1/livestream_service/paths.rb +19 -0
  8. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/client.rb +1731 -0
  9. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/operations.rb +795 -0
  10. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest/service_stub.rb +1001 -0
  11. data/lib/google/cloud/video/live_stream/v1/livestream_service/rest.rb +60 -0
  12. data/lib/google/cloud/video/live_stream/v1/livestream_service.rb +7 -1
  13. data/lib/google/cloud/video/live_stream/v1/rest.rb +40 -0
  14. data/lib/google/cloud/video/live_stream/v1/version.rb +1 -1
  15. data/lib/google/cloud/video/live_stream/v1.rb +7 -2
  16. data/lib/google/cloud/video/livestream/v1/outputs_pb.rb +23 -0
  17. data/lib/google/cloud/video/livestream/v1/resources_pb.rb +77 -0
  18. data/proto_docs/google/api/client.rb +324 -0
  19. data/proto_docs/google/api/launch_stage.rb +71 -0
  20. data/proto_docs/google/cloud/video/livestream/v1/outputs.rb +108 -26
  21. data/proto_docs/google/cloud/video/livestream/v1/resources.rb +218 -16
  22. data/proto_docs/google/cloud/video/livestream/v1/service.rb +21 -9
  23. data/proto_docs/google/protobuf/empty.rb +0 -2
  24. data/proto_docs/google/rpc/status.rb +4 -2
  25. data/proto_docs/google/type/datetime.rb +99 -0
  26. metadata +36 -7
@@ -0,0 +1,1001 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/video/livestream/v1/service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Video
24
+ module LiveStream
25
+ module V1
26
+ module LivestreamService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the LivestreamService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the create_channel REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Longrunning::Operation]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Longrunning::Operation]
57
+ # A result object deserialized from the server's reply
58
+ def create_channel request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split("=", 2) }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # Baseline implementation for the list_channels REST call
84
+ #
85
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest]
86
+ # A request object representing the call parameters. Required.
87
+ # @param options [::Gapic::CallOptions]
88
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
89
+ #
90
+ # @yield [result, operation] Access the result along with the TransportOperation object
91
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse]
95
+ # A result object deserialized from the server's reply
96
+ def list_channels request_pb, options = nil
97
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
98
+
99
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_channels_request request_pb
100
+ query_string_params = if query_string_params.any?
101
+ query_string_params.to_h { |p| p.split("=", 2) }
102
+ else
103
+ {}
104
+ end
105
+
106
+ response = @client_stub.make_http_request(
107
+ verb,
108
+ uri: uri,
109
+ body: body || "",
110
+ params: query_string_params,
111
+ options: options
112
+ )
113
+ operation = ::Gapic::Rest::TransportOperation.new response
114
+ result = ::Google::Cloud::Video::LiveStream::V1::ListChannelsResponse.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, operation if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # Baseline implementation for the get_channel REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetChannelRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @param options [::Gapic::CallOptions]
126
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
+ #
128
+ # @yield [result, operation] Access the result along with the TransportOperation object
129
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Channel]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Cloud::Video::LiveStream::V1::Channel]
133
+ # A result object deserialized from the server's reply
134
+ def get_channel request_pb, options = nil
135
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
136
+
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_request request_pb
138
+ query_string_params = if query_string_params.any?
139
+ query_string_params.to_h { |p| p.split("=", 2) }
140
+ else
141
+ {}
142
+ end
143
+
144
+ response = @client_stub.make_http_request(
145
+ verb,
146
+ uri: uri,
147
+ body: body || "",
148
+ params: query_string_params,
149
+ options: options
150
+ )
151
+ operation = ::Gapic::Rest::TransportOperation.new response
152
+ result = ::Google::Cloud::Video::LiveStream::V1::Channel.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, operation if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # Baseline implementation for the delete_channel REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @param options [::Gapic::CallOptions]
164
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
165
+ #
166
+ # @yield [result, operation] Access the result along with the TransportOperation object
167
+ # @yieldparam result [::Google::Longrunning::Operation]
168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
169
+ #
170
+ # @return [::Google::Longrunning::Operation]
171
+ # A result object deserialized from the server's reply
172
+ def delete_channel request_pb, options = nil
173
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
174
+
175
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_request request_pb
176
+ query_string_params = if query_string_params.any?
177
+ query_string_params.to_h { |p| p.split("=", 2) }
178
+ else
179
+ {}
180
+ end
181
+
182
+ response = @client_stub.make_http_request(
183
+ verb,
184
+ uri: uri,
185
+ body: body || "",
186
+ params: query_string_params,
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
191
+
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+
196
+ ##
197
+ # Baseline implementation for the update_channel REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @param options [::Gapic::CallOptions]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @yield [result, operation] Access the result along with the TransportOperation object
205
+ # @yieldparam result [::Google::Longrunning::Operation]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Longrunning::Operation]
209
+ # A result object deserialized from the server's reply
210
+ def update_channel request_pb, options = nil
211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
212
+
213
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_request request_pb
214
+ query_string_params = if query_string_params.any?
215
+ query_string_params.to_h { |p| p.split("=", 2) }
216
+ else
217
+ {}
218
+ end
219
+
220
+ response = @client_stub.make_http_request(
221
+ verb,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ options: options
226
+ )
227
+ operation = ::Gapic::Rest::TransportOperation.new response
228
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
229
+
230
+ yield result, operation if block_given?
231
+ result
232
+ end
233
+
234
+ ##
235
+ # Baseline implementation for the start_channel REST call
236
+ #
237
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest]
238
+ # A request object representing the call parameters. Required.
239
+ # @param options [::Gapic::CallOptions]
240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
241
+ #
242
+ # @yield [result, operation] Access the result along with the TransportOperation object
243
+ # @yieldparam result [::Google::Longrunning::Operation]
244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
245
+ #
246
+ # @return [::Google::Longrunning::Operation]
247
+ # A result object deserialized from the server's reply
248
+ def start_channel request_pb, options = nil
249
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
250
+
251
+ verb, uri, query_string_params, body = ServiceStub.transcode_start_channel_request request_pb
252
+ query_string_params = if query_string_params.any?
253
+ query_string_params.to_h { |p| p.split("=", 2) }
254
+ else
255
+ {}
256
+ end
257
+
258
+ response = @client_stub.make_http_request(
259
+ verb,
260
+ uri: uri,
261
+ body: body || "",
262
+ params: query_string_params,
263
+ options: options
264
+ )
265
+ operation = ::Gapic::Rest::TransportOperation.new response
266
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
267
+
268
+ yield result, operation if block_given?
269
+ result
270
+ end
271
+
272
+ ##
273
+ # Baseline implementation for the stop_channel REST call
274
+ #
275
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest]
276
+ # A request object representing the call parameters. Required.
277
+ # @param options [::Gapic::CallOptions]
278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
279
+ #
280
+ # @yield [result, operation] Access the result along with the TransportOperation object
281
+ # @yieldparam result [::Google::Longrunning::Operation]
282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
283
+ #
284
+ # @return [::Google::Longrunning::Operation]
285
+ # A result object deserialized from the server's reply
286
+ def stop_channel request_pb, options = nil
287
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
288
+
289
+ verb, uri, query_string_params, body = ServiceStub.transcode_stop_channel_request request_pb
290
+ query_string_params = if query_string_params.any?
291
+ query_string_params.to_h { |p| p.split("=", 2) }
292
+ else
293
+ {}
294
+ end
295
+
296
+ response = @client_stub.make_http_request(
297
+ verb,
298
+ uri: uri,
299
+ body: body || "",
300
+ params: query_string_params,
301
+ options: options
302
+ )
303
+ operation = ::Gapic::Rest::TransportOperation.new response
304
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
305
+
306
+ yield result, operation if block_given?
307
+ result
308
+ end
309
+
310
+ ##
311
+ # Baseline implementation for the create_input REST call
312
+ #
313
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest]
314
+ # A request object representing the call parameters. Required.
315
+ # @param options [::Gapic::CallOptions]
316
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
317
+ #
318
+ # @yield [result, operation] Access the result along with the TransportOperation object
319
+ # @yieldparam result [::Google::Longrunning::Operation]
320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
321
+ #
322
+ # @return [::Google::Longrunning::Operation]
323
+ # A result object deserialized from the server's reply
324
+ def create_input request_pb, options = nil
325
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
326
+
327
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_input_request request_pb
328
+ query_string_params = if query_string_params.any?
329
+ query_string_params.to_h { |p| p.split("=", 2) }
330
+ else
331
+ {}
332
+ end
333
+
334
+ response = @client_stub.make_http_request(
335
+ verb,
336
+ uri: uri,
337
+ body: body || "",
338
+ params: query_string_params,
339
+ options: options
340
+ )
341
+ operation = ::Gapic::Rest::TransportOperation.new response
342
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
343
+
344
+ yield result, operation if block_given?
345
+ result
346
+ end
347
+
348
+ ##
349
+ # Baseline implementation for the list_inputs REST call
350
+ #
351
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest]
352
+ # A request object representing the call parameters. Required.
353
+ # @param options [::Gapic::CallOptions]
354
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
355
+ #
356
+ # @yield [result, operation] Access the result along with the TransportOperation object
357
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse]
358
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
359
+ #
360
+ # @return [::Google::Cloud::Video::LiveStream::V1::ListInputsResponse]
361
+ # A result object deserialized from the server's reply
362
+ def list_inputs request_pb, options = nil
363
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
364
+
365
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_inputs_request request_pb
366
+ query_string_params = if query_string_params.any?
367
+ query_string_params.to_h { |p| p.split("=", 2) }
368
+ else
369
+ {}
370
+ end
371
+
372
+ response = @client_stub.make_http_request(
373
+ verb,
374
+ uri: uri,
375
+ body: body || "",
376
+ params: query_string_params,
377
+ options: options
378
+ )
379
+ operation = ::Gapic::Rest::TransportOperation.new response
380
+ result = ::Google::Cloud::Video::LiveStream::V1::ListInputsResponse.decode_json response.body, ignore_unknown_fields: true
381
+
382
+ yield result, operation if block_given?
383
+ result
384
+ end
385
+
386
+ ##
387
+ # Baseline implementation for the get_input REST call
388
+ #
389
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetInputRequest]
390
+ # A request object representing the call parameters. Required.
391
+ # @param options [::Gapic::CallOptions]
392
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
393
+ #
394
+ # @yield [result, operation] Access the result along with the TransportOperation object
395
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Input]
396
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
397
+ #
398
+ # @return [::Google::Cloud::Video::LiveStream::V1::Input]
399
+ # A result object deserialized from the server's reply
400
+ def get_input request_pb, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
402
+
403
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_input_request request_pb
404
+ query_string_params = if query_string_params.any?
405
+ query_string_params.to_h { |p| p.split("=", 2) }
406
+ else
407
+ {}
408
+ end
409
+
410
+ response = @client_stub.make_http_request(
411
+ verb,
412
+ uri: uri,
413
+ body: body || "",
414
+ params: query_string_params,
415
+ options: options
416
+ )
417
+ operation = ::Gapic::Rest::TransportOperation.new response
418
+ result = ::Google::Cloud::Video::LiveStream::V1::Input.decode_json response.body, ignore_unknown_fields: true
419
+
420
+ yield result, operation if block_given?
421
+ result
422
+ end
423
+
424
+ ##
425
+ # Baseline implementation for the delete_input REST call
426
+ #
427
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest]
428
+ # A request object representing the call parameters. Required.
429
+ # @param options [::Gapic::CallOptions]
430
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
431
+ #
432
+ # @yield [result, operation] Access the result along with the TransportOperation object
433
+ # @yieldparam result [::Google::Longrunning::Operation]
434
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
435
+ #
436
+ # @return [::Google::Longrunning::Operation]
437
+ # A result object deserialized from the server's reply
438
+ def delete_input request_pb, options = nil
439
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
440
+
441
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_input_request request_pb
442
+ query_string_params = if query_string_params.any?
443
+ query_string_params.to_h { |p| p.split("=", 2) }
444
+ else
445
+ {}
446
+ end
447
+
448
+ response = @client_stub.make_http_request(
449
+ verb,
450
+ uri: uri,
451
+ body: body || "",
452
+ params: query_string_params,
453
+ options: options
454
+ )
455
+ operation = ::Gapic::Rest::TransportOperation.new response
456
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
457
+
458
+ yield result, operation if block_given?
459
+ result
460
+ end
461
+
462
+ ##
463
+ # Baseline implementation for the update_input REST call
464
+ #
465
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest]
466
+ # A request object representing the call parameters. Required.
467
+ # @param options [::Gapic::CallOptions]
468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
469
+ #
470
+ # @yield [result, operation] Access the result along with the TransportOperation object
471
+ # @yieldparam result [::Google::Longrunning::Operation]
472
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
473
+ #
474
+ # @return [::Google::Longrunning::Operation]
475
+ # A result object deserialized from the server's reply
476
+ def update_input request_pb, options = nil
477
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
478
+
479
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_input_request request_pb
480
+ query_string_params = if query_string_params.any?
481
+ query_string_params.to_h { |p| p.split("=", 2) }
482
+ else
483
+ {}
484
+ end
485
+
486
+ response = @client_stub.make_http_request(
487
+ verb,
488
+ uri: uri,
489
+ body: body || "",
490
+ params: query_string_params,
491
+ options: options
492
+ )
493
+ operation = ::Gapic::Rest::TransportOperation.new response
494
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
495
+
496
+ yield result, operation if block_given?
497
+ result
498
+ end
499
+
500
+ ##
501
+ # Baseline implementation for the create_event REST call
502
+ #
503
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest]
504
+ # A request object representing the call parameters. Required.
505
+ # @param options [::Gapic::CallOptions]
506
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
507
+ #
508
+ # @yield [result, operation] Access the result along with the TransportOperation object
509
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event]
510
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
511
+ #
512
+ # @return [::Google::Cloud::Video::LiveStream::V1::Event]
513
+ # A result object deserialized from the server's reply
514
+ def create_event request_pb, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
516
+
517
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_event_request request_pb
518
+ query_string_params = if query_string_params.any?
519
+ query_string_params.to_h { |p| p.split("=", 2) }
520
+ else
521
+ {}
522
+ end
523
+
524
+ response = @client_stub.make_http_request(
525
+ verb,
526
+ uri: uri,
527
+ body: body || "",
528
+ params: query_string_params,
529
+ options: options
530
+ )
531
+ operation = ::Gapic::Rest::TransportOperation.new response
532
+ result = ::Google::Cloud::Video::LiveStream::V1::Event.decode_json response.body, ignore_unknown_fields: true
533
+
534
+ yield result, operation if block_given?
535
+ result
536
+ end
537
+
538
+ ##
539
+ # Baseline implementation for the list_events REST call
540
+ #
541
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest]
542
+ # A request object representing the call parameters. Required.
543
+ # @param options [::Gapic::CallOptions]
544
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
545
+ #
546
+ # @yield [result, operation] Access the result along with the TransportOperation object
547
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse]
548
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
549
+ #
550
+ # @return [::Google::Cloud::Video::LiveStream::V1::ListEventsResponse]
551
+ # A result object deserialized from the server's reply
552
+ def list_events request_pb, options = nil
553
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
554
+
555
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_events_request request_pb
556
+ query_string_params = if query_string_params.any?
557
+ query_string_params.to_h { |p| p.split("=", 2) }
558
+ else
559
+ {}
560
+ end
561
+
562
+ response = @client_stub.make_http_request(
563
+ verb,
564
+ uri: uri,
565
+ body: body || "",
566
+ params: query_string_params,
567
+ options: options
568
+ )
569
+ operation = ::Gapic::Rest::TransportOperation.new response
570
+ result = ::Google::Cloud::Video::LiveStream::V1::ListEventsResponse.decode_json response.body, ignore_unknown_fields: true
571
+
572
+ yield result, operation if block_given?
573
+ result
574
+ end
575
+
576
+ ##
577
+ # Baseline implementation for the get_event REST call
578
+ #
579
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetEventRequest]
580
+ # A request object representing the call parameters. Required.
581
+ # @param options [::Gapic::CallOptions]
582
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
583
+ #
584
+ # @yield [result, operation] Access the result along with the TransportOperation object
585
+ # @yieldparam result [::Google::Cloud::Video::LiveStream::V1::Event]
586
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
587
+ #
588
+ # @return [::Google::Cloud::Video::LiveStream::V1::Event]
589
+ # A result object deserialized from the server's reply
590
+ def get_event request_pb, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
592
+
593
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_event_request request_pb
594
+ query_string_params = if query_string_params.any?
595
+ query_string_params.to_h { |p| p.split("=", 2) }
596
+ else
597
+ {}
598
+ end
599
+
600
+ response = @client_stub.make_http_request(
601
+ verb,
602
+ uri: uri,
603
+ body: body || "",
604
+ params: query_string_params,
605
+ options: options
606
+ )
607
+ operation = ::Gapic::Rest::TransportOperation.new response
608
+ result = ::Google::Cloud::Video::LiveStream::V1::Event.decode_json response.body, ignore_unknown_fields: true
609
+
610
+ yield result, operation if block_given?
611
+ result
612
+ end
613
+
614
+ ##
615
+ # Baseline implementation for the delete_event REST call
616
+ #
617
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest]
618
+ # A request object representing the call parameters. Required.
619
+ # @param options [::Gapic::CallOptions]
620
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
621
+ #
622
+ # @yield [result, operation] Access the result along with the TransportOperation object
623
+ # @yieldparam result [::Google::Protobuf::Empty]
624
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
625
+ #
626
+ # @return [::Google::Protobuf::Empty]
627
+ # A result object deserialized from the server's reply
628
+ def delete_event request_pb, options = nil
629
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
630
+
631
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_request request_pb
632
+ query_string_params = if query_string_params.any?
633
+ query_string_params.to_h { |p| p.split("=", 2) }
634
+ else
635
+ {}
636
+ end
637
+
638
+ response = @client_stub.make_http_request(
639
+ verb,
640
+ uri: uri,
641
+ body: body || "",
642
+ params: query_string_params,
643
+ options: options
644
+ )
645
+ operation = ::Gapic::Rest::TransportOperation.new response
646
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
647
+
648
+ yield result, operation if block_given?
649
+ result
650
+ end
651
+
652
+ ##
653
+ # @private
654
+ #
655
+ # GRPC transcoding helper method for the create_channel REST call
656
+ #
657
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest]
658
+ # A request object representing the call parameters. Required.
659
+ # @return [Array(String, [String, nil], Hash{String => String})]
660
+ # Uri, Body, Query string parameters
661
+ def self.transcode_create_channel_request request_pb
662
+ transcoder = Gapic::Rest::GrpcTranscoder.new
663
+ .with_bindings(
664
+ uri_method: :post,
665
+ uri_template: "/v1/{parent}/channels",
666
+ body: "channel",
667
+ matches: [
668
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
669
+ ]
670
+ )
671
+ transcoder.transcode request_pb
672
+ end
673
+
674
+ ##
675
+ # @private
676
+ #
677
+ # GRPC transcoding helper method for the list_channels REST call
678
+ #
679
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest]
680
+ # A request object representing the call parameters. Required.
681
+ # @return [Array(String, [String, nil], Hash{String => String})]
682
+ # Uri, Body, Query string parameters
683
+ def self.transcode_list_channels_request request_pb
684
+ transcoder = Gapic::Rest::GrpcTranscoder.new
685
+ .with_bindings(
686
+ uri_method: :get,
687
+ uri_template: "/v1/{parent}/channels",
688
+ matches: [
689
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
690
+ ]
691
+ )
692
+ transcoder.transcode request_pb
693
+ end
694
+
695
+ ##
696
+ # @private
697
+ #
698
+ # GRPC transcoding helper method for the get_channel REST call
699
+ #
700
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetChannelRequest]
701
+ # A request object representing the call parameters. Required.
702
+ # @return [Array(String, [String, nil], Hash{String => String})]
703
+ # Uri, Body, Query string parameters
704
+ def self.transcode_get_channel_request request_pb
705
+ transcoder = Gapic::Rest::GrpcTranscoder.new
706
+ .with_bindings(
707
+ uri_method: :get,
708
+ uri_template: "/v1/{name}",
709
+ matches: [
710
+ ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
711
+ ]
712
+ )
713
+ transcoder.transcode request_pb
714
+ end
715
+
716
+ ##
717
+ # @private
718
+ #
719
+ # GRPC transcoding helper method for the delete_channel REST call
720
+ #
721
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest]
722
+ # A request object representing the call parameters. Required.
723
+ # @return [Array(String, [String, nil], Hash{String => String})]
724
+ # Uri, Body, Query string parameters
725
+ def self.transcode_delete_channel_request request_pb
726
+ transcoder = Gapic::Rest::GrpcTranscoder.new
727
+ .with_bindings(
728
+ uri_method: :delete,
729
+ uri_template: "/v1/{name}",
730
+ matches: [
731
+ ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
732
+ ]
733
+ )
734
+ transcoder.transcode request_pb
735
+ end
736
+
737
+ ##
738
+ # @private
739
+ #
740
+ # GRPC transcoding helper method for the update_channel REST call
741
+ #
742
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest]
743
+ # A request object representing the call parameters. Required.
744
+ # @return [Array(String, [String, nil], Hash{String => String})]
745
+ # Uri, Body, Query string parameters
746
+ def self.transcode_update_channel_request request_pb
747
+ transcoder = Gapic::Rest::GrpcTranscoder.new
748
+ .with_bindings(
749
+ uri_method: :patch,
750
+ uri_template: "/v1/{channel.name}",
751
+ body: "channel",
752
+ matches: [
753
+ ["channel.name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
754
+ ]
755
+ )
756
+ transcoder.transcode request_pb
757
+ end
758
+
759
+ ##
760
+ # @private
761
+ #
762
+ # GRPC transcoding helper method for the start_channel REST call
763
+ #
764
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StartChannelRequest]
765
+ # A request object representing the call parameters. Required.
766
+ # @return [Array(String, [String, nil], Hash{String => String})]
767
+ # Uri, Body, Query string parameters
768
+ def self.transcode_start_channel_request request_pb
769
+ transcoder = Gapic::Rest::GrpcTranscoder.new
770
+ .with_bindings(
771
+ uri_method: :post,
772
+ uri_template: "/v1/{name}:start",
773
+ body: "*",
774
+ matches: [
775
+ ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
776
+ ]
777
+ )
778
+ transcoder.transcode request_pb
779
+ end
780
+
781
+ ##
782
+ # @private
783
+ #
784
+ # GRPC transcoding helper method for the stop_channel REST call
785
+ #
786
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::StopChannelRequest]
787
+ # A request object representing the call parameters. Required.
788
+ # @return [Array(String, [String, nil], Hash{String => String})]
789
+ # Uri, Body, Query string parameters
790
+ def self.transcode_stop_channel_request request_pb
791
+ transcoder = Gapic::Rest::GrpcTranscoder.new
792
+ .with_bindings(
793
+ uri_method: :post,
794
+ uri_template: "/v1/{name}:stop",
795
+ body: "*",
796
+ matches: [
797
+ ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
798
+ ]
799
+ )
800
+ transcoder.transcode request_pb
801
+ end
802
+
803
+ ##
804
+ # @private
805
+ #
806
+ # GRPC transcoding helper method for the create_input REST call
807
+ #
808
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateInputRequest]
809
+ # A request object representing the call parameters. Required.
810
+ # @return [Array(String, [String, nil], Hash{String => String})]
811
+ # Uri, Body, Query string parameters
812
+ def self.transcode_create_input_request request_pb
813
+ transcoder = Gapic::Rest::GrpcTranscoder.new
814
+ .with_bindings(
815
+ uri_method: :post,
816
+ uri_template: "/v1/{parent}/inputs",
817
+ body: "input",
818
+ matches: [
819
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
820
+ ]
821
+ )
822
+ transcoder.transcode request_pb
823
+ end
824
+
825
+ ##
826
+ # @private
827
+ #
828
+ # GRPC transcoding helper method for the list_inputs REST call
829
+ #
830
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListInputsRequest]
831
+ # A request object representing the call parameters. Required.
832
+ # @return [Array(String, [String, nil], Hash{String => String})]
833
+ # Uri, Body, Query string parameters
834
+ def self.transcode_list_inputs_request request_pb
835
+ transcoder = Gapic::Rest::GrpcTranscoder.new
836
+ .with_bindings(
837
+ uri_method: :get,
838
+ uri_template: "/v1/{parent}/inputs",
839
+ matches: [
840
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
841
+ ]
842
+ )
843
+ transcoder.transcode request_pb
844
+ end
845
+
846
+ ##
847
+ # @private
848
+ #
849
+ # GRPC transcoding helper method for the get_input REST call
850
+ #
851
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetInputRequest]
852
+ # A request object representing the call parameters. Required.
853
+ # @return [Array(String, [String, nil], Hash{String => String})]
854
+ # Uri, Body, Query string parameters
855
+ def self.transcode_get_input_request request_pb
856
+ transcoder = Gapic::Rest::GrpcTranscoder.new
857
+ .with_bindings(
858
+ uri_method: :get,
859
+ uri_template: "/v1/{name}",
860
+ matches: [
861
+ ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false]
862
+ ]
863
+ )
864
+ transcoder.transcode request_pb
865
+ end
866
+
867
+ ##
868
+ # @private
869
+ #
870
+ # GRPC transcoding helper method for the delete_input REST call
871
+ #
872
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest]
873
+ # A request object representing the call parameters. Required.
874
+ # @return [Array(String, [String, nil], Hash{String => String})]
875
+ # Uri, Body, Query string parameters
876
+ def self.transcode_delete_input_request request_pb
877
+ transcoder = Gapic::Rest::GrpcTranscoder.new
878
+ .with_bindings(
879
+ uri_method: :delete,
880
+ uri_template: "/v1/{name}",
881
+ matches: [
882
+ ["name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false]
883
+ ]
884
+ )
885
+ transcoder.transcode request_pb
886
+ end
887
+
888
+ ##
889
+ # @private
890
+ #
891
+ # GRPC transcoding helper method for the update_input REST call
892
+ #
893
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest]
894
+ # A request object representing the call parameters. Required.
895
+ # @return [Array(String, [String, nil], Hash{String => String})]
896
+ # Uri, Body, Query string parameters
897
+ def self.transcode_update_input_request request_pb
898
+ transcoder = Gapic::Rest::GrpcTranscoder.new
899
+ .with_bindings(
900
+ uri_method: :patch,
901
+ uri_template: "/v1/{input.name}",
902
+ body: "input",
903
+ matches: [
904
+ ["input.name", %r{^projects/[^/]+/locations/[^/]+/inputs/[^/]+/?$}, false]
905
+ ]
906
+ )
907
+ transcoder.transcode request_pb
908
+ end
909
+
910
+ ##
911
+ # @private
912
+ #
913
+ # GRPC transcoding helper method for the create_event REST call
914
+ #
915
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::CreateEventRequest]
916
+ # A request object representing the call parameters. Required.
917
+ # @return [Array(String, [String, nil], Hash{String => String})]
918
+ # Uri, Body, Query string parameters
919
+ def self.transcode_create_event_request request_pb
920
+ transcoder = Gapic::Rest::GrpcTranscoder.new
921
+ .with_bindings(
922
+ uri_method: :post,
923
+ uri_template: "/v1/{parent}/events",
924
+ body: "event",
925
+ matches: [
926
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
927
+ ]
928
+ )
929
+ transcoder.transcode request_pb
930
+ end
931
+
932
+ ##
933
+ # @private
934
+ #
935
+ # GRPC transcoding helper method for the list_events REST call
936
+ #
937
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::ListEventsRequest]
938
+ # A request object representing the call parameters. Required.
939
+ # @return [Array(String, [String, nil], Hash{String => String})]
940
+ # Uri, Body, Query string parameters
941
+ def self.transcode_list_events_request request_pb
942
+ transcoder = Gapic::Rest::GrpcTranscoder.new
943
+ .with_bindings(
944
+ uri_method: :get,
945
+ uri_template: "/v1/{parent}/events",
946
+ matches: [
947
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false]
948
+ ]
949
+ )
950
+ transcoder.transcode request_pb
951
+ end
952
+
953
+ ##
954
+ # @private
955
+ #
956
+ # GRPC transcoding helper method for the get_event REST call
957
+ #
958
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::GetEventRequest]
959
+ # A request object representing the call parameters. Required.
960
+ # @return [Array(String, [String, nil], Hash{String => String})]
961
+ # Uri, Body, Query string parameters
962
+ def self.transcode_get_event_request request_pb
963
+ transcoder = Gapic::Rest::GrpcTranscoder.new
964
+ .with_bindings(
965
+ uri_method: :get,
966
+ uri_template: "/v1/{name}",
967
+ matches: [
968
+ ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/events/[^/]+/?$}, false]
969
+ ]
970
+ )
971
+ transcoder.transcode request_pb
972
+ end
973
+
974
+ ##
975
+ # @private
976
+ #
977
+ # GRPC transcoding helper method for the delete_event REST call
978
+ #
979
+ # @param request_pb [::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest]
980
+ # A request object representing the call parameters. Required.
981
+ # @return [Array(String, [String, nil], Hash{String => String})]
982
+ # Uri, Body, Query string parameters
983
+ def self.transcode_delete_event_request request_pb
984
+ transcoder = Gapic::Rest::GrpcTranscoder.new
985
+ .with_bindings(
986
+ uri_method: :delete,
987
+ uri_template: "/v1/{name}",
988
+ matches: [
989
+ ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/events/[^/]+/?$}, false]
990
+ ]
991
+ )
992
+ transcoder.transcode request_pb
993
+ end
994
+ end
995
+ end
996
+ end
997
+ end
998
+ end
999
+ end
1000
+ end
1001
+ end